Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Layr-Labs/nitro-testnode into eigen…
Browse files Browse the repository at this point in the history
…da-v3.3.2
  • Loading branch information
ethenotethan committed Jan 13, 2025
2 parents fa19e22 + 0d0e162 commit b43878c
Show file tree
Hide file tree
Showing 15 changed files with 4,482 additions and 27 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ jobs:
restore-keys: ${{ runner.os }}-buildx-

- name: Startup Nitro testnode
run: ${{ github.workspace }}/.github/workflows/testnode.bash --init-force ${{ (matrix.l3node == 'l3node' && '--l3node') || (matrix.l3node == 'l3node-token-6' && '--l3node --l3-fee-token --l3-token-bridge --l3-fee-token-decimals 6') || '' }} ${{ matrix.tokenbridge == 'tokenbridge' && '--tokenbridge' || '--no-tokenbridge' }} --no-simple --detach ${{ matrix.pos == 'pos' && '--pos' || '' }}
env:
EIGENDA_SIGNER_PRIVATE_KEY: ${{ secrets.EIGENDA_SIGNER_PRIVATE_KEY }}
run: EIGENDA_SIGNER_PRIVATE_KEY=$EIGENDA_SIGNER_PRIVATE_KEY ${{ github.workspace }}/.github/workflows/testnode.bash --init-force ${{ (matrix.l3node == 'l3node' && '--l3node') || (matrix.l3node == 'l3node-token-6' && '--l3node --l3-fee-token --l3-token-bridge --l3-fee-token-decimals 6') || '' }} ${{ matrix.tokenbridge == 'tokenbridge' && '--tokenbridge' || '--no-tokenbridge' }} --no-simple --detach ${{ matrix.pos == 'pos' && '--pos' || '' }}
47 changes: 47 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and publish forkdiff github-pages
permissions:
contents: read
pages: write
id-token: write
on:
push:
branches:
- main

jobs:
build:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1000 # make sure to fetch the old commit we diff against

- name: Build forkdiff
uses: "docker://protolambda/forkdiff:0.1.0"
with:
args: -repo=/github/workspace -fork=/github/workspace/fork.yaml -out=/github/workspace/index.html

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
91 changes: 78 additions & 13 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
- --authrpc.port=8551
- --authrpc.addr=0.0.0.0
- --http.vhosts=*
- --http.api=engine,personal,eth,net,web3
- --http.api=engine,personal,eth,net,web3,debug
- --http.corsdomain=*
- --ws
- --ws.addr=0.0.0.0
Expand Down Expand Up @@ -167,7 +167,7 @@ services:
- "l1keystore:/home/user/l1keystore"
- "config:/config"
- "tokenbridge-data:/tokenbridge-data"
command: --conf.file /config/sequencer_config.json --node.feed.output.enable --node.feed.output.port 9642 --http.api net,web3,eth,txpool,debug --node.seq-coordinator.my-url ws://sequencer:8548 --graphql.enable --graphql.vhosts * --graphql.corsdomain *
command: --conf.file /config/sequencer_config.json --node.feed.output.enable --node.feed.output.port 9642 --http.api net,web3,eth,txpool,debug --node.seq-coordinator.my-url ws://sequencer:8548 --graphql.enable --graphql.vhosts * --graphql.corsdomain --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- geth

Expand All @@ -181,7 +181,7 @@ services:
volumes:
- "seqdata_b:/home/user/.arbitrum/local/nitro"
- "config:/config"
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_b:8548
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_b:8548 --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- geth
- redis
Expand All @@ -196,7 +196,7 @@ services:
volumes:
- "seqdata_c:/home/user/.arbitrum/local/nitro"
- "config:/config"
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_c:8548
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_c:8548 --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- geth
- redis
Expand All @@ -211,7 +211,7 @@ services:
volumes:
- "seqdata_d:/home/user/.arbitrum/local/nitro"
- "config:/config"
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_d:8548
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_d:8548 --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- geth
- redis
Expand All @@ -227,7 +227,7 @@ services:
- "unsafestaker-data:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/unsafe_staker_config.json
command: --conf.file /config/unsafe_staker_config.json --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- sequencer
- redis
Expand All @@ -244,7 +244,7 @@ services:
- "poster-data:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/poster_config.json
command: --conf.file /config/poster_config.json --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- geth
- redis
Expand All @@ -260,7 +260,7 @@ services:
- "poster-data-b:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/poster_config.json
command: --conf.file /config/poster_config.json --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- geth
- redis
Expand All @@ -276,7 +276,7 @@ services:
- "poster-data-c:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/poster_config.json
command: --conf.file /config/poster_config.json --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- geth
- redis
Expand All @@ -292,7 +292,7 @@ services:
- "validator-data:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/validator_config.json --http.port 8547 --http.api net,web3,arb,debug --ws.port 8548
command: --conf.file /config/validator_config.json --http.port 8547 --http.api net,web3,arb,debug --ws.port 8548 --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- sequencer
- validation_node
Expand All @@ -308,7 +308,7 @@ services:
- "validator-data:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/l3node_config.json --http.port 3347 --http.api net,web3,arb,debug,eth --ws.port 3348
command: --conf.file /config/l3node_config.json --http.port 3347 --http.api net,web3,arb,debug,eth --ws.port 3348 --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0
depends_on:
- sequencer
- validation_node
Expand All @@ -321,7 +321,7 @@ services:
- "127.0.0.1:8949:8549"
volumes:
- "config:/config"
command: --conf.file /config/validation_node_config.json
command: --conf.file /config/validation_node_config.json --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0

