-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Overview Sov SDK rollup is up and running with an EVM module. I'll add more docs once I start testing it with our existing scripts. The demo still primarily uses RollKit. Fixes #76 ## Running Sov SDK rollup Requires building the image locally. Once the image is battle tested i'll push it to ghcr. --------- Co-authored-by: Rootul P <[email protected]>
- Loading branch information
1 parent
e50125e
commit ab26692
Showing
14 changed files
with
355 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
services: | ||
sovereign: # sov sdk is a zk rollup framework. This is a zk rollup image with an EVM module using celestia bridge | ||
image: sovrollup:latest # this will be replaced with an image from ghcr | ||
container_name: sovereign | ||
volumes: | ||
- ./testing/files/celestia_rollup_config.toml:/app/config/mock_rollup_config.toml | ||
- ./testing/files/sovereign-genesis/celestia:/app/examples/test-data/genesis/celestia | ||
depends_on: | ||
celestia-network-validator: | ||
condition: service_healthy | ||
celestia-network-bridge: | ||
condition: service_healthy | ||
ports: | ||
- "8545:8545" | ||
networks: | ||
- sov-network | ||
|
||
celestia-network-validator: | ||
image: ghcr.io/celestiaorg/celestia-app:v3.0.0-mocha | ||
container_name: celestia-network-validator | ||
volumes: | ||
- ./.tmp/celestia-validator:/home/celestia | ||
- ./testing/files/celestia-validator:/testapp_files | ||
ports: | ||
- "9090:9090" | ||
- "26656:26656" | ||
- "26657:26657" | ||
entrypoint: /testapp_files/entrypoint.sh | ||
healthcheck: | ||
test: | ||
[ | ||
"CMD-SHELL", | ||
'/bin/sh -c ''BLOCK_HEIGHT=$(curl -sf http://localhost:26657/status | jq -r .result.sync_info.latest_block_height); if [ "$$BLOCK_HEIGHT" -gt 1 ]; then exit 0; else echo "Block height too low: $$BLOCK_HEIGHT"; exit 1; fi''', | ||
] | ||
interval: 1s | ||
timeout: 5s | ||
retries: 10 | ||
start_period: 5s | ||
networks: | ||
- sov-network | ||
|
||
celestia-network-bridge: | ||
image: ghcr.io/celestiaorg/celestia-node:v0.20.1-mocha | ||
container_name: celestia-network-bridge | ||
environment: | ||
- P2P_NETWORK=private | ||
- "CELESTIA_CUSTOM=private:BFCEC14C1A50F3549777ED9EF350A9D79BE826C7836CD4FBEFE9C9C4F61A111F" | ||
volumes: | ||
- ./testing/files/celestia-bridge:/testapp_files | ||
- ./.tmp/celestia-bridge:/home/celestia | ||
entrypoint: /testapp_files/entrypoint.sh | ||
command: celestia bridge start --p2p.network private --core.ip celestia-network-validator --rpc.addr 0.0.0.0 --rpc.port 26658 --keyring.keyname bridge | ||
ports: | ||
- "26658:26658" | ||
- "2121:2121" | ||
depends_on: | ||
celestia-network-validator: | ||
condition: service_healthy | ||
healthcheck: | ||
test: | ||
[ | ||
"CMD-SHELL", | ||
'AUTH_TOKEN=$(celestia bridge auth read --node.store=/home/celestia 2>/dev/null | tail -n 1); OUTPUT=$(curl -sf --max-time 0.5 -X POST -H "Content-type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $$AUTH_TOKEN" -d ''{"id":1,"jsonrpc":"2.0","method":"header.SyncWait","params":[]}'' http://0.0.0.0:26658); if [ $$? -eq 0 ]; then exit 0; else echo "Catching up. $$OUTPUT"; exit 1; fi ', | ||
] | ||
interval: 1s | ||
timeout: 5s | ||
retries: 10 | ||
start_period: 5s | ||
networks: | ||
- sov-network | ||
|
||
simapp-validator: | ||
image: ghcr.io/celestiaorg/celestia-zkevm-ibc-demo/simapp:latest | ||
container_name: simapp-validator | ||
volumes: | ||
- ./.tmp/simapp-validator:/home/celestia | ||
- ./testing/files/simapp-validator:/testapp_files | ||
entrypoint: /testapp_files/entrypoint.sh | ||
ports: | ||
- "9190:9090" | ||
- "5123:26657" | ||
networks: | ||
- sov-network | ||
|
||
celestia-prover: | ||
image: ghcr.io/celestiaorg/celestia-zkevm-ibc-demo/celestia-prover:latest | ||
container_name: celestia-prover | ||
environment: | ||
# TENDERMINT_RPC_URL should be the SimApp which is acting as a substitute | ||
# for Celestia (with IBC Eurekea enabled). | ||
- TENDERMINT_RPC_URL=http://simapp-validator:26657 | ||
- RPC_URL=http://reth:8545 | ||
ports: | ||
- "50051:50051" | ||
depends_on: | ||
sovereign: | ||
condition: service_started | ||
networks: | ||
- sov-network | ||
|
||
networks: | ||
sov-network: | ||
driver: bridge | ||
ipam: | ||
config: | ||
- subnet: 172.16.0.0/24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[da] | ||
# The JWT used to authenticate with the celestia light client. Instructions for generating this token can be found in the README | ||
celestia_rpc_auth_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiLCJhZG1pbiJdfQ.qxoN_a-k7aZZE77VSpfgyvI_0eNvJ_OgBsT35zxUQnQ" | ||
# The address of the *trusted* Celestia light client to interact with | ||
celestia_rpc_address = "http://celestia-network-bridge:26658" | ||
# The largest response the rollup will accept from the Celestia node. Defaults to 100 MB | ||
max_celestia_response_body_size = 104_857_600 | ||
# The maximum time to wait for a response to an RPC query against Celestia node. Defaults to 60 seconds. | ||
celestia_rpc_timeout_seconds = 60 | ||
|
||
[storage] | ||
# The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. | ||
path = "demo_data" | ||
|
||
# We define the rollup's genesis to occur at block number `genesis_height`. The rollup will ignore | ||
# any blocks before this height, and any blobs at this height will not be processed | ||
[runner] | ||
genesis_height = 3 | ||
# Block time for celestia is configured in `docker/run-validator.sh` and we try to set this one to be lower, | ||
# So status is updated more frequently. | ||
da_polling_interval_ms = 200 | ||
|
||
[runner.rpc_config] | ||
# the host and port to bind the rpc server for | ||
bind_host = "0.0.0.0" | ||
bind_port = 8545 | ||
[runner.axum_config] | ||
bind_host = "0.0.0.0" | ||
bind_port = 8546 | ||
# In case the rollup is running behind a proxy | ||
# public_address = "http://rollup.sovereign.xyz" | ||
|
||
[monitoring] | ||
telegraf_address = "127.0.0.0:8094" | ||
# Defines how many measurements a rollup node will accumulate before sending it to the Telegraf. | ||
# It is expected from the rollup node to produce metrics all the time, | ||
# so measurements are buffered by size and not sent by time. | ||
# and below 67 KB, which is the maximal UDP packet size. | ||
# It also means that if a single serialized metric is larger than this value, a UDP packet will be larger. | ||
# The default value is 508. | ||
# max_datagram_size = 508 | ||
# How many metrics are allowed to be in pending state, before new metrics will be dropped. | ||
# This is a number of metrics, not serialized bytes. | ||
# The total number of bytes to be held in memory might vary per metric + `max_datagram_size` | ||
# max_pending_metrics = 100 | ||
|
||
[proof_manager] | ||
aggregated_proof_block_jump = 10 | ||
prover_address = "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7qhzze66" | ||
max_number_of_transitions_in_db = 100 | ||
max_number_of_transitions_in_memory = 30 | ||
|
||
[sequencer] | ||
max_allowed_blocks_behind = 5 | ||
# DA address of this sequencer. Should match address of connected bridge/full node. | ||
# Taken from ../../docker/credentials/bridge-0.addr | ||
da_address = "celestia1a68m2l85zn5xh0l07clk4rfvnezhywc53g8x7s" | ||
[sequencer.preferred] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"accounts": [ | ||
{ | ||
"credential_id": "0x6cee0b576d84956732a626d67ee955373b7498e57ea45e41b637b33825179b6c", | ||
"address": "sov1dnhqk4mdsj2kwv4xymt8a624xuahfx8906j9usdkx7ensgjkzmy" | ||
}, | ||
{ | ||
"credential_id": "0xa3201954f70ad62230dc3d840a5bf767702c04869e85ab3eee0b962857ba7598", | ||
"address": "sov15vspj48hpttzyvxu8kzq5klhvaczcpyxn6z6k0hwpwtzsxf35ku" | ||
}, | ||
{ | ||
"credential_id": "0xfea6ac5b8751120fb62fff67b54d2eac66aef307c7dde1d394dea1e09e43dd44", | ||
"address": "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7qhzze66" | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
testing/files/sovereign-genesis/celestia/attester_incentives.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"minimum_attester_bond": [1000, 1000], | ||
"minimum_challenger_bond": [1000, 1000], | ||
"initial_attesters": [ | ||
[ | ||
"sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7qhzze66", | ||
200000 | ||
] | ||
], | ||
"rollup_finality_period": 5, | ||
"maximum_attested_height": 0, | ||
"light_client_finalized_height": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"gas_token_config": { | ||
"token_name": "sov-token", | ||
"address_and_balances": [ | ||
[ | ||
"sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7qhzze66", | ||
10000000000000 | ||
], | ||
[ | ||
"sov1x3jtvq0zwhj2ucsc4hqugskvralrulxvf53vwtkred93s85ar2a", | ||
10000000000000 | ||
], | ||
[ | ||
"sov15vspj48hpttzyvxu8kzq5klhvaczcpyxn6z6k0hwpwtzsxf35ku", | ||
10000000000000 | ||
], | ||
[ | ||
"sov1dnhqk4mdsj2kwv4xymt8a624xuahfx8906j9usdkx7ensgjkzmy", | ||
10000000000000 | ||
] | ||
], | ||
"admins": [ | ||
"sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7qhzze66" | ||
] | ||
}, | ||
"tokens": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"current_time": { | ||
"secs": 0, | ||
"nanos": 0 | ||
}, | ||
"operating_mode": "zk", | ||
"inner_code_commitment": [0, 0, 0, 0, 0, 0, 0, 0], | ||
"outer_code_commitment": [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0 | ||
], | ||
"genesis_da_height": 3 | ||
} |
Oops, something went wrong.