Open pedrohba1 opened 8 months ago
Total difficulty is not an actual field of the header structure unlike difficulty
which is an actual field of the header structure. Execution clients calculate the total difficulty in memory as they process all of the headers from genesis to latest. Given that portal clients do operate in a similar fashion, there is no straightforward way to calculate the total difficulty for a given height. This is a problem that will need to be solved once we turn our attention to supporting eth_*
jsonrpc endpoints. Off the top of my head, I can't recall, but I do remember some proposals for how to achieve this, given a portal client's unique architecture. However, this is not a priority at the moment.
Other block header structs have this field called
total_difficulty
. Can it be added to theHeader
in/src/types/execution/header.rs
?