[bitcoin-dev] Alternative chain support for payment protocol
jtimon at jtimon.cc
Mon Aug 10 12:45:45 UTC 2015
Here's some related commits from #6382 :
And a related PR (closed for now, at least until #6235 is merged) :
I definitely add the chainID field, and support regtest in bip70 too
(code is more complex by not supporting it that it could be while
supporting it). And if we want to maintain the chain petname, I would
change "test" to "testnet3".
While "main" and "regtest" are always used for those chains, we
currently have 3 different strings for testnet3:
"testnet3": for the default data directory.
"testnet": for the GUI style, and strings showed to the user.
"test": for bip70
I really want to simplify this and I think the simplest way to do so
is by unifying everything to always use "testnet3", although that
would require modifying bip70.
> On 09/08/2015 15:29, Mike Hearn wrote:
> The reason BIP 70 doesn't do this is the assumption that alt coins are ...
> well .... alt. They can vary in arbitrary ways from Bitcoin, and so things
> in BIP70 that work for Bitcoin may or may not work for other coins.
> If your alt coin is close enough to BIP 70 that you can reuse it "as is"
> then IMO we should just define a new network string for your alt. network =
> "dogecoin-main" or whatever.
Altchains aren't just altcoins and sidechains: there's also testchains
like testnet3, regtest and sizetestN ( #6382 ). Since there's so many
possible instances for sizetest, testchains are already more numerous
than altcoins (not that this last thing matters much for anything).
Just forget about altcoins and sidechains: do it for the testchains
(that's the reason why bitcoin has chainparams and multi-chain support
in the first place).
We should make things easier to add new testchains, not harder.
It is sad to see that some times things are "the wrong way" because
doing them "the right way" could "simplify things to altcoins too
Such a design criterion seems so ridiculous and sad to me...
> You could also use the genesis hash as the network name. That works too. But
> it's less clear and would involve lookups to figure out what the request is
> for, if you find such a request in the wild. I don't care much either way.
Those lookups can but just to a map in memory, like in
Alternatively we can maintain the chain petname field, but those are
just "standard petnames", not unique and immutable ids like the
More information about the bitcoin-dev