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

refactor: update/add committee data types (BFT-443) #163

Closed
wants to merge 2 commits into from

Conversation

moshababo
Copy link
Contributor

@moshababo moshababo commented Jul 28, 2024

What ❔

Adding minimally needed changes to support matter-labs/zksync-era#2518, as part of committees rotation (BFT-484).

  • Adding pop: validator::Signature (proof-of-possession) field to WeightedValidator.
  • Adding ValidatorCommittee & AttesterCommittee types to provide protobuf formatting for DB store.

Why ❔

These types cannot be placed in zksync_node_consensus because they are required by zksync_dal::consensus_dal, which is a dependency of zksync_node_consensus.

@moshababo moshababo marked this pull request as ready for review July 29, 2024 23:54
@@ -198,4 +198,9 @@ message AggregateSignature {
message WeightedValidator {
optional PublicKey key = 1; // required
optional uint64 weight = 2; // required
optional Signature proof_of_possession = 3; // optional
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I got confused for a moment: so here you are introducing the new types for committees which are not placed in the Genesis. Also, afaict these types are supposed to be used solely on the zksync-era side, in which case you should define them in zksync-era, not here.

Copy link
Contributor

Choose a reason for hiding this comment

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

let's discuss it on the standup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WeightedValidator is placed in Genesis (part of validator::Committee), that's why I thought it's fine to make it optional, as part of the rollout (although it's not ideal).

The list types (ValidatorCommittee, etc.) are indeed about introducing a new type which isn't part of Genesis. In addition, They're simpler types, minimal for (de)serializing for DB store (AFAIK a simpler, Vec<WeightedValidator> isn't viable in protobuf).

As for the location in the codebase, since it will eventually need to be also passed in-mem from zksync-era to era-consensus, placing it here makes sense. Otherwise, another (de)serialization will need to happen.

@moshababo
Copy link
Contributor Author

Closing in favor of not introducing cross-repo integration, and instead having matter-labs/zksync-era#2518 to add temporary data type clones.

@moshababo moshababo closed this Aug 4, 2024
@brunoffranca brunoffranca deleted the update_committee_types branch September 23, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants