bips
bips copied to clipboard
BIP 345: Fix OP_VAULT_RECOVER specification for the recovery-sPK-hash
The recovery scriptPubKey needs to be prefixed with its CompactSize-encoded length when computing the sPK hash.
I verified this by:
- Checking the functional tests, where
recovery_spk_tagged_hash()is implemented usingser_string()which adds the CompactSize-encoded length prefix - Using an implementation in Minsc to construct a transaction spending using
OP_VAULT_RECOVERand broadcasting it to mutinynet (see line 2 for the recovery sPK hash computation) - Checking with @jamesob
Alternatively, the implementation could be amended to match the current specification and drop the length prefix. Since this is committing to a single element, the length isn't really necessary.
cc @jamesob for feedback
Given that BIP 345 was withdrawn: @jamesob and @shesek, Is this pull request still relevant or should it be closed?
Looks good to me - doesn't hurt to keep updated.