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

Optimistic batch range sync failure penalizes innocent peer #6879

Open
dapplion opened this issue Jan 29, 2025 · 0 comments
Open

Optimistic batch range sync failure penalizes innocent peer #6879

dapplion opened this issue Jan 29, 2025 · 0 comments
Labels

Comments

@dapplion
Copy link
Collaborator

dapplion commented Jan 29, 2025

Range sync want to sync a chain of blocks from a peer which declares to known a block unknown to us. There should exist some intersection block which is the first unknown block given our current fork-choice. An optimal sync algorithm would sync only starting from the intersection block. BUT we don't know it..

Optimistic batch is an optimization that assumes that the intersection block is in the last epoch. It tries to sync the last epoch only, and if it fails it starts from current finalized. So failures are expected.

However we actually downscore peers for those failures

Jan 29 03:12:05.546 DEBG Sync reporting peer                     msg: faulty_batch, action: Low Tolerance Error, peer_id: 16Uiu2HAm6mGaKhbAuEvpeQiqkw86rDpcVQrCLPVbyYsHUHyXgHtw, service: sync
Jan 29 03:12:05.546 DEBG Rejected optimistic batch               reason: batch was invalid, epoch: 128, chain: 5365095180884896044, service: range_sync, service: sync
Jan 29 03:12:05.546 DEBG Peer score adjusted                     score: -10.00, peer_id: 16Uiu2HAm6mGaKhbAuEvpeQiqkw86rDpcVQrCLPVbyYsHUHyXgHtw, msg: faulty_batch, service: libp2p

The effects are not noticeable since it's a rare event that only happens once in a while. But we should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant