EIP-6110: pubkey ++ withdrawal_credentials ++ amount ++ signature ++ index
Solution
I decided to simply implement Encodable7685 and Decodable7685 for each request type, and for the Request enum wrapper in alloy-consensus, I defer to these implementations.
Motivation
In devnet 4, the current request encoding scheme is replaced with a flat encoding scheme, i.e. no rlp involved.
The request payloads (i.e. bytes following the request type byte) are now encoded as follows:
source_address ++ source_pubkey ++ target_pubkey
source_address ++ validator_pubkey ++ amount
pubkey ++ withdrawal_credentials ++ amount ++ signature ++ index
Solution
I decided to simply implement
Encodable7685
andDecodable7685
for each request type, and for theRequest
enum wrapper inalloy-consensus
, I defer to these implementations.Closes https://github.com/alloy-rs/alloy/issues/1338
PR Checklist