From 0611aedbcbada6285358d179426c0a114169a7d7 Mon Sep 17 00:00:00 2001 From: Sjors Date: Sat, 27 May 2017 21:47:38 +0200 Subject: [PATCH] Cosmetic changes --- bip-extheader.mediawiki | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bip-extheader.mediawiki b/bip-extheader.mediawiki index 7dead1de46..6790190d2f 100644 --- a/bip-extheader.mediawiki +++ b/bip-extheader.mediawiki @@ -17,41 +17,41 @@ This BIP proposes a flexible and upgradable extended block header format thoroug ==Motivation== -In the current Bitcoin protocol, the block header is fixed at 80 bytes with no space reserved for additional data. The coinbase transaction becomes the only practical location for new consensus-critical data, such as those proposed by BIP100 and BIP141. Although this preserves maximal backward compatibility for full nodes, it is not ideal for light clients because the size of coinbase transaction and depth of Merkle tree are indefinite. +In the current Bitcoin protocol, the block header is fixed at 80 bytes with no space reserved for additional data. The coinbase transaction becomes the only practical location for new consensus-critical data, such as those proposed by [https://github.com/jgarzik/bip100/blob/master/bip-0100.mediawiki BIP100] and [https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141]. Although this preserves maximal backward compatibility for full nodes, it is not ideal for light clients because the size of coinbase transaction and depth of Merkle tree are indefinite. This BIP proposes an extended block header format with the following objectives: * To provide a flexible header format which is easily upgradeable with softforks. * Old light nodes following the hardfork chain if it has most proof-of-work, but not seeing any transactions. -* Being compatible with the Stratum mining protocol to avoid mining machine upgrade. +* Being compatible with the [https://en.bitcoin.it/wiki/Stratum_mining_protocol Stratum mining protocol] to avoid mining machine upgrade. * Having a deterministic hardfork activation. * Being a permanent hardfork, as supporting nodes will not accept blocks mined in old rules after hardfork is activated. ==Specification== -The following rules are activated when the median timestamp of the past 11 blocks is equal to or greater than a to-be-determined time and after activation of BIP65. +The following rules are activated when the median timestamp of the past 11 blocks is equal to or greater than a to-be-determined time and after activation of [https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki BIP65]. * the nVersion of the block header MUST have the most significant bit (the sign bit) signalled. -* for the purpose of counting softforks proposal signalling (BIP9), the sign bit is ignored. -* segregated witness MUST be enabled, if it had not been already activated through the BIP9 mechanism. +* for the purpose of counting softforks proposal signalling ([https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki BIP9]), the sign bit is ignored. +* segregated witness MUST be enabled, if it had not been already activated through the [https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki BIP9] mechanism. * the witness of the first input of the coinbase transaction MUST have exactly one stack item (the "extended header"), with the following data: ** bytes 0 to 3: nHeight MUST be equal to the height of this block (signed little endian) ** bytes 4 to 5: MUST be exactly 0x0000 ** bytes 6 to 53: extra data with no meaning in Bitcoin protocol ** bytes 54 to 85: hashMerkleRoot the transaction Merkle root (calculated in the same way as the original Merkle root in the block header) -** bytes 86 to 117: hashWitnessRoot the witness Merkle root (NOT calculated in the way described in BIP141) +** bytes 86 to 117: hashWitnessRoot the witness Merkle root (NOT calculated in the way described in [https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141]) ** bytes 118 to 121: nTx MUST be equal to the number of transactions in this block (unsigned little endian, minimum 1) ** bytes 122 to 129: nFees MUST be equal to the total transaction fee paid by all transactions, except the coinbase transaction, in the block (unsigned little endian) -** bytes 130 to 137: nWeight MUST be equal to or greater than the total weight of all transactions in the block (to be described in another BIP. NOT calculated in the way described in BIP141) +** bytes 130 to 137: nWeight MUST be equal to or greater than the total weight of all transactions in the block (to be described in another BIP. NOT calculated in the way described in [https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141]) ** bytes 138+ : Reserved space for future upgrades * bytes 36 to 67 in the block header, the place originally for the hashMerkleRoot is replaced by the double SHA256 hash of the extended header. * size of the extended header MUST be at least 138 bytes. * wtxid of the coinbase transaction is calculated as if the witness of its first input is empty. * the hashWitnessRoot is calculated with all wtxid as leaves, in a way similar to the hashMerkleRoot. -* the OP_RETURN witness commitment rules described in BIP141 is not enforced. -* The witness reserved valued described in BIP141 is removed from the protocol. +* the OP_RETURN witness commitment rules described in [https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141] is not enforced. +* The witness reserved valued described in [https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141] is removed from the protocol. -A special extheader softfork is defined, with the following BIP9 parameters: +A special extheader softfork is defined, with the following [https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki BIP9] parameters: * bit: 15 * starttime: 0 * timeout: 0xffffffff @@ -100,4 +100,4 @@ https://github.com/jl2012/bitcoin/tree/spoonnet2 ==Copyright== -This BIP is licensed under the 2-clause BSD license. \ No newline at end of file +This BIP is licensed under the 2-clause BSD license.