-
Notifications
You must be signed in to change notification settings - Fork 12
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
Qbft testing #128
Qbft testing #128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR! I especially like the support for several kinds of byzantine behaviour. Added some comments on details.
Thought again about the queue we are passing. I am not sure if |
@dknopik I was actually just planning on scrapping I think |
Well,
Alright! |
anchor/qbft_manager/src/lib.rs
Outdated
// Queue is full - drop message under constrained bandwidth | ||
warn!("Dropping QBFT message due to full queue: msg={:?}", msg); | ||
} | ||
Err(TrySendError::Closed(_)) => { | ||
// Channel closed - critical failure or shutdown | ||
error!("QBFT message channel closed - initiating shutdown"); | ||
// todo!() need some sort of shutdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more nitpick:
warn!(?msg, "Dropping QBFT message due to full queue");
And for the Err
case: a return
after the log should suffice here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit confused on the Err
case. Dont we need some explicit shutdown? Using return
here is the same as finishing normally with a implicit ()
. The instance will still be able to send messages and they will all hit the Closed case. The linter also says the return is unneeded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aaah, yeah of course, missed that we are inside a closure.
hm. let's leave it as is for now, the instance also quits if the input queue is closed, so it should be fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LVGTM
Issue Addressed
#98
Proposed Changes
This PR introduces a framework to provide end to end QBFT Tests. It allows the ability to run multiple instances at once and control the operational status of the nodes along with any byzantine behavior.
There are also a few bugfixes from issues that were discovered during testing.
Notes for clarity
cluster_members
was changed to aVec
as we need deterministic leader selection for testing and random ordering with theHashSet
did not allow for this.