diff --git a/Cargo.lock b/Cargo.lock index 5b360e30a..f1007d4c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6725,7 +6725,6 @@ dependencies = [ "anyhow", "async-trait", "borsh", - "bytes", "clap", "const-rollup-config", "criterion", @@ -6737,9 +6736,7 @@ dependencies = [ "ethers-middleware", "ethers-providers", "ethers-signers", - "futures", "hex", - "jmt", "jsonrpsee", "prettytable-rs", "prometheus 0.11.0", @@ -6755,6 +6752,7 @@ dependencies = [ "sov-celestia-adapter", "sov-cli", "sov-db", + "sov-demo-rollup", "sov-ethereum", "sov-evm", "sov-modules-api", @@ -7066,7 +7064,6 @@ dependencies = [ "jsonrpsee", "rand 0.8.5", "serde", - "serde_json", "sov-accounts", "sov-bank", "sov-celestia-adapter", @@ -7081,7 +7078,6 @@ dependencies = [ "tokio", "toml 0.8.0", "tracing", - "tracing-subscriber", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7dc9094c7..92f91be4c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,7 @@ bincode = "1.3.3" bcs = "0.1.5" byteorder = "1.4.3" bytes = "1.2.1" +futures = "0.3" hex = "0.4.3" once_cell = "1.10.0" prometheus = { version = "0.13.3", default-features = false } diff --git a/examples/demo-prover/Cargo.toml b/examples/demo-prover/Cargo.toml index 3011a5414..e227d5b82 100644 --- a/examples/demo-prover/Cargo.toml +++ b/examples/demo-prover/Cargo.toml @@ -21,7 +21,7 @@ tracing = "0.1.37" tracing-subscriber = "0.3.16" sov-celestia-adapter = { path = "../../adapters/celestia", features = ["native", "bench"] } -sov-demo-rollup = { path = "../demo-rollup" } +sov-demo-rollup = { path = "../demo-rollup", features = ["native"] } demo-stf = { path = "../demo-stf", optional = true } sov-rollup-interface = { path = "../../rollup-interface" } sov-risc0-adapter = { path = "../../adapters/risc0", features = ["native"] } diff --git a/examples/demo-prover/methods/guest/.cargo/config.toml b/examples/demo-prover/methods/guest/.cargo/config.toml deleted file mode 100644 index 34957b0db..000000000 --- a/examples/demo-prover/methods/guest/.cargo/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[build] -target = "./riscv32im-risc0-zkvm-elf.json" -rustflags=["-Cpasses=loweratomic"] diff --git a/examples/demo-prover/methods/guest/Cargo.lock b/examples/demo-prover/methods/guest/Cargo.lock index 97e9b2237..139d54f45 100644 --- a/examples/demo-prover/methods/guest/Cargo.lock +++ b/examples/demo-prover/methods/guest/Cargo.lock @@ -2,32 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - [[package]] name = "ahash" version = "0.8.3" @@ -71,21 +45,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.13.1" @@ -214,12 +173,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - [[package]] name = "bytemuck" version = "1.14.0" @@ -255,34 +208,10 @@ dependencies = [ "serde", ] -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "cc" version = "1.0.79" source = "git+https://github.com/rust-lang/cc-rs?rev=e5bbdfa#e5bbdfa1fa468c028cb38fee6c35a3cf2e5a2736" -dependencies = [ - "jobserver", -] [[package]] name = "cfg-if" @@ -290,16 +219,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "const-oid" version = "0.9.5" @@ -310,34 +229,12 @@ checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" name = "const-rollup-config" version = "0.2.0" -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - [[package]] name = "cpufeatures" version = "0.2.9" @@ -347,24 +244,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -486,40 +365,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "directories" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys", -] - -[[package]] -name = "downloader" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05213e96f184578b5f70105d4d0a644a168e99e12d7bea0b200c15d67b5c182" -dependencies = [ - "futures", - "rand", - "reqwest", - "thiserror", - "tokio", -] - [[package]] name = "dyn-clone" version = "1.0.13" @@ -572,15 +417,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2b183d6ce6ca4cf30e3db37abf5b52568b5f9015c97d9fbdd7026aa5dcdd758" -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -636,16 +472,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "flate2" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "flex-error" version = "0.4.4" @@ -656,36 +482,6 @@ dependencies = [ "paste", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - [[package]] name = "futures" version = "0.3.28" @@ -694,7 +490,6 @@ checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -717,34 +512,12 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" -[[package]] -name = "futures-executor" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - [[package]] name = "futures-io" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - [[package]] name = "futures-sink" version = "0.3.28" @@ -763,16 +536,11 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ - "futures-channel", "futures-core", - "futures-io", - "futures-macro", "futures-sink", "futures-task", - "memchr", "pin-project-lite", "pin-utils", - "slab", ] [[package]] @@ -796,37 +564,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - -[[package]] -name = "h2" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.13.2" @@ -848,12 +585,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" - [[package]] name = "hex" version = "0.4.3" @@ -869,15 +600,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "home" version = "0.5.5" @@ -887,77 +609,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "http" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.4.9", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "ics23" version = "0.10.2" @@ -975,32 +626,12 @@ dependencies = [ "sha3", ] -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "indenter" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.0.0" @@ -1021,21 +652,6 @@ dependencies = [ "serde", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" - [[package]] name = "itertools" version = "0.10.5" @@ -1073,24 +689,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "jobserver" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" -dependencies = [ - "wasm-bindgen", -] - [[package]] name = "keccak" version = "0.1.4" @@ -1136,32 +734,6 @@ version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" -dependencies = [ - "libc", - "wasi", - "windows-sys", -] - [[package]] name = "mirai-annotations" version = "1.12.0" @@ -1174,24 +746,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nmt-rs" version = "0.1.0" @@ -1234,25 +788,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.18.0" @@ -1265,91 +800,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "openssl" -version = "0.10.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" -dependencies = [ - "bitflags 2.4.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", - "hmac", - "password-hash", - "sha2 0.10.6", -] - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - [[package]] name = "petgraph" version = "0.6.4" @@ -1357,7 +813,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap", ] [[package]] @@ -1382,24 +838,12 @@ dependencies = [ "spki", ] -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - [[package]] name = "platforms" version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - [[package]] name = "prettyplease" version = "0.1.25" @@ -1491,44 +935,11 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] [[package]] name = "redox_syscall" @@ -1539,17 +950,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", -] - [[package]] name = "regex" version = "1.9.5" @@ -1574,47 +974,10 @@ dependencies = [ ] [[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "reqwest" -version = "0.11.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" -dependencies = [ - "base64 0.21.4", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "ripemd" @@ -1715,12 +1078,6 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8524b46783b58b00e9b2a4712e837093c975b23cf25bfaf99e1cf69e9011bf6b" -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - [[package]] name = "rustc_version" version = "0.4.0" @@ -1749,15 +1106,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "schannel" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" -dependencies = [ - "windows-sys", -] - [[package]] name = "schemars" version = "0.8.15" @@ -1782,29 +1130,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "semver" version = "1.0.18" @@ -1882,29 +1207,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha2" version = "0.9.9" @@ -1944,35 +1246,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" -dependencies = [ - "libc", - "windows-sys", -] - [[package]] name = "sov-accounts" version = "0.2.0" @@ -2055,26 +1328,28 @@ name = "sov-demo-prover-guest" version = "0.2.0" dependencies = [ "anyhow", - "borsh", "const-rollup-config", "demo-stf", - "directories", - "downloader", "risc0-zkvm", "risc0-zkvm-platform", - "serde", - "serde_json", - "sha2 0.10.6", - "sha3", + "sov-celestia-adapter", + "sov-demo-rollup", + "sov-risc0-adapter", +] + +[[package]] +name = "sov-demo-rollup" +version = "0.2.0" +dependencies = [ + "const-rollup-config", + "demo-stf", "sov-celestia-adapter", "sov-modules-api", "sov-modules-stf-template", "sov-risc0-adapter", "sov-rollup-interface", - "sov-sequencer-registry", "sov-state", - "tempfile", - "zip", + "sov-stf-runner", ] [[package]] @@ -2094,15 +1369,12 @@ dependencies = [ "derive_more", "ed25519-dalek", "jmt", - "risc0-zkvm", - "risc0-zkvm-platform", "serde", "sha2 0.10.6", "sov-first-read-last-write-cache", "sov-modules-macros", "sov-rollup-interface", "sov-state", - "sov-zk-cycle-macros", "thiserror", ] @@ -2127,14 +1399,10 @@ dependencies = [ "borsh", "hex", "jmt", - "risc0-zkvm", - "risc0-zkvm-platform", "serde", "sov-modules-api", "sov-rollup-interface", "sov-state", - "sov-zk-cycle-macros", - "sov-zk-cycle-utils", "thiserror", "tracing", ] @@ -2174,13 +1442,9 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "risc0-zkvm", - "risc0-zkvm-platform", "sov-bank", "sov-modules-api", "sov-state", - "sov-zk-cycle-macros", - "sov-zk-cycle-utils", ] [[package]] @@ -2192,17 +1456,28 @@ dependencies = [ "borsh", "hex", "jmt", - "risc0-zkvm", - "risc0-zkvm-platform", "serde", "serde_json", "sha2 0.10.6", "sov-first-read-last-write-cache", "sov-rollup-interface", - "sov-zk-cycle-macros", "thiserror", ] +[[package]] +name = "sov-stf-runner" +version = "0.2.0" +dependencies = [ + "anyhow", + "borsh", + "hex", + "serde", + "sov-celestia-adapter", + "sov-modules-api", + "sov-rollup-interface", + "sov-state", +] + [[package]] name = "sov-value-setter" version = "0.2.0" @@ -2294,7 +1569,7 @@ checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", + "redox_syscall", "rustix", "windows-sys", ] @@ -2393,61 +1668,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2 0.5.4", - "windows-sys", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - [[package]] name = "toml" version = "0.5.11" @@ -2484,19 +1704,13 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" dependencies = [ - "indexmap 2.0.0", + "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - [[package]] name = "tracing" version = "0.1.37" @@ -2529,153 +1743,30 @@ dependencies = [ "once_cell", ] -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasm-bindgen" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.37", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" - -[[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "which" version = "4.4.2" @@ -2688,28 +1779,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.48.0" @@ -2785,16 +1854,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys", -] - [[package]] name = "zeroize" version = "1.6.0" @@ -2814,53 +1873,3 @@ dependencies = [ "quote", "syn 2.0.37", ] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2", - "sha1", - "time", - "zstd", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" -dependencies = [ - "cc", - "libc", - "pkg-config", -] diff --git a/examples/demo-prover/methods/guest/Cargo.toml b/examples/demo-prover/methods/guest/Cargo.toml index fdf5aff4c..c0945ff9c 100644 --- a/examples/demo-prover/methods/guest/Cargo.toml +++ b/examples/demo-prover/methods/guest/Cargo.toml @@ -10,26 +10,12 @@ resolver = "2" anyhow = "1.0.68" risc0-zkvm = { version = "0.18", default-features = false, features = ["std"] } risc0-zkvm-platform = "0.18" -borsh = { version = "0.10.3", features = ["bytes"] } -demo-stf = { path = "../../../demo-stf" } -sov-rollup-interface = { path = "../../../../rollup-interface", default-features = false } +demo-stf = { path = "../../../demo-stf", default-features = false } +sov-demo-rollup = { path = "../../../demo-rollup", default-features = false } sov-risc0-adapter = { path = "../../../../adapters/risc0" } const-rollup-config = { path = "../../../const-rollup-config" } sov-celestia-adapter = { path = "../../../../adapters/celestia" } -sov-modules-stf-template = { path = "../../../../module-system/sov-modules-stf-template", optional = true } -sov-state = { path = "../../../../module-system/sov-state", default-features = false, optional = true } -sov-modules-api = { path = "../../../../module-system/sov-modules-api", default-features = false, optional = true } -sov-sequencer-registry = { path = "../../../../module-system/module-implementations/sov-sequencer-registry", default-features = false, optional = true } - -[build-dependencies] -directories = "5.0" -downloader = "0.2" -serde = { version = "1.0", default-features = false, features = ["derive"] } -serde_json = "1.0" -sha2 = "0.10.6" -sha3 = "0.10.8" -tempfile = "3.5" -zip = "0.6" + [patch.crates-io] sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2/v0.10.6-risc0" } @@ -50,8 +36,4 @@ opt-level = 3 [features] bench = [ "sov-celestia-adapter/bench", - "sov-modules-stf-template/bench", - "sov-state/bench", - "sov-modules-api/bench", - "sov-sequencer-registry/bench", ] diff --git a/examples/demo-prover/methods/guest/src/bin/rollup.rs b/examples/demo-prover/methods/guest/src/bin/rollup.rs index 4c7789b97..4d8c6f17a 100644 --- a/examples/demo-prover/methods/guest/src/bin/rollup.rs +++ b/examples/demo-prover/methods/guest/src/bin/rollup.rs @@ -2,104 +2,27 @@ #![no_main] -use std::str::FromStr; - -use const_rollup_config::{ROLLUP_NAMESPACE_RAW, SEQUENCER_DA_ADDRESS}; +use const_rollup_config::ROLLUP_NAMESPACE_RAW; use demo_stf::app::create_zk_app_template; -use demo_stf::ArrayWitness; -use risc0_zkvm::guest::env; use sov_celestia_adapter::types::NamespaceId; -use sov_celestia_adapter::verifier::address::CelestiaAddress; -use sov_celestia_adapter::verifier::{CelestiaSpec, CelestiaVerifier}; -use sov_celestia_adapter::{BlobWithSender, CelestiaHeader}; +use sov_celestia_adapter::verifier::CelestiaVerifier; +use sov_demo_rollup::AppVerifier; use sov_risc0_adapter::guest::Risc0Guest; -use sov_rollup_interface::da::{BlockHeaderTrait, DaSpec, DaVerifier}; -use sov_rollup_interface::stf::StateTransitionFunction; -use sov_rollup_interface::zk::{StateTransition, ZkvmGuest}; // The rollup stores its data in the namespace b"sov-test" on Celestia const ROLLUP_NAMESPACE: NamespaceId = NamespaceId(ROLLUP_NAMESPACE_RAW); risc0_zkvm::guest::entry!(main); -// steps: -// 0. Read tx list and proofs -// 1. Call verify_relevant_tx_list() -// 2. Call begin_slot() -// 3. Decode each batch. -// 4. Call apply_batch -// 5. Call end_slot -// 6. Output (Da hash, start_root, end_root, event_root) -pub fn main() { - env::write(&"Start guest\n"); - let guest = Risc0Guest {}; - - #[cfg(feature = "bench")] - let start_cycles = env::get_cycle_count(); - let prev_state_root_hash: [u8; 32] = guest.read_from_host(); - env::write(&"Prev root hash read\n"); - // Step 1: read tx list - let header: CelestiaHeader = guest.read_from_host(); - env::write(&"header has been read\n"); - let inclusion_proof: ::InclusionMultiProof = guest.read_from_host(); - env::write(&"inclusion proof has been read\n"); - let completeness_proof: ::CompletenessProof = guest.read_from_host(); - env::write(&"completeness proof has been read\n"); - let mut blobs: Vec = guest.read_from_host(); - env::write(&"blobs have been read\n"); - - // Step 2: Verify tx list - let verifier = CelestiaVerifier::new(sov_celestia_adapter::verifier::RollupParams { - namespace: ROLLUP_NAMESPACE, - }); - - let validity_condition = verifier - .verify_relevant_tx_list(&header, &blobs, inclusion_proof, completeness_proof) - .expect("Transaction list must be correct"); - env::write(&"Relevant txs verified\n"); - - // Step 3: Apply blobs - let mut app = create_zk_app_template::(); - - let witness: ArrayWitness = guest.read_from_host(); - env::write(&"Witness have been read\n"); - env::write(&"Applying slot...\n"); - let result = app.apply_slot(witness, &header, &validity_condition, &mut blobs); - - env::write(&"Slot has been applied\n"); - - // TODO: https://github.com/Sovereign-Labs/sovereign-sdk/issues/647 - let rewarded_address = CelestiaAddress::from_str(SEQUENCER_DA_ADDRESS).unwrap(); - let output = StateTransition:: { - initial_state_root: prev_state_root_hash, - final_state_root: result.state_root.0, - validity_condition, - rewarded_address: rewarded_address.as_ref().to_vec(), - slot_hash: header.hash(), - }; - env::commit(&output); - - env::write(&"new state root committed\n"); - - #[cfg(feature = "bench")] - let end_cycles = env::get_cycle_count(); - - #[cfg(feature = "bench")] - { - let tuple = ( - "Cycles per block".to_string(), - (end_cycles - start_cycles) as u64, - ); - let mut serialized = Vec::new(); - serialized.extend(tuple.0.as_bytes()); - serialized.push(0); - let size_bytes = tuple.1.to_ne_bytes(); - serialized.extend(&size_bytes); - - // calculate the syscall name. - let cycle_string = String::from("cycle_metrics\0"); - let metrics_syscall_name = - risc0_zkvm_platform::syscall::SyscallName::from_bytes_with_nul(cycle_string.as_ptr()); - risc0_zkvm::guest::env::send_recv_slice::(metrics_syscall_name, &serialized); - } +pub fn main() { + let guest = Risc0Guest::new(); + let mut stf_verifier = AppVerifier::new( + create_zk_app_template::(), + CelestiaVerifier { + rollup_namespace: ROLLUP_NAMESPACE, + }, + ); + stf_verifier + .run_block(guest) + .expect("Prover must be honest"); } diff --git a/examples/demo-rollup/Cargo.toml b/examples/demo-rollup/Cargo.toml index cd2ef22fe..77f9207e3 100644 --- a/examples/demo-rollup/Cargo.toml +++ b/examples/demo-rollup/Cargo.toml @@ -12,48 +12,52 @@ default-run = "sov-demo-rollup" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -async-trait = { workspace = true } -anyhow = { workspace = true } -borsh = { workspace = true, features = ["bytes"] } -jsonrpsee = { workspace = true, features = ["http-client", "server"] } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -tracing = { workspace = true } -hex = { workspace = true } -bytes = { workspace = true } -jmt = { workspace = true } +# non-optional dependencies +sov-celestia-adapter = { path = "../../adapters/celestia" } +const-rollup-config = { path = "../const-rollup-config" } +sov-stf-runner = { path = "../../full-node/sov-stf-runner" } +sov-rollup-interface = { path = "../../rollup-interface" } +sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template" } +sov-modules-api = { path = "../../module-system/sov-modules-api" } +demo-stf = { path = "../demo-stf" } + +async-trait = { workspace = true, optional = true } +anyhow = { workspace = true, optional = true } +borsh = { workspace = true, features = ["bytes"], optional = true } +jsonrpsee = { workspace = true, features = ["http-client", "server"], optional = true } +serde = { workspace = true, features = ["derive"], optional = true } +serde_json = { workspace = true, optional = true } +tracing = { workspace = true, optional = true } +hex = { workspace = true, optional = true } secp256k1 = { workspace = true, optional = true } -futures = "0.3" -tokio = { workspace = true } +tokio = { workspace = true, optional = true } reth-primitives = { workspace = true, optional = true } -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.17", features = ["env-filter"], optional = true } -demo-stf = { path = "../demo-stf", features = ["native"] } -sov-celestia-adapter = { path = "../../adapters/celestia", features = ["native"] } -sov-rollup-interface = { path = "../../rollup-interface" } -sov-db = { path = "../../full-node/db/sov-db" } +sov-db = { path = "../../full-node/db/sov-db", optional = true } sov-ethereum = { path = "../../full-node/sov-ethereum", optional = true } -sov-sequencer = { path = "../../full-node/sov-sequencer" } -sov-stf-runner = { path = "../../full-node/sov-stf-runner" } -sov-risc0-adapter = { path = "../../adapters/risc0", features = ["native"] } -sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template", features = ["native"] } -sov-modules-api = { path = "../../module-system/sov-modules-api", features = ["native"] } -sov-state = { path = "../../module-system/sov-state", features = ["native"] } -const-rollup-config = { path = "../const-rollup-config" } -sov-cli = { path = "../../module-system/sov-cli" } -clap = { workspace = true } +sov-sequencer = { path = "../../full-node/sov-sequencer", optional = true } +sov-risc0-adapter = { path = "../../adapters/risc0" } +sov-state = { path = "../../module-system/sov-state" } +sov-cli = { path = "../../module-system/sov-cli", optional = true } +clap = { workspace = true, optional = true} [dev-dependencies] sov-evm = { path = "../../module-system/module-implementations/sov-evm", features = ["smart_contracts"] } sov-bank = { path = "../../module-system/module-implementations/sov-bank", features = ["native"] } +borsh = { workspace = true } sha2 = { workspace = true } +hex = { workspace = true } +serde_json = { workspace = true } reqwest = "0.11" tendermint = "0.32" tempfile = { workspace = true } proptest = { workspace = true } sov-rollup-interface = { path = "../../rollup-interface", features = ["fuzzing"] } +tokio = { workspace = true } +sov-demo-rollup = { path = ".", features = ["native"] } prometheus = "0.11.0" prettytable-rs = "^0.10" criterion = "0.5.1" @@ -68,17 +72,34 @@ ethers = { workspace = true } revm = { workspace = true } [features] -default = [] +default = ["native"] # Deviate from convention by making the "native" feature active by default. This aligns with how this package is meant to be used (as a binary first, library second). experimental = ["sov-ethereum/experimental", "reth-primitives", "secp256k1", "demo-stf/experimental"] +native = ["anyhow", "jsonrpsee", "serde", "serde_json", "tracing", "tokio", "tracing-subscriber", + "demo-stf/native", "sov-modules-stf-template/native", "sov-risc0-adapter/native", "sov-modules-api/native", + "sov-state/native", "sov-cli", "clap", "sov-celestia-adapter/native", "sov-db", "sov-sequencer", "sov-stf-runner/native", + "sov-modules-api/native"] +bench = ["native", "async-trait", "borsh", "hex"] [[bench]] name = "rollup_bench" harness = false +required-features = ["bench"] [[bench]] name = "rollup_coarse_measure" harness = false +required-features = ["bench"] + +[[bench]] +name = "rng_xfers" +required-features = ["bench"] [[bin]] name = "sov-cli" path = "src/sov-cli/main.rs" +required-features = ["native"] + +[[bin]] +name = "sov-demo-rollup" +path = "src/main.rs" +required-features = ["native"] diff --git a/examples/demo-rollup/src/lib.rs b/examples/demo-rollup/src/lib.rs index 08bcfb0f0..68d2030bc 100644 --- a/examples/demo-rollup/src/lib.rs +++ b/examples/demo-rollup/src/lib.rs @@ -1,21 +1,28 @@ #![deny(missing_docs)] #![doc = include_str!("../README.md")] +#[cfg(feature = "native")] pub mod register_rpc; +#[cfg(feature = "native")] mod rollup; +mod verifier; use const_rollup_config::ROLLUP_NAMESPACE_RAW; +#[cfg(feature = "native")] pub use rollup::{ new_rollup_with_celestia_da, new_rollup_with_mock_da, new_rollup_with_mock_da_from_config, DemoProverConfig, Rollup, }; use sov_celestia_adapter::types::NamespaceId; +#[cfg(feature = "native")] use sov_db::ledger_db::LedgerDB; +pub use verifier::AppVerifier; /// The rollup stores its data in the namespace b"sov-test" on Celestia /// You can change this constant to point your rollup at a different namespace pub const ROLLUP_NAMESPACE: NamespaceId = NamespaceId(ROLLUP_NAMESPACE_RAW); +#[cfg(feature = "native")] /// Initializes a [`LedgerDB`] using the provided `path`. pub fn initialize_ledger(path: impl AsRef) -> LedgerDB { LedgerDB::with_path(path).expect("Ledger DB failed to open") diff --git a/examples/demo-rollup/src/rollup.rs b/examples/demo-rollup/src/rollup.rs index 989bbdeae..10a2d2e70 100644 --- a/examples/demo-rollup/src/rollup.rs +++ b/examples/demo-rollup/src/rollup.rs @@ -20,12 +20,10 @@ use sov_db::ledger_db::LedgerDB; use sov_ethereum::experimental::EthRpcConfig; use sov_modules_api::default_context::ZkDefaultContext; use sov_modules_stf_template::AppTemplate; -use sov_rollup_interface::da::DaVerifier; use sov_rollup_interface::mocks::{MockAddress, MockDaConfig, MockDaService}; use sov_rollup_interface::services::da::DaService; use sov_rollup_interface::zk::ZkvmHost; use sov_state::storage::Storage; -use sov_stf_runner::verifier::StateTransitionVerifier; use sov_stf_runner::{ from_toml_path, ProofGenConfig, Prover, RollupConfig, RunnerConfig, StateTransitionRunner, }; @@ -35,7 +33,7 @@ use tracing::debug; #[cfg(feature = "experimental")] use crate::register_rpc::register_ethereum; use crate::register_rpc::{register_ledger, register_sequencer}; -use crate::{initialize_ledger, ROLLUP_NAMESPACE}; +use crate::{initialize_ledger, AppVerifier, ROLLUP_NAMESPACE}; #[cfg(feature = "experimental")] const TX_SIGNER_PRIV_KEY_PATH: &str = "../test-data/keys/tx_signer_private_key.json"; @@ -87,18 +85,6 @@ pub enum DemoProverConfig { Prove, } -/// A verifier for the demo rollup -pub type AppVerifier = StateTransitionVerifier< - AppTemplate< - ZkDefaultContext, - ::Spec, - Zk, - Runtime::Spec>, - >, - DA, - Zk, ->; - /// Creates celestia based rollup. pub async fn new_rollup_with_celestia_da( rollup_config_path: &str, diff --git a/examples/demo-rollup/src/verifier.rs b/examples/demo-rollup/src/verifier.rs new file mode 100644 index 000000000..bdd769e5b --- /dev/null +++ b/examples/demo-rollup/src/verifier.rs @@ -0,0 +1,17 @@ +use demo_stf::runtime::Runtime; +use sov_modules_api::default_context::ZkDefaultContext; +use sov_modules_stf_template::AppTemplate; +use sov_rollup_interface::da::DaVerifier; +use sov_stf_runner::verifier::StateTransitionVerifier; + +/// A verifier for the demo rollup +pub type AppVerifier = StateTransitionVerifier< + AppTemplate< + ZkDefaultContext, + ::Spec, + Zk, + Runtime::Spec>, + >, + DA, + Zk, +>; diff --git a/examples/demo-stf/Cargo.toml b/examples/demo-stf/Cargo.toml index d0366721c..0df5cc176 100644 --- a/examples/demo-stf/Cargo.toml +++ b/examples/demo-stf/Cargo.toml @@ -68,4 +68,3 @@ native = [ "tokio", "toml", ] -verifier = [] diff --git a/full-node/sov-stf-runner/Cargo.toml b/full-node/sov-stf-runner/Cargo.toml index 1e6498a79..ef0d24cd4 100644 --- a/full-node/sov-stf-runner/Cargo.toml +++ b/full-node/sov-stf-runner/Cargo.toml @@ -15,14 +15,12 @@ publish = false anyhow = { workspace = true } borsh = { workspace = true } serde = { workspace = true } -serde_json = { workspace = true } -toml = { workspace = true } -jsonrpsee = { workspace = true, features = ["http-client", "server"] } -tokio = { workspace = true } +toml = { workspace = true, optional = true } +jsonrpsee = { workspace = true, features = ["http-client", "server"], optional = true } +tokio = { workspace = true, optional = true } hex = { workspace = true } -tracing = { workspace = true } -futures = "0.3" -tracing-subscriber = "0.3.17" +tracing = { workspace = true, optional = true } +futures = { workspace = true, optional = true } sov-db = { path = "../db/sov-db", version = "0.2", optional = true } sov-rollup-interface = { path = "../../rollup-interface", version = "0.2" } @@ -49,4 +47,9 @@ native = [ "sov-bank/native", "sov-state/native", "sov-modules-api/native", + "jsonrpsee", + "toml", + "tokio", + "tracing", + "futures", ]