Skip to content

Conversation

Artemka374
Copy link
Contributor

What ❔

Revert WS-related changes for proof data handler

Why ❔

Is this a breaking change?

  • Yes
  • No

Operational changes

Checklist

  • 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.

@EmilLuta EmilLuta requested a review from Copilot March 27, 2025 09:02
Copy link
Contributor

@Copilot Copilot AI left a 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));

Copy link
Contributor

@EmilLuta EmilLuta left a 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.

@Artemka374 Artemka374 enabled auto-merge March 27, 2025 09:48
@Artemka374 Artemka374 added this pull request to the merge queue Mar 27, 2025
Merged via the queue into main with commit bdbbaaa Mar 27, 2025
47 checks passed
@Artemka374 Artemka374 deleted the afo/make-data-handler-backwards-compatible branch March 27, 2025 10:37
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 &lt;&gt; 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>
zkzoomer pushed a commit that referenced this pull request Jun 21, 2025
## 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`.
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants