Skip to content

Commit

Permalink
feat: script to simulate network flood
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Aug 23, 2024
1 parent f988ca1 commit 037f87d
Show file tree
Hide file tree
Showing 10 changed files with 851 additions and 16 deletions.
50 changes: 38 additions & 12 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,14 @@ services:
- "127.0.0.1:8547:8547"
- "127.0.0.1:8548:8548"
- "127.0.0.1:9642:9642"
- "127.0.0.1:6070:6070"
- "127.0.0.1:6071:6071"
volumes:
- "seqdata:/home/user/.arbitrum/local/nitro"
- "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 @@ -175,7 +177,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 @@ -190,7 +192,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 @@ -205,7 +207,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 @@ -221,7 +223,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 @@ -238,7 +240,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 @@ -254,7 +256,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 @@ -270,7 +272,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 @@ -286,7 +288,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 @@ -302,7 +304,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 @@ -315,7 +317,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 @@ -330,7 +332,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 @@ -372,6 +374,29 @@ services:
ports:
- 4242:4242

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

volumes:
l1data:
consensus:
Expand All @@ -385,6 +410,7 @@ volumes:
poster-data:
poster-data-b:
poster-data-c:
grafana-data:
config:
postgres-data:
tokenbridge-data:
Loading

0 comments on commit 037f87d

Please sign in to comment.