You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let committed_blocks = read_committed_blocks_batch(
latest_valid_block_height + 1,
current_block.height,
&self.provider,
self.router_address,
)
.await?;
This is not correct because latest_valid_block_height is only height of block which has been processed last by this node. This does not means that this block is really on-chain now. Block which RPC stored with number latest_valid_block_height can be different block now. The same logic can be applied for any other height. So, latest_valid_block_height and any other height can be used only as some heuristic for optimisations to query information from RPC.
Possible Solution
Store committed blocks information as block meta in db, so this automatically solved the problem with long committed blocks access from RPC by deep sync, which should store this information in db.
The text was updated successfully, but these errors were encountered:
grishasobol
changed the title
ethexe: `` logic must not relay on block numbersethexe: get_last_committed_chain logic must not relay on block numbers
Dec 20, 2024
Problem
Here we define committed_blocks as:
gear/ethexe/observer/src/query.rs
Lines 234 to 240 in fc63d88
This is not correct because
latest_valid_block_height
is only height of block which has been processed last by this node. This does not means that this block is really on-chain now. Block which RPC stored with numberlatest_valid_block_height
can be different block now. The same logic can be applied for any other height. So,latest_valid_block_height
and any other height can be used only as some heuristic for optimisations to query information from RPC.Possible Solution
Store committed blocks information as block meta in db, so this automatically solved the problem with long committed blocks access from RPC by deep sync, which should store this information in db.
The text was updated successfully, but these errors were encountered: