Warning
Kurtosis must be installed.
To start a local network run:
make ethereum_package_startTo see the status of the network run:
make ethereum_package_inspectThis will show you all the containers running and their respective ports. The most interesting ones are prometheus, grafana and el_forkmon, they will provide you with metrics to see the gasPrice, gasUsed, txPerBlock, and others that will be in our interest to create chaos on the network.
To stop the network run the following:
make ethereum_package_rmTo start the batcher run:
make batcher_start_ethereum_packageTo start the aggregator run:
make aggregator_start_ethereum_packageTo start an operator run:
make operator_full_registration_and_start_ethereum_packageIf you want to deploy more operators, you must duplicate the config-operator-1-ethereum-package.yaml and change the private and bls keys and the address.
To start Telemetry and the Explorer, run the usual commands:
make telemetry_start_all
make explorer_startTo spam transactions install spamoor:
make spamoor_installand run the following make targets:
make spamoor_send_transactions \\
COUNT=<TOTAL_TX_TO_EXECUTE> \\
TX_PER_BLOCK=<LIMIT_OF_TXS_TO_SEND_PER_BLOCK> \\
TX_CONSUME_GAS=<HOW_MUCH_GAS_TO_USE_PER_TX> \\
NUM_WALLETS=<NUMBER_OF_WALLETS_FROM_WHICH_TO_SEND_TXS> \\
TIP_FEE=<TIP_FEE_IN_GWEI>For Example:
make spamoor_send_transactions COUNT=1000 TX_CONSUME_GAS=150000 TX_PER_BLOCK=50 NUM_WALLETS=100 TIP_FEE=2You can check the network status using Grafana and el_forkmon explorer.
Run make ethereum_package_inspect to see the exposed ports for the enabled services. You can check for example the Grafana panels under Dashboards -> Ethereum Metrics Exporter Overview which provides useful information about the network.
To adjust network params you have to modify network_params.yaml.
Note
We are using a hardcoded input to deploy Eigen and Aligned contracts using the output from anvil.
To increment the gas price and make transactions compete with aligned transactions we need to:
- Exceed the block
gasLimit(30 million): This is achieved by ensuring the total gas consumed per block is greater than30,000,000. Calculate it as:TX_CONSUME_GAS * TX_PER_BLOCK - Raise the
tipFeeslightly above the current gas price: For instance, if the currentgasPriceis20 GWEI, you can generate spam transactions with:
make spamoor_send_transactions COUNT=1000000000 TX_CONSUME_GAS=150000 TX_PER_BLOCK=210 NUM_WALLETS=1000 TIP_FEE=22- Notes:
- A transaction consuming
150000of gas would be similar to a bridge swap. - We pass
2gwei more to thetipFeethat should be enough if not, you can increase it.
- A transaction consuming
- Monitor Gas Price Updates: After a few blocks, the
gasPricewill adjust. The aligned batcher and aggregator will fetch the updatedgasPriceand start competing in the mempool with their adjusted bump. - Repeat as Needed: Re-run the same command with the updated
TIP_FEEto maintain competition:
make spamoor_send_transactions COUNT=1000000000 TX_CONSUME_GAS=150000 TX_PER_BLOCK=210 NUM_WALLETS=1000 TIP_FEE=<new_tip_fee>- First, deploy the new contracts in Anvil:
make anvil_deploy_aligned_contractsThat will generate the state output in contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
- Filter the contracts' state:
jq '.accounts | to_entries | map(select(.value.code != "0x")) | from_entries' contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json > contracts.json- Open the
network_params.yamlfile and replace theadditional_preloaded_contractssection with the content ofcontracts.json.