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

client: AccountFetcher Crashes when Receiving a Rejection from an Unsynced Peer #3221

Open
scorbajio opened this issue Jan 9, 2024 · 0 comments

Comments

@scorbajio
Copy link
Contributor

Currently, when the EthereumJS client requests accounts using the snap sync getAccountRange API call from a Geth client that is not yet synced, it crashes when handling the rejection response:

[01-05|18:29:15] INFO -----------------------------------
[01-05|18:29:15] INFO Snapsync: running accountFetch=true 
[01-05|18:29:15] INFO -----------------------------------
TypeError: Cannot read properties of undefined (reading 'hash')
    at AccountFetcher.verifyRangeProof (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/client/dist/src/sync/fetcher/accountfetcher.js:161:109)
    at AccountFetcher.request (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/client/dist/src/sync/fetcher/accountfetcher.js:240:52)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-01-06T01:29:15.814Z client:AccountFetcher Failure - Re-enqueuing job index=1 origin=0x0041…c6a7 limit=0x0083…8d4d from peer id=98169dcc (error: Error: InvalidAccountRange: TypeError: Cannot read properties of undefined (reading 'hash')).

The AccountFetcher and other snap sync fetchers should be able provide a custom error message instead of crashing.

@scorbajio scorbajio changed the title client: Snap Sync Crashes when Receiving a Rejection from an Unsynced Peer client: AccountFetcher Crashes when Receiving a Rejection from an Unsynced Peer Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant