Skip to content

Commit d35e010

Browse files
committed
WIP - tidy configs
1 parent 2cacc97 commit d35e010

4 files changed

Lines changed: 35 additions & 37 deletions

File tree

init/3_generate_config.sh

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ config=$(cat << EOL
4747
"l2BlockTime": 2,
4848
"l1BlockTime": 12,
4949
50-
"maxSequencerDrift": 300,
51-
"sequencerWindowSize": 200,
52-
"channelTimeout": 120,
50+
"maxSequencerDrift": 600,
51+
"sequencerWindowSize": 3600,
52+
"channelTimeout": 300,
5353
5454
"p2pSequencerAddress": "$SEQUENCER_ADDRESS",
5555
"batchInboxAddress": "$BatchInboxAddress",
@@ -78,50 +78,46 @@ config=$(cat << EOL
7878
"l1FeeVaultWithdrawalNetwork": 0,
7979
"sequencerFeeVaultWithdrawalNetwork": 0,
8080
81-
"gasPriceOracleBaseFeeScalar": 1368,
82-
"gasPriceOracleBlobBaseFeeScalar": 810949,
81+
"gasPriceOracleOverhead": 0,
82+
"gasPriceOracleScalar": 1000000,
8383
8484
$govConfig
8585
86+
"l2GenesisBlockGasLimit": "0x1c9c380",
87+
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
88+
"l2GenesisRegolithTimeOffset": "0x0",
89+
8690
"eip1559Denominator": 50,
8791
"eip1559DenominatorCanyon": 250,
8892
"eip1559Elasticity": 6,
8993
90-
"l2GenesisBlockGasLimit": "0x1c9c380",
91-
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
92-
"l2GenesisRegolithTimeOffset": "0x0",
93-
"l2GenesisDeltaTimeOffset": "0x0",
94-
"l2GenesisEcotoneTimeOffset": "0x0",
95-
"l1CancunTimeOffset": "0x0",
94+
"l2GenesisDeltaTimeOffset": null,
9695
"l2GenesisCanyonTimeOffset": "0x0",
9796
9897
"systemConfigStartBlock": 0,
9998
100-
"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
101-
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
102-
103-
"faultGameAbsolutePrestate": "0x0000000000000000000000000000000000000000000000000000000000000000",
104-
"faultGameMaxDepth": 50,
105-
"faultGameClockExtension": 0,
106-
"faultGameMaxClockDuration": 1200,
99+
"requiredProtocolVersion": "0x0000000000000000000000000000000000000004000000000000000000000001",
100+
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000004000000000000000000000001",
101+
"fundDevAccounts": false,
102+
"faultGameAbsolutePrestate": "0x037ef3c1a487960b0e633d3e513df020c43432769f41a634d18a9595cbf53c55",
103+
"faultGameMaxDepth": 73,
104+
"faultGameClockExtension": 10800,
105+
"faultGameMaxClockDuration": 302400,
107106
"faultGameGenesisBlock": 0,
108107
"faultGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
109-
"faultGameSplitDepth": 14,
108+
"faultGameSplitDepth": 30,
110109
"faultGameWithdrawalDelay": 604800,
111-
112-
"preimageOracleMinProposalSize": 18000,
113-
"preimageOracleChallengePeriod": 120,
114-
115-
"fundDevAccounts": false,
116-
"useFaultProofs": false,
110+
"preimageOracleMinProposalSize": 126000,
111+
"preimageOracleChallengePeriod": 86400,
117112
"proofMaturityDelaySeconds": 604800,
118-
"disputeGameFinalityDelaySeconds": 604800,
119-
"respectedGameType": 0
120-
}
113+
"disputeGameFinalityDelaySeconds": 302400,
114+
"respectedGameType": 0,
115+
"useFaultProofs": true
116+
}
121117
EOL
122118
)
123119

124120
# Write the config file
125121
cd ~/optimism/packages/contracts-bedrock && \
126122
mkdir -p ./deployments/$DEPLOYMENT_CONTEXT && \
127-
echo "$config" > ./deployments/$DEPLOYMENT_CONTEXT/config.json
123+
echo "$config" > ./deployments/$DEPLOYMENT_CONTEXT/.deploy

init/4_deploy_contract.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ set -eu
44
echo "[4/5] : deploy contract"
55

66
cd ~/optimism/packages/contracts-bedrock && \
7-
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/config.json" \
7+
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/.deploy" \
88
forge script scripts/Deploy.s.sol:Deploy \
99
--private-key $ADMIN_PRIVATE_KEY \
1010
--broadcast \
1111
--rpc-url $L1_RPC_URL \
12-
--priority-gas-price $PRIORITY_GAS_PRICE \
13-
--slow
12+
--priority-gas-price $PRIORITY_GAS_PRICE
1413

15-
echo "run upgrader"
14+
echo "[ deploy contract done! run upgrader ]"
1615

16+
cd ~/optimism/packages/contracts-bedrock && \
1717
CONTRACT_ADDRESSES_PATH="./deployments/$L1_CHAIN_ID-deploy.json" \
18-
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/config.json" \
18+
DEPLOY_CONFIG_PATH="./deployments/$DEPLOYMENT_CONTEXT/.deploy" \
1919
forge script scripts/L2Genesis.s.sol:L2Genesis \
2020
--sig 'runWithAllUpgrades()' \
21-
--rpc-url $L1_RPC_URL
21+
--chain-id $L2_CHAIN_ID \
22+
--rpc-url $L1_RPC_URL \
23+
--private-key $ADMIN_PRIVATE_KEY

init/5_export_genesis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo "[5/5] : export genesis files"
55

66
cd ~/optimism/op-node
77
go run cmd/main.go genesis l2 \
8-
--deploy-config ../packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/config.json \
8+
--deploy-config ../packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/.deploy \
99
--l1-deployments ../packages/contracts-bedrock/deployments/$L1_CHAIN_ID-deploy.json \
1010
--outfile.l2 /config/genesis.json \
1111
--outfile.rollup /config/rollup.json \

init/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
1515
RUN apt-get install -y nodejs && npm install -g pnpm
1616

1717
# install foundry
18-
ENV FOUNDRY_VERSION=${FOUNDRY_VERSION:-nightly}
18+
ENV FOUNDRY_VERSION=${FOUNDRY_VERSION:-nightly-ef62fdbab638a275fc19a2ff8fe8951c3bd1d9aa}
1919
RUN curl -L https://foundry.paradigm.xyz | sudo -E bash -
2020
RUN . ~/.bashrc && foundryup -v "$FOUNDRY_VERSION"
2121
ENV PATH="~/.foundry/bin:${PATH}"

0 commit comments

Comments
 (0)