Skip to content

Commit

Permalink
feat(devnet): use eigenda
Browse files Browse the repository at this point in the history
- update README
- create make altda-devnet-up command
- swap da-server for eigenda-proxy
- use redis-cache for eigenda-proxy
  • Loading branch information
samlaf committed Sep 27, 2024
1 parent 396d014 commit 44a711f
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ devnet-up: pre-devnet ## Starts the local devnet
PYTHONPATH=./bedrock-devnet $(PYTHON) ./bedrock-devnet/main.py --monorepo-dir=.
.PHONY: devnet-up

altda-devnet-up:
@( \
set -a; source .env; set +a; \
DEVNET_ALTDA=true GENERIC_ALTDA=true make devnet-up; \
)

devnet-test: pre-devnet ## Runs tests on the local devnet
make -C op-e2e test-devnet
.PHONY: devnet-test
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

- [devnet with eigenda alt-da](#devnet-with-eigenda-alt-da)
- [What is Optimism?](#what-is-optimism)
- [Documentation](#documentation)
- [Specification](#specification)
Expand All @@ -26,6 +27,12 @@

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## devnet with eigenda alt-da

Run `make altda-devnet-up` to start the devnet with the eigenda proxy as alt-da, which sends batches to `disperser-holesky.eigenda.xyz` (I think this is preprod?).

This will also start a grafana instance, which you can access at `http://localhost:3000` with user:pw `admin:admin`.

## What is Optimism?

[Optimism](https://www.optimism.io/) is a project dedicated to scaling Ethereum's technology and expanding its ability to coordinate people from across the world to build effective decentralized economies and governance systems. The [Optimism Collective](https://www.optimism.io/vision) builds open-source software that powers scalable blockchains and aims to address key governance and economic challenges in the wider Ethereum ecosystem. Optimism operates on the principle of **impact=profit**, the idea that individuals who positively impact the Collective should be proportionally rewarded with profit. **Change the incentives and you change the world.**
Expand Down
4 changes: 2 additions & 2 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ def devnet_deploy(paths):

# Optionally bring up Alt-DA Mode components.
if DEVNET_ALTDA:
log.info('Bringing up `da-server`, `sentinel`.') # TODO(10141): We don't have public sentinel images yet
run_command(['docker', 'compose', 'up', '-d', 'da-server'], cwd=paths.ops_bedrock_dir, env=docker_env)
log.info('Bringing up `da-server`, `redis-cache`.') # TODO(10141): We don't have public sentinel images yet
run_command(['docker', 'compose', 'up', '-d', 'da-server', 'redis-cache'], cwd=paths.ops_bedrock_dir, env=docker_env)

# Fin.
log.info('Devnet ready.')
Expand Down
43 changes: 40 additions & 3 deletions ops-bedrock/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,23 @@ services:
OP_BATCHER_L1_ETH_RPC: http://l1:8545
OP_BATCHER_L2_ETH_RPC: http://l2:8545
OP_BATCHER_ROLLUP_RPC: http://op-node:8545
OP_BATCHER_MAX_CHANNEL_DURATION: 2
OP_BATCHER_MAX_CHANNEL_DURATION: 10 # 10 L1 blocks = 60 seconds
OP_BATCHER_SUB_SAFETY_MARGIN: 4 # SWS is 15, ChannelTimeout is 40
OP_BATCHER_POLL_INTERVAL: 1s
OP_BATCHER_POLL_INTERVAL: 2s
OP_BATCHER_NUM_CONFIRMATIONS: 1
OP_BATCHER_MAX_PENDING_TX: 0 # no limit
OP_BATCHER_MNEMONIC: test test test test test test test test test test test junk
OP_BATCHER_SEQUENCER_HD_PATH: "m/44'/60'/0'/0/2"
OP_BATCHER_PPROF_ENABLED: "true"
OP_BATCHER_METRICS_ENABLED: "true"
OP_BATCHER_RPC_ENABLE_ADMIN: "true"
OP_BATCHER_BATCH_TYPE: 1
OP_BATCHER_BATCH_TYPE: 0
OP_BATCHER_ALTDA_ENABLED: "${ALTDA_ENABLED}"
OP_BATCHER_ALTDA_DA_SERVICE: "${ALTDA_SERVICE}"
OP_BATCHER_ALTDA_DA_SERVER: "http://da-server:3100"
OP_BATCHER_DATA_AVAILABILITY_TYPE: "${DA_TYPE}"
OP_BATCHER_ALTDA_MAX_CONCURRENT_DA_REQUESTS: 200
OP_BATCHER_TARGET_NUM_FRAMES: 16

op-challenger:
depends_on:
Expand Down Expand Up @@ -238,6 +241,40 @@ services:
OP_CHALLENGER_NUM_CONFIRMATIONS: 1

da-server:
# platform: linux/amd64
image: ghcr.io/layr-labs/eigenda-proxy:dev
depends_on:
- redis-cache
environment:
EIGENDA_PROXY_ADDR: 0.0.0.0
EIGENDA_PROXY_PORT: 3100
EIGENDA_PROXY_METRICS_ENABLED: true
EIGENDA_PROXY_METRICS_PORT: 7300
# MEMSTORE_ENABLED=true means data id only stored in a memcache inside the proxy,
# and is not forwarded to eigenda.
MEMSTORE_ENABLED: ${MEMSTORE_ENABLED-true}
MEMSTORE_EXPIRATION: 45m
MEMSTORE_PUT_LATENCY: 1m
MEMSTORE_GET_LATENCY: 1s
# if MEMSTORE_ENABLED=false, then these variables need to be set properly to connect to eigenda
EIGENDA_PROXY_EIGENDA_DISPERSER_RPC: disperser-preprod-holesky.eigenda.xyz:443
EIGENDA_PROXY_SERVICE_MANAGER_ADDR: ${EIGENDA_PROXY_SERVICE_MANAGER_ADDR}
EIGENDA_PROXY_SIGNER_PRIVATE_KEY_HEX: ${EIGENDA_PROXY_SIGNER_PRIVATE_KEY_HEX}
EIGENDA_PROXY_ETH_RPC: ${EIGENDA_PROXY_ETH_RPC}
EIGENDA_PROXY_REDIS_ENDPOINT: redis-cache:6379
EIGENDA_PROXY_REDIS_EVICTION: 1h
EIGENDA_PROXY_CACHE_TARGETS: "redis"
EIGENDA_PROXY_ETH_CONFIRMATION_DEPTH: 0 # don't wait for finality (-1)
ports:
- 3100:3100
- 6969:7300

# for eigenda-proxy da-server
redis-cache:
image: redis:7.0.11
ports:
- "6379:6379"

grafana:
image: grafana/grafana:11.1.0
restart: unless-stopped
Expand Down

0 comments on commit 44a711f

Please sign in to comment.