From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 12 May 2025 14:45:33 -0700 Received: from mail-qt1-f185.google.com ([209.85.160.185]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1uEaxo-0000eE-By for bitcoindev@gnusha.org; Mon, 12 May 2025 14:45:33 -0700 Received: by mail-qt1-f185.google.com with SMTP id d75a77b69052e-4767e6b4596sf85534671cf.2 for ; Mon, 12 May 2025 14:45:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1747086326; cv=pass; d=google.com; s=arc-20240605; b=USiZM8pAAS0HBR3YWtTaPP71luHwx32341saiuzPII+z10R0beE1nZJ2XYOW10fnGC wFqo4FNNFBkY66JwTC1Yl/C91MbDi30YDSvmf49jLVx9hZsvzVwtrtkswDO6t77MxFU8 djx3EPUd0bKArEKL9UfXnACBCI2w6ZRyYRvXPES4kMOqSyOwa8YXP+6mrnSXzZU49Emq wLKBhL8OQg1CNOvUD3f/4pwXdWY9QuVXg4jb+3TCg2rCj0rZyauBrarL7SOh1dwJ+O2i DgGg/bFtNFTVSQzH0UXfWB86l8OwolsZzxoxmHWDHQxqcopafU2BBWkkt3uCbfnyvC7M ClHw== 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:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=l0i1E2VW7nFm3IKz0WDj/0AGbNa4TVjqviTeW1K6wpI=; fh=zzfmJWn4Il0+SXM/1567CBnpnTZO9Jgq/6Nv2JlwXC0=; b=DSKtgaVamk1SVHLxXxRPPo7ppTgrJ+KuCgG4kw4h6gqtVN6/cxrxmW3BH1iPTUsJr+ 9xmi9iJWnmGEPp06DbaxUeB4ztweBKQ3YpOwmsRKsVALV6iyU1I1x4kLQRWl5LT4aPoz btjE88urRG/K06qmUrTxZfg9joKHunvGlENR1M0E/4EUiyxg0vNHY1EQ3iymQcFeqJ/g 93T+E0+FB/w4okg46K+/SYkmweWme6moXDivZonsXViIPu0F+xJ7zZu0E6nyN0ZaLm1b PrqZCbmT/RZhDLNYSR3xgL4RRgCeHiWQnJoO8XvhHziFolTy0AdNATg4+QoqhQ14IcIp L0sw==; darn=gnusha.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JTW7t5nP; spf=pass (google.com: domain of martin.habovstiak@gmail.com designates 2607:f8b0:4864:20::e31 as permitted sender) smtp.mailfrom=martin.habovstiak@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1747086326; x=1747691126; 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:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:sender:from:to:cc:subject:date:message-id :reply-to; bh=l0i1E2VW7nFm3IKz0WDj/0AGbNa4TVjqviTeW1K6wpI=; b=nmYHk6pJhPivvMxgEW0tjDFgcyKJSfnYdXHz91vKuSjjL3AIelOfw99n0Qej0x0mBq dzYsNkViPaD3+Lc1u+okK8QcDaeyXTRAKldldV3ayxs9CAxoGXH2xp2bXFPtPCA41Fio luhtxJwChut3zDcCu7h0Ja57pTN7FLN58PnCD/MBg2qv3Xugny3pyr3x0UY8gCWGDQy9 t+NZnwJ1BxOdK+x8WzOtnvUH0HVu2EsGAn7YHKbSJ5ijP3GdeffIiuTV7gADJvgywYTO ndBnMRXVxqWSTJ4z/0rBWNmCdMMIHIZgCvsk7xc+ktDzXAD7nSDaaPbXPd8qISXwX/0D 0pcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747086326; x=1747691126; 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:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to; bh=l0i1E2VW7nFm3IKz0WDj/0AGbNa4TVjqviTeW1K6wpI=; b=FWdIv24OlC1+5ZRBFZxybMm3LDIm2F3aDBQECtqjHvMnbWhC90ujU9scxTcRmPrqmN i5XrSkGV5rkd5BnSXtewdR1L/vpaiI9DPNwTjbgxsiR1d9bLUNH82RqHyXo52zLPDLxQ S+xaTr3/ybcUip7D87yyUCJRmoJQXkfA1B+2vzhwbwa9pqkwOoTg2Ut+Uwh/YtBifhpY TP2+SqdMoAqsYUaiRj/qXDg6+lHRPqNMS+b2OAutQBRFO0tJ+sARIvW8S0OorOhs8aXH 8UM2i0F959wcc/RI+iLX246eYZhLpj5RhFiOubO6BFcT2b/DdxNFqoScdX4l9BmCHDGc qAJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747086326; x=1747691126; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=l0i1E2VW7nFm3IKz0WDj/0AGbNa4TVjqviTeW1K6wpI=; b=FrbWat6WukiHcQwGmOjT6joRsmaGN9uhvPi1bjBZ9Uo5aB64EoUty2sZ8xzotp1xq9 pM/r4+g4g2PwZGfpSm53ZrlbemkA2g4QVrffROsZNOh49Wkj/aprEVPMLDX9S8E7/D9c pVofeQZZoEQqnV7/9gp6dNLTqFtG3Hw+AtOMtoxBL7jgNd6/cQBejH+21Tg6+b9jPd2+ mFwuOXXoTeoKbIlQBWq4vV12dDEGJ1jVew33wAry6slwQLX3y6r3TwhjDK+z1LbHvk29 J0W/aFcCz9kIbH33ap3IeFN98KbK1wHVjFxzErmHMQXH6yj+EfW2ug+uU0SHup5fR6VW wXbA== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCX6b2yRk7CTCRB4OFF2hp1U5SExpRHheDn0U6n1xy4SGyXWXCRVZUSD2hbQhpD1bw3uqJ/+Ay45R2E1@gnusha.org X-Gm-Message-State: AOJu0YzxC93Shg/l5RPsIoNXoB3Aq1SeZOcyvjnHu4IASbM4bMpG1qZ0 5hYKk7M6nVKiqRHAiAqEi+lXzMlD13l5I8qDsnycke89v8MKZknk X-Google-Smtp-Source: AGHT+IEnbUOmYNeiI/Yt5wFsFA4Kxcbz0ihCKjAIrHHbFl2oVMx3p3M3Tpu2b4hCswuHMUppTNfykg== X-Received: by 2002:ac8:598d:0:b0:478:f03c:b3dc with SMTP id d75a77b69052e-494527f4007mr199160741cf.41.1747086326181; Mon, 12 May 2025 14:45:26 -0700 (PDT) X-BeenThere: bitcoindev@googlegroups.com; h=AVT/gBFNEjTeWhTsBZJn3at+PsBSV7M6HcszbeCKfq40d0/X5w== Received: by 2002:a05:622a:6206:b0:476:da3d:a1f0 with SMTP id d75a77b69052e-49449499135ls3711191cf.2.-pod-prod-07-us; Mon, 12 May 2025 14:45:23 -0700 (PDT) X-Received: by 2002:a05:620a:298e:b0:7cc:aedc:d0c1 with SMTP id af79cd13be357-7cd010f4077mr2286632085a.5.1747086322993; Mon, 12 May 2025 14:45:22 -0700 (PDT) Received: by 2002:a05:620a:38b:b0:7c5:495f:5415 with SMTP id af79cd13be357-7cd01025058ms85a; Mon, 12 May 2025 12:32:31 -0700 (PDT) X-Received: by 2002:a05:6214:1d03:b0:6e6:6c39:cb71 with SMTP id 6a1803df08f44-6f6e4815cf3mr246995756d6.45.1747078349678; Mon, 12 May 2025 12:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747078349; cv=none; d=google.com; s=arc-20240605; b=RvY015XZbV+SKtr1p6xQ1m2gnvtxEyw9icBI2RGNawXt89lUJobr9ue+jEpdK0dFTH 7c8nHhoRI2HTBM2EnaWaQB67EnqZxMyWO3djIm+YboOLl9hmC0wnMxJdeteVChdXnbOf NHgYt1zlT+uNdM7LfKCRIiib6qYf7T0BgJLroDx5FXT/nKjkTHCYpGU99WqgvM7Bifby n5TVhui+FJYwK+y8C5+F4D1JS9DhpFDhr/XSPOi4pK1gpPIGmIRyRc9a05Io/lJp/Kcu L4kNb0JkNmZsIG5UCq+Ry8gZBESTTbKuQdJdFHO8EPQc3njfe6Pm1HVIVwVCnNAYnZ94 ZD1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=AlQwpZQii5KCHaU7SW6N1lrRlZl3yhipX2BpxuHkGJE=; fh=0HYCNi94CwyjFCKDYnReFaTE00h6jTnsaeESJcHonEs=; b=iWR6065fpT6YJWCSrYTLz5kZM/7+Pf/y0OKnqIH3QfrYlIvdWe0Zp2Ifxc0Y2PGS/5 m2wSBPe1Q/4mAbb7lxRTm067kqVFn9nh+S3EnzcOnoADmFWJQbh3Wy9cuUwU2jgJYVOq ZJJ/eWfKrA6xOEdDutejmysbMqyG4ldVPmZIrFA4F5swdWt5uc2u/6+9Qp4r8fz5N+pF MERQ/K3MljUdUkSGOy/PXtnNb2FMq7vS47yzgu/Dn74q/3OkD2MLxE9MmiGGL31Gldoy i3MnWbfRplL4Gs8ksLeuUU0aMfghHi0eW9xWFeqbuANnTSMymsTpscaeUHFDQmoCLdq+ eulg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JTW7t5nP; spf=pass (google.com: domain of martin.habovstiak@gmail.com designates 2607:f8b0:4864:20::e31 as permitted sender) smtp.mailfrom=martin.habovstiak@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com. [2607:f8b0:4864:20::e31]) by gmr-mx.google.com with ESMTPS id 6a1803df08f44-6f6e39872cfsi3413576d6.4.2025.05.12.12.32.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 May 2025 12:32:29 -0700 (PDT) Received-SPF: pass (google.com: domain of martin.habovstiak@gmail.com designates 2607:f8b0:4864:20::e31 as permitted sender) client-ip=2607:f8b0:4864:20::e31; Received: by mail-vs1-xe31.google.com with SMTP id ada2fe7eead31-4ddb4b29fe7so3636860137.1 for ; Mon, 12 May 2025 12:32:29 -0700 (PDT) X-Gm-Gg: ASbGncvALdzpxv8tOzX6Rfe5CmwzVI8Vs+bj62i45tXdpDuU2cWOd7iUMAFQFEtI9VI Qe6kugqoU70Xj4wOUihvcl1HPT5TPo9OCZzxWt/hUADkRxIcsUSe9tPm82oO4UkGiELkaRSOSbO If2WRJlXiXoXlSgAgUQCKO3JhZMP/YOvDlPvUFG9LKKVHtPLlAVxpxEs7e4lF5iYA= X-Received: by 2002:a05:6102:5e97:b0:4da:d874:d30d with SMTP id ada2fe7eead31-4deed3cf812mr12654741137.17.1747078338434; Mon, 12 May 2025 12:32:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Martin_Habov=C5=A1tiak?= Date: Mon, 12 May 2025 16:32:08 -0300 X-Gm-Features: AX0GCFv49RFMrnVX0EB7KtB0QcqLz2m7dwqdDcwuFp8XHDg_4_BJwTsReVfT3YY Message-ID: Subject: Re: [bitcoindev] [Proposal] 64-bit arithmetic in Script To: Chris Stewart Cc: Bitcoin Development Mailing List Content-Type: multipart/alternative; boundary="000000000000c1dbfa0634f55fd2" X-Original-Sender: martin.habovstiak@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JTW7t5nP; spf=pass (google.com: domain of martin.habovstiak@gmail.com designates 2607:f8b0:4864:20::e31 as permitted sender) smtp.mailfrom=martin.habovstiak@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com 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.5 (/) --000000000000c1dbfa0634f55fd2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, the proposal seems to be quite confused about how it's going to do that. It mentions upgrading existing opcodes, which is a hardfork, not soft fork, at least without using a different leaf version. But it also mentions OP_SUCCESSX which are different opcodes. I think it needs some analysis. (leaf version seems better intuitively) I'd also love to see analysis why stop at 64 bits and not go all the way to 256 which could be useful for cryptography. Anyway, pushing amounts on the stack would be great. Though I'm surprised you're only proposing the sum, not individual outputs. Why? Good luck! Martin D=C5=88a po 12. 5. 2025, 14:21 Chris Stewart nap=C3=ADsal(a): > This soft fork proposal extends the range of numeric operands in Script > from -2^31+1 to 2^31-1, to -2^63+1 to 2^63-1. It further expands the > result range for arithmetic operations from -2^63 to 2^63-1, to -2^127 to > 2^127- 1. > > All existing opcodes[1 > > ] that interpret stack elements as numbers are upgraded to support 64-bit > parameters. > > The existing number encoding format[2 > > ] and arithmetic semantics[3 > > ] from the original Bitcoin implementation are preserved, while enhancing > the supported precision. > > > https://github.com/Christewart/bips/blob/2025-03-17-64bit-pt2/bip-XXXX.me= diawiki > > The purpose for this BIP is to lay the groundwork for introducing amounts > into Script. This document takes no opinion on how this is done. > > I've prototyped a few different proposals now introducing amount locks > into Script[0][1] and feel like this proposal is stable enough for seriou= s > review. > > -Chris > > [0] - https://delvingbitcoin.org/t/op-inout-amount/549/4?u=3Dchris_stewar= t_5 > > [1] - https://delvingbitcoin.org/t/op-inout-amount/549/5?u=3Dchris_stewar= t_5 > > > > -- > 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/CAGL6%2BmH%2B9iq5_SR-Fa5zVZR= oTpHasX7xoprYeJZRd5D80J1GqA%40mail.gmail.com > > . > --=20 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 e= mail to bitcoindev+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/= CALkkCJbeAYA2X8jv8iWthKBB8GqxA49DCFm%2BUMnhmXYpexTNtw%40mail.gmail.com. --000000000000c1dbfa0634f55fd2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

