Kernel/SDK: add support for the DalAttestedSlots message type
This commit adds support for the new Dal_attested_slots internal inbox message type, to be introduced in !20140, to the Rust Kernel SDK, enabling smart rollup kernels to parse and handle DAL attestation information from L1.
Main changes:
- A new
DalAttestedSlotsstruct - Addded manual
nom_readandBinWriterimplementations for DalAttestedSlots Why: The binary encoding follows the OCaml protocol's format - a 4-byte int32 for published_level, followed by a length-prefixed sequence of (public_key_hash, length-prefixed slot indices) pairs. - Replaced derive macros with manual
NomReaderandBinWriterforInternalInboxMessagebecauseDalAttestedSlotsvariant uses tag 5, but tag 4 is reserved forProtocol_migration(which does not seem to be used in kernels). The derive macros would assign sequential tags (0, 1, 2, 3, 4), but we need to skip tag 4. Manual implementation allows explicit tag assignment.
Summary by CodeRabbit
Release Notes
-
New Features
- Added support for DAL attested slots, enabling the system to track and process data availability attestations from multiple publishers.
- Extended internal messaging infrastructure to support DAL slot attestation data.
-
Tests
- Added comprehensive test coverage for DAL attested slots serialization and deserialization operations.
Edited by CodeRabbit