ethpandaops / ethereum-package

A Kurtosis package that deploys a private, portable, and modular Ethereum devnet
MIT License
261 stars 156 forks source link

`network-configs/genesis.json`: no such file or directory #780

Closed gustavovalverde closed 1 month ago

gustavovalverde commented 1 month ago

I'm having this issue when running with the following configuration in a Mac with M1:

Launching participant network with 1 participants and the following network params struct(additional_preloaded_contracts = {}, churn_limit_quotient = 65536, custody_requirement = 4, data_column_sidecar_subnet_count = 128, deneb_fork_epoch = 0, deposit_contract_address = "0x4242424242424242424242424242424242424242", devnet_repo = "ethpandaops", eip7594_fork_epoch = 100000001, eip7594_fork_version = "0x60000038", ejection_balance = 16000000000, electra_fork_epoch = 100000000, eof_activation_epoch = "", eth1_follow_distance = 2048, genesis_delay = 20, genesis_gaslimit = 30000000, max_blobs_per_block = 6, max_per_epoch_activation_churn_limit = 8, min_validator_withdrawability_delay = 256, network = "mainnet", network_id = "3151908", network_sync_base_url = "https://snapshots.ethpandaops.io/", num_validator_keys_per_node = 64, prefunded_accounts = {}, preregistered_validator_count = 0, preregistered_validator_keys_mnemonic = "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete", preset = "mainnet", samples_per_slot = 8, seconds_per_slot = 12, shard_committee_period = 256)
There was an error executing Starlark code 
An error occurred executing instruction (number 56) at github.com/ethpandaops/ethereum-package/src/full_beaconchain/full_beaconchain_launcher.star[177:14]:
  exec(service_name="beaconchain-schema-initializer", recipe=ExecRecipe(command=["./misc", "-config", "/app/config/beaconchain-config.yml", "-command", "applyDbSchema"]), description="Applying db schema")
  Caused by: Exec returned exit code '1' that is not part of the acceptable status codes '[0]', with output:
    "time=\"2024-09-29T23:21:21Z\" level=info msg=\"compile time check completed\" module=templates\ntime=\"2024-09-29T23:21:21Z\" level=info msg=starting config=/app/config/beaconchain-config.yml version=bdbf2f1\ntime=\"2024-09-29T23:21:21Z\" level=info msg=\"loaded chain config from node with genesis time 1606824023\" module=oauth\ntime=\"2024-09-29T23:21:21Z\" level=fatal msg=\"error reading config file: error opening EL Chain Config file /network-configs/genesis.json: open /network-configs/genesis.json: no such file or directory\"\n"

Error encountered running Starlark code.
barnabasbusa commented 1 month ago

can you paste your config.yaml that you used?

gustavovalverde commented 1 month ago

can you paste your config.yaml that you used?

Sure @barnabasbusa, I've had different errors with different el + cl + network configurations.

