Return-Path: Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id AA825C000B for ; 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 ; 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 ; 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 ; 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 From: ZmnSCPxj Reply-To: ZmnSCPxj Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Bitcoin Protocol Discussion 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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