summaryrefslogtreecommitdiff
path: root/70/27c4532dd7a276bea948b8d1c404338e2757a6
blob: d015522c146b0878b83981b5f5e7591ab1b476f9 (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
Return-Path: <ZmnSCPxj@protonmail.com>
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id AA825C000B
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 22 Mar 2022 16:39:23 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp3.osuosl.org (Postfix) with ESMTP id 9944261269
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 22 Mar 2022 16:39:23 +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: smtp3.osuosl.org (amavisd-new);
 dkim=pass (2048-bit key) header.d=protonmail.com
Received: from smtp3.osuosl.org ([127.0.0.1])
 by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id udyz27SwTp1s
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 22 Mar 2022 16:39:23 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0
Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24])
 by smtp3.osuosl.org (Postfix) with ESMTPS id 0372260E4E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue, 22 Mar 2022 16:39:22 +0000 (UTC)
Date: Tue, 22 Mar 2022 16:39:10 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1647967160;
 bh=RZ1NJ2DaXvs16DnYuFoCOEEbpWd1eXO2iCmprxZtTc4=;
 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=244uADSST5HqR2EmlY8XVngAxRS3aRLOGK7odQAN0l+I+THAmDLpGeb+W5NEfPLRr
 GLS3G2PlWwPZea5Y+0WilCF6zFA0O9vTF2BJclajZx4W6ZUo/Trp7dHuv7JKUJ/Jpt
 0R5A75/5pWUdCg2Jz9FFwB2kGLlVZ/M8nS29Sk6yFvFdFHedN7gd+UMDlkL1gpuPJT
 w1knLew0HmVMtAbhiCMtJT30LwSX1MHwEH6I0XA9T7kRJ6+bEYokPiLk0NarIho/q+
 2PfP30rjC3VIYVVopaTiqqxbt6hxM1L9oO75uEJnRKu4StfsZ4CUt3fEbuDnjW4EUd
 i2r2pr37akFNA==
To: Russell O'Connor <roconnor@blockstream.com>
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Reply-To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Message-ID: <b44RnTZqVC01psPp8Iijmj2oGLcm7CnG56UaT5xEvtNkVVOfK4YAka_jf-zey7_Kkou7ewNWbGx9sBDoF3Fu9OA2aL2FCVY4u0ZI6geOCpU=@protonmail.com>
In-Reply-To: <CAMZUoKnC0f=FCjSa9oNMhXob+P6OaMdzUKWbhAMty2Xub-40TA@mail.gmail.com>
References: <NGFW5p2Gl4t6AqL2E29THMT5DbppMJlB6bdUE6nxAdMajxeFcoRNdt5axNLql08EoyIMsBgZHHHYt_MiITZwzyGZIz0iFX4vaKIYrVV2QhU=@protonmail.com>
 <CAMZUoK=TzOFfMFwNw6gjHtu2EeEPhyL9AjqLS-T=wphc905_JA@mail.gmail.com>
 <e4r4E0AYzZzkVQp67yxIG-fBBBH8rNrl-MtM7kJXoAsDT_bBSt6gXs_ukw6bBL4845s0OPkrIRjIk54hkQP_pL8X4A--1GFtYcGAl2bW_gs=@protonmail.com>
 <CAMZUoKnC0f=FCjSa9oNMhXob+P6OaMdzUKWbhAMty2Xub-40TA@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] Beyond Jets: Microcode: Consensus-Critical Jets
	Without Softforks
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: Tue, 22 Mar 2022 16:39:23 -0000

Good morning Russell,

> Thanks for the clarification.
>
> You don't think referring to the microcode via its hash, effectively usin=
g 32-byte encoding of opcodes, is still rather long winded?

A microcode is a *mapping* of `OP_` codes to a variable-length sequence of =
`UOP_` micro-opcodes.
So a microcode hash refers to an entire language of redefined `OP_` codes, =
not each individual opcode in the language.

If it costs 1 Bitcoin to create a new microcode, then there are only 21 mil=
lion possible microcodes, and I think about 50 bits of hash is sufficient t=
o specify those with low probability of collision.
We could use a 20-byte RIPEMD . SHA256 instead for 160 bits, that should be=
 more than sufficient with enough margin.
Though perhaps it is now easier to deliberately attack...

Also, if you have a common SCRIPT whose non-`OP_PUSH` opcodes are more than=
 say 32 + 1 bytes (or 20 + 1 if using RIPEMD), and you can fit their equiva=
lent `UOP_` codes into the max limit for a *single* opcode, you can save by=
tes by redefining some random `OP_` code into the sequence of all the `UOP_=
` codes.
You would have a hash reference to the microcode, and a single byte for the=
 actual "SCRIPT" which is just a jet of the entire SCRIPT.
Users of multiple *different* such SCRIPTs can band together to define a si=
ngle microcode, mapping their SCRIPTs to different `OP_` codes and sharing =
the cost of defining the new microcode that shortens all their SCRIPTs.

Regards,
ZmnSCPxj