Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
juan518munoz committed Nov 8, 2024
1 parent 939566a commit 2848d23
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
28 changes: 28 additions & 0 deletions core/node/da_clients/src/eigen/eigenda-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,34 @@ You may enable observability here if you want to.
zkstack server --chain eigen_da
```

### Data Availability Grafana Metrics

1. Get the running port of the eigen_da chain in the `chains/eigen_da/configs/general.yaml` file:

```yaml
prometheus:
listener_port: 3414 # <- this is the port
```

(around line 108)

Then modify the `era-observability/etc/prometheus/prometheus.yml` with the retrieved port:

```yaml
scrape_interval: 5s
honor_labels: true
static_configs:
- targets: ['host.docker.internal:3312'] # <- change this to the port
```

2. Enable the Data Availability Grafana dashboard

```bash
mv era-observability/additional_dashboards/EigenDA.json era-observability/dashboards/EigenDA.json
```

3. Restart the era-observability container

### Testing

Modify the following flag in `core/lib/config/src/configs/da_dispatcher.rs` (then restart the server)
Expand Down
26 changes: 26 additions & 0 deletions zkstack_cli/crates/common/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,29 @@ pub fn pull(shell: &Shell, link_to_code: PathBuf) -> anyhow::Result<()> {
Cmd::new(cmd!(shell, "git pull origin {current_branch}")).run()?;
Ok(())
}

pub fn add_remote(
shell: &Shell,
link_to_code: PathBuf,
remote_name: &str,
remote_url: &str,
) -> anyhow::Result<()> {
let _dir_guard = shell.push_dir(link_to_code);
match Cmd::new(cmd!(shell, "git remote add {remote_name} {remote_url}")).run() {
Ok(_) => {}
Err(e) => {
if !e.to_string().contains("already exists") {
return Err(e.into());
}
}
}

Cmd::new(cmd!(shell, "git fetch {remote_name}")).run()?;
Ok(())
}

pub fn checkout(shell: &Shell, link_to_code: PathBuf, branch: &str) -> anyhow::Result<()> {
let _dir_guard = shell.push_dir(link_to_code);
Cmd::new(cmd!(shell, "git checkout {branch}")).run()?;
Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ pub fn run(shell: &Shell) -> anyhow::Result<()> {
ERA_OBSERBAVILITY_GIT_REPO,
ERA_OBSERBAVILITY_DIR,
)?;
spinner.finish();

// Add lambda remote and checkout to `eigenda` for DA metrics
git::add_remote(
shell,
path_to_era_observability.clone(),
"lambda",
"https://github.com/lambdaclass/era-observability.git",
)?;
git::checkout(shell, path_to_era_observability.clone(), "eigenda")?;

spinner.finish();
Ok(())
}

0 comments on commit 2848d23

Please sign in to comment.