plasma: add testnet compose + assets (reth + plasma-consensus)

Canonicalize plasma-testnet so the tracked compose adopts the same
volume/service names as the de-32 hand-written override (rpc_plasma-
testnet-reth-pruned-trace-{execution,consensus,jwt}). Also refresh
mainnet observer sed to be chain-agnostic.
This commit is contained in:
2026-07-19 04:15:45 +00:00
parent 95360bd238
commit db81e62c73
25 changed files with 530 additions and 2 deletions

View File

@@ -8520,6 +8520,24 @@
"plasma-mainnet-reth-pruned-trace-jwt"
]
},
{
"chain": "testnet",
"client": "reth",
"compose_file": "plasma/reth/plasma-testnet-reth-pruned-trace",
"features": [
"trace"
],
"network": "plasma",
"node": "plasma-consensus",
"relay": null,
"stack": null,
"type": "pruned",
"volumes": [
"plasma-testnet-reth-pruned-trace-consensus",
"plasma-testnet-reth-pruned-trace-execution",
"plasma-testnet-reth-pruned-trace-jwt"
]
},
{
"chain": "amoy",
"client": "bor",

View File

@@ -207,11 +207,12 @@ services:
entrypoint: [/bin/bash, -c]
command:
- |
sed 's|http://plasma-mainnet:8551|http://plasma-mainnet:8551|g' /config/non-validator.toml > /tmp/non-validator.toml
# Rewrite engine_api_url to this compose service (mainnet/testnet tomls ship chain-specific hosts).
sed -E 's|http://[^[:space:]/"]+:8551|http://plasma-mainnet:8551|g' /config/non-validator.toml > /tmp/non-validator.toml
exec plasma-cli observer \
--config-path /tmp/non-validator.toml \
--no-color \
--timeout-stream-manager 10ms \
--timeout-stream-manager 5s \
--telemetry.enable-metrics \
--telemetry.enable-health \
--telemetry.host 0.0.0.0 \

View File

@@ -0,0 +1,264 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "512m"
max-file: "2"
# Usage:
#
# mkdir rpc && cd rpc
#
# git init
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
# git fetch origin vibe
# git checkout origin/vibe
#
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
#
# env
# ...
# IP=$(curl ipinfo.io/ip)
# DOMAIN=${IP}.traefik.me
# COMPOSE_FILE=base.yml:rpc.yml:plasma/reth/plasma-testnet-reth-pruned-trace.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/plasma-testnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
plasma-testnet-initialize-openssl:
image: ${PLASMA_OPENSSL_IMAGE:-docker.io/alpine/openssl}:${PLASMA_OPENSSL_VERSION:-3.5.2}
entrypoint: [/bin/sh, -c]
command:
- |
if [ ! -f /jwt/jwt.hex ]; then
echo 'INFO Generating jwt secret'
openssl rand -hex 32 | tr -d '\n' > /jwt/jwt.hex
else
echo 'INFO JWT secret already exists'
fi
if [ ! -f /consensus/ec-secp256k1-non-validator.pem ]; then
echo 'INFO Generating secp256k1 keypair for non-validator'
openssl ecparam -name secp256k1 -genkey -noout -out /consensus/ec-secp256k1-non-validator.pem
openssl ec -in /consensus/ec-secp256k1-non-validator.pem -outform DER -no_public -out /consensus/ec-secp256k1-non-validator.der
else
echo 'INFO secp256k1 keypair for non-validator already exists'
fi
echo 'INFO OpenSSL initialization completed'
restart: no
networks:
- chains
volumes:
- ${PLASMA_TESTNET_RETH_PRUNED_TRACE_CONSENSUS_DATA:-plasma-testnet-reth-pruned-trace-consensus}:/consensus:rw
- plasma-testnet-reth-pruned-trace-jwt:/jwt:rw
logging: *logging-defaults
plasma-testnet-initialize-consensus:
image: ${PLASMA_PLASMA_CONSENSUS_IMAGE:-ghcr.io/plasmalaboratories/plasma-consensus-public}:${PLASMA_TESTNET_PLASMA_CONSENSUS_VERSION:-0.15.0}
user: 0:0
entrypoint: [/bin/bash, -c]
command:
- |
set -euo pipefail
if [ ! -f /consensus/data.mdb ]; then
echo "INFO Generating consensus database for testnet network"
plasma-cli init \
--chain /node/genesis.json \
--data-dir /consensus
else
echo "INFO Consensus database already exists at /consensus/data.mdb"
fi
if [ ! -f /consensus/peer-id.txt ]; then
echo "INFO Generating peer ID for non-validator"
plasma-cli peer-id \
--identity-file-path /consensus/ec-secp256k1-non-validator.der > /consensus/peer-id.txt
else
echo "INFO Peer ID for non-validator already exists"
fi
restart: no
depends_on:
plasma-testnet-initialize-openssl:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${PLASMA_TESTNET_RETH_PRUNED_TRACE_CONSENSUS_DATA:-plasma-testnet-reth-pruned-trace-consensus}:/consensus:rw
- ./plasma/testnet/genesis.json:/node/genesis.json:ro
- plasma-testnet-reth-pruned-trace-jwt:/jwt:ro
logging: *logging-defaults
plasma-testnet-initialize-execution:
image: ${PLASMA_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${PLASMA_TESTNET_RETH_VERSION:-v1.11.3}
user: 0:0
entrypoint: [/bin/bash, -c]
command:
- |
set -euo pipefail
if [ ! -f /execution/db/mdbx.dat ]; then
echo "INFO Generating execution database for testnet network"
reth init \
--chain /node/genesis.json \
--datadir /execution \
--log.file.directory /execution/log
else
echo "INFO Execution database already exists at /execution/db"
fi
restart: no
depends_on:
plasma-testnet-initialize-consensus:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${PLASMA_TESTNET_RETH_PRUNED_TRACE_EXECUTION_DATA:-plasma-testnet-reth-pruned-trace-execution}:/execution:rw
- ./plasma/testnet/genesis.json:/node/genesis.json:ro
- plasma-testnet-reth-pruned-trace-jwt:/jwt:ro
logging: *logging-defaults
plasma-testnet:
image: ${PLASMA_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${PLASMA_TESTNET_RETH_VERSION:-v1.11.3}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
net.core.somaxconn: 32768 # Higher connection queue
# Memory/Connection Management
# net.core.netdev_max_backlog: 50000 # Increase network buffer
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
ulimits:
nofile: 1048576 # Max open files (for RPC/WS connections)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: 0:0
ports:
- 14566:30303
- 14566:30303/udp
expose:
- 8545
- 8551
- 9001
entrypoint: [/bin/bash, -c]
command:
- |
reth node \
--chain /node/genesis.json \
--datadir /execution \
--trusted-peers "enode://263b9c64548d2d06b9c514a203087cec8abe72945906d8cf38c97ea8ada5a2385cd58a8680bdab8df25921c1d8aee79976a406364012db09516fd1a6a8a41796@plasma-testnet-observer-ex-1.plasmalabs.tech:30303?discport=30304,enode://66379af5b9c704b88c92093c6a2cdcc0e7086d02ab6a0720cb08a4a050b7f35e7e2ded7204a6fd4f839494a62443301daae59773fa099f031375f2f887e96f6b@plasma-testnet-observer-ex-4.plasmalabs.tech:30303?discport=30304,enode://a1cee61c9fc0f1c98c7348bb9a8cdc2fe56d80a4dc979c463729692ccd835c02e3e0cd238852cb9311c0b3fc6fb0f496d8109599d6be0039b7ffbcb4e577de05@plasma-testnet-observer-ex-9.plasmalabs.tech:30303?discport=30304" \
--authrpc.jwtsecret /jwt/jwt.hex \
--authrpc.addr 0.0.0.0 \
--authrpc.port 8551 \
--http \
--http.addr 0.0.0.0 \
--http.api eth,net,web3,txpool,debug \
--http.corsdomain '*' \
--metrics 0.0.0.0:9001 \
--color never \
--rpc.gascap 600000000 \
--txpool.gas-limit 36000000 \
--txpool.blobpool-max-count 0 \
--txpool.blobpool-max-size 0 \
--txpool.blob-cache-size 0 \
--log.file.directory /execution/log
restart: unless-stopped
stop_grace_period: 5m
depends_on:
plasma-testnet-initialize-execution:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${PLASMA_TESTNET_RETH_PRUNED_TRACE_EXECUTION_DATA:-plasma-testnet-reth-pruned-trace-execution}:/execution:rw
- ./plasma/testnet/genesis.json:/node/genesis.json:ro
- /slowdisk:/slowdisk
- plasma-testnet-reth-pruned-trace-jwt:/jwt:ro
healthcheck:
test: [CMD, bash, -c, exec 6<> /dev/tcp/localhost/8545 && exec 6<> /dev/tcp/localhost/8551]
interval: 10s
timeout: 10s
retries: 30
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.plasma-testnet-reth-pruned-trace-stripprefix.stripprefix.prefixes=/plasma-testnet
- traefik.http.services.plasma-testnet-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.plasma-testnet-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.plasma-testnet-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.plasma-testnet-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/plasma-testnet`) || Path(`/plasma-testnet/`))}
- ${NO_SSL:+traefik.http.routers.plasma-testnet-reth-pruned-trace.rule=Path(`/plasma-testnet`) || Path(`/plasma-testnet/`)}
- traefik.http.routers.plasma-testnet-reth-pruned-trace.middlewares=plasma-testnet-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
plasma-testnet-node:
image: ${PLASMA_PLASMA_CONSENSUS_IMAGE:-ghcr.io/plasmalaboratories/plasma-consensus-public}:${PLASMA_TESTNET_PLASMA_CONSENSUS_VERSION:-0.15.0}
user: 0:0
ports:
- 19566:34070
expose:
- 35070
- 9001
entrypoint: [/bin/bash, -c]
command:
- |
# Rewrite engine_api_url to this compose service (mainnet/testnet tomls ship chain-specific hosts).
sed -E 's|http://[^[:space:]/"]+:8551|http://plasma-testnet:8551|g' /config/non-validator.toml > /tmp/non-validator.toml
exec plasma-cli observer \
--config-path /tmp/non-validator.toml \
--no-color \
--timeout-stream-manager 5s \
--telemetry.enable-metrics \
--telemetry.enable-health \
--telemetry.host 0.0.0.0 \
--telemetry.port 9001 \
-vvv
restart: unless-stopped
stop_grace_period: 5m
depends_on:
plasma-testnet-initialize-consensus:
condition: service_completed_successfully
plasma-testnet:
condition: service_healthy
networks:
- chains
volumes:
- ${PLASMA_TESTNET_RETH_PRUNED_TRACE_CONSENSUS_DATA:-plasma-testnet-reth-pruned-trace-consensus}:/consensus:rw
- ./plasma/testnet/genesis.json:/node/genesis.json:ro
- ./plasma/testnet/identities:/node/identities:ro
- ./plasma/testnet/keys:/node/keys:ro
- ./plasma/testnet/non-validator.toml:/config/non-validator.toml:ro
- plasma-testnet-reth-pruned-trace-jwt:/jwt:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
volumes:
plasma-testnet-reth-pruned-trace-consensus:
plasma-testnet-reth-pruned-trace-execution:
plasma-testnet-reth-pruned-trace-jwt:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
chain: plasma-testnet
method-groups:
enabled:
- debug
- filter
- trace
methods:
enabled:
- name: txpool_content
...

150
plasma/testnet/genesis.json Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
02d112b3f45100e2fff8a359f2c1a78b238af640d35fc73a9de972cce6571627b7

View File

@@ -0,0 +1 @@
0285e943489d225b45d7fa3a40899939e19859af5fc31680fa36bbae4b5e5308a0

View File

@@ -0,0 +1 @@
03372397495dc1c191917b458069c1080e2f8a66cd0b61c455595851f95efef00b

View File

@@ -0,0 +1 @@
03f21df1d35ae06cb69fee4a7f0e0f59fd822adbde5a965140f7228f6e7aaa0af7

View File

@@ -0,0 +1 @@
0378619e9adcc7f08d934a446ec522a0830c317a52fee39705631ce8d66b5b55b1

View File

@@ -0,0 +1 @@
02de4cb6cc459acc240cbea93db38e5506385ba4deacafd077e55d5edaa8705f6c

View File

@@ -0,0 +1 @@
0250df11068277d55a52d89517a41711208a4e57a3eebbc06e7df6af0241b38133

View File

@@ -0,0 +1 @@
02afcc9182088bdbda3f2f9a3a0111c5148452509a09bf0a76e32fa1fdf848d3aa

View File

@@ -0,0 +1 @@
031a6dfdf81e60f59e5a97286a3f9a782294e85deb43cad87482fab612816b3880

View File

@@ -0,0 +1 @@
024b6329e9944aa933565379b3513606001effcd664a70a422bc8404eaac6fcd39

View File

@@ -0,0 +1 @@
b2f8ba24adce5aae4c4355bfe662c7abef765fd7d18fc1facd88db53da919039ae1fa59e2fd334c35f8644934f0313af

View File

@@ -0,0 +1 @@
a6c1f484342d0f01ec0cf53b5d467e5547aba508298ee95da7342663fd3e6dfd06ed386d4581900ce88074cb21a26bd4

View File

@@ -0,0 +1 @@
94d99d2d5751d48a0b7f653ed81bcef9c097c8eb808f0bd05867a757462924d22ffd8168e6b3f45ea52ce05bf7d3487a

View File

@@ -0,0 +1 @@
87a3288cece2f105f0c61a88430355a2ffcbf86a41c6f5a112b61e7dfd103ddd00845127ec7eaed8608f3c052f80a12e

View File

@@ -0,0 +1 @@
93f351dc7f43e39ed8b4c3bcc96ad52ba643c85965e2bdeede33a8c1ff0904433848bc5d4a84246ee60e459814079203

View File

@@ -0,0 +1 @@
87ff47c8986af8589af85367c5660ed0b3f5b0f3368f4c873fe7944e80ca793d8f5d62235685fc5755272eefda0f0aed

View File

@@ -0,0 +1 @@
a47bcbbec4bc7af7d8d83ef289f9607671e76dd5820a2066cb3f5e9bdcae1fba6aac1ba4732d2f118b1e2d1a573f4dfd

View File

@@ -0,0 +1 @@
a3fbd91ed97dc4996d00c0dd14d21ae68ca21be53e1701001a168fea4a5f4499f1e48211aee54aca005c743bfd795f29

View File

@@ -0,0 +1 @@
80003b3ef56d2e983332c5ae656f67b85a88996ea6d413bef67e294edcb37a991888fe6a4d6d63e25a8750fc694b76a0

View File

@@ -0,0 +1 @@
af35d8fdde248ecb6aed849f7336052edab1da635bd46303ebc14ce5f7befa47be0691d609c7636c1427dd7cc4bc353c

View File

@@ -0,0 +1,75 @@
engine_api_url = "http://plasma-testnet:8551"
consensus_api_host = "0.0.0.0"
authrpc_jwtsecret = "/jwt/jwt.hex"
[persistence]
data_dir = "/consensus"
[network]
interval = 5
p2p_port = 34070
timeout = 5
identity_file_path = "/consensus/ec-secp256k1-non-validator.der"
trusted_only = false
discovery.enabled = true
[api]
enabled = true
host = "0.0.0.0"
port = 35070
[validators]
[validators.0]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-0.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-0.hex"
[validators.1]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-1.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-1.hex"
[validators.2]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-2.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-2.hex"
[validators.3]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-3.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-3.hex"
[validators.4]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-4.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-4.hex"
[validators.5]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-5.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-5.hex"
[validators.6]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-6.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-6.hex"
[validators.7]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-7.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-7.hex"
[validators.8]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-8.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-8.hex"
[validators.9]
validator_keystore_pk_file_path = "/node/keys/bls12-381-public-key-9.hex"
identity_file_path = "/node/identities/ec-secp256k1-validator-public-compressed-9.hex"
[network.bootstrap_nodes.0]
api_host = "plasma-testnet-observer-cs-1.plasmalabs.tech"
p2p_port = 34070
peer_id = "16Uiu2HAm2LipxgPhTzL63vGBa4vvq8hjBTvHLL5JpQJEnnndoB8b"
[network.bootstrap_nodes.1]
api_host = "plasma-testnet-observer-cs-4.plasmalabs.tech"
p2p_port = 34070
peer_id = "16Uiu2HAm3gGfJyWKSEzi67nL9CYc1umG5DdGp7TFHZSaWvd5N2AK"
[network.bootstrap_nodes.2]
api_host = "plasma-testnet-observer-cs-9.plasmalabs.tech"
p2p_port = 34070
peer_id = "16Uiu2HAmLzq4LCDQ8FNSPs5ESsWAiSUfDQjXjtbrx3fG9M9qZrU6"