Contents
Signet Implementation and Script Architecture
A developer on Delving Bitcoin published test results on October 31, 2026, detailing an Eltoo state chain channel deployed on signet 1. The test used OP_TEMPLATEHASH, OP_CHECKSIGFROMSTACK (CSFS), and INTERNALKEY to manage state updates across a three-party Alice, Bob, and Carol channel 1. This construction relies on script proposals made available through Bitcoin Inquisition version 29.4, which enabled the OP_TEMPLATEHASH opcode 1. The scripts were structured around draft Lightning specifications published by user instagibbs in January 2026 1. In this channel setup, state transitions do not require hard-coded relative locktime trees or complex rekeying ladders 1. Instead, the update leaf script evaluates to just three main operational concepts: verifying a template hash, checking stack signatures against an internal key, and enforcing relative locktimes via OP_CHECKLOCKTIMEVERIFY 1. Specifically, the update script is defined as TEMPLATEHASH INTERNALKEY CSFS VERIFY CLTV 1. This design creates a state management mechanism where state updates can cleanly supersede older state transactions without requiring historical witness expansion 1.
The settlement condition is defined by a separate script leaf that validates the transaction output payload when closing the channel state 1. In the test implementation, the settlement leaf script uses the construction TEMPLATEHASH EQUAL 1. This settlement leaf occupies 35 bytes of script space within the spending script tree 1. The overall mechanism allows state updates to be broadcast out of order while guaranteeing that only the highest state number can ultimately settle on-chain 1. In the test run, a spending update was signed prior to the existence of any state output, confirming that state transactions can pre-commit to future transitions without needing pre-existing output identifiers 1.
Comparative Analysis Across Three Eltoo Implementations
The author benchmarked the TEMPLATEHASH implementation against two prior approaches for constructing Eltoo state chains: SIGHASH_ANYPREVOUT (APO) combined with CheckTemplateVerify (CTV), and a CSFS with CTV rekey ladder 1. Across these three paradigms, script sizes, witness footprints, and transaction execution profiles varied significantly 1. Under the APO and CTV design, the update leaf script measured approximately 35 bytes, while producing an update witness size of around 150 bytes 1. A full test execution using the APO and CTV structure required 6 transactions to execute state progression and settlement 1.
The second design, which relied on a CSFS and CTV rekey ladder, required an update leaf size of 42 bytes 1. However, its update witness payload expanded to 512 bytes and grew larger with each sequential state update 1. That implementation required 2 transactions to complete its test run 1. By contrast, the TEMPLATEHASH plus CSFS and INTERNALKEY variant achieved an update leaf script size of only 10 bytes 1. Furthermore, its update witness remained constant at 143 bytes regardless of how many state transitions occurred 1. The complete signet test run for the TEMPLATEHASH construction consumed 4 transactions, which included an intentional broadcast of a stale state to verify state replacement logic 1.
Script Interpreter Dynamics and State Replacement Verification
The architectural advantage of OP_TEMPLATEHASH stems from how the Bitcoin Script interpreter exposes transaction digest data to the execution stack 1. When using SIGHASH_ANYPREVOUT, signature verification logic handles transaction rebinding internally within the interpreter 1. The node omits the previous output information when assembling the signature hash, and the execution stack receives only a boolean pass or fail response 1. Similarly, CheckTemplateVerify evaluates a commitment hash against transaction fields and returns a binary boolean outcome to the stack 1. Because CTV does not push the computed hash back onto the stack, constructing a rekey ladder with CSFS required explicitly placing a second copy of the template hash into the transaction witness data 1.
In contrast, OP_TEMPLATEHASH places the calculated transaction hash directly onto the execution stack 1. Subsequent opcodes, such as OP_CHECKSIGFROMSTACK, can immediately process the hash without requiring duplicate data in the witness script 1. As a result, the update leaf script requires only three opcodes to validate state updates 1. To demonstrate state replacement behavior on signet, the developer purposely published an outdated state update transaction, designated as U1, with transaction identifier 1163d3d5…9c259124 1. A newer update transaction, designated as U3 with transaction identifier 22c0c67b…02188692, successfully replaced U1 on-chain while skipping state 2 entirely 1. Settlement of state 3 was then executed via transaction identifier 4a11cfca…dea15007, distributing balances of 40,000 sats, 35,000 sats, and 25,000 sats among the three participants 1.
Technical Scope and Limitations
While the signet test demonstrates the functional viability of TEMPLATEHASH for Eltoo state chains, the author emphasized that the tested script represents a simplified prototype rather than a production-ready Lightning Network channel 1. The current implementation operates with a single key and excludes Hash Time-Locked Contracts (HTLCs) or payment routing infrastructure 1. Consequently, the script logic does not yet handle multi-party signature aggregation, payment routing timeouts, or complex fee-bumping mechanisms required for live peer-to-peer payment networks 1.
Broader protocol changes across the Bitcoin and Lightning ecosystems continue to address related transaction security and state management challenges 2. For instance, Core Lightning version 25.02 through version 26.04 contained a denial-of-service vulnerability related to channel announcements naming identical node IDs, which required manual intervention to clear corrupted gossip stores 2. Additionally, LND updates in pull requests 11373 and 11380 enforced a minimum commitment feerate of 253 sat/kw to prevent channels from becoming stuck during fee updates 2. These ongoing infrastructure developments highlight the operational requirements surrounding state transitions and network message validation as new script proposals undergo testing on signet 12.
What is not yet established
- How script execution costs and witness sizes scale when multi-party signatures and HTLCs are added to TEMPLATEHASH Eltoo channels.
- Whether OP_TEMPLATEHASH or competing soft fork proposals will be formally proposed or activated on Bitcoin mainnet.
- The timeline for integrating TEMPLATEHASH state chains into official Lightning Network BOLT specifications.
Frequently asked questions
How does OP_TEMPLATEHASH simplify Eltoo script logic compared to CTV?
Unlike CTV, which returns only a boolean pass/fail result, OP_TEMPLATEHASH pushes the computed template hash onto the stack, enabling CSFS to sign it directly without adding duplicate hash data to the witness 1.
What witness size savings were demonstrated on signet?
The TEMPLATEHASH, CSFS, and INTERNALKEY variant reduced the update leaf script size to 10 bytes and maintained a constant 143-byte update witness, avoiding the expanding 512-byte witnesses seen in CSFS and CTV rekey ladders 1.
Is the tested signet script ready for live Lightning channels?
No, the author explicitly noted that this is a toy channel prototype using a single key without HTLCs or payment routing features 1.
Sources
- Delving Bitcoin — Eltoo state chain on signet, third time: TEMPLATEHASH + CSFS + INTERNALKEY (2026-10-31) https://delvingbitcoin.org/t/eltoo-state-chain-on-signet-third-time-templatehash-csfs-internalkey/3012
- Bitcoin Optech — Bitcoin Optech Newsletter #429 (2026-10-30) https://bitcoinops.org/en/newsletters/2026/10/30
- Delving Bitcoin — Multiplication in Tapscript today: 371 bytes, no soft fork (2026-10-29) https://delvingbitcoin.org/t/multiplication-in-tapscript-today-371-bytes-no-soft-fork/3010
Revision history
Published