public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Ross Nicoll <jrn@jrn•me.uk>
To: Luke Dashjr <luke@dashjr•org>
Cc: Bitcoin Dev <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] Alternative chain support for payment protocol
Date: Mon, 10 Aug 2015 20:19:36 +0100	[thread overview]
Message-ID: <55C8F948.3070705@jrn.me.uk> (raw)
In-Reply-To: <201508101841.00173.luke@dashjr.org>

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



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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-09 14:12 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
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 [this message]
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=55C8F948.3070705@jrn.me.uk \
    --to=jrn@jrn$(echo .)me.uk \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=luke@dashjr$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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