diff --git a/.gitignore b/.gitignore index b15c08f..c1db368 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ docker/credentials/* !docker/credentials/bridge-0.addr !docker/credentials/bridge-0.key +.keys result diff --git a/Cargo.lock b/Cargo.lock index f032efb..43f0357 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,9 +49,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "ark-bn254" @@ -366,6 +366,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + [[package]] name = "async-lock" version = "2.8.0" @@ -394,18 +400,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -416,7 +422,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -445,7 +451,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "hyper", "itoa", @@ -471,7 +477,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "mime", "rustversion", @@ -481,9 +487,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "95d8e92cac0961e91dbd517496b00f7e9b92363dbe6d42c3198268323798860c" dependencies = [ "addr2line", "cc", @@ -500,6 +506,12 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" @@ -570,7 +582,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -581,9 +593,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -608,9 +620,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", @@ -714,22 +726,22 @@ checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -833,7 +845,7 @@ source = "git+https://github.com/eigerco/celestia-node-rs.git?rev=66b7c6c#66b7c6 dependencies = [ "async-trait", "celestia-types", - "http", + "http 0.2.12", "jsonrpsee", "serde", "thiserror", @@ -878,6 +890,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +dependencies = [ + "num-traits", +] + +[[package]] +name = "chunked_transfer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" + [[package]] name = "cid" version = "0.10.1" @@ -904,9 +931,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.2" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -926,14 +953,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -958,6 +985,19 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-hex" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -1093,6 +1133,7 @@ name = "crypto-bigint" version = "0.5.2" source = "git+https://github.com/risc0/RustCrypto-crypto-bigint?tag=v0.5.2-risc0#8b30304277cfe553b51a78a0e693f48bbb059eb3" dependencies = [ + "generic-array", "getrandom", "rand_core", "subtle", @@ -1151,7 +1192,7 @@ source = "git+https://github.com/risc0/curve25519-dalek?tag=curve25519-4.1.0-ris dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1162,7 +1203,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1307,7 +1348,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1342,6 +1383,20 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -1407,6 +1462,25 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encoding_rs" version = "0.8.33" @@ -1425,7 +1499,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1436,9 +1510,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388979d208a049ffdfb22fa33b9c81942215b940910bccfe258caeb25d125cb3" +checksum = "2b73807008a3c7f171cc40312f37d95ef0396e048b5848d775f54b1a4dd4a0d3" dependencies = [ "serde", ] @@ -1462,6 +1536,97 @@ dependencies = [ "version_check", ] +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "ethers-contract" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d79269278125006bb0552349c03593ffa9702112ca88bc7046cc669f148fb47c" +dependencies = [ + "const-hex", + "ethers-core", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-core" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0a17f0708692024db9956b31d7a20163607d2745953f5ae8125ab368ba280ad" +dependencies = [ + "arrayvec", + "bytes", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "open-fastrlp", + "rand", + "rlp", + "serde", + "serde_json", + "strum", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -1532,9 +1697,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "fixed-hash" @@ -1651,7 +1816,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1702,6 +1867,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1743,7 +1909,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http", + "http 0.2.12", "js-sys", "pin-project", "serde", @@ -1779,18 +1945,29 @@ dependencies = [ "web-sys", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", "indexmap 2.2.5", "slab", "tokio", @@ -1825,6 +2002,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1840,6 +2023,15 @@ dependencies = [ "serde", ] +[[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.9" @@ -1860,6 +2052,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1867,7 +2070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -1900,7 +2103,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -1920,7 +2123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.12", "hyper", "log", "rustls", @@ -1943,8 +2146,8 @@ dependencies = [ [[package]] name = "ibc" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-apps", "ibc-clients", @@ -1954,10 +2157,40 @@ dependencies = [ "ibc-primitives", ] +[[package]] +name = "ibc-app-nft-transfer" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" +dependencies = [ + "ibc-app-nft-transfer-types", + "ibc-core", + "serde-json-wasm", +] + +[[package]] +name = "ibc-app-nft-transfer-types" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" +dependencies = [ + "base64 0.21.7", + "borsh", + "derive_more", + "displaydoc", + "http 1.1.0", + "ibc-core", + "ibc-proto", + "mime", + "parity-scale-codec", + "scale-info", + "schemars", + "serde", + "serde-json-wasm", +] + [[package]] name = "ibc-app-transfer" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-app-transfer-types", "ibc-core", @@ -1966,8 +2199,8 @@ dependencies = [ [[package]] name = "ibc-app-transfer-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1982,16 +2215,17 @@ dependencies = [ [[package]] name = "ibc-apps" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ + "ibc-app-nft-transfer", "ibc-app-transfer", ] [[package]] name = "ibc-client-tendermint" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "ibc-client-tendermint-types", @@ -2007,8 +2241,8 @@ dependencies = [ [[package]] name = "ibc-client-tendermint-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "displaydoc", "ibc-core-client-types", @@ -2024,8 +2258,8 @@ dependencies = [ [[package]] name = "ibc-client-wasm-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "base64 0.21.7", "displaydoc", @@ -2033,12 +2267,13 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", + "serde", ] [[package]] name = "ibc-clients" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-client-tendermint", "ibc-client-wasm-types", @@ -2046,8 +2281,8 @@ dependencies = [ [[package]] name = "ibc-core" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -2062,8 +2297,8 @@ dependencies = [ [[package]] name = "ibc-core-channel" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel-types", "ibc-core-client", @@ -2077,8 +2312,8 @@ dependencies = [ [[package]] name = "ibc-core-channel-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -2089,6 +2324,8 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", + "parity-scale-codec", + "scale-info", "schemars", "serde", "sha2 0.10.8", @@ -2098,8 +2335,8 @@ dependencies = [ [[package]] name = "ibc-core-client" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-client-context", "ibc-core-client-types", @@ -2111,8 +2348,8 @@ dependencies = [ [[package]] name = "ibc-core-client-context" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -2127,8 +2364,8 @@ dependencies = [ [[package]] name = "ibc-core-client-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -2137,6 +2374,8 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", + "parity-scale-codec", + "scale-info", "schemars", "serde", "subtle-encoding", @@ -2145,8 +2384,8 @@ dependencies = [ [[package]] name = "ibc-core-commitment-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -2154,6 +2393,8 @@ dependencies = [ "ibc-primitives", "ibc-proto", "ics23", + "parity-scale-codec", + "scale-info", "schemars", "serde", "subtle-encoding", @@ -2161,8 +2402,8 @@ dependencies = [ [[package]] name = "ibc-core-connection" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-client", "ibc-core-connection-types", @@ -2173,8 +2414,8 @@ dependencies = [ [[package]] name = "ibc-core-connection-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -2184,6 +2425,8 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", + "parity-scale-codec", + "scale-info", "schemars", "serde", "subtle-encoding", @@ -2192,8 +2435,8 @@ dependencies = [ [[package]] name = "ibc-core-handler" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -2207,8 +2450,8 @@ dependencies = [ [[package]] name = "ibc-core-handler-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -2221,6 +2464,8 @@ dependencies = [ "ibc-core-router-types", "ibc-primitives", "ibc-proto", + "parity-scale-codec", + "scale-info", "schemars", "serde", "subtle-encoding", @@ -2229,8 +2474,8 @@ dependencies = [ [[package]] name = "ibc-core-host" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -2247,8 +2492,8 @@ dependencies = [ [[package]] name = "ibc-core-host-cosmos" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -2262,6 +2507,7 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", + "serde", "sha2 0.10.8", "subtle-encoding", "tendermint 0.34.1", @@ -2269,21 +2515,23 @@ dependencies = [ [[package]] name = "ibc-core-host-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", "displaydoc", "ibc-primitives", + "parity-scale-codec", + "scale-info", "schemars", "serde", ] [[package]] name = "ibc-core-router" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -2296,8 +2544,8 @@ dependencies = [ [[package]] name = "ibc-core-router-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -2305,6 +2553,8 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", + "parity-scale-codec", + "scale-info", "schemars", "serde", "subtle-encoding", @@ -2314,23 +2564,25 @@ dependencies = [ [[package]] name = "ibc-derive" version = "0.6.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "ibc-primitives" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", "displaydoc", "ibc-proto", + "parity-scale-codec", "prost", + "scale-info", "schemars", "serde", "tendermint 0.34.1", @@ -2339,8 +2591,9 @@ dependencies = [ [[package]] name = "ibc-proto" -version = "0.41.0" -source = "git+https://github.com/cosmos/ibc-proto-rs.git?rev=a1877a5#a1877a5b78626f7f468cf5d14ff79ae5eef068ef" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a6f2bbf7e1d12f98d8d54d9114231b865418d0f8b619c0873180eafdee07fd" dependencies = [ "base64 0.21.7", "borsh", @@ -2348,7 +2601,9 @@ dependencies = [ "flex-error", "ics23", "informalsystems-pbjson", + "parity-scale-codec", "prost", + "scale-info", "schemars", "serde", "subtle-encoding", @@ -2358,12 +2613,14 @@ dependencies = [ [[package]] name = "ibc-query" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "displaydoc", "ibc", "ibc-proto", + "schemars", + "serde", "tonic", ] @@ -2405,6 +2662,15 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + [[package]] name = "impl-serde" version = "0.4.0" @@ -2575,7 +2841,7 @@ dependencies = [ "futures-channel", "futures-util", "gloo-net", - "http", + "http 0.2.12", "jsonrpsee-core", "pin-project", "rustls-native-certs", @@ -2641,7 +2907,7 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-crate 1.1.3", "proc-macro2", "quote", @@ -2655,7 +2921,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ "futures-util", - "http", + "http 0.2.12", "hyper", "jsonrpsee-core", "jsonrpsee-types", @@ -2702,13 +2968,26 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ - "http", + "http 0.2.12", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", "url", ] +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", +] + [[package]] name = "keccak" version = "0.1.5" @@ -2738,7 +3017,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2781,7 +3060,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall", ] @@ -2804,9 +3083,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.15" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" dependencies = [ "cc", "pkg-config", @@ -3075,7 +3354,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3107,6 +3386,27 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.53", +] + [[package]] name = "object" version = "0.32.2" @@ -3130,6 +3430,31 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "openssl-probe" version = "0.1.5" @@ -3253,7 +3578,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3303,7 +3628,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3314,7 +3639,9 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", + "impl-rlp", "impl-serde", + "scale-info", "uint", ] @@ -3346,6 +3673,15 @@ dependencies = [ "toml_edit 0.20.7", ] +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3372,9 +3708,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -3394,13 +3730,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "prometheus_exporter" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf17cbebe0bfdf4f279ef84eeefe0d50468b0b7116f078acf41d456e48fe81a" +dependencies = [ + "ascii", + "lazy_static", + "log", + "prometheus", + "thiserror", + "tiny_http", +] + [[package]] name = "proptest" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "lazy_static", "num-traits", "rand", @@ -3427,7 +3777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.11.0", "log", "multimap", @@ -3437,7 +3787,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.52", + "syn 2.0.53", "tempfile", "which", ] @@ -3452,7 +3802,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3485,7 +3835,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "memchr", "unicase", ] @@ -3636,9 +3986,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", @@ -3646,7 +3996,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-rustls", @@ -3675,6 +4025,16 @@ dependencies = [ "winreg", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.17.8" @@ -3928,13 +4288,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "rockbound" version = "1.0.0" -source = "git+https://github.com/sovereign-Labs/rockbound?tag=v2.0.0#edabd23e12d75058d7ce5d92e38dcc9f66f83c53" +source = "git+https://github.com/sovereign-Labs/rockbound?tag=v2.0.1#110936ac9d9cace77344e557ea384cb7eaa64a2a" dependencies = [ "anyhow", "once_cell", @@ -3972,9 +4344,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b1d9521f889713d1221270fdd63370feca7e5c71a18745343402fa86e4f04f" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -4038,11 +4410,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -4124,6 +4496,30 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scale-info" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ef2175c2907e7c8bc0a9c3f86aeb5ec1f3b275300ad58a44d0c3ae379a5e52e" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b8eb8fd61c5cdd3390d9b2132300a7e7618955b98b8416f118c1b4e144f" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "schannel" version = "0.1.23" @@ -4179,6 +4575,20 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -4279,7 +4689,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4312,7 +4722,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4413,6 +4823,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ + "digest 0.10.7", "rand_core", ] @@ -4442,9 +4853,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -4465,7 +4876,7 @@ dependencies = [ "base64 0.13.1", "bytes", "futures", - "http", + "http 0.2.12", "httparse", "log", "rand", @@ -4488,6 +4899,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sov-attester-incentives" +version = "0.3.0" +dependencies = [ + "anyhow", + "bcs", + "borsh", + "derivative", + "serde", + "serde_json", + "sov-bank", + "sov-chain-state", + "sov-modules-api", + "sov-state", + "thiserror", + "tracing", +] + [[package]] name = "sov-bank" version = "0.3.0" @@ -4555,7 +4984,7 @@ dependencies = [ [[package]] name = "sov-celestia-client" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "derive_more", "ibc-client-tendermint", @@ -4572,7 +5001,7 @@ dependencies = [ [[package]] name = "sov-celestia-client-types" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "base64 0.21.7", "bytes", @@ -4580,10 +5009,10 @@ dependencies = [ "hex", "ibc-client-tendermint", "ibc-core", - "ibc-proto", "ics23", "prost", "serde", + "sov-ibc-proto", "tendermint 0.34.1", "tendermint-light-client-verifier", "tendermint-proto 0.34.1", @@ -4643,7 +5072,7 @@ dependencies = [ [[package]] name = "sov-ibc" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "ahash", "anyhow", @@ -4661,7 +5090,6 @@ dependencies = [ "serde_json", "sha2 0.10.8", "sov-celestia-client", - "sov-chain-state", "sov-ibc-transfer", "sov-modules-api", "sov-rollup-interface", @@ -4671,10 +5099,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "sov-ibc-proto" +version = "0.1.0" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" +dependencies = [ + "ibc-proto", + "informalsystems-pbjson", + "prost", + "serde", + "tendermint-proto 0.34.1", +] + [[package]] name = "sov-ibc-transfer" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "anyhow", "base64 0.21.7", @@ -4708,6 +5148,14 @@ dependencies = [ "tokio", ] +[[package]] +name = "sov-metrics" +version = "0.3.0" +dependencies = [ + "once_cell", + "prometheus", +] + [[package]] name = "sov-mock-da" version = "0.3.0" @@ -4836,6 +5284,7 @@ dependencies = [ "sov-rollup-interface", "sov-state", "thiserror", + "tokio", "tracing", ] @@ -4882,6 +5331,7 @@ dependencies = [ "async-trait", "borsh", "bytes", + "derivative", "digest 0.10.7", "futures", "hex", @@ -4901,8 +5351,11 @@ dependencies = [ "anyhow", "async-trait", "borsh", + "bytes", "clap", "jsonrpsee", + "prometheus_exporter", + "rand", "risc0-starter", "serde", "serde_json", @@ -4928,6 +5381,7 @@ dependencies = [ "tempfile", "tokio", "tracing", + "tracing-appender", "tracing-subscriber 0.3.18", ] @@ -4936,17 +5390,22 @@ name = "sov-sequencer" version = "0.3.0" dependencies = [ "anyhow", + "bincode", "borsh", "dashmap", + "derivative", "hex", "jsonrpsee", "mini-moka", + "rockbound", "serde", "serde_json", + "sov-db", "sov-modules-api", "sov-modules-stf-blueprint", "sov-rollup-interface", "sov-state", + "sov-test-utils", "tokio", "tracing", ] @@ -5003,13 +5462,59 @@ dependencies = [ "serde", "serde_json", "sov-db", + "sov-metrics", "sov-rollup-interface", "thiserror", "tokio", - "toml 0.8.10", + "toml 0.8.12", "tracing", ] +[[package]] +name = "sov-test-utils" +version = "0.3.0" +dependencies = [ + "anyhow", + "borsh", + "ethereum-types", + "ethers-contract", + "ethers-core", + "hex", + "jsonrpsee", + "serde", + "serde_json", + "sov-attester-incentives", + "sov-bank", + "sov-chain-state", + "sov-mock-da", + "sov-mock-zkvm", + "sov-modules-api", + "sov-modules-stf-blueprint", + "sov-rollup-interface", + "sov-sequencer-registry", + "sov-state", + "sov-value-setter", + "tokio", + "tracing", + "tracing-subscriber 0.3.18", +] + +[[package]] +name = "sov-value-setter" +version = "0.3.0" +dependencies = [ + "anyhow", + "borsh", + "clap", + "jsonrpsee", + "schemars", + "serde", + "serde_json", + "sov-modules-api", + "sov-state", + "thiserror", +] + [[package]] name = "spin" version = "0.9.8" @@ -5060,6 +5565,7 @@ dependencies = [ "sov-sequencer-registry", "sov-state", "sov-stf-runner", + "tokio", "tracing", ] @@ -5069,6 +5575,28 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.53", +] + [[package]] name = "subtle" version = "2.5.0" @@ -5103,9 +5631,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -5283,22 +5811,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5318,6 +5846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", + "itoa", "serde", "time-core", "time-macros", @@ -5338,6 +5867,28 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tiny_http" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f8734c6d6943ad6df6b588d228a87b4af184998bcffa268ceddf05c2055a8c" +dependencies = [ + "ascii", + "chunked_transfer", + "log", + "time", + "url", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -5390,7 +5941,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5405,9 +5956,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -5440,14 +5991,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.6", + "toml_edit 0.22.9", ] [[package]] @@ -5472,9 +6023,20 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.6" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.5", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ "indexmap 2.2.5", "serde", @@ -5495,7 +6057,7 @@ dependencies = [ "base64 0.21.7", "bytes", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-timeout", @@ -5554,6 +6116,18 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber 0.3.18", +] + [[package]] name = "tracing-attributes" version = "0.1.27" @@ -5562,7 +6136,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5662,7 +6236,7 @@ checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5818,7 +6392,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -5852,7 +6426,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5885,7 +6459,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -6133,7 +6707,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -6153,7 +6727,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index a5df038..832e081 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,12 +4,12 @@ resolver = "2" members = [ "crates/rollup", - "crates/stf", + "crates/stf" ] exclude = [ "vendor/sovereign-sdk", - "vendor/risc0-cycle-macros" + "scripts/bank_load" ] [workspace.package] @@ -34,25 +34,29 @@ sov-db = { path = "./vendor/sovereign-sdk/full-node/sov sov-sequencer = { path = "./vendor/sovereign-sdk/full-node/sov-sequencer" } sov-rollup-interface = { path = "./vendor/sovereign-sdk/rollup-interface" } sov-risc0-adapter = { path = "./vendor/sovereign-sdk/adapters/risc0" } +sov-mock-zkvm = { path = "./vendor/sovereign-sdk/adapters/mock-zkvm" } sov-cli = { path = "./vendor/sovereign-sdk/module-system/sov-cli" } sov-mock-da = { path = "./vendor/sovereign-sdk/adapters/mock-da" } sov-celestia-adapter = { path = "./vendor/sovereign-sdk/adapters/celestia" } sov-prover-storage-manager = { path = "./vendor/sovereign-sdk/full-node/sov-prover-storage-manager" } -sov-mock-zkvm = { path = "./vendor/sovereign-sdk/adapters/mock-zkvm" } -sov-ibc = { git = "https://github.com/informalsystems/sovereign-ibc.git", rev = "7e41c9b" } -sov-ibc-transfer = { git = "https://github.com/informalsystems/sovereign-ibc.git", rev = "7e41c9b" } +sov-ibc = { git = "https://github.com/informalsystems/sovereign-ibc.git", rev = "5a8a685" } +sov-ibc-transfer = { git = "https://github.com/informalsystems/sovereign-ibc.git", rev = "5a8a685" } stf-starter = { path = "./crates/stf" } serde = { version = "1.0.196", features = ["derive", "rc"] } serde_json = { version = "1.0" } +prometheus_exporter = "0.8.5" +prometheus = "0.13.3" + anyhow = "1.0.68" clap = { version = "4.4.10", features = ["derive"] } async-trait = "0.1.71" borsh = { version = "0.10.3", features = ["rc", "bytes"] } tracing = "0.1.40" +tracing-appender = "0.2" tokio = { version = "1", features = ["full"] } tempfile = "3.5" jsonrpsee = { version = "0.20.1", features = ["jsonrpsee-types"] } diff --git a/README.md b/README.md index 1cc324c..7512d22 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ $ make test-bank-supply-of ```bash,test-ci,bashtestmd:compare-output $ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":{"token_address":"sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"},"id":1}' http://127.0.0.1:12345 -{"jsonrpc":"2.0","result":{"amount":1000},"id":1} +{"jsonrpc":"2.0","result":{"amount":10000000},"id":1} ``` # How to run the sov-rollup-starter using celestia-da: @@ -127,7 +127,7 @@ $ make test-bank-supply-of ``` $ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":{"token_address":"sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"},"id":1}' http://127.0.0.1:12345 -{"jsonrpc":"2.0","result":{"amount":1000},"id":1} +{"jsonrpc":"2.0","result":{"amount":10000000},"id":1} ``` ## Enabling the prover diff --git a/automation/KEYGEN.md b/automation/KEYGEN.md new file mode 100644 index 0000000..e0a4303 --- /dev/null +++ b/automation/KEYGEN.md @@ -0,0 +1,41 @@ +### Celestia DA key generation +* This is a one time process to generate a celestia keypair for the sequencer to post blobs to the celestia DA layer +* Ensure go (version 1.21.1) is installed locally +* Ensure dependencies are installed for celestia - https://docs.celestia.org/nodes/environment#install-dependencies +* Checkout `celestia-node` +``` +git clone https://github.com/celestiaorg/celestia-node.git +``` +* Checkout the correct version `tags/v0.12.4` +``` +git checkout tags/v0.12.4 +``` +* Build the celestia keygen tool +``` +make cel-key +``` +* Create the key that the sequencer would be using to post blobs to the DA layer (we're using `mocha` as the p2p network because we're generating keys for the mocha testnet) +``` +./cel-key add --node.type light --p2p.network mocha +``` +* Save the seed phrase +* Save the celestia address +* Update [testnet](roles/data-availability/defaults/testnet/variables.yaml) with the key information: + * `key_name` should be the same as the one you create the key with. + * `key_address_filename` should be the corresponding `.address` file name. + * Both the above should be visible in `ls -lahtr ~/.celestia-light-mocha-4/keys/keyring-test` +* Update [testnet](roles/rollup/defaults/testnet/variables.yaml) with the celestia address: + * `sequencer_self_da_address`: This should be the address used to post blobs to celestia + * `sequencer_genesis_da_address`: This should be the genesis sequencer + * In most cases, the above two variables will have the same value of the celestia address generated in the previous steps + * Ensure that the address for the key you generated has funds to post data to the testnet +* Create `.keys` folder at the root of the repository +``` +cd sov-rollup-starter-wip +mkdir -p .keys +mkdir -p .keys/ +cp ~/.celestia-light-mocha-4/keys/keyring-test/.info ../sov-rollup-starter-wip/.keys// +cp ~/.celestia-light-mocha-4/keys/keyring-test/.address ../sov-rollup-starter-wip/.keys// +``` +* If the files are moved to the above location, nothing else needs to be changed in testnet variables file +* At the end of this process both the `.info` and `.address` files should be present inside following folder `sov-rollup-starter-wip/.keys/` diff --git a/automation/README.md b/automation/README.md new file mode 100644 index 0000000..8da1c9f --- /dev/null +++ b/automation/README.md @@ -0,0 +1,114 @@ +## Automation + +### About +This directory contains ansible playbooks to automate setting up the `sov-rollup-starter` binary on a remote AWS machine. The ansible playbooks can potentially work on any machine with two disks, but has been tested using the AWS machine mentioned below. + +### Key generation +This is a one time step to generate the celestia keypair that will be used to post blobs. Follow the guide here [KEYGEN](./KEYGEN.md) + +### Machine recommendations +* AWS `c5ad.4xlarge` + * 16 cores + * 2 x NVME SSD + * 32 GB RAM +* Ubuntu 22.04 +* Open security group + +### Installation (Mac OS) +* Homebrew - https://brew.sh/ +* Ansible +``` +brew install ansible +``` +* go1.21.1 - install for your specific architecture from https://go.dev/dl/ +``` +https://go.dev/dl/go1.21.1.darwin-arm64.pkg +``` + +### Ansible variables to edit +* [common](roles/common/defaults/main.yaml) + * Primary variables to edit + * `aws_prometheus_remote_write_url` + * `aws_prometheus_monitoring_label` + * `aws_region` +* [data-availability](roles/data-availability/defaults/main.yaml) + * Modify `cluster` to `testnet` or `mainnet` depending on the variables you want to pick + * [testnet](roles/data-availability/defaults/testnet/variables.yaml) + * [mainnet](roles/data-availability/defaults/mainnet/variables.yaml) + * Primary variables to edit (described in [KEYGEN](./KEYGEN.md)) + * `key_name` + * `key_address_filename` +* [rollup](roles/rollup/defaults/main.yaml) + * Modify `cluster` to `testnet` or `mainnet` depending on the variables you want to pick + * [testnet](roles/rollup/defaults/testnet/variables.yaml) + * [mainnet](roles/rollup/defaults/mainnet/variables.yaml) + * All the variables will likely need to be edited (variables are described in comments) + +### Steps to launch the rollup +* Launch the machine in AWS +* Select `c5ad.4xlarge` as the instance type +* Ensure public IP is attached +* Ensure a permissive security group for testnet +* The only restriction for instance role is to ensure it can post data to AWS managed prometheus (out of the scope of this README) +* Ensure .pem is part of the ssh agent. Verify with +``` +ssh-add -l +``` +* Run the ansible command to set up the machine from the automation folder +``` +ansible-playbook setup.yaml -i ',' -u ubuntu --private-key ~/.ssh/.pem -e 'ansible_ssh_common_args="-o ForwardAgent=yes" -e 'switches=cdr' ' +``` + +### Notes +* The DA layer catch up takes some time currently, so if the above command gets stuck during the task named `Loop until height is greater than to_height`, it can be ctrl+c'd and re-run. +* The script will block there again while the DA light client is catching up (TBD: check if snapshots are feasible) +* Progress can also be monitored by ssh-ing to the machine and running the following command after switching to the `sovereign` user +``` +$ sudo su - sovereign +$ celestia header sync-state --node.store /mnt/da +{ + "result": { + "id": 2, + "height": 1430909, + "from_height": 1387516, + "to_height": 1387831, + "from_hash": "EC63CCC2D4F6E36FB42B4C1BF302D21A428CB45617B4CD4FF0AE82A4BE85B6F1", + "to_hash": "C6048F0C08D4FAE92CAAF9569BF483594127C2D3D79F49FE45EA3005C7FAC5AF", + "start": "2024-03-15T12:38:54.119717467Z", + "end": "2024-03-15T12:38:54.11985308Z" + } +``` +* Once the DA light client catches up `height` will be greater than `to_height` + +### Structure +The automation folder consists of 3 ansible roles which are executed on a remote machine +* `common` + * Installs base ubuntu dependencies + * Rust, Golang, compiler tools + * Disk setup and mounting + * User creation (sovereign user) + * Kernel and OS tuning + * Prometheus installation + * Chrony for time sync +* `data-availability` + * Download and install celestia + * Upload user generated keys from local to the remote machine + * Start the DA service + * Wait for the DA service to be caught up +* `rollup` + * Download the `sov-rollup-starter` repository + * Checkout the specific commit mentioned in the variables + * Edit configuration files based on variables + * Start the rollup binary as a `systemd` service + +### Usage +The ansible playbook can be used in two ways +* Setting up the machine from scratch + * All the above installations are completed + * rollup service is started +* Updating the rollup binary + * rollup service is stopped + * git is updated + * rollup binary is rebuilt + * rollup service is started + * OPTIONALLY - wipe the rollup's data storage directory diff --git a/automation/preconditions.yaml b/automation/preconditions.yaml new file mode 100644 index 0000000..be61c8f --- /dev/null +++ b/automation/preconditions.yaml @@ -0,0 +1,26 @@ +- include_vars: "roles/data-availability/defaults/main.yaml" +- include_vars: "roles/data-availability/defaults/{{ cluster }}/variables.yaml" + +- name: Validate da_start_from is optional and skip subsequent tasks if not defined + debug: + msg: "'da_start_from' is not defined, skipping hash retrieval." + when: da_start_from is not defined or da_start_from == "" + delegate_to: localhost + +- name: Set da_trusted_hash based on da_start_from + command: "python3 scripts/python/da_rpc_queries.py get_hash {{ celestia_rpc_url }} {{ da_start_from }}" + register: hash_output + when: da_start_from is defined + delegate_to: localhost + +- name: Update da_trusted_hash with script output + set_fact: + da_trusted_hash: "{{ hash_output.stdout }}" + when: hash_output is defined and da_start_from is defined + delegate_to: localhost + +- name: Print the da_trusted_hash + debug: + msg: "The da_trusted_hash is: {{ da_trusted_hash }}" + when: da_trusted_hash is defined and da_start_from is defined + delegate_to: localhost \ No newline at end of file diff --git a/automation/roles/common/defaults/main.yaml b/automation/roles/common/defaults/main.yaml new file mode 100644 index 0000000..56a842f --- /dev/null +++ b/automation/roles/common/defaults/main.yaml @@ -0,0 +1,14 @@ +--- +# can be left alone for aws `c4ad.4xlarge` instance type +# If the machine is different or not AWS, then get the unmounted disks using `fdisk -l` and modify the list +raw_disk_list: ["/dev/nvme1n1", "/dev/nvme2n1"] +# Set to false if you want to manually setup the disks before running the playbook +setup_disks: true +# Default 32 GB +swap_mb: 32000 +# AWS managed prometheus url for local agent to write data to +aws_prometheus_remote_write_url: "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-112093cd-2aee-4617-ab97-10e00698e139/api/v1/remote_write" +# Region for AWS managed prometheus +aws_region: "us-east-1" +# Label for filtering data in grafana +aws_prometheus_monitoring_label: "sov005" diff --git a/automation/roles/common/files/node_exporter.service b/automation/roles/common/files/node_exporter.service new file mode 100644 index 0000000..7cc6426 --- /dev/null +++ b/automation/roles/common/files/node_exporter.service @@ -0,0 +1,13 @@ +[Unit] +Description=Node Exporter +Wants=network-online.target +After=network-online.target + +[Service] +User=node_exporter +Group=node_exporter +Type=simple +ExecStart=/usr/local/bin/node_exporter + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/automation/roles/common/files/prometheus.service b/automation/roles/common/files/prometheus.service new file mode 100644 index 0000000..e4a7c1c --- /dev/null +++ b/automation/roles/common/files/prometheus.service @@ -0,0 +1,17 @@ +[Unit] +Description=Prometheus Server +After=network.target + +[Service] +User=root +Group=root +Restart=always +RestartSec=30 +Type=simple +ExecStart=/opt/prometheus-2.33.0.linux-amd64/prometheus \ +--config.file=/opt/prometheus-2.33.0.linux-amd64/prometheus.yml \ +--web.listen-address=localhost:9090 \ +--enable-feature=agent + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/automation/roles/common/tasks/chrony.yaml b/automation/roles/common/tasks/chrony.yaml new file mode 100644 index 0000000..fee4c71 --- /dev/null +++ b/automation/roles/common/tasks/chrony.yaml @@ -0,0 +1,32 @@ +--- +- name: Disable conflicting services + ansible.builtin.service: + name: "{{ item }}" + state: stopped + enabled: false + register: disable_service_result + failed_when: (disable_service_result is failed) + and ('Could not find the requested service' not in disable_service_result.msg) + loop: + - ntp + - ntpd + - ntpsec + - openntpd + - systemd-timesyncd + +- name: make sure chronyd is installed + become: true + become_user: root + ansible.builtin.apt: + update_cache: yes + state: latest + pkg: + - chrony + +- name: Restart chronyd + become: true + become_user: root + ansible.builtin.systemd: + name: chrony + state: started + enabled: yes diff --git a/automation/roles/common/tasks/deps.yaml b/automation/roles/common/tasks/deps.yaml new file mode 100644 index 0000000..f908df6 --- /dev/null +++ b/automation/roles/common/tasks/deps.yaml @@ -0,0 +1,121 @@ +- name: Install a list of packages + become: true + become_user: root + apt: + update_cache: yes + pkg: + - build-essential + - pkg-config + - libudev-dev + - cmake + - libclang-dev + - libssl-dev + - gparted + - nload + - python3-pip + - net-tools + - logind + - curl + - git + - chrony + - htop + - acl + - tar + - wget + - aria2 + - clang + - jq + - make + - ncdu + - protobuf-compiler + - ninja-build + +- name: some python utils + become: true + become_user: sovereign + ansible.builtin.pip: + name: + - tqdm + - requests + - pynacl + - base58 + executable: pip3 + +# Temporary workaround for https://github.com/Sovereign-Labs/sovereign-sdk-wip/pull/192 +- name: Download libssl package + ansible.builtin.get_url: + url: http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb + dest: "/tmp/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb" + +- name: Install libssl package + ansible.builtin.command: + cmd: dpkg -i /tmp/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb + become: true + +- name: check if cargo is installed + become: true + become_user: ubuntu + become_method: sudo + shell: test -f /home/ubuntu/.cargo/env && source /home/ubuntu/.cargo/env && command -v cargo + args: + executable: /bin/bash + register: cargo_exists + ignore_errors: yes + +- name: Download Installer + when: cargo_exists is failed + become: true + become_user: ubuntu + become_method: sudo + get_url: + url: https://sh.rustup.rs + dest: /tmp/sh.rustup.rs + mode: '0755' + force: 'yes' + +- name: install rust/cargo + become: true + become_user: ubuntu + become_method: sudo + when: cargo_exists is failed + shell: /tmp/sh.rustup.rs -y + args: + executable: /bin/bash + +- name: Check if risc0 toolchain is installed + ansible.builtin.shell: RUSTUP_TOOLCHAIN=risc0 /home/ubuntu/.cargo/bin/cargo version + register: risc0_version_check + ignore_errors: true + become: true + become_user: ubuntu + become_method: sudo + args: + executable: /bin/bash + +- name: Install cargo tools and risc0 if not present + block: + - name: install cargo binstall + become: true + become_user: ubuntu + become_method: sudo + shell: /home/ubuntu/.cargo/bin/cargo install cargo-binstall + args: + executable: /bin/bash + + - name: install cargo risc0 + become: true + become_user: ubuntu + become_method: sudo + shell: /home/ubuntu/.cargo/bin/cargo binstall cargo-risczero -y + args: + executable: /bin/bash + + - name: install cargo risc0 + become: true + become_user: ubuntu + become_method: sudo + shell: /home/ubuntu/.cargo/bin/cargo risczero install --version v2024-02-08.1 + args: + executable: /bin/bash + when: risc0_version_check.rc != 0 + diff --git a/automation/roles/common/tasks/dirs.yaml b/automation/roles/common/tasks/dirs.yaml new file mode 100644 index 0000000..1a4ea9d --- /dev/null +++ b/automation/roles/common/tasks/dirs.yaml @@ -0,0 +1,36 @@ +- name: sovereign storage + file: + path: /mnt/rollup + state: directory + owner: sovereign + group: sovereign + become: true + become_user: root + +- name: da storage + file: + path: /mnt/da + state: directory + owner: sovereign + group: sovereign + become: true + become_user: root + +- name: sovereign logs + become: true + become_user: root + file: + path: /mnt/logs + state: directory + owner: sovereign + group: sovereign + +- name: create directory to hold keys + become: true + become_user: root + file: + path: /home/sovereign/.keys + state: directory + owner: sovereign + group: sovereign + diff --git a/automation/roles/common/tasks/disks.yaml b/automation/roles/common/tasks/disks.yaml new file mode 100644 index 0000000..5f7c2e7 --- /dev/null +++ b/automation/roles/common/tasks/disks.yaml @@ -0,0 +1,54 @@ +- name: install mdadm + become: true + become_user: root + apt: + update_cache: yes + pkg: + - mdadm + +- name: check raid already exists + become: true + become_user: root + shell: fdisk -l | grep -e 'md0' -e 'md127' + ignore_errors: yes + register: raid_exists + +- name: wipe disks + become: true + become_user: root + shell: sfdisk --delete {{ item }} + with_items: + - "{{ raw_disk_list }}" + ignore_errors: yes + when: raid_exists.rc != 0 + +- name: raid raw disks + become: true + become_user: root + shell: echo y | mdadm --create /dev/md0 --level=0 --raid-devices={{ raw_disk_list|length }} {{ raw_disk_list | join(' ') }} + when: raid_exists.rc != 0 + +- name: get raid device name + become: true + become_user: root + shell: cat /proc/mdstat | grep md | awk '{print $1}' + register: raid_name + +- name: check mount + become: true + become_user: root + shell: df -h | grep mnt + ignore_errors: yes + register: mount_mnt + +- name: format disks with ext4 + become: true + become_user: root + shell: mkfs.ext4 /dev/{{ raid_name.stdout }} + when: raid_name.rc == 0 and mount_mnt.rc != 0 + +- name: mount disks + become: true + become_user: root + shell: mount /dev/{{ raid_name.stdout }} /mnt + when: mount_mnt.rc != 0 \ No newline at end of file diff --git a/automation/roles/common/tasks/docker.yaml b/automation/roles/common/tasks/docker.yaml new file mode 100644 index 0000000..e2cbdab --- /dev/null +++ b/automation/roles/common/tasks/docker.yaml @@ -0,0 +1,27 @@ +- name: Add Docker GPG apt Key + become: true + become_user: root + apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present + +- name: Add Docker Repository + become: true + become_user: root + apt_repository: + repo: deb https://download.docker.com/linux/ubuntu focal stable + state: present + +- name: Update apt and install docker-ce + become: true + become_user: root + apt: + name: docker-ce + state: latest + update_cache: true + +- name: Install Docker Module for Python + become: true + become_user: root + pip: + name: docker \ No newline at end of file diff --git a/automation/roles/common/tasks/governor.yaml b/automation/roles/common/tasks/governor.yaml new file mode 100644 index 0000000..d149a4c --- /dev/null +++ b/automation/roles/common/tasks/governor.yaml @@ -0,0 +1,17 @@ +- name: Set performance governor + become: true + become_user: root + shell: | + echo 'GOVERNOR="performance"' | tee /etc/default/cpufrequtils + echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + args: + executable: /bin/bash + +- name: Set performance governor bare metal + become: true + become_user: root + shell: | + echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + args: + executable: /bin/bash + ignore_errors: True \ No newline at end of file diff --git a/automation/roles/common/tasks/main.yaml b/automation/roles/common/tasks/main.yaml new file mode 100644 index 0000000..2cd1d27 --- /dev/null +++ b/automation/roles/common/tasks/main.yaml @@ -0,0 +1,28 @@ +--- + +- name: create user + include_tasks: user.yaml + +- name: install dependencies + include_tasks: deps.yaml + +- name: chrony + include_tasks: chrony.yaml + +- name: tune host + include_tasks: tuner.yaml + +- name: setup disks + include_tasks: disks.yaml + +- name: folders + include_tasks: dirs.yaml + +- name: swap + include_tasks: swap.yaml + +- name: prometheus agent for monitoring + include_tasks: prometheus_agent.yaml + +- name: node exporter + include_tasks: node_exporter.yaml diff --git a/automation/roles/common/tasks/node_exporter.yaml b/automation/roles/common/tasks/node_exporter.yaml new file mode 100644 index 0000000..473ac9f --- /dev/null +++ b/automation/roles/common/tasks/node_exporter.yaml @@ -0,0 +1,51 @@ +- name: Download Node Exporter + get_url: + url: "https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz" + dest: "/tmp/node_exporter-1.3.1.linux-amd64.tar.gz" + become: true + +- name: Extract Node Exporter + unarchive: + src: "/tmp/node_exporter-1.3.1.linux-amd64.tar.gz" + dest: "/opt" + remote_src: yes + creates: "/opt/node_exporter-1.3.1.linux-amd64" + become: true + +- name: Create Node Exporter user + user: + name: node_exporter + system: yes + shell: /usr/sbin/nologin + become: true + +- name: Copy Node Exporter binary to /usr/local/bin + copy: + src: "/opt/node_exporter-1.3.1.linux-amd64/node_exporter" + dest: "/usr/local/bin/node_exporter" + owner: node_exporter + group: node_exporter + mode: '0755' + remote_src: yes + become: true + +- name: Copy systemd unit file for node exporter + ansible.builtin.copy: + src: node_exporter.service + dest: "/etc/systemd/system/node_exporter.service" + owner: root + group: root + mode: '0644' + become: true + +- name: Reload systemd to recognize node exporter service + ansible.builtin.systemd: + daemon_reload: yes + become: true + +- name: Start node exporter service + ansible.builtin.systemd: + name: node_exporter + state: started + enabled: yes + become: true diff --git a/automation/roles/common/tasks/prometheus_agent.yaml b/automation/roles/common/tasks/prometheus_agent.yaml new file mode 100644 index 0000000..9fdfa43 --- /dev/null +++ b/automation/roles/common/tasks/prometheus_agent.yaml @@ -0,0 +1,42 @@ +- name: Download Prometheus agent + get_url: + url: "https://github.com/prometheus/prometheus/releases/download/v2.33.0/prometheus-2.33.0.linux-amd64.tar.gz" + dest: "/tmp/prometheus-2.33.0.linux-amd64.tar.gz" + +- name: Extract Prometheus agent + unarchive: + src: "/tmp/prometheus-2.33.0.linux-amd64.tar.gz" + dest: "/opt" + remote_src: yes + creates: "/opt/prometheus-2.33.0.linux-amd64" + become: true + +- name: Copy rollup shell file to remote server + ansible.builtin.template: + src: prometheus.yml.j2 + dest: "/opt/prometheus-2.33.0.linux-amd64/prometheus.yml" + owner: root + group: root + mode: '0755' + become: true + +- name: Copy systemd unit file for Prometheus agent + ansible.builtin.copy: + src: prometheus.service + dest: "/etc/systemd/system/prometheus.service" + owner: root + group: root + mode: '0644' + become: true + +- name: Reload systemd to apply new unit file + systemd: + daemon_reload: yes + become: true + +- name: Start and enable Prometheus service + systemd: + name: prometheus + state: started + enabled: yes + become: true diff --git a/automation/roles/common/tasks/swap.yaml b/automation/roles/common/tasks/swap.yaml new file mode 100644 index 0000000..57e6593 --- /dev/null +++ b/automation/roles/common/tasks/swap.yaml @@ -0,0 +1,52 @@ +- name: Create swap file + become: true + become_user: root + command: + dd if=/dev/zero of=/mnt/swapfile bs=1024 count={{ swap_mb }}k + creates="/mnt/swapfile" + +- name: Change swap file permissions + become: true + become_user: root + file: + path=/mnt/swapfile + owner=root + group=root + mode=0600 + +- name: Check swap file type + become: true + become_user: root + command: file /mnt/swapfile + register: swapfile + +- name: Make swap file + become: true + become_user: root + command: "sudo mkswap /mnt/swapfile" + when: swapfile.stdout.find('swap file') == -1 + +- name: Write swap entry in fstab + become: true + become_user: root + mount: + name=none + src=/mnt/swapfile + fstype=swap + opts=sw + passno=0 + dump=0 + state=present + +- name: swap check + become: true + become_user: root + ignore_errors: yes + shell: swapon -show | grep /mnt/swapfile + register: swap_check + +- name: Mount swap + become: true + become_user: root + command: "swapon /mnt/swapfile" + when: swap_check.rc != 0 diff --git a/automation/roles/common/tasks/tuner.yaml b/automation/roles/common/tasks/tuner.yaml new file mode 100644 index 0000000..6f0f1a2 --- /dev/null +++ b/automation/roles/common/tasks/tuner.yaml @@ -0,0 +1,50 @@ +- name: Set sysctl performance variables + become: true + become_user: root + shell: + # Note: this overwrite the file, if you want to append replace EOM with EOF + cmd: | + bash -c 'cat >> /etc/sysctl.conf <<- EOM + # set minimum, default, and maximum tcp buffer sizes (10k, 87.38k (linux default), 12M resp) + net.ipv4.tcp_rmem=10240 87380 12582912 + net.ipv4.tcp_wmem=10240 87380 12582912 + # Enable TCP westwood for kernels greater than or equal to 2.6.13 + net.ipv4.tcp_congestion_control=westwood + net.ipv4.tcp_fastopen=3 + net.ipv4.tcp_timestamps=0 + net.ipv4.tcp_sack=1 + net.ipv4.tcp_low_latency=1 + # Enable fast recycling TIME-WAIT sockets + # net.ipv4.tcp_tw_recycle = 1 this is in sovereign tuner, but fails, changing to below, see - https://djangocas.dev/blog/troubleshooting-tcp_tw_recycle-no-such-file-or-directory/ + net.ipv4.tcp_tw_reuse = 1 + # dont cache ssthresh from previous connection + net.ipv4.tcp_no_metrics_save = 1 + net.ipv4.tcp_moderate_rcvbuf = 1 + # kernel Tunes + kernel.timer_migration=0 + kernel.hung_task_timeout_secs=30 + # A suggested value for pid_max is 1024 * <# of cpu cores/threads in system> + kernel.pid_max=49152 + # vm.tuning + vm.swappiness=30 + vm.max_map_count=2000000 + vm.stat_interval=10 + vm.dirty_ratio=40 + vm.dirty_background_ratio=10 + vm.min_free_kbytes = 3000000 + vm.dirty_expire_centisecs=36000 + vm.dirty_writeback_centisecs=3000 + vm.dirtytime_expire_seconds=43200 + # sovereign systuner + net.core.rmem_max=134217728 + net.core.rmem_default=134217728 + net.core.wmem_max=134217728 + net.core.wmem_default=134217728 + EOM' + args: + executable: /bin/bash + +- name: Reload sysctl + become: true + become_user: root + shell: sysctl -p diff --git a/automation/roles/common/tasks/user.yaml b/automation/roles/common/tasks/user.yaml new file mode 100644 index 0000000..9e4ef0f --- /dev/null +++ b/automation/roles/common/tasks/user.yaml @@ -0,0 +1,31 @@ +- name: create sovereign group + become: true + become_user: root + group: + name: sovereign + state: present + +- name: create sovereign user + become: true + become_user: root + user: + name: sovereign + create_home: yes + groups: sovereign + shell: /bin/bash + +- name: Add ubuntu user to sovereign group + become: true + ansible.builtin.user: + name: ubuntu + groups: sovereign + append: yes + +- name: Ensure the /home/sovereign directory has sovereign group ownership + become: true + ansible.builtin.file: + path: /home/sovereign + owner: sovereign + group: sovereign + state: directory + recurse: yes diff --git a/automation/roles/common/templates/prometheus.yml.j2 b/automation/roles/common/templates/prometheus.yml.j2 new file mode 100644 index 0000000..95da5cb --- /dev/null +++ b/automation/roles/common/templates/prometheus.yml.j2 @@ -0,0 +1,26 @@ +global: + scrape_interval: 5s + external_labels: + monitor: '{{ aws_prometheus_monitoring_label }}' + +scrape_configs: + - job_name: 'prometheus' + static_configs: + - targets: ['localhost:9090'] + + - job_name: 'node_exporter' + scrape_interval: 5s + static_configs: + - targets: ['127.0.0.1:9100'] + + - job_name: 'rollup' + scrape_interval: 5s + static_configs: + - targets: ['127.0.0.1:9845'] + labels: + version: "v1" + +remote_write: + - url: '{{ aws_prometheus_remote_write_url }}' + sigv4: + region: '{{ aws_region }}' \ No newline at end of file diff --git a/automation/roles/data-availability/defaults/main.yaml b/automation/roles/data-availability/defaults/main.yaml new file mode 100644 index 0000000..fab291a --- /dev/null +++ b/automation/roles/data-availability/defaults/main.yaml @@ -0,0 +1,9 @@ +--- +# Supply a valid network +# testnet, mainnet +da_cluster: testnet + +da_org_name: "celestiaorg" +da_repo_name: "celestia-node" +da_repo_dir: "celestia-node" +da_store: "/mnt/da" \ No newline at end of file diff --git a/automation/roles/data-availability/defaults/mainnet/variables.yaml b/automation/roles/data-availability/defaults/mainnet/variables.yaml new file mode 100644 index 0000000..985a3ad --- /dev/null +++ b/automation/roles/data-availability/defaults/mainnet/variables.yaml @@ -0,0 +1,3 @@ +--- +version: "tags/v0.12.4" + diff --git a/automation/roles/data-availability/defaults/testnet/variables.yaml b/automation/roles/data-availability/defaults/testnet/variables.yaml new file mode 100644 index 0000000..4ae1210 --- /dev/null +++ b/automation/roles/data-availability/defaults/testnet/variables.yaml @@ -0,0 +1,25 @@ +--- +# Github tag or commit +da_version: "tags/v0.12.4" +# `core_ip` to pass for celestia light client +core_ip: "full.consensus.mocha-4.celestia-mocha.com" +# Celestia testnet to connect to +p2p_network: "mocha" + +# Key information. Refer to `Key Generation` section of the README +key_name: "sov005" +key_address_filename: "42aee5e3edc3a5373f042cd102de19705bc0545c.address" + +key_filename: "{{key_name}}.info" + +# Local path to celestia keys +key_info_path: "../.keys/{{ key_name }}/{{ key_filename }}" +key_address_path: "../.keys/{{ key_name }}/{{ key_address_filename }}" + +# Remote path. Does not need to be changed unless key management is different +keyring_path: "{{ da_store }}/keys/keyring-test" + +# Define this variable to prevent celestia from syncing from genesis +da_start_from: 1461058 +# RPC url to fetch the trusted blockhash from, since syncing from a specific height requires setting the start hash +celestia_rpc_url: "https://rpc.celestia-mocha.com" diff --git a/automation/roles/data-availability/tasks/catchup.yaml b/automation/roles/data-availability/tasks/catchup.yaml new file mode 100644 index 0000000..09a9c7d --- /dev/null +++ b/automation/roles/data-availability/tasks/catchup.yaml @@ -0,0 +1,29 @@ +- name: Get initial sync-state to obtain to_height + command: celestia header sync-state --node.store /mnt/da + register: initial_sync_state + become: true + become_user: sovereign + changed_when: false + +- name: Set to_height as a fact + set_fact: + to_height: "{{ (initial_sync_state.stdout | from_json).result.to_height }}" + +- name: Debug initial to_height value + debug: + msg: "Initial to_height is {{ to_height }}" + +- name: Loop until height is greater than to_height + command: celestia header sync-state --node.store /mnt/da + register: current_sync_state + become: true + become_user: sovereign + changed_when: false + until: (current_sync_state.stdout | from_json).result.height|int > to_height|int + retries: 120 + delay: 60 + ignore_errors: true + +- name: Debug final height value + debug: + msg: "height: {{ (current_sync_state.stdout | from_json).result.height }} is greater than to_height: {{ to_height }}" diff --git a/automation/roles/data-availability/tasks/celestia.yaml b/automation/roles/data-availability/tasks/celestia.yaml new file mode 100644 index 0000000..b9d9a9c --- /dev/null +++ b/automation/roles/data-availability/tasks/celestia.yaml @@ -0,0 +1,106 @@ +- name: Ensure celestia-node repo is at specific tag + git: + repo: 'https://github.com/{{ da_org_name }}/{{ da_repo_name }}.git' + dest: /home/sovereign/{{ da_repo_dir }} + version: "{{ da_version }}" + become: true + become_user: sovereign + +- name: celestia da folder + file: + path: "{{ da_store }}/data" + state: directory + owner: sovereign + group: sovereign + become: true + become_user: root + +- name: Build celestia-node + command: make build + args: + chdir: /home/sovereign/celestia-node + environment: + PATH: "/usr/local/go/bin:{{ ansible_env.PATH }}" + become: true + become_user: sovereign + +- name: Install celestia-node + command: make install + args: + chdir: /home/sovereign/celestia-node + become: true + become_user: root + +- name: Build cel-key + command: make cel-key + environment: + PATH: "/usr/local/go/bin:{{ ansible_env.PATH }}" + args: + chdir: /home/sovereign/celestia-node + become: true + become_user: sovereign + +- name: Install cel-key + command: cp cel-key /usr/local/bin/ + args: + chdir: /home/sovereign/celestia-node + become: true + become_user: root + +- name: Ensure keyring directory exists + ansible.builtin.file: + path: "{{ keyring_path }}" + state: directory + owner: sovereign + group: sovereign + mode: '0755' + become: true + +- name: Copy key info file to target directory + ansible.builtin.copy: + src: "{{ key_info_path }}" + dest: "{{ keyring_path }}/{{ key_filename }}" + owner: sovereign + group: sovereign + mode: '0644' + become: true + +- name: Copy key address file to target directory + ansible.builtin.copy: + src: "{{ key_address_path }}" + dest: "{{ keyring_path }}/{{ key_address_filename }}" + owner: sovereign + group: sovereign + mode: '0644' + become: true + +- name: Copy configuration file to remote server + ansible.builtin.template: + src: config.toml.j2 + dest: "{{ da_store }}/config.toml" + owner: sovereign + group: sovereign + mode: '0644' + become: true + +- name: Render celestia-lightd systemd service file + ansible.builtin.template: + src: celestia-lightd.service.j2 + dest: /etc/systemd/system/celestia-lightd.service + owner: root + group: root + mode: '0644' + become: true + +- name: Reload systemd to recognize celestia-lightd service + ansible.builtin.systemd: + daemon_reload: yes + become: true + +- name: Start celestia-lightd service + ansible.builtin.systemd: + name: celestia-lightd + state: started + enabled: yes + become: true + diff --git a/automation/roles/data-availability/tasks/go.yaml b/automation/roles/data-availability/tasks/go.yaml new file mode 100644 index 0000000..534dc5f --- /dev/null +++ b/automation/roles/data-availability/tasks/go.yaml @@ -0,0 +1,51 @@ +- name: Set Go version variable + set_fact: + go_version: "1.21.1" + +- name: Check if Go is installed + become: true + shell: go version + environment: + PATH: "/usr/local/go/bin:{{ ansible_env.PATH }}" + register: go_exists + ignore_errors: yes + +- name: Download Go tarball + become: true + get_url: + url: "https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz" + dest: "/tmp/go{{ go_version }}.linux-amd64.tar.gz" + mode: '0755' + when: go_exists is failed + +- name: Remove existing Go installation + become: true + file: + path: /usr/local/go + state: absent + when: go_exists is failed + +- name: Extract Go tarball + become: true + unarchive: + src: "/tmp/go{{ go_version }}.linux-amd64.tar.gz" + dest: /usr/local + creates: "/usr/local/go/bin/go" + remote_src: yes + when: go_exists is failed + +- name: Remove Go tarball + become: true + file: + path: "/tmp/go{{ go_version }}.linux-amd64.tar.gz" + state: absent + when: go_exists is failed + +- name: Ensure Go is available for the sovereign user + lineinfile: + path: /home/sovereign/.bashrc + line: 'export PATH=$PATH:/usr/local/go/bin' + create: yes + become: true + become_user: sovereign + diff --git a/automation/roles/data-availability/tasks/main.yaml b/automation/roles/data-availability/tasks/main.yaml new file mode 100644 index 0000000..a51fa5c --- /dev/null +++ b/automation/roles/data-availability/tasks/main.yaml @@ -0,0 +1,19 @@ +- include_vars: "../defaults/{{ da_cluster }}/variables.yaml" + +- name: Check if celestia-lightd service is running + ansible.builtin.systemd: + name: celestia-lightd + register: celestia_service + ignore_errors: true + become: true + +- name: install go + import_tasks: go.yaml + when: celestia_service.status.ActiveState != "active" + +- name: build celestia + import_tasks: celestia.yaml + when: celestia_service.status.ActiveState != "active" + +- name: catching up + import_tasks: catchup.yaml \ No newline at end of file diff --git a/automation/roles/data-availability/templates/celestia-lightd.service.j2 b/automation/roles/data-availability/templates/celestia-lightd.service.j2 new file mode 100644 index 0000000..a7dab44 --- /dev/null +++ b/automation/roles/data-availability/templates/celestia-lightd.service.j2 @@ -0,0 +1,13 @@ +[Unit] +Description=celestia-lightd light node +After=network-online.target + +[Service] +User=sovereign +ExecStart=/usr/local/bin/celestia light start --core.ip {{ core_ip }} --p2p.network {{ p2p_network }} --node.store {{ da_store }} --keyring.backend test --keyring.accname {{ key_name }} {% if da_start_from is defined %} --headers.trusted-hash {{ da_trusted_hash }} +{% endif %} +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=multi-user.target diff --git a/automation/roles/data-availability/templates/config.toml.j2 b/automation/roles/data-availability/templates/config.toml.j2 new file mode 100644 index 0000000..7cbb57c --- /dev/null +++ b/automation/roles/data-availability/templates/config.toml.j2 @@ -0,0 +1,92 @@ +[Node] + StartupTimeout = "20s" + ShutdownTimeout = "20s" + +[Core] + IP = "" + RPCPort = "26657" + GRPCPort = "9090" + +[State] + KeyringAccName = "" + KeyringBackend = "test" + +[P2P] + ListenAddresses = ["/ip4/0.0.0.0/udp/2121/quic-v1/webtransport", "/ip6/::/udp/2121/quic-v1/webtransport", "/ip4/0.0.0.0/udp/2121/quic-v1", "/ip6/::/udp/2121/quic-v1", "/ip4/0.0.0.0/tcp/2121", "/ip6/::/tcp/2121"] + AnnounceAddresses = [] + NoAnnounceAddresses = ["/ip4/127.0.0.1/udp/2121/quic-v1/webtransport", "/ip4/0.0.0.0/udp/2121/quic-v1/webtransport", "/ip6/::/udp/2121/quic-v1/webtransport", "/ip4/0.0.0.0/udp/2121/quic-v1", "/ip4/127.0.0.1/udp/2121/quic-v1", "/ip6/::/udp/2121/quic-v1", "/ip4/0.0.0.0/tcp/2121", "/ip4/127.0.0.1/tcp/2121", "/ip6/::/tcp/2121"] + MutualPeers = [] + PeerExchange = false + RoutingTableRefreshPeriod = "1m0s" + [P2P.ConnManager] + Low = 50 + High = 100 + GracePeriod = "1m0s" + +[RPC] + Address = "localhost" + Port = "26658" + +[Gateway] + Address = "localhost" + Port = "26659" + Enabled = false + +[Share] + UseShareExchange = true + [Share.EDSStoreParams] + GCInterval = "0s" + RecentBlocksCacheSize = 10 + BlockstoreCacheSize = 128 + [Share.ShrExEDSParams] + ServerReadTimeout = "5s" + ServerWriteTimeout = "1m0s" + HandleRequestTimeout = "1m0s" + ConcurrencyLimit = 10 + BufferSize = 32768 + [Share.ShrExNDParams] + ServerReadTimeout = "5s" + ServerWriteTimeout = "1m0s" + HandleRequestTimeout = "1m0s" + ConcurrencyLimit = 10 + [Share.PeerManagerParams] + PoolValidationTimeout = "2m0s" + PeerCooldown = "3s" + GcInterval = "30s" + EnableBlackListing = false + [Share.LightAvailability] + SampleAmount = 16 + [Share.Discovery] + PeersLimit = 5 + AdvertiseInterval = "1h0m0s" + +[Header] + TrustedHash = "" + TrustedPeers = [] + [Header.Store] + StoreCacheSize = 512 + IndexCacheSize = 2048 + WriteBatchSize = 512 + [Header.Syncer] + TrustingPeriod = "336h0m0s" + [Header.Server] + WriteDeadline = "8s" + ReadDeadline = "1m0s" + RangeRequestTimeout = "10s" + [Header.Client] + MaxHeadersPerRangeRequest = 64 + RangeRequestTimeout = "8s" + +[DASer] + SamplingRange = 100 + ConcurrencyLimit = 16 + BackgroundStoreInterval = "10m0s" + SampleFrom = {{ da_start_from | default(1) }} + SampleTimeout = "2m40s" + SamplingWindow = "0s" + +[instrumentation] + prometheus = true + prometheus_listen_addr = ":26660" + max_open_connections = 3 + namespace = "celestia" diff --git a/automation/roles/rollup/defaults/main.yaml b/automation/roles/rollup/defaults/main.yaml new file mode 100644 index 0000000..48658dc --- /dev/null +++ b/automation/roles/rollup/defaults/main.yaml @@ -0,0 +1,20 @@ +--- +# Supply a valid network +# testnet, mainnet +cluster: testnet + +# Github organization name +rollup_org_name: "Sovereign-Labs" +# Github repository name +rollup_repo_name: "sov-rollup-starter-wip" +# Local directory to clone the github repo into +rollup_repo_dir: "sov-rollup-starter-wip" +# Rollup binary name. Default is `node` +rollup_bin: "node" +# Feature for the DA adapter. Default is `celestia-da` +da_feature: "celestia_da" +# Folder on the remote machine that has the genesis configuration +genesis_folder: "/home/sovereign/genesis" +rollup_log_dir: "/mnt/logs" +# Set to true or override from commandline to wipe the directory +wipe: false \ No newline at end of file diff --git a/automation/roles/rollup/defaults/mainnet/variables.yaml b/automation/roles/rollup/defaults/mainnet/variables.yaml new file mode 100644 index 0000000..0416626 --- /dev/null +++ b/automation/roles/rollup/defaults/mainnet/variables.yaml @@ -0,0 +1,3 @@ +--- +commit_hash: "6188c8aca7d73c7965871badfe3cb1174695374c" + diff --git a/automation/roles/rollup/defaults/testnet/variables.yaml b/automation/roles/rollup/defaults/testnet/variables.yaml new file mode 100644 index 0000000..f3e2175 --- /dev/null +++ b/automation/roles/rollup/defaults/testnet/variables.yaml @@ -0,0 +1,15 @@ +--- +# git commit hash for the sovereign rollup repository (sov-rollup-starter) (check rollup/defaults/main.yaml for repo org and name) +rollup_commit_hash: "158c7eb62d717fb8061dde0bafa17dd8ec710f9b" +# DA namespace to post transaction blobs to. [NOTE: Length cannot change. TODO: add a check for this] +rollup_namespace_prefix: "sov-roll05" +# DA namespace to post proof blobs to. [NOTE: Length cannot change. TODO: add a check for this] +rollup_proof_namespace_prefix: "sov-prov05" +# The DA address for sequencer +sequencer_self_da_address: "celestia1g2hwtcldcwjnw0cy9ngs9hsewpduq4zuehqlqh" +# The DA address for genesis +sequencer_genesis_da_address: "celestia1g2hwtcldcwjnw0cy9ngs9hsewpduq4zuehqlqh" +# The rollup address for genesis +sequencer_genesis_rollup_address: "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94" +# Rollup start height +rollup_da_start_height: 1461258 diff --git a/automation/roles/rollup/files/celestia_genesis/accounts.json b/automation/roles/rollup/files/celestia_genesis/accounts.json new file mode 100644 index 0000000..9ccf93c --- /dev/null +++ b/automation/roles/rollup/files/celestia_genesis/accounts.json @@ -0,0 +1,3 @@ +{ + "pub_keys": [] +} \ No newline at end of file diff --git a/automation/roles/rollup/files/celestia_genesis/bank.json b/automation/roles/rollup/files/celestia_genesis/bank.json new file mode 100644 index 0000000..1d679c5 --- /dev/null +++ b/automation/roles/rollup/files/celestia_genesis/bank.json @@ -0,0 +1,26 @@ +{ + "tokens": [ + { + "token_name": "sov-token", + "token_address": "sov1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0xu3qn", + "address_and_balances": [ + [ + "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94", + 100000000 + ], + [ + "sov15vspj48hpttzyvxu8kzq5klhvaczcpyxn6z6k0hwpwtzs4a6wkvqwr57gc", + 1000000 + ], + [ + "sov1dnhqk4mdsj2kwv4xymt8a624xuahfx8906j9usdkx7ensfghndkq8p33f7", + 1000000 + ] + ], + "authorized_minters": [ + "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94" + ], + "salt": 0 + } + ] +} diff --git a/automation/roles/rollup/files/celestia_genesis/chain_state.json b/automation/roles/rollup/files/celestia_genesis/chain_state.json new file mode 100644 index 0000000..95154da --- /dev/null +++ b/automation/roles/rollup/files/celestia_genesis/chain_state.json @@ -0,0 +1,16 @@ +{ + "current_time": { + "secs": 0, + "nanos": 0 + }, + "gas_price_blocks_depth": 10, + "gas_price_maximum_elasticity": 5, + "initial_gas_price": [ + 0, + 0 + ], + "minimum_gas_price": [ + 0, + 0 + ] +} diff --git a/automation/roles/rollup/files/rollup.service b/automation/roles/rollup/files/rollup.service new file mode 100644 index 0000000..e8bd3b3 --- /dev/null +++ b/automation/roles/rollup/files/rollup.service @@ -0,0 +1,17 @@ +[Unit] +Description=Rollup +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +User=sovereign +LimitNOFILE=1000000 +LogRateLimitIntervalSec=0 +Environment="PATH=/home/sovereign/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/snap/bin:/home/sovereign/.local/bin/:/home/sovereign/.local/bin/:/home/sovereign/.local/bin/" +ExecStart=/home/sovereign/rollup.sh + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/automation/roles/rollup/tasks/build.yaml b/automation/roles/rollup/tasks/build.yaml new file mode 100644 index 0000000..6739acf --- /dev/null +++ b/automation/roles/rollup/tasks/build.yaml @@ -0,0 +1,22 @@ +- name: Build sovereign rollup binary + become: true + become_user: ubuntu + shell: source /home/ubuntu/.cargo/env && cargo build --release --bin {{rollup_bin}} --no-default-features --features {{da_feature}} + args: + chdir: /home/ubuntu/{{ rollup_repo_dir }} + executable: /bin/bash + +- name: Copy node binary to sovereign's home directory on remote + ansible.builtin.shell: + cmd: cp /home/ubuntu/{{ rollup_repo_dir }}/target/release/node /home/sovereign/node + become: true + become_user: root + +- name: Set owner, group, and permissions on the node binary + ansible.builtin.file: + path: /home/sovereign/node + owner: sovereign + group: sovereign + mode: '0755' + become: true + become_user: root \ No newline at end of file diff --git a/automation/roles/rollup/tasks/celestia_adapter.yaml b/automation/roles/rollup/tasks/celestia_adapter.yaml new file mode 100644 index 0000000..4e88b6c --- /dev/null +++ b/automation/roles/rollup/tasks/celestia_adapter.yaml @@ -0,0 +1,37 @@ +- name: Celestia authenticate + become: true + become_user: sovereign + ansible.builtin.command: + cmd: "celestia light auth admin --node.store /mnt/da --p2p.network {{p2p_network}}" + register: command_output + +- name: Get key address from JSON output + become: true + become_user: sovereign + ansible.builtin.command: + cmd: "cel-key list --keyring-dir /mnt/da/keys/ --output json" + register: key_list_output + changed_when: false + +- name: Parse JSON and extract address + ansible.builtin.set_fact: + key_address: "{{ (key_list_output.stdout | from_json)[0].address }}" + +- name: Render sequencer config with address + become: true + become_user: sovereign + ansible.builtin.template: + src: "sequencer_registry.json.j2" + dest: "{{genesis_folder}}/sequencer_registry.json" + vars: + sequencer_da_address: "{{ sequencer_genesis_address }}" + +- name: Render config with auth + become: true + become_user: sovereign + ansible.builtin.template: + src: "celestia_rollup_config.toml.j2" + dest: "/home/sovereign/rollup_config.toml" + vars: + celestia_auth_token: "{{ command_output.stdout }}" + sequencer_self_address: "{{ key_address }}" diff --git a/automation/roles/rollup/tasks/genesis.yaml b/automation/roles/rollup/tasks/genesis.yaml new file mode 100644 index 0000000..d507b11 --- /dev/null +++ b/automation/roles/rollup/tasks/genesis.yaml @@ -0,0 +1,17 @@ +- name: Genesis folder + file: + path: /home/sovereign/genesis + state: directory + owner: sovereign + group: sovereign + become: true + become_user: root + +- name: Synchronize genesis folder to remote + ansible.builtin.synchronize: + src: "{{ role_path }}/files/celestia_genesis/" + dest: "{{ genesis_folder }}" + delete: no + recursive: yes + become: true + become_user: sovereign \ No newline at end of file diff --git a/automation/roles/rollup/tasks/git.yaml b/automation/roles/rollup/tasks/git.yaml new file mode 100644 index 0000000..15b025f --- /dev/null +++ b/automation/roles/rollup/tasks/git.yaml @@ -0,0 +1,9 @@ +- name: Checkout repo to + become: true + become_user: ubuntu + git: + repo: "git@github.com:/{{ rollup_org_name }}/{{ rollup_repo_name }}.git" + dest: "/home/ubuntu/{{ rollup_repo_dir }}" + version: "{{ rollup_commit_hash }}" + accept_hostkey: yes + force: yes diff --git a/automation/roles/rollup/tasks/main.yaml b/automation/roles/rollup/tasks/main.yaml new file mode 100644 index 0000000..e0b9413 --- /dev/null +++ b/automation/roles/rollup/tasks/main.yaml @@ -0,0 +1,23 @@ +- include_vars: "../defaults/{{ cluster }}/variables.yaml" +- include_vars: "../../data-availability/defaults/{{ cluster }}/variables.yaml" + +- name: git update + import_tasks: git.yaml + +- name: genesis + import_tasks: genesis.yaml + +- name: celestia adapter setup + include_tasks: celestia_adapter.yaml + +- name: namespace setup + include_tasks: namespace.yaml + +- name: rollup service + include_tasks: service_stop.yaml + +- name: build rollup binary + include_tasks: build.yaml + +- name: rollup service + include_tasks: service.yaml diff --git a/automation/roles/rollup/tasks/namespace.yaml b/automation/roles/rollup/tasks/namespace.yaml new file mode 100644 index 0000000..e87e442 --- /dev/null +++ b/automation/roles/rollup/tasks/namespace.yaml @@ -0,0 +1,17 @@ +- name: Replace namespace address in Rust file + become: true + become_user: ubuntu + ansible.builtin.replace: + path: "/home/ubuntu/{{rollup_repo_dir}}/crates/rollup/src/celestia_rollup.rs" + regexp: 'const ROLLUP_NAMESPACE.*' + replace: 'const ROLLUP_NAMESPACE: Namespace = Namespace::const_v0(*b"{{ rollup_namespace_prefix }}");' + backup: no + +- name: Replace proof namespace address in Rust file + become: true + become_user: ubuntu + ansible.builtin.replace: + path: "/home/ubuntu/{{rollup_repo_dir}}/crates/rollup/src/celestia_rollup.rs" + regexp: 'const ROLLUP_PROOF_NAMESPACE.*' + replace: 'const ROLLUP_PROOF_NAMESPACE: Namespace = Namespace::const_v0(*b"{{ rollup_proof_namespace_prefix }}");' + backup: no \ No newline at end of file diff --git a/automation/roles/rollup/tasks/service.yaml b/automation/roles/rollup/tasks/service.yaml new file mode 100644 index 0000000..5750ed6 --- /dev/null +++ b/automation/roles/rollup/tasks/service.yaml @@ -0,0 +1,50 @@ +- name: Copy service file to remote server + ansible.builtin.copy: + src: rollup.service + dest: /etc/systemd/system/rollup.service + owner: root + group: root + mode: '0644' + become: true + +- name: Copy rollup shell file to remote server + ansible.builtin.template: + src: rollup.sh.j2 + dest: /home/sovereign/rollup.sh + owner: sovereign + group: sovereign + mode: '0755' + become: true + +- name: Stop rollup service + ansible.builtin.systemd: + name: rollup + state: stopped + become: true + +- name: Find files and directories in specified directory to wipe + ansible.builtin.find: + paths: "/mnt/rollup" + file_type: any + register: files_to_wipe + when: wipe | bool + +- name: Remove all files and directories in specified directory + ansible.builtin.file: + path: "{{ item.path }}" + state: absent + loop: "{{ files_to_wipe.files }}" + when: wipe | bool and files_to_wipe.matched > 0 + become: true + +- name: Reload systemd to recognize rollup service + ansible.builtin.systemd: + daemon_reload: yes + become: true + +- name: Start rollup service + ansible.builtin.systemd: + name: rollup + state: started + enabled: yes + become: true \ No newline at end of file diff --git a/automation/roles/rollup/tasks/service_stop.yaml b/automation/roles/rollup/tasks/service_stop.yaml new file mode 100644 index 0000000..ce6d09e --- /dev/null +++ b/automation/roles/rollup/tasks/service_stop.yaml @@ -0,0 +1,6 @@ +- name: Stop rollup service if it exists + ansible.builtin.systemd: + name: rollup + state: stopped + become: true + ignore_errors: true diff --git a/automation/roles/rollup/templates/celestia_rollup_config.toml.j2 b/automation/roles/rollup/templates/celestia_rollup_config.toml.j2 new file mode 100644 index 0000000..558161c --- /dev/null +++ b/automation/roles/rollup/templates/celestia_rollup_config.toml.j2 @@ -0,0 +1,29 @@ +[da] +# The JWT used to authenticate with the celestia light client. Instructions for generating this token can be found in the README +celestia_rpc_auth_token = "{{ celestia_auth_token }}" +# The address of the *trusted* Celestia light client to interact with +celestia_rpc_address = "http://127.0.0.1:26658" +# The largest response the rollup will accept from the Celestia node. Defaults to 100 MB +max_celestia_response_body_size = 104_857_600 +# The maximum time to wait for a response to an RPC query against Celestia node. Defaults to 60 seconds. +celestia_rpc_timeout_seconds = 60 +# Address of this sequencer. Should match address of connected bridge/full node. +own_celestia_address = "{{ sequencer_self_da_address }}" + +[storage] +# The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. +path = "/mnt/rollup" + +# We define the rollup's genesis to occur at block number `start_height`. The rollup will ignore +# any blocks before this height +[runner] +genesis_height = {{ rollup_da_start_height }} +da_polling_interval_ms = 100 + +[runner.rpc_config] +# the host and port to bind the rpc server for +bind_host = "0.0.0.0" +bind_port = 12345 + +[prover_service] +aggregated_proof_block_jump = 1 diff --git a/automation/roles/rollup/templates/rollup.sh.j2 b/automation/roles/rollup/templates/rollup.sh.j2 new file mode 100644 index 0000000..876ece8 --- /dev/null +++ b/automation/roles/rollup/templates/rollup.sh.j2 @@ -0,0 +1,2 @@ +#!/bin/bash +/home/sovereign/node --rollup-config-path /home/sovereign/rollup_config.toml --genesis-paths /home/sovereign/genesis --kernel-genesis-paths /home/sovereign/genesis/chain_state.json --log-dir {{ rollup_log_dir }} \ No newline at end of file diff --git a/automation/roles/rollup/templates/sequencer_registry.json.j2 b/automation/roles/rollup/templates/sequencer_registry.json.j2 new file mode 100644 index 0000000..42617fb --- /dev/null +++ b/automation/roles/rollup/templates/sequencer_registry.json.j2 @@ -0,0 +1,9 @@ +{ + "seq_rollup_address": "{{ sequencer_genesis_rollup_address}}", + "seq_da_address": "{{ sequencer_genesis_da_address }}", + "coins_to_lock": { + "amount": 50, + "token_address": "sov1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0xu3qn" + }, + "is_preferred_sequencer": true +} \ No newline at end of file diff --git a/automation/scripts/python/da_rpc_queries.py b/automation/scripts/python/da_rpc_queries.py new file mode 100644 index 0000000..7b16a0d --- /dev/null +++ b/automation/scripts/python/da_rpc_queries.py @@ -0,0 +1,54 @@ +import urllib.request +import urllib.parse +import json +import sys + +HEIGHT_QUERY = "{}/block?height={}" +STATUS_QUERY = "{}/status?" + +def get_block_hash(rpc_url, height): + url = HEIGHT_QUERY.format(rpc_url, height) + try: + with urllib.request.urlopen(url) as response: + if response.status == 200: + data = json.loads(response.read().decode()) + block_hash = data.get("result", {}).get("block_id", {}).get("hash", "Hash not found") + print(block_hash) + else: + print(f"Failed to retrieve data, status code: {response.status}") + except urllib.error.URLError as e: + print(f"Error fetching data: {e}") + +def get_latest_height(rpc_url): + url = STATUS_QUERY.format(rpc_url) + try: + with urllib.request.urlopen(url) as response: + if response.status == 200: + data = json.loads(response.read().decode()) + latest_height = data.get("result", {}).get("sync_info", {}).get("latest_block_height", "Height not found") + print(latest_height) + else: + print(f"Failed to retrieve data, status code: {response.status}") + except urllib.error.URLError as e: + print(f"Error fetching data: {e}") + +if __name__ == "__main__": + if len(sys.argv) < 3: + print("Usage:") + print("script.py get_hash ") + print("script.py get_latest_height ") + sys.exit(1) + + mode = sys.argv[1] + + if mode == "get_hash" and len(sys.argv) == 4: + _, _, rpc_url, height = sys.argv + get_block_hash(rpc_url, height) + elif mode == "get_latest_height" and len(sys.argv) == 3: + _, _, rpc_url = sys.argv + get_latest_height(rpc_url) + else: + print("Invalid usage.") + print("For block hash: script.py get_hash ") + print("For latest height: script.py get_latest_height ") + sys.exit(1) diff --git a/automation/setup.yaml b/automation/setup.yaml new file mode 100644 index 0000000..dcff7c3 --- /dev/null +++ b/automation/setup.yaml @@ -0,0 +1,15 @@ +--- +- name: "Playbook Runner" + hosts: all + vars: + switches: "" + wipe: false + pre_tasks: + - import_tasks: preconditions.yaml + roles: + - role: "./roles/common" + when: "'c' in switches" + - role: "./roles/data-availability" + when: "'d' in switches" + - role: "./roles/rollup" + when: "'r' in switches" diff --git a/celestia_rollup_config.toml b/celestia_rollup_config.toml index dfb5387..d52b1c2 100644 --- a/celestia_rollup_config.toml +++ b/celestia_rollup_config.toml @@ -1,12 +1,14 @@ [da] # The JWT used to authenticate with the celestia light client. Instructions for generating this token can be found in the README -celestia_rpc_auth_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiLCJhZG1pbiJdfQ.Qysvnw7v_rFxyvX-5G4PFK9AiUAgYjteITxHfRtjycM" +celestia_rpc_auth_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJwdWJsaWMiLCJyZWFkIiwid3JpdGUiLCJhZG1pbiJdfQ.ZZdR4NKBi7tZ_7iTm25PGtEfW27-oxzD6kIjEAf3sj0" # The address of the *trusted* Celestia light client to interact with celestia_rpc_address = "http://127.0.0.1:26658" # The largest response the rollup will accept from the Celestia node. Defaults to 100 MB max_celestia_response_body_size = 104_857_600 # The maximum time to wait for a response to an RPC query against Celestia node. Defaults to 60 seconds. celestia_rpc_timeout_seconds = 60 +# Address of this sequencer. Should match address of connected bridge/full node. +own_celestia_address = "celestia1a68m2l85zn5xh0l07clk4rfvnezhywc53g8x7s" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. diff --git a/crates/provers/risc0/guest-celestia/Cargo.lock b/crates/provers/risc0/guest-celestia/Cargo.lock index f110d0f..1328659 100644 --- a/crates/provers/risc0/guest-celestia/Cargo.lock +++ b/crates/provers/risc0/guest-celestia/Cargo.lock @@ -17,9 +17,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -36,9 +36,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "ark-bn254" @@ -81,7 +81,7 @@ dependencies = [ "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", - "itertools 0.10.5", + "itertools", "num-traits", "zeroize", ] @@ -116,7 +116,7 @@ dependencies = [ "ark-std 0.4.0", "derivative", "digest 0.10.7", - "itertools 0.10.5", + "itertools", "num-bigint", "num-traits", "paste", @@ -288,13 +288,13 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -305,7 +305,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -359,9 +359,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -386,9 +386,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", @@ -475,22 +475,22 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -687,7 +687,7 @@ source = "git+https://github.com/risc0/curve25519-dalek?tag=curve25519-4.1.0-ris dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -798,7 +798,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -871,7 +871,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -919,9 +919,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "fixed-hash" @@ -1092,8 +1092,8 @@ dependencies = [ [[package]] name = "ibc-app-transfer" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-app-transfer-types", "ibc-core", @@ -1102,8 +1102,8 @@ dependencies = [ [[package]] name = "ibc-app-transfer-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1118,8 +1118,8 @@ dependencies = [ [[package]] name = "ibc-client-tendermint" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "ibc-client-tendermint-types", @@ -1135,8 +1135,8 @@ dependencies = [ [[package]] name = "ibc-client-tendermint-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "displaydoc", "ibc-core-client-types", @@ -1152,8 +1152,8 @@ dependencies = [ [[package]] name = "ibc-core" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -1168,8 +1168,8 @@ dependencies = [ [[package]] name = "ibc-core-channel" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel-types", "ibc-core-client", @@ -1183,8 +1183,8 @@ dependencies = [ [[package]] name = "ibc-core-channel-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1204,8 +1204,8 @@ dependencies = [ [[package]] name = "ibc-core-client" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-client-context", "ibc-core-client-types", @@ -1217,8 +1217,8 @@ dependencies = [ [[package]] name = "ibc-core-client-context" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -1233,8 +1233,8 @@ dependencies = [ [[package]] name = "ibc-core-client-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1251,8 +1251,8 @@ dependencies = [ [[package]] name = "ibc-core-commitment-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1267,8 +1267,8 @@ dependencies = [ [[package]] name = "ibc-core-connection" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-client", "ibc-core-connection-types", @@ -1279,8 +1279,8 @@ dependencies = [ [[package]] name = "ibc-core-connection-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1298,8 +1298,8 @@ dependencies = [ [[package]] name = "ibc-core-handler" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -1313,8 +1313,8 @@ dependencies = [ [[package]] name = "ibc-core-handler-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1335,8 +1335,8 @@ dependencies = [ [[package]] name = "ibc-core-host" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -1353,8 +1353,8 @@ dependencies = [ [[package]] name = "ibc-core-host-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1366,8 +1366,8 @@ dependencies = [ [[package]] name = "ibc-core-router" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -1380,8 +1380,8 @@ dependencies = [ [[package]] name = "ibc-core-router-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1398,17 +1398,17 @@ dependencies = [ [[package]] name = "ibc-derive" version = "0.6.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "ibc-primitives" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1423,8 +1423,9 @@ dependencies = [ [[package]] name = "ibc-proto" -version = "0.41.0" -source = "git+https://github.com/cosmos/ibc-proto-rs.git?rev=a1877a5#a1877a5b78626f7f468cf5d14ff79ae5eef068ef" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a6f2bbf7e1d12f98d8d54d9114231b865418d0f8b619c0873180eafdee07fd" dependencies = [ "base64", "borsh", @@ -1534,15 +1535,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.10" @@ -1560,7 +1552,7 @@ dependencies = [ "hashbrown 0.13.2", "hex", "ics23", - "itertools 0.10.5", + "itertools", "mirai-annotations", "num-derive 0.3.3", "num-traits", @@ -1713,7 +1705,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1851,7 +1843,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1921,9 +1913,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -1962,7 +1954,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", "heck", - "itertools 0.11.0", + "itertools", "log", "multimap", "once_cell", @@ -1971,7 +1963,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.52", + "syn 2.0.53", "tempfile", "which", ] @@ -1983,10 +1975,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2234,9 +2226,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b1d9521f889713d1221270fdd63370feca7e5c71a18745343402fa86e4f04f" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -2288,9 +2280,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ "bitflags", "errno", @@ -2403,7 +2395,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2436,7 +2428,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2556,7 +2548,7 @@ dependencies = [ [[package]] name = "sov-celestia-client" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "derive_more", "ibc-client-tendermint", @@ -2573,7 +2565,7 @@ dependencies = [ [[package]] name = "sov-celestia-client-types" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "base64", "bytes", @@ -2581,10 +2573,10 @@ dependencies = [ "hex", "ibc-client-tendermint", "ibc-core", - "ibc-proto", "ics23", "prost", "serde", + "sov-ibc-proto", "tendermint 0.34.1", "tendermint-light-client-verifier", "tendermint-proto 0.34.1", @@ -2624,7 +2616,7 @@ dependencies = [ [[package]] name = "sov-ibc" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "ahash", "anyhow", @@ -2639,7 +2631,6 @@ dependencies = [ "serde_json", "sha2 0.10.8", "sov-celestia-client", - "sov-chain-state", "sov-ibc-transfer", "sov-modules-api", "sov-rollup-interface", @@ -2649,10 +2640,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "sov-ibc-proto" +version = "0.1.0" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" +dependencies = [ + "ibc-proto", + "informalsystems-pbjson", + "prost", + "serde", + "tendermint-proto 0.34.1", +] + [[package]] name = "sov-ibc-transfer" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "anyhow", "base64", @@ -2669,6 +2672,10 @@ dependencies = [ "uint", ] +[[package]] +name = "sov-metrics" +version = "0.3.0" + [[package]] name = "sov-mock-da" version = "0.3.0" @@ -2782,6 +2789,7 @@ dependencies = [ "async-trait", "borsh", "bytes", + "derivative", "digest 0.10.7", "futures", "hex", @@ -2833,6 +2841,7 @@ dependencies = [ "num_cpus", "serde", "serde_json", + "sov-metrics", "sov-rollup-interface", ] @@ -2908,9 +2917,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -3055,22 +3064,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3146,7 +3155,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3255,7 +3264,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -3289,7 +3298,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3322,7 +3331,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3448,7 +3457,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3468,5 +3477,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] diff --git a/crates/provers/risc0/guest-mock/Cargo.lock b/crates/provers/risc0/guest-mock/Cargo.lock index e0fa617..334b03c 100644 --- a/crates/provers/risc0/guest-mock/Cargo.lock +++ b/crates/provers/risc0/guest-mock/Cargo.lock @@ -17,9 +17,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "ark-bn254" @@ -209,13 +209,13 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -263,9 +263,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -290,9 +290,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", @@ -373,22 +373,22 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -497,7 +497,7 @@ source = "git+https://github.com/risc0/curve25519-dalek?tag=curve25519-4.1.0-ris dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -582,7 +582,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -664,9 +664,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "fixed-hash" @@ -833,8 +833,8 @@ dependencies = [ [[package]] name = "ibc-app-transfer" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-app-transfer-types", "ibc-core", @@ -843,8 +843,8 @@ dependencies = [ [[package]] name = "ibc-app-transfer-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -859,8 +859,8 @@ dependencies = [ [[package]] name = "ibc-client-tendermint" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "ibc-client-tendermint-types", @@ -876,8 +876,8 @@ dependencies = [ [[package]] name = "ibc-client-tendermint-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "displaydoc", "ibc-core-client-types", @@ -893,8 +893,8 @@ dependencies = [ [[package]] name = "ibc-core" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -909,8 +909,8 @@ dependencies = [ [[package]] name = "ibc-core-channel" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel-types", "ibc-core-client", @@ -924,8 +924,8 @@ dependencies = [ [[package]] name = "ibc-core-channel-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -945,8 +945,8 @@ dependencies = [ [[package]] name = "ibc-core-client" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-client-context", "ibc-core-client-types", @@ -958,8 +958,8 @@ dependencies = [ [[package]] name = "ibc-core-client-context" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -974,8 +974,8 @@ dependencies = [ [[package]] name = "ibc-core-client-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -992,8 +992,8 @@ dependencies = [ [[package]] name = "ibc-core-commitment-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1008,8 +1008,8 @@ dependencies = [ [[package]] name = "ibc-core-connection" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-client", "ibc-core-connection-types", @@ -1020,8 +1020,8 @@ dependencies = [ [[package]] name = "ibc-core-connection-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1039,8 +1039,8 @@ dependencies = [ [[package]] name = "ibc-core-handler" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -1054,8 +1054,8 @@ dependencies = [ [[package]] name = "ibc-core-handler-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1076,8 +1076,8 @@ dependencies = [ [[package]] name = "ibc-core-host" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -1094,8 +1094,8 @@ dependencies = [ [[package]] name = "ibc-core-host-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1107,8 +1107,8 @@ dependencies = [ [[package]] name = "ibc-core-router" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "derive_more", "displaydoc", @@ -1121,8 +1121,8 @@ dependencies = [ [[package]] name = "ibc-core-router-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1139,17 +1139,17 @@ dependencies = [ [[package]] name = "ibc-derive" version = "0.6.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] name = "ibc-primitives" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=bcd808832e#bcd808832ed11af340f9a8b24f89bef07c4f125a" +version = "0.51.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=984f5cd#984f5cdb4110123b1227f09637f6e2e0f12669d2" dependencies = [ "borsh", "derive_more", @@ -1164,8 +1164,9 @@ dependencies = [ [[package]] name = "ibc-proto" -version = "0.41.0" -source = "git+https://github.com/cosmos/ibc-proto-rs.git?rev=a1877a5#a1877a5b78626f7f468cf5d14ff79ae5eef068ef" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a6f2bbf7e1d12f98d8d54d9114231b865418d0f8b619c0873180eafdee07fd" dependencies = [ "base64", "borsh", @@ -1374,7 +1375,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -1517,9 +1518,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -1560,7 +1561,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -1868,7 +1869,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -1901,7 +1902,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -1999,7 +2000,7 @@ dependencies = [ [[package]] name = "sov-celestia-client" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "derive_more", "ibc-client-tendermint", @@ -2016,7 +2017,7 @@ dependencies = [ [[package]] name = "sov-celestia-client-types" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "base64", "bytes", @@ -2024,10 +2025,10 @@ dependencies = [ "hex", "ibc-client-tendermint", "ibc-core", - "ibc-proto", "ics23", "prost", "serde", + "sov-ibc-proto", "tendermint", "tendermint-light-client-verifier", "tendermint-proto", @@ -2049,7 +2050,7 @@ dependencies = [ [[package]] name = "sov-ibc" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "ahash", "anyhow", @@ -2064,7 +2065,6 @@ dependencies = [ "serde_json", "sha2 0.10.8", "sov-celestia-client", - "sov-chain-state", "sov-ibc-transfer", "sov-modules-api", "sov-rollup-interface", @@ -2074,10 +2074,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "sov-ibc-proto" +version = "0.1.0" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" +dependencies = [ + "ibc-proto", + "informalsystems-pbjson", + "prost", + "serde", + "tendermint-proto", +] + [[package]] name = "sov-ibc-transfer" version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=7e41c9b#7e41c9b67be378c4d7eeaed036b72db7f48f4c58" +source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=5a8a685#5a8a685e136f91006f0689c257594f00b11f95cd" dependencies = [ "anyhow", "base64", @@ -2094,6 +2106,10 @@ dependencies = [ "uint", ] +[[package]] +name = "sov-metrics" +version = "0.3.0" + [[package]] name = "sov-mock-da" version = "0.3.0" @@ -2207,6 +2223,7 @@ dependencies = [ "async-trait", "borsh", "bytes", + "derivative", "digest 0.10.7", "futures", "hex", @@ -2258,6 +2275,7 @@ dependencies = [ "num_cpus", "serde", "serde_json", + "sov-metrics", "sov-rollup-interface", ] @@ -2333,9 +2351,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -2410,22 +2428,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -2501,7 +2519,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -2606,7 +2624,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] [[package]] @@ -2626,5 +2644,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.53", ] diff --git a/crates/rollup/Cargo.toml b/crates/rollup/Cargo.toml index ace0890..c680efe 100644 --- a/crates/rollup/Cargo.toml +++ b/crates/rollup/Cargo.toml @@ -13,6 +13,7 @@ publish = false [dependencies] sov-modules-api = { workspace = true, features = ["native"] } sov-state = { workspace = true } +tracing-appender = { workspace = true } sov-prover-storage-manager = { workspace = true } sov-accounts = { workspace = true, features = ["native"] } sov-bank = { workspace = true, features = ["native"] } @@ -21,7 +22,7 @@ sov-sequencer-registry = { workspace = true, features = ["native"] } sov-modules-rollup-blueprint = { workspace = true } sov-modules-stf-blueprint = { workspace = true, features = ["native"] } sov-stf-runner = { workspace = true, features = ["native"] } -sov-cli = { workspace = true, optional = true } +sov-cli = { workspace = true} sov-db = { workspace = true } sov-sequencer = { workspace = true } @@ -37,7 +38,8 @@ serde = { workspace = true } tracing = { workspace = true } serde_json = { workspace = true } jsonrpsee = { workspace = true } -tokio = { workspace = true } +tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros"] } +prometheus_exporter = { workspace = true } risc0-starter = { path = "../provers/risc0" } stf-starter = { path = "../stf", features = ["native"] } @@ -45,6 +47,8 @@ sov-risc0-adapter = { workspace = true, features = ["native"] } # binary dependencies tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +bytes = "1.5.0" +rand = "0.8.5" [dev-dependencies] tempfile = { workspace = true } diff --git a/crates/rollup/Makefile b/crates/rollup/Makefile index c782bc8..fa5c961 100644 --- a/crates/rollup/Makefile +++ b/crates/rollup/Makefile @@ -103,6 +103,6 @@ test-create-token: set-rpc-url test-generate-create-token-tx import-keys $(SOV_CLI_REL_PATH) rpc submit-batch by-nickname DANGER__DO_NOT_USE_WITH_REAL_MONEY -test-bank-supply-of: +test-bank-supply-of: curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":{"token_address":"sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"},"id":1}' http://127.0.0.1:12345 diff --git a/crates/rollup/src/bin/node.rs b/crates/rollup/src/bin/node.rs index 05459b4..8ff42af 100644 --- a/crates/rollup/src/bin/node.rs +++ b/crates/rollup/src/bin/node.rs @@ -18,6 +18,7 @@ use sov_stf_runner::{from_toml_path, RollupConfig}; use std::str::FromStr; use stf_starter::genesis_config::GenesisPaths; use tracing::info; +use tracing_appender::non_blocking::WorkerGuard; use tracing_subscriber::prelude::*; use tracing_subscriber::{fmt, EnvFilter}; @@ -50,18 +51,47 @@ struct Args { /// The path to the kernel genesis config. #[arg(long, default_value = DEFAULT_KERNEL_GENESIS_PATH)] kernel_genesis_paths: String, + + /// The optional path to the log file. + #[arg(long, default_value = None)] + log_dir: Option, + + /// The optional path to the log file. + #[arg(long, default_value_t = 9845)] + metrics: u64, +} + +fn init_logging(log_dir: Option) -> Option { + let stdout_layer = fmt::layer().with_writer(std::io::stdout); + let filter_layer = EnvFilter::from_str("debug,hyper=info,risc0_zkvm=warn,sov_prover_storage_manager=info,jmt=info,sov_celestia_adapter=info").unwrap(); + let subscriber = tracing_subscriber::registry() + .with(stdout_layer) + .with(filter_layer); + + if let Some(path) = log_dir { + let file_appender = tracing_appender::rolling::daily(&path, "rollup.log"); + let (non_blocking, guard) = tracing_appender::non_blocking(file_appender); + subscriber + .with(fmt::layer().with_writer(non_blocking)) + .init(); + Some(guard) + } else { + subscriber.init(); + None + } } #[tokio::main] async fn main() -> Result<(), anyhow::Error> { - // Initializing logging - tracing_subscriber::registry() - .with(fmt::layer()) - //.with(EnvFilter::from_default_env()) - .with(EnvFilter::from_str("info,hyper=info").unwrap()) - .init(); - let args = Args::parse(); + + let _guard = init_logging(args.log_dir); + + let metrics_port = args.metrics; + let address = format!("127.0.0.1:{}", metrics_port); + prometheus_exporter::start(address.parse().unwrap()) + .expect("Could not start prometheus server"); + let rollup_config_path = args.rollup_config_path.as_str(); let genesis_paths = args.genesis_paths.as_str(); @@ -134,7 +164,7 @@ async fn new_rollup( rt_genesis_paths: &GenesisPaths, kernel_genesis_paths: &BasicKernelGenesisPaths, rollup_config_path: &str, - prover_config: Option + prover_config: Option, ) -> Result, anyhow::Error> { info!( "Starting celestia rollup with config {}", diff --git a/crates/rollup/src/celestia_rollup.rs b/crates/rollup/src/celestia_rollup.rs index 824e77c..f129bdf 100644 --- a/crates/rollup/src/celestia_rollup.rs +++ b/crates/rollup/src/celestia_rollup.rs @@ -6,6 +6,7 @@ use sov_celestia_adapter::types::Namespace; use sov_celestia_adapter::verifier::address::CelestiaAddress; use sov_celestia_adapter::verifier::{CelestiaSpec, CelestiaVerifier, RollupParams}; use sov_celestia_adapter::{CelestiaConfig, CelestiaService}; +use sov_db::sequencer_db::SequencerDB; use sov_modules_api::default_spec::{DefaultSpec, ZkDefaultSpec}; use sov_modules_api::Spec; use sov_modules_rollup_blueprint::RollupBlueprint; @@ -25,6 +26,7 @@ use sov_stf_runner::RollupProverConfig; use std::str::FromStr; use std::sync::{Arc, RwLock}; use stf_starter::Runtime; +use tokio::sync::watch; /// The namespace for the rollup on Celestia. const ROLLUP_NAMESPACE: Namespace = Namespace::const_v0(*b"sov-celest"); @@ -74,20 +76,20 @@ impl RollupBlueprint for CelestiaRollup { fn create_rpc_methods( &self, - storage: Arc::Storage>>, + storage: watch::Receiver<::Storage>, ledger_db: &sov_db::ledger_db::LedgerDB, + sequencer_db: &SequencerDB, da_service: &Self::DaService, + rollup_config: &RollupConfig, ) -> Result, anyhow::Error> { - // TODO set the sequencer address - let sequencer = - CelestiaAddress::from_str("celestia1a68m2l85zn5xh0l07clk4rfvnezhywc53g8x7s")?; + let sequencer = rollup_config.da.own_celestia_address.clone(); #[allow(unused_mut)] let mut rpc_methods = sov_modules_rollup_blueprint::register_rpc::< Self::NativeRuntime, Self::NativeSpec, Self::DaService, - >(storage, ledger_db, da_service, sequencer)?; + >(storage, ledger_db, sequencer_db, da_service, sequencer)?; #[cfg(feature = "experimental")] crate::eth::register_ethereum::( diff --git a/crates/rollup/src/mock_rollup.rs b/crates/rollup/src/mock_rollup.rs index 5777906..0d08bd7 100644 --- a/crates/rollup/src/mock_rollup.rs +++ b/crates/rollup/src/mock_rollup.rs @@ -1,11 +1,10 @@ #![deny(missing_docs)] //! StarterRollup provides a minimal self-contained rollup implementation -use std::sync::{Arc, RwLock}; - use async_trait::async_trait; use sov_db::ledger_db::LedgerDB; -use sov_mock_da::{MockAddress, MockDaConfig, MockDaService, MockDaSpec}; +use sov_db::sequencer_db::SequencerDB; +use sov_mock_da::{MockDaConfig, MockDaService, MockDaSpec}; use sov_modules_api::default_spec::{DefaultSpec, ZkDefaultSpec}; use sov_modules_api::Spec; use sov_modules_rollup_blueprint::RollupBlueprint; @@ -14,7 +13,7 @@ use sov_modules_stf_blueprint::StfBlueprint; use sov_prover_storage_manager::ProverStorageManager; use sov_risc0_adapter::host::Risc0Host; use sov_risc0_adapter::Risc0Verifier; -use sov_rollup_interface::zk::{ZkvmGuest, ZkvmHost, aggregated_proof::CodeCommitment}; +use sov_rollup_interface::zk::{aggregated_proof::CodeCommitment, ZkvmGuest, ZkvmHost}; use sov_state::config::Config as StorageConfig; use sov_state::Storage; use sov_state::{DefaultStorageSpec, ZkStorage}; @@ -22,6 +21,7 @@ use sov_stf_runner::ParallelProverService; use sov_stf_runner::RollupConfig; use sov_stf_runner::RollupProverConfig; use stf_starter::Runtime; +use tokio::sync::watch; /// Rollup with [`MockDaService`]. pub struct MockRollup {} @@ -74,19 +74,24 @@ impl RollupBlueprint for MockRollup { /// This function generates RPC methods for the rollup, allowing for extension with custom endpoints. fn create_rpc_methods( &self, - storage: Arc::Storage>>, + storage: watch::Receiver<::Storage>, ledger_db: &LedgerDB, + sequencer_db: &SequencerDB, da_service: &Self::DaService, + rollup_config: &RollupConfig, ) -> Result, anyhow::Error> { - // TODO set the sequencer address - let sequencer = MockAddress::new([0; 32]); - #[allow(unused_mut)] let mut rpc_methods = sov_modules_rollup_blueprint::register_rpc::< Self::NativeRuntime, Self::NativeSpec, Self::DaService, - >(storage, ledger_db, da_service, sequencer)?; + >( + storage, + ledger_db, + sequencer_db, + da_service, + rollup_config.da.sender_address, + )?; #[cfg(feature = "experimental")] crate::eth::register_ethereum::( @@ -123,7 +128,7 @@ impl RollupBlueprint for MockRollup { prover_config, zk_storage, rollup_config.prover_service, - CodeCommitment::default() + CodeCommitment::default(), ) } diff --git a/crates/stf/Cargo.toml b/crates/stf/Cargo.toml index 2ff9639..c4efea0 100644 --- a/crates/stf/Cargo.toml +++ b/crates/stf/Cargo.toml @@ -29,6 +29,7 @@ serde_json = { workspace = true } jsonrpsee = { workspace = true, features = ["jsonrpsee-types"], optional = true } borsh = { workspace = true, features = ["rc", "bytes"] } clap = { workspace = true, features = ["derive"], optional = true } +tokio = { workspace = true, features = ["sync"], optional = true } [features] default = [] @@ -45,4 +46,5 @@ native = [ "jsonrpsee", "sov-sequencer", "clap", + "tokio" ] diff --git a/crates/stf/src/genesis_config.rs b/crates/stf/src/genesis_config.rs index 73a83ed..baa1c30 100644 --- a/crates/stf/src/genesis_config.rs +++ b/crates/stf/src/genesis_config.rs @@ -57,10 +57,7 @@ pub(crate) fn get_genesis_config( fn validate_config( genesis_config: as RuntimeTrait>::GenesisConfig, ) -> Result< as RuntimeTrait>::GenesisConfig, anyhow::Error> { - let token_address = &sov_bank::get_genesis_token_address::( - &genesis_config.bank.tokens[0].token_name, - genesis_config.bank.tokens[0].salt, - ); + let token_address = &genesis_config.bank.tokens[0].token_address; let coins_token_addr = &genesis_config .sequencer_registry diff --git a/crates/stf/src/hooks.rs b/crates/stf/src/hooks.rs index 0e3acfd..22c7700 100644 --- a/crates/stf/src/hooks.rs +++ b/crates/stf/src/hooks.rs @@ -7,13 +7,13 @@ use super::runtime::Runtime; use sov_modules_api::batch::BatchWithId; use sov_modules_api::hooks::{ApplyBatchHooks, FinalizeHook, SlotHooks, TxHooks}; +use sov_modules_api::namespaces::Accessory; use sov_modules_api::runtime::capabilities::{ ContextResolver, GasEnforcer, TransactionDeduplicator, }; use sov_modules_api::transaction::Transaction; use sov_modules_api::{ - AccessoryStateCheckpoint, BlobReaderTrait, Context, DaSpec, Gas, Spec, StateCheckpoint, - WorkingSet, + BlobReaderTrait, Context, DaSpec, Gas, Spec, StateCheckpoint, StateReaderAndWriter, WorkingSet, }; use sov_modules_stf_blueprint::SequencerOutcome; use sov_sequencer_registry::SequencerRegistry; @@ -63,11 +63,10 @@ impl TransactionDeduplicator for Runtime { fn check_uniqueness( &self, tx: &Self::Tx, - context: &Context, + _context: &Context, state_checkpoint: &mut StateCheckpoint, ) -> Result<(), anyhow::Error> { - self.accounts - .check_uniqueness(tx, context, state_checkpoint) + self.accounts.check_uniqueness(tx, state_checkpoint) } /// Marks a transaction as having been executed, preventing it from executing again. @@ -196,8 +195,8 @@ impl FinalizeHook for Runtime { fn finalize_hook( &self, - _root_hash: ::VisibleHash, - _accessory_working_set: &mut AccessoryStateCheckpoint, + _root_hash: S::VisibleHash, + _accessory_working_set: &mut impl StateReaderAndWriter, ) { } } diff --git a/crates/stf/src/runtime.rs b/crates/stf/src/runtime.rs index 5c398b1..c4b81fd 100644 --- a/crates/stf/src/runtime.rs +++ b/crates/stf/src/runtime.rs @@ -69,7 +69,7 @@ pub struct Runtime { /// The bank module is responsible for minting, transferring, and burning tokens pub bank: sov_bank::Bank, /// The `ibc` module is responsible for creating clients, connections and channels and managing IBC packets - pub ibc: sov_ibc::Ibc, + pub ibc: sov_ibc::Ibc, /// The `ibc_transfer` module is responsible for managing IBC transfers pub ibc_transfer: sov_ibc_transfer::IbcTransfer, /// The sequencer registry module is responsible for authorizing users to sequencer rollup transactions @@ -87,9 +87,7 @@ where type GenesisPaths = GenesisPaths; #[cfg(feature = "native")] - fn rpc_methods( - storage: std::sync::Arc::Storage>>, - ) -> jsonrpsee::RpcModule<()> { + fn rpc_methods(storage: tokio::sync::watch::Receiver) -> jsonrpsee::RpcModule<()> { get_rpc_methods::(storage) } diff --git a/flake.lock b/flake.lock index a9fb943..eee4b55 100644 --- a/flake.lock +++ b/flake.lock @@ -152,16 +152,16 @@ "sovereign-sdk-src": { "flake": false, "locked": { - "lastModified": 1709835864, - "narHash": "sha256-k9jWxhyIaYYS7tFe2el3g3t323oT3JZJPpm69DEz8oM=", + "lastModified": 1711047242, + "narHash": "sha256-mL/226hWuFEpnaiK/NhnCnjGwqpxT0MejQAz4M4fFe0=", "ref": "refs/heads/nightly", - "rev": "3f94ceccae8f84eb191deeb97ce65a1af3c9fd1b", - "revCount": 859, + "rev": "cf048cd59789209bb9c37effddd20efe19375bca", + "revCount": 886, "type": "git", "url": "ssh://git@github.com/informalsystems/sovereign-sdk-wip" }, "original": { - "rev": "3f94ceccae8f84eb191deeb97ce65a1af3c9fd1b", + "rev": "cf048cd59789209bb9c37effddd20efe19375bca", "type": "git", "url": "ssh://git@github.com/informalsystems/sovereign-sdk-wip" } diff --git a/flake.nix b/flake.nix index ac03e29..9e4a8a1 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ sovereign-sdk-src = { flake = false; - url = git+ssh://git@github.com/informalsystems/sovereign-sdk-wip?rev=3f94ceccae8f84eb191deeb97ce65a1af3c9fd1b; + url = git+ssh://git@github.com/informalsystems/sovereign-sdk-wip?rev=cf048cd59789209bb9c37effddd20efe19375bca; }; celestia-app-src = { diff --git a/nix/rollup.nix b/nix/rollup.nix index 883936c..6f87bac 100644 --- a/nix/rollup.nix +++ b/nix/rollup.nix @@ -50,10 +50,9 @@ let "crypto-bigint-0.5.2" = "sha256-9rh8z3vwOQ7/mtzVbyADoRWgTzARF/nkhBwfKb7+A6I="; "curve25519-dalek-4.1.0" = "sha256-H8YMea3AIcUn9NGRfataNjCTzCK4NAjo4ZhWuPfT6ts="; "sha2-0.10.8" = "sha256-vuFQFlbDXEW+n9+Nx2VeWanggCSd6NZ+GVEDFS9qZ2M="; - "ibc-app-transfer-0.50.0" = "sha256-PakLJz3xIKXfW6iC4mB4KutOfAgn8jC/8t5epysZE5g="; - "ibc-proto-0.41.0" = "sha256-Q3JS+hAYivBZvtlgEM11qDp55d9clNztASNQE505oX8="; "risc0-cycle-utils-0.3.0" = "sha256-5dA62v1eqfyZBny4s3YlC2Tty7Yfd/OAVGfTlLBgypk="; - "sov-celestia-client-0.1.0" = "sha256-P7Sqf9fhKaf8ZaccYiW83YImaPfefWLDF7HXSYcMQMs="; + "ibc-app-transfer-0.51.0" = "sha256-Z3zgk29JLE+pygKsbmIntVQFvC56Rg35UKKDgZH8AS4="; + "sov-celestia-client-0.1.0" = "sha256-PLNKgZ92SqX5q9CXE9Hff5RZ9yU6JiaWpxSTNUvUBkI="; }; }; @@ -91,14 +90,13 @@ let "celestia-proto-0.1.0" = "sha256-iUgrctxdJUyhfrEQ0zoVj5AKIqgj/jQVNli5/K2nxK0="; "crypto-bigint-0.5.2" = "sha256-9rh8z3vwOQ7/mtzVbyADoRWgTzARF/nkhBwfKb7+A6I="; "curve25519-dalek-4.1.0" = "sha256-H8YMea3AIcUn9NGRfataNjCTzCK4NAjo4ZhWuPfT6ts="; - "ibc-app-transfer-0.50.0" = "sha256-PakLJz3xIKXfW6iC4mB4KutOfAgn8jC/8t5epysZE5g="; - "ibc-proto-0.41.0" = "sha256-Q3JS+hAYivBZvtlgEM11qDp55d9clNztASNQE505oX8="; "jmt-0.9.0" = "sha256-pq1v6FXS//6Dh+fdysQIVp+RVLHdXrW5aDx3263O1rs="; "nmt-rs-0.1.0" = "sha256-jcHbqyIKk8ZDDjSz+ot5YDxROOnrpM4TRmNFVfNniwU="; "sha2-0.10.8" = "sha256-vuFQFlbDXEW+n9+Nx2VeWanggCSd6NZ+GVEDFS9qZ2M="; - "sov-celestia-client-0.1.0" = "sha256-P7Sqf9fhKaf8ZaccYiW83YImaPfefWLDF7HXSYcMQMs="; "tendermint-0.32.0" = "sha256-FtY7a+hBvQryATrs3mykCWFRe8ABTT6cuf5oh9IBElQ="; "risc0-cycle-utils-0.3.0" = "sha256-5dA62v1eqfyZBny4s3YlC2Tty7Yfd/OAVGfTlLBgypk="; + "ibc-app-transfer-0.51.0" = "sha256-Z3zgk29JLE+pygKsbmIntVQFvC56Rg35UKKDgZH8AS4="; + "sov-celestia-client-0.1.0" = "sha256-PLNKgZ92SqX5q9CXE9Hff5RZ9yU6JiaWpxSTNUvUBkI="; }; }; @@ -139,11 +137,10 @@ let "tendermint-0.32.0" = "sha256-FtY7a+hBvQryATrs3mykCWFRe8ABTT6cuf5oh9IBElQ="; "crypto-bigint-0.5.2" = "sha256-9rh8z3vwOQ7/mtzVbyADoRWgTzARF/nkhBwfKb7+A6I="; "curve25519-dalek-4.1.0" = "sha256-H8YMea3AIcUn9NGRfataNjCTzCK4NAjo4ZhWuPfT6ts="; - "ibc-0.50.0" = "sha256-PakLJz3xIKXfW6iC4mB4KutOfAgn8jC/8t5epysZE5g="; - "ibc-proto-0.41.0" = "sha256-Q3JS+hAYivBZvtlgEM11qDp55d9clNztASNQE505oX8="; - "sov-celestia-client-0.1.0" = "sha256-P7Sqf9fhKaf8ZaccYiW83YImaPfefWLDF7HXSYcMQMs="; "risc0-cycle-utils-0.3.0" = "sha256-5dA62v1eqfyZBny4s3YlC2Tty7Yfd/OAVGfTlLBgypk="; - "rockbound-1.0.0" = "sha256-x3yO3BcDdRPmz/p7qnLj+SKgi3meSniTraklWvzULco="; + "rockbound-1.0.0" = "sha256-xTaeBndRb/bYe+tySChDKsh4f9pywAExsdgJExCQiy8="; + "ibc-app-transfer-0.51.0" = "sha256-Z3zgk29JLE+pygKsbmIntVQFvC56Rg35UKKDgZH8AS4="; + "sov-celestia-client-0.1.0" = "sha256-PLNKgZ92SqX5q9CXE9Hff5RZ9yU6JiaWpxSTNUvUBkI="; }; }; diff --git a/sov-rollup-starter.sh b/sov-rollup-starter.sh index 474119e..4227876 100644 --- a/sov-rollup-starter.sh +++ b/sov-rollup-starter.sh @@ -53,7 +53,7 @@ fi echo 'Running: '\''curl -X POST -H "Content-Type: application/json" -d '\''{"jsonrpc":"2.0","method":"bank_supplyOf","params":{"token_address":"sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"},"id":1}'\'' http://127.0.0.1:12345'\''' output=$(curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":{"token_address":"sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"},"id":1}' http://127.0.0.1:12345) -expected='{"jsonrpc":"2.0","result":{"amount":1000},"id":1} +expected='{"jsonrpc":"2.0","result":{"amount":10000000},"id":1} ' # Either of the two must be a substring of the other. This kinda protects us # against whitespace differences, trimming, etc. diff --git a/test-data/genesis/celestia/bank.json b/test-data/genesis/celestia/bank.json index 8a1b6f7..1d679c5 100644 --- a/test-data/genesis/celestia/bank.json +++ b/test-data/genesis/celestia/bank.json @@ -1,11 +1,20 @@ { "tokens": [ { - "token_name": "sov-demo-token", + "token_name": "sov-token", + "token_address": "sov1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0xu3qn", "address_and_balances": [ [ "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94", 100000000 + ], + [ + "sov15vspj48hpttzyvxu8kzq5klhvaczcpyxn6z6k0hwpwtzs4a6wkvqwr57gc", + 1000000 + ], + [ + "sov1dnhqk4mdsj2kwv4xymt8a624xuahfx8906j9usdkx7ensfghndkq8p33f7", + 1000000 ] ], "authorized_minters": [ @@ -14,4 +23,4 @@ "salt": 0 } ] -} \ No newline at end of file +} diff --git a/test-data/genesis/celestia/sequencer_registry.json b/test-data/genesis/celestia/sequencer_registry.json index 1a98f36..b90a9fe 100644 --- a/test-data/genesis/celestia/sequencer_registry.json +++ b/test-data/genesis/celestia/sequencer_registry.json @@ -3,7 +3,7 @@ "seq_da_address": "celestia1a68m2l85zn5xh0l07clk4rfvnezhywc53g8x7s", "coins_to_lock": { "amount": 50, - "token_address": "sov1zsnx7n2wjvtkr0ttscfgt06pjca3v2e6stxeu49qwynavmk7a8xqlxkkjp" + "token_address": "sov1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0xu3qn" }, "is_preferred_sequencer": true } \ No newline at end of file diff --git a/test-data/genesis/mock/bank.json b/test-data/genesis/mock/bank.json index d03fcc1..1d679c5 100644 --- a/test-data/genesis/mock/bank.json +++ b/test-data/genesis/mock/bank.json @@ -1,11 +1,20 @@ { "tokens": [ { - "token_name": "sov-demo-token", + "token_name": "sov-token", + "token_address": "sov1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0xu3qn", "address_and_balances": [ [ "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94", 100000000 + ], + [ + "sov15vspj48hpttzyvxu8kzq5klhvaczcpyxn6z6k0hwpwtzs4a6wkvqwr57gc", + 1000000 + ], + [ + "sov1dnhqk4mdsj2kwv4xymt8a624xuahfx8906j9usdkx7ensfghndkq8p33f7", + 1000000 ] ], "authorized_minters": [ diff --git a/test-data/genesis/mock/sequencer_registry.json b/test-data/genesis/mock/sequencer_registry.json index fe2696a..145d9a4 100644 --- a/test-data/genesis/mock/sequencer_registry.json +++ b/test-data/genesis/mock/sequencer_registry.json @@ -3,7 +3,7 @@ "seq_da_address": "0000000000000000000000000000000000000000000000000000000000000000", "coins_to_lock": { "amount": 50, - "token_address": "sov1zsnx7n2wjvtkr0ttscfgt06pjca3v2e6stxeu49qwynavmk7a8xqlxkkjp" + "token_address": "sov1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0xu3qn" }, "is_preferred_sequencer": true } diff --git a/test-data/keys/minter_private_key.json b/test-data/keys/minter_private_key.json new file mode 100644 index 0000000..ab9e243 --- /dev/null +++ b/test-data/keys/minter_private_key.json @@ -0,0 +1,9 @@ +{ + "private_key": { + "key_pair": [ + 35, 110, 128, 203, 34, 44, 78, 208, 67, 27, 9, 59, 58, 197, 62, 106, 167, + 162, 39, 63, 225, 244, 53, 28, 211, 84, 152, 154, 130, 52, 50, 162 + ] + }, + "address": "sov15vspj48hpttzyvxu8kzq5klhvaczcpyxn6z6k0hwpwtzs4a6wkvqwr57gc" +} diff --git a/test-data/requests/create_token.json b/test-data/requests/create_token.json index 7b792ac..d56d7db 100644 --- a/test-data/requests/create_token.json +++ b/test-data/requests/create_token.json @@ -2,7 +2,7 @@ "CreateToken": { "salt": 11, "token_name": "sov-test-token", - "initial_balance": 1000, + "initial_balance": 10000000, "minter_address": "sov15vspj48hpttzyvxu8kzq5klhvaczcpyxn6z6k0hwpwtzs4a6wkvqwr57gc", "authorized_minters": [ "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94", diff --git a/vendor/sovereign-sdk b/vendor/sovereign-sdk index 3f94cec..cf048cd 160000 --- a/vendor/sovereign-sdk +++ b/vendor/sovereign-sdk @@ -1 +1 @@ -Subproject commit 3f94ceccae8f84eb191deeb97ce65a1af3c9fd1b +Subproject commit cf048cd59789209bb9c37effddd20efe19375bca