public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "Jorge Timón" <jtimon@jtimon.cc>
To: "John L. Jegutanis" <giannis@coinomi.com>
Cc: Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Alternative chain support for payment protocol
Date: Mon, 10 Aug 2015 14:45:45 +0200	[thread overview]
Message-ID: <CABm2gDp90W4JRv+G2G4SRdCi-h32i9cugFzZh9J_-v9RCYGdhw@mail.gmail.com> (raw)
In-Reply-To: <CADv+LCxoKwDvE0RBUHzfZ-Pp6nz66s_EpyKQ5jr-B5o+zGgHeA@mail.gmail.com>

Here's some related commits from #6382 :

https://github.com/jtimon/bitcoin/commit/1a4e8d8637ced45e8785ddb95b0fc20a5b8365d1
https://github.com/jtimon/bitcoin/commit/a6941e318a7028ce3d8919d50825762ca9c0c74c
https://github.com/jtimon/bitcoin/commit/1754928d3ceeb26b2491ad1384095058e456fa9b
https://github.com/jtimon/bitcoin/commit/d5fe6b62e3e983b35f9e8e61cfce16d7cd091699

And a related PR (closed for now, at least until #6235 is merged) :
https://github.com/bitcoin/bitcoin/pull/6229

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
much".
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
https://github.com/jtimon/bitcoin/commit/1a4e8d8637ced45e8785ddb95b0fc20a5b8365d1#diff-64cbe1ad5465e13bc59ee8bb6f3de2e7R20

Alternatively we can maintain the chain petname field, but those are
just "standard petnames", not unique and immutable ids like the
genesis hash.


  reply	other threads:[~2015-08-10 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-09 14:12 [bitcoin-dev] Alternative chain support for payment protocol Ross Nicoll
2015-08-09 14:29 ` Mike Hearn
2015-08-09 16:23   ` Ross Nicoll
     [not found]     ` <CADv+LCxF5MoSFcCiqXnXXsfE5KvJmL0RQ4pOhmM-5eb2TH-ncg@mail.gmail.com>
2015-08-09 18:42       ` John L. Jegutanis
2015-08-10 12:45         ` Jorge Timón [this message]
2015-08-10 12:53           ` Mike Hearn
2015-08-10 13:06             ` Jorge Timón
2015-08-10 15:38         ` odinn
2015-08-09 16:02 ` Mark Friedenbach
     [not found] ` <201508092346.20301.luke@dashjr.org>
     [not found]   ` <55C8EE2A.3030309@jrn.me.uk>
2015-08-10 18:40     ` Luke Dashjr
2015-08-10 19:19       ` Ross Nicoll
2015-08-10 19:49         ` Jorge Timón
2015-08-10 19:44       ` Jorge Timón

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABm2gDp90W4JRv+G2G4SRdCi-h32i9cugFzZh9J_-v9RCYGdhw@mail.gmail.com \
    --to=jtimon@jtimon.cc \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=giannis@coinomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox