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

grandpa: don't use block_on in Environment::report_equivocation #9154

Merged
3 commits merged into from
Jun 21, 2021

Conversation

andresilva
Copy link
Contributor

We can't actually use block_on because we already use it on the root future and it doesn't support recursive calls. Bug was introduced in #9128. Fixes paritytech/polkadot#3322.

@andresilva andresilva added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Jun 21, 2021
Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

LGTM

client/finality-grandpa/src/environment.rs Outdated Show resolved Hide resolved
@andresilva
Copy link
Contributor Author

I ran a local testnet with duplicate validators to generate an equivocation. Using this PR the panic is gone and the equivocation report was submitted successfully.

@andresilva
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Jun 21, 2021

Trying merge.

@ghost ghost merged commit df4a588 into master Jun 21, 2021
@ghost ghost deleted the andre/grandpa-environment-block-on branch June 21, 2021 16:02
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detected prevote equivocation in the finality worker
3 participants