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

implementing MVBA protocol #85

Merged
merged 27 commits into from Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f295c12
vcbc: adding validation predicated
b00f Dec 13, 2022
6a75d37
feat(vcbc): defining proposal
b00f Dec 13, 2022
9aa8605
fix: clippy and format issues
b00f Dec 13, 2022
7339703
fix(mvba): removing old code
b00f Dec 13, 2022
d8d5216
feat(mvba): introducing outgoing type
b00f Dec 14, 2022
eb4c2a3
refactor(mvba): moving id to bundle
b00f Dec 15, 2022
ce285bd
chore: fixing imports
b00f Dec 15, 2022
57f35a8
chore: resolving the conflicts
b00f Dec 19, 2022
d7b44cc
test: fixing broken tests after resolving the conflicts
b00f Dec 19, 2022
71d80af
feat(mvba): implementing Protocol VBA for multi-valued validated Byza…
b00f Dec 20, 2022
452b7df
fix: integrating consensus protocols
b00f Dec 21, 2022
3917a02
fix: fixing tests, clippy and fmt issues
b00f Dec 21, 2022
54ab0b0
fix: fixing clippy issues
b00f Dec 21, 2022
42fb340
test(mvba): adding tests for MVBA protocol
b00f Dec 22, 2022
f3de8ad
feat(vcbc): implementing c-request and c-answer messages
b00f Jan 10, 2023
d1fe112
fix(mvba): improving the protocol by replacing the proposal by its di…
b00f Jan 11, 2023
d52f9a9
fix(abba): adding proposer ID for messages
b00f Jan 12, 2023
443d283
fix: adding target to the bundle
b00f Jan 12, 2023
a0cc460
test: adding random test for the consensus
b00f Jan 16, 2023
561c06c
fix: make sure the the honest parties won't double vote
b00f Jan 17, 2023
de476d3
fix(abba): fix consensus failure by adding check for justification in…
b00f Jan 18, 2023
b69d7d9
Update src/mvba/mvba/mod.rs
b00f Jan 23, 2023
43eec65
Update src/mvba/broadcaster.rs
b00f Jan 23, 2023
b57219d
Update src/mvba/abba/mod.rs
b00f Jan 23, 2023
557d4f5
fix: returning option for the decided value, rather than unwrap it
b00f Jan 23, 2023
bfb2398
fix: some coments for unsynced messages
b00f Jan 23, 2023
9d701d7
fix: fixing conflict decisions by halting consensus on True agreement
b00f Jan 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/mvba/abba/message.rs
@@ -1,6 +1,8 @@
use blsttc::{Signature, SignatureShare};
use serde::{Deserialize, Serialize};

use crate::mvba::{hash::Hash32, NodeId};

#[derive(Debug, Clone, Copy, Serialize, Deserialize, Eq, PartialEq)]
pub enum Value {
One,
Expand All @@ -25,11 +27,12 @@ impl MainVoteValue {

#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)]
pub enum PreVoteJustification {
// Round one, without the justification. The initial value should set to zero
// Round one without the justification. The initial value should set to zero
FirstRoundZero,
// Round one, with the justification. The initial value should set to one
// The justification is `c-final` message of the VCBC protocol.
FirstRoundOne(crate::mvba::vcbc::message::Message),
// with the weak validity. The initial value should set to one
// The justification is a `c-final` signature of the VCBC protocol for this tuple:
// `(id, proposer, 0, "c-ready", digest)`
WithValidity(Hash32, Signature),
// In Round r > 1, justification is either hard,...
Hard(Signature),
// ... or soft (refer to the spec)
Expand Down Expand Up @@ -63,7 +66,7 @@ pub struct MainVoteAction {
#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)]
pub struct DecisionAction {
pub round: usize,
pub value: MainVoteValue,
pub value: Value,
pub sig: Signature,
}

Expand All @@ -76,7 +79,8 @@ pub enum Action {

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Message {
pub id: String,
pub id: String, // this is same as $id$ in spec
pub proposer: NodeId, // this is same as $j$ or $a$ in spec
pub action: Action,
}

Expand Down
380 changes: 196 additions & 184 deletions src/mvba/abba/mod.rs

Large diffs are not rendered by default.