diff --git a/Cargo.lock b/Cargo.lock index 26c7be505..6837eaac2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,9 +154,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-chains" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fd095a9d70f4b1c5c102c84a4c782867a5c6416dbf6dcd42a63e7c7a89d3c8" +checksum = "24ceb48af11349cd7fbd12aa739800be3c4b3965f640b7ae26666907f3bdf091" dependencies = [ "alloy-rlp", "arbitrary", @@ -194,7 +194,7 @@ dependencies = [ "itoa", "serde", "serde_json", - "winnow 0.6.9", + "winnow 0.6.13", ] [[package]] @@ -281,7 +281,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8037e03c7f462a063f28daec9fda285a9a89da003c552f8637a80b9c8fd96241" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -369,30 +369,30 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dbd17d67f3e89478c8a634416358e539e577899666c927bc3d2b1328ee9b6ca" +checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6da95adcf4760bb4b108fefa51d50096c5e5fdd29ee72fed3e86ee414f2e34" +checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" dependencies = [ "alloy-sol-macro-input", "const-hex", - "heck 0.4.1", + "heck 0.5.0", "indexmap 2.2.6", "proc-macro-error", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", "syn-solidity", @@ -401,14 +401,14 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c8da04c1343871fb6ce5a489218f9c85323c8340a36e9106b5fc98d4dd59d5" +checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" dependencies = [ "const-hex", "dunce", "heck 0.5.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", "syn-solidity", @@ -416,11 +416,11 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368cae4dc052cad1d8f72eb2ae0c38027116933eeb49213c200a9e9875f208d7" +checksum = "baa2fbd22d353d8685bd9fee11ba2d8b5c3b1d11e56adb3265fcf1f32bfdf404" dependencies = [ - "winnow 0.6.9", + "winnow 0.6.13", ] [[package]] @@ -508,9 +508,9 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] @@ -540,7 +540,7 @@ dependencies = [ "include_dir", "itertools 0.10.5", "proc-macro-error", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -678,7 +678,7 @@ checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ "num-bigint 0.4.5", "num-traits", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -751,7 +751,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -855,7 +855,7 @@ version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -904,7 +904,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -940,16 +940,16 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.72" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line 0.22.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.35.0", + "object 0.36.0", "rustc-demangle", ] @@ -1051,7 +1051,7 @@ dependencies = [ "itertools 0.12.1", "lazy_static", "lazycell", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "regex", "rustc-hash", @@ -1344,7 +1344,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6be9c93793b60dac381af475b98634d4b451e28336e72218cad9a20176218dbc" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", "synstructure", @@ -1407,7 +1407,7 @@ dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "syn 1.0.109", ] @@ -1417,7 +1417,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -1428,7 +1428,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -1512,7 +1512,7 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -1621,9 +1621,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ "jobserver", "libc", @@ -1716,6 +1716,7 @@ dependencies = [ "bitcoin-da", "borsh", "citrea-evm", + "citrea-fullnode", "citrea-prover", "citrea-risc0-bonsai-adapter", "citrea-sequencer", @@ -1814,6 +1815,33 @@ dependencies = [ "walkdir", ] +[[package]] +name = "citrea-fullnode" +version = "0.4.0-rc.3" +dependencies = [ + "anyhow", + "backoff", + "borsh", + "futures", + "hex", + "jsonrpsee", + "rand 0.8.5", + "rs_merkle", + "sequencer-client", + "serde", + "serde_json", + "shared-backup-db", + "sov-db", + "sov-mock-da", + "sov-modules-api", + "sov-modules-rollup-blueprint", + "sov-modules-stf-blueprint", + "sov-rollup-interface", + "sov-stf-runner", + "tokio", + "tracing", +] + [[package]] name = "citrea-prover" version = "0.4.0-rc.3" @@ -1896,6 +1924,7 @@ dependencies = [ "sov-db", "sov-mock-da", "sov-modules-api", + "sov-modules-rollup-blueprint", "sov-modules-stf-blueprint", "sov-rollup-interface", "sov-state", @@ -1941,9 +1970,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", "clap_derive", @@ -1951,9 +1980,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -1963,21 +1992,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "coins-bip32" @@ -2064,7 +2093,7 @@ dependencies = [ "directories", "serde", "thiserror", - "toml 0.8.13", + "toml 0.8.14", ] [[package]] @@ -2362,7 +2391,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -2395,7 +2424,7 @@ checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "strsim 0.9.3", "syn 1.0.109", @@ -2409,7 +2438,7 @@ checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "strsim 0.11.1", "syn 2.0.66", @@ -2560,7 +2589,7 @@ dependencies = [ "sov-value-setter", "tempfile", "tokio", - "toml 0.8.13", + "toml 0.8.14", "tracing", ] @@ -2590,7 +2619,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -2601,7 +2630,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -2614,7 +2643,7 @@ checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ "darling 0.10.2", "derive_builder_core", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -2626,7 +2655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ "darling 0.10.2", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -2638,7 +2667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "rustc_version 0.4.0", "syn 1.0.109", @@ -2753,7 +2782,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -2861,7 +2890,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" dependencies = [ "enum-ordinalize", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -2966,7 +2995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -2978,7 +3007,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -2991,7 +3020,7 @@ checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ "num-bigint 0.4.5", "num-traits", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -3002,7 +3031,7 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -3199,14 +3228,14 @@ dependencies = [ "ethers-etherscan", "eyre", "prettyplease", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "regex", "reqwest 0.11.27", "serde", "serde_json", "syn 2.0.66", - "toml 0.8.13", + "toml 0.8.14", "walkdir", ] @@ -3220,7 +3249,7 @@ dependencies = [ "const-hex", "ethers-contract-abigen", "ethers-core", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "serde_json", "syn 2.0.66", @@ -3483,7 +3512,7 @@ dependencies = [ "num-bigint 0.3.3", "num-integer", "num-traits", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -3629,7 +3658,7 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -4084,12 +4113,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http 1.1.0", "http-body 1.0.0", "pin-project-lite", @@ -4103,9 +4132,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "d0e7a4dd27b9476dc40cb050d3632d3bba3a70ddbff012285f7f8559a1e7e545" [[package]] name = "httpdate" @@ -4137,9 +4166,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", @@ -4187,7 +4216,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.29", "log", "rustls 0.21.12", "rustls-native-certs 0.6.3", @@ -4220,7 +4249,7 @@ checksum = "6eea26c5d0b6ab9d72219f65000af310f042a740926f7b2fa3553e774036e2e7" dependencies = [ "derive_builder", "dns-lookup", - "hyper 0.14.28", + "hyper 0.14.29", "tokio", "tower-service", "tracing", @@ -4401,7 +4430,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2abdd3a62551e8337af119c5899e600ca0c88ec8f23a46c60ba216c803dcf1a" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -4435,12 +4464,14 @@ dependencies = [ [[package]] name = "idna" -version = "0.5.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", + "smallvec", + "utf8_iter", ] [[package]] @@ -4454,7 +4485,7 @@ dependencies = [ "bytes", "futures", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.29", "log", "rand 0.8.5", "tokio", @@ -4495,7 +4526,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -4515,7 +4546,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", ] @@ -4805,7 +4836,7 @@ dependencies = [ "tokio-util", "tracing", "url", - "webpki-roots 0.26.1", + "webpki-roots 0.26.2", ] [[package]] @@ -4819,7 +4850,7 @@ dependencies = [ "beef", "futures-timer", "futures-util", - "hyper 0.14.28", + "hyper 0.14.29", "jsonrpsee-types", "parking_lot 0.12.3", "pin-project", @@ -4841,7 +4872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ccf93fc4a0bfe05d851d37d7c32b7f370fe94336b52a2f0efc5f1981895c2e5" dependencies = [ "async-trait", - "hyper 0.14.28", + "hyper 0.14.29", "hyper-rustls 0.24.2", "jsonrpsee-core", "jsonrpsee-types", @@ -4862,7 +4893,7 @@ checksum = "7d0bb047e79a143b32ea03974a6bf59b62c2a4c5f5d42a381c907a8bbb3f75c0" dependencies = [ "heck 0.4.1", "proc-macro-crate 3.1.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -4875,7 +4906,7 @@ checksum = "12d8b6a9674422a8572e0b0abb12feeb3f2aeda86528c80d0350c2bd0923ab41" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.29", "jsonrpsee-core", "jsonrpsee-types", "pin-project", @@ -5002,7 +5033,7 @@ dependencies = [ "lalrpop-util", "petgraph", "regex", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "string_cache", "term", "tiny-keccak", @@ -5016,7 +5047,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.6", + "regex-automata 0.4.7", ] [[package]] @@ -5036,7 +5067,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44bcd58e6c97a7fcbaffcdc95728b393b8d98933bfadad49ed4097845b57ef0b" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "regex", "syn 2.0.66", @@ -5175,9 +5206,9 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +checksum = "55cca1eb2bc1fd29f099f3daaab7effd01e1a54b7c577d0ed082521034d912e8" dependencies = [ "asn1_der", "bs58", @@ -5395,9 +5426,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "e9764018d143cc854c9f17f0b907de70f14393b1f502da6375dce70f00514eb3" dependencies = [ "cc", "libc", @@ -5519,7 +5550,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" dependencies = [ "base64 0.21.7", - "hyper 0.14.28", + "hyper 0.14.29", "indexmap 1.9.3", "ipnet", "metrics", @@ -5536,7 +5567,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -5639,7 +5670,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -5837,7 +5868,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -5848,7 +5879,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -5920,7 +5951,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate 3.1.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -5961,9 +5992,9 @@ dependencies = [ [[package]] name = "object" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" dependencies = [ "memchr", ] @@ -6006,7 +6037,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" dependencies = [ "bytes", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -6070,7 +6101,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ "proc-macro-crate 3.1.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -6271,7 +6302,7 @@ checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", "phf_shared 0.11.2", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -6309,7 +6340,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -6328,9 +6359,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", "fastrand", @@ -6466,7 +6497,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "syn 2.0.66", ] @@ -6509,7 +6540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", "version_check", @@ -6521,7 +6552,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "version_check", ] @@ -6537,9 +6568,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.84" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] @@ -6598,7 +6629,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "rusty-fork", "tempfile", "unarray", @@ -6621,7 +6652,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cf16337405ca084e9c78985114633b6827711d22b9e6ef6c6c0d665eb3f0b6e" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -6665,7 +6696,7 @@ checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", "itertools 0.12.1", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -6698,7 +6729,7 @@ dependencies = [ "futures-core", "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.29", "hyper-system-resolver", "pin-project-lite", "thiserror", @@ -6755,7 +6786,7 @@ version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", ] [[package]] @@ -6929,14 +6960,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick 1.1.3", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -6950,13 +6981,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick 1.1.3", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -6967,9 +6998,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "regress" @@ -6995,7 +7026,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.29", "hyper-rustls 0.24.2", "ipnet", "js-sys", @@ -7060,7 +7091,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.1", + "webpki-roots 0.26.2", "winreg 0.52.0", ] @@ -7123,7 +7154,7 @@ version = "0.2.0-beta.7" source = "git+https://github.com/paradigmxyz/reth?tag=v0.2.0-beta.7#a44e0857373cee447c3823608194ccac53509140" dependencies = [ "convert_case 0.6.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -7518,7 +7549,7 @@ version = "0.2.0-beta.7" source = "git+https://github.com/paradigmxyz/reth?tag=v0.2.0-beta.7#a44e0857373cee447c3823608194ccac53509140" dependencies = [ "once_cell", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "regex", "syn 2.0.66", @@ -7676,7 +7707,7 @@ dependencies = [ "eyre", "futures", "humantime", - "hyper 0.14.28", + "hyper 0.14.29", "metrics", "metrics-exporter-prometheus", "metrics-process", @@ -7870,7 +7901,7 @@ dependencies = [ "futures", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.29", "jsonrpsee", "jsonwebtoken 8.3.0", "metrics", @@ -7926,7 +7957,7 @@ name = "reth-rpc-builder" version = "0.2.0-beta.7" source = "git+https://github.com/paradigmxyz/reth?tag=v0.2.0-beta.7#a44e0857373cee447c3823608194ccac53509140" dependencies = [ - "hyper 0.14.28", + "hyper 0.14.29", "jsonrpsee", "metrics", "pin-project", @@ -8549,16 +8580,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] [[package]] name = "roaring" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26f4c25a604fcb3a1bcd96dd6ba37c93840de95de8198d94c0d571a74a804d1" +checksum = "7699249cc2c7d71939f30868f47e9d7add0bdc030d90ee10bfd16887ff8bb1c8" dependencies = [ "bytemuck", "byteorder", @@ -8614,9 +8645,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ "alloy-rlp", "arbitrary", @@ -8639,9 +8670,9 @@ dependencies = [ [[package]] name = "ruint-macro" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rusqlite" @@ -8902,7 +8933,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ "proc-macro-crate 3.1.0", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", ] @@ -8934,7 +8965,7 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "serde_derive_internals", "syn 2.0.66", @@ -9115,7 +9146,7 @@ version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -9126,7 +9157,7 @@ version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -9189,7 +9220,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" dependencies = [ "darling 0.20.9", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -9687,7 +9718,7 @@ dependencies = [ "borsh", "clap", "jsonrpsee", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "serde", "serde_json", @@ -9705,7 +9736,6 @@ dependencies = [ "anyhow", "async-trait", "borsh", - "citrea-sequencer", "hex", "jsonrpsee", "sequencer-client", @@ -9717,6 +9747,7 @@ dependencies = [ "sov-modules-api", "sov-modules-stf-blueprint", "sov-rollup-interface", + "sov-sequencer", "sov-state", "sov-stf-runner", "tokio", @@ -9964,7 +9995,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "toml 0.8.13", + "toml 0.8.14", "tracing", ] @@ -10008,7 +10039,7 @@ dependencies = [ name = "sov-zk-cycle-macros" version = "0.4.0-rc.3" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "risc0-zkvm", "risc0-zkvm-platform", @@ -10122,12 +10153,12 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", - "proc-macro2 1.0.84", + "heck 0.5.0", + "proc-macro2 1.0.85", "quote 1.0.36", "rustversion", "syn 2.0.66", @@ -10199,7 +10230,7 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "unicode-ident", ] @@ -10210,19 +10241,19 @@ version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "unicode-ident", ] [[package]] name = "syn-solidity" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8db114c44cf843a8bacd37a146e37987a0b823a0e8bc4fdc610c9c72ab397a5" +checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" dependencies = [ "paste", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -10239,7 +10270,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -10324,7 +10355,7 @@ version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -10457,7 +10488,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -10562,14 +10593,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.13" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.13", + "toml_edit 0.22.14", ] [[package]] @@ -10594,15 +10625,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.9", + "winnow 0.6.13", ] [[package]] @@ -10698,7 +10729,7 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -10907,7 +10938,7 @@ dependencies = [ "serde_derive", "serde_json", "termcolor", - "toml 0.8.13", + "toml 0.8.14", ] [[package]] @@ -10971,7 +11002,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -11097,12 +11128,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna 1.0.0", "percent-encoding", ] @@ -11126,9 +11157,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -11252,7 +11283,7 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", "wasm-bindgen-shared", @@ -11286,7 +11317,7 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", "wasm-bindgen-backend", @@ -11317,9 +11348,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "3c452ad30530b54a4d8e71952716a212b08efd0f3562baa66c29a618b07da7c3" dependencies = [ "rustls-pki-types", ] @@ -11541,9 +11572,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.9" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -11656,7 +11687,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", "synstructure", @@ -11677,7 +11708,7 @@ version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -11697,7 +11728,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", "synstructure", @@ -11718,7 +11749,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] @@ -11740,7 +11771,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" dependencies = [ - "proc-macro2 1.0.84", + "proc-macro2 1.0.85", "quote 1.0.36", "syn 2.0.66", ] diff --git a/Cargo.toml b/Cargo.toml index d499516c4..4791aa649 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,10 +6,12 @@ members = [ "bin/rollup-constants", "crates/bitcoin-da", "crates/evm", + "crates/ethereum-rpc", + "crates/fullnode", "crates/sequencer", "crates/sequencer-client", "crates/soft-confirmation-rule-enforcer", - "crates/ethereum-rpc", + "crates/shared-backup-db", # Sovereign sdk "crates/sovereign-sdk/rollup-interface", "crates/sovereign-sdk/adapters/risc0", @@ -50,8 +52,6 @@ members = [ "crates/sovereign-sdk/module-system/module-implementations/examples/sov-vec-setter", "crates/sovereign-sdk/module-system/module-implementations/examples/sov-accessory-state", "crates/sovereign-sdk/module-system/module-implementations/integration-tests", - # Offchain - "crates/shared-backup-db", ] [workspace.package] diff --git a/bin/citrea/Cargo.toml b/bin/citrea/Cargo.toml index d4dd85e23..669fad19e 100644 --- a/bin/citrea/Cargo.toml +++ b/bin/citrea/Cargo.toml @@ -14,6 +14,7 @@ resolver = "2" [dependencies] # Citrea deps bitcoin-da = { path = "../../crates/bitcoin-da", features = ["native"] } +citrea-fullnode = { path = "../../crates/fullnode" } citrea-prover = { path = "../../crates/prover" } citrea-sequencer = { path = "../../crates/sequencer" } citrea-stf = { path = "../../crates/citrea-stf", features = ["native"] } diff --git a/bin/citrea/src/main.rs b/bin/citrea/src/main.rs index 421f80bc1..4d973fbf4 100644 --- a/bin/citrea/src/main.rs +++ b/bin/citrea/src/main.rs @@ -161,10 +161,13 @@ where error!("Error: {}", e); } } else { - let rollup = rollup_blueprint - .create_new_rollup(rt_genesis_paths, rollup_config) - .await - .unwrap(); + let rollup = CitreaRollupBlueprint::create_new_rollup( + &rollup_blueprint, + rt_genesis_paths, + rollup_config, + ) + .await + .unwrap(); if let Err(e) = rollup.run().await { error!("Error: {}", e); } diff --git a/bin/citrea/src/rollup/mod.rs b/bin/citrea/src/rollup/mod.rs index 3076104dd..f9f3e7770 100644 --- a/bin/citrea/src/rollup/mod.rs +++ b/bin/citrea/src/rollup/mod.rs @@ -1,6 +1,8 @@ use async_trait::async_trait; pub use bitcoin::*; +use citrea_fullnode::{CitreaFullnode, FullNode}; use citrea_prover::{CitreaProver, Prover}; +use citrea_sequencer::{CitreaSequencer, Sequencer, SequencerConfig}; pub use mock::*; use sov_modules_api::storage::HierarchicalStorageManager; use sov_modules_api::Spec; @@ -16,6 +18,143 @@ mod mock; /// Overrides RollupBlueprint methods #[async_trait] pub trait CitreaRollupBlueprint: RollupBlueprint { + /// Creates a new sequencer + #[instrument(level = "trace", skip_all)] + async fn create_new_sequencer( + &self, + runtime_genesis_paths: &>::GenesisPaths, + rollup_config: RollupConfig, + sequencer_config: SequencerConfig, + ) -> Result, anyhow::Error> + where + ::Storage: NativeStorage, + { + let da_service = self.create_da_service(&rollup_config).await; + + // TODO: Double check what kind of storage needed here. + // Maybe whole "prev_root" can be initialized inside runner + // Getting block here, so prover_service doesn't have to be `Send` + + let ledger_db = self.create_ledger_db(&rollup_config); + let genesis_config = self.create_genesis_config(runtime_genesis_paths, &rollup_config)?; + + let mut storage_manager = self.create_storage_manager(&rollup_config)?; + let prover_storage = storage_manager.create_finalized_storage()?; + + let prev_root = ledger_db + .get_head_soft_batch()? + .map(|(number, _)| prover_storage.get_root_hash(number.0 + 1)) + .transpose()?; + + // TODO(https://github.com/Sovereign-Labs/sovereign-sdk/issues/1218) + let rpc_methods = + self.create_rpc_methods(&prover_storage, &ledger_db, &da_service, None)?; + + let native_stf = StfBlueprint::new(); + + let genesis_root = prover_storage.get_root_hash(1); + + let init_variant = match prev_root { + Some(root_hash) => InitVariant::Initialized(root_hash), + None => match genesis_root { + Ok(root_hash) => InitVariant::Initialized(root_hash), + _ => InitVariant::Genesis(genesis_config), + }, + }; + + let seq = CitreaSequencer::new( + da_service, + prover_storage, + sequencer_config, + native_stf, + storage_manager, + init_variant, + rollup_config.public_keys, + ledger_db, + rollup_config.rpc, + ) + .unwrap(); + + Ok(Sequencer { + runner: seq, + rpc_methods, + }) + } + + /// Creates a new rollup. + #[instrument(level = "trace", skip_all)] + async fn create_new_rollup( + &self, + runtime_genesis_paths: &>::GenesisPaths, + rollup_config: RollupConfig, + ) -> Result, anyhow::Error> + where + ::Storage: NativeStorage, + { + let da_service = self.create_da_service(&rollup_config).await; + + // TODO: Double check what kind of storage needed here. + // Maybe whole "prev_root" can be initialized inside runner + // Getting block here, so prover_service doesn't have to be `Send` + + let ledger_db = self.create_ledger_db(&rollup_config); + let genesis_config = self.create_genesis_config(runtime_genesis_paths, &rollup_config)?; + + let mut storage_manager = self.create_storage_manager(&rollup_config)?; + let prover_storage = storage_manager.create_finalized_storage()?; + + let prev_root = ledger_db + .get_head_soft_batch()? + .map(|(number, _)| prover_storage.get_root_hash(number.0 + 1)) + .transpose()?; + + let runner_config = rollup_config.runner.expect("Runner config is missing"); + // TODO(https://github.com/Sovereign-Labs/sovereign-sdk/issues/1218) + let rpc_methods = self.create_rpc_methods( + &prover_storage, + &ledger_db, + &da_service, + Some(runner_config.sequencer_client_url.clone()), + )?; + + let native_stf = StfBlueprint::new(); + + let genesis_root = prover_storage.get_root_hash(1); + + let init_variant = match prev_root { + Some(root_hash) => InitVariant::Initialized(root_hash), + None => match genesis_root { + Ok(root_hash) => InitVariant::Initialized(root_hash), + _ => InitVariant::Genesis(genesis_config), + }, + }; + + let code_commitment = self.get_code_commitment(); + + let runner = CitreaFullnode::new( + runner_config, + rollup_config.public_keys, + rollup_config.rpc, + da_service, + ledger_db, + native_stf, + storage_manager, + init_variant, + code_commitment, + )?; + + Ok(FullNode { + runner, + rpc_methods, + }) + } + /// Creates a new prover #[instrument(level = "trace", skip_all)] async fn create_new_prover( diff --git a/bin/citrea/tests/test_helpers/mod.rs b/bin/citrea/tests/test_helpers/mod.rs index acd07d4c4..fb781eb13 100644 --- a/bin/citrea/tests/test_helpers/mod.rs +++ b/bin/citrea/tests/test_helpers/mod.rs @@ -11,7 +11,6 @@ use shared_backup_db::PostgresConnector; use sov_mock_da::{MockAddress, MockDaConfig, MockDaService}; use sov_modules_api::default_signature::private_key::DefaultPrivateKey; use sov_modules_api::PrivateKey; -use sov_modules_rollup_blueprint::RollupBlueprint; use sov_stf_runner::{ ProverConfig, RollupConfig, RollupPublicKeys, RpcConfig, RunnerConfig, StorageConfig, }; @@ -55,11 +54,14 @@ pub async fn start_rollup( match node_mode { NodeMode::FullNode(_) => { let span = info_span!("FullNode"); - let rollup = mock_demo_rollup - .create_new_rollup(&rt_genesis_paths, rollup_config.clone()) - .instrument(span.clone()) - .await - .unwrap(); + let rollup = CitreaRollupBlueprint::create_new_rollup( + &mock_demo_rollup, + &rt_genesis_paths, + rollup_config.clone(), + ) + .instrument(span.clone()) + .await + .unwrap(); rollup .run_and_report_rpc_port(Some(rpc_reporting_channel)) .instrument(span) @@ -99,11 +101,15 @@ pub async fn start_rollup( }); let span = info_span!("Sequencer"); - let sequencer_rollup = mock_demo_rollup - .create_new_sequencer(&rt_genesis_paths, rollup_config.clone(), sequencer_config) - .instrument(span.clone()) - .await - .unwrap(); + let sequencer_rollup = CitreaRollupBlueprint::create_new_sequencer( + &mock_demo_rollup, + &rt_genesis_paths, + rollup_config.clone(), + sequencer_config, + ) + .instrument(span.clone()) + .await + .unwrap(); sequencer_rollup .run_and_report_rpc_port(Some(rpc_reporting_channel)) .instrument(span) diff --git a/crates/fullnode/Cargo.toml b/crates/fullnode/Cargo.toml new file mode 100644 index 000000000..7f139f698 --- /dev/null +++ b/crates/fullnode/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "citrea-fullnode" +version.workspace = true +authors.workspace = true +edition.workspace = true +homepage.workspace = true +license.workspace = true +publish.workspace = true +repository.workspace = true + +[dependencies] +# Citrea Deps +sequencer-client = { path = "../sequencer-client" } +shared-backup-db = { path = "../shared-backup-db" } + +# Sov SDK deps +sov-db = { path = "../sovereign-sdk/full-node/db/sov-db" } +sov-mock-da = { path = "../sovereign-sdk/adapters/mock-da", features = ["native"] } +sov-modules-api = { path = "../sovereign-sdk/module-system/sov-modules-api", default-features = false } +sov-modules-rollup-blueprint = { path = "../sovereign-sdk/module-system/sov-modules-rollup-blueprint" } +sov-modules-stf-blueprint = { path = "../sovereign-sdk/module-system/sov-modules-stf-blueprint", features = ["native"] } +sov-rollup-interface = { path = "../sovereign-sdk/rollup-interface" } +sov-stf-runner = { path = "../sovereign-sdk/full-node/sov-stf-runner" } + +# 3rd-party deps +anyhow = { workspace = true } +backoff = { workspace = true } +borsh = { workspace = true } +futures = { workspace = true } +hex = { workspace = true } +jsonrpsee = { workspace = true } +rand = { workspace = true } +rs_merkle = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } diff --git a/crates/fullnode/src/lib.rs b/crates/fullnode/src/lib.rs new file mode 100644 index 000000000..a294ee29e --- /dev/null +++ b/crates/fullnode/src/lib.rs @@ -0,0 +1,49 @@ +use std::net::SocketAddr; + +pub use runner::*; +use sov_modules_rollup_blueprint::RollupBlueprint; +use sov_modules_stf_blueprint::StfBlueprint; +use tokio::sync::oneshot; +use tracing::instrument; +mod runner; + +/// Dependencies needed to run the rollup. +pub struct FullNode { + /// The State Transition Runner. + #[allow(clippy::type_complexity)] + pub runner: CitreaFullnode< + StfBlueprint, + S::StorageManager, + S::DaService, + S::Vm, + S::NativeContext, + >, + /// Rpc methods for the rollup. + pub rpc_methods: jsonrpsee::RpcModule<()>, +} + +impl FullNode { + /// Runs the rollup. + #[instrument(level = "trace", skip(self), err, ret(level = "error"))] + pub async fn run(self) -> Result<(), anyhow::Error> { + self.run_and_report_rpc_port(None).await + } + + /// Only run the rpc. + pub async fn run_rpc(self) -> Result<(), anyhow::Error> { + self.runner.start_rpc_server(self.rpc_methods, None).await; + Ok(()) + } + + /// Runs the rollup. Reports rpc port to the caller using the provided channel. + pub async fn run_and_report_rpc_port( + self, + channel: Option>, + ) -> Result<(), anyhow::Error> { + let mut runner = self.runner; + runner.start_rpc_server(self.rpc_methods, channel).await; + + runner.run().await?; + Ok(()) + } +} diff --git a/crates/fullnode/src/runner.rs b/crates/fullnode/src/runner.rs new file mode 100644 index 000000000..039d8a8c9 --- /dev/null +++ b/crates/fullnode/src/runner.rs @@ -0,0 +1,652 @@ +use std::marker::PhantomData; +use std::net::SocketAddr; + +use anyhow::anyhow; +use backoff::future::retry as retry_backoff; +use backoff::ExponentialBackoffBuilder; +use borsh::de::BorshDeserialize; +use borsh::BorshSerialize as _; +use jsonrpsee::core::client::Error as JsonrpseeError; +use jsonrpsee::RpcModule; +use rs_merkle::algorithms::Sha256; +use rs_merkle::MerkleTree; +use sequencer_client::SequencerClient; +use sov_db::ledger_db::{LedgerDB, SlotCommit}; +use sov_db::schema::types::{BatchNumber, SlotNumber, StoredSoftBatch, StoredStateTransition}; +use sov_modules_api::Context; +use sov_modules_stf_blueprint::StfBlueprintTrait; +use sov_rollup_interface::da::{ + BlobReaderTrait, BlockHeaderTrait, DaData, DaSpec, SequencerCommitment, +}; +use sov_rollup_interface::rpc::SoftConfirmationStatus; +use sov_rollup_interface::services::da::{DaService, SlotData}; +pub use sov_rollup_interface::stf::BatchReceipt; +use sov_rollup_interface::stf::{SoftBatchReceipt, StateTransitionFunction}; +use sov_rollup_interface::storage::HierarchicalStorageManager; +use sov_rollup_interface::zk::{Proof, Zkvm, ZkvmHost}; +use sov_stf_runner::{InitVariant, RollupPublicKeys, RpcConfig, RunnerConfig}; +use tokio::sync::oneshot; +use tokio::time::{sleep, Duration}; +use tracing::{debug, error, info, instrument, warn}; + +type StateRoot = >::StateRoot; + +/// Citrea's own STF runner implementation. +pub struct CitreaFullnode +where + Da: DaService, + Vm: ZkvmHost + Zkvm, + Sm: HierarchicalStorageManager, + Stf: StateTransitionFunction::ValidityCondition> + + StfBlueprintTrait, + C: Context, +{ + start_height: u64, + da_service: Da, + stf: Stf, + storage_manager: Sm, + /// made pub so that sequencer can clone it + pub ledger_db: LedgerDB, + state_root: StateRoot, + rpc_config: RpcConfig, + sequencer_client: SequencerClient, + sequencer_pub_key: Vec, + sequencer_da_pub_key: Vec, + prover_da_pub_key: Vec, + phantom: std::marker::PhantomData, + include_tx_body: bool, + code_commitment: Vm::CodeCommitment, + accept_public_input_as_proven: bool, +} + +impl CitreaFullnode +where + Da: DaService + Clone + Send + Sync + 'static, + Vm: ZkvmHost + Zkvm, + Sm: HierarchicalStorageManager, + Stf: StateTransitionFunction< + Vm, + Da::Spec, + Condition = ::ValidityCondition, + PreState = Sm::NativeStorage, + ChangeSet = Sm::NativeChangeSet, + > + StfBlueprintTrait, + C: Context, +{ + /// Creates a new `StateTransitionRunner`. + /// + /// If a previous state root is provided, uses that as the starting point + /// for execution. Otherwise, initializes the chain using the provided + /// genesis config. + #[allow(clippy::too_many_arguments)] + pub fn new( + runner_config: RunnerConfig, + public_keys: RollupPublicKeys, + rpc_config: RpcConfig, + da_service: Da, + ledger_db: LedgerDB, + stf: Stf, + mut storage_manager: Sm, + init_variant: InitVariant, + code_commitment: Vm::CodeCommitment, + ) -> Result { + let prev_state_root = match init_variant { + InitVariant::Initialized(state_root) => { + debug!("Chain is already initialized. Skipping initialization."); + state_root + } + InitVariant::Genesis(params) => { + info!("No history detected. Initializing chain..."); + let storage = storage_manager.create_storage_on_l2_height(0)?; + let (genesis_root, initialized_storage) = stf.init_chain(storage, params); + storage_manager.save_change_set_l2(0, initialized_storage)?; + storage_manager.finalize_l2(0)?; + info!( + "Chain initialization is done. Genesis root: 0x{}", + hex::encode(genesis_root.as_ref()), + ); + genesis_root + } + }; + + // Start the main rollup loop + let item_numbers = ledger_db.get_next_items_numbers(); + let last_soft_batch_processed_before_shutdown = item_numbers.soft_batch_number; + + let start_height = last_soft_batch_processed_before_shutdown; + + Ok(Self { + start_height, + da_service, + stf, + storage_manager, + ledger_db, + state_root: prev_state_root, + rpc_config, + sequencer_client: SequencerClient::new(runner_config.sequencer_client_url), + sequencer_pub_key: public_keys.sequencer_public_key, + sequencer_da_pub_key: public_keys.sequencer_da_pub_key, + prover_da_pub_key: public_keys.prover_da_pub_key, + phantom: std::marker::PhantomData, + include_tx_body: runner_config.include_tx_body, + code_commitment, + accept_public_input_as_proven: runner_config + .accept_public_input_as_proven + .unwrap_or(false), + }) + } + + /// Starts a RPC server with provided rpc methods. + pub async fn start_rpc_server( + &self, + methods: RpcModule<()>, + channel: Option>, + ) { + let bind_host = match self.rpc_config.bind_host.parse() { + Ok(bind_host) => bind_host, + Err(e) => { + error!("Failed to parse bind host: {}", e); + return; + } + }; + let listen_address = SocketAddr::new(bind_host, self.rpc_config.bind_port); + + let max_connections = self.rpc_config.max_connections; + + let _handle = tokio::spawn(async move { + let server = jsonrpsee::server::ServerBuilder::default() + .max_connections(max_connections) + .build([listen_address].as_ref()) + .await; + + match server { + Ok(server) => { + let bound_address = match server.local_addr() { + Ok(address) => address, + Err(e) => { + error!("{}", e); + return; + } + }; + if let Some(channel) = channel { + if let Err(e) = channel.send(bound_address) { + error!("Could not send bound_address {}: {}", bound_address, e); + return; + } + } + info!("Starting RPC server at {} ", &bound_address); + + let _server_handle = server.start(methods); + futures::future::pending::<()>().await; + } + Err(e) => { + error!("Could not start RPC server: {}", e); + } + } + }); + } + + /// Runs the rollup. + #[instrument(level = "trace", skip_all, err)] + pub async fn run(&mut self) -> Result<(), anyhow::Error> { + let mut last_l1_height = 0; + let mut cur_l1_block = None; + + let mut height = self.start_height; + info!("Starting to sync from height {}", height); + + loop { + let exponential_backoff = ExponentialBackoffBuilder::new() + .with_initial_interval(Duration::from_secs(1)) + .with_max_elapsed_time(Some(Duration::from_secs(15 * 60))) + .build(); + let inner_client = &self.sequencer_client; + let soft_batch = match retry_backoff(exponential_backoff.clone(), || async move { + match inner_client.get_soft_batch::(height).await { + Ok(Some(soft_batch)) => Ok(soft_batch), + Ok(None) => { + debug!("Soft Batch: no batch at height {}, retrying...", height); + + // We wait for 2 seconds and then return a Permanent error so that we exit the retry. + // This should not backoff exponentially + sleep(Duration::from_secs(2)).await; + Err(backoff::Error::Permanent( + "No soft batch published".to_owned(), + )) + } + Err(e) => match e.downcast_ref::() { + Some(JsonrpseeError::Transport(e)) => { + let error_msg = + format!("Soft Batch: connection error during RPC call: {:?}", e); + debug!(error_msg); + Err(backoff::Error::Transient { + err: error_msg, + retry_after: None, + }) + } + _ => Err(backoff::Error::Transient { + err: format!("Soft Batch: unknown error from RPC call: {:?}", e), + retry_after: None, + }), + }, + } + }) + .await + { + Ok(soft_batch) => soft_batch, + Err(_) => { + continue; + } + }; + + if last_l1_height != soft_batch.da_slot_height || cur_l1_block.is_none() { + last_l1_height = soft_batch.da_slot_height; + // TODO: for a node, the da block at slot_height might not have been finalized yet + // should wait for it to be finalized + let da_service = &self.da_service; + let filtered_block = retry_backoff(exponential_backoff.clone(), || async { + da_service + .get_block_at(soft_batch.da_slot_height) + .await + .map_err(backoff::Error::transient) + }) + .await?; + + // Set the l1 height of the l1 hash + self.ledger_db + .set_l1_height_of_l1_hash( + filtered_block.header().hash().into(), + soft_batch.da_slot_height, + ) + .unwrap(); + + // Merkle root hash - L1 start height - L1 end height + // TODO: How to confirm this is what we submit - use? + // TODO: Add support for multiple commitments in a single block + + let mut sequencer_commitments = Vec::::new(); + let mut zk_proofs = Vec::::new(); + + self.da_service + .extract_relevant_blobs(&filtered_block) + .into_iter() + .for_each(|mut tx| { + let data = DaData::try_from_slice(tx.full_data()); + // Check for commitment + if tx.sender().as_ref() == self.sequencer_da_pub_key.as_slice() { + if let Ok(DaData::SequencerCommitment(seq_com)) = data { + sequencer_commitments.push(seq_com); + } else { + tracing::warn!( + "Found broken DA data in block 0x{}: {:?}", + hex::encode(filtered_block.hash()), + data + ); + } + } + let data = DaData::try_from_slice(tx.full_data()); + // Check for proof + if tx.sender().as_ref() == self.prover_da_pub_key.as_slice() { + if let Ok(DaData::ZKProof(proof)) = data { + zk_proofs.push(proof); + } else { + tracing::warn!( + "Found broken DA data in block 0x{}: {:?}", + hex::encode(filtered_block.hash()), + data + ); + } + } else { + warn!("Force transactions are not implemented yet"); + // TODO: This is where force transactions will land - try to parse DA data force transaction + } + }); + + for proof in zk_proofs { + tracing::warn!("Processing zk proof: {:?}", proof); + let state_transition = match proof.clone() { + Proof::Full(proof) => { + let code_commitment = self.code_commitment.clone(); + + tracing::warn!( + "using code commitment: {:?}", + serde_json::to_string(&code_commitment).unwrap() + ); + + if let Ok(proof_data) = + Vm::verify_and_extract_output::< + ::Spec, + Stf::StateRoot, + >(&proof, &code_commitment) + { + if proof_data.sequencer_da_public_key != self.sequencer_da_pub_key + || proof_data.sequencer_public_key != self.sequencer_pub_key + { + tracing::warn!( + "Proof verification: Sequencer public key or sequencer da public key mismatch. Skipping proof." + ); + continue; + } + proof_data + } else { + tracing::warn!( + "Proof verification: SNARK verification failed. Skipping to next proof.." + ); + continue; + } + } + Proof::PublicInput(_) => { + if !self.accept_public_input_as_proven { + tracing::warn!("Found public input in da block number: {:?}, Skipping to next proof..", soft_batch.da_slot_height); + continue; + } + // public input is accepted only in tests, so ok to expect + Vm::extract_output(&proof).expect("Proof should be deserializable") + } + }; + + let stored_state_transition = StoredStateTransition { + initial_state_root: state_transition.initial_state_root.as_ref().to_vec(), + final_state_root: state_transition.final_state_root.as_ref().to_vec(), + state_diff: state_transition.state_diff, + da_slot_hash: state_transition.da_slot_hash.clone().into(), + sequencer_public_key: state_transition.sequencer_public_key, + sequencer_da_public_key: state_transition.sequencer_da_public_key, + validity_condition: state_transition + .validity_condition + .try_to_vec() + .unwrap(), + }; + + let l1_hash = state_transition.da_slot_hash.into(); + + // This is the l1 heidght where the sequencer commitment was read by the prover and proof generated by those commitments + // We need to get commitments in this l1 hegight and set them as proven + let l1_height = match self.ledger_db.get_l1_height_of_l1_hash(l1_hash)? { + Some(l1_height) => l1_height, + None => { + tracing::warn!( + "Proof verification: L1 height not found for l1 hash: {:?}. Skipping proof.", + l1_hash + ); + continue; + } + }; + + // TODO: Handle error + let proven_commitments = match self + .ledger_db + .get_commitments_on_da_slot(l1_height)? + { + Some(commitments) => commitments, + None => { + tracing::warn!( + "Proof verification: No commitments found for l1 height: {}. Skipping proof.", + l1_height + ); + continue; + } + }; + + let first_slot_hash = proven_commitments[0].l1_start_block_hash; + let l1_height_start = match self + .ledger_db + .get_l1_height_of_l1_hash(first_slot_hash)? + { + Some(l1_height) => l1_height, + None => { + tracing::error!( + "Proof verification: For a known and verified sequencer commitment, L1 height not found for l1 hash: {:?}. Skipping proof.", + l1_hash + ); + continue; + } + }; + match self + .ledger_db + .get_l2_range_by_l1_height(SlotNumber(l1_height_start))? + { + Some((start, _)) => { + let l2_height = start.0; + let soft_batches = self.ledger_db.get_soft_batch_range( + &(BatchNumber(l2_height)..BatchNumber(l2_height + 1)), + )?; + + let soft_batch = soft_batches.first().unwrap(); + if soft_batch.pre_state_root.as_slice() + != state_transition.initial_state_root.as_ref() + { + tracing::warn!( + "Proof verification: For a known and verified sequencer commitment. Pre state root mismatch - expected 0x{} but got 0x{}. Skipping proof.", + hex::encode(&soft_batch.pre_state_root), + hex::encode(&state_transition.initial_state_root) + ); + continue; + } + } + None => { + tracing::warn!( + "Proof verification: For a known and verified sequencer commitment, L1 L2 connection does not exist. L1 height = {}. Skipping proof.", + l1_height_start + ); + continue; + } + } + + for commitment in proven_commitments { + let l1_height_start = match self + .ledger_db + .get_l1_height_of_l1_hash(commitment.l1_start_block_hash)? + { + Some(l1_height) => l1_height, + None => { + tracing::warn!("Proof verification: For a known and verified sequencer commitment, L1 height not found for l1 hash: {:?}", l1_hash); + continue; + } + }; + + let l1_height_end = match self + .ledger_db + .get_l1_height_of_l1_hash(commitment.l1_end_block_hash)? + { + Some(l1_height) => l1_height, + None => { + tracing::warn!("Proof verification: For a known and verified sequencer commitment, L1 height not found for l1 hash: {:?}", l1_hash); + continue; + } + }; + + // All soft confirmations in these blocks are now proven + for i in l1_height_start..=l1_height_end { + self.ledger_db.put_soft_confirmation_status( + SlotNumber(i), + SoftConfirmationStatus::Proven, + )?; + } + } + // store in ledger db + self.ledger_db.update_verified_proof_data( + soft_batch.da_slot_height, + proof.clone(), + stored_state_transition, + )?; + } + + for sequencer_commitment in sequencer_commitments.iter() { + tracing::warn!( + "Processing sequencer commitment: {:?}", + sequencer_commitment + ); + let start_l1_height = retry_backoff(exponential_backoff.clone(), || async { + da_service + .get_block_by_hash(sequencer_commitment.l1_start_block_hash) + .await + .map_err(backoff::Error::transient) + }) + .await? + .header() + .height(); + + let end_l1_height = retry_backoff(exponential_backoff.clone(), || async { + da_service + .get_block_by_hash(sequencer_commitment.l1_end_block_hash) + .await + .map_err(backoff::Error::transient) + }) + .await? + .header() + .height(); + + tracing::warn!( + "start height: {}, end height: {}", + start_l1_height, + end_l1_height + ); + + let start_l2_height = match self + .ledger_db + .get_l2_range_by_l1_height(SlotNumber(start_l1_height))? + { + Some((start_l2_height, _)) => start_l2_height, + None => { + tracing::warn!( + "Sequencer commitment verification: L1 L2 connection does not exist. L1 height = {}. Skipping commitment.", + start_l1_height + ); + continue; + } + }; + + let end_l2_height = match self + .ledger_db + .get_l2_range_by_l1_height(SlotNumber(end_l1_height))? + { + Some((_, end_l2_height)) => end_l2_height, + None => { + tracing::warn!( + "Sequencer commitment verification: L1 L2 connection does not exist. L1 height = {}. Skipping commitment.", + end_l1_height + ); + continue; + } + }; + + let range_end = BatchNumber(end_l2_height.0 + 1); + // Traverse each item's field of vector of transactions, put them in merkle tree + // and compare the root with the one from the ledger + let stored_soft_batches: Vec = self + .ledger_db + .get_soft_batch_range(&(start_l2_height..range_end))?; + + let soft_batches_tree = MerkleTree::::from_leaves( + stored_soft_batches + .iter() + .map(|x| x.hash) + .collect::>() + .as_slice(), + ); + + if soft_batches_tree.root() != Some(sequencer_commitment.merkle_root) { + tracing::warn!( + "Merkle root mismatch - expected 0x{} but got 0x{}. Skipping commitment.", + hex::encode( + soft_batches_tree + .root() + .ok_or(anyhow!("Could not calculate soft batch tree root"))? + ), + hex::encode(sequencer_commitment.merkle_root) + ); + } else { + self.ledger_db.update_commitments_on_da_slot( + soft_batch.da_slot_height, + sequencer_commitment.clone(), + )?; + + for i in start_l1_height..=end_l1_height { + self.ledger_db.put_soft_confirmation_status( + SlotNumber(i), + SoftConfirmationStatus::Finalized, + )?; + } + } + } + + cur_l1_block = Some(filtered_block); + } + + let cur_l1_block = cur_l1_block.clone().unwrap(); + + info!( + "Running soft confirmation batch #{} with hash: 0x{} on DA block #{}", + height, + hex::encode(soft_batch.hash), + cur_l1_block.header().height() + ); + + let mut data_to_commit = SlotCommit::new(cur_l1_block.clone()); + + let pre_state = self.storage_manager.create_storage_on_l2_height(height)?; + + let slot_result = self.stf.apply_soft_batch( + self.sequencer_pub_key.as_slice(), + // TODO(https://github.com/Sovereign-Labs/sovereign-sdk/issues/1247): incorrect pre-state root in case of re-org + &self.state_root, + pre_state, + Default::default(), + cur_l1_block.header(), + &cur_l1_block.validity_condition(), + &mut soft_batch.clone().into(), + ); + + let next_state_root = slot_result.state_root; + // Check if post state root is the same as the one in the soft batch + if next_state_root.as_ref().to_vec() != soft_batch.post_state_root { + warn!("Post state root mismatch at height: {}", height); + continue; + } + + for receipt in slot_result.batch_receipts { + data_to_commit.add_batch(receipt); + } + + self.storage_manager + .save_change_set_l2(height, slot_result.change_set)?; + + let batch_receipt = data_to_commit.batch_receipts()[0].clone(); + + let soft_batch_receipt = SoftBatchReceipt::<_, _, Da::Spec> { + pre_state_root: self.state_root.as_ref().to_vec(), + post_state_root: next_state_root.as_ref().to_vec(), + phantom_data: PhantomData::, + batch_hash: batch_receipt.batch_hash, + da_slot_hash: cur_l1_block.header().hash(), + da_slot_height: cur_l1_block.header().height(), + da_slot_txs_commitment: cur_l1_block.header().txs_commitment(), + tx_receipts: batch_receipt.tx_receipts, + soft_confirmation_signature: soft_batch.soft_confirmation_signature, + pub_key: soft_batch.pub_key, + deposit_data: soft_batch.deposit_data.into_iter().map(|x| x.tx).collect(), + l1_fee_rate: soft_batch.l1_fee_rate, + timestamp: soft_batch.timestamp, + }; + + self.ledger_db + .commit_soft_batch(soft_batch_receipt, self.include_tx_body)?; + self.ledger_db.extend_l2_range_of_l1_slot( + SlotNumber(cur_l1_block.header().height()), + BatchNumber(height), + )?; + + self.state_root = next_state_root; + + info!( + "New State Root after soft confirmation #{} is: {:?}", + height, self.state_root + ); + + self.storage_manager.finalize_l2(height)?; + + height += 1; + } + } +} diff --git a/crates/sequencer/Cargo.toml b/crates/sequencer/Cargo.toml index 5984cc7c1..5dc9dbb72 100644 --- a/crates/sequencer/Cargo.toml +++ b/crates/sequencer/Cargo.toml @@ -48,6 +48,7 @@ sov-rollup-interface = { path = "../sovereign-sdk/rollup-interface", features = sov-stf-runner = { path = "../sovereign-sdk/full-node/sov-stf-runner" } +sov-modules-rollup-blueprint = { path = "../sovereign-sdk/module-system/sov-modules-rollup-blueprint" } sov-modules-stf-blueprint = { path = "../sovereign-sdk/module-system/sov-modules-stf-blueprint" } citrea-stf = { path = "../citrea-stf", features = ["native"] } diff --git a/crates/sequencer/src/lib.rs b/crates/sequencer/src/lib.rs index 5fc0d3365..2957b2261 100644 --- a/crates/sequencer/src/lib.rs +++ b/crates/sequencer/src/lib.rs @@ -7,5 +7,54 @@ mod rpc; mod sequencer; mod utils; +use std::net::SocketAddr; + pub use config::{SequencerConfig, SequencerMempoolConfig}; pub use sequencer::CitreaSequencer; +use sov_modules_rollup_blueprint::RollupBlueprint; +use sov_modules_stf_blueprint::StfBlueprint; +use tokio::sync::oneshot; +use tracing::{instrument, Instrument}; + +/// Sequencer stf runner +pub struct Sequencer { + /// The State Transition Runner of Sequencer. + #[allow(clippy::type_complexity)] + pub runner: CitreaSequencer< + S::NativeContext, + S::DaService, + S::StorageManager, + S::Vm, + StfBlueprint, + >, + /// Rpc methods for the rollup. + pub rpc_methods: jsonrpsee::RpcModule<()>, +} + +impl Sequencer { + /// Runs the sequencer. + #[instrument( + name = "Sequencer", + level = "info", + skip_all, + err, + ret(level = "error") + )] + pub async fn run(self) -> Result<(), anyhow::Error> { + self.run_and_report_rpc_port(None).await + } + + /// Runs the sequencer. + pub async fn run_and_report_rpc_port( + self, + channel: Option>, + ) -> Result<(), anyhow::Error> { + let mut seq = self.runner; + seq.start_rpc_server(channel, self.rpc_methods) + .instrument(tracing::Span::current()) + .await + .unwrap(); + seq.run().await?; + Ok(()) + } +} diff --git a/crates/sovereign-sdk/module-system/sov-modules-macros/tests/rpc/expose_rpc_first_generic_not_context.stderr b/crates/sovereign-sdk/module-system/sov-modules-macros/tests/rpc/expose_rpc_first_generic_not_context.stderr index 26d93bcf1..cb99bf2ba 100644 --- a/crates/sovereign-sdk/module-system/sov-modules-macros/tests/rpc/expose_rpc_first_generic_not_context.stderr +++ b/crates/sovereign-sdk/module-system/sov-modules-macros/tests/rpc/expose_rpc_first_generic_not_context.stderr @@ -462,9 +462,8 @@ note: the trait `sov_modules_api::Context` must be implemented | pub trait Context: Spec + Clone + Debug + PartialEq + 'static { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: items from traits can only be used if the trait is implemented and in scope - = note: the following traits define an item `default`, perhaps you need to implement one of them: + = note: the following trait defines an item `default`, perhaps you need to implement it: candidate #1: `std::default::Default` - candidate #2: `tinyvec::array::Array` error[E0277]: the trait bound `ZkDefaultContext: TestSpec` is not satisfied --> tests/rpc/expose_rpc_first_generic_not_context.rs:114:24 diff --git a/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/Cargo.toml b/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/Cargo.toml index 72456e3cf..83990177d 100644 --- a/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/Cargo.toml +++ b/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/Cargo.toml @@ -1,46 +1,36 @@ [package] name = "sov-modules-rollup-blueprint" -description = "This crate contains abstractions needed to create a new rollup" +version = { workspace = true } authors = { workspace = true } edition = { workspace = true } homepage = { workspace = true } license = { workspace = true } -repository = { workspace = true } -version = { workspace = true } +publish = true readme = "README.md" +repository = { workspace = true } resolver = "2" -publish = true +description = "This crate contains abstractions needed to create a new rollup" [dependencies] -sov-rollup-interface = { path = "../../rollup-interface", features = [ - "native", -] } -sov-stf-runner = { path = "../../full-node/sov-stf-runner", features = [ - "native", -] } -citrea-sequencer = { path = "../../../sequencer", features = [] } -sov-state = { path = "../sov-state" } sequencer-client = { path = "../../../sequencer-client" } -sov-modules-api = { path = "../../module-system/sov-modules-api", features = [ - "native", -] } sov-cli = { path = "../../module-system/sov-cli" } +sov-modules-api = { path = "../../module-system/sov-modules-api", features = ["native"] } +sov-rollup-interface = { path = "../../rollup-interface", features = ["native"] } +sov-sequencer = { path = "../../full-node/sov-sequencer" } +sov-state = { path = "../sov-state" } +sov-stf-runner = { path = "../../full-node/sov-stf-runner", features = ["native"] } -sov-modules-stf-blueprint = { path = "../../module-system/sov-modules-stf-blueprint", features = [ - "native", -] } sov-db = { path = "../../full-node/db/sov-db" } +sov-modules-stf-blueprint = { path = "../../module-system/sov-modules-stf-blueprint", features = ["native"] } -sov-ledger-rpc = { path = "../../full-node/sov-ledger-rpc", features = [ - "server", -] } +sov-ledger-rpc = { path = "../../full-node/sov-ledger-rpc", features = ["server"] } -hex = { workspace = true } anyhow = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } async-trait = { workspace = true } +borsh = { workspace = true } +hex = { workspace = true } jsonrpsee = { workspace = true, features = ["http-client", "server"] } +serde = { workspace = true } +serde_json = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } -borsh = { workspace = true } diff --git a/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/src/lib.rs b/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/src/lib.rs index fa520cc39..3baf9ba7e 100644 --- a/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/src/lib.rs +++ b/crates/sovereign-sdk/module-system/sov-modules-rollup-blueprint/src/lib.rs @@ -6,7 +6,6 @@ mod wallet; use std::net::SocketAddr; use async_trait::async_trait; -use citrea_sequencer::{CitreaSequencer, SequencerConfig}; pub use runtime_rpc::*; use sov_db::ledger_db::LedgerDB; use sov_modules_api::{Context, DaSpec, Spec}; @@ -126,150 +125,6 @@ pub trait RollupBlueprint: Sized + Send + Sync { LedgerDB::with_path(&rollup_config.storage.path).expect("Ledger DB failed to open") } - /// Creates a new sequencer - #[instrument(level = "trace", skip_all)] - async fn create_new_sequencer( - &self, - runtime_genesis_paths: &>::GenesisPaths, - rollup_config: RollupConfig, - sequencer_config: SequencerConfig, - ) -> Result, anyhow::Error> - where - ::Storage: NativeStorage, - { - let da_service = self.create_da_service(&rollup_config).await; - - // TODO: Double check what kind of storage needed here. - // Maybe whole "prev_root" can be initialized inside runner - // Getting block here, so prover_service doesn't have to be `Send` - - let ledger_db = self.create_ledger_db(&rollup_config); - let genesis_config = self.create_genesis_config(runtime_genesis_paths, &rollup_config)?; - - let mut storage_manager = self.create_storage_manager(&rollup_config)?; - let prover_storage = storage_manager.create_finalized_storage()?; - - let prev_root = ledger_db - .get_head_soft_batch()? - .map(|(number, _)| prover_storage.get_root_hash(number.0 + 1)) - .transpose()?; - - // TODO(https://github.com/Sovereign-Labs/sovereign-sdk/issues/1218) - let rpc_methods = - self.create_rpc_methods(&prover_storage, &ledger_db, &da_service, None)?; - - let native_stf = StfBlueprint::new(); - - let genesis_root = prover_storage.get_root_hash(1); - - let init_variant = match prev_root { - Some(root_hash) => InitVariant::Initialized(root_hash), - None => match genesis_root { - Ok(root_hash) => InitVariant::Initialized(root_hash), - _ => InitVariant::Genesis(genesis_config), - }, - }; - - let seq = CitreaSequencer::new( - da_service, - prover_storage, - sequencer_config, - native_stf, - storage_manager, - init_variant, - rollup_config.public_keys, - ledger_db, - rollup_config.rpc, - ) - .unwrap(); - - Ok(Sequencer { - runner: seq, - rpc_methods, - }) - } - - /// Creates a new prover - #[instrument(level = "trace", skip_all)] - async fn create_new_prover( - &self, - runtime_genesis_paths: &>::GenesisPaths, - rollup_config: RollupConfig, - prover_config: ProverConfig, - ) -> Result, anyhow::Error> - where - ::Storage: NativeStorage, - { - let da_service = self.create_da_service(&rollup_config).await; - - let prover_service = self - .create_prover_service(prover_config.clone(), &rollup_config, &da_service) - .await; - - // TODO: Double check what kind of storage needed here. - // Maybe whole "prev_root" can be initialized inside runner - // Getting block here, so prover_service doesn't have to be `Send` - - let ledger_db = self.create_ledger_db(&rollup_config); - let genesis_config = self.create_genesis_config(runtime_genesis_paths, &rollup_config)?; - - let mut storage_manager = self.create_storage_manager(&rollup_config)?; - let prover_storage = storage_manager.create_finalized_storage()?; - - let prev_root = ledger_db - .get_head_soft_batch()? - .map(|(number, _)| prover_storage.get_root_hash(number.0 + 1)) - .transpose()?; - - let runner_config = rollup_config.runner.expect("Runner config is missing"); - // TODO(https://github.com/Sovereign-Labs/sovereign-sdk/issues/1218) - let rpc_methods = self.create_rpc_methods( - &prover_storage, - &ledger_db, - &da_service, - Some(runner_config.sequencer_client_url.clone()), - )?; - - let native_stf = StfBlueprint::new(); - - let genesis_root = prover_storage.get_root_hash(1); - - let init_variant = match prev_root { - Some(root_hash) => InitVariant::Initialized(root_hash), - None => match genesis_root { - Ok(root_hash) => InitVariant::Initialized(root_hash), - _ => InitVariant::Genesis(genesis_config), - }, - }; - - let code_commitment = self.get_code_commitment(); - - let runner = StateTransitionRunner::new( - runner_config, - rollup_config.public_keys, - rollup_config.rpc, - da_service, - ledger_db, - native_stf, - storage_manager, - init_variant, - Some(prover_service), - Some(prover_config), - code_commitment, - )?; - - Ok(Prover { - runner, - rpc_methods, - }) - } - /// Creates a new rollup. #[instrument(level = "trace", skip_all)] async fn create_new_rollup( @@ -344,49 +199,6 @@ pub trait RollupBlueprint: Sized + Send + Sync { } } -/// Sequencer stf runner -pub struct Sequencer { - /// The State Transition Runner of Sequencer. - #[allow(clippy::type_complexity)] - pub runner: CitreaSequencer< - S::NativeContext, - S::DaService, - S::StorageManager, - S::Vm, - StfBlueprint, - >, - /// Rpc methods for the rollup. - pub rpc_methods: jsonrpsee::RpcModule<()>, -} - -impl Sequencer { - /// Runs the sequencer. - #[instrument( - name = "Sequencer", - level = "info", - skip_all, - err, - ret(level = "error") - )] - pub async fn run(self) -> Result<(), anyhow::Error> { - self.run_and_report_rpc_port(None).await - } - - /// Runs the sequencer. - pub async fn run_and_report_rpc_port( - self, - channel: Option>, - ) -> Result<(), anyhow::Error> { - let mut seq = self.runner; - seq.start_rpc_server(channel, self.rpc_methods) - .instrument(tracing::Span::current()) - .await - .unwrap(); - seq.run().await?; - Ok(()) - } -} - /// Dependencies needed to run the rollup. pub struct FullNode { /// The State Transition Runner. @@ -440,51 +252,3 @@ impl FullNode { Ok(()) } } - -/// Dependencies needed to run the rollup. -pub struct Prover { - /// The State Transition Runner. - #[allow(clippy::type_complexity)] - pub runner: StateTransitionRunner< - StfBlueprint, - S::StorageManager, - S::DaService, - S::Vm, - S::ProverService, - S::NativeContext, - >, - /// Rpc methods for the rollup. - pub rpc_methods: jsonrpsee::RpcModule<()>, -} - -impl Prover { - /// Runs the rollup. - #[instrument(name = "Prover", level = "info", skip_all, err, ret(level = "error"))] - pub async fn run(self) -> Result<(), anyhow::Error> { - self.run_and_report_rpc_port(None).await - } - - /// Only run the rpc. - pub async fn run_rpc(self) -> Result<(), anyhow::Error> { - self.runner - .start_rpc_server(self.rpc_methods, None) - .instrument(tracing::Span::current()) - .await; - Ok(()) - } - - /// Runs the rollup. Reports rpc port to the caller using the provided channel. - pub async fn run_and_report_rpc_port( - self, - channel: Option>, - ) -> Result<(), anyhow::Error> { - let mut runner = self.runner; - runner - .start_rpc_server(self.rpc_methods, channel) - .instrument(tracing::Span::current()) - .await; - - runner.run_prover_process().await?; - Ok(()) - } -}