Issue with Configuring op-node for Optimism Using Docker: Unknown Fields in mainnet.json #14058
StarTaxDeFi
started this conversation in
Projects
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
I am attempting to set up and run an Optimism node (op-node) using Docker and Docker Compose on my server. Despite following the official documentation and using the provided mainnet.json configuration file, I encounter persistent errors related to unknown fields in the mainnet.json file. These errors prevent the optimism-node container from starting successfully.
Environment Details
Current Configuration
Docker Compose File (docker-compose.yml)
version: '3.8'
services:
nethermind:
image: nethermind/nethermind:latest
container_name: nethermind-node
volumes:
- ./nethermind/data:/nethermind/data
ports:
- "127.0.0.1:30303:30303/tcp"
- "127.0.0.1:8545:8545/tcp"
- "8551:8551/tcp"
networks:
- localnet
op-geth-l2:
image: ethereumoptimism/op-geth:latest
container_name: op-geth-l2
volumes:
- ./op-geth/data:/data
ports:
- "30303:30303/tcp"
- "30303:30303/udp"
- "8545:8545/tcp"
- "8546:8546/tcp"
- "127.0.0.1:8551:8551/tcp"
- "127.0.0.1:9545:9545/tcp"
networks:
- localnet
nodejs-scripts:
image: node:14
container_name: nodejs-scripts
volumes:
- ./scripts:/scripts
command: ["tail", "-f", "/dev/null"]
networks:
- localnet
op-node:
image: ethereumoptimism/op-node:latest
container_name: optimism-node
entrypoint: ["op-node"]
volumes:
- ./optimism/data:/opnode/data
- ./.env_jwt:/opnode/l2_jwtsecret:ro
- ./optimism/data/mainnet.json:/opnode/data/mainnet.json:ro
ports:
- "127.0.0.1:8546:8546" # RPC for op-node
command: [
"--l1", "http://nethermind:8545",
"--l2", "http://op-geth-l2:8551",
"--rollup.config", "/opnode/data/mainnet.json",
"--rpc.addr", "0.0.0.0",
"--rpc.port", "8546",
"--l2.jwt-secret", "/opnode/l2_jwtsecret"
]
depends_on:
- nethermind
- op-geth-l2
networks:
- localnet
networks:
localnet:
driver: bridge
Configuration File (mainnet.json)
I used the mainnet.json file from the official Optimism repository and removed some fields that initially caused errors. The current content of mainnet.json is as follows:
{
"l1ChainID": 1,
"l2ChainID": 10,
"l2BlockTime": 2,
"l1BlockTime": 12,
"maxSequencerDrift": 600,
"sequencerWindowSize": 3600,
"channelTimeout": 300,
"p2pSequencerAddress": "0xAAAA45d9549EDA09E70937013520214382Ffc4A2",
"batchInboxAddress": "0xff00000000000000000000000000000000000010",
"batchSenderAddress": "0x6887246668a3b87F54DeB3b94Ba47a6f63F32985",
"l2OutputOracleSubmissionInterval": 1800,
"l2OutputOracleStartingTimestamp": 1686068903,
"l2OutputOracleStartingBlockNumber": 105235063,
"l2OutputOracleProposer": "0x473300df21D047806A082244b417f96b32f13A33",
"l2OutputOracleChallenger": "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A",
"finalizationPeriodSeconds": 604800,
"proxyAdminOwner": "0x7871d1187A97cbbE40710aC119AA3d412944e4Fe",
"baseFeeVaultRecipient": "0xa3d596EAfaB6B13Ab18D40FaE1A962700C84ADEa",
"l1FeeVaultRecipient": "0xa3d596EAfaB6B13Ab18D40FaE1A962700C84ADEa",
"sequencerFeeVaultRecipient": "0xa3d596EAfaB6B13Ab18D40FaE1A962700C84ADEa",
"baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"baseFeeVaultWithdrawalNetwork": 0,
"l1FeeVaultWithdrawalNetwork": 0,
"sequencerFeeVaultWithdrawalNetwork": 0,
"enableGovernance": true,
"governanceTokenName": "Optimism",
"governanceTokenSymbol": "OP",
"governanceTokenOwner": "0x5C4e7Ba1E219E47948e6e3F55019A647bA501005",
"l2GenesisBlockGasLimit": "0x1c9c380",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
"gasPriceOracleBaseFeeScalar": 1368,
"gasPriceOracleBlobBaseFeeScalar": 810949,
"eip1559Denominator": 50,
"eip1559Elasticity": 6,
"l2GenesisRegolithTimeOffset": "0x0",
"systemConfigStartBlock": 17422444,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000",
"faultGameAbsolutePrestate": "0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c",
"faultGameMaxDepth": 73,
"faultGameClockExtension": 10800,
"faultGameMaxClockDuration": 302400,
"faultGameGenesisBlock": 120059863,
"faultGameGenesisOutputRoot": "0x2694ac14dcf54b7a77363e3f60e6462dc78da0d43d1e2f058dbb6a1488814977",
"faultGameSplitDepth": 30,
"faultGameWithdrawalDelay": 604800,
"preimageOracleMinProposalSize": 126000,
"preimageOracleChallengePeriod": 86400,
"proofMaturityDelaySeconds": 604800,
"disputeGameFinalityDelaySeconds": 302400,
"respectedGameType": 0,
"useFaultProofs": true
}
Steps Taken So Far
Primary Issue
The op-node container fails to start and logs indicate that several fields in the mainnet.json configuration file are unknown and unrecognized by the current version of op-node. Specifically, fields such as "l1ChainID", "l2ChainID", and "l2BlockTime" are causing the configuration to fail.
Assistance Needed
Additional Information
Recurring Logs from op-node
optimism-node | t=2025-01-29T21:25:33+0000 lvl=crit msg="Application failed" message="failed to setup: unable to create the rollup node config: failed to decode rollup config: json: unknown field "l1ChainID""
optimism-node | t=2025-01-29T21:27:28+0000 lvl=crit msg="Application failed" message="failed to setup: unable to create the rollup node config: failed to decode rollup config: json: unknown field "l2ChainID""
optimism-node | t=2025-01-29T21:28:28+0000 lvl=crit msg="Application failed" message="failed to setup: unable to create the rollup node config: failed to decode rollup config: json: unknown field "l2BlockTime""
optimism-node | t=2025-01-29T21:28:49+0000 lvl=crit msg="Application failed" message="failed to setup: unable to create the rollup node config: failed to decode rollup config: json: unknown field "l2BlockTime""
Additional Attempts
Request for Assistance
Attachments
root@Raymond:/nodos# docker-compose up -d
Creating network "nodos_localnet" with driver "bridge"
Creating nodejs-scripts ... done
Creating op-geth-l2 ... done
Creating nethermind-node ... done
Creating optimism-node ... done
root@Raymond:/nodos# docker-compose logs op-node
Attaching to optimism-node
optimism-node | t=2025-01-29T21:25:33+0000 lvl=crit msg="Application failed" message="failed to setup: unable to create the rollup node config: failed to decode rollup config: json: unknown field "l1ChainID""
original mainnet.json : {
"finalSystemOwner": "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A",
"superchainConfigGuardian": "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A",
"l1StartingBlockTag": "0x438335a20d98863a4c0c97999eb2481921ccd28553eac6f913af7c12aec04108",
"l1ChainID": 1,
"l2ChainID": 10,
"l2BlockTime": 2,
"l1BlockTime": 12,
"maxSequencerDrift": 600,
"sequencerWindowSize": 3600,
"channelTimeout": 300,
"p2pSequencerAddress": "0xAAAA45d9549EDA09E70937013520214382Ffc4A2",
"batchInboxAddress": "0xff00000000000000000000000000000000000010",
"batchSenderAddress": "0x6887246668a3b87F54DeB3b94Ba47a6f63F32985",
"l2OutputOracleSubmissionInterval": 1800,
"l2OutputOracleStartingTimestamp": 1686068903,
"l2OutputOracleStartingBlockNumber": 105235063,
"l2OutputOracleProposer": "0x473300df21D047806A082244b417f96b32f13A33",
"l2OutputOracleChallenger": "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A",
"finalizationPeriodSeconds": 604800,
"proxyAdminOwner": "0x7871d1187A97cbbE40710aC119AA3d412944e4Fe",
"baseFeeVaultRecipient": "0xa3d596EAfaB6B13Ab18D40FaE1A962700C84ADEa",
"l1FeeVaultRecipient": "0xa3d596EAfaB6B13Ab18D40FaE1A962700C84ADEa",
"sequencerFeeVaultRecipient": "0xa3d596EAfaB6B13Ab18D40FaE1A962700C84ADEa",
"baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"baseFeeVaultWithdrawalNetwork": 0,
"l1FeeVaultWithdrawalNetwork": 0,
"sequencerFeeVaultWithdrawalNetwork": 0,
"enableGovernance": true,
"governanceTokenName": "Optimism",
"governanceTokenSymbol": "OP",
"governanceTokenOwner": "0x5C4e7Ba1E219E47948e6e3F55019A647bA501005",
"l2GenesisBlockGasLimit": "0x1c9c380",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
"gasPriceOracleBaseFeeScalar": 1368,
"gasPriceOracleBlobBaseFeeScalar": 810949,
"eip1559Denominator": 50,
"eip1559Elasticity": 6,
"l2GenesisRegolithTimeOffset": "0x0",
"systemConfigStartBlock": 17422444,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000",
"faultGameAbsolutePrestate": "0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c",
"faultGameMaxDepth": 73,
"faultGameClockExtension": 10800,
"faultGameMaxClockDuration": 302400,
"faultGameGenesisBlock": 120059863,
"faultGameGenesisOutputRoot": "0x2694ac14dcf54b7a77363e3f60e6462dc78da0d43d1e2f058dbb6a1488814977",
"faultGameSplitDepth": 30,
"faultGameWithdrawalDelay": 604800,
"preimageOracleMinProposalSize": 126000,
"preimageOracleChallengePeriod": 86400,
"proofMaturityDelaySeconds": 604800,
"disputeGameFinalityDelaySeconds": 302400,
"respectedGameType": 0,
"useFaultProofs": true
}
Conclusion
I have followed the official instructions and attempted to adjust the configuration file based on the errors encountered. However, the op-node container continues to fail due to unknown fields in mainnet.json. I seek guidance on resolving these configuration incompatibilities to successfully run the Optimism node.
Beta Was this translation helpful? Give feedback.
All reactions