feat: submitProof takes only new headers - #25419
Open
alexghr wants to merge 1 commit into
Open
Conversation
spalladino
approved these changes
Sep 7, 2026
| "SlashingProposer" | ||
| "EmpireBase" | ||
| "RollupOperationsExtLib" | ||
| "EpochProofExtLib" |
Contributor
There was a problem hiding this comment.
Curious: why is this now needed?
| bytes calldata _blobPublicInputs | ||
| ) internal view returns (bytes32[] memory) { | ||
| bytes32[] memory headerHashes = verifyHeaders(_start, _end, _headers, 0); | ||
| bytes32[] memory headerHashes = verifyHeaders(_start, _end, _headers, 0, 0); |
Contributor
There was a problem hiding this comment.
Isn't this method used for the preflight check? If so, shouldn't it set the same arguments as the actual call? Disregard this comment if it's not used for that.
| publicInputs[offset + 2 * i] = addressToField(_headers[i].coinbase); | ||
| publicInputs[offset + 2 * i + 1] = bytes32(_headers[i].accumulatedFees); | ||
| // The submit path fills the compact prefix directly from calldata before verifying the proof. | ||
| uint256 suffixOffset = offset + 2 * (numCheckpoints - _headers.length); |
Contributor
There was a problem hiding this comment.
Can you add another line of comment explaining why this formula? I had to ask my agent for an explanation.
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
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.
This PR optimized the partial proof flow by enabling provers to only send the headers for new checkpoints that are proven by the proof. The provers can send smaller payloads (just fees + coinbase) for the already proven checkpoints (which also have their rewards accounted for).
This PR slightly increases gas costs for full epoch proofs (because of all the new checks we have to run on the proven-prefix) but it reduces gas costs on partial epoch proofs that build on previously submitted proof by about ~3.5K/already proven checkpoint (so in the scneario where we prove 8 checkpoints and then another 8 checkpoints we save approx 27k on the second proof)
This PR requires changes to be made to aztec-node to make it compatible with the new contracts.