Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not execute just validate-genesis-allocs <chain-id> in local #691

Open
atenjin opened this issue Nov 18, 2024 · 2 comments
Open

Can not execute just validate-genesis-allocs <chain-id> in local #691

atenjin opened this issue Nov 18, 2024 · 2 comments
Assignees

Comments

@atenjin
Copy link
Contributor

atenjin commented Nov 18, 2024

Bug Description
Can not execute just validate-genesis-allocs <chain-id> in local

Steps to Reproduce
chain info:
This rollup is deployed through op-deployer tool v0.0.3 https://github.com/ethereum-optimism/optimism/releases/tag/op-deployer%2Fv0.0.3

and genesis.json rollup.json address.json, deploy-config.json are all generated by this tool.
address.json which is used for SCR_DEPLOYMENTS_DIR

{
  "SystemConfigProxy": "0xb8db232300f007833592befd46e141c6ad3558ec",
  "OptimismPortalProxy": "0x595329c60c0b9e54a5246e98fb0fa7fcfd454f64",
  "ProxyAdmin": "0x85046864b00763415af4da8d7bd6fa9404385690",
  "PermissionedDisputeGame": "0x01fe650fb880a287d1b7c2df6e830da0540387fa"
}

deploy-config.json:

{
  "fundDevAccounts": false,
  "l2GenesisBlockNonce": "0x0",
  "l2GenesisBlockGasLimit": "0x3938700",
  "l2GenesisBlockDifficulty": null,
  "l2GenesisBlockMixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "l2GenesisBlockNumber": "0x0",
  "l2GenesisBlockGasUsed": "0x0",
  "l2GenesisBlockParentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
  "proxyAdminOwner": "0xba9b48e881c79c5e8e00891dd0dbfd9322632da7",
  "finalSystemOwner": "0xba9b48e881c79c5e8e00891dd0dbfd9322632da7",
  "baseFeeVaultRecipient": "0x7f52c2198f60e3221c10cbe843eb253934fc98b4",
  "l1FeeVaultRecipient": "0x7f52c2198f60e3221c10cbe843eb253934fc98b4",
  "sequencerFeeVaultRecipient": "0x7f52c2198f60e3221c10cbe843eb253934fc98b4",
  "baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
  "l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
  "sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
  "baseFeeVaultWithdrawalNetwork": 1,
  "l1FeeVaultWithdrawalNetwork": 1,
  "sequencerFeeVaultWithdrawalNetwork": 1,
  "enableGovernance": true,
  "governanceTokenSymbol": "OP",
  "governanceTokenName": "Optimism",
  "governanceTokenOwner": "0xdeaddeaddeaddeaddeaddeaddeaddeaddeaddead",
  "gasPriceOracleOverhead": 0,
  "gasPriceOracleScalar": 0,
  "gasPriceOracleBaseFeeScalar": 1368,
  "gasPriceOracleBlobBaseFeeScalar": 810949,
  "useCustomGasToken": false,
  "customGasTokenAddress": "0x0000000000000000000000000000000000000000",
  "p2pSequencerAddress": "0xace029eaf8513fe15f03a511976f311454e4b423",
  "batchSenderAddress": "0x77c60efdbda83410ee0373eda2ed06891238c93d",
  "eip1559Elasticity": 10,
  "eip1559Denominator": 50,
  "eip1559DenominatorCanyon": 250,
  "l2GenesisRegolithTimeOffset": "0x0",
  "l2GenesisCanyonTimeOffset": "0x0",
  "l2GenesisDeltaTimeOffset": "0x0",
  "l2GenesisEcotoneTimeOffset": "0x0",
  "l2GenesisFjordTimeOffset": "0x0",
  "l2GenesisGraniteTimeOffset": "0x0",
  "l1ChainID": 11155111,
  "l2ChainID": 1924,
  "l2BlockTime": 2,
  "finalizationPeriodSeconds": 12,
  "maxSequencerDrift": 600,
  "sequencerWindowSize": 3600,
  "channelTimeout": 300,
  "batchInboxAddress": "0x00e4162c4fe9db4796787e515f616a55650791b7",
  "systemConfigStartBlock": 0,
  "useAltDA": false,
  "daCommitmentType": "",
  "daChallengeWindow": 0,
  "daResolveWindow": 0,
  "daBondSize": 0,
  "daResolverRefundPercentage": 0,
  "l1BlockTime": 12,
  "l1GenesisBlockTimestamp": "0x0",
  "l1GenesisBlockNonce": "0x0",
  "l1GenesisBlockGasLimit": "0x0",
  "l1GenesisBlockDifficulty": null,
  "l1GenesisBlockMixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "l1GenesisBlockCoinbase": "0x0000000000000000000000000000000000000000",
  "l1GenesisBlockNumber": "0x0",
  "l1GenesisBlockGasUsed": "0x0",
  "l1GenesisBlockParentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "l1GenesisBlockBaseFeePerGas": null,
  "l1StartingBlockTag": "0xd99f5dc5bb430b382da5e70964a2faf49808c0f450d4e8fa4bb3d4f7f9e3c18a",
  "requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "superchainConfigGuardian": "0x0000000000000000000000000000000000000001",
  "l2OutputOracleSubmissionInterval": 1,
  "l2OutputOracleStartingTimestamp": 1,
  "l2OutputOracleStartingBlockNumber": 0,
  "l2OutputOracleProposer": "0x0000000000000000000000000000000000000001",
  "l2OutputOracleChallenger": "0x0000000000000000000000000000000000000001",
  "useFaultProofs": true,
  "faultGameAbsolutePrestate": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "faultGameMaxDepth": 0,
  "faultGameClockExtension": 0,
  "faultGameMaxClockDuration": 0,
  "faultGameGenesisBlock": 0,
  "faultGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "faultGameSplitDepth": 0,
  "faultGameWithdrawalDelay": 604800,
  "preimageOracleMinProposalSize": 126000,
  "preimageOracleChallengePeriod": 86400,
  "proofMaturityDelaySeconds": 604800,
  "disputeGameFinalityDelaySeconds": 302400,
  "respectedGameType": 0,
  "l1StandardBridgeProxy": "0xebb79a1d00b2d489f53adee985a2ded2a3553f22",
  "l1CrossDomainMessengerProxy": "0xd89f9ec2d109fb5f978a3b5b846d6aa1959872fb",
  "l1ERC721BridgeProxy": "0x2cff2fda74b121b7d6371c740d5166f47a93d45c",
  "systemConfigProxy": "0xb8db232300f007833592befd46e141c6ad3558ec",
  "optimismPortalProxy": "0x595329c60c0b9e54a5246e98fb0fa7fcfd454f64",
  "daChallengeProxy": "0x0000000000000000000000000000000000000000",
  "protocolVersionsProxy": "0x79add5713b383daa0a138d3c4780c7a1804a8090",
  "cliqueSignerAddress": "0x0000000000000000000000000000000000000000",
  "l1UseClique": false,
  "deploymentWaitConfirmations": 0
}

