Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1S9Gin-0005JI-Qp for bitcoin-development@lists.sourceforge.net; Sun, 18 Mar 2012 14:04:33 +0000 X-ACL-Warn: Received: from nm11-vm2.bullet.mail.ne1.yahoo.com ([98.138.90.159]) by sog-mx-2.v43.ch3.sourceforge.com with smtp (Exim 4.76) id 1S9Gim-0006c1-VR for bitcoin-development@lists.sourceforge.net; Sun, 18 Mar 2012 14:04:33 +0000 Received: from [98.138.90.51] by nm11.bullet.mail.ne1.yahoo.com with NNFMP; 18 Mar 2012 14:04:27 -0000 Received: from [98.138.89.199] by tm4.bullet.mail.ne1.yahoo.com with NNFMP; 18 Mar 2012 14:04:27 -0000 Received: from [127.0.0.1] by omp1057.mail.ne1.yahoo.com with NNFMP; 18 Mar 2012 14:04:27 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 128585.50088.bm@omp1057.mail.ne1.yahoo.com Received: (qmail 53908 invoked by uid 60001); 18 Mar 2012 14:04:27 -0000 X-YMail-OSG: eCHRjfUVM1ktMyMhh3pQcyYU00oUHEmBkf5Lp3Zaa01uuGJ NyNLaMC2mPQNUmQdwruhoZ8VEpDBYGpKDyP2hrpt2A9G6QJ6PPBThWN7lry_ kcS0wzEdKfWxYamHVKDr1kq69ypzOJG3GdE9mgmHRMFfV8k42KGjB8qScuMp PoIhg4fc1dmt06RIbQXWFdKNBliTE92HTrkPHRCKzilM9nevcFJWyNsFhz5z Tp1Pf.r_Z3D6PpYXr1RS_bGHhS3uUqRtnoySEHMnC2H24FSv4jK.v7lyrYKW zVNLizkBBzZTdDGWE3PSNUjksP09uPpEM.w653em9L8Beyik95YptHRIuK6t dTjDtw4X.GdvXokCAmQfJ0kn2aSnmlBMYY5c3VN0DRaOIZhJKvzlcnQVFww- - Received: from [92.20.187.240] by web121003.mail.ne1.yahoo.com via HTTP; Sun, 18 Mar 2012 07:04:27 PDT X-Mailer: YahooMailWebService/0.8.117.340979 Message-ID: <1332079467.53650.YahooMailNeo@web121003.mail.ne1.yahoo.com> Date: Sun, 18 Mar 2012 07:04:27 -0700 (PDT) From: Amir Taaki To: "bitcoin-development@lists.sourceforge.net" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: 0.2 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [98.138.90.159 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zgenjix[at]yahoo.com) -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.3 AWL AWL: From: address is in the auto white-list X-Headers-End: 1S9Gim-0006c1-VR Subject: [Bitcoin-development] BIP 16 changes (list inside) X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: Amir Taaki List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2012 14:04:33 -0000 Hi, Is this an accurate and precise summary of the changes needed for P2SH and BIP 16? == Block validation (starting with ProcessBlock) == * SigOpCount is now a LegacySigOpCount (CheckBlock) * Main body of AcceptBlock() and rest of ProcessBlock() is unchanged. * AddToBlockIndex() unchanged * Some nice efficient improvements to SetBestChain(), but not related to BIP 16 * ConnectBlock() has new SigOp calculation. * No important changes to FetchInputs()/ConnectInputs() == Script == * Solver has special case to check for TX_SCRIPTHASH. Returns hash of input eval script * Another Solver which a) returns signature of pubkey script or b) TX_SCRIPTHASH - finds redeem script in KeyStore and returns it. * ExtractAddress(es) * VerifyScript: ** After running input script (scriptSig), copy stack ** Evaluate script as normal ** if block date (fValidatePayToScriptHash) and output script (scriptPubKey) is P2SH: *** scriptSig must be only push operations *** evaluate last item of copied stack as a script using the copied stack as the stack * SigOpCount (used inside CBlock::ConnectBlock main loop) does scoring checksigs and multisigs. ** Newly added DecodeOP_N to normal SigOpCount == Address == * Set main hash160 data with a beginning byte (nVersion) of 0x05