diff --git a/.github/consensus_synced.yaml b/.github/consensus_synced.yaml new file mode 100644 index 00000000..931df591 --- /dev/null +++ b/.github/consensus_synced.yaml @@ -0,0 +1,16 @@ +endpoints: + - name: "local" + executionUrl: http://127.0.0.1:32773 + consensusUrl: http://127.0.0.1:32786 + +tests: +- name: "basic" + timeout: 48h + tasks: + - name: check_clients_are_healthy + title: "Consensus client is healthy" + config: + skipExecutionCheck: true + + - name: check_consensus_sync_status + title: consensus is synced diff --git a/.github/geth.js b/.github/geth.js new file mode 100644 index 00000000..ca817425 --- /dev/null +++ b/.github/geth.js @@ -0,0 +1,78 @@ +import http from 'k6/http'; +import { check, sleep } from 'k6'; + +// Define the execution and consensus URLs +const executionUrl = 'http://127.0.0.1:32773'; // Replace with your actual execution URL +const consensusUrl = 'http://127.0.0.1:32786'; // Replace with your actual consensus URL + +// Function to send JSON-RPC requests +function sendRpcRequest(url, method, params = []) { + const payload = JSON.stringify({ + jsonrpc: "2.0", + method: method, + params: params, + id: 1, + }); + + const res = http.post(url, payload, { + headers: { 'Content-Type': 'application/json' }, + }); + + return res; +} + +export default function () { + // Check execution node sync status + let execRes = sendRpcRequest(executionUrl, 'eth_syncing'); + check(execRes, { + 'Execution service is up': (r) => r.status === 200, + 'Execution node is synced': (r) => r.json().result === false, // false means synced + }); + + // Check current block number from execution node + let blockRes = sendRpcRequest(executionUrl, 'eth_blockNumber'); + check(blockRes, { + 'Block number retrieved successfully': (r) => r.status === 200, + 'Block number is a valid hex string': (r) => /^0x[0-9a-fA-F]+$/.test(r.json().result), + }); + + // Check consensus node sync status using health endpoint + let consHealthRes = http.get(`${consensusUrl}/eth/v1/node/syncing`); // Adjust according to your consensus client + check(consHealthRes, { + 'Consensus service is up': (r) => r.status === 200, + 'Consensus node is synced': (r) => JSON.parse(r.body).is_syncing === false, // Adjust based on actual response structure + }); + + // Check sync status + let syncRes = http.get(`${consensusUrl}/lighthouse/syncing`, { headers: { 'accept': 'application/json' } }); + check(syncRes, { + 'Syncing endpoint is up': (r) => r.status === 200, + 'Node is synced': (r) => JSON.parse(r.body).SyncingFinalized === false, // Check if syncing is finalized + }); + + // Check connected peers + let peersRes = http.get(`${consensusUrl}/lighthouse/peers/connected`, { headers: { 'accept': 'application/json' } }); + check(peersRes, { + 'Peers endpoint is up': (r) => r.status === 200, + 'Connected peers retrieved': (r) => Array.isArray(JSON.parse(r.body)) && JSON.parse(r.body).length > 0, + }); + + // Check validator metrics for a specific validator index + const validatorIndex = 12345; // Replace with the actual validator index you're interested in + let metricsRes = http.post(`${consensusUrl}/lighthouse/ui/validator_metrics`, JSON.stringify({ indices: [validatorIndex] }), { + headers: { 'Content-Type': 'application/json' }, + }); + check(metricsRes, { + 'Validator metrics endpoint is up': (r) => r.status === 200, + 'Validator metrics retrieved successfully': (r) => JSON.parse(r.body).attestation_hits !== undefined, + }); + + // Check health status + let healthRes = http.get(`${consensusUrl}/lighthouse/health`, { headers: { 'accept': 'application/json' } }); + check(healthRes, { + 'Health endpoint is up': (r) => r.status === 200, + 'Health status is ok': (r) => JSON.parse(r.body).status === 'ok', // Adjust based on actual response structure + }); + + sleep(1); // Pause for a second between iterations +} \ No newline at end of file diff --git a/.github/network_params.yml b/.github/network_params.yml new file mode 100644 index 00000000..7b671752 --- /dev/null +++ b/.github/network_params.yml @@ -0,0 +1,829 @@ +# 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 + + # The Docker image that should be used for the EL client; leave blank to use the default for the client type + # Defaults by client: + # - geth: ethereum/client-go:latest + # - erigon: thorax/erigon:devel + # - nethermind: nethermind/nethermind:latest + # - besu: hyperledger/besu:develop + # - reth: ghcr.io/paradigmxyz/reth + # - ethereumjs: ethpandaops/ethereumjs:master + # - nimbus-eth1: ethpandaops/nimbus-eth1:master + el_image: "ethereum/client-go:latest" + + # 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 labels the el container should spin up with + # Example; el_extra_labels: {"ethereum-package.partition": "1"} + el_extra_labels: {} + + # A list of optional extra params that will be passed to the EL client container for modifying its behaviour + el_extra_params: [] + + # A list of tolerations that will be passed to the EL client container + # Only works with Kubernetes + # Example: el_tolerations: + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + # toleration_seconds: 3600 + # Defaults to empty + el_tolerations: [] + + # 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 + + # The Docker image that should be used for the CL client; leave blank to use the default for the client type + # Defaults by client: + # - lighthouse: sigp/lighthouse:latest + # - teku: consensys/teku:latest + # - nimbus: statusim/nimbus-eth2:multiarch-latest + # - prysm: gcr.io/prysmaticlabs/prysm/beacon-chain:latest + # - lodestar: chainsafe/lodestar:next + # - grandine: sifrai/grandine:stable + cl_image: "" + + # 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 labels that will be passed to the CL client Beacon container. + # Example; cl_extra_labels: {"ethereum-package.partition": "1"} + cl_extra_labels: {} + + # 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: [] + + # A list of tolerations that will be passed to the CL client container + # Only works with Kubernetes + # Example: el_tolerations: + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + # toleration_seconds: 3600 + # Defaults to empty + cl_tolerations: [] + + # 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 + + # Whether to act as a supernode for the network + # Supernodes will subscribe to all subnet topics + # This flag should only be used with peerdas + # Defaults to false + supernode: false + + # Whether to use a separate validator client attached to the CL client. + # Defaults to false for clients that can run both in one process (Teku, Nimbus) + use_separate_vc: true + + # VC (Validator Client) Specific flags + # The type of validator client that should be used + # Valid values are nimbus, lighthouse, lodestar, teku, and prysm + # ( The prysm validator only works with a prysm CL client ) + # Defaults to matching the chosen CL client (cl_type) + vc_type: "" + + # The Docker image that should be used for the separate validator client + # Defaults by client: + # - lighthouse: sigp/lighthouse:latest + # - lodestar: chainsafe/lodestar:latest + # - nimbus: statusim/nimbus-validator-client:multiarch-latest + # - prysm: gcr.io/prysmaticlabs/prysm/validator:latest + # - teku: consensys/teku:latest + vc_image: "" + + # The number of validator clients to run for this participant + # Defaults to 1 + vc_count: 1 + + # The log level string that this participant's validator 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 + vc_log_level: "" + + # A list of optional extra env_vars the vc container should spin up with + vc_extra_env_vars: {} + + # A list of optional extra labels that will be passed to the validator client validator container. + # Example; vc_extra_labels: {"ethereum-package.partition": "1"} + vc_extra_labels: {} + + # A list of optional extra params that will be passed to the validator client container for modifying its behaviour + # If the client combines the Beacon & validator nodes (e.g. Teku, Nimbus), then this list will also be passed to the combined Beacon-validator node + vc_extra_params: [] + + # A list of tolerations that will be passed to the validator container + # Only works with Kubernetes + # Example: el_tolerations: + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + # toleration_seconds: 3600 + # Defaults to empty + vc_tolerations: [] + + # Resource management for vc containers + # CPU is milicores + # RAM is in MB + # Defaults to 0, which results in no resource limits + vc_min_cpu: 0 + vc_max_cpu: 0 + vc_min_mem: 0 + vc_max_mem: 0 + + # Count of the number of validators you want to run for a given participant + # Default to null, which means that the number of validators will be using the + # network parameter num_validator_keys_per_node + validator_count: null + + # Whether to use a remote signer instead of the vc directly handling keys + # Note Lighthouse VC does not support this flag + # Defaults to false + use_remote_signer: false + + # Remote signer Specific flags + # The type of remote signer that should be used + # Valid values are web3signer + # Defaults to web3signer + remote_signer_type: "web3signer" + + # The Docker image that should be used for the remote signer + # Defaults to "consensys/web3signer:latest" + remote_signer_image: "consensys/web3signer:latest" + + # A list of optional extra env_vars the remote signer container should spin up with + remote_signer_extra_env_vars: {} + + # A list of optional extra labels that will be passed to the remote signer container. + # Example; remote_signer_extra_labels: {"ethereum-package.partition": "1"} + remote_signer_extra_labels: {} + + # A list of optional extra params that will be passed to the remote signer container for modifying its behaviour + remote_signer_extra_params: [] + + # A list of tolerations that will be passed to the remote signer container + # Only works with Kubernetes + # Example: remote_signer_tolerations: + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + # toleration_seconds: 3600 + # Defaults to empty + remote_signer_tolerations: [] + + # Resource management for remote signer containers + # CPU is milicores + # RAM is in MB + # Defaults to 0, which results in no resource limits + remote_signer_min_cpu: 0 + remote_signer_max_cpu: 0 + remote_signer_min_mem: 0 + remote_signer_max_mem: 0 + + # Participant specific flags + # Node selector + # Only works with Kubernetes + # Example: node_selectors: { "disktype": "ssd" } + # Defaults to empty + node_selectors: {} + + # A list of tolerations that will be passed to the EL/CL/validator containers + # This is to be used when you don't want to specify the tolerations for each container separately + # Only works with Kubernetes + # Example: tolerations: + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + # toleration_seconds: 3600 + # Defaults to empty + tolerations: [] + + # Count of nodes to spin up for this participant + # Default to 1 + count: 1 + + # Snooper can be enabled with the `snooper_enabled` flag per client or globally + # Defaults null and then set to global snooper default (false) + snooper_enabled: null + + # Enables Ethereum Metrics Exporter for this participant. Can be set globally. + # Defaults null and then set to global ethereum_metrics_exporter_enabled (false) + ethereum_metrics_exporter_enabled: null + + # Enables Xatu Sentry for this participant. Can be set globally. + # Defaults null and then set to global xatu_sentry_enabled (false) + xatu_sentry_enabled: null + + # 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: {} + + # Blobber can be enabled with the `blobber_enabled` flag per client or globally + # Defaults to false + blobber_enabled: false + + # Blobber extra params can be passed in to the blobber container + # Defaults to empty + blobber_extra_params: [] + + # 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 + + - el_type: geth + el_image: ethereum/client-go:latest + el_log_level: "" + el_extra_env_vars: {} + el_extra_labels: {} + el_extra_params: [] + el_tolerations: [] + el_volume_size: 0 + el_min_cpu: 0 + el_max_cpu: 0 + el_min_mem: 0 + el_max_mem: 0 +# CL + cl_type: lodestar + cl_image: chainsafe/lodestar:next + cl_log_level: "" + cl_extra_env_vars: {} + cl_extra_labels: {} + cl_extra_params: [] + cl_tolerations: [] + cl_volume_size: 0 + cl_min_cpu: 0 + cl_max_cpu: 0 + cl_min_mem: 0 + cl_max_mem: 0 + supernode: false + use_separate_vc: true +# Validator + vc_type: lighthouse + vc_image: sigp/lighthouse:latest-unstable + vc_log_level: "" + vc_count: 1 + vc_extra_env_vars: {} + vc_extra_labels: {} + vc_extra_params: [] + vc_tolerations: [] + vc_min_cpu: 0 + vc_max_cpu: 0 + vc_min_mem: 0 + vc_max_mem: 0 + validator_count: null + use_remote_signer: false + + - el_type: geth + el_image: ethereum/client-go:latest + el_log_level: "" + el_extra_env_vars: {} + el_extra_labels: {} + el_extra_params: [] + el_tolerations: [] + el_volume_size: 0 + el_min_cpu: 0 + el_max_cpu: 0 + el_min_mem: 0 + el_max_mem: 0 +# CL + cl_type: prysm + cl_image: gcr.io/prysmaticlabs/prysm/beacon-chain:latest + cl_log_level: "" + cl_extra_env_vars: {} + cl_extra_labels: {} + cl_extra_params: [] + cl_tolerations: [] + cl_volume_size: 0 + cl_min_cpu: 0 + cl_max_cpu: 0 + cl_min_mem: 0 + cl_max_mem: 0 + supernode: false + use_separate_vc: true +# Validator + vc_type: lighthouse + vc_image: sigp/lighthouse:latest-unstable + vc_log_level: "" + vc_count: 1 + vc_extra_env_vars: {} + vc_extra_labels: {} + vc_extra_params: [] + vc_tolerations: [] + vc_min_cpu: 0 + vc_max_cpu: 0 + vc_min_mem: 0 + vc_max_mem: 0 + validator_count: null + use_remote_signer: false + +# Default configuration parameters for the network +network_params: + # Network name, used to enable syncing of alternative networks + # Defaults to "kurtosis" + # 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: "kurtosis" + + # 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 + + # Max churn rate for the network introduced by + # EIP-7514 https://eips.ethereum.org/EIPS/eip-7514 + # Defaults to 8 + max_per_epoch_activation_churn_limit: 8 + + # Churn limit quotient for the network + # Defaults to 65536 + churn_limit_quotient: 65536 + + # Ejection balance + # Defaults to 16ETH + # 16000000000 gwei + ejection_balance: 16000000000 + + # ETH1 follow distance + # Defaults to 2048 + eth1_follow_distance: 2048 + + # The number of epochs to wait validators to be able to withdraw + # Defaults to 256 epochs ~27 hours + min_validator_withdrawability_delay: 256 + + # The period of the shard committee + # Defaults to 256 epoch ~27 hours + shard_committee_period: 256 + + # The epoch at which the deneb/electra/eip7594(peerdas) forks are set to occur. Note: PeerDAS and Electra clients are currently + # working on forks. So set either one of the below forks. + deneb_fork_epoch: 0 + + electra_fork_epoch: 100000000 + + fulu_fork_epoch: 100000001 + + eip7594_fork_epoch: 100000002 + + # The fork version to set if the eip7594 fork is active + eip7594_fork_version: "0x60000038" + + + # Network sync base url for syncing public networks from a custom snapshot (mostly useful for shadowforks) + # Defaults to "https://snapshots.ethpandaops.io/" + # If you have a local snapshot, you can set this to the local url: + # network_snapshot_url_base = "http://10.10.101.21:10000/snapshots/" + # The snapshots are taken with https://github.com/ethpandaops/snapshotter + network_sync_base_url: https://snapshots.ethpandaops.io/ + + # The number of data column sidecar subnets used in the gossipsub protocol + data_column_sidecar_subnet_count: 128 + # Number of DataColumn random samples a node queries per slot + samples_per_slot: 8 + # Minimum number of subnets an honest node custodies and serves samples from + custody_requirement: 4 + # Maximum number of blobs per block + max_blobs_per_block: 6 + + # 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 + - 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: + # Assertoor docker image to use + # Leave blank to use the default image according to your network params + image: "" + + # 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 + + # Check block propöosals + # This check monitors the chain and succeeds if: + # - all client pairs have proposed a block + run_block_proposal_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 blob transaction test + # This test generates blob transactions and checks inclusion with/from all client pairs + # This test checks for: + # - block proposals with blobs from all client pairs + # - blob inclusion when submitting via each client pair + run_blob_transaction_test: false + + # Run all-opcodes transaction test + # This test generates a transaction that triggers all EVM OPCODES once + # This test checks for: + # - all-opcodes transaction success + run_opcodes_transaction_test: false + + # Run validator lifecycle test (~48h to complete) + # This test requires exactly 500 active validator keys. + # The test will cause a temporary chain unfinality when running. + # This test checks: + # - Deposit inclusion with/from all client pairs + # - BLS Change inclusion with/from all client pairs + # - Voluntary Exit inclusion with/from all client pairs + # - Attester Slashing inclusion with/from all client pairs + # - Proposer Slashing inclusion with/from all client pairs + # all checks are done during finality & unfinality + run_lifecycle_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: [] + + +# If set, the package will block until a finalized epoch has occurred. +wait_for_finalization: false + +# 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 + +# Parallelizes keystore generation so that each node has keystores being generated in their own container +# This will result in a large number of containers being spun up than normal. We advise users to only enable this on a sufficiently large machine or in the cloud as it can be resource consuming on a single machine. +parallel_keystore_generation: 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: false + +# Supports three valeus +# Default: "null" - no mev boost, mev builder, mev flood or relays are spun up +# "mock" - mock-builder & mev-boost are spun up +# "flashbots" - mev-boost, relays, flooder and builder are all spun up, powered by [flashbots](https://github.com/flashbots) +# "mev-rs" - mev-boost, relays and builder are all spun up, powered by [mev-rs](https://github.com/ralexstokes/mev-rs/) +# "commit-boost" - mev-boost, relays and builder are all spun up, powered by [commit-boost](https://github.com/Commit-Boost/commit-boost-client) +# We have seen instances of multibuilder instances failing to start mev-relay-api with non zero epochs +mev_type: null + +# Parameters if MEV is used +mev_params: + # The image to use for MEV boost relay + mev_relay_image: flashbots/mev-boost-relay + # The image to use for the builder + mev_builder_image: ethpandaops/flashbots-builder:main + # The image to use for the CL builder + mev_builder_cl_image: sigp/lighthouse:latest + # The image to use for mev-boost + mev_boost_image: flashbots/mev-boost + # Parameters for MEV Boost. This overrides all arguments of the mev-boost container + mev_boost_args: [] + # Extra parameters to send to the API + mev_relay_api_extra_args: [] + # Extra parameters to send to the housekeeper + mev_relay_housekeeper_extra_args: [] + # Extra parameters to send to the website + mev_relay_website_extra_args: [] + # Extra parameters to send to the builder + mev_builder_extra_args: [] + # Prometheus additional configuration for the mev builder participant. + # Execution, beacon and validator client targets on prometheus will include this configuration. + mev_builder_prometheus_config: + # Scrape interval to be used. Default to 15 seconds + scrape_interval: 15s + # Additional labels to be added. Default to empty + labels: {} + # Image to use for mev-flood + mev_flood_image: flashbots/mev-flood + # Extra parameters to send to mev-flood + mev_flood_extra_args: [] + # Number of seconds between bundles for mev-flood + mev_flood_seconds_per_bundle: 15 + # Optional parameters to send to the custom_flood script that sends reliable payloads + custom_flood_params: + interval_between_transactions: 1 + +# Enables Xatu Sentry for all participants +# Defaults to false +xatu_sentry_enabled: false + +# 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 + +# Apache params +# Apache public port to port forward to local machine +# Default to port None, only set if apache additional service is activated +apache_port: null + +# Global tolerations that will be passed to all containers (unless overridden by a more specific toleration) +# Only works with Kubernetes +# Example: tolerations: +# - key: "key" +# operator: "Equal" +# value: "value" +# effect: "NoSchedule" +# toleration_seconds: 3600 +# Defaults to empty +global_tolerations: [] + +# Global node selector that will be passed to all containers (unless overridden by a more specific node selector) +# Only works with Kubernetes +# Example: global_node_selectors: { "disktype": "ssd" } +# Defaults to empty +global_node_selectors: {} + +# Global parameters for keymanager api +# This will open up http ports to your validator services! +# Defaults to false +keymanager_enabled: false + +# Global flag to enable checkpoint sync across the network +checkpoint_sync_enabled: false + +# Global flag to set checkpoint sync url +checkpoint_sync_url: "" + +# 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 + # remote signer 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 + remote_signer: + enabled: false + public_port_start: 35000 + # Additional services public port exposed to your local machine + # Disabled by default + # Public port start defaults to 36000 + # You can't run multiple enclaves on the same port settings + additional_services: + enabled: false + public_port_start: 36000 diff --git a/.github/scripts/inspect_cluster.sh b/.github/scripts/inspect_cluster.sh new file mode 100755 index 00000000..914a2a9d --- /dev/null +++ b/.github/scripts/inspect_cluster.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# Inspect the Kurtosis enclave and capture the output +output=$(kurtosis enclave inspect my-testnet) + +# Check if the command succeeded +if [[ $? -ne 0 ]]; then + echo "Error: Failed to inspect the enclave 'my-testnet'." + exit 1 +fi + +# Prepare an array to hold endpoint configurations +declare -a endpoints + +# Extract the "User Services" section from the output +services_section=$(echo "$output" | awk '/User Services:/,0' | sed '1d') + +# Debugging: Output the services section for inspection +echo "Services section extracted:" +echo "$services_section" + +# Loop through each line in the services section +while IFS= read -r line; do + # Skip empty or invalid lines + [[ -z "$line" || "$line" =~ ^Search\ results: ]] && continue + + # Debugging: Output each line being processed + echo "Processing line: $line" + + # Extract UUID, Name, and Ports using awk + uuid=$(echo "$line" | awk '{print $1}') + name=$(echo "$line" | awk '{print $2}') + ports=$(echo "$line" | awk '{for(i=3;i<=NF;i++) printf $i " "; print ""}' | sed 's/ *$//') + + # Debugging: Output the extracted UUID, Name, and Ports + echo "UUID: $uuid" + echo "Name: $name" + echo "Ports: $ports" + + # Check if the service is related to an execution client (e.g., Geth, Lodestar, Prysm) + if [[ "$name" == *"geth"* || "$name" == *"lodestar"* || "$name" == *"prysm"* ]]; then + # Extract RPC and Metrics ports using regex + rpc_port=$(echo "$ports" | grep -oP 'rpc: \K[0-9]+' | head -1) + metrics_port=$(echo "$ports" | grep -oP 'metrics: \K[0-9]+' | head -1) + + # Debugging: Output the extracted RPC and Metrics ports + echo "RPC Port: $rpc_port" + echo "Metrics Port: $metrics_port" + + # Check if both RPC and Metrics ports are found + if [[ -n "$rpc_port" && -n "$metrics_port" ]]; then + # Construct the endpoint JSON object and add it to the array + endpoints+=("{\"name\": \"$name\", \"executionUrl\": \"http://localhost:$rpc_port\", \"consensusUrl\": \"http://localhost:$metrics_port\"}") + fi + fi +done <<< "$services_section" + +# Print the array in a usable format +echo "Endpoints array:" +for endpoint in "${endpoints[@]}"; do + echo "$endpoint" +done + +# If you want to return the array to be used later in the script: +# You can access the array like this: +# for endpoint in "${endpoints[@]}"; do +# echo "$endpoint" +# done + diff --git a/.github/workflows/on_release_consensus_tests.yml b/.github/workflows/on_release_consensus_tests.yml new file mode 100644 index 00000000..c7d254c4 --- /dev/null +++ b/.github/workflows/on_release_consensus_tests.yml @@ -0,0 +1,65 @@ +name: Kurtosis Ethereum Cluster Setup and Tests + +on: + push: + branches: + - main + pull_request: + +jobs: + setup-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Kurtosis CLI + run: | + echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list + sudo apt update + sudo apt install -y kurtosis-cli + + - name: Start Kurtosis Engine + run: kurtosis engine start + + - name: Run Ethereum Package with Local Network Params + run: | + # Run the Ethereum Package using the local network_params.yaml file + kurtosis run --enclave my-testnet github.com/ethpandaops/ethereum-package --args-file https://raw.githubusercontent.com/axol-io/assert-in-prod/refs/heads/Add_Nethermind_All_Consenus_clients_tests/.github/network_params.yml + + - name: Load Network Params and Run Ethereum Package + run: | + # Create a local network_params.yaml file from the repository or use an existing one + kurtosis enclave inspect my-testnet + + # - name: Download and build assertoor + # run: | + # # Run assertoor in pipeline + # git clone https://github.com/ethpandaops/assertoor.git && cd assertoor && make build + + # - name: List all files in repo + # run: | + # # Run assertoor in pipeline + # ls -a + + # - name: Run basic eth syncing test + # run: | + # # Run assertoor in pipeline + # ./bin/assertoor --config=https://raw.githubusercontent.com/axol-io/assert-in-prod/refs/heads/Add_Nethermind_All_Consenus_clients_tests/.github/consensus_synced.yaml + + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup K6 + uses: grafana/setup-k6-action@v1 + + - name: Run local k6 test + uses: grafana/run-k6-action@v1 + with: + path: .github/geth.js # Use local path instead of raw URL + flags: --vus 50 --duration 30s + cloud-run-locally: true + cloud-comment-on-pr: true + only-verify-scripts: false + debug: false \ No newline at end of file