Reproduce steps

  1. related pr Add Swell (Testnet) #690
  2. my .env file:
SCR_CHAIN_NAME="Swell Network Testnet"
SCR_SUPERCHAIN_TARGET=sepolia
SCR_CHAIN_SHORT_NAME=swell
SCR_STANDARD_CHAIN_CANDIDATE=true

SCR_MONOREPO_DIR="<your path>"

SCR_DEPLOYMENTS_DIR="<above>"
# download from https://operator-public.s3.us-west-2.amazonaws.com/swell/testnet/rollup.json
SCR_ROLLUP_CONFIG=""
# download from https://operator-public.s3.us-west-2.amazonaws.com/swell/testnet/genesis.json
SCR_GENESIS=""
SCR_DEPLOY_CONFIG="<above>"

SCR_GENESIS_CREATION_COMMIT="5e14a61547a45eef2ebeba677aee4a049f106ed8" # op-contracts/v.1.7.0-beta.1+l2-contracts

# Your chain's endpoint for ETHEREUM JSON-RPC requests
SCR_PUBLIC_RPC="https://swell-testnet.alt.technology" # new OP Stack L2 RPC URL

# Your chain's sequencer endpoint for eth_sendRawTransaction.
# This can be set the same as SCR_PUBLIC_RPC if you don't have a separate endpoint.
SCR_SEQUENCER_RPC="https://swell-testnet.alt.technology" # new OP Stack L2 sequencer RPC URL

# Your chain's block explorer (e.g. Blockscout, Etherscan)
SCR_EXPLORER="https://swell-testnet-explorer.alt.technology" # new OP Stack L2 block explorer URL
  1. execute just add-chain, pass
  2. execute just validate 1924, pass
  3. execute just validate-genesis-allocs 1924 meet error:
2024/11/18 23:50:22 executing /usr/bin/bash ./monorepo-outputs.sh 18.12.1 pnpm install --no-frozen-lockfile go run op-node/cmd/main.go genesis l2  --deploy-config=./packages/contracts-bedrock/deploy-config/1924.json --outfile.l2=expected-genesis.json --outfile.rollup=rollup.json --l1-deployments=./packages/contracts-bedrock/deployments/1924/.deploy --l1-rpc=https://ethereum-sepolia-rpc.publicnode.com
Installing and selecting correct Node version...
Now using node v18.12.1 (npm v8.19.2)
Now using node v18.12.1 (npm v8.19.2)
Running install command...
 ERR_PNPM_NO_PKG_MANIFEST  No package.json found in /home/king/workspace/blockchain/ethereum-optimism/optimism-temporary
Installing and selecting correct go version...
Already installed!
Now using version go1.21
Running l2 genesis creation command...
t=2024-11-18T23:50:27+0800 lvl=info msg="Deploy config" path=./packages/contracts-bedrock/deploy-config/1924.json
t=2024-11-18T23:50:27+0800 lvl=crit msg="Application failed" message="missing l2-allocs"
v18.12.1 is already installed.
exit status 1


=== FAIL: github.com/ethereum-optimism/superchain-registry/validation/genesis TestGenesisAllocs

Expected behavior
pass this check.

Environment Information:

  • Operating System: [e.g. Ubuntu 22.04]
  • Package Version (or commit hash): superchain-registry: a560627d56d9b12c7c649e782110101a9579a2c4

Additional context
This error due for the command:

executing /usr/bin/bash ./monorepo-outputs.sh 18.12.1 pnpm install --no-frozen-lockfile go run op-node/cmd/main.go genesis l2  --deploy-config=./packages/contracts-bedrock/deploy-config/1924.json --outfile.l2=expected-genesis.json --outfile.rollup=rollup.json --l1-deployments=./packages/contracts-bedrock/deployments/1924/.deploy --l1-rpc=https://ethereum-sepolia-rpc.publicnode.com

op-node genesis l2 requires --l2-allocs, but in this test, from the error log, the test does not provide this parameter.

So it panic for reason: msg="Application failed" message="missing l2-allocs"

@bitwiseguy
Copy link
Collaborator

@atenjin can you try this again against the latest version of the main branch? We merged a pr here that I am hoping will solve your issue

@mininny
Copy link
Collaborator

mininny commented Nov 27, 2024

@atenjin Could you please let me know where you got the deployments output and the addresses.json? It looks like there might be not enough contract addresses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants