Tezlink/Kernel/Receipts : Derive NomReader and BinWriter for (AppliedOperation,TezBlock,BalanceTooLow)
Related to !18493 (merged)
What
Refactors some Tezlink kernel types by introducing enc_wrappers to handle binary serialization of common primitives like BlockHash/OperationHash and BlockNumber.
Why
Unifies and simplifies the binary encoding/decoding of Tezos-related types, such as hashes and block numbers
How
- Introduced the
enc_wrappersmodule containing reusable wrapper types:-
HashforH256 -
BlockNumberforU256
-
- Replaced old
BlockHashdefinitions inoperation.rsandoperation_result.rswith unified types fromenc_wrappers. - Updated related test code and function logic to use these wrappers.
- Annotated structures like
TezBlockandAppliedOperationwith derive macros forBinWriterandNomReaderwhere applicable.
Manually testing the MR
Run existing Tezlink kernel unit tests:
cd etherlink/kernel_latest/tezos
cargo test
Edited by Brahima Dibassi