Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ leanSpec:
leanSpec/fixtures: leanSpec
cd leanSpec && uv run fill --fork devnet --scheme=prod -o fixtures

# lean-quickstart:
# git clone https://github.com/blockblaz/lean-quickstart.git --depth 1 --single-branch
lean-quickstart:
git clone https://github.com/blockblaz/lean-quickstart.git --depth 1 --single-branch


# TODO: start metrics too
run-devnet: docker-build lean-quickstart ## 🚀 Run a local devnet using lean-quickstart
cargo build \
&& cd lean-quickstart \
&& NETWORK_DIR=local-devnet ./spin-node.sh --node zeam_0,ethlambda_0 --generateGenesis --metrics
# Go to lean-quickstart/local-devnet/genesis/validator-config.yaml to modify
# the validator configuration for the local devnet.
# NOTE: to run the local image of ethlambda, make sure to set the image tag
# in lean-quickstart/client-cmds/ethlambda-cmd.sh to "ghcr.io/lambdaclass/ethlambda:local"
cd lean-quickstart \
&& NETWORK_DIR=local-devnet ./spin-node.sh --node all --generateGenesis --metrics
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,8 @@ Run `make help` or take a look at our [`Makefile`](./Makefile) for other useful
To run a local devnet with multiple clients using [lean-quickstart](https://github.com/blockblaz/lean-quickstart):

```sh
# Clone lean-quickstart (if not already present)
git clone https://github.com/blockblaz/lean-quickstart.git

# Build the ethlambda Docker image
make docker-build

# Run a 3-client devnet (zeam, ream, ethlambda)
cd lean-quickstart
NETWORK_DIR=local-devnet ./spin-node.sh --node zeam_0,ream_0,ethlambda_0 --generateGenesis --metrics
# This will clone lean-quickstart, build the docker image, and start a local devnet
make run-devnet
```

This generates fresh genesis files and starts all three clients with metrics enabled.
Expand Down
2 changes: 1 addition & 1 deletion crates/blockchain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl BlockChainServer {
metrics::update_head_slot(slot);
metrics::update_latest_justified_slot(self.store.latest_justified().slot);
metrics::update_latest_finalized_slot(self.store.latest_finalized().slot);
metrics::update_validators_count(self.store.head_state().validators.len() as u64);
metrics::update_validators_count(self.key_manager.validator_ids().len() as u64);
Ok(())
}

Expand Down
7 changes: 7 additions & 0 deletions metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ To remove all data volumes:
```bash
docker compose -f docker-compose-metrics.yaml down -v
```

## Troubleshooting

### Docker Desktop on MacOS

lean-quickstart uses the host network mode for Docker containers, which is a problem on MacOS.
To work around this, enable the ["Enable host networking" option](https://docs.docker.com/enterprise/security/hardened-desktop/settings-management/settings-reference/#enable-host-networking) in Docker Desktop settings under Resources > Network.
2 changes: 1 addition & 1 deletion metrics/grafana/dashboards/client-interop-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": ".*ream.*|.*zeam.*|.*qlean.*|.*lantern.*",
"regex": ".*ream.*|.*zeam.*|.*qlean.*|.*lantern.*|.*ethlambda.*",
"type": "query"
}
]
Expand Down
22 changes: 11 additions & 11 deletions metrics/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ global:
monitor: "ethlambda-metrics"

scrape_configs:
- job_name: "ethlambda"
- job_name: "ethlambda_0"
static_configs:
- targets: ["host.docker.internal:8008"]
- targets: ["host.docker.internal:8087"]
labels:
client: "ethlambda"
client: "ethlambda_0"
instance: "local"

# Add additional scrape targets for other Lean Ethereum clients
# - job_name: 'ream'
# - job_name: "ream_0"
# static_configs:
# - targets: ['host.docker.internal:8009']
# - targets: ["host.docker.internal:8082"]
# labels:
# client: 'ream'
# instance: 'local'
# client: "ream_0"
# instance: "local"

# - job_name: 'zeam'
# - job_name: "zeam_0"
# static_configs:
# - targets: ['host.docker.internal:8010']
# - targets: ["host.docker.internal:8081"]
# labels:
# client: 'zeam'
# instance: 'local'
# client: "zeam_0"
# instance: "local"

# Prometheus self-monitoring
- job_name: "prometheus"
Expand Down