Published on: 2015-08-10T19:49:23+00:00
In a discussion on the bitcoin-dev forum, there was a proposal by Ross Nicoll to make the genesis field "repeated" in order to specify all potential networks. However, this idea faced opposition as it was argued that the chain ID needs to be unique for proper fork detection. The discussion revolved around finding a solution that ensures the uniqueness of the chain ID while still allowing for multiple potential networks. It was pointed out that not all genesis blocks are unique, with Litecoin and Feathercoin sharing the same one. However, this is considered a design flaw in Feathercoin and does not apply to Bitcoin.The topic then shifted towards Regtest, which is a testchain similar to testnet2 and testnet3. Testchains allow for the support of multiple chains using CChainParams. The discussion clarified that BIPs are specifically for Bitcoin improvements and anything that only improves altcoins is outside the scope of a BIP. However, it was suggested that an extension allowing payment directly on the sidechain could address the need for payments made in bitcoins on a sidechain, potentially solving two problems at once. The conversation also touched upon the similarities between payment protocol testchains, sidechains, and altcoins, noting that focusing on testchains would be sufficient if sidechains and altcoins are out of scope.Luke Dashjr proposed adding an optional "genesis" field to Bitcoin transactions that contains the SHA-256 hash of the genesis block of the network the request belongs to. This field would serve the purpose of identifying chains without the need for a central registry. However, it was brought to his attention that genesis blocks are not necessarily unique, and using the most recent block hash instead could provide fork detection, although it may also expose if a merchant is on the wrong fork. Dashjr mentioned that genesis hash collisions might be acceptable, and the server should reject any attempt to pay on the wrong chain. He also suggested that this proposal could address the need for payments made in bitcoins on a sidechain, potentially encompassing both Bitcoin improvements and altcoins.In an email exchange between Ross Nicoll and Luke Dashjr, they discussed the limitations of BIP 70 in supporting different testnets and alternative coins. Ross proposed adding a new optional "genesis" field to identify chains without a central registry. However, Luke pointed out that genesis blocks are not necessarily unique. They also touched upon using the most recent block hash for fork detection, albeit with the drawback of potentially advertising if a merchant is on the wrong fork. Ross emphasized the importance of avoiding future problems with the proposal. Luke reminded him that BIPs are specifically for Bitcoin improvements, but suggested that the proposal could address the need for payments made in bitcoins on a sidechain by allowing payment directly on the sidechain at the customer's choice.The developers have been discussing how to support side or alt-chains in BIP70, the payment protocol for Bitcoin. One possible solution suggested is the bip44 coin type registry, which would add an optional coin type field to PaymentRequest and serialize incompatible PaymentDetails to the serialized_payment_details field. However, concerns were raised regarding human-meaningful identifiers and name collisions. The idea of using the genesis hash as an alternative to short names was proposed. The discussion also highlighted the differences between altcoins derived from BTC and those developed differently. A visualization tool called Map of Coins was provided to further illustrate the variations among alt-coins.On August 10, 2015, Mike Hearn stated that BIP 70 is immutable and can only be extended. There was a suggestion to make exceptions for regtest mode, but it was argued that treating all supported chains the same way in the code would be simpler. It was mentioned that the dedicated chain ID for regtest mode is unnecessary outside of a developer machine where the ID does not matter.The context includes related commits from #6382, which includes a closed pull request (PR) and discussions on adding the chainID field and supporting regtest in BIP70. The author suggests unifying all testnets to use "testnet3" as the network string but acknowledges that it would require modifying BIP70. The discussion also mentions the differences between altcoins, sidechains, and testchains. It is suggested that adding new testchains should be made easier rather than harder. There is also a suggestion to use the genesis hash as the network name, although this may involve lookups to identify the request's purpose.Overall, the proposal put forth by Ross Nicoll aims to address the limitations of the current BIP 70 protocol by adding an optional "genesis" field that contains the SHA-256 hash of the genesis block of the network. This will enable unique identification of chains without the need for a central registry. The proposal received initial feedback and if there are no major objections, it will be raised as a BIP.
Updated on: 2023-08-01T15:05:06.053679+00:00