summaryrefslogtreecommitdiff
path: root/2d/110fc6e029a3db773965677d6c1aef3915e3da
blob: 4d3387b536de130705c448ed73ad3646f28fa141 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Return-Path: <cryptaxe@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 29110BBC
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 18 Jun 2017 21:32:29 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com
	[209.85.192.170])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8A58BE9
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 18 Jun 2017 21:32:28 +0000 (UTC)
Received: by mail-pf0-f170.google.com with SMTP id s66so45087838pfs.1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 18 Jun 2017 14:32:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=subject:to:references:from:message-id:date:user-agent:mime-version
	:in-reply-to:content-transfer-encoding:content-language;
	bh=LxtGrA4oGsN9c/qcy6HQNlpYwMlmlIwhXqtovmJ9R8Q=;
	b=CrGCli2LFpdrvZXHwshKCGNGzsknTQ9RsPMllhiVGwVcvYpwSM45/VUJCVefo+D3oD
	npm84U1Y2Fd7WItis+Ox2IM/xBebe+ot/NCfjtMhqiGWntVr906R+G2vHigrHq+qlUCd
	oY0MFNTvEM9R5w7G9ESaWBSWYeOAliXltl/katndR9HY93GSQMWZ68BBHmPeuPYDCDeS
	kSkwtxAhXYapJTDNFTiKUKSScAXj3GAIMul43b3A+uQAfatOzQAQax1n4MRCrhuxou+3
	YqqFC8cwbn0YbstEdiZMbWEKakX5nZhylANVt2e84yl8VLp3dy3F7Le8iqa3OCYtLh99
	LMFg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:to:references:from:message-id:date
	:user-agent:mime-version:in-reply-to:content-transfer-encoding
	:content-language;
	bh=LxtGrA4oGsN9c/qcy6HQNlpYwMlmlIwhXqtovmJ9R8Q=;
	b=dcbdYmQwaoCT9aNVrfomSpf7bv9piXIMnjq7dz/Hmm7L5s9NUKGQon2VSKWuJrY9Pd
	w1Sh3V5esmLdQZgxvVKO/OPNOG9lfxJyRSa4VQIbG10qGfWVTOjz5/tcTzHKJCuXtLoo
	iCqZZRIatI+jonvTBzGeKacyCBKSbdPQItIsfLcW1h9HNQOrIQWt02uD3nL/qRMpUXcK
	RgmYtYVWeQ15daus5of4fkQfi/EQBP4yoRHQfLLiqaHL3NejfPW53wYE/8t4YjAwJdOi
	5F2pzhr1jVDaG0UbPw2BtQDtEVx+CrexdbtL+9FSAF99EURbY1ibgv2Pgu4lSQdD4AWO
	vKUQ==
X-Gm-Message-State: AKS2vOyRF7Y9zhk5oZFt+IuGIqe5De9nSNeJ1yDsSZBgj1UQErqwJi/b
	AgaJG6cSKplutUqB+rY=
X-Received: by 10.84.193.129 with SMTP id f1mr26191017pld.129.1497821547668;
	Sun, 18 Jun 2017 14:32:27 -0700 (PDT)
Received: from [192.168.1.3] (c-50-188-181-7.hsd1.or.comcast.net.
	[50.188.181.7])
	by smtp.gmail.com with ESMTPSA id i27sm4707688pfk.1.2017.06.18.14.32.25
	for <bitcoin-dev@lists.linuxfoundation.org>
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Sun, 18 Jun 2017 14:32:26 -0700 (PDT)
To: bitcoin-dev@lists.linuxfoundation.org
References: <24f2b447-a237-45eb-ef9f-1a62533fad5c@gmail.com>
	<dhstGQudLBiwjDlaRrmMfy-ixwvXcwMr1CzCkPKh285RLICGZixkbdwpTDc2Sgz8eYIqSem8lwxW6QeJCD7aFfwQjLDnZ2NmOw0Zzd-KgSs=@protonmail.com>
	<CA+XQW1jZpJ9wnEg47fouyywL09=_vU8dMP3owkkuNqRvzTZUDg@mail.gmail.com>
	<CAE-z3OUYuAXE2+h60A=r4UyGU4CSQuF98oFgHnD7iaj-=Z=yOw@mail.gmail.com>
	<CA+XQW1hRhcxJBoOJ57YG0t5y5j1Qm3RO4wr2eXV5V-UzDaiPPw@mail.gmail.com>
	<CAE-z3OVWXN58X-+nAFTm61G1=v_1xrniyrBy8x=VRG4N149aXQ@mail.gmail.com>
	<141a0cd1-9d4f-c137-a349-17248f9cafd4@gmail.com>
	<CAE-z3OXY2YiQ5fzxZBw4FooRsUzXricHmpv_+t+HbTf0MxP0kg@mail.gmail.com>
	<CAGL6+mFu-W9BXs+ipDQod33XZn85Rj=cDzhanVDY5wLzRbkFTQ@mail.gmail.com>
From: CryptAxe <cryptaxe@gmail.com>
Message-ID: <a60d1d58-59cd-e304-3b49-ba29ddf4de45@gmail.com>
Date: Sun, 18 Jun 2017 14:27:52 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <CAGL6+mFu-W9BXs+ipDQod33XZn85Rj=cDzhanVDY5wLzRbkFTQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM,
	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: Sun, 18 Jun 2017 21:39:44 +0000
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 <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Jun 2017 21:32:29 -0000

> >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:=20
> https://github.com/drivechain-project/bitcoin/blob/mainchainBMM/src/sid=
echain.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 =3D sidechain tip height + 1). The goal of this was to allo=
w
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?