From: Chris Stewart <chris@suredbits.com>
To: CryptAxe <cryptaxe@gmail.com>
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Drivechain -- Request for Discussion
Date: Mon, 19 Jun 2017 10:41:01 -0500 [thread overview]
Message-ID: <CAGL6+mGJYAVDcpPq6AyDE1iqfFUNt+0LVaAm+ic-yO3FmtKS+g@mail.gmail.com> (raw)
In-Reply-To: <CAGL6+mGZZ=wG8P_DNj3PXVf==mLjJwA_bESh0_UdH2iVBY7GQA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8787 bytes --]
>
> Since the sidechain has the sidechain BMM headers that they want the LD
> (bribe) data for, I think that they could specifically request LD data
> relevant only to that sidechain by providing a list of hashes to the
> mainchain, and the mainchain can return a list of boolean values telling
> the sidechain if the LD data exists. That way the data never even has to
> go over the network, just a verification that it exists on the mainchain
> and
>
Since you seem to be talking about the initial block download process for
the drivechain. It seems that we might as well request the set of *valid*
blocks from a bitcoin peer first, since at the end of the day they are in
control of the mining process on the sidechain. Here is what I envision:
1. Request all hashes for sidechain from a bitcoin peer
2. Request all sidechain block header's for the hashes the bitcoin peer
gave us
3. Order the set of sidechain block headers by looking at hashPrevBlock.
4. Request full sidechain blocks and start validating against the
consensus rule set of the sidechain
we can drop the sidechain_id from the script.
I agree the 'sidechain_id' is unneeded in the coinbase tx output. We should
just fix these based on index. This should be reflected in my latest commit
if we are talking about the same thing:
https://github.com/Christewart/bitcoin/blob/c355e39fbe2ea48856ea86b25cb8a97710feb032/src/script/script.cpp#L254
and have the sidechain handle filtering out invalid LD data /
> only requesting the verification of LD data that they know to be valid
> as far as chain order goes.
>
I agree, the whole point of BMM is to have bitcoin miners indifferent to
what happens in the sidechain (although Paul argues in a wonky way they do
care sort of). If there is an invalid (in the sense the block it represents
does *not* follow the sidechain's consensus rule set) OP_BRIBEVERIFY that
pays *more* money than a valid OP_BRIBEVERIFY output, we need to assume
that a 'blind' bitcoin miner will choose the one that pays them the most
money.
>I might be wrong but I thought that OP_RETURN outputs do not go into the
UTXO set. Anyone else want to chime in?
I'm fairly certain you are right. It just feels like we should be able to
exploit the fact that *only* miners can claim these OP_BRIBEVERIFY outputs.
I'll have to think about this more, maybe some one else can come up with
something clever that exploits that fact.
On Mon, Jun 19, 2017 at 10:24 AM, Chris Stewart <stewart.chris1234@gmail.com
> wrote:
> Since the sidechain has the sidechain BMM headers that they want the LD
>> (bribe) data for, I think that they could specifically request LD data
>> relevant only to that sidechain by providing a list of hashes to the
>> mainchain, and the mainchain can return a list of boolean values telling
>> the sidechain if the LD data exists. That way the data never even has to
>> go over the network, just a verification that it exists on the mainchain
>> and
>>
>
> Since you seem to be talking about the initial block download process for
> the drivechain. It seems that we might as well request the set of *valid*
> blocks from a bitcoin peer first, since at the end of the day they are in
> control of the mining process on the sidechain. Here is what I envision:
>
> 1. Request all hashes for sidechain from a bitcoin peer
> 2. Request all sidechain block header's for the hashes the bitcoin
> peer gave us
> 3. Order the set of sidechain block headers by looking at
> hashPrevBlock.
> 4. Request full sidechain blocks and start validating against the
> consensus rule set of the sidechain
>
>
> we can drop the sidechain_id from the script.
>
> I agree the 'sidechain_id' is unneeded in the coinbase tx output. We
> should just fix these based on index. This should be reflected in my latest
> commit if we are talking about the same thing: https://github.com/
> Christewart/bitcoin/blob/c355e39fbe2ea48856ea86b25cb8a9
> 7710feb032/src/script/script.cpp#L254
>
>
> and have the sidechain handle filtering out invalid LD data /
>> only requesting the verification of LD data that they know to be valid
>> as far as chain order goes.
>>
>
> I agree, the whole point of BMM is to have bitcoin miners indifferent to
> what happens in the sidechain (although Paul argues in a wonky way they do
> care sort of). If there is an invalid (in the sense the block it represents
> does *not* follow the sidechain's consensus rule set) OP_BRIBEVERIFY that
> pays *more* money than a valid OP_BRIBEVERIFY output, we need to assume
> that a 'blind' bitcoin miner will choose the one that pays them the most
> money.
>
> >I might be wrong but I thought that OP_RETURN outputs do not go into the
> UTXO set. Anyone else want to chime in?
>
> I'm fairly certain you are right. It just feels like we should be able to
> exploit the fact that *only* miners can claim these OP_BRIBEVERIFY outputs.
> I'll have to think about this more, maybe some one else can come up with
> something clever that exploits that fact.
>
> On Sun, Jun 18, 2017 at 4:27 PM, CryptAxe via bitcoin-dev <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
>
>> > >OP_RETURN <sidechain_id> <critical hash>
>> >
>> > I think it is redundant here to have the <sidechain id>, we can
>> > implicitly assume what the sidechain_id is since we have a fixed set
>> > of drivechains. I.e. mining reward is index 0, mimblewimble sidechain
>> > is index 1, etc. CryptAxe has specific indexes defined already in his
>> > implementation:
>> > https://github.com/drivechain-project/bitcoin/blob/mainchain
>> BMM/src/sidechain.h#L26-L30.
>> >
>>
>> Since the sidechain has the sidechain BMM headers that they want the LD
>> (bribe) data for, I think that they could specifically request LD data
>> relevant only to that sidechain by providing a list of hashes to the
>> mainchain, and the mainchain can return a list of boolean values telling
>> the sidechain if the LD data exists. That way the data never even has to
>> go over the network, just a verification that it exists on the mainchain
>> and we can drop the sidechain_id from the script.
>>
>>
>> > I think it would be wise to include a version byte to allow us to
>> > upgrade this commitment structure in the future. Similar to how
>> > witness program's are now versioned.
>>
>> Agreed, we need that.
>>
>>
>> >
>> > ><block height> <sidechain_id> <critical hash> OP_BRIBE_VERIFY
>> >
>> > If <block height> is an argument that OP_BRIBE_VERIFY takes, doesn't
>> > that mean the mainchain miner has to validate this *is* the actual
>> > block height on the sidechain? Does that take the 'blindness' away
>> > from BMM?
>>
>> No, OP_BRIBE (the old version) didn't care about the block height. Where
>> the blockheight was relevant is when bribe data is added to LD. In order
>> to be added to LD, the bribe needed to either be a fork (block height
>> less than the sidechain tip height) or extending the current side-chain
>> (block height = sidechain tip height + 1). The goal of this was to allow
>> for reorgs, and also make it so that people cannot skip forward (which
>> would never be valid so it's a waste of time and space) so that the
>> sidechain makes progress. With the new design that we have been talking
>> about, I think that we will need to drop this requirement from the
>> mainchain, and have the sidechain handle filtering out invalid LD data /
>> only requesting the verification of LD data that they know to be valid
>> as far as chain order goes.
>>
>>
>> >
>> > Overall, I think we need to work on the commitment structure to the
>> > coinbase tx.
>>
>> Agreed. It might be helpful if you outlined the idea you had on IRC to
>> the mailing list.
>>
>>
>> > If I understand the current implementation correctly we can have up to
>> > 256 OP_RETURNs embedded in the coinbase tx signifying new blocks mined
>> > on drivechains.. this seems less than ideal. It might be prudent to
>> > make these outputs ANYONECANSPEND, and then have miners spending these
>> > outputs to themselves for every block mined.. maybe this doesn't have
>> > a benefit over using OP_RETURNs though?
>> >
>> > The structure could be something like:
>> > <version> <critical hash>
>> >
>> > and then in a subsequent block the miner spends that output to
>> > themselves. I will admit I'm not super familiar with how OP_RETURNs
>> > work with the UTXO set -- maybe this scheme doesn't have any benefit.
>> >
>> > -Chris
>>
>> I might be wrong but I thought that OP_RETURN outputs do not go into the
>> UTXO set. Anyone else want to chime in?
>>
>>
>>
>>
>>
>> _______________________________________________
>> bitcoin-dev mailing list
>> bitcoin-dev@lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>
>
>
[-- Attachment #2: Type: text/html, Size: 11848 bytes --]
next prev parent reply other threads:[~2017-06-19 15:41 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 6:17 [bitcoin-dev] Drivechain -- Request for Discussion Paul Sztorc
2017-05-22 13:33 ` Peter Todd
2017-05-22 15:30 ` Paul Sztorc
2017-05-28 21:07 ` Peter Todd
[not found] ` <CAJowKgJjNaoWVc=QXfOqH3OdBPoKm3qkfUNpKV6oKLSRx_fD0g@mail.gmail.com>
[not found] ` <CAJowKgKFMXDE-yzEqYkY7c+80Mgn+iL9ZRNJbv9WhUBR32EvRg@mail.gmail.com>
2017-05-29 5:54 ` Erik Aronesty
2017-05-30 5:11 ` Paul Sztorc
2017-06-09 21:54 ` Sergio Demian Lerner
2017-06-10 16:28 ` Paul Sztorc
2017-05-22 14:39 ` ZmnSCPxj
2017-05-22 16:19 ` Paul Sztorc
2017-05-22 19:12 ` Tier Nolan
2017-05-22 20:00 ` Paul Sztorc
2017-05-23 9:51 ` Tier Nolan
2017-05-23 14:22 ` Paul Sztorc
2017-05-24 8:50 ` Tier Nolan
2017-05-24 10:05 ` Tier Nolan
2017-05-24 17:32 ` CryptAxe
2017-05-25 22:08 ` Tier Nolan
2017-06-18 14:36 ` Chris Stewart
2017-06-18 21:27 ` CryptAxe
[not found] ` <CAGL6+mGZZ=wG8P_DNj3PXVf==mLjJwA_bESh0_UdH2iVBY7GQA@mail.gmail.com>
2017-06-19 15:41 ` Chris Stewart [this message]
2017-05-23 0:13 ` ZmnSCPxj
2017-05-23 14:12 ` Paul Sztorc
2017-05-23 23:26 ` ZmnSCPxj
2017-06-10 17:04 ` [bitcoin-dev] Drivechain RfD -- Follow Up Paul Sztorc
2017-06-18 21:30 ` Tao Effect
2017-06-19 16:04 ` Paul Sztorc
[not found] ` <CAJowKgLJW=kJhcN4B7TbWXLb7U51tzYU3PFOy1m8JqKXqFsU4A@mail.gmail.com>
2017-06-20 11:54 ` Paul Sztorc
2017-06-20 13:38 ` Erik Aronesty
2017-06-22 13:27 ` Paul Sztorc
2017-06-22 13:45 ` Erik Aronesty
2017-06-22 20:30 ` Paul Sztorc
2017-06-23 14:19 ` Erik Aronesty
2017-06-23 14:51 ` Moral Agent
2017-06-23 18:11 ` Paul Sztorc
2017-07-12 22:43 ` Tao Effect
2017-07-13 0:26 ` Paul Sztorc
2017-07-13 1:15 ` Tao Effect
2017-07-13 2:58 ` Paul Sztorc
2017-07-13 3:24 ` Tao Effect
2017-07-13 15:39 ` Paul Sztorc
2017-07-13 13:17 ` Hampus Sjöberg
2017-07-13 17:04 ` Paul Sztorc
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=CAGL6+mGJYAVDcpPq6AyDE1iqfFUNt+0LVaAm+ic-yO3FmtKS+g@mail.gmail.com \
--to=chris@suredbits.com \
--cc=bitcoin-dev@lists.linuxfoundation.org \
--cc=cryptaxe@gmail.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