This PR optimizes the bytecode script for your typical HTLC. Seeing as OP_DUP OP_HASH160 are both repeated in both the OP_IF and OP_ELSE branches of the script, this optimization proposes extracting that outside the if statements, in order to reduce the number of bytes required for the script by 1.
bip199 bytecode optimization #738
pull matthewjablack wants to merge 1 commits into bitcoin:master from matthewjablack:bip199-bytecode-optimization changing 1 files +4 −2-
matthewjablack commented at 2:02 PM on November 14, 2018: contributor
-
Add bip199 bytecode optimization 3d9654837e
- matthewjablack renamed this:
Add bip199 bytecode optimization
bip199 bytecode optimization
on Nov 14, 2018 -
jabbfun007 commented at 9:51 AM on November 22, 2018: none
Good
- luke-jr added the label Proposed BIP modification on Dec 14, 2018
-
murchandamus commented at 8:39 PM on April 23, 2024: contributor
This makes a non-trival change to the main content of the BIP. Given the lack of an endorsement from the original BIP authors, this PR should be closed due to the long period of inactivity, unless we hear from the authors in the next few weeks.
Suggested for closing after 2024-05-07 if there is not any further activity by then.
-
ProofOfKeags commented at 8:54 PM on April 23, 2024: contributor
NACK
This would result in a backwards incompatible change and revising this spec may cause funds to be rendered impossible to find. Perhaps instead the optimization is added as a preferred encoding, leaving the original for people who are trying to recover funds that may be locked under the original script.
Separately, it should be noted that this change will not have any impact on how HTLCs are deployed in the Lightning Network as those definitions are specified here.
-
jonatack commented at 4:43 PM on May 6, 2024: contributor
Closing due to inactivity and a non-trivial change.
Happy to re-open if one of the BIP authors comments here.
- jonatack closed this on May 6, 2024