optimism: Unable to run op-stack with local L1 layer like with ganache or anvil
I am unable to deploy the L1 contracts, I am following the Getting-Started doc
I am getting this error of script failed
while running this command forge script scripts/Deploy.s.sol:Deploy --private-key $PRIVATE_KEY --broadcast --rpc-url $ETH_RPC_URL
rishabhagrawal@192 contracts-bedrock % forge script scripts/Deploy.s.sol:Deploy --private-key $PRIVATE_KEY --broadcast --rpc-url $ETH_RPC_URL [⠃] Compiling… No files changed, compilation skipped Traces: [43008596] → new Deploy@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519 └─ ← 214183 bytes of code
[3026838] Deploy::setUp() ├─ [0] VM::projectRoot() [staticcall] │ └─ ← /Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock ├─ [0] VM::envOr(DEPLOY_SCRIPT, Deploy) │ └─ ← <env var value> ├─ [0] VM::envOr(DEPLOYMENT_CONTEXT, ) │ └─ ← <env var value> ├─ [0] VM::envOr(DEPLOY_FILE, run-latest.json) │ └─ ← <env var value> ├─ [0] VM::envOr(CHAIN_ID, 1337) │ └─ ← <env var value> ├─ [0] VM::toString(1337) [staticcall] │ └─ ← 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000043133333700000000000000000000000000000000000000000000000000000000 ├─ [0] VM::createDir(/Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deployments/getting-started, true) │ └─ ← () ├─ [0] VM::readFile(/Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deployments/getting-started/.chainId) [staticcall] │ └─ ← <file> ├─ [0] VM::envOr(STRICT_DEPLOYMENT, true) │ └─ ← <env var value> ├─ [0] VM::parseUint(1337) [staticcall] │ └─ ← 1337 ├─ [0] console::log(Connected to network with chainid %s, 1337) [staticcall] │ └─ ← () ├─ [0] VM::readFile(/Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deployments/getting-started/.deploy) [staticcall] │ └─ ← <file> ├─ [0] console::log(Storing temp deployment data in %s, /Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deployments/getting-started/.deploy) [staticcall] │ └─ ← () ├─ [0] VM::projectRoot() [staticcall] │ └─ ← /Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock ├─ [2583705] → new <Unknown>@0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141 │ ├─ [0] console::log(DeployConfig: reading file %s, /Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deploy-config/getting-started.json) [staticcall] │ │ └─ ← () │ ├─ [0] VM::readFile(/Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deploy-config/getting-started.json) [staticcall] │ │ └─ ← <file> │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.finalSystemOwner) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.portalGuardian) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.l1ChainID) │ │ └─ ← 1337 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.l2ChainID) │ │ └─ ← 42069 [4.206e4] │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.l2BlockTime) │ │ └─ ← 2 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.maxSequencerDrift) │ │ └─ ← 600 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.sequencerWindowSize) │ │ └─ ← 3600 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.channelTimeout) │ │ └─ ← 300 │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.p2pSequencerAddress) │ │ └─ ← 0x7B66446cF8a193d3241bD86F95211144948E12d6 │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.batchInboxAddress) │ │ └─ ← 0xFf00000000000000000000000000000000042069 │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.batchSenderAddress) │ │ └─ ← 0xF511CccF2304FB1bC433a1d38C535fC655a6F6F7 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.l2OutputOracleSubmissionInterval) │ │ └─ ← 120 │ ├─ [0] VM::parseJsonInt(<stringified JSON>, $.l2OutputOracleStartingTimestamp) │ │ └─ ← 1691604266 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.l2OutputOracleStartingBlockNumber) │ │ └─ ← 0 │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.l2OutputOracleProposer) │ │ └─ ← 0x65E5dD681f21D1614b12E623ebe1366543093815 │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.l2OutputOracleChallenger) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.finalizationPeriodSeconds) │ │ └─ ← 12 │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.proxyAdminOwner) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.baseFeeVaultRecipient) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.l1FeeVaultRecipient) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.sequencerFeeVaultRecipient) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonString(<stringified JSON>, $.governanceTokenName) │ │ └─ ← Optimism │ ├─ [0] VM::parseJsonString(<stringified JSON>, $.governanceTokenSymbol) │ │ └─ ← OP │ ├─ [0] VM::parseJsonAddress(<stringified JSON>, $.governanceTokenOwner) │ │ └─ ← 0xe42a3E5D36265D5bce471b7eDa3D3fD018991fBC │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.l2GenesisBlockGasLimit) │ │ └─ ← 30000000 [3e7] │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.l2GenesisBlockBaseFeePerGas) │ │ └─ ← 1000000000 [1e9] │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.gasPriceOracleOverhead) │ │ └─ ← 2100 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.gasPriceOracleScalar) │ │ └─ ← 1000000 [1e6] │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.eip1559Denominator) │ │ └─ ← 50 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.eip1559Elasticity) │ │ └─ ← 10 │ ├─ [0] VM::parseJsonUint(<stringified JSON>, $.systemConfigStartBlock) │ │ └─ ← “No matching value or array found for key $.systemConfigStartBlock” │ └─ ← 0 bytes of code └─ ← “No matching value or array found for key $.systemConfigStartBlock”
== Logs == Connected to network with chainid 1337 Storing temp deployment data in /Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deployments/getting-started/.deploy DeployConfig: reading file /Users/rishabhagrawal/Data/Workspace/Avail/optimism/packages/contracts-bedrock/deploy-config/getting-started.json Error: Script failed.
As per my research and understanding, In DeployerConfig.s.sol, it is trying to read systemConfigStartBlock from the getting-started.json file, but there is no such config variable given in that file.
is this a recent change? Please help if anyone faces the same issue or has any solution and understanding for this.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 24 (11 by maintainers)
Commits related to this issue
- contracts-bedrock: refactor — committed to ethereum-optimism/optimism by tynes a year ago
I am getting this error on running op-node using local L1 layer like with anvil or ganache
@RISHABHAGRAWALZRA add
"systemConfigStartingBlock" : 0
in yourgetting-started.json
file.And I saw your further Issue using Ganache on Discord, just replace
1337
inChains.sol
with something random number so the script won’t require those extradispute-game
configurations https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/scripts/Chains.solor you can add
faultGameMaxDepth
,faultGameAbsolutePrestate
,faultGameMaxDuration
in yourgetting-started.json
if you are using Ganache or change thechain ID
of ganache. : )I think this is just a hack to get around the error. Blocktime for L1 should be 12, so there must be an error in the code somewhere https://stack.optimism.io/docs/build/conf/#misc
@RISHABHAGRAWALZRA thanks for sharing !!, you can close the Issue if you contracts are deployed successfully
perhaps you can checkout latest tag?
git checkout 4ef51e1 -b stable
i encountered familiar problem today, and now i can interact with OP stack