babylonchain / babylon

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

Improve handling of parsing OP_RETURN data #694

Closed KonradStaniec closed 1 week ago

KonradStaniec commented 2 weeks 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: