BOLT #3 specifies that an HTLC success transaction (the second-stage transaction that spends an HTLC by offering the preimage) has the witness script 0 <remotehtlcsig> <localhtlcsig> <payment_preimage>.
This query and the respective solutions assume that the enter script of the HTLC success transaction is <remotehtlcsig> <payment_preimage>. The solutions clarify intimately how the scripts are executed.
As implementations appear to implement the script in accordance with the specification, I ponder how the script is definitely executed. How does the script execution work if there’s the extra localhtlcsig? Is it dropped from the stack in some unspecified time in the future in time?
