- Signature extension system: call a plugin at the beginning of each of the
following ops, passing it the runtime: `CHECK_SIG`, `CHECK_MULTISIG`, `SIGN`,
and `GET_MESSAGE`. Each plugin function must have this signature:
`Callable[[Tape, LifoQueue, dict], None]`
- Example sig extension implementation using values in cache key b'sigext'
- Signature extension system uses an underlying scoped plugin system. In the
future, additional OPs may get plugin hooks using this system.
- Slightly simplified `CHECK_SIG` and `SIGN` to now use `GET_MESSAGE` instead of
repeating that message construction logic. To avoid calling plugins twice, a new
Tape containing only the sigflag is passed to `GET_MESSAGE` by these calls.
- New class `Stack` with item size limits to avoid denial of service attack from
the 6 byte script `true loop { dup concat }`. Refactor system to use new `Stack`.
(Internally use `collections.deque`.)
- Removed `OP_PUSH4`
- Redefined x05 to be `OP_GET_MESSAGE` and x59 to be `NOP89`
- Reversed the order in which the message and signature are pulled from the
queue by `CHECK_SIG_QUEUE` to make it equivalent to the `OP_CSFS` BIP.
- Reversed the order of `CONCAT` to make it equivalent to the `OP_CAT` BIP.
- Reversed the order of outputs of `DECRYPT_ADAPTER_SIG` to for compatability
with changed `CONCAT`.
- Renamed ops:
- `OP_SIGN_QUEUE` -> `OP_SIGN_STACK`
- `OP_CHECK_SIG_QUEUE` -> `OP_CHECK_SIG_STACK`
- `OP_READ_CACHE_Q` -> `OP_READ_CACHE_STACK`
- `OP_READ_CACHE_Q_SIZE` -> `OP_READ_CACHE_STACK_SIZE`
- Changed aliases:
- `OP_RCS` (`RCS`) -> `OP_RCZ` (`RCZ`)
- `OP_RCQ` (`RCQ`) -> `OP_RCS` (`RCS`)
- `OP_RCQS` (`RCQS`) -> `OP_RCSZ` (`RCSZ`)
- `OP_CSQ` (`CSQ`) -> `OP_CSS` (`CSS`)
- `OP_CTV` (`CTV`) -> `OP_CTSV` (`CTSV`)
- Added `OP_CTS` alias for `OP_CHECK_TIMESTAMP`
- Added `OP_CAT` alias for `OP_CONCAT`
- Added `OP_CATS` alias for `OP_CONCAT_STR`
- Added new classes `Script`, `ScriptLeaf`, and `ScriptNode` and replaced the
`create_merklized_script` function with `create_merklized_script_prioritized` to
make using the new `OP_MERKLEVAL` easier.
- Updated all tool functions to use the `Script` class
- Added `Script.__bytes__`, `Script.__str__`, and `Script.__add__`
- Added `ScriptProtocol` representing `Script` functionality
- Added `ScriptProtocol` compatibility to script running functions
- Fix: `OP_LOOP` now exits if `OP_RETURN` is called within the loop body
- Added `OP_CHECK_TEMPLATE` (`OP_CT`) and `OP_CHECK_TEMPLATE_VERIFY` (`OP_CTV`)
- Added `OP_TAPROOT` (`OP_TR`)
- Fixed `OP_DIV_FLOAT` arithmetic bug
- Changed `OP_RANDOM` to take its argument from the stack instead of the tape
- Added `OP_ADD` alias for `OP_ADD_INTS`
- Added `OP_SUB` alias for `OP_SUBTRACT_INTS`
- Added `OP_MULT` alias for `OP_MULT_INTS`
- Added `OP_DIV` alias for `OP_DIV_INTS`
- Added `OP_MOD` alias for `OP_MOD_INTS`
- Improved documentation generation