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

fix: future end block causes error #1286

Open
kyscott18 opened this issue Nov 26, 2024 · 0 comments
Open

fix: future end block causes error #1286

kyscott18 opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
A: Sync engine Area: Sync engine Good first issue Good for newcomers T: Bug Type: Bug

Comments

@kyscott18
Copy link
Collaborator

Description

Ponder allows for passing an end block that is greater than the current chain head. However, when this happens the end block is incorrectly requested. Requesting a block in the futures causes a "not found" error.

const [remoteChainId, startBlock, endBlock, latestBlock] = await Promise.all([
requestQueue.request({ method: "eth_chainId" }),
_eth_getBlockByNumber(requestQueue, { blockNumber: start }),
end === undefined
? undefined
: _eth_getBlockByNumber(requestQueue, { blockNumber: end }),
_eth_getBlockByNumber(requestQueue, { blockTag: "latest" }),
]);

Solving this will require an update to the checkpointing logic (getChainCheckpoint + getOmnichainCheckpoint)

@kyscott18 kyscott18 added Good first issue Good for newcomers T: Bug Type: Bug A: Sync engine Area: Sync engine labels Nov 26, 2024
@khaidarkairbek khaidarkairbek self-assigned this Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Sync engine Area: Sync engine Good first issue Good for newcomers T: Bug Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants