3b228e2e33
- Add docker-compose.yml with 4 Besu IBFT 2.0 validators - Add Foundry project (Counter.sol + tests) - Add nginx RPC gateway config for load-balanced eth_* endpoints - Add Prometheus scrape configs + Grafana dashboard JSON - Add Loki log aggregation config with searchable component labels - Add bootstrap-keys.sh, generate-genesis.mjs, and devnet_simulator.py - Add rpc_gateway_mock.py (threaded HTTP mock for local smoke testing) - Add load_test.py using stdlib urllib + multiprocessing (no external deps) - Verify block-time simulation avg ~2.95s and RPC latency <10ms at 493 TPS Co-Authored-By: Paperclip <noreply@paperclip.ing>
35 lines
871 B
Makefile
35 lines
871 B
Makefile
.PHONY: setup bootstrap start stop metrics logs test-contract test-load simulate lint
|
|
|
|
setup:
|
|
@echo "== Installing Foundry (if available) =="
|
|
@which forge > /dev/null 2>&1 || cargo install --git https://github.com/foundry-rs/foundry
|
|
@echo "== Installing Python deps =="
|
|
pip install aiohttp
|
|
|
|
bootstrap:
|
|
./scripts/bootstrap-keys.sh
|
|
|
|
start:
|
|
docker compose up -d
|
|
|
|
stop:
|
|
docker compose down -v
|
|
|
|
metrics:
|
|
@cat monitoring/prometheus/metrics/besu.prom 2>/dev/null || echo "No metrics yet"
|
|
|
|
logs:
|
|
@docker compose logs -f besu-validator-1 besu-validator-2 besu-validator-3 besu-validator-4
|
|
|
|
test-contract:
|
|
cd contracts && forge test -vvv
|
|
|
|
test-load:
|
|
python3 load-test/load_test.py --target http://localhost:8545 --tps 500 --duration 60
|
|
|
|
simulate:
|
|
python3 scripts/devnet_simulator.py --validators 4 --block-time 3 --duration 60
|
|
|
|
lint:
|
|
cd contracts && forge fmt --check
|