[Bitcoin-development] Version bytes

Pieter Wuille pieter.wuille at gmail.com
Fri Jul 8 09:25:07 UTC 2011


On Fri, Jul 08, 2011 at 08:18:19AM +0000, John Smith wrote:
> 
> On Fri, Jul 8, 2011 at 6:36 AM, Stefan Thomas <moon at justmoon.de> wrote:
> >
> >> Hey Pieter,
> >>
> >> > Otherwise, we could reset testnet (not actually reset, just
> >> > change its addresses a bit), and simply state odd=testnet, even=realnet.
> >>
> >> We could use the XOR hack for now and remove it the next time we reset
> >> testnet. But I do think the 111 is baggage we want to get rid of. Using
> >> the lsb as a simple flag is much cleaner.
> 
> I agree it is cleaner, but I think breaking compatiblity with older address
> (even testnet) is not a good idea right now. It is important to build an
> image of stability and backward compatibility.
> 
> So I vote for the XOR 111 hack :)

It does have another advantage: it makes testnet codes visually (after base58
encoding) different from realnet ones, which is probably the reason why the
relatively large number 111 was chosen.

The only small change that can cause the first base58 character to remain equal,
is a modification to nVersion of less than 5 in absolute value.

PS: +/- 111 is also possible, instead of XOR 111.

-- 
Pieter





More information about the bitcoin-dev mailing list