bitcoin core – Is there a restrict on the quantity and measurement of script inputs when spending a script path in a P2TR transaction?

0
65


From BIP 341,

Spending utilizing one of many scripts: A Taproot output could be spent by satisfying any of the scripts utilized in its development. To take action, a witness stack consisting of the script’s inputs, plus the script itself and the management block are crucial.

Nonetheless, I do not see any point out of the bounds in measurement or witness rely explicitly. In BIP 342, following two useful resource limits are talked about which are not directly related (which weren’t relaxed by the Taproot improve).

Stack + altstack aspect rely restrict: The present restrict of 1000 parts within the stack and altstack collectively after each executed opcode stays. It’s prolonged to additionally apply to the scale of preliminary stack.

Stack aspect measurement restrict: The present restrict of most 520 bytes per stack aspect stays, each within the preliminary stack and in push opcodes.

Additionally, in BIP 341, on the part of Script Validation Guidelines, the final step is:

Execute the script, in line with the relevant script guidelines[11], utilizing the witness stack parts excluding the script s, the management block c, and the annex a if current, as preliminary stack. This means that for the long run leaf variations (non-0xC0) the execution should succeed.[12].

Which means solely the script inputs are pushed to the stack in the course of the script execution.

Does this all imply that there could be a most of 1000 script enter objects every with <=520 bytes, with a complete restrict of 520 KB? And for the reason that restrict on preliminary stack was added by Taproot, because of this Taproot truly diminished the restrict in comparison with earlier than Taproot, and pre-segwit P2SH transactions might have limitless script inputs (restricted by block measurement/transaction measurement restrict).

If that is so, the Ordinal inscriptions didn’t want to attend for Taproot to pack the large quantities of knowledge right into a Bitcoin transaction. This conclusion does not sound appropriate, however I do not know what I am lacking. May somebody enlighten me?

LEAVE A REPLY

Please enter your comment!
Please enter your name here