summaryrefslogtreecommitdiff
path: root/4c/b397cbbf87ac76c8bd467d01a5f6ca35551de0
blob: 25407e830e65b6f4fa8ce2f7019735b3fd8b2d49 (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
Return-Path: <ZmnSCPxj@protonmail.com>
Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 82264C000B
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 16 Mar 2022 15:39:11 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp1.osuosl.org (Postfix) with ESMTP id DCE50813AD
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 16 Mar 2022 15:39:09 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -1.599
X-Spam-Level: 
X-Spam-Status: No, score=-1.599 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 FROM_LOCAL_NOVOWEL=0.5, RCVD_IN_MSPIKE_H5=0.001,
 RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001]
 autolearn=ham autolearn_force=no
Authentication-Results: smtp1.osuosl.org (amavisd-new);
 dkim=pass (2048-bit key) header.d=protonmail.com
Received: from smtp1.osuosl.org ([127.0.0.1])
 by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id ZfWPLZKw7ydi
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 16 Mar 2022 15:39:09 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0
Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19])
 by smtp1.osuosl.org (Postfix) with ESMTPS id 3EAAB80C32
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 16 Mar 2022 15:39:08 +0000 (UTC)
Date: Wed, 16 Mar 2022 15:38:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1647445146;
 bh=TfoG0Ii72AuPooGYAZ2gw7DVlbIzwMOOM3s8Vpw5iFQ=;
 h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To:
 References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID;
 b=CHJ5NQ+h/vUfAdYk6vvAYjN6yuOb/xQXdiWmzOfgP7wMGNJePyME4oy+5Vk0BFod4
 uwa7ihj1c7+D3KKEpTJQOBXL8oG3uy5/yPF4FrKiHqtKEbaEfrCpgQMBMPp0qKo4Ht
 DhESIKcze1QHmu5j8D3Oq0/ODc4jklJqz15t2aFZBq2u+Mnbx5Xuli/qxM5vvm82pd
 TPGoX2eIdnwflUHjonTIcg1Z3fWaztqYr2VDpV/+Pl+bNjUnpe/uCgd75P387CFKRO
 grYqnsMc8Vebp/tiBHP2Pz9lCgKtlV8MNXKgN53XHsiQjuYHaCRlrFHwCjZUkZxNJW
 Yq31bugksVQQw==
To: Billy Tetrud <billy.tetrud@gmail.com>
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Reply-To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Message-ID: <S_vdV5XIthqwwp_9BxZH3ofQGNR7zJbUe7CZtNrRBni0qNzGqwr9sprOT9UoQSy0Ouepr7Hxwck-DsMilyjVHnPYN7YE2NzHrS4mD8p5W9c=@protonmail.com>
In-Reply-To: <CAGpPWDZwYE__YifZ0h7Bkftas6zN6Q7yOhB4rUAAwT0dcgYk7w@mail.gmail.com>
References: <EIwjydT0d68Z7Jv8_JlrCbQW6NHSSnIU5sWwE8eX2rm9K3djfzU3nQqUrmt44U8-L9sObegelHCV6Sk7h2nwq_HS1d26FophzjNU7xC_6SE=@protonmail.com>
 <CAGpPWDafWGcZJOUs4wSEt0DzFP8OXB4nrbx+9sUtTe5JfdwE_w@mail.gmail.com>
 <8R8D_XAaz7xYHmgWXR-pc3_GVFRzBCNdRT6s3PdKblrnnZPirB0orzLpEUvynBZHNBTiqOM_EteDdUjdqXQ5ZmrGbdlgnnfjIihgFZIXpUM=@protonmail.com>
 <CAGpPWDZwYE__YifZ0h7Bkftas6zN6Q7yOhB4rUAAwT0dcgYk7w@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Jets (Was: `OP_FOLD`: A Looping Construct For
	Bitcoin SCRIPT)
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
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: Wed, 16 Mar 2022 15:39:11 -0000

Good morning Billy,

> > I think we would want to have a cleanstack rule at some point
>
> Ah is this a rule where a script shouldn't validate if more than just a t=
rue is left on the stack? I can see how that would prevent the non-soft-for=
k version of what I'm proposing.=C2=A0

Yes.
There was also an even stronger cleanstack rule where the stack and alt sta=
ck are totally empty.
This is because a SCRIPT really just returns "valid" or "invalid", and `OP_=
VERIFY` can be trivially appended to a SCRIPT that leaves a single stack it=
em to convert to a SCRIPT that leaves no stack items and retains the same b=
ehavior.

>
> > How large is the critical mass needed?
>
> Well it seems we've agreed that were we going to do this, we would want t=
o at least do a soft-fork to make known jet scripts lighter weight (and unk=
nown jet scripts not-heavier) than their=C2=A0non-jet counterparts. So give=
n a situation where this soft fork happens, and someone wants to implement =
a new jet, how much critical mass would be needed for the network to get so=
me benefit from the jet? Well, the absolute minimum for some benefit to hap=
pen is that two nodes that support that jet are connected. In such a case, =
one node can send that jet scripted transaction along without sending the d=
ata of what the jet stands for. The jet itself is pretty small, like 2 or s=
o bytes. So that does impose a small additional cost on nodes that don't su=
pport a jet. For 100,000 nodes, that means 200,000 bytes of transmission wo=
uld need to be saved for a jet to break even. So if the jet stands for a 22=
 byte script, it would break even when 10% of the network supported it. If =
the jet stood for a 102 byte script, it would break even when 2% of the net=
work supported it. So how much critical mass is necessary for it to be wort=
h it depends on what the script is.=C2=A0

The math seems reasonable.


> The question I have is: where would the constants table come from? Would =
it reference the original positions of items on the witness stack?=C2=A0

The constants table would be part of the SCRIPT puzzle, and thus not in the=
 witness solution.
I imagine the SCRIPT would be divided into two parts: (1) a table of consta=
nts and (2) the actual opcodes to execute.


Regards,
ZmnSCPxj