This directory contains scripts for running a local end-to-end test of the AVS stack.
The test validates the complete end-to-end flow:
- Local Blockchain Setup: Starts a local Ethereum blockchain and deploys EigenLayer contracts
- BLS Signature Aggregation: Runs the router and 3 operator nodes
- Verification: Confirms that the counter contract was incremented at least twice through successful signature aggregation
router_e2e_local.sh- Main integration test scriptverify_increments.rs- Rust script that monitors and verifies counter incrementsCargo.toml- Dependencies for the verification script (packagecommonware-avs-scripts)
- Docker
- Rust
# From the project root
./scripts/router_e2e_local.shThe script will:
- Build the verification script
- Set up environment files for local mode
- Pull and start Docker Compose services (Ethereum, EigenLayer, signer, 3 nodes, router)
- Wait for EigenLayer setup and give the nodes time to initialize
- Wait for signature aggregation cycles
- Verify the counter was incremented at least twice
- Clean up all containers
✅ Integration test PASSED! Counter was incremented successfully.
The same flow runs in GitHub Actions:
.github/workflows/integration-test.yml— full Docker build, on push/PR tomain/dev/staging.github/workflows/local-integration-test.yml— pulls prebuilt node images and runs the router viacargo run(no Docker build), on PRs tomain/dev/staging
-
Docker containers fail to start
- Check if ports 8545, 3001-3003, 4000 are available
- Ensure Docker daemon is running
-
Contract deployment timeout
- Increase the timeout in the script
- Check Docker logs:
docker compose logs
-
Nodes fail to connect
- Verify keyfiles exist in
config/.nodes/operator_keys/ - Check network connectivity between processes
- Verify keyfiles exist in
-
Not Using Funded Private Key
- Ensure
PRIVATE_KEYin.envhas sufficient ETH for transactions - Check balance:
cast balance $(cast --from-utf8 $(cast --private-key $PRIVATE_KEY)) - Fund if needed:
cast send --private-key $PRIVATE_KEY --value 1ether <address>
- Ensure
On failure, the script prints docker compose logs output for the router,
each node, and EigenLayer.
You can also run the verification script separately once the stack is running:
source .env
export AVS_DEPLOYMENT_PATH="config/.nodes/avs_deploy.json"
cargo run -p commonware-avs-scripts --release --bin verify_incrementsPRIVATE_KEY- private key for transactions