-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: mpt migration related changes #73
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see we finally get to deprecate some old code
|
||
// solhint-disable no-inline-assembly | ||
|
||
contract ZkEvmVerifierPostEuclid is IZkEvmVerifierV2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ask the relevant person from the zk team to review this.
// Make sure we don't finalize v4, v5 and v6 batches in the same bundle, that | ||
// means `batchIndex < euclidForkBatchIndex` or `prevBatchIndex >= euclidForkBatchIndex`. | ||
if (prevBatchIndex < euclidForkBatchIndex && euclidForkBatchIndex <= batchIndex) { | ||
revert ErrorFinalizePreAndPostEuclidBatchInOneBundle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well if we try to do this the proof verification should never pass. But we can keep this as a sanity check if you prefer.
/// @dev Thrown when SC finalize V5 batch before all v4 batches are finalized. | ||
error ErrorNotAllV4BatchFinalized(); | ||
|
||
/// @dev Thrown when the committed v5 batch doesn't contain only one chunk. | ||
error ErrorV5BatchNotContainsOnlyOneChunk(); | ||
|
||
/// @dev Thrown when the committed v5 batch doesn't contain only one block. | ||
error ErrorV5BatchNotContainsOnlyOneBlock(); | ||
|
||
/// @dev Thrown when the committed v5 batch contains some transactions (L1 or L2). | ||
error ErrorV5BatchContainsTransactions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit overkill, we could just use one error ErrorInvalidV5Batch
.
bytes calldata _batchHeader, | ||
bytes32 _postStateRoot, | ||
bytes32 _withdrawRoot, | ||
bytes calldata _aggrProof | ||
bytes calldata batchHeader, | ||
bytes32 postStateRoot, | ||
bytes32 withdrawRoot, | ||
bytes calldata aggrProof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why did you change this? Previously you consistently preferred underscore for function arguments.
No description provided.