-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(consensus): Add consensus protocol versioning #3720
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67acdd6
to
6305387
Compare
core/lib/dal/migrations/20250314155250_consensus_versioning.up.sql
Outdated
Show resolved
Hide resolved
perekopskiy
approved these changes
Mar 25, 2025
Detected VM performance changes
|
perekopskiy
approved these changes
Mar 25, 2025
hatemosphere
approved these changes
Mar 25, 2025
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.
approving only changes in CI
This was referenced Mar 25, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 27, 2025
🤖 I have created a release *beep* *boop* --- ## [27.1.0](core-v27.0.0...core-v27.1.0) (2025-03-27) ### Features * **consensus:** Add consensus protocol versioning ([#3720](#3720)) ([d1b4308](d1b4308)) * **zkos:** Implement ZK OS tree manager ([#3730](#3730)) ([efc0007](efc0007)) ### Bug Fixes * **api:** Fix panic applying nonce override ([#3748](#3748)) ([944059b](944059b)) * **contract_verifier:** order deploy events in `get_contract_info_for_verification` ([#3766](#3766)) ([6e3c031](6e3c031)) * make proof data handler backwards compatible ([#3767](#3767)) ([bdbbaaa](bdbbaaa)) * **proof_data_handler:** update save_proof_artifacts_metadata UPDATE ([#3758](#3758)) ([ed4926f](ed4926f)) * **vm:** Fix VM divergence in revert data ([#3570](#3570)) ([b82e2e4](b82e2e4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 1, 2025
🤖 I have created a release *beep* *boop* --- ## [20.0.0](prover-v19.0.0...prover-v20.0.0) (2025-04-01) ### ⚠ BREAKING CHANGES * Remove old prover stack ([#3729](#3729)) * V27 update ([#3580](#3580)) ### Features * Add S3 implementation for object_store ([#3664](#3664)) ([a848927](a848927)) * **consensus:** Add consensus protocol versioning ([#3720](#3720)) ([d1b4308](d1b4308)) * **gateway:** Migration to Gateway ([#3654](#3654)) ([2858ba0](2858ba0)) * Remove old prover stack ([#3729](#3729)) ([fbbdc76](fbbdc76)) * Use JSON-RPC for core <> prover interaction ([#3626](#3626)) ([4e74730](4e74730)) * V27 update ([#3580](#3580)) ([9e18550](9e18550)) ### Bug Fixes * API URL for prover gateway ([#3716](#3716)) ([ca2c4a4](ca2c4a4)) * make proof data handler backwards compatible ([#3767](#3767)) ([bdbbaaa](bdbbaaa)) * Prover job ordering ([#3738](#3738)) ([8f7f831](8f7f831)) * **prover:** Fixing shutdown time for circuit-prover ([#3768](#3768)) ([6c9de26](6c9de26)) * **prover:** Reevaluation of 'heavy' jobs for WVG ([#3754](#3754)) ([2a8d33b](2a8d33b)) * **prover:** Remove deleted pods from autoscaler-agent cluster cache ([#3739](#3739)) ([e94985f](e94985f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <147085853+zksync-era-bot@users.noreply.github.com> Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
6 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 6, 2025
…mmittee rotation (#3775) ## What ❔ It introduces some code necessary for validator committee rotation. This doesn't enable that functionality yet as we still need the new consensus registry contract to be merged (matter-labs/era-contracts#1365) and also change to matter-labs/era-consensus. A future PR will integrate those changes and enable it. It deprecates almost all the code related to the attester role. Since ZK OS won't have L1 batches, this role won't be needed in the future. Plus, if we decide to do L1 consensus verification before ZK OS, it's simpler to just do an operator multisig (the functionality is reduced but it's a temporary solution anyway). It also deprecates the genesis column in the consensus_replica_state Postgres table. Storing genesis has been deprecated in favor of storing global config a long time ago. #3720 already removed all code related to it, this completes the deprecation by removing the column. My next PR will remove the attester method from ZK Stack CLI. I'll do it in a separate PR since this one is already somewhat large and ZK Stack CLI changes are best reviewed by someone familiar with it. Part of PLA-1112 and PLA-1113 ## Why ❔ It prepares the repo for validator committee rotation, which is the ability to change the validator set by interacting with a L2 smart contract (the consensus registry). This then enables staking, all being required after it is a contract that handles the staking UI and updates the validator set on the consensus registry. ## Is this a breaking change? - [X] Yes - [ ] No Technically, yes. Any chain that has a working attester set will stop attesting batches, but nothing else will break. ## Operational changes On the consensus config of the main node, the attesters field should be removed. Not removing it won't break anything, the field will just be ignored by protobuf. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
zkzoomer
pushed a commit
that referenced
this pull request
Jun 21, 2025
## What ❔ It makes some necessary changes to allow supporting multiple consensus protocol versions. Most of the changes are on the era-consensus side (which this PR updates to v0.9). On the zksync-era side, I changed the DB to store versioned block certificates. This PR also removes the genesis column on the consensus_replica_state table since that was deprecated a long time ago. Also updates the Rust toolchain a bit (needed for a stable feature used in era-consensus). This caused a bunch of lints to need to also be fixed in this PR (mostly `too_long_first_doc_paragraph`). Part of BFT-483 ## Why ❔ We need to be able to support at least 2 consensus protocol versions concurrently in order to be able to do consensus protocol upgrades. ## Is this a breaking change? - [ ] Yes - [x] No ## Operational changes None. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
zkzoomer
pushed a commit
that referenced
this pull request
Jun 21, 2025
🤖 I have created a release *beep* *boop* --- ## [27.1.0](core-v27.0.0...core-v27.1.0) (2025-03-27) ### Features * **consensus:** Add consensus protocol versioning ([#3720](#3720)) ([1e3d17e](1e3d17e)) * **zkos:** Implement ZK OS tree manager ([#3730](#3730)) ([efc0007](efc0007)) ### Bug Fixes * **api:** Fix panic applying nonce override ([#3748](#3748)) ([944059b](944059b)) * **contract_verifier:** order deploy events in `get_contract_info_for_verification` ([#3766](#3766)) ([6e3c031](6e3c031)) * make proof data handler backwards compatible ([#3767](#3767)) ([d7b0122](d7b0122)) * **proof_data_handler:** update save_proof_artifacts_metadata UPDATE ([#3758](#3758)) ([ed4926f](ed4926f)) * **vm:** Fix VM divergence in revert data ([#3570](#3570)) ([b82e2e4](b82e2e4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
dutterbutter
pushed a commit
to dutterbutter/zkstack-cli
that referenced
this pull request
Jul 3, 2025
🤖 I have created a release *beep* *boop* --- ## [27.1.0](matter-labs/zksync-era@core-v27.0.0...core-v27.1.0) (2025-03-27) ### Features * **consensus:** Add consensus protocol versioning ([#3720](matter-labs/zksync-era#3720)) ([15771c5](matter-labs/zksync-era@15771c5)) * **zkos:** Implement ZK OS tree manager ([#3730](matter-labs/zksync-era#3730)) ([efc0007](matter-labs/zksync-era@efc0007)) ### Bug Fixes * **api:** Fix panic applying nonce override ([#3748](matter-labs/zksync-era#3748)) ([944059b](matter-labs/zksync-era@944059b)) * **contract_verifier:** order deploy events in `get_contract_info_for_verification` ([#3766](matter-labs/zksync-era#3766)) ([6e3c031](matter-labs/zksync-era@6e3c031)) * make proof data handler backwards compatible ([#3767](matter-labs/zksync-era#3767)) ([c1788df](matter-labs/zksync-era@c1788df)) * **proof_data_handler:** update save_proof_artifacts_metadata UPDATE ([#3758](matter-labs/zksync-era#3758)) ([ed4926f](matter-labs/zksync-era@ed4926f)) * **vm:** Fix VM divergence in revert data ([#3570](matter-labs/zksync-era#3570)) ([b82e2e4](matter-labs/zksync-era@b82e2e4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What ❔
It makes some necessary changes to allow supporting multiple consensus protocol versions. Most of the changes are on the era-consensus side (which this PR updates to v0.9). On the zksync-era side, I changed the DB to store versioned block certificates.
This PR also removes the genesis column on the consensus_replica_state table since that was deprecated a long time ago.
Also updates the Rust toolchain a bit (needed for a stable feature used in era-consensus). This caused a bunch of lints to need to also be fixed in this PR (mostly
too_long_first_doc_paragraph
).Part of BFT-483
Why ❔
We need to be able to support at least 2 consensus protocol versions concurrently in order to be able to do consensus protocol upgrades.
Is this a breaking change?
Operational changes
None.
Checklist
zkstack dev fmt
andzkstack dev lint
.