Delivery-date: Sat, 27 Sep 2025 02:23:32 -0700 Received: from mail-ot1-f63.google.com ([209.85.210.63]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1v2R9P-0001uo-TF for bitcoindev@gnusha.org; Sat, 27 Sep 2025 02:23:32 -0700 Received: by mail-ot1-f63.google.com with SMTP id 46e09a7af769-785bd8f1577sf4430181a34.3 for ; Sat, 27 Sep 2025 02:23:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1758965005; cv=pass; d=google.com; s=arc-20240605; b=cZm9cHV0/tZufjHWki5R9ogUQps6qZ6EA+HiRFs2Efa0AyZ/ZPiUhH8/44dfmKB6Rq z8iA2IVowlI1jgSL1mwhhTgighvhPMB9YXcUPGa+xjL3NqoOrVRMWykyGLRJF+FrYhKK RdrZ/qr3Zc0aJ5VjikCdQWgRPvBDzIC/QikHmuKEwwwT1mL8Lsm8ZrkVZBjXBqBY2p4E YOaxAJaQ9XSqML23k+PVP8JbR/jaTunGbrJYNFoSbwYKg+/kCSwI9nZNq163qCaYOn4T b/z4dpCLxMgnka5BDH/2j9e47TU86Ttv1nKN6UGM/iq3FkjlRhFc9OFhTMpfvO2rTS1e fp9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=q3OfRDWlaspZPoa0wP8skWXeEhk5sODXYy28j/kFkms=; fh=DVPSUQQ4XmSdX0ZbSLinS9V4hAQKsUhNWZJzXqycITs=; b=BOGyApoITr6ue0U+bLrXudoWCvq+SZpsBeNXVNaI8eF0s5PKLkVJHjqWKeMoe53Mwz hQh9OpNIF3VmNZgJLHSHRIyvlRjLFCoRL+C8Z273k+CiFGX1ptxbwdZftcafLoKSYX83 ItXmntFN4Ri7LOZMOQpWbSvDB+ZvcYewU3khsSm54o16gKz1tGwWxq7gGMl2hqHDy4vx YCpeDB/hXmB/qFEzjuGXuhE6H9tu2bTPgMyxxzzbFbhwcDjQjlD8nT0iWiQGX/YFa9Nk iL2uZy9XJ6GB9+3nxUIvkWiV7zE9riBrHjJfOnAvYvo7Pt0alnFKL3VIKQ3jS6vH7vo7 6iXg==; darn=gnusha.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@rustcorp.com.au header.s=202305 header.b=GNDJN6IX; spf=pass (google.com: domain of rusty@gandalf.ozlabs.org designates 150.107.74.76 as permitted sender) smtp.mailfrom=rusty@gandalf.ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1758965005; x=1759569805; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=q3OfRDWlaspZPoa0wP8skWXeEhk5sODXYy28j/kFkms=; b=TBsZwt8jSsta4XAnio7GLnXHHzunBqD1HvLqquu6a0hmcU9AHo/bQxCuihCs60Ze8v rlQQmnrEsv4bXhnANAcJ1RnQrNhxadnCgkoeXyHdKVQ5jE6WWPuEN+BFbFDgtO6QYPed LcywaINv+EYc1dewV9kZNzHwPZSfg+AYg3gu7hSVmYusqrtTpT1YpzX9D9B7duXwfIuN 6I0hE5/1DWZ1yHGvHJKhxSALTm4UrW4Rark4HUE/l/JSgx8unNo0lAHLBb0Je10aKY+A mJYyGEDSkL59jlvBd50Guj4x6EaWwDWnU8ilHW5u/Rh8GahiNHGnXodErtoLRXtQO2w0 Xvgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758965005; x=1759569805; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=q3OfRDWlaspZPoa0wP8skWXeEhk5sODXYy28j/kFkms=; b=tenxqsuqdV3Xr4V5lP0PSzfS5nnyB9UzFmZWXfmXEN7xoVAVOWC2eoOGgiVipNsKIi dM1sMAfch6IQSuNzffjydpR5BJhh669C6/65wdmgx7fL0eDltI+dVSkE8i0hFT7PlNLP igtiPqMuuPybfSRG7HT3QzZ3Up/SQOjCDf0EHVfLnIT/zCgQZmUqmsZwd6HYSAB8uoGT QIOf+eCg+qzihftY9XS0vySxDba/AdhtON0BJYwOoHvK4P25edGU+sLbXz+3l+YTF2Tj 6QHc0VNdSG9+ybwpyJNzzUzD2xptPs7INqQpWmswqfViEcPWvE4jdys/Y5bt4hOlkKMF FmsQ== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXZkP1I2OwlVc7MM6VZg5AoJH1PyPT27cGKADlrhwelLlSb4OvdLJSsyD6bc1HXM9uNO/qKdCd4HqKH@gnusha.org X-Gm-Message-State: AOJu0Yx0zu3DzQmOT5kQp7XYv18F5zkTL8qwLNzaoroRA0QCYQcgVHor d4huoI1vG5XRKrZxNDtPyp3kzK8jUq+2tEMNHQjHA/N0DfYjM36eZG79 X-Google-Smtp-Source: AGHT+IH9wdP4Ovl1z29/jniSD99ynBLTXRRLTmzmzvnXAABNvw61/2J7YlE/GbQeSR/L4n8jWPvQDA== X-Received: by 2002:a05:6808:680a:b0:43f:68a3:624e with SMTP id 5614622812f47-43f68a36496mr1812209b6e.4.1758965004958; Sat, 27 Sep 2025 02:23:24 -0700 (PDT) X-BeenThere: bitcoindev@googlegroups.com; h="ARHlJd7swaYcbgSFeG43kpQfQ6PhjcArvSA9RWLxLHbqQ7O8pQ==" Received: by 2002:a05:6820:986:b0:621:767d:3566 with SMTP id 006d021491bc7-63a7619f092ls1321870eaf.2.-pod-prod-07-us; Sat, 27 Sep 2025 02:23:21 -0700 (PDT) X-Received: by 2002:a05:6808:318c:b0:43f:7287:a5bd with SMTP id 5614622812f47-43f7287ac8dmr414746b6e.13.1758965001002; Sat, 27 Sep 2025 02:23:21 -0700 (PDT) Received: by 2002:a05:620a:4628:b0:80d:5a8b:a44e with SMTP id af79cd13be357-8601b027b5fms85a; Sat, 27 Sep 2025 01:12:36 -0700 (PDT) X-Received: by 2002:a05:6102:e07:b0:521:ed06:1fc7 with SMTP id ada2fe7eead31-5acbf2f5644mr4575794137.0.1758960755763; Sat, 27 Sep 2025 01:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1758960755; cv=none; d=google.com; s=arc-20240605; b=iYvtCA+YcTZG1c+NVBQsiSP9e4chNDVo8xmTpIcoNm2Q1JfaO/1H/i+1iia6AO6tPr Nt08eIjh48SSDzsEgqNED2327XygKBacWCPDqYfa7N4wg+Qr9ypQSmx38s61MNZ00SLd J3Tx4zD1icDuYBMEzf8rw6wGNOExL6Tb6ak2p5iVNZ3zVbEVdbdAFI6kT7Wdf0ENeJoO OB7nRi7H5jBlDzxx23WcMmDG++DlTZaEyo33WSunMWTL8G4AZGSrwRjEY2BKBvlUyL89 sdUfpiQsTM78Dc1ar//5tPlZ1D7ifFYD2lKxagu/wPvoQ3qAJVzJwkxEH1zuHWT9XV0M m7Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=pNH6vjBNBwzUUpLbBORFAMoCVuNN1UjG90ipXUpX6NA=; fh=VKRDeyaA3Okg5Ur9YeEuvs3adnjn1Zay82pjgmdy54E=; b=ItXswOq6Eyu/XlAGy/EinfU4MipIrdQ6hFNH2uhTQ8r8qFMqQZUE72VbFFv2f4z2B7 FKuqk4EpXPUhB9TRxkIv1HbyOTYk4r7HS0dXNY/nklxcWdTr7iXb3of2tAU5CXbazdCY H2wIthgkM2VtGwIqM3gzbbLjXOfAC0t3gWB7TOdcvU09/nTnXzNx5xXCR3LQ9UDTia8b uW9Ak/EjX+ckOmjbu42c9Hu3PQOnZLS5GdCGEUPYx1B2YWkHkNMkTnyVy0rli8IbiOsA 7w9Jn47cDauuQYtOBhr14TGikL4wf9vtJMNKNpHhAitSNQ9YmYAC+9YpOKDssonAPqCe dawA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@rustcorp.com.au header.s=202305 header.b=GNDJN6IX; spf=pass (google.com: domain of rusty@gandalf.ozlabs.org designates 150.107.74.76 as permitted sender) smtp.mailfrom=rusty@gandalf.ozlabs.org Received: from mail.ozlabs.org (gandalf.ozlabs.org. [150.107.74.76]) by gmr-mx.google.com with ESMTPS id ada2fe7eead31-5ae24516065si291625137.0.2025.09.27.01.12.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Sep 2025 01:12:35 -0700 (PDT) Received-SPF: pass (google.com: domain of rusty@gandalf.ozlabs.org designates 150.107.74.76 as permitted sender) client-ip=150.107.74.76; Received: by gandalf.ozlabs.org (Postfix, from userid 1011) id 4cYgDG5cQ2z4wB5; Sat, 27 Sep 2025 18:12:30 +1000 (AEST) From: Rusty Russell To: bitcoindev@googlegroups.com Cc: Julian Moik Subject: [bitcoindev] [0/4] A Bitcoin Scripting Proposal BIP Quartet Date: Sat, 27 Sep 2025 17:42:25 +0930 Message-ID: <877bxknwk6.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: bitcoin-dev@rustcorp.com.au X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@rustcorp.com.au header.s=202305 header.b=GNDJN6IX; spf=pass (google.com: domain of rusty@gandalf.ozlabs.org designates 150.107.74.76 as permitted sender) smtp.mailfrom=rusty@gandalf.ozlabs.org Precedence: list Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com List-ID: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -0.8 (/) Hello all! As some of you know, I've been chipping away (with help now from Julian Moik, Cc'd) at a framework to restore bitcoin's scripting language to its original power. My approach has been to stick with Script: even if you prefer other approaches, you should find this restoration and enhancement of script capabilities a useful comparison. Current drafts in "review me!" format: https://github.com/rustyrussell/bips/pull/1 Here is a brief description of each: 1. Varops Budget For Script Runtime Constraint (bip-unknown-varops-budget.mediawiki) This extends and generalizes the sigops budget into a "variable operations" budget, using benchmarks taken from the prototype implementation across various machines. This budget is per transaction, by weight, designed to constrain usage to ensure rapid evaluation without overly restricting scripting ability. 2. Restoration of Script Capabilities Once the safety net of the varops budget is in place, disabled opcodes can be re-enabled, stack object size and total capacity extended, and abitrary-length arithmetic restored (though numbers are now always unsigned). 3. OP_TX Once script can handle large data once more, the problem of introspection is signficantly simplified: we can simply have an opcode which pushes parts of the current transaction onto the stack. The concrete design proposed here is a fruitful area for debate and review. 4. New Opcodes for Tapscript v2 The most speculative part of the series suggests some opcodes which would allow more optimal use of Script: OP_CHECKSIGFROMSTACK, OP_SEGMENT, OP_BYTEREV, OP_ECPOINTADD, OP_INTERNALKEY and OP_MULTI. Some of these are old friends, and others may be new to you: I look forward to your feedback. There is also a prototype implementation we used for testing: https://github.com/jmoik/bitcoin/tree/gsr Thankyou in advance for your consideration! Rusty & Julian. -- You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/877bxknwk6.fsf%40rustcorp.com.au.