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 C65FEB1E for ; Mon, 19 Jun 2017 15:41:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from so254-16.mailgun.net (so254-16.mailgun.net [198.61.254.16]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 37416AA for ; Mon, 19 Jun 2017 15:41:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=suredbits.com; q=dns/txt; s=mailo; t=1497886864; h=Content-Type: Cc: To: Subject: Message-ID: Date: From: References: In-Reply-To: MIME-Version: Sender; bh=kbCU9OOR3n30j5XqGI+z63n7228q+b6BpVYE5VYo2u4=; b=te/t4WkOV7YbL0e9I/GKs9RLQv412z3Nm+kBm6uxWC410YOzHxDtAvwmoiKYCRsDuaYYiCy4 w/wnV1LOGLXgosJSF9XIGgwIYPUfd3mKtVTCDPrX08ZQ2On6Ls3e5UfaJpqtnDZTqAbpbR08 UxyaDobmN1uCbhqLqTgPL6FTFQw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=suredbits.com; s=mailo; q=dns; h=Sender: MIME-Version: In-Reply-To: References: From: Date: Message-ID: Subject: To: Cc: Content-Type; b=HEy9t/0bD2jkacKR0C8fR1gbLzmiNYxDQhOkrgg73gION45ez4kyew5nXbhoulpeAFpMvQ kqXKJHYvXXufT5phRDETqNvlGQeDuna9aZC6MnHGihGD/z1akHche832c+kEwqRmuKH9hTUV JJloRmkTIyEHKnuMVGuYRTp22A0zQ= Sender: chris@suredbits.com X-Mailgun-Sending-Ip: 198.61.254.16 X-Mailgun-Sid: WyI5MGYzNyIsICJiaXRjb2luLWRldkBsaXN0cy5saW51eGZvdW5kYXRpb24ub3JnIiwgIjJjMTQxIl0= Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) by mxa.mailgun.org with ESMTP id 5947f08e.7f29b82afdf0-smtp-out-n03; Mon, 19 Jun 2017 15:41:02 -0000 (UTC) Received: by mail-it0-f50.google.com with SMTP id m47so68724980iti.1 for ; Mon, 19 Jun 2017 08:41:02 -0700 (PDT) X-Gm-Message-State: AKS2vOzUNcKWMIGDjm8mlUKYe/NBgdDjXFdOflABZXciZN6KJIJoY+4o Bwt+xMWNsDa2b4XOKLw/Z/WXk4Shfg== X-Received: by 10.36.0.70 with SMTP id 67mr15567410ita.114.1497886861969; Mon, 19 Jun 2017 08:41:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.185.3 with HTTP; Mon, 19 Jun 2017 08:41:01 -0700 (PDT) In-Reply-To: References: <24f2b447-a237-45eb-ef9f-1a62533fad5c@gmail.com> <141a0cd1-9d4f-c137-a349-17248f9cafd4@gmail.com> From: Chris Stewart Date: Mon, 19 Jun 2017 10:41:01 -0500 X-Gmail-Original-Message-ID: Message-ID: To: CryptAxe Content-Type: multipart/alternative; boundary="001a11c01b1852991d055251f6f2" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Mon, 19 Jun 2017 15:43:33 +0000 Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Drivechain -- Request for Discussion X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:41:06 -0000 --001a11c01b1852991d055251f6f2 Content-Type: text/plain; charset="UTF-8" > > 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 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 >> > >> > I think it is redundant here to have the , 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. >> >> >> > >> > > OP_BRIBE_VERIFY >> > >> > If 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: >> > >> > >> > 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 >> > > --001a11c01b1852991d055251f6f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sin= ce 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=20 the initial block download process for the drivechain. It seems that we=20 might as well request the set of *valid* blocks from a bitcoin peer=20 first, since at the end of the day they are in control of the mining=20 process on the sidechain. Here is what I envision:
  1. Request all h= ashes 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. Reques= t 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= =20 should just fix these based on index. This should be reflected in my=20 latest commit if we are talking about the same thing:=20 https://github.com/Christe= wart/bitcoin/blob/c355e39fbe2ea48856ea86b25cb8a97710feb032/src/script/scrip= t.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.

=C2=A0I=20 agree, the whole point of BMM is to have bitcoin miners indifferent to=20 what happens in the sidechain (although Paul argues in a wonky way they=20 do care sort of). If there is an invalid (in the sense the block it=20 represents does *not* follow the sidechain's consensus rule set)=20 OP_BRIBEVERIFY that pays *more* money than a valid OP_BRIBEVERIFY=20 output, we need to assume that a 'blind' bitcoin miner will choose = the=20 one that pays them the most money.

>I might be wrong but I though= t that OP_RETURN outputs do not go into the
UTXO set. Anyone else want to chime in?

I'm fairly=20 certain you are right. It just feels like we should be able to exploit=20 the fact that *only* miners can claim these OP_BRIBEVERIFY outputs. I'l= l have to think about this more, maybe some one else can come up with=20 something clever that exploits that fact.
=
On Mon, Jun 19, 2017 at 10:24 AM, Chris Stew= art <stewart.chris1234@gmail.com> wrote:
Since the sidechain has the sidechai= n 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 abo= ut=20 the initial block download process for the drivechain. It seems that we=20 might as well request the set of *valid* blocks from a bitcoin peer=20 first, since at the end of the day they are in control of the mining=20 process on the sidechain. Here is what I envision:
  1. Request all h= ashes 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. Reques= t full sidechain blocks and start validating against the consensus rule set= of the sidechain

we can drop the sidechain_id from the scr= ipt.
I agree the 'sidechain_id' is unneeded in the coinbase tx output. We= =20 should just fix these based on index. This should be reflected in my=20 latest commit if we are talking about the same thing:=20 https://= github.com/Christewart/bitcoin/blob/c355e39fbe2ea48856ea86b25cb8a= 97710feb032/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.

=C2= =A0I=20 agree, the whole point of BMM is to have bitcoin miners indifferent to=20 what happens in the sidechain (although Paul argues in a wonky way they=20 do care sort of). If there is an invalid (in the sense the block it=20 represents does *not* follow the sidechain's consensus rule set)=20 OP_BRIBEVERIFY that pays *more* money than a valid OP_BRIBEVERIFY=20 output, we need to assume that a 'blind' bitcoin miner will choose = the=20 one that pays them the most money.

>I might be w= rong but I thought that OP_RETURN outputs do not go into the
UTXO set. Anyone else want to chime in?

I'm fairly= =20 certain you are right. It just feels like we should be able to exploit=20 the fact that *only* miners can claim these OP_BRIBEVERIFY outputs. I'l= l have to think about this more, maybe some one else can come up with=20 something clever that exploits that fact.

On S= un, 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<= br> > implicitly assume what the sidechain_id is since we have a fixed set > of drivechains. I.e. mining reward is index 0, mimblewimble sidechain<= br> > is index 1, etc. CryptAxe has specific indexes defined already in his<= br> > implementation:
> https://= github.com/drivechain-project/bitcoin/blob/mainchainBMM/src/sidec= hain.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, doe= sn'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 heigh= t. 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 =3D sidechain tip height + 1). The goal of this was to allow<= br> 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 h= ave
> 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_RETURN= s
> work with the UTXO set -- maybe this scheme doesn't have any benef= it.
>
> -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


--001a11c01b1852991d055251f6f2--