Bincode support for ExExNotification
#11170
Labels
A-exex
Execution Extensions
A-sdk
Related to reth's use as a library
C-enhancement
New feature or request
D-good-first-issue
Nice and easy! A great choice to get started
Describe the feature
Blocked by alloy-rs/alloy#1349
Problem
Alloy has a bunch of structs that use
#[serde(skip*)]
attributes. This attributes isn't supported in bincode, as well as in rmp-serde.Unfortunately, It means that we cannot serialize/deserialize
ExExNotification
using these formats.Solution
Introduce helper serde modules for those structs that are downstream from
ExExNotification
and have#[serde(skip*)]
attributes on fields and remove those attributes. Modules should be similar to https://github.com/alloy-rs/alloy/blob/5c7470c113df23a625456413bdf8c87e0b7438bc/crates/rpc-types-beacon/src/payload.rs#L275-L298Then, these modules should be used in structs that have problematic types as fields. For example, for the
Block
type we will need to use a#[serde_as]
on theBlock
struct and#[serde_as(as = "HeaderBincode")]
on theheader
fieldreth/crates/primitives/src/block.rs
Lines 34 to 37 in 4da5f1f
Both of the attributes should be gated by the
serde-bincode
feature.The types that need special handling are:
ExExNotification
Chain
SealedBlockWithSenders
SealedBlock
SealedHeader
BlockBody
TransactionSigned
Transaction
As a test, we should be able to serialize and deserialize the
ExExNotification
struct usingbincode
.Additional context
No response
The text was updated successfully, but these errors were encountered: