Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Use SelectChain in Environment::report_equivocation #9158

Open
andresilva opened this issue Jun 21, 2021 · 1 comment
Open

Use SelectChain in Environment::report_equivocation #9158

andresilva opened this issue Jun 21, 2021 · 1 comment
Labels
J0-enhancement An additional feature request. U3-nice_to_have Issue is worth doing eventually. Z4-involved Can be fixed by an expert coder with good knowledge of the codebase.

Comments

@andresilva
Copy link
Contributor

See #9154.
In order to do this both prevote_equivocation and precommit_equivocation need to become async functions. That's an involved change that will need to happen in https://github.com/paritytech/finality-grandpa.

@andresilva andresilva added J0-enhancement An additional feature request. U3-nice_to_have Issue is worth doing eventually. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. labels Jun 21, 2021
@andresilva
Copy link
Contributor Author

The current approach of using client.info().best_hash should not lead to correctness issues. We use this for two things:

  • Figuring out when the next authority set change happens. For this to return the correct result we only need to make sure that the given best block is a descendent of the latest finalized block. This is guaranteed by client.info() so using SelectChain would not change anything.
  • Submitting the equivocation report. For this to work correctly we only need to make sure that the given block hash is recent enough that state is available.

@andresilva andresilva added Z4-involved Can be fixed by an expert coder with good knowledge of the codebase. and removed Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. labels Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. U3-nice_to_have Issue is worth doing eventually. Z4-involved Can be fixed by an expert coder with good knowledge of the codebase.
Projects
None yet
Development

No branches or pull requests

1 participant