Skip to content

Commit

Permalink
Merge pull request #2295 from matter-labs/sb-custom-da-with-sl
Browse files Browse the repository at this point in the history
feat!: Custom DA with SyncLayer
  • Loading branch information
StanislavBreadless authored Jun 25, 2024
2 parents 87dad50 + 8badad6 commit 8b8d427
Show file tree
Hide file tree
Showing 74 changed files with 1,052 additions and 328 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts
Submodule contracts updated 53 files
+1 −0 .gitignore
+6 −6 l1-contracts/contracts/bridgehub/ISTMDeploymentTracker.sol
+2 −1 l1-contracts/contracts/bridgehub/STMDeploymentTracker.sol
+11 −0 l1-contracts/contracts/common/interfaces/IL1Messenger.sol
+1 −1 l1-contracts/contracts/dev-contracts/test/ExecutorProvingTest.sol
+6 −6 l1-contracts/contracts/dev-contracts/test/TestExecutor.sol
+6 −0 l1-contracts/contracts/state-transition/chain-deps/ZkSyncHyperchainStorage.sol
+24 −0 l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol
+29 −150 l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol
+11 −0 l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol
+9 −4 l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol
+34 −0 l1-contracts/contracts/state-transition/chain-interfaces/IL1DAValidator.sol
+92 −0 l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol
+83 −0 l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol
+180 −0 l1-contracts/contracts/state-transition/data-availability/RollupL1DAValidator.sol
+25 −0 l1-contracts/contracts/state-transition/data-availability/ValidiumL1DAValidator.sol
+6 −0 l1-contracts/scripts/sync-layer.ts
+3 −3 l1-contracts/src.ts/deploy-process.ts
+14 −0 l1-contracts/src.ts/deploy-test-process.ts
+6 −0 l1-contracts/src.ts/deploy-utils.ts
+24 −0 l1-contracts/src.ts/deploy.ts
+5 −0 l1-contracts/src.ts/utils.ts
+1 −1 l1-contracts/test/foundry/unit/concrete/Executor/ExecutorProof.t.sol
+7 −7 l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol
+16 −21 l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/FreezeChain.t.sol
+119 −119 l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/RevertBatches.t.sol
+1 −1 l1-contracts/test/foundry/unit/concrete/state-transition/libraries/TransactionValidator/ValidateL1L2Tx.t.sol
+16 −16 l1-contracts/test/test_config/constant/hardhat.json
+22 −3 l1-contracts/test/unit_tests/l2-upgrade.test.spec.ts
+79 −5 l1-contracts/test/unit_tests/utils.ts
+1 −1 l1-contracts/test/unit_tests/validator_timelock_test.spec.ts
+9 −0 l2-contracts/contracts/L2ContractErrors.sol
+64 −0 l2-contracts/contracts/L2ContractHelper.sol
+14 −0 l2-contracts/contracts/data-availability/DAErrors.sol
+62 −0 l2-contracts/contracts/data-availability/RollupL2DAValidator.sol
+145 −0 l2-contracts/contracts/data-availability/StateDiffL2DAValidator.sol
+29 −0 l2-contracts/contracts/data-availability/ValidiumL2DAValidator.sol
+18 −0 l2-contracts/contracts/interfaces/IL2DAValidator.sol
+1 −0 l2-contracts/package.json
+132 −0 l2-contracts/src/deploy-l2-da-validator-on-l2-through-l1.ts
+30 −30 system-contracts/SystemContractsHashes.json
+15 −7 system-contracts/bootloader/bootloader.yul
+1 −1 system-contracts/bootloader/tests/bootloader/bootloader_test.yul
+1 −1 system-contracts/contracts/Compressor.sol
+3 −1 system-contracts/contracts/Constants.sol
+1 −1 system-contracts/contracts/ContractDeployer.sol
+21 −103 system-contracts/contracts/L1Messenger.sol
+10 −17 system-contracts/contracts/PubdataChunkPublisher.sol
+18 −0 system-contracts/contracts/interfaces/IL2DAValidator.sol
+2 −1 system-contracts/contracts/interfaces/IPubdataChunkPublisher.sol
+0 −7 system-contracts/test/Compressor.spec.ts
+2 −1 system-contracts/test/L1Messenger.spec.ts
+4 −11 system-contracts/test/PubdataChunkPublisher.spec.ts
2 changes: 2 additions & 0 deletions core/bin/system-constants-generator/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ pub(super) fn execute_internal_transfer_test() -> u32 {
execution_mode: TxExecutionMode::VerifyExecute,
default_validation_computational_gas_limit: BATCH_COMPUTATIONAL_GAS_LIMIT,
chain_id: L2ChainId::default(),
pubdata_params: Default::default(),
};

let eth_token_sys_contract = load_sys_contract("L2BaseToken");
Expand Down Expand Up @@ -313,6 +314,7 @@ pub(super) fn execute_user_txs_in_test_gas_vm(
execution_mode: TxExecutionMode::VerifyExecute,
default_validation_computational_gas_limit: BATCH_COMPUTATIONAL_GAS_LIMIT,
chain_id: L2ChainId::default(),
pubdata_params: Default::default(),
};

let mut vm: Vm<_, HistoryEnabled> =
Expand Down
4 changes: 4 additions & 0 deletions core/lib/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ pub fn l1_messenger_contract() -> Contract {
load_sys_contract("L1Messenger")
}

pub fn l2_rollup_da_validator_bytecode() -> Vec<u8> {
read_bytecode_from_path("contracts/l2-contracts/artifacts-zk/contracts/data-availability/RollupL2DAValidator.sol/RollupL2DAValidator.json")
}

/// Reads bytecode from the path RELATIVE to the Cargo workspace location.
pub fn read_bytecode(relative_path: impl AsRef<Path> + std::fmt::Debug) -> Vec<u8> {
read_bytecode_from_path(relative_path)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8b8d427

Please sign in to comment.