forked from AztecProtocol/aztec-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove total logs len from pre tail kernels + add to L1 (AztecP…
…rotocol#6466) ## Remove total logs length Now individual logs lengths are tracked inside the kernels, we can accurately calculate DA gas and don't need the total lengths (`(un)encrypted_log_preimages_length`). This PR removes them. However, we should be checking that logs emitted on L1 are the lengths claimed in the circuits since they originate in untrusted contexts. ## Add length check to L1 To allow for this check, total lengths are calculated when converting to `CombinedAccumulatedData` at the 'end' of the tail kernels. In the circuit, these are maintained throughout the rollup stages and included in the `txsEffectHash`. On L1, when we re-calculate the hash, the lengths of the raw logs are accumulated and asserted to match those given in the block. A mismatch suggests that a user may have claimed their log was shorter than reality to try and pay less gas (and the sequencer missed it or is dishonest). --- - [x] Remove total logs length from pre-tail kernel circuits - [x] Calculate the total length when converting to `CombinedAccumulatedData` - [x] Add lengths to `txEffectsHash` and check against raw logs on L1 ---
- Loading branch information
1 parent
0ac83dc
commit 66a2d43
Showing
65 changed files
with
381 additions
and
443 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.