sigp / enr

Ethereum Node Record
MIT License
61 stars 29 forks source link

RLP buffer is not advanced after decoding #69

Closed DaniPopes closed 6 months ago

DaniPopes commented 6 months ago

In impl<K: EnrKey> alloy_rlp::Decodable for Enr<K>: https://github.com/sigp/enr/blob/83cd98990e7f191b310addb202869994a8f59c96/src/lib.rs#L978

The buffer reference is copied but it's not advanced after success

This makes reth tests fail: https://github.com/paradigmxyz/reth/blob/7ed23e213f0255ac4f8c73c29372671e3addf300/crates/net/discv4/src/proto.rs#L712

In this assertion: https://github.com/paradigmxyz/reth/blob/7ed23e213f0255ac4f8c73c29372671e3addf300/crates/net/discv4/src/proto.rs#L726