Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ethexe: get_last_committed_chain logic must not relay on block numbers #4415

Open
grishasobol opened this issue Dec 20, 2024 · 0 comments
Open
Labels
C0-bug Something isn't working P1-asap High priority

Comments

@grishasobol
Copy link
Member

grishasobol commented Dec 20, 2024

Problem

Here we define committed_blocks as:

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.

@grishasobol grishasobol added C0-bug Something isn't working P1-asap High priority labels Dec 20, 2024
@grishasobol grishasobol changed the title ethexe: `` logic must not relay on block numbers ethexe: get_last_committed_chain logic must not relay on block numbers Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C0-bug Something isn't working P1-asap High priority
Projects
None yet
Development

No branches or pull requests

1 participant