stacks-network / sbtc-docs

Documentation about sBTC
https://stacks-network.github.io/sbtc-docs/
MIT License
9 stars 8 forks source link

Update commit-reveal docs with segwit aware version #70

Closed netrome closed 1 year ago

netrome commented 1 year ago

Currently, the reveal transaction in commit-reveal does not provide any information on the segwit version used to parse the script data. This means that anyone parsing a reveal transaction has to do a UTXO lookup to know how to interpret the witness data. However, we can easily solve this by adding a version byte to the OP_RETURN of the reveal transaction indicating which segwit version the witness data conforms to.

Definition of done

The commit-reveal specification is updated to enable parsing of witness data without looking up UTXOs