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

Polite GRANDPA #2505

Open
danforbes opened this issue Apr 28, 2022 · 2 comments
Open

Polite GRANDPA #2505

danforbes opened this issue Apr 28, 2022 · 2 comments
Labels
Epic Issue used to track development status of a complex feature, aggregates several issues S-grandpa issues related to block finality.

Comments

@danforbes
Copy link
Contributor

Task summary

  • Implement "polite GRANDPA" in Gossamer. Polite GRANDPA is a mechanism that allows participants in the GRANDPA protocol to score one another in order allow participants to prefer certain peers over others. Per @qdm12, per a conversation with Andre at Parity:
    • It's impolite to get a message for a round > state round + 1
    • It's impolite to get a message for a round < state round - 1
    • Message signature verification fails
    • Any other validation failure due to the message being malformed.
    • The relevant Gossamer function is validateVoteMessage in lib/grandpa/vote_message.go

Specification reference

@jimjbrettj
Copy link
Contributor

Upon investigating we found these relevant parts of the grandpa package:

We think it will be useful to have a similar misbehavior function where we can calculate the costs based on the type of misbehavior within grandpa.

We will also create a README (or some other doc) to more clearly document reporting for polite grandpa.

@jimjbrettj
Copy link
Contributor

The list of tasks involved in this issue will be split between @EclesioMeloJunior and myself. The plan currently is to work together to develop the framework for handling reporting and then to divide and conquer implementing each specific behavior. This will involve finding all cases where this behavior is to be reported and handling it as well as adding to the documentation details about the behavior and where it is used.

  • Create README to document how polite grandpa reporting works (possibly to be published somewhere since current documentation is very poor)
  • Create a framework for handling reporting for polite grandpa within the grandpa package. This includes defining the costs as well as the misbehavior function.
  • PAST_REJECTION
  • BAD_SIGNATURE
  • MALFORMED_CATCH_UP
  • MALFORMED_COMMIT
  • FUTURE_MESSAGE
  • UNKNOWN_VOTER
  • INVALID_VIEW_CHANGE
  • PER_UNDECODABLE_BYTE
  • PER_SIGNATURE_CHECKED
  • PER_BLOCK_LOADED
  • INVALID_CATCH_UP
  • INVALID_COMMIT
  • OUT_OF_SCOPE_MESSAGE
  • CATCH_UP_REQUEST_TIMEOUT
  • CATCH_UP_REPLY
  • HONEST_OUT_OF_SCOPE_CATCH_UP
  • NEIGHBOR_MESSAGE
  • ROUND_MESSAGE
  • BASIC_VALIDATED_CATCH_UP
  • BASIC_VALIDATED_COMMIT
  • PER_EQUIVOCATION

@jimjbrettj jimjbrettj self-assigned this Sep 9, 2022
@EclesioMeloJunior EclesioMeloJunior added the Epic Issue used to track development status of a complex feature, aggregates several issues label Sep 28, 2022
@timwu20 timwu20 self-assigned this Jan 5, 2023
@EclesioMeloJunior EclesioMeloJunior removed their assignment Nov 27, 2023
@P1sar P1sar added the S-grandpa issues related to block finality. label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Issue used to track development status of a complex feature, aggregates several issues S-grandpa issues related to block finality.
Projects
None yet
Development

No branches or pull requests

5 participants