Skip to content

Commit

Permalink
update configs for Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
Thegaram committed Aug 16, 2024
1 parent 11ef777 commit ebffab7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
1 change: 1 addition & 0 deletions docker/config-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CHAIN_ID_L2 = 222222
MAX_TX_IN_CHUNK = 100
MAX_BLOCK_IN_CHUNK = 100
MAX_CHUNK_IN_BATCH = 15
MAX_BATCH_IN_BUNDLE = 30
MAX_L1_MESSAGE_GAS_LIMIT = 10000000

L1_CONTRACT_DEPLOYMENT_BLOCK = 0
Expand Down
6 changes: 4 additions & 2 deletions docker/templates/coordinator-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"session_attempts": 100,
"chunk_collection_time_sec": 3600,
"batch_collection_time_sec": 600,
"bundle_collection_time_sec": 600,
"verifier": {
"fork_name": "bernoulli",
"fork_name": "darwin",
"mock_mode": false,
"params_path": "/verifier/params",
"assets_path": "/verifier/assets"
"assets_path_lo": "/verifier/assets/lo",
"assets_path_hi": "/verifier/assets/hi"
},
"max_verifier_workers": 4,
"min_prover_version": "v4.3.41"
Expand Down
1 change: 1 addition & 0 deletions docker/templates/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"shanghaiBlock": 0,
"bernoulliBlock": 0,
"curieBlock": 0,
"darwinTime": 0,
"clique": {
"period": 3,
"epoch": 30000
Expand Down
17 changes: 12 additions & 5 deletions docker/templates/rollup-config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"l1_config": {
"confirmations": "0x0",
"endpoint": null,
"l1_message_queue_address": null,
"scroll_chain_address": null,
"start_height": 0,
"relayer_config": {
"gas_price_oracle_contract_address": null,
Expand All @@ -12,8 +9,9 @@
"escalate_blocks": 100,
"escalate_multiple_num": 11,
"escalate_multiple_den": 10,
"min_gas_tip": 1,
"max_gas_price": 10000000000000,
"tx_type": "LegacyTx",
"tx_type": "DynamicFeeTx",
"check_pending_time": 3,
"confirmations": "0x0"
},
Expand All @@ -38,11 +36,13 @@
"escalate_blocks": 4,
"escalate_multiple_num": 12,
"escalate_multiple_den": 10,
"min_gas_tip": 100000000,
"max_gas_price": 200000000000,
"max_blob_gas_price": 200000000000,
"tx_type": "DynamicFeeTx",
"check_pending_time": 10,
"confirmations": "0x0"
"confirmations": "0x0",
"max_pending_blob_txs": 3
},
"gas_oracle_config": {
"min_gas_price": 0,
Expand All @@ -56,12 +56,14 @@
},
"enable_test_env_bypass_features": null,
"finalize_batch_without_proof_timeout_sec": null,
"finalize_bundle_without_proof_timeout_sec": null,
"gas_oracle_sender_private_key": null,
"commit_sender_private_key": null,
"finalize_sender_private_key": null,
"l1_commit_gas_limit_multiplier": 1.2
},
"chunk_proposer_config": {
"propose_interval_milliseconds": 100,
"max_block_num_per_chunk": null,
"max_tx_num_per_chunk": null,
"max_l1_commit_gas_per_chunk": 5000000,
Expand All @@ -72,12 +74,17 @@
"max_uncompressed_batch_bytes_size": 634880
},
"batch_proposer_config": {
"propose_interval_milliseconds": 1000,
"max_chunk_num_per_batch": null,
"max_l1_commit_gas_per_batch": 5000000,
"max_l1_commit_calldata_size_per_batch": 110000,
"batch_timeout_sec": 2700,
"gas_cost_increase_multiplier": 1.2,
"max_uncompressed_batch_bytes_size": 634880
},
"bundle_proposer_config": {
"max_batch_num_per_bundle": 20,
"bundle_timeout_sec": 36000
}
},
"db_config": {
Expand Down
2 changes: 2 additions & 0 deletions scripts/deterministic/Configuration.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ abstract contract Configuration is Script {
uint256 internal MAX_TX_IN_CHUNK;
uint256 internal MAX_BLOCK_IN_CHUNK;
uint256 internal MAX_CHUNK_IN_BATCH;
uint256 internal MAX_BATCH_IN_BUNDLE;
uint256 internal MAX_L1_MESSAGE_GAS_LIMIT;

uint256 internal L1_CONTRACT_DEPLOYMENT_BLOCK;
Expand Down Expand Up @@ -106,6 +107,7 @@ abstract contract Configuration is Script {
MAX_TX_IN_CHUNK = cfg.readUint(".general.MAX_TX_IN_CHUNK");
MAX_BLOCK_IN_CHUNK = cfg.readUint(".general.MAX_BLOCK_IN_CHUNK");
MAX_CHUNK_IN_BATCH = cfg.readUint(".general.MAX_CHUNK_IN_BATCH");
MAX_BATCH_IN_BUNDLE = cfg.readUint(".general.MAX_BATCH_IN_BUNDLE");
MAX_L1_MESSAGE_GAS_LIMIT = cfg.readUint(".general.MAX_L1_MESSAGE_GAS_LIMIT");

L1_CONTRACT_DEPLOYMENT_BLOCK = cfg.readUint(".general.L1_CONTRACT_DEPLOYMENT_BLOCK");
Expand Down
9 changes: 6 additions & 3 deletions scripts/deterministic/DeployScroll.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1051,11 +1051,14 @@ contract DeployScroll is DeterminsticDeployment {
MAX_L1_MESSAGE_GAS_LIMIT
);
}
if (
getInitializeCount(L1_MESSAGE_QUEUE_PROXY_ADDR) == 0 || getInitializeCount(L1_MESSAGE_QUEUE_PROXY_ADDR) == 1
) {

if (getInitializeCount(L1_MESSAGE_QUEUE_PROXY_ADDR) < 2) {
L1MessageQueueWithGasPriceOracle(L1_MESSAGE_QUEUE_PROXY_ADDR).initializeV2();
}

if (getInitializeCount(L1_MESSAGE_QUEUE_PROXY_ADDR) < 3) {
L1MessageQueueWithGasPriceOracle(L1_MESSAGE_QUEUE_PROXY_ADDR).initializeV3();
}
}

function initializeL1ScrollMessenger() private {
Expand Down
4 changes: 2 additions & 2 deletions scripts/deterministic/GenerateConfigs.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ contract GenerateRollupConfig is DeployScroll {
vm.writeJson(L1_RPC_ENDPOINT, ROLLUP_CONFIG_PATH, ".l2_config.relayer_config.sender_config.endpoint");

// contracts
vm.writeJson(vm.toString(L1_MESSAGE_QUEUE_PROXY_ADDR), ROLLUP_CONFIG_PATH, ".l1_config.l1_message_queue_address");
vm.writeJson(vm.toString(L1_SCROLL_CHAIN_PROXY_ADDR), ROLLUP_CONFIG_PATH, ".l1_config.scroll_chain_address");
vm.writeJson(vm.toString(L1_GAS_PRICE_ORACLE_ADDR), ROLLUP_CONFIG_PATH, ".l1_config.relayer_config.gas_price_oracle_contract_address");
vm.writeJson(vm.toString(L2_MESSAGE_QUEUE_ADDR), ROLLUP_CONFIG_PATH, ".l2_config.l2_message_queue_address");
vm.writeJson(vm.toString(L1_SCROLL_CHAIN_PROXY_ADDR), ROLLUP_CONFIG_PATH, ".l2_config.relayer_config.rollup_contract_address");
Expand All @@ -53,10 +51,12 @@ contract GenerateRollupConfig is DeployScroll {
// other
vm.writeJson(vm.toString(TEST_ENV_MOCK_FINALIZE_ENABLED), ROLLUP_CONFIG_PATH, ".l2_config.relayer_config.enable_test_env_bypass_features");
vm.writeJson(vm.toString(TEST_ENV_MOCK_FINALIZE_TIMEOUT_SEC), ROLLUP_CONFIG_PATH, ".l2_config.relayer_config.finalize_batch_without_proof_timeout_sec");
vm.writeJson(vm.toString(TEST_ENV_MOCK_FINALIZE_TIMEOUT_SEC), ROLLUP_CONFIG_PATH, ".l2_config.relayer_config.finalize_bundle_without_proof_timeout_sec");

vm.writeJson(vm.toString(MAX_BLOCK_IN_CHUNK), ROLLUP_CONFIG_PATH, ".l2_config.chunk_proposer_config.max_block_num_per_chunk");
vm.writeJson(vm.toString(MAX_TX_IN_CHUNK), ROLLUP_CONFIG_PATH, ".l2_config.chunk_proposer_config.max_tx_num_per_chunk");
vm.writeJson(vm.toString(MAX_CHUNK_IN_BATCH), ROLLUP_CONFIG_PATH, ".l2_config.batch_proposer_config.max_chunk_num_per_batch");
vm.writeJson(vm.toString(MAX_BATCH_IN_BUNDLE), ROLLUP_CONFIG_PATH, ".l2_config.bundle_proposer_config.max_batch_num_per_bundle");

vm.writeJson(SCROLL_DB_CONNECTION_STRING, ROLLUP_CONFIG_PATH, ".db_config.dsn");
}
Expand Down

0 comments on commit ebffab7

Please sign in to comment.