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>
2.1 KiB
2.1 KiB
JCC Local Devnet
3-node Hyperledger Besu devnet with IBFT 2.0 consensus.
Prerequisites
- Docker Engine ≥ 24.0
- Docker Compose ≥ 2.20
jq(for scripts)- Ports
8545and8546free on localhost
Start / Stop / Reset
cd scripts
./devnet-up.sh # creates network, volumes, and starts 3 validators
./devnet-down.sh # stops containers but preserves data
./devnet-reset.sh # stops containers and wipes chain data
Validator Endpoints
| Validator | JSON-RPC (HTTP) | WS | Metrics |
|---|---|---|---|
| validator-1 | http://localhost:8545 | ws://localhost:8546 | http://localhost:9545 |
| validator-2 | http://localhost:8547 | ws://localhost:8548 | http://localhost:9546 |
| validator-3 | http://localhost:8549 | ws://localhost:8550 | http://localhost:9547 |
Genesis & Keys
besu-config/genesis.json— reproducible genesis block.validator-keys/— devnet-only private node keys and IBFT extra-data.
Block Production Verification
After devnet-up.sh, run:
curl -s -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | jq
You should see a hex block number ≥ 0x1 within ~30 seconds of startup.
Troubleshooting
- Port conflicts: edit
scripts/devnet-up.shport mappings or stop conflicting services. - Permission denied: ensure
scripts/*.share executable (chmod +x scripts/*.sh). - Peers not connecting: check
docker network inspect jcc-devnetand validator logs.
Files
docker-compose.yml— service definitionsbesu-config/genesis.json— genesis blockvalidator-keys/— node keys (key,key.pub,address) andibftExtraDatascripts/— operational helpers
Notes
- Validator keys are intentionally static for reproducibility on devnet.
- Prometheus targets are auto-configured in
monitoring/prometheus/prometheus.yml. - Grafana dashboard JSON is in
monitoring/grafana/dashboards/besu-overview.json.
For CI image build instructions, see .github/workflows/README.md.