Skip to content

Commit

Permalink
Merge branch 'main' into bft-474-batch-vote-publish-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoffranca authored Jul 8, 2024
2 parents bbb9394 + 96e5e69 commit 35f6cb2
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 60 deletions.
24 changes: 12 additions & 12 deletions node/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,26 @@ resolver = "2"
edition = "2021"
authors = ["The Matter Labs Team <[email protected]>"]
homepage = "https://matter-labs.io/"
license = "MIT"
version = "0.1.0"
repository = "https://github.com/matter-labs/era-consensus"
license = "MIT OR Apache-2.0"
keywords = ["blockchain", "zksync"]
version = "0.1.0-rc.1"

[workspace.dependencies]
# Crates from this repo.
zksync_consensus_bft = { path = "actors/bft" }
zksync_consensus_crypto = { path = "libs/crypto" }
zksync_consensus_executor = { path = "actors/executor" }
zksync_consensus_network = { path = "actors/network" }
zksync_consensus_roles = { path = "libs/roles" }
zksync_consensus_storage = { path = "libs/storage" }
zksync_consensus_tools = { path = "tools" }
zksync_consensus_utils = { path = "libs/utils" }
zksync_consensus_bft = { version = "=0.1.0-rc.1", path = "actors/bft" }
zksync_consensus_crypto = { version = "=0.1.0-rc.1", path = "libs/crypto" }
zksync_consensus_executor = { version = "=0.1.0-rc.1", path = "actors/executor" }
zksync_consensus_network = { version = "=0.1.0-rc.1", path = "actors/network" }
zksync_consensus_roles = { version = "=0.1.0-rc.1", path = "libs/roles" }
zksync_consensus_storage = { version = "=0.1.0-rc.1", path = "libs/storage" }
zksync_consensus_tools = { version = "=0.1.0-rc.1", path = "tools" }
zksync_consensus_utils = { version = "=0.1.0-rc.1", path = "libs/utils" }

# Crates from this repo that might become independent in the future.
zksync_concurrency = { path = "libs/concurrency" }
zksync_protobuf = { path = "libs/protobuf" }
zksync_protobuf_build = { path = "libs/protobuf_build" }
zksync_concurrency = { version = "=0.1.0-rc.1", path = "libs/concurrency" }
zksync_protobuf = { version = "=0.1.0-rc.1", path = "libs/protobuf" }
zksync_protobuf_build = { version = "=0.1.0-rc.1", path = "libs/protobuf_build" }

# Crates from Matter Labs.
pairing = { package = "pairing_ce", version = "=0.28.6" }
Expand Down
2 changes: 2 additions & 0 deletions node/actors/bft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
zksync_concurrency.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/actors/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
zksync_concurrency.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/actors/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
zksync_concurrency.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/libs/concurrency/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
anyhow.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/libs/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
anyhow.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/libs/protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
links = "zksync_protobuf_proto"

[dependencies]
Expand Down
2 changes: 2 additions & 0 deletions node/libs/protobuf_build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
anyhow.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/libs/roles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
links = "zksync_consensus_roles_proto"

[dependencies]
Expand Down
2 changes: 2 additions & 0 deletions node/libs/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
zksync_concurrency.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/libs/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true

[dependencies]
zksync_concurrency.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions node/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
publish = false

[dependencies]
zksync_consensus_tools.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions node/tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ edition.workspace = true
authors.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
default-run = "executor"

[dependencies]
Expand Down
8 changes: 4 additions & 4 deletions spec/informal-spec/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn on_proposal(self, proposal: Proposal) {
match proposal.justification {
Commit(qc) => self.process_commit_qc(Some(qc)),
Timeout(qc) => {
self.process_commit_qc(qc.high_qc());
self.process_commit_qc(qc.high_commit_qc);
self.high_timeout_qc = max(Some(qc), self.high_timeout_qc);
}
};
Expand All @@ -177,7 +177,7 @@ fn on_proposal(self, proposal: Proposal) {
// Processed an (already verified) commit_qc received from the network
// as part of some message. It bumps the local high_commit_qc and if
// we have the proposal corresponding to this qc, we append it to the committed_blocks.
fn process_commit_qc(self, qc_opt: Option[CommitQC]) {
fn process_commit_qc(self, qc_opt: Option<CommitQC>) {
if let Some(qc) = qc_opt {
self.high_commit_qc = max(Some(qc), self.high_commit_qc);
let Some(block) = self.cached_proposals.get((qc.vote.block_number,qc.vote.block_hash)) else { return };
Expand Down Expand Up @@ -218,7 +218,7 @@ fn on_timeout(self, sig_vote: SignedTimeoutVote) {

// Check if we now have a timeout QC for this view.
if let Some(qc) = self.get_timeout_qc(sig_vote.view()) {
self.process_commit_qc(qc.high_qc());
self.process_commit_qc(qc.high_commit_qc);
self.high_timeout_qc = max(Some(qc), self.high_timeout_qc);
self.start_new_view(sig_vote.view() + 1);
}
Expand All @@ -235,7 +235,7 @@ fn on_new_view(self, new_view: NewView) {
match new_view.justification {
Commit(qc) => self.process_commit_qc(Some(qc)),
Timeout(qc) => {
self.process_commit_qc(qc.high_qc());
self.process_commit_qc(qc.high_commit_qc);
self.high_timeout_qc = max(Some(qc), self.high_timeout_qc);
}
};
Expand Down
Loading

0 comments on commit 35f6cb2

Please sign in to comment.