-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: make proof data handler backwards compatible #3767
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
Conversation
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.
Pull Request Overview
This PR reverts recent WS-related changes in the proof data handler to ensure backwards compatibility. Key changes include updating API endpoints to remove WS-specific logic, refactoring error handling to use a custom error type instead of generic anyhow errors, and removing obsolete middleware and configuration fields.
Reviewed Changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
core/node/proof_data_handler/src/request_processor.rs | Refactored API endpoints and error handling including panic removals |
core/node/proof_data_handler/src/middleware.rs | Removed the metrics middleware |
core/node/proof_data_handler/src/metrics.rs | Adjusted dependency import order |
core/node/proof_data_handler/src/lib.rs | Updated server routing and endpoint definitions |
core/node/proof_data_handler/src/errors.rs | Removed the NoContent variant from RequestProcessorError |
core/node/node_framework/src/implementations/layers/proof_data_handler.rs | Modified wiring for the proof data handler task |
core/lib/prover_interface/tests/job_serialization.rs | Adjusted serialization tests for SubmitProofRequest changes |
core/lib/prover_interface/src/api.rs | Updated SubmitProofRequest and ProofGenerationDataResponse formats |
core/lib/protobuf_config, core/lib/env_config, core/lib/config | Removed obsolete fields to support backwards compatibility |
Comments suppressed due to low confidence (3)
core/node/proof_data_handler/src/request_processor.rs:144
- Using panic here prevents graceful error handling in production. Consider returning a proper error via the Result type instead of panicking.
.unwrap_or_else(|| panic!("Missing header for {}", l1_batch_number));
core/node/proof_data_handler/src/request_processor.rs:151
- Using panic for missing protocol version info may lead to unexpected server crashes. It would be preferable to return an error that can be handled gracefully.
.unwrap_or_else(|| { panic!("Missing l1 verifier info for protocol version {minor_version}") });
core/node/proof_data_handler/src/request_processor.rs:160
- The use of panic here in the batch header retrieval can cause abrupt termination. Consider replacing it with proper error handling to improve robustness.
.unwrap_or_else(|| panic!("Missing header for {}", l1_batch_number));
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.
Dumb question -- but will proto be fine with the changes we've made? I assume yes, but thought to double check.
Mostly revert otherwise. Approved.
🤖 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>
🤖 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>
## What ❔ Revert WS-related changes for proof data handler ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
🤖 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>
🤖 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>
What ❔
Revert WS-related changes for proof data handler
Why ❔
Is this a breaking change?
Operational changes
Checklist
zkstack dev fmt
andzkstack dev lint
.