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

ETCM-370: Refine responses validation on block fetcher side #993

Merged
merged 1 commit into from
May 28, 2021

Conversation

AnastasiiaL
Copy link
Contributor

Currently BlockFetcher performs bunch of validations on received responses but then it doesn't blacklist peer even if the response is clearly invalid.

The goal of this PR is to:

  • refine validations performed in block fetcher
  • restructure validation errors into proper error hierarchy (currently they are just strings)
  • restore blacklisting, but make it depend on error returned (e.g. it's important to check whether received headers are forming chain with ones already enqueued but it should not result with blacklist, on the other hand if received headers are not forming chain themselves - it's clearly wrong response and it's worth blacklisting peer, who provided it)
  • restore and extend test cases for blacklisting behaviour in Regular Sync

@AnastasiiaL AnastasiiaL changed the title WIP: ETCM-370: Refine responses validation on block fetcher side ETCM-370: Refine responses validation on block fetcher side May 20, 2021
Copy link
Contributor

@leo-bogastry leo-bogastry left a comment

Choose a reason for hiding this comment

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

Nice PR description 👍

@AnastasiiaL AnastasiiaL merged commit 6b3dc24 into develop May 28, 2021
@AnastasiiaL AnastasiiaL deleted the ETCM-370 branch May 28, 2021 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants