From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 619C33EE for ; Mon, 10 Aug 2015 19:19:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from homiemail-a10.g.dreamhost.com (homie.mail.dreamhost.com [208.97.132.208]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id D656F12A for ; Mon, 10 Aug 2015 19:19:38 +0000 (UTC) Received: from homiemail-a10.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a10.g.dreamhost.com (Postfix) with ESMTP id 78C71280073; Mon, 10 Aug 2015 12:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jrn.me.uk; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=jrn.me.uk; bh=+fP2ZmV pjxyYV81hQT3qBCjqgLY=; b=Q9JV8LH1fqOYLLhWU0g5yE8LguLpQuc0S95ebVT i/CBGvwFhBecAErMfnuhnNQFkqNcRkFsjygO6vqnYbooklwincSctuXuOQiTthzQ 8OwaOig7S/Dsnfftnqj3/ZIC4COqbzKmyLMxWIr7hCG0lG6AftDL80bxqgGj49SP E2Y0= Received: from [10.9.1.131] (unknown [89.238.129.18]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jrn@jrn.me.uk) by homiemail-a10.g.dreamhost.com (Postfix) with ESMTPSA id 89DAE280076; Mon, 10 Aug 2015 12:19:37 -0700 (PDT) To: Luke Dashjr References: <55C75FC8.6070807@jrn.me.uk> <201508092346.20301.luke@dashjr.org> <55C8EE2A.3030309@jrn.me.uk> <201508101841.00173.luke@dashjr.org> From: Ross Nicoll Message-ID: <55C8F948.3070705@jrn.me.uk> Date: Mon, 10 Aug 2015 20:19:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <201508101841.00173.luke@dashjr.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 19:19:39 -0000 Trimmed some of the thread to clarity On 10/08/2015 19:40, Luke Dashjr wrote: >>>> I propose adding a new optional "genesis" field as a 16 byte sequence >>>> containing the SHA-256 hash of the genesis block of the network the >>>> request belongs to, uniquely identifying chains without any requirement >>>> for a central registry. >>> Genesis blocks are not necessarily unique. For example, Litecoin and >>> Feathercoin share the same one. >> Had missed that, and there's no easy alternatives. BIP 44 chain IDs >> don't identify different testnets, and do not cover regtest at all. > Regtest isn't really a network at all, just a testing mode of Bitcoin Core... True, but as Jorge points out, it's generally better not to have special cases. >> Most recent block hash could be used and also provides fork >> detection, but in doing so advertises if a merchant is on the wrong >> fork. Will think about it. > Is that a bad thing? It was something I was thinking about with the BIP 66 fork, that it could be used as a safety measure, but could also be used to find merchants & exchanges who are accepting coins on the wrong branch of a fork (and therefore are susceptible to double-spend attacks). For fork detection it's probably safer for the client to provide a recent block hash with the payment response. I think genesis hash collisions are probably acceptable; or, the duplicate coins are so far rarely long-lived and it's therefore not a major concern at least. The server should reject any attempt to pay on the wrong chain, in hindsight, as it will try to relay on the network it expects and the transaction will be rejected. >>> I'd appreciate initial feedback on the idea, and if there's no major >>> objections I'll raise this as a BIP. >> I don't see how this is related to improving Bitcoin... >> >> Well, mostly I'm trying not to avoid the situation where any accidental >> mixing of files is dangerous (funds can easily be sent on the wrong >> blockchain), nor with multiple standards (which is where we are at the >> moment). It improves things in avoiding future problems, rather than in >> the immediate term. > Sorry, I meant to stress that BIPs are for *Bitcoin* improvements > specifically. Things which only improve altcoins, while a perfectly fine thing > to standardise, are outside the scope of what belongs in a BIP. > > Perhaps, however, this could be made to kill 2 birds with one stone, by > ensuring it addresses the need for payments made of bitcoins on a sidechain? > For this, a merchant who wants a sidechain payment would presumably be able to > provide a script from the main chain already, but an extension allowing > payment directly on the sidechain (at the customer's choice) avoids the need > to round-trip it... That could definitely be done, for example by making the genesis field "repeated", so it specifies all potential networks. The response would need to indicate which hash it used, but that could be chain tip (with height in a further field), and provide fork detection. Ross