paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.99k stars 1.22k forks source link

chore(sdk): Add `NodePrimitives::BlockHeader` and `NodePrimitives::BlockBody` #12647

Closed emhane closed 23 hours ago

emhane commented 3 days ago

Based on https://github.com/paradigmxyz/reth/pull/12683

Ref https://github.com/paradigmxyz/reth/issues/12358

emhane commented 3 days ago

hmm, why do we need this if the header and body type are already defined in the block type?

it makes it a lot easier to access the header type...one could argue the same about signed transaction too otherwise

mattsse commented 3 days ago

I suspect this would make things harder when enforcing bounds because then we need to restrict Header to Block::Header.

don't think we should do this

emhane commented 3 days ago

I suspect this would make things harder when enforcing bounds because then we need to restrict Header to Block::Header.

don't think we should do this

we have the same problem with signed tx, must be restricted to Self::Block: Block<Body: Body<Transaction: Self::SignedTx>>

@mattsse

emhane commented 2 days ago

I don't see why this is a problem when NetworkPrimitives does this exactly...

emhane commented 2 days ago

can't figure out what's wrong with the features here https://github.com/paradigmxyz/reth/actions/runs/11921032967/job/33224297145?pr=12647