Feature or Enhancement?
- (x) New feature
- ( ) Enhancement of existing feature
Description
In the current development cycle for v0.7.0, I have implemented tool functions generating scripts for graftroot lock, keyspend witness, and surrogate execution witness using tapescript code valid in v0.6.2. I also made tools for "graftap" (graftroot-within-taproot) to reduce the size of the locking script for scenarios in which locking scripts must be concise. Below are the byte code sizes for the resulting scripts:
|
Graftroot |
Graftaproot |
| Lock |
58 |
36 |
| Keyspend Unlock |
67 |
66 |
| Scriptspend (Overhead) |
69 |
145 |
If an OP_GRAFTROOT opcode was implemented, it would reduce the size of a Graftroot locking script to 36 bytes if implemented similarly to the updated OP_TAPROOT syntax planned in #14. The witnesses could also be reduced by 1 byte -- selection of keyspend or surrogate branch was originally done in the locking script, but the dup size push d32 eq condition had an additional overhead of 5 bytes, so I instead made the branch selection in the witnesses (true or false at the end of the witness).
Tasks
Additional context
Feature or Enhancement?
Description
In the current development cycle for v0.7.0, I have implemented tool functions generating scripts for graftroot lock, keyspend witness, and surrogate execution witness using tapescript code valid in v0.6.2. I also made tools for "graftap" (graftroot-within-taproot) to reduce the size of the locking script for scenarios in which locking scripts must be concise. Below are the byte code sizes for the resulting scripts:
If an
OP_GRAFTROOTopcode was implemented, it would reduce the size of a Graftroot locking script to 36 bytes if implemented similarly to the updatedOP_TAPROOTsyntax planned in #14. The witnesses could also be reduced by 1 byte -- selection of keyspend or surrogate branch was originally done in the locking script, but thedup size push d32 eqcondition had an additional overhead of 5 bytes, so I instead made the branch selection in the witnesses (trueorfalseat the end of the witness).Tasks
OP_GRAFTROOTto VMOP_GRAFTROOTto compiler and decompilerAdditional context