From ede00d6e8ed71ff93387d2959b22cd636fc8b684 Mon Sep 17 00:00:00 2001 From: Blazej Kolad Date: Tue, 21 Nov 2023 15:28:18 +0100 Subject: [PATCH] Replace `BlockingProver` with `ParallelProverService` (#14) --- Cargo.lock | 73 +++++++++++-------- Cargo.toml | 36 ++++----- README.md | 25 ++++--- celestia_rollup_config.toml | 2 +- .../provers/risc0/guest-celestia/Cargo.lock | 42 +++++------ .../provers/risc0/guest-celestia/Cargo.toml | 12 +-- .../risc0/guest-celestia/src/bin/rollup.rs | 2 +- crates/provers/risc0/guest-mock/Cargo.lock | 43 +++++------ crates/provers/risc0/guest-mock/Cargo.toml | 12 +-- .../risc0/guest-mock/src/bin/mock_da.rs | 2 +- crates/rollup/Makefile | 4 + crates/rollup/src/bin/node.rs | 6 +- crates/rollup/src/celestia_rollup.rs | 8 +- crates/rollup/src/mock_rollup.rs | 8 +- crates/rollup/tests/bank/mod.rs | 2 +- crates/rollup/tests/test_helpers.rs | 2 +- crates/stf/src/runtime.rs | 2 +- rollup_config.toml | 2 +- sov-rollup-starter.sh | 10 ++- 19 files changed, 160 insertions(+), 133 deletions(-) mode change 100755 => 100644 sov-rollup-starter.sh diff --git a/Cargo.lock b/Cargo.lock index f24fb8c..02420f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -714,9 +714,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" dependencies = [ "clap_builder", "clap_derive", @@ -724,9 +724,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" dependencies = [ "anstream", "anstyle", @@ -3426,9 +3426,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -3438,9 +3438,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -3528,9 +3528,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -3546,9 +3546,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", @@ -3749,7 +3749,7 @@ dependencies = [ [[package]] name = "sov-accounts" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -3766,7 +3766,7 @@ dependencies = [ [[package]] name = "sov-bank" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -3783,7 +3783,7 @@ dependencies = [ [[package]] name = "sov-celestia-adapter" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", @@ -3793,9 +3793,11 @@ dependencies = [ "celestia-proto", "celestia-rpc", "celestia-types", + "futures", "hex", "jsonrpsee", "nmt-rs", + "pin-project", "prost 0.12.1", "serde", "serde_json", @@ -3811,7 +3813,7 @@ dependencies = [ [[package]] name = "sov-cli" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -3828,7 +3830,7 @@ dependencies = [ [[package]] name = "sov-db" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bincode", @@ -3845,7 +3847,7 @@ dependencies = [ [[package]] name = "sov-ledger-rpc" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "futures", @@ -3858,23 +3860,27 @@ dependencies = [ [[package]] name = "sov-mock-da" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", "borsh", "bytes", + "futures", "hex", + "pin-project", "serde", "sha2 0.10.8", "sov-rollup-interface", "tokio", + "tokio-stream", + "tracing", ] [[package]] name = "sov-modules-api" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bech32", @@ -3900,7 +3906,7 @@ dependencies = [ [[package]] name = "sov-modules-core" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bech32", @@ -3919,7 +3925,7 @@ dependencies = [ [[package]] name = "sov-modules-macros" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -3935,7 +3941,7 @@ dependencies = [ [[package]] name = "sov-modules-rollup-blueprint" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", @@ -3958,7 +3964,7 @@ dependencies = [ [[package]] name = "sov-modules-stf-blueprint" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -3976,7 +3982,7 @@ dependencies = [ [[package]] name = "sov-risc0-adapter" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bincode", @@ -3993,13 +3999,14 @@ dependencies = [ [[package]] name = "sov-rollup-interface" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", "borsh", "bytes", "digest 0.10.7", + "futures", "hex", "proptest", "serde", @@ -4046,7 +4053,7 @@ dependencies = [ [[package]] name = "sov-schema-db" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "once_cell", @@ -4059,7 +4066,7 @@ dependencies = [ [[package]] name = "sov-sequencer" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -4075,7 +4082,7 @@ dependencies = [ [[package]] name = "sov-sequencer-registry" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -4092,7 +4099,7 @@ dependencies = [ [[package]] name = "sov-state" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bcs", @@ -4111,7 +4118,7 @@ dependencies = [ [[package]] name = "sov-stf-runner" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", @@ -4119,6 +4126,7 @@ dependencies = [ "futures", "hex", "jsonrpsee", + "rayon", "serde", "serde_json", "sov-db", @@ -4132,7 +4140,7 @@ dependencies = [ [[package]] name = "sov-zk-cycle-utils" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "bytes", "risc0-zkvm", @@ -4469,6 +4477,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f0f8bb2..941afa9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,26 +16,26 @@ publish = false rust-version = "1.73" [workspace.dependencies] -sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-accounts = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-bank = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-ledger-rpc = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-sequencer-registry = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-modules-stf-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-modules-rollup-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-stf-runner = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-db = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-sequencer = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-first-read-last-write-cache = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-cli = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-mock-da = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-celestia-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } +sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-accounts = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-bank = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-ledger-rpc = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-sequencer-registry = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-modules-stf-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-modules-rollup-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-stf-runner = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-db = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-sequencer = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-first-read-last-write-cache = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-cli = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-mock-da = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-celestia-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } stf-starter = { path = "./crates/stf" } -serde = { version = "1.0.188", features = ["derive", "rc"] } +serde = { version = "1.0.192", features = ["derive", "rc"] } serde_json = { version = "1.0" } diff --git a/README.md b/README.md index 778c432..7dd9f97 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,19 @@ $ cargo run --bin node $ make test-create-token ``` -#### 5. Test if token creation succeeded: +#### 5. Wait for the transaction to be submitted. +```sh,test-ci +$ make wait-five-seconds +``` + + +#### 6. Test if token creation succeeded: ```sh,test-ci $ make test-bank-supply-of ``` -#### 6. The output of the above script: +#### 7. The output of the above script: ```bash,test-ci,bashtestmd:compare-output $ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":["sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"],"id":1}' http://127.0.0.1:12345 @@ -48,19 +54,19 @@ $ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method" # How to run the sov-rollup-starter using celestia-da: #### 1. Change the working directory: -```shell,test-ci +``` $ cd crates/rollup/ ``` #### 2. If you want to run a fresh rollup, clean the database: -```sh,test-ci +``` $ make clean ``` #### 3. Start the Celestia local docker service: -```sh,test-ci +``` $ make start ``` @@ -68,7 +74,7 @@ $ make start This will compile and start the rollup node: -```shell,test-ci,bashtestmd:long-running,bashtestmd:wait-until=RPC +``` $ cargo run --bin node --no-default-features --features celestia_da ``` @@ -76,19 +82,20 @@ $ cargo run --bin node --no-default-features --features celestia_da Using `CELESTIA=1` will enable the client to be built with Celestia support and submit the test token -```sh,test-ci +``` $ CELESTIA=1 make test-create-token ``` #### 6. Test if token creation succeeded: -```sh,test-ci + +``` $ make test-bank-supply-of ``` #### 7. The output of the above script: -```bash,test-ci,bashtestmd:compare-output +``` $ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":["sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"],"id":1}' http://127.0.0.1:12345 {"jsonrpc":"2.0","result":{"amount":1000},"id":1} ``` \ No newline at end of file diff --git a/celestia_rollup_config.toml b/celestia_rollup_config.toml index 3772f9e..0a51022 100644 --- a/celestia_rollup_config.toml +++ b/celestia_rollup_config.toml @@ -15,7 +15,7 @@ path = "../../rollup-starter-data" # We define the rollup's genesis to occur at block number `start_height`. The rollup will ignore # any blocks before this height [runner] -start_height = 3 +start_height = 0 [runner.rpc_config] # the host and port to bind the rpc server for diff --git a/crates/provers/risc0/guest-celestia/Cargo.lock b/crates/provers/risc0/guest-celestia/Cargo.lock index d4c9931..421c610 100644 --- a/crates/provers/risc0/guest-celestia/Cargo.lock +++ b/crates/provers/risc0/guest-celestia/Cargo.lock @@ -1811,9 +1811,9 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "schemars" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -1823,9 +1823,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -1865,9 +1865,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -1883,9 +1883,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", @@ -1977,7 +1977,7 @@ dependencies = [ [[package]] name = "sov-accounts" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -1990,7 +1990,7 @@ dependencies = [ [[package]] name = "sov-bank" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -2003,7 +2003,7 @@ dependencies = [ [[package]] name = "sov-celestia-adapter" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", @@ -2058,7 +2058,7 @@ dependencies = [ [[package]] name = "sov-modules-api" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bech32", @@ -2079,7 +2079,7 @@ dependencies = [ [[package]] name = "sov-modules-core" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bech32", @@ -2098,7 +2098,7 @@ dependencies = [ [[package]] name = "sov-modules-macros" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -2113,7 +2113,7 @@ dependencies = [ [[package]] name = "sov-modules-stf-blueprint" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -2130,7 +2130,7 @@ dependencies = [ [[package]] name = "sov-risc0-adapter" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bincode", @@ -2145,7 +2145,7 @@ dependencies = [ [[package]] name = "sov-rollup-interface" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", @@ -2162,7 +2162,7 @@ dependencies = [ [[package]] name = "sov-sequencer-registry" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "sov-state" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bcs", @@ -2193,7 +2193,7 @@ dependencies = [ [[package]] name = "sov-stf-runner" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -2206,7 +2206,7 @@ dependencies = [ [[package]] name = "sov-zk-cycle-utils" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "bytes", "risc0-zkvm", diff --git a/crates/provers/risc0/guest-celestia/Cargo.toml b/crates/provers/risc0/guest-celestia/Cargo.toml index 84841ba..5367199 100644 --- a/crates/provers/risc0/guest-celestia/Cargo.toml +++ b/crates/provers/risc0/guest-celestia/Cargo.toml @@ -13,12 +13,12 @@ risc0-zkvm-platform = "0.18" stf-starter = { path = "../../../stf" } -sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-celestia-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-modules-stf-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } +sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-celestia-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-modules-stf-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } [patch.crates-io] sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2/v0.10.6-risc0" } diff --git a/crates/provers/risc0/guest-celestia/src/bin/rollup.rs b/crates/provers/risc0/guest-celestia/src/bin/rollup.rs index 4d3ba50..68997e7 100644 --- a/crates/provers/risc0/guest-celestia/src/bin/rollup.rs +++ b/crates/provers/risc0/guest-celestia/src/bin/rollup.rs @@ -23,7 +23,7 @@ pub fn main() { let app: StfBlueprint, BasicKernel<_>> = StfBlueprint::new(); - let mut stf_verifier = StfVerifier::new( + let stf_verifier = StfVerifier::new( app, CelestiaVerifier { rollup_namespace: ROLLUP_NAMESPACE, diff --git a/crates/provers/risc0/guest-mock/Cargo.lock b/crates/provers/risc0/guest-mock/Cargo.lock index 028b4df..2c91985 100644 --- a/crates/provers/risc0/guest-mock/Cargo.lock +++ b/crates/provers/risc0/guest-mock/Cargo.lock @@ -843,9 +843,9 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "schemars" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -855,9 +855,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -873,18 +873,18 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", @@ -942,7 +942,7 @@ checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" [[package]] name = "sov-accounts" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -955,7 +955,7 @@ dependencies = [ [[package]] name = "sov-bank" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -968,7 +968,7 @@ dependencies = [ [[package]] name = "sov-mock-da" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", @@ -978,12 +978,13 @@ dependencies = [ "serde", "sha2", "sov-rollup-interface", + "tracing", ] [[package]] name = "sov-modules-api" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bech32", @@ -1004,7 +1005,7 @@ dependencies = [ [[package]] name = "sov-modules-core" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bech32", @@ -1023,7 +1024,7 @@ dependencies = [ [[package]] name = "sov-modules-macros" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -1038,7 +1039,7 @@ dependencies = [ [[package]] name = "sov-modules-stf-blueprint" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -1055,7 +1056,7 @@ dependencies = [ [[package]] name = "sov-risc0-adapter" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bincode", @@ -1070,7 +1071,7 @@ dependencies = [ [[package]] name = "sov-rollup-interface" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "async-trait", @@ -1087,7 +1088,7 @@ dependencies = [ [[package]] name = "sov-sequencer-registry" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -1100,7 +1101,7 @@ dependencies = [ [[package]] name = "sov-state" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "bcs", @@ -1118,7 +1119,7 @@ dependencies = [ [[package]] name = "sov-stf-runner" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "anyhow", "borsh", @@ -1131,7 +1132,7 @@ dependencies = [ [[package]] name = "sov-zk-cycle-utils" version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=84ed498393577fd1272338599639eb57340c5b89#84ed498393577fd1272338599639eb57340c5b89" +source = "git+https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=1f87cc01c788cbfd75d45f354cfb49c675a9bfae#1f87cc01c788cbfd75d45f354cfb49c675a9bfae" dependencies = [ "bytes", "risc0-zkvm", diff --git a/crates/provers/risc0/guest-mock/Cargo.toml b/crates/provers/risc0/guest-mock/Cargo.toml index 1ad6d82..2b98d02 100644 --- a/crates/provers/risc0/guest-mock/Cargo.toml +++ b/crates/provers/risc0/guest-mock/Cargo.toml @@ -14,12 +14,12 @@ risc0-zkvm-platform = "0.18" serde = { version = "1.0.188", features = ["derive", "rc"] } -sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-mock-da = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-modules-stf-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } -sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "84ed498393577fd1272338599639eb57340c5b89" } +sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-mock-da = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-modules-stf-blueprint = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } +sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "1f87cc01c788cbfd75d45f354cfb49c675a9bfae" } stf-starter = { path = "../../../stf" } diff --git a/crates/provers/risc0/guest-mock/src/bin/mock_da.rs b/crates/provers/risc0/guest-mock/src/bin/mock_da.rs index 0b241f8..7c6df00 100644 --- a/crates/provers/risc0/guest-mock/src/bin/mock_da.rs +++ b/crates/provers/risc0/guest-mock/src/bin/mock_da.rs @@ -19,7 +19,7 @@ pub fn main() { let app: StfBlueprint, BasicKernel<_>> = StfBlueprint::new(); - let mut stf_verifier = StfVerifier::new(app, MockDaVerifier {}); + let stf_verifier = StfVerifier::new(app, MockDaVerifier {}); stf_verifier .run_block(guest, storage) diff --git a/crates/rollup/Makefile b/crates/rollup/Makefile index b1757fe..df25d6d 100644 --- a/crates/rollup/Makefile +++ b/crates/rollup/Makefile @@ -85,6 +85,9 @@ else cargo build --bin starter-cli-wallet endif +wait-five-seconds: + sleep 3 + set-rpc-url: build-sov-cli $(SOV_CLI_REL_PATH) rpc set-url http://127.0.0.1:12345 @@ -102,3 +105,4 @@ test-create-token: set-rpc-url test-generate-create-token-tx import-keys test-bank-supply-of: curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":["sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"],"id":1}' http://127.0.0.1:12345 + diff --git a/crates/rollup/src/bin/node.rs b/crates/rollup/src/bin/node.rs index a1e629f..f72d82c 100644 --- a/crates/rollup/src/bin/node.rs +++ b/crates/rollup/src/bin/node.rs @@ -60,7 +60,7 @@ async fn main() -> Result<(), anyhow::Error> { let rollup = new_rollup( &GenesisPaths::from_dir(genesis_paths), rollup_config_path, - Some(RollupProverConfig::Execute), + RollupProverConfig::Execute, ) .await?; rollup.run().await @@ -70,7 +70,7 @@ async fn main() -> Result<(), anyhow::Error> { async fn new_rollup( genesis_paths: &GenesisPaths, rollup_config_path: &str, - prover_config: Option, + prover_config: RollupProverConfig, ) -> Result, anyhow::Error> { info!("Reading rollup config from {rollup_config_path:?}"); @@ -87,7 +87,7 @@ async fn new_rollup( async fn new_rollup( genesis_paths: &GenesisPaths, rollup_config_path: &str, - prover_config: Option, + prover_config: RollupProverConfig, ) -> Result, anyhow::Error> { info!( "Starting celestia rollup with config {}", diff --git a/crates/rollup/src/celestia_rollup.rs b/crates/rollup/src/celestia_rollup.rs index 7a18589..f20401d 100644 --- a/crates/rollup/src/celestia_rollup.rs +++ b/crates/rollup/src/celestia_rollup.rs @@ -17,7 +17,7 @@ use sov_state::config::Config as StorageConfig; use sov_state::storage_manager::ProverStorageManager; use sov_state::Storage; use sov_state::{DefaultStorageSpec, ZkStorage}; -use sov_stf_runner::BlockingProver; +use sov_stf_runner::ParallelProverService; use sov_stf_runner::RollupConfig; use sov_stf_runner::RollupProverConfig; use stf_starter::Runtime; @@ -48,7 +48,7 @@ impl sov_modules_rollup_blueprint::RollupBlueprint for CelestiaRollup { type NativeKernel = BasicKernel; type ZkKernel = BasicKernel; - type ProverService = BlockingProver< + type ProverService = ParallelProverService< <::Storage as Storage>::Root, <::Storage as Storage>::Witness, Self::DaService, @@ -110,7 +110,7 @@ impl sov_modules_rollup_blueprint::RollupBlueprint for CelestiaRollup { async fn create_prover_service( &self, - prover_config: Option, + prover_config: RollupProverConfig, _da_service: &Self::DaService, ) -> Self::ProverService { let vm = Risc0Host::new(risc0_starter::ROLLUP_ELF); @@ -121,7 +121,7 @@ impl sov_modules_rollup_blueprint::RollupBlueprint for CelestiaRollup { rollup_namespace: ROLLUP_NAMESPACE, }; - BlockingProver::new(vm, zk_stf, da_verifier, prover_config, zk_storage) + ParallelProverService::new(vm, zk_stf, da_verifier, prover_config, zk_storage) } } diff --git a/crates/rollup/src/mock_rollup.rs b/crates/rollup/src/mock_rollup.rs index ea5aad9..a2b56cc 100644 --- a/crates/rollup/src/mock_rollup.rs +++ b/crates/rollup/src/mock_rollup.rs @@ -13,7 +13,7 @@ use sov_rollup_interface::zk::ZkvmHost; use sov_state::config::Config as StorageConfig; use sov_state::Storage; use sov_state::{DefaultStorageSpec, ZkStorage}; -use sov_stf_runner::BlockingProver; +use sov_stf_runner::ParallelProverService; use sov_stf_runner::RollupConfig; use sov_stf_runner::RollupProverConfig; use stf_starter::Runtime; @@ -51,7 +51,7 @@ impl sov_modules_rollup_blueprint::RollupBlueprint for MockRollup { type ZkKernel = BasicKernel; /// Prover service. - type ProverService = BlockingProver< + type ProverService = ParallelProverService< <::Storage as Storage>::Root, <::Storage as Storage>::Witness, Self::DaService, @@ -101,7 +101,7 @@ impl sov_modules_rollup_blueprint::RollupBlueprint for MockRollup { async fn create_prover_service( &self, - prover_config: Option, + prover_config: RollupProverConfig, _da_service: &Self::DaService, ) -> Self::ProverService { let vm = Risc0Host::new(risc0_starter::MOCK_DA_ELF); @@ -109,7 +109,7 @@ impl sov_modules_rollup_blueprint::RollupBlueprint for MockRollup { let zk_storage = ZkStorage::new(); let da_verifier = Default::default(); - BlockingProver::new(vm, zk_stf, da_verifier, prover_config, zk_storage) + ParallelProverService::new(vm, zk_stf, da_verifier, prover_config, zk_storage) } } diff --git a/crates/rollup/tests/bank/mod.rs b/crates/rollup/tests/bank/mod.rs index d05c91c..3f1a0eb 100644 --- a/crates/rollup/tests/bank/mod.rs +++ b/crates/rollup/tests/bank/mod.rs @@ -25,7 +25,7 @@ async fn bank_tx_tests() -> Result<(), anyhow::Error> { start_rollup( port_tx, GenesisPaths::from_dir("../../test-data/genesis/mock/"), - Some(RollupProverConfig::Execute), + RollupProverConfig::Execute, ) .await; }); diff --git a/crates/rollup/tests/test_helpers.rs b/crates/rollup/tests/test_helpers.rs index 199632c..edc8269 100644 --- a/crates/rollup/tests/test_helpers.rs +++ b/crates/rollup/tests/test_helpers.rs @@ -11,7 +11,7 @@ use tokio::sync::oneshot; pub async fn start_rollup( rpc_reporting_channel: oneshot::Sender, genesis_paths: GenesisPaths, - rollup_prover_config: Option, + rollup_prover_config: RollupProverConfig, ) { let temp_dir = tempfile::tempdir().unwrap(); let temp_path = temp_dir.path(); diff --git a/crates/stf/src/runtime.rs b/crates/stf/src/runtime.rs index 318458b..2cd60d3 100644 --- a/crates/stf/src/runtime.rs +++ b/crates/stf/src/runtime.rs @@ -9,7 +9,7 @@ pub use sov_accounts::{AccountsRpcImpl, AccountsRpcServer}; #[cfg(feature = "native")] pub use sov_bank::{BankRpcImpl, BankRpcServer}; -use sov_modules_api::capabilities::{BlobRefOrOwned, BlobSelector}; +use sov_modules_api::runtime::capabilities::{BlobRefOrOwned, BlobSelector}; use sov_modules_api::macros::DefaultRuntime; #[cfg(feature = "native")] use sov_modules_api::Spec; diff --git a/rollup_config.toml b/rollup_config.toml index 5e116b9..98b089c 100644 --- a/rollup_config.toml +++ b/rollup_config.toml @@ -8,7 +8,7 @@ path = "../../rollup-starter-data" # We define the rollup's genesis to occur at block number `start_height`. The rollup will ignore # any blocks before this height [runner] -start_height = 1 +start_height = 0 [runner.rpc_config] # the host and port to bind the rpc server for diff --git a/sov-rollup-starter.sh b/sov-rollup-starter.sh old mode 100755 new mode 100644 index a1b8e2c..741b573 --- a/sov-rollup-starter.sh +++ b/sov-rollup-starter.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash trap 'jobs -p | xargs -r kill' EXIT -echo 'Running: `cd crates/rollup/`' -cd crates/rollup/ || exit +echo 'Running: '\''cd crates/rollup/'\''' +cd crates/rollup/ if [ $? -ne 0 ]; then echo "Expected exit code 0, got $?" exit 1 @@ -21,6 +21,12 @@ if [ $? -ne 0 ]; then echo "Expected exit code 0, got $?" exit 1 fi +echo 'Running: '\''make wait-five-seconds'\''' +make wait-five-seconds +if [ $? -ne 0 ]; then + echo "Expected exit code 0, got $?" + exit 1 +fi echo 'Running: '\''make test-bank-supply-of'\''' make test-bank-supply-of if [ $? -ne 0 ]; then