summaryrefslogtreecommitdiff
path: root/b9/c436d1198b7c2ce51f22d8e6103aaca69e959b
blob: 7d60ab1b7b207b3fd10a69806ce9bda28e8ce0b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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 <zgenjix@yahoo.com>) 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 <zgenjix@yahoo.com>
To: "bitcoin-development@lists.sourceforge.net"
	<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 <zgenjix@yahoo.com>
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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