This is the configuration that caused the previous error: ```yaml # Specification of the participants in the network participants: # EL(Execution Layer) Specific flags # The type of EL client that should be started # Valid values are geth, nethermind, erigon, besu, ethereumjs, reth, nimbus-eth1 - el_type: geth # el_image: "ethereum/client-go:v1.14.8" # The log level string that this participant's EL client should log at # If this is emptystring then the global `logLevel` parameter's value will be translated into a string appropriate for the client (e.g. if # global `logLevel` = `info` then Geth would receive `3`, Besu would receive `INFO`, etc.) # If this is not emptystring, then this value will override the global `logLevel` setting to allow for fine-grained control # over a specific participant's logging el_log_level: "" # A list of optional extra env_vars the el container should spin up with el_extra_env_vars: {} # A list of optional extra params that will be passed to the EL client container for modifying its behaviour el_extra_params: [] # Persistent storage size for the EL client container (in MB) # Defaults to 0, which means that the default size for the client will be used # Default values can be found in /src/package_io/constants.star VOLUME_SIZE el_volume_size: 0 # Resource management for el containers # CPU is milicores # RAM is in MB # Defaults to 0, which results in no resource limits el_min_cpu: 0 el_max_cpu: 0 el_min_mem: 0 el_max_mem: 0 # CL(Consensus Layer) Specific flags # The type of CL client that should be started # Valid values are nimbus, lighthouse, lodestar, teku, prysm, and grandine cl_type: lighthouse # cl_image: "sigp/lighthouse:v5.3.0" # The log level string that this participant's CL client should log at # If this is emptystring then the global `logLevel` parameter's value will be translated into a string appropriate for the client (e.g. if # global `logLevel` = `info` then Teku would receive `INFO`, Prysm would receive `info`, etc.) # If this is not emptystring, then this value will override the global `logLevel` setting to allow for fine-grained control # over a specific participant's logging cl_log_level: "" # A list of optional extra env_vars the cl container should spin up with cl_extra_env_vars: {} # A list of optional extra params that will be passed to the CL client Beacon container for modifying its behaviour # If the client combines the Beacon & validator nodes (e.g. Teku, Nimbus), then this list will be passed to the combined Beacon-validator node cl_extra_params: [] # Persistent storage size for the CL client container (in MB) # Defaults to 0, which means that the default size for the client will be used # Default values can be found in /src/package_io/constants.star VOLUME_SIZE cl_volume_size: 0 # Resource management for cl containers # CPU is milicores # RAM is in MB # Defaults to 0, which results in no resource limits cl_min_cpu: 0 cl_max_cpu: 0 cl_min_mem: 0 cl_max_mem: 0 # The number of validator clients to run for this participant # Defaults to 1 vc_count: 1 # Participant specific flags # Count of nodes to spin up for this participant # Default to 1 count: 1 # Prometheus additional configuration for a given participant prometheus target. # Execution, beacon and validator client targets on prometheus will include this # configuration. prometheus_config: # Scrape interval to be used. Default to 15 seconds scrape_interval: 15s # Additional labels to be added. Default to empty labels: {} # A set of parameters the node needs to reach an external block building network # If `null` then the builder infrastructure will not be instantiated # Example: # # "relay_endpoints": [ # "https://0xdeadbeefcafa@relay.example.com", # "https://0xdeadbeefcafb@relay.example.com", # "https://0xdeadbeefcafc@relay.example.com", # "https://0xdeadbeefcafd@relay.example.com" # ] builder_network_params: null # Participant flag for keymanager api # This will open up http ports to your validator services! # Defaults null and then set to default global keymanager_enabled (false) keymanager_enabled: null # Default configuration parameters for the network network_params: # Network name, used to enable syncing of alternative networks # You can sync any public network by setting this to the network name (e.g. "mainnet", "sepolia", "holesky") # You can sync any devnet by setting this to the network name (e.g. "dencun-devnet-12", "verkle-gen-devnet-2") network: "sepolia" # The network ID of the network. network_id: "3151908" # The address of the staking contract address on the Eth1 chain deposit_contract_address: "0x4242424242424242424242424242424242424242" # Number of seconds per slot on the Beacon chain seconds_per_slot: 12 # The number of validator keys that each CL validator node should get num_validator_keys_per_node: 64 # This mnemonic will a) be used to create keystores for all the types of validators that we have and b) be used to generate a CL genesis.ssz that has the children # validator keys already preregistered as validators preregistered_validator_keys_mnemonic: "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete" # The number of pre-registered validators for genesis. If 0 or not specified then the value will be calculated from the participants preregistered_validator_count: 0 # How long you want the network to wait before starting up genesis_delay: 20 # The gas limit of the network set at genesis genesis_gaslimit: 30000000 # Preset for the network # Default: "mainnet" # Options: "mainnet", "minimal" # "minimal" preset will spin up a network with minimal preset. This is useful for rapid testing and development. # 192 seconds to get to finalized epoch vs 1536 seconds with mainnet defaults # Please note that minimal preset requires alternative client images. # For an example of minimal preset, please refer to [minimal.yaml](.github/tests/minimal.yaml) preset: "mainnet" # Preloaded contracts for the chain additional_preloaded_contracts: {} # Example: # additional_preloaded_contracts: '{ # "0x123463a4B065722E99115D6c222f267d9cABb524": # { # balance: "1ETH", # code: "0x1234", # storage: {}, # nonce: 0, # secretKey: "0x", # } # }' # Repository override for devnet networks # Default: ethpandaops devnet_repo: ethpandaops # A number of prefunded accounts to be created # Defaults to no prefunded accounts # Example: # prefunded_accounts: '{"0x25941dC771bB64514Fc8abBce970307Fb9d477e9": {"balance": "10ETH"}}' # 10ETH to the account 0x25941dC771bB64514Fc8abBce970307Fb9d477e9 # To prefund multiple accounts, separate them with a comma # # prefunded_accounts: '{"0x25941dC771bB64514Fc8abBce970307Fb9d477e9": {"balance": "10ETH"}, "0x4107be99052d895e3ee461C685b042Aa975ab5c0": {"balance": "1ETH"}}' prefunded_accounts: {} # # Global parameters for the network # By default includes # - A transaction spammer & blob spammer is launched to fake transactions sent to the network # - Forkmon for EL will be launched # - A prometheus will be started, coupled with grafana # - A beacon metrics gazer will be launched # - A light beacon chain explorer will be launched # - Default: [] additional_services: - assertoor - broadcaster - tx_spammer - blob_spammer - custom_flood - goomy_blob - el_forkmon # TODO: https://github.com/blockscout/blockscout-rs/issues/1001 # - blockscout - beacon_metrics_gazer - dora - full_beaconchain_explorer - prometheus_grafana - blobscan - dugtrio - blutgang - forky - apache - tracoor # Configuration place for dora the explorer - https://github.com/ethpandaops/dora dora_params: # Dora docker image to use # Leave blank to use the default image according to your network params image: "" # A list of optional extra env_vars the dora container should spin up with env: {} # Configuration place for transaction spammer - https://github.com/MariusVanDerWijden/tx-fuzz tx_spammer_params: # A list of optional extra params that will be passed to the TX Spammer container for modifying its behaviour tx_spammer_extra_args: [] # Configuration place for goomy the blob spammer - https://github.com/ethpandaops/goomy-blob goomy_blob_params: # A list of optional params that will be passed to the blob-spammer comamnd for modifying its behaviour goomy_blob_args: [] # Configuration place for prometheus prometheus_params: storage_tsdb_retention_time: "1d" storage_tsdb_retention_size: "512MB" # Resource management for prometheus container # CPU is milicores # RAM is in MB min_cpu: 10 max_cpu: 1000 min_mem: 128 max_mem: 2048 # Configuration place for grafana grafana_params: # A list of locators for grafana dashboards to be loaded be the grafana service additional_dashboards: [] # Resource management for grafana container # CPU is milicores # RAM is in MB min_cpu: 10 max_cpu: 1000 min_mem: 128 max_mem: 2048 # Configuration place for the assertoor testing tool - https://github.com/ethpandaops/assertoor assertoor_params: # Check chain stability # This check monitors the chain and succeeds if: # - all clients are synced # - chain is finalizing for min. 2 epochs # - >= 98% correct target votes # - >= 80% correct head votes # - no reorgs with distance > 2 blocks # - no more than 2 reorgs per epoch run_stability_check: false # Run normal transaction test # This test generates random EOA transactions and checks inclusion with/from all client pairs # This test checks for: # - block proposals with transactions from all client pairs # - transaction inclusion when submitting via each client pair # test is done twice, first with legacy (type 0) transactions, then with dynfee (type 2) transactions run_transaction_test: false # Run additional tests from external test definitions # Entries may be simple strings (link to the test file) or dictionaries with more flexibility # eg: # - https://raw.githubusercontent.com/ethpandaops/assertoor/master/example/tests/block-proposal-check.yaml # - file: "https://raw.githubusercontent.com/ethpandaops/assertoor/master/example/tests/block-proposal-check.yaml" # config: # someCustomTestConfig: "some value" tests: [] # The global log level that all clients should log at # Valid values are "error", "warn", "info", "debug", and "trace" # This value will be overridden by participant-specific values global_log_level: "info" # EngineAPI Snooper global flags for all participants # Default to false snooper_enabled: false # Enables Ethereum Metrics Exporter for all participants # Defaults to false ethereum_metrics_exporter_enabled: false # Disable peer scoring to prevent nodes impacted by faults from being permanently ejected from the network # Default to false disable_peer_scoring: false # Whether the environment should be persistent; this is WIP and is slowly being rolled out accross services # Note this requires Kurtosis greater than 0.85.49 to work # Note Erigon, Besu, Teku persistence is not currently supported with docker. # Defaults to false persistent: true # Enables Xatu Sentry for all participants # Defaults to false xatu_sentry_enabled: true # Xatu Sentry params xatu_sentry_params: # The image to use for Xatu Sentry xatu_sentry_image: ethpandaops/xatu:latest # GRPC Endpoint of Xatu Server to send events to xatu_server_addr: localhost:8080 # Enables TLS to Xatu Server xatu_server_tls: false # Headers to add on to Xatu Server requests xatu_server_headers: {} # Beacon event stream topics to subscribe to beacon_subscriptions: - attestation - block - chain_reorg - finalized_checkpoint - head - voluntary_exit - contribution_and_proof - blob_sidecar # Global flag to enable checkpoint sync across the network checkpoint_sync_enabled: true # Global flag to set checkpoint sync url # Tried https://beaconstate-sepolia.chainsafe.io, but had https://github.com/sigp/lighthouse/issues/4559 checkpoint_sync_url: "https://sepolia.beaconstate.info/" # Global paarameter to set the exit ip address of services and public ports port_publisher: # if you have a service that you want to expose on a specific interfact; set that IP here # if you set it to auto it gets the public ip from ident.me and sets it # Defaults to constants.PRIVATE_IP_ADDRESS_PLACEHOLDER # The default value just means its the IP address of the container in which the service is running nat_exit_ip: KURTOSIS_IP_ADDR_PLACEHOLDER # Execution Layer public port exposed to your local machine # Disabled by default # Public port start defaults to 32000 # You can't run multiple enclaves on the same port settings el: enabled: false public_port_start: 32000 # Consensus Layer public port exposed to your local machine # Disabled by default # Public port start defaults to 33000 # You can't run multiple enclaves on the same port settings cl: enabled: false public_port_start: 33000 # Validator client public port exposed to your local machine # Disabled by default # Public port start defaults to 34000 # You can't run multiple enclaves on the same port settings vc: enabled: false public_port_start: 34000 # Additional services public port exposed to your local machine # Disabled by default # Public port start defaults to 35000 # You can't run multiple enclaves on the same port settings additional_services: enabled: false public_port_start: 35000 ```

