-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat(code): Add polka certificates to VoteSync response #859
base: anca/temp_byzantine_proposer
Are you sure you want to change the base?
Conversation
/// The value that the Polka is for | ||
pub value_id: ValueId<Ctx>, | ||
/// The votes that make up the Polka | ||
pub votes: Vec<SignedVote<Ctx>>, |
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.
Right now I am just storing the votes like this, we can switch to an aggregated signature at a later stage if needed.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## anca/temp_byzantine_proposer #859 +/- ##
================================================================
- Coverage 83.06% 82.17% -0.89%
================================================================
Files 188 191 +3
Lines 16219 16601 +382
================================================================
+ Hits 13471 13641 +170
- Misses 2748 2960 +212
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Ignore the Rust / Standalone CI failure, it is expected because of the debug statements I added in the driver. |
Looks like I broke the Starknet tests, which is unexpected. |
f6b9dae
to
80556c4
Compare
…preceding one fails
if round_input == RoundInput::NoInput { | ||
return Ok(None); | ||
} | ||
|
||
self.apply_input(vote_round, round_input) | ||
} | ||
|
||
fn store_polka_certificate(&mut self, vote_round: Round, value_id: &ValueId<Ctx>) { |
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.
Ref:
pure def getCertificate(keeper: Bookkeeper, vkout: VoteKeeperOutput) : Certificate = |
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.
TODO: Check that the certificate we have constructed is valid.
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.
TODO: Rename this method to get_polka_certificate
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.
TODO: Move this method to the VoteKeeper
and only store the certificate in polka_certificates
here
@@ -216,6 +216,41 @@ where | |||
None | |||
} | |||
|
|||
pub(crate) fn store_and_multiplex_polka_certificate( |
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.
Ref:
pure def applyCertificate(keeper: Bookkeeper, certificate: Set[Vote], currentRound: Round): { bookkeeper: Bookkeeper, output: VoteKeeperOutput } = |
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.
Looking at the spec again, I believe this method is not correct. Instead of sending a ProposalAndPolkaCurrent
to the state machine, we should instead follow the same logic as the spec and override the votes in the vote keeper.
We should add the apply_certificate
method to the VoteKeeper
struct and implement that logic there.
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.
We can do that. But we can also store/ retrieve the certificate as you do here. In this case we also have to change multiplex_proposal()
and how we determine polka_current
and polka_previous
.
Note: The two relevant integration tests for this PR are:
They can be run with:
(Requires |
Hey @romac, I think it will be very useful if we add a description to this PR. As from what I understood it is not a bug fix but rather a change that should not only unstuck consensus in case of a Byzantine behavior observed 2nd scenario in #850 but also lead to the consensus decision. I can maybe help with writing this description but I need more context, for example where can I learn how vote sync works and when it is triggered? |
We do not have a spec for this yet, but the tracking issue for it has some background info: #576 Let me know if that helps, otherwise I can provide more details. |
Recall that we might need a Polka certificate for a previous round ( |
Bumps [prost](https://github.com/tokio-rs/prost) from 0.13.4 to 0.13.5. - [Release notes](https://github.com/tokio-rs/prost/releases) - [Changelog](https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md) - [Commits](tokio-rs/prost@v0.13.4...v0.13.5) --- updated-dependencies: - dependency-name: prost dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: Add detailed contributing informations * Code review * Fix
…#872) * feat(code): Applications now define their own configuration * Cleanup * Ignore unuspported tests * Fix unit tests * Fix init and testnet commands * Post-merge fixes * Override VoteSync mode from test params for Starknet test app * Update VoteSync tests * Re-instate `distributed-testnet` command for Starknet app * Embed discovery config directly in `MakeConfigSettings` * Cleanup
…e capacity (#878) * fix(code/engine): Use custom version of `OutputPort` with configurable capacity * Disallow use of ractor's output port
The @ancazamfir Can you give it a go when you have time and see if you see the same?
|
It's also surprising that the |
It passes for me, it was passing even when CI was failing it. I tried today again 10 times and was about to ask you to try it :) |
The test is not there yet. There are a few things:
|
No description provided.