babylonchain / babylon

Main repo for Babylon full node
https://babylonchain.io
Other
240 stars 171 forks source link

Improve handling of parsing OP_RETURN data #694

Closed KonradStaniec closed 4 months ago

KonradStaniec commented 4 months ago

Currently op_return data for checkpoints is parsed here: https://github.com/babylonchain/babylon/blob/dev/x/btccheckpoint/types/btcutils.go#L207

This function should clearly document that it works only for standard OP_RETRUN transactions, and return error in non standard transactions.

Standard op_return transactions: