ethereum / trin

An Ethereum portal client: a json-rpc server with nearly instant sync, and low CPU & storage usage
347 stars 105 forks source link

State: `StateValidator` should verify that content belongs to the canonical chain #1305

Open morph-dev opened 1 month ago

morph-dev commented 1 month ago

At the moment, our StateValidator doesn't verify that content value is part of the canonical chain.

The StateContentValue contains the block_hash that we should use to fetch block header. We should also verify that received header is part of the canonical chain.

From header we can get the state_root which is enough to use with the trie proof (which is already implemented).