lambdaclass / ethereum_rust

Lambda Ethereum Rust Execution client
Apache License 2.0
122 stars 9 forks source link

Review if `eth_getBlockByNumber` should return non-canonial blocks #589

Open mpaulucci opened 2 days ago

mpaulucci commented 2 days ago

See this discussion: https://github.com/lambdaclass/ethereum_rust/pull/571/files#r1778873779

It seems we should not return blocks that haven't been set as canonical, but some hive tests seem to rely on it.

Arkenan commented 1 day ago

If we are constructing the block ourselves for proposal, I would assume that is canonical at the time of construction. The get_block_by_number does not have any meaning if the block is not canonical.

I'll check with the specs and if not specified, with implementations.

mpaulucci commented 1 day ago

We should look into how geth does it.