Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 68F2797 for ; Mon, 10 Aug 2015 12:45:48 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C969D178 for ; Mon, 10 Aug 2015 12:45:47 +0000 (UTC) Received: by wicja10 with SMTP id ja10so23993950wic.1 for ; Mon, 10 Aug 2015 05:45:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=cjCF15fDB94wvKVQi/d7si7OXKylD8U88N5Nj5AAW7g=; b=TN1AMPmqqDWiYHNVIuCaicdsSpPaM7nUZFqLF7LtDVM/Ab11n5hsN6ye4NmS+AwniW wefWs+I8vrHe3pYIgbx3pBt57o/fTRQ4YIAW1ktBXv4PyhSKVQ1FN08gFb883BW4yhYJ DSwC1b6IiEI+USQ0DrENZfSgymj2V9zk1ig6Jp/hGrqhXkm5xmStoXYpFb6eiV3yZMgV UCNclTbnkgj94v+hpKbTdPNfhH5N63pB5ELpgs81op7lIu87nnmuL5P2zUpTZOdfLQZ7 ukqIrUzzTj4S8J9iH0LzhvmEPSQE6/SZqV1dozi5lGQm+A98SmuUr3eopK/TLtJnQxcu uvXw== X-Gm-Message-State: ALoCoQml0sEnhNP0fCdT3IHKqjaatgR3LIDl86ferLEZfzfmcg6OpX59AEBGSqGSIeCekAt3pL2r MIME-Version: 1.0 X-Received: by 10.181.13.195 with SMTP id fa3mr24318481wid.7.1439210746042; Mon, 10 Aug 2015 05:45:46 -0700 (PDT) Received: by 10.194.31.230 with HTTP; Mon, 10 Aug 2015 05:45:45 -0700 (PDT) In-Reply-To: References: <55C75FC8.6070807@jrn.me.uk> <55C77E80.3060203@jrn.me.uk> Date: Mon, 10 Aug 2015 14:45:45 +0200 Message-ID: From: =?UTF-8?B?Sm9yZ2UgVGltw7Nu?= To: "John L. Jegutanis" Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bitcoin Dev Subject: Re: [bitcoin-dev] Alternative chain support for payment protocol X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Development Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 12:45:48 -0000 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.