Skip to content

Commit

Permalink
fix: return correct witness inputs (#2770)
Browse files Browse the repository at this point in the history
## 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`.
  • Loading branch information
Artemka374 authored Aug 29, 2024
1 parent aebc41c commit 6013d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/node/external_proof_integration_api/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub(crate) struct ProofGenerationDataResponse(ProofGenerationData);
impl IntoResponse for ProofGenerationDataResponse {
fn into_response(self) -> Response {
let l1_batch_number = self.0.l1_batch_number;
let data = match bincode::serialize(&self.0) {
let data = match bincode::serialize(&self.0.witness_input_data) {
Ok(data) => data,
Err(err) => {
return ProcessorError::Serialization(err).into_response();
Expand Down Expand Up @@ -171,7 +171,7 @@ impl Processor {
return Err(ProcessorError::BatchNotReady(l1_batch_number));
}

self.proof_generation_data_for_existing_batch_internal(latest_available_batch)
self.proof_generation_data_for_existing_batch_internal(l1_batch_number)
.await
.map(ProofGenerationDataResponse)
}
Expand Down

0 comments on commit 6013d31

Please sign in to comment.