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

verify warp justification #1553

Merged
merged 10 commits into from
Apr 10, 2023
Merged

verify warp justification #1553

merged 10 commits into from
Apr 10, 2023

Conversation

turuslan
Copy link
Contributor

@turuslan turuslan commented Mar 31, 2023

Referenced issues

Description of the Change

  • JustificationObserver::verifyJustification(GrandpaJustification, AuthoritySet) for warp sync stateless justification verification.
  • HasAuthoritySetChange returns ScheduledChange and ForcedChange (warp sync passes it to JustificationObserver::verifyJustification).
  • Remove unnecessary BlockInfo argument (duplicate of GrandpaJustification::block_info).
  • Remove Chain::isEqualOrDescendOf (same as hasAncestry).
  • Remove unused dependencies.
  • Add VoterSet::make(AuthoritySet) (deduplication).
  • Remove "has incomplete state sync" check (always false in BabeImpl::start).

Benefits

  • Verify justification for warp sync.

Possible Drawbacks

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Copy link
Contributor

@igor-egorov igor-egorov left a comment

Choose a reason for hiding this comment

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

Overall 👍

Declining only to confirm the change in application injector.

core/consensus/grandpa/voter_set.cpp Outdated Show resolved Hide resolved
core/consensus/grandpa/impl/voting_round_impl.hpp Outdated Show resolved Hide resolved
core/consensus/grandpa/impl/grandpa_impl.hpp Show resolved Hide resolved
core/injector/application_injector.cpp Outdated Show resolved Hide resolved
igor-egorov
igor-egorov previously approved these changes Mar 31, 2023
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from kamilsa March 31, 2023 14:13
@turuslan turuslan requested a review from xDimon April 3, 2023 06:22
core/consensus/grandpa/impl/voting_round_impl.cpp Outdated Show resolved Hide resolved
core/consensus/grandpa/impl/voting_round_impl.cpp Outdated Show resolved Hide resolved
core/consensus/grandpa/voter_set.cpp Outdated Show resolved Hide resolved
test/core/consensus/grandpa/vote_graph/fixture.hpp Outdated Show resolved Hide resolved
core/consensus/grandpa/ancestry_verifier.hpp Show resolved Hide resolved
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan merged commit 143bb99 into master Apr 10, 2023
@turuslan turuslan deleted the warp/verify branch April 10, 2023 11:01
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.

4 participants