Author: Stefan Thomas 2011-07-08 06:36:23
Published on: 2011-07-08T06:36:23+00:00
On July 7, 2011, Pieter Wuille initiated a discussion on standardizing the version bytes used by Bitcoin. The three components that seem meaningful are network, data class, and version. There is no technical reason why different networks and different data classes would need separate version bytes; however, it is a good practice to keep them from colliding to avoid confusion. Wuille proposed using bit 16 in the version byte for "alternate chain" since Namecoin uses version byte 52 for addresses. For testnet, Wuille suggested choosing bit 1, and if bit 1 is set, XORing the rest of the version number with 111. Otherwise, they could reset testnet (not actually reset but change its addresses a bit), and simply state odd=testnet, even=realnet. This leaves six more bits to play with, namely 128, 64, 32, and 8, 4, 2. As 128 is already used for private keys, Wuille proposed using (128, 64, 32) for data classes and (8, 4, 2) for versions. In summary, the proposal suggests using bit 16 in the version byte for "alternate chain." For testnet, bit 1 will be used, and if bit 1 is set, XORing the rest of the version number with 111. Wuille proposes using (128, 64, 32) for data classes and (8, 4, 2) for versions.
Updated on: 2023-05-26T19:15:40.133141+00:00