From: Brandon Black <freedom@reardencode•com>
To: Rusty Russell <bitcoin-dev@rustcorp•com.au>
Cc: bitcoindev@googlegroups.com, Julian Moik <julianmoik@gmail•com>
Subject: Re: [bitcoindev] [4/4] New Opcodes for Tapscript v2
Date: Mon, 29 Sep 2025 15:55:01 -0700 [thread overview]
Message-ID: <aNsORZGVc-1_-z1W@console> (raw)
In-Reply-To: <87tt0om8uz.fsf@rustcorp.com.au>
Hi Rusty and Julian,
Thrilled to see the progress towards a greater script for all!
Scoping this work to a new Tapscript version that can be made available
both for SegWit v1 32-byte witness programs and potentially in BIP360
scripts makes good sense to me.
> ;OP_SEGMENT
In Tapscript 0xc2, should SEGMENT replace CODESEPARATOR rather than being
an additional opcode? The Tapscript 0xc0 CODESEPARATOR merely adds the
last position of the opcode to the sighash. With SEGMENT already
requiring the script to be split into execution chunks, it might make
sense for the positions of the current segment to be included in the
sighash as well which would make CODESEPARATOR redundant.
> ;OP_MULTI
Clever.
TX_SELECT_INPUT_AMOUNT|TX_INPUTSELECT_ALL OP_TX \
TXSELECT_NUM_INPUTS OP_TX OP_MULTI OP_ADD
Gets the sum of all input amounts.
> Bitcoin script was developed long before Taproot: OP_ECPOINTADD and OP_BYTEREV are the minimal missing opcodes required for creating Taproot trees in script.
You also need either SECP256K1_PRIVATE_TO_PUBLIC or OP_ECSCALARMUL to
convert the Taptweak to a point to be added to the internal key.
Still digesting the whole package, but these are my initial thoughts.
Best,
--Brandon
--
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/aNsORZGVc-1_-z1W%40console.
prev parent reply other threads:[~2025-09-30 0:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-27 8:12 [bitcoindev] [0/4] A Bitcoin Scripting Proposal BIP Quartet Rusty Russell
2025-09-27 11:27 ` [bitcoindev] [1/4] Varops Budget For Script Runtime Constraint Rusty Russell
2025-09-27 11:28 ` [bitcoindev] [2/4] Restoration of disabled script functionality (Tapscript v2) Rusty Russell
2025-09-27 11:29 ` [bitcoindev] [3/4] OP_TX Rusty Russell
2025-09-27 11:29 ` [bitcoindev] [4/4] New Opcodes for Tapscript v2 Rusty Russell
2025-09-29 22:55 ` Brandon Black [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aNsORZGVc-1_-z1W@console \
--to=freedom@reardencode$(echo .)com \
--cc=bitcoin-dev@rustcorp$(echo .)com.au \
--cc=bitcoindev@googlegroups.com \
--cc=julianmoik@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox