[go: up one dir, main page]

Tezlink/Kernel/OperationResult : Fix and test receipt encoding

Related to #8018

Linear issue

Closes L2-156.

What

This MR implements support for decoding and roundtripping Tezos operation metadata in the EVM kernel, and registers the associated encoding in PsRiotum, PtSeouLo, and Alpha protocols.

Why

Support for the operation_data_and_metadata encoding is required for decoding the full operation metadata structure, including receipts, in the l2node. This is necessary for compatibility with tezos protocol. Without it, deserialization of Tezos-compatible operation metadata fails.

How

  • Introduces a full implementation of OperationDataAndMetadata with encoding and decoding logic.
  • Refactors AppliedOperation in the kernel to use the new structure.
  • Adds VecEmpty and Empty placeholder types for partially supported Tezos fields (e.g., ticket_receipt, lazy_storage_diff) while ensuring roundtripping works.
  • Registers the operation_data_and_metadata_encoding under the RPC encoding registry in protocols PsRiotum, PtSeouLo, and Alpha.
  • Adds tests to validate compatibility with octez-codec serialized payloads.

Manually testing the MR

To test:

  1. Rebuild the kernel and protocols.
  2. Use octez-codec and check that the new encodings are registered.
  3. Run unit tests in tezos_tezlink_latest and tezos_execution to ensure roundtrip encoding/decoding and logic correctness.
# Run kernel unit tests
cd etherlink/kernel_latest/
cargo test
Edited by Raphaël Cauderlier

Merge request reports

Loading