Closed Gnappuraz closed 5 years ago
BTW what are the plans to move esperanza tx to witness style?
@scravy Yes there are but my plan is to do it in two steps, the first creates the opcode, the seconds makes it witness compatible (we need the opcode implemented even with the witness).
ConceptACK 2d2ac44fb8b23437a95fd9b4c310de9daecc7be6
Currently the scriptPubKey used for commits (deposit, vote, slash and logout) are basically not implemented, but the validation of the script is skipped. This for example allows for anybody to craft a transaction that spends a vote from a finalizer.
Currently commits use the
PayVoteSlashScript
as follows:but
OP_CHECKVOTESIG
andOP_SLASHABLE
execution is just skipped and never checked, the only validation logic in place makes sure that commits contain a script of this shape.This PR introduces a new opcode
OP_CHECKCOMMIT
and removesOP_CHECKVOTESIG
andOP_SLASHABLE
. The new opcode behaves differently depending on the type of transaction spending the script. The PR also streamlines the script, now calledCommitScript
This script format is also about 40% shorter then the previous (103 bytes to 64).