Skip to content

[Merged by Bors] - do not count sync batch attempts when peer is not at fault#3245

Closed
divagant-martian wants to merge 2 commits intosigp:unstablefrom
divagant-martian:improve-sync-attempts-management
Closed

[Merged by Bors] - do not count sync batch attempts when peer is not at fault#3245
divagant-martian wants to merge 2 commits intosigp:unstablefrom
divagant-martian:improve-sync-attempts-management

Conversation

@divagant-martian
Copy link
Copy Markdown
Contributor

@divagant-martian divagant-martian commented Jun 6, 2022

Issue Addressed

currently we count a failed attempt for a syncing chain even if the peer is not at fault. This makes us do more work if the chain fails, and heavily penalize peers, when we can simply retry. Inspired by a proposal I made to #3094

Proposed Changes

If a batch fails but the peer is not at fault, do not count the attempt
Also removes some annoying logs

Additional Info

We still get a counter on ignored attempts.. just in case

@divagant-martian divagant-martian changed the title do not count attempts when peer is not at fault do not count sync batch attempts when peer is not at fault Jun 6, 2022
Copy link
Copy Markdown
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Remove those chatty logs :)

@AgeManning
Copy link
Copy Markdown
Member

bors r+

@michaelsproul michaelsproul added the ready-for-merge This PR is ready to merge. label Jun 7, 2022
bors bot pushed a commit that referenced this pull request Jun 7, 2022
## Issue Addressed
currently we count a failed attempt for a syncing chain even if the peer is not at fault. This makes us do more work if the chain fails, and heavily penalize peers, when we can simply retry. Inspired by a proposal I made to #3094 

## Proposed Changes
If a batch fails but the peer is not at fault, do not count the attempt
Also removes some annoying logs

## Additional Info
We still get a counter on ignored attempts.. just in case
@bors bors bot changed the title do not count sync batch attempts when peer is not at fault [Merged by Bors] - do not count sync batch attempts when peer is not at fault Jun 7, 2022
@bors bors bot closed this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Networking ready-for-merge This PR is ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants