Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

zimpha
Copy link
Member

@zimpha zimpha commented Jan 20, 2025

No description provided.

@Thegaram Thegaram self-requested a review January 20, 2025 10:40
src/L1/rollup/ScrollChain.sol Outdated Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Outdated Show resolved Hide resolved
@zimpha zimpha marked this pull request as ready for review January 23, 2025 09:25
Copy link
Contributor

@Thegaram Thegaram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good

src/L1/rollup/ScrollChain.sol Outdated Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Outdated Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Outdated Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@Thegaram Thegaram left a 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 {
Copy link
Contributor

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.

src/L1/rollup/ScrollChain.sol Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Show resolved Hide resolved
src/L1/rollup/ScrollChain.sol Outdated Show resolved Hide resolved
// 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();
Copy link
Contributor

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.

Comment on lines +111 to +121
/// @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();
Copy link
Contributor

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.

Comment on lines -538 to +378
bytes calldata _batchHeader,
bytes32 _postStateRoot,
bytes32 _withdrawRoot,
bytes calldata _aggrProof
bytes calldata batchHeader,
bytes32 postStateRoot,
bytes32 withdrawRoot,
bytes calldata aggrProof
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants