diff options
author | Antoine Poinsot <darosior@protonmail.com> | 2023-01-25 14:31:05 +0100 |
---|---|---|
committer | Antoine Poinsot <darosior@protonmail.com> | 2023-10-08 02:43:17 +0200 |
commit | f4f978d38ee4920c5cd0de5d93b407ec37bfd9c0 (patch) | |
tree | 0d0aa0457688ff9bef670a9d785a8a52e5e2b21e /ci | |
parent | 9cb4c68b89a5715f82026f4aa446b876addd8472 (diff) |
miniscript: adapt resources checks depending on context
Under Tapscript, there is:
- No limit on the number of OPs
- No limit on the script size, it's implicitly limited by the maximum
(standard) transaction size.
- No standardness limit on the number of stack items, it's limited by
the consensus MAX_STACK_SIZE. This requires tracking the maximum stack
size at all times during script execution, which will be tackled in
its own commit.
In order to avoid any Miniscript that would not be spendable by a
standard transaction because of the size of the witness, we limit the
script size under Tapscript to the maximum standard transaction size
minus the maximum possible witness and Taproot control block sizes. Note
this is a conservative limit but it still allows for scripts more than a
hundred times larger than under P2WSH.
Diffstat (limited to 'ci')
0 files changed, 0 insertions, 0 deletions