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

Add standalone check-quorum-intersection command #4097

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

bboston7
Copy link
Contributor

Description

Resolves #4062

This change adds a command check-quorum-intersection that takes a JSON file produced by the quorum endpoint and checks whether it enjoys a quorum intersection.

Most of the change centers around reading JSON in, but this change also required refactoring QuorumIntersectionChecker to use a map from NodeID to SCPQuorumSetPtr instead of a map from NodeID to NodeInfo, as the intersection checking only relies on the mQuorumSet field of a QuorumMap and the JSON input does not contain everything in NodeInfo.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

src/main/CommandLine.cpp Outdated Show resolved Hide resolved
src/scp/SCPDriver.cpp Outdated Show resolved Hide resolved
src/main/test/ApplicationUtilsTests.cpp Show resolved Hide resolved
Copy link
Contributor

@marta-lokhova marta-lokhova left a comment

Choose a reason for hiding this comment

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

Looks great overall, thank you! Just a few minor suggestions. Also, please squash the commits so we can merge.

Closes stellar#4062

This change adds a command `check-quorum-intersection` that takes a JSON
file produced by the `quorum` endpoint and checks whether it enjoys a
quorum intersection.

Most of the change centers around reading JSON in, but this change also
required refactoring `QuorumIntersectionChecker` to use a map from
`NodeID` to `SCPQuorumSetPtr` instead of a map from `NodeID` to
`NodeInfo`, as the intersection checking only relies on the `mQuorumSet`
field of a `QuorumMap` and the JSON input does not contain everything in
`NodeInfo`.
@bboston7
Copy link
Contributor Author

This is rebased, squashed, and ready to merge!

@marta-lokhova
Copy link
Contributor

r+ a93dfe6

@latobarita latobarita merged commit 778a00c into stellar:master Dec 22, 2023
15 checks passed
@bboston7 bboston7 deleted the quorum-intersection branch December 22, 2023 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider exposing quorum intersection as a standalone command
4 participants