scripts:
build: scripts/
Expand All @@ -336,7 +336,7 @@ services:
entrypoint: /usr/local/bin/relay
ports:
- "127.0.0.1:9652:9652"
command: --chain.id 412346 --node.feed.input.url ws://sequencer:9642 --node.feed.output.port 9652
command: --chain.id 412346 --node.feed.input.url ws://sequencer:9642 --node.feed.output.port 9652 --metrics --pprof --metrics-server.addr 0.0.0.0 --pprof-cfg.addr 0.0.0.0

tokenbridge:
depends_on:
Expand Down Expand Up @@ -415,6 +415,69 @@ services:
command:
- --conf.file=/config/l2_das_mirror.json

eigenda_proxy:
container_name: eigenda-proxy
image: ghcr.io/layr-labs/eigenda-proxy:v1.6.1
environment:
- EIGENDA_PROXY_ADDR=0.0.0.0
- EIGENDA_PROXY_PORT=4242
- EIGENDA_PROXY_MEMSTORE_ENABLED=true
## Disable this when using real testnet
- EIGENDA_PROXY_EIGENDA_CERT_VERIFICATION_DISABLED=true
- EIGENDA_PROXY_MEMSTORE_EXPIRATION=45m
- EIGENDA_PROXY_EIGENDA_SIGNER_PRIVATE_KEY_HEX=$EIGENDA_SIGNER_PRIVATE_KEY
- EIGENDA_PROXY_EIGENDA_DISPERSER_RPC=disperser-holesky.eigenda.xyz:443
## Uncomment these when pointed against real testnet
# - EIGENDA_PROXY_EIGENDA_SERVICE_MANAGER_ADDR=0xD4A7E1Bd8015057293f0D0A557088c286942e84b
# - EIGENDA_PROXY_EIGENDA_ETH_RPC=https://ethereum-holesky-rpc.publicnode.com
# - EIGENDA_PROXY_EIGENDA_CONFIRMATION_DEPTH=0
- EIGENDA_PROXY_METRICS_ADDR=0.0.0.0
- EIGENDA_PROXY_METRICS_ENABLED=true
- EIGENDA_PROXY_METRICS_PORT=7300
ports:
- 4242:4242
- 7300:7300

prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
command:
- "--config.file=/etc/prometheus/prometheus.yml"

grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/:ro
- ./grafana/dashboards:/var/lib/grafana/dashboards
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
depends_on:
- prometheus

loki:
image: grafana/loki:3.1.1
restart: unless-stopped
volumes:
- ./loki:/etc/loki
ports:
- 3200:3200
command: -config.file=/etc/loki/config.yaml

promtail:
image: grafana/promtail:3.1.1
restart: unless-stopped
volumes:
- ./promtail:/etc/promtail
- /var/run/docker.sock:/var/run/docker.sock # Mount Docker socket to read container logs
command: -config.file=/etc/promtail/config.yaml

volumes:
l1data:
consensus:
Expand All @@ -428,9 +491,11 @@ volumes:
poster-data:
poster-data-b:
poster-data-c:
grafana-data:
config:
postgres-data:
tokenbridge-data:
das-committee-a-data:
das-committee-b-data:
das-mirror-data:

78 changes: 78 additions & 0 deletions fork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
title: "layr-labs/nitro-testnode" # Define the HTML page title
logo: "logo.png"
footer: | # define the footer with markdown
[Nitro Testnode](https://github.com/Layr-Labs/nitro-testnode) fork overview &middot created with [Forkdiff](https://github.com/protolambda/forkdiff)
base:
name: OffchainLabs/nitro-testnode
url: https://github.com/OffchainLabs/nitro-testnode
hash: f328006579cbefe22c6c57de3d6b86397fde4438
fork:
name: Layr-Labs/nitro-testnode
url: https://github.com/Layr-Labs/nitro-testnode
ref: refs/heads/main

def:
title: "Nitro Testnode Fork Diff"
description: | # description in markdown
The original nitro codebase can be found at [`github.com/OffchainLabs/nitro-testnode`](https://github.com/OffchainLabs/nitro).
And the fork at [`github.com/Layr-Labs/nitro-testnode`](https://github.com/Layr-Labs/nitro).
sub:

- title: "EigenDA Support"
description: |
Added support for EigenDA:
- Updated config generation script to express EigenDA chain params
- Updated rollup creator deployment script to target `layr-labs/nitro-contracts`
- Updated core docker compose to wire EigenDA proxy dependency
globs:
- "scripts/config.ts"
- "rollupcreator/Dockerfile"
- "docker-compose.yaml"

- title: "Observability"
description: |
Added optional observability to the testnode environment:
- Prometheus agent for collecting service metrics
- Loki for log collecting
- PProf on sequencer resources to capture key performance metrics
- Grafana dashboard to capture key throughput and reliability metrics
Observability can be enabled by passing `--monitor` to the root level `test-node.bash` script.
globs:
- "loki/**"
- "grafana/**"
- "prometheus/**"
- "promtail/**"
- "test-node.bash"

- title: "Throughput Testing"
description: |
Added a `flood.ts` script which generates tx traffic targeting a specific byte rate.
E.g:
```
docker compose run scripts flood --serial true --rounds 1000 --targetThroughput 100_000
```
This will target 100,000 Kb/s.
globs:
- "scripts/index.ts"
- "scripts/flood.ts"





ignore:
- "grafana/dashboards/Throughput-testing.json"
Loading

0 comments on commit b43878c

Please sign in to comment.