<oembed><type>rich</type><version>1.0</version><author_name>npub1lhe3qfx2q5m7mq5d39waepf9lzhsy0cdey66svn63fyk6rt6n7ps7zg7ed</author_name><author_url>https://nostr.ae/npub1lhe3qfx2q5m7mq5d39waepf9lzhsy0cdey66svn63fyk6rt6n7ps7zg7ed</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2014-12-15&#xA;📝 Original message:This is a pretty good example about refactoring discipline as well as&#xA;premature/over optimisation.&#xA;&#xA;We all want to see more modular code, but the first steps should just be to&#xA;relocate blocks of code so everything is more logically organised in&#xA;smaller files (especially for consensus critical code). Refactoring should&#xA;come in a second wave preferably after a stable release. Refactoring should&#xA;be in the pure sense, optimising code with absolutely no change in&#xA;behaviour.&#xA;&#xA;When it comes to actual API changes, I think we need to be a lot more&#xA;careful and should be considered feature requests and get a lot more&#xA;scrutiny as we are essentially breaking backwards compatibility. #4890 was&#xA;pretty much merged with no discussion or thought yet other really simple&#xA;and uncontroversial PRs remain unmerged for months. A key question in the&#xA;case of EvalScript() would have been, &#34;why are we passing txTo and nIn&#xA;here, and are there any future use cases that might require them? Why&#xA;should this be removed from the API and the entire method signature&#xA;changed?&#34;. BC breaks always need strong justification.&#xA;&#xA;So I&#39;ve expressed my concern a few times about the speed and frequency of&#xA;refactoring and also the way it&#39;s being done. I am not alone, as others not&#xA;directly connected with the Bitcoin Core project have also expressed&#xA;concerns about the number of refactorings &#34;for the sake of refactoring&#34;,&#xA;especially of consensus critical code. Careful as we may be, we know from&#xA;history that small edge case bugs can creep in very easily and cause a lot&#xA;of unforeseen problems.&#xA;&#xA;BtcDrak&#xA;&#xA;&#xA;On Mon, Dec 15, 2014 at 12:47 PM, Peter Todd &lt;pete at petertodd.org&gt; wrote:&#xA;&gt;&#xA;&gt; BtcDrak was working on rebasing my CHECKLOCKTIMEVERIFY¹ patch to master a&#xA;&gt; few&#xA;&gt; days ago and found a fairly large design change that makes merging it&#xA;&gt; currently&#xA;&gt; impossible. Pull-req #4890², specifically commit c7829ea7, changed the&#xA;&gt; EvalScript() function to take an abstract SignatureChecker object,&#xA;&gt; removing the&#xA;&gt; txTo and nIn arguments that used to contain the transaction the script was&#xA;&gt; in&#xA;&gt; and the txin # respectively. CHECKLOCKTIMEVERIFY needs txTo to obtain the&#xA;&gt; nLockTime field of the transaction, and it needs nIn to obtain the&#xA;&gt; nSequence of&#xA;&gt; the txin.&#xA;&gt;&#xA;&gt; We need to fix this if CHECKLOCKTIMEVERIFY is to be merged.&#xA;&gt;&#xA;&gt; Secondly, that this change was made, and the manner in which is was made,&#xA;&gt; is I&#xA;&gt; think indicative of a development process that has been taking significant&#xA;&gt; risks with regard to refactoring the consensus critical codebase. I know I&#xA;&gt; personally have had a hard time keeping up with the very large volume of&#xA;&gt; code&#xA;&gt; being moved and changed for the v0.10 release, and I know BtcDrak - who is&#xA;&gt; keeping Viacoin up to date with v0.10 - has also had a hard time giving the&#xA;&gt; changes reasonable review. The #4890 pull-req in question had no ACKs at&#xA;&gt; all,&#xA;&gt; and only two untested utACKS, which I find worrying for something that made&#xA;&gt; significant consensus critical code changes.&#xA;&gt;&#xA;&gt; While it would be nice to have a library encapsulating the consensus code,&#xA;&gt; this&#xA;&gt; shouldn&#39;t come at the cost of safety, especially when the actual users of&#xA;&gt; that&#xA;&gt; library or their needs is still uncertain. This is after all a&#xA;&gt; multi-billion&#xA;&gt; project where a simple fork will cost miners alone tens of thousands of&#xA;&gt; dollars&#xA;&gt; an hour; easily much more if it results in users being defrauded. That&#39;s&#xA;&gt; also&#xA;&gt; not taking into account the significant negative PR impact and loss of&#xA;&gt; trust. I&#xA;&gt; personally would recommend *not* upgrading to v0.10 due to these issues.&#xA;&gt;&#xA;&gt; A much safer approach would be to keep the code changes required for a&#xA;&gt; consensus library to only simple movements of code for this release, accept&#xA;&gt; that the interface to that library won&#39;t be ideal, and wait until we have&#xA;&gt; feedback from multiple opensource projects with publicly evaluatable code&#xA;&gt; on&#xA;&gt; where to go next with the API.&#xA;&gt;&#xA;&gt; 1) https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki&#xA;&gt; 2) https://github.com/bitcoin/bitcoin/pull/4890&#xA;&gt;&#xA;&gt; --&#xA;&gt; &#39;peter&#39;[:-1]@petertodd.org&#xA;&gt; 00000000000000001b18a596ecadd07c0e49620fb71b16f9e41131df9fc52fa6&#xA;&gt;&#xA;&gt;&#xA;&gt; ------------------------------------------------------------------------------&#xA;&gt; Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server&#xA;&gt; from Actuate! Instantly Supercharge Your Business Reports and Dashboards&#xA;&gt; with Interactivity, Sharing, Native Excel Exports, App Integration &amp; more&#xA;&gt; Get technology previously reserved for billion-dollar corporations, FREE&#xA;&gt;&#xA;&gt; http://pubads.g.doubleclick.net/gampad/clk?id=164703151&amp;iu=/4140/ostg.clktrk&#xA;&gt; _______________________________________________&#xA;&gt; Bitcoin-development mailing list&#xA;&gt; Bitcoin-development at lists.sourceforge.net&#xA;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20141215/d2a843f5/attachment.html&gt;</html></oembed>