Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
run : forge coverage --evm-version cancun --report lcov

- name : Prune coverage
run : lcov --rc branch_coverage=1 --remove ./lcov.info -o ./lcov.info.pruned 'src/mocks/*' 'src/test/*' 'scripts/*' 'node_modules/*' 'lib/*'
run : lcov --rc branch_coverage=1 --remove ./lcov.info -o ./lcov.info.pruned 'src/mocks/*' 'src/test/*' 'scripts/*' 'node_modules/*' 'lib/*' --ignore-errors unused,unused

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand Down
18 changes: 10 additions & 8 deletions scripts/foundry/DeployL1BridgeContracts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {L2GasPriceOracle} from "../../src/L1/rollup/L2GasPriceOracle.sol";
import {MultipleVersionRollupVerifier} from "../../src/L1/rollup/MultipleVersionRollupVerifier.sol";
import {ScrollChain} from "../../src/L1/rollup/ScrollChain.sol";
import {Whitelist} from "../../src/L2/predeploys/Whitelist.sol";
import {ZkEvmVerifierV1} from "../../src/libraries/verifier/ZkEvmVerifierV1.sol";
import {ZkEvmVerifierPostEuclid} from "../../src/libraries/verifier/ZkEvmVerifierPostEuclid.sol";

// solhint-disable max-states-count
// solhint-disable state-visibility
Expand All @@ -38,6 +38,8 @@ contract DeployL1BridgeContracts is Script {
address L2_WETH_ADDR = vm.envAddress("L2_WETH_ADDR");

address L1_PLONK_VERIFIER_ADDR = vm.envAddress("L1_PLONK_VERIFIER_ADDR");
bytes32 VERIFIER_DIGEST_1 = vm.envBytes32("VERIFIER_DIGEST_1");
bytes32 VERIFIER_DIGEST_2 = vm.envBytes32("VERIFIER_DIGEST_2");

address L1_PROXY_ADMIN_ADDR = vm.envAddress("L1_PROXY_ADMIN_ADDR");

Expand All @@ -55,7 +57,7 @@ contract DeployL1BridgeContracts is Script {
address L2_SCROLL_STANDARD_ERC20_ADDR = vm.envAddress("L2_SCROLL_STANDARD_ERC20_ADDR");
address L2_SCROLL_STANDARD_ERC20_FACTORY_ADDR = vm.envAddress("L2_SCROLL_STANDARD_ERC20_FACTORY_ADDR");

ZkEvmVerifierV1 zkEvmVerifierV1;
ZkEvmVerifierPostEuclid zkEvmVerifier;
MultipleVersionRollupVerifier rollupVerifier;
EnforcedTxGateway enforcedTxGateway;
ProxyAdmin proxyAdmin;
Expand All @@ -66,7 +68,7 @@ contract DeployL1BridgeContracts is Script {

vm.startBroadcast(L1_DEPLOYER_PRIVATE_KEY);

deployZkEvmVerifierV1();
deployZkEvmVerifier();
deployMultipleVersionRollupVerifier();
deployL1Whitelist();
deployEnforcedTxGateway();
Expand All @@ -85,17 +87,17 @@ contract DeployL1BridgeContracts is Script {
vm.stopBroadcast();
}

function deployZkEvmVerifierV1() internal {
zkEvmVerifierV1 = new ZkEvmVerifierV1(L1_PLONK_VERIFIER_ADDR);
function deployZkEvmVerifier() internal {
zkEvmVerifier = new ZkEvmVerifierPostEuclid(L1_PLONK_VERIFIER_ADDR, VERIFIER_DIGEST_1, VERIFIER_DIGEST_2);

logAddress("L1_ZKEVM_VERIFIER_V1_ADDR", address(zkEvmVerifierV1));
logAddress("L1_ZKEVM_VERIFIER_V1_ADDR", address(zkEvmVerifier));
}

function deployMultipleVersionRollupVerifier() internal {
uint256[] memory _versions = new uint256[](1);
address[] memory _verifiers = new address[](1);
_versions[0] = 0;
_verifiers[0] = address(zkEvmVerifierV1);
_versions[0] = 6;
_verifiers[0] = address(zkEvmVerifier);
rollupVerifier = new MultipleVersionRollupVerifier(_versions, _verifiers);

logAddress("L1_MULTIPLE_VERSION_ROLLUP_VERIFIER_ADDR", address(rollupVerifier));
Expand Down
39 changes: 4 additions & 35 deletions src/L1/rollup/IScrollChain.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,6 @@ interface IScrollChain {
* Public Mutating Functions *
*****************************/

/// @notice Commit a batch of transactions on layer 1.
///
/// @param version The version of current batch.
/// @param parentBatchHeader The header of parent batch, see the comments of `BatchHeaderV0Codec`.
/// @param chunks The list of encoded chunks, see the comments of `ChunkCodec`.
/// @param skippedL1MessageBitmap The bitmap indicates whether each L1 message is skipped or not.
function commitBatch(
uint8 version,
bytes calldata parentBatchHeader,
bytes[] memory chunks,
bytes calldata skippedL1MessageBitmap
) external;

/// @notice Commit a batch of transactions on layer 1 with blob data proof.
///
/// @dev Memory layout of `blobDataProof`:
Expand All @@ -107,28 +94,6 @@ interface IScrollChain {
/// @param lastBatchHeader The header of last batch to revert, see the encoding in comments of `commitBatch`.
function revertBatch(bytes calldata firstBatchHeader, bytes calldata lastBatchHeader) external;

/// @notice Finalize a committed batch (with blob) on layer 1.
///
/// @dev Memory layout of `blobDataProof`:
/// | z | y | kzg_commitment | kzg_proof |
/// |---------|---------|----------------|-----------|
/// | bytes32 | bytes32 | bytes48 | bytes48 |
///
/// @param batchHeader The header of current batch, see the encoding in comments of `commitBatch.
/// @param prevStateRoot The state root of parent batch.
/// @param postStateRoot The state root of current batch.
/// @param withdrawRoot The withdraw trie root of current batch.
/// @param blobDataProof The proof for blob data.
/// @param aggrProof The aggregation proof for current batch.
function finalizeBatchWithProof4844(
bytes calldata batchHeader,
bytes32 prevStateRoot,
bytes32 postStateRoot,
bytes32 withdrawRoot,
bytes calldata blobDataProof,
bytes calldata aggrProof
) external;

/// @notice Finalize a list of committed batches (i.e. bundle) on layer 1.
/// @param batchHeader The header of last batch in current bundle, see the encoding in comments of `commitBatch.
/// @param postStateRoot The state root after current bundle.
Expand All @@ -140,4 +105,8 @@ interface IScrollChain {
bytes32 withdrawRoot,
bytes calldata aggrProof
) external;

/// @notice Finalize the initial Euclid batch.
/// @param postStateRoot The state root after current batch.
function finalizeEuclidInitialBatch(bytes32 postStateRoot) external;
}
Loading
Loading