ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.66k stars 3.3k forks source link

Local devnet - beacon node genesis not being generated #12426

Open PierreOssun opened 1 month ago

PierreOssun commented 1 month ago

Bug Description When running he command make devnet-up it crash when trying to read the L1 Start Block

Steps to Reproduce run make devnet-up

Expected behavior devnet is up and running

Environment Information: macOS apple silicon

Configurations:

Logs:

#111 [op-challenger] resolving provenance for metadata file
#111 DONE 0.0s
[INFO|10-11-2024 04:51:27] Devnet starting
[INFO|10-11-2024 04:51:27] L1 genesis already generated.
[INFO|10-11-2024 04:51:27] Starting L1.
WARN[0000] The "ALTDA_ENABLED" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ALTDA_SERVICE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "PROPOSAL_INTERVAL" variable is not set. Defaulting to a blank string. 
WARN[0000] The "L2OO_ADDRESS" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DGF_ADDRESS" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DG_TYPE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ALTDA_ENABLED" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DA_TYPE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ALTDA_SERVICE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DGF_ADDRESS" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ALTDA_GENERIC_DA" variable is not set. Defaulting to a blank string. 
[+] Running 3/3
 ✔ Container ops-bedrock-l1-1     Running                                                                                                                                                                                                                           0.0s 
 ✔ Container ops-bedrock-l1-bn-1  Started                                                                                                                                                                                                                           0.1s 
 ✔ Container ops-bedrock-l1-vc-1  Started                                                                                                                                                                                                                           0.2s 
[INFO|10-11-2024 04:51:27] Trying 127.0.0.1:8545
[INFO|10-11-2024 04:51:27] Connected 127.0.0.1:8545
[INFO|10-11-2024 04:51:27] Waiting for RPC server at 127.0.0.1:8545
[INFO|10-11-2024 04:51:27] RPC server at 127.0.0.1:8545 ready
[INFO|10-11-2024 04:51:27] Generating L2 genesis and rollup configs.
[INFO|10-11-2024 04:51:27] Re-using existing L2 allocs.
INFO [10-11|16:51:31.438] Deploy config                            path=/Users/possun/Documents/OPStack/minato/optimism/packages/contracts-bedrock/deploy-config/devnetL1.json
INFO [10-11|16:51:31.520] Using L1 Start Block                     number=1
t=2024-10-11T16:51:54+0200 lvl=crit msg="Application failed" message="fetching start block by number: operation failed permanently after 24 attempts: not found"
exit status 1
Traceback (most recent call last):
  File "/Users/possun/Documents/OPStack/minato/optimism/./bedrock-devnet/main.py", line 9, in <module>
    main()
  File "/Users/possun/Documents/OPStack/minato/optimism/./bedrock-devnet/main.py", line 5, in main
    devnet.main()
  File "/Users/possun/Documents/OPStack/minato/optimism/bedrock-devnet/devnet/__init__.py", line 120, in main
    devnet_deploy(paths)
  File "/Users/possun/Documents/OPStack/minato/optimism/bedrock-devnet/devnet/__init__.py", line 226, in devnet_deploy
    run_command([
  File "/Users/possun/Documents/OPStack/minato/optimism/bedrock-devnet/devnet/__init__.py", line 368, in run_command
    return subprocess.run(
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['go', 'run', 'cmd/main.go', 'genesis', 'l2', '--l1-rpc', 'http://localhost:8545', '--deploy-config', '/Users/possun/Documents/OPStack/minato/optimism/packages/contracts-bedrock/deploy-config/devnetL1.json', '--l2-allocs', '/Users/possun/Documents/OPStack/minato/optimism/.devnet/allocs-l2-granite.json', '--l1-deployments', '/Users/possun/Documents/OPStack/minato/optimism/.devnet/addresses.json', '--outfile.l2', '/Users/possun/Documents/OPStack/minato/optimism/.devnet/genesis-l2.json', '--outfile.rollup', '/Users/possun/Documents/OPStack/minato/optimism/.devnet/rollup.json']' returned non-zero exit status 1.
make: *** [devnet-up] Error 1

and error logs in the 2 dockers of beacon nodes (they can't start):

+ exec /usr/local/bin/lighthouse bn --datadir=/db --disable-peer-scoring --disable-packet-filter --enable-private-discovery --staking --http --http-address=0.0.0.0 --http-port=5052 --validator-monitor-auto --http-allow-origin=* --listen-address=0.0.0.0 --port=9000 --target-peers=0 --testnet-dir=/genesis --execution-endpoint=http://l1:8551 --execution-jwt=/config/jwt-secret.txt --allow-insecure-genesis-sync --debug-level=info
Unable to open testnet dir at "/genesis": Unable to read File { fd: 3, path: "/genesis/genesis.ssz", read: true, write: false }: Os { code: 21, kind: IsADirectory, message: "Is a directory" }

Additional context I seems that the file genesis.ssz that have to be generated by eth2-testnet-genesis is not present. eth2-testnet-genesis is installed using make install-eth2-testnet-genesis

I am on latest develop commit 18732dbafa6836d7ec6d5adaaf45108c29454fc8

Thanks for you help

tynes commented 1 month ago

We are in the process of deprecating the docker composed based devnet in favor of using kurtosis. See https://github.com/ethereum-optimism/optimism/issues/11562 for details