the prop= osal seems to be quite confused about how it's going to do that. It men= tions upgrading existing opcodes, which is a hardfork, not soft fork, at le= ast without using a different leaf version. But it also mentions OP_SUCCESS= X which are different opcodes. I think it needs some analysis. (leaf versio= n seems better intuitively)

I'd also love to see analysis why stop at 64 bits and not go all th= e way to 256 which could be useful for cryptography.

Anyway, pushing amounts on the stack would be = great. Though I'm surprised you're only proposing the sum, not indi= vidual outputs. Why?

Goo= d luck!

Martin

D=C5=88a po 12. 5. 2025, 14:21 Chris Stewart <stewart.chris1234@gmail.com>= nap=C3=ADsal(a):
=

This soft fork proposal extends the range of numeric operan= ds in Script from -2^31+1 to 2^31-1, to -2^63+1 to 2^63-1. It further expands the result range for arithmetic operations from -2^= 63 to 2^63-1, to -2^127 to 2^127- 1.

All existing opcodes[1]=20 that interpret stack elements as numbers are upgraded to support 64-bit par= ameters.

The existing number encoding format[2]=20 and arithmetic semantics[3]=20 from the original Bitcoin implementation are preserved, while enhancing the= supported precision.

https://github.com/Christewart/bips/blob/2025-03-17-64= bit-pt2/bip-XXXX.mediawiki

The purpose for this BIP is to lay the= groundwork for introducing amounts into Script. This document takes no opi= nion on how this is done.

I've prototyped a few different proposa= ls now introducing amount locks into Script[0][1] and feel like this propos= al is stable enough for serious review.

-Chris

[0] - https://delvingbitcoin.org/t/op-inout-am= ount/549/4?u=3Dchris_stewart_5

[1] - https://delvingbitcoin.org/t/op-inout-amount/549/5?u=3Dchr= is_stewart_5



--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoindev+unsubscribe@googlegroups.com.=
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAGL6%2BmH%2B9= iq5_SR-Fa5zVZRoTpHasX7xoprYeJZRd5D80J1GqA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoind= ev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/= msgid/bitcoindev/CALkkCJbeAYA2X8jv8iWthKBB8GqxA49DCFm%2BUMnhmXYpexTNtw%40ma= il.gmail.com.
--000000000000c1dbfa0634f55fd2--