Skip to content

Commit 2516e2e

Browse files
authored
fix: return correct witness inputs (matter-labs#2770)
## What ❔ * Return correct binary(was ProofGenerationData before, but WitnessInputData needed) * Request for specific batch was always returning the latest one ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## 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 `zk fmt` and `zk lint`.
1 parent 180f787 commit 2516e2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/node/external_proof_integration_api/src/processor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) struct ProofGenerationDataResponse(ProofGenerationData);
2525
impl IntoResponse for ProofGenerationDataResponse {
2626
fn into_response(self) -> Response {
2727
let l1_batch_number = self.0.l1_batch_number;
28-
let data = match bincode::serialize(&self.0) {
28+
let data = match bincode::serialize(&self.0.witness_input_data) {
2929
Ok(data) => data,
3030
Err(err) => {
3131
return ProcessorError::Serialization(err).into_response();
@@ -171,7 +171,7 @@ impl Processor {
171171
return Err(ProcessorError::BatchNotReady(l1_batch_number));
172172
}
173173

174-
self.proof_generation_data_for_existing_batch_internal(latest_available_batch)
174+
self.proof_generation_data_for_existing_batch_internal(l1_batch_number)
175175
.await
176176
.map(ProofGenerationDataResponse)
177177
}

0 commit comments

Comments
 (0)