The main changes were using network: "sepolia", checkpoint_sync_enabled: true and checkpoint_sync_url: "https://sepolia.beaconstate.info/"

gustavovalverde commented 1 month ago

If I use network: "kurtosis" this does not happen, I've tried with mainnet, sepolia and holesky, and all get me to this error.

barnabasbusa commented 1 month ago

Can you try to disable full_beaconchain_explorer, as this tooling doesn't yet support native networks out of the box.

gustavovalverde commented 1 month ago

After disabling full_beaconchain_explorer I do not get the same error, but I still get one:

There was an error executing Starlark code 
An error occurred executing instruction (number 11) at github.com/ethpandaops/ethereum-package/src/cl/lighthouse/lighthouse_launcher.star[82:38]:
  add_service(name="cl-1-lighthouse-geth", config=ServiceConfig(image="ethpandaops/lighthouse:stable", ports={"http": PortSpec(number=4000, transport_protocol="TCP", application_protocol="http"), "metrics": PortSpec(number=5054, transport_protocol="TCP", application_protocol="http"), "tcp-discovery": PortSpec(number=9000, transport_protocol="TCP", application_protocol=""), "udp-discovery": PortSpec(number=9000, transport_protocol="UDP", application_protocol="")}, public_ports={}, files={"/data/lighthouse/beacon-data": Directory(persistent_key="data-cl-1-lighthouse-geth", size=500000), "/jwt": "jwt_file", "/network-configs": "el_cl_genesis_data"}, cmd=["lighthouse", "beacon_node", "--debug-level=info", "--datadir=/data/lighthouse/beacon-data", "--disable-enr-auto-update", "--enr-address=KURTOSIS_IP_ADDR_PLACEHOLDER", "--enr-udp-port=9000", "--enr-tcp-port=9000", "--listen-address=0.0.0.0", "--port=9000", "--http", "--http-address=0.0.0.0", "--http-port=4000", "--http-allow-sync-stalled", "--slots-per-restore-point=32", "--disable-packet-filter", "--execution-endpoints=http://{{kurtosis:732640fdd4924ee1863325d7fc87257f:ip_address.runtime_value}}:8551", "--jwt-secrets=/jwt/jwtsecret", "--suggested-fee-recipient=0x8943545177806ED17B9F23F0a21ee5948eCaa776", "--metrics", "--metrics-address=0.0.0.0", "--metrics-allow-origin=*", "--metrics-port=5054", "--enable-private-discovery", "--checkpoint-sync-url=https://beaconstate.ethstaker.cc/", "--network=mainnet"], env_vars={"RUST_BACKTRACE": "full"}, private_ip_address_placeholder="KURTOSIS_IP_ADDR_PLACEHOLDER", ready_conditions=ReadyCondition(recipe=GetHttpRequestRecipe(port_id="http", endpoint="/eth/v1/node/health"), field="code", assertion="IN", target_value=[200, 206], timeout="15m"), labels={"ethereum-package.client": "lighthouse", "ethereum-package.client-image": "ethpandaops-lighthouse_stable", "ethereum-package.client-type": "beacon", "ethereum-package.connected-client": "geth", "ethereum-package.sha256": ""}, tolerations=[], node_selectors={}))
  Caused by: Unexpected error occurred starting service 'cl-1-lighthouse-geth'
  Caused by: An error occurred waiting for all TCP and UDP ports to be open for service 'cl-1-lighthouse-geth' with private IP '172.16.0.6'; this is usually due to a misconfiguration in the service itself, so here are the logs:
  == SERVICE 'cl-1-lighthouse-geth' LOGS ===================================
  Sep 30 07:53:42.625 INFO Logging to file                         path: "/data/lighthouse/beacon-data/beacon/logs/beacon.log"
  Sep 30 07:53:42.635 INFO Lighthouse started                      version: Lighthouse/v5.3.0-2e0eb6d
  Sep 30 07:53:42.635 INFO Configured for network                  name: mainnet
  Sep 30 07:53:42.635 INFO Data directory initialised              datadir: /data/lighthouse/beacon-data
  Sep 30 07:53:42.635 WARN Discv5 packet filter is disabled
  Sep 30 07:53:42.635 WARN Ignoring --http-allow-sync-stalled      info: this flag is deprecated and will be removed
  Sep 30 07:53:42.640 INFO Deposit contract                        address: 0x00000000219ab540356cbb839cbe05303d7705fa, deploy_block: 11184524
  Sep 30 07:53:42.663 INFO Blob DB initialized                     oldest_blob_slot: Some(Slot(8626176)), path: "/data/lighthouse/beacon-data/beacon/blobs_db", service: freezer_db
  Sep 30 07:53:42.677 INFO Starting checkpoint sync                remote_url: https://beaconstate.ethstaker.cc/, service: beacon
  Sep 30 07:54:18.167 INFO Loaded checkpoint block and state       block_root: 0xeeadbe88ab5ca885ed36e97459adde73562efe7ae10dfb370cae10420831cbe4, state_slot: 10071488, block_slot: 10071488, service: beacon
  Sep 30 07:54:18.177 INFO Loaded deposit tree snapshot            deposits loaded: 1697898, service: beacon
  Sep 30 07:54:24.546 INFO Block production enabled                method: json rpc via http, endpoint: Auth { endpoint: "http://172.16.0.5:8551/", jwt_path: "/jwt/jwtsecret", jwt_id: None, jwt_version: None }
  Sep 30 07:54:24.561 WARN Execution endpoint is not synced        last_seen_block_unix_timestamp: 0, endpoint: http://172.16.0.5:8551/, auth=true, service: beacon
  Sep 30 07:54:24.561 ERRO Error updating deposit contract cache   error: Failed to get remote head and new block ranges: EndpointError(FarBehind), retry_millis: 60000, service: beacon
  Sep 30 07:55:24.554 WARN Execution endpoint is not synced        last_seen_block_unix_timestamp: 0, endpoint: http://172.16.0.5:8551/, auth=true, service: beacon
  Sep 30 07:55:24.555 ERRO Error updating deposit contract cache   error: Failed to get remote head and new block ranges: EndpointError(FarBehind), retry_millis: 60000, service: beacon
barnabasbusa commented 1 month ago

looks like you using sepolia network with mainnet checkpoint sync url?

gustavovalverde commented 1 month ago

Yes, this was my bad while testing different combinations. I also had to disable dugtrio as it was failing to start (I might open a different issue for that one)

If I'd like to test full_beaconchain_explorer is there another test network that could be used? Or can this only be used with kurtosis network?

barnabasbusa commented 1 month ago

Would need to fix the config to support native chains. We haven't been using kurtosis for running public chains, thats why the lack of support for all the tooling.