diff --git a/.config/nextest.toml b/.config/nextest.toml index 7482842..f57f687 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -1,4 +1,4 @@ [profile.default] test-threads = 4 fail-fast = false -retries = 3 +retries = 1 diff --git a/Cargo.lock b/Cargo.lock index df2ac2f..57a35d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,9 +132,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" [[package]] name = "append-only-vec" @@ -192,18 +192,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "async-trait" -version = "0.1.85" +version = "0.1.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -220,9 +220,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.12.2" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b7ddaa2c56a367ad27a094ad8ef4faacf8a617c2575acb2ba88949df999ca" +checksum = "4cd755adf9707cf671e31d944a189be3deaaeee11c8bc1d669bb8022ac90fbd0" dependencies = [ "aws-lc-sys", "paste", @@ -231,9 +231,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b2ddd3ada61a305e1d8bb6c005d1eaa7d14d903681edfc400406d523a9b491" +checksum = "0f9dd2e03ee80ca2822dd6ea431163d2ef259f2066a4d6ccaca6d9dcb386aa43" dependencies = [ "bindgen 0.69.5", "cc", @@ -390,7 +390,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.96", + "syn 2.0.98", "which", ] @@ -409,9 +409,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "shlex", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -495,9 +495,9 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" dependencies = [ "arrayref", "arrayvec", @@ -506,9 +506,9 @@ dependencies = [ [[package]] name = "blake2s_simd" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" +checksum = "e90f7deecfac93095eb874a40febd69427776e24e1bd7f87f33ac62d6f0174df" dependencies = [ "arrayref", "arrayvec", @@ -581,15 +581,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.12+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "72ebc2f1a417f01e1da30ef264ee86ae31d2dcd2d603ea283d3c244a883ca2a9" dependencies = [ "cc", "libc", @@ -607,9 +607,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.10" +version = "1.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" dependencies = [ "jobserver", "libc", @@ -700,9 +700,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.27" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" dependencies = [ "clap_builder", "clap_derive", @@ -710,9 +710,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.27" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" +checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" dependencies = [ "anstream", "anstyle", @@ -722,14 +722,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -740,9 +740,9 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "cmake" -version = "0.1.53" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24a03c8b52922d68a1589ad61032f2c1aa5a8158d2aa0d93c6e9534944bbad6" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" dependencies = [ "cc", ] @@ -754,24 +754,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" dependencies = [ "backtrace", - "color-spantrace", "eyre", "indenter", "once_cell", "owo-colors", - "tracing-error", -] - -[[package]] -name = "color-spantrace" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" -dependencies = [ - "once_cell", - "owo-colors", - "tracing-core", - "tracing-error", ] [[package]] @@ -786,6 +772,26 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + [[package]] name = "constant_time_eq" version = "0.3.1" @@ -811,7 +817,7 @@ checksum = "2eac901828f88a5241ee0600950ab981148a18f2f756900ffba1b125ca6a3ef9" dependencies = [ "cookie", "document-features", - "idna 1.0.3", + "idna", "log", "publicsuffix", "serde", @@ -950,7 +956,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -974,7 +980,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -985,7 +991,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1100,14 +1106,14 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "document-features" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" +checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" dependencies = [ "litrs", ] @@ -1147,9 +1153,9 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d" [[package]] name = "encoding_rs" @@ -1169,7 +1175,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1185,8 +1191,7 @@ dependencies = [ [[package]] name = "equihash" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab579d7cf78477773b03e80bc2f89702ef02d7112c711d54ca93dcdce68533d5" +source = "git+https://github.com/zingolabs/librustzcash.git?tag=zcash_client_sqlite-0.12.1_plus_zingolabs_changes-test_2#db6efd6a2fdac955c7eb6929a043d19d9e451429" dependencies = [ "blake2b_simd", "byteorder", @@ -1194,18 +1199,19 @@ dependencies = [ [[package]] name = "equihash" -version = "0.2.0" -source = "git+https://github.com/zingolabs/librustzcash.git?tag=zcash_client_sqlite-0.12.1_plus_zingolabs_changes-test_2#db6efd6a2fdac955c7eb6929a043d19d9e451429" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "756c3654e279e572484a6061a4f90a67849baeab43be89a622b9950105254674" dependencies = [ "blake2b_simd", - "byteorder", + "core2", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -1281,9 +1287,9 @@ dependencies = [ [[package]] name = "fixedbitset" -version = "0.4.2" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "fnv" @@ -1403,7 +1409,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1491,7 +1497,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1520,9 +1526,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" dependencies = [ "atomic-waker", "bytes", @@ -1764,7 +1770,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 0.26.7", + "webpki-roots 0.26.8", ] [[package]] @@ -1953,7 +1959,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1962,16 +1968,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.0.3" @@ -2010,7 +2006,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2061,9 +2057,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "generic-array", ] @@ -2193,7 +2189,7 @@ dependencies = [ "jsonrpsee-types", "parking_lot", "rand 0.8.5", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "serde", "serde_json", "thiserror 1.0.69", @@ -2211,7 +2207,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2296,7 +2292,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2316,9 +2312,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.170" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" [[package]] name = "libloading" @@ -2424,9 +2420,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" dependencies = [ "serde", ] @@ -2568,9 +2564,9 @@ checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "native-tls" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", @@ -2676,9 +2672,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "opaque-debug" @@ -2688,9 +2684,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.70" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags 2.8.0", "cfg-if", @@ -2709,7 +2705,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2720,9 +2716,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.105" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -2813,28 +2809,30 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.12" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +checksum = "c9fde3d0718baf5bc92f577d652001da0f8d54cd03a7974e118d04fc888dc23d" dependencies = [ "arrayvec", "bitvec", "byte-slice-cast", + "const_format", "impl-trait-for-tuples", "parity-scale-codec-derive", + "rustversion", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "3.6.12" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +checksum = "581c837bb6b9541ce7faa9377c20616e4fb7650f6b0f68bc93c827ee504fb7b3" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.98", ] [[package]] @@ -2910,9 +2908,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset", "indexmap 2.7.1", @@ -2920,22 +2918,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2979,9 +2977,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" [[package]] name = "portpicker" @@ -3014,7 +3012,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3056,7 +3054,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3090,9 +3088,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes", "prost-derive", @@ -3100,12 +3098,12 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ "heck", - "itertools 0.13.0", + "itertools 0.14.0", "log", "multimap", "once_cell", @@ -3114,28 +3112,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.96", + "syn 2.0.98", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "prost-types" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" dependencies = [ "prost", ] @@ -3148,11 +3146,11 @@ checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" [[package]] name = "publicsuffix" -version = "2.2.3" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" dependencies = [ - "idna 0.3.0", + "idna", "psl-types", ] @@ -3195,7 +3193,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "rustls", "socket2", "thiserror 2.0.11", @@ -3213,7 +3211,7 @@ dependencies = [ "getrandom 0.2.15", "rand 0.8.5", "ring", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "slab", @@ -3225,9 +3223,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ "cfg_aliases", "libc", @@ -3422,9 +3420,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" dependencies = [ "bitflags 2.8.0", ] @@ -3553,21 +3551,20 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.7", + "webpki-roots 0.26.8", "windows-registry", ] [[package]] name = "ring" -version = "0.17.8" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -3626,7 +3623,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.96", + "syn 2.0.98", "walkdir", ] @@ -3654,9 +3651,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc-hex" @@ -3688,9 +3685,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.21" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "aws-lc-rs", "log", @@ -3896,9 +3893,9 @@ checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] @@ -3924,20 +3921,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "serde_json" -version = "1.0.138" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" +checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ "indexmap 2.7.1", "itoa", @@ -3985,7 +3982,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4090,9 +4087,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" @@ -4173,9 +4170,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -4199,7 +4196,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4241,9 +4238,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.16.0" +version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand", @@ -4271,7 +4268,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4282,7 +4279,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "test-case-core", ] @@ -4321,7 +4318,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4332,7 +4329,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4438,7 +4435,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4504,9 +4501,9 @@ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap 2.7.1", "toml_datetime", @@ -4544,7 +4541,7 @@ dependencies = [ "tower-layer", "tower-service", "tracing", - "webpki-roots 0.26.7", + "webpki-roots 0.26.8", ] [[package]] @@ -4558,7 +4555,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4598,8 +4595,8 @@ dependencies = [ [[package]] name = "tower-batch-control" -version = "0.2.41-beta.20" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "0.2.41-beta.21" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "futures", "futures-core", @@ -4615,7 +4612,7 @@ dependencies = [ [[package]] name = "tower-batch-control" version = "0.2.41-beta.21" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "futures", "futures-core", @@ -4630,8 +4627,8 @@ dependencies = [ [[package]] name = "tower-fallback" -version = "0.2.41-beta.20" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "0.2.41-beta.21" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "futures-core", "pin-project", @@ -4642,7 +4639,7 @@ dependencies = [ [[package]] name = "tower-fallback" version = "0.2.41-beta.21" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "futures-core", "pin-project", @@ -4682,7 +4679,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4762,9 +4759,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "uint" @@ -4796,17 +4793,11 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - [[package]] name = "unicode-ident" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[package]] name = "unicode-normalization" @@ -4817,6 +4808,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "universal-hash" version = "0.5.1" @@ -4855,7 +4852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna", "percent-encoding", ] @@ -4903,7 +4900,7 @@ checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4958,9 +4955,9 @@ checksum = "a7b6d5a78adc3e8f198e9cd730f219a695431467f7ec29dcfc63ade885feebe1" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] @@ -5033,7 +5030,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-shared", ] @@ -5068,7 +5065,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5110,9 +5107,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.7" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] @@ -5360,9 +5357,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.25" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad699df48212c6cc6eb4435f35500ac6fd3b9913324f938aea302022ce19d310" +checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" dependencies = [ "memchr", ] @@ -5435,7 +5432,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -5461,9 +5458,9 @@ dependencies = [ "url", "zaino-proto", "zcash_protocol 0.4.0", - "zebra-chain 1.0.0-beta.44", - "zebra-rpc 1.0.0-beta.44", - "zebra-state 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-rpc 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-state 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] @@ -5495,9 +5492,9 @@ dependencies = [ "zaino-fetch", "zaino-proto", "zaino-state", - "zebra-chain 1.0.0-beta.44", - "zebra-rpc 1.0.0-beta.44", - "zebra-state 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-rpc 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-state 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] @@ -5528,9 +5525,9 @@ dependencies = [ "zaino-fetch", "zaino-proto", "zaino-testutils", - "zebra-chain 1.0.0-beta.44", - "zebra-rpc 1.0.0-beta.44", - "zebra-state 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-rpc 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-state 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", "zingo-infra-services", "zingolib", ] @@ -5555,7 +5552,7 @@ dependencies = [ "zainod", "zcash_client_backend", "zcash_protocol 0.4.0", - "zebra-chain 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", "zingo-infra-testutils", "zingolib", ] @@ -5577,7 +5574,7 @@ dependencies = [ "zaino-fetch", "zaino-serve", "zaino-state", - "zebra-chain 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] @@ -5734,7 +5731,7 @@ dependencies = [ "bs58", "byteorder", "document-features", - "equihash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "equihash 0.2.1", "ff", "fpe", "group", @@ -5772,7 +5769,7 @@ dependencies = [ "bs58", "byteorder", "document-features", - "equihash 0.2.0 (git+https://github.com/zingolabs/librustzcash.git?tag=zcash_client_sqlite-0.12.1_plus_zingolabs_changes-test_2)", + "equihash 0.2.0", "ff", "fpe", "group", @@ -5886,8 +5883,8 @@ dependencies = [ [[package]] name = "zebra-chain" -version = "1.0.0-beta.44" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "1.0.0-beta.45" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "bitflags 2.8.0", "bitflags-serde-legacy", @@ -5898,16 +5895,16 @@ dependencies = [ "bs58", "byteorder", "chrono", - "dirs 5.0.1", + "dirs 6.0.0", "ed25519-zebra", - "equihash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "equihash 0.2.1", "futures", "group", "halo2_proofs", "hex", "humantime", "incrementalmerkletree", - "itertools 0.13.0", + "itertools 0.14.0", "jubjub", "lazy_static", "num-integer", @@ -5943,7 +5940,7 @@ dependencies = [ [[package]] name = "zebra-chain" version = "1.0.0-beta.45" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "bitflags 2.8.0", "bitflags-serde-legacy", @@ -5956,7 +5953,7 @@ dependencies = [ "chrono", "dirs 6.0.0", "ed25519-zebra", - "equihash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "equihash 0.2.1", "futures", "group", "halo2_proofs", @@ -5998,8 +5995,8 @@ dependencies = [ [[package]] name = "zebra-consensus" -version = "1.0.0-beta.44" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "1.0.0-beta.45" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "bellman", "blake2b_simd", @@ -6020,22 +6017,22 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tower 0.4.13", - "tower-batch-control 0.2.41-beta.20", - "tower-fallback 0.2.41-beta.20", + "tower-batch-control 0.2.41-beta.21 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "tower-fallback 0.2.41-beta.21 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", "tracing", "tracing-futures", "wagyu-zcash-parameters", "zcash_proofs 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "zebra-chain 1.0.0-beta.44", - "zebra-node-services 1.0.0-beta.44", - "zebra-script 1.0.0-beta.44", - "zebra-state 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-node-services 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-script 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-state 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] name = "zebra-consensus" version = "1.0.0-beta.45" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "bellman", "blake2b_simd", @@ -6056,33 +6053,33 @@ dependencies = [ "thiserror 2.0.11", "tokio", "tower 0.4.13", - "tower-batch-control 0.2.41-beta.21", - "tower-fallback 0.2.41-beta.21", + "tower-batch-control 0.2.41-beta.21 (git+https://github.com/ZcashFoundation/zebra.git)", + "tower-fallback 0.2.41-beta.21 (git+https://github.com/ZcashFoundation/zebra.git)", "tracing", "tracing-futures", "wagyu-zcash-parameters", "zcash_proofs 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "zebra-chain 1.0.0-beta.45", - "zebra-node-services 1.0.0-beta.45", - "zebra-script 1.0.0-beta.45", - "zebra-state 1.0.0-beta.45", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-node-services 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-script 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-state 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", ] [[package]] name = "zebra-network" -version = "1.0.0-beta.44" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "1.0.0-beta.45" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "bitflags 2.8.0", "byteorder", "bytes", "chrono", - "dirs 5.0.1", + "dirs 6.0.0", "futures", "hex", "humantime-serde", "indexmap 2.7.1", - "itertools 0.13.0", + "itertools 0.14.0", "lazy_static", "metrics", "num-integer", @@ -6101,13 +6098,13 @@ dependencies = [ "tracing", "tracing-error", "tracing-futures", - "zebra-chain 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] name = "zebra-network" version = "1.0.0-beta.45" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "bitflags 2.8.0", "byteorder", @@ -6137,13 +6134,13 @@ dependencies = [ "tracing", "tracing-error", "tracing-futures", - "zebra-chain 1.0.0-beta.45", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", ] [[package]] name = "zebra-node-services" -version = "1.0.0-beta.44" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "1.0.0-beta.45" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "color-eyre", "jsonrpsee-types", @@ -6151,13 +6148,13 @@ dependencies = [ "serde", "serde_json", "tokio", - "zebra-chain 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] name = "zebra-node-services" version = "1.0.0-beta.45" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "color-eyre", "jsonrpsee-types", @@ -6165,13 +6162,13 @@ dependencies = [ "serde", "serde_json", "tokio", - "zebra-chain 1.0.0-beta.45", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", ] [[package]] name = "zebra-rpc" -version = "1.0.0-beta.44" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "1.0.0-beta.45" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "base64 0.22.1", "chrono", @@ -6186,24 +6183,25 @@ dependencies = [ "jsonrpsee-types", "nix", "rand 0.8.5", + "semver", "serde", "serde_json", "tokio", "tower 0.4.13", "tracing", "zcash_primitives 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "zebra-chain 1.0.0-beta.44", - "zebra-consensus 1.0.0-beta.44", - "zebra-network 1.0.0-beta.44", - "zebra-node-services 1.0.0-beta.44", - "zebra-script 1.0.0-beta.44", - "zebra-state 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-consensus 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-network 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-node-services 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-script 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", + "zebra-state 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] name = "zebra-rpc" version = "1.0.0-beta.45" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "base64 0.22.1", "chrono", @@ -6226,50 +6224,50 @@ dependencies = [ "tracing", "zcash_address 0.6.2", "zcash_primitives 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "zebra-chain 1.0.0-beta.45", - "zebra-consensus 1.0.0-beta.45", - "zebra-network 1.0.0-beta.45", - "zebra-node-services 1.0.0-beta.45", - "zebra-script 1.0.0-beta.45", - "zebra-state 1.0.0-beta.45", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-consensus 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-network 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-node-services 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-script 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-state 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", ] [[package]] name = "zebra-script" -version = "1.0.0-beta.44" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "1.0.0-beta.45" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "thiserror 2.0.11", "zcash_script", - "zebra-chain 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] name = "zebra-script" version = "1.0.0-beta.45" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "thiserror 2.0.11", "zcash_script", - "zebra-chain 1.0.0-beta.45", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", ] [[package]] name = "zebra-state" -version = "1.0.0-beta.44" -source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#0dcc4205ee1758daf2475ffc5609a94e4f5acc05" +version = "1.0.0-beta.45" +source = "git+https://github.com/ZcashFoundation/zebra.git?branch=main#29ed501f11bf00c11214ee151a6f892619e72183" dependencies = [ "bincode", "chrono", "crossbeam-channel", - "dirs 5.0.1", + "dirs 6.0.0", "futures", "hex", "hex-literal", "human_bytes", "humantime-serde", "indexmap 2.7.1", - "itertools 0.13.0", + "itertools 0.14.0", "lazy_static", "metrics", "mset", @@ -6284,13 +6282,13 @@ dependencies = [ "tokio", "tower 0.4.13", "tracing", - "zebra-chain 1.0.0-beta.44", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git?branch=main)", ] [[package]] name = "zebra-state" version = "1.0.0-beta.45" -source = "git+https://github.com/ZcashFoundation/zebra.git#1e9f021784ea9e0f5df17b4e778b2df93fb5e68f" +source = "git+https://github.com/ZcashFoundation/zebra.git#79e18e045ce8ca11c4078495e2425cc204cf03c2" dependencies = [ "bincode", "chrono", @@ -6317,7 +6315,7 @@ dependencies = [ "tokio", "tower 0.4.13", "tracing", - "zebra-chain 1.0.0-beta.45", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", ] [[package]] @@ -6338,7 +6336,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -6358,7 +6356,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -6379,7 +6377,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -6401,7 +6399,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -6434,9 +6432,9 @@ dependencies = [ "tracing", "zcash_primitives 0.19.0 (git+https://github.com/zingolabs/librustzcash.git?tag=zcash_client_sqlite-0.12.1_plus_zingolabs_changes-test_2)", "zcash_protocol 0.4.0", - "zebra-chain 1.0.0-beta.45", - "zebra-node-services 1.0.0-beta.45", - "zebra-rpc 1.0.0-beta.45", + "zebra-chain 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-node-services 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", + "zebra-rpc 1.0.0-beta.45 (git+https://github.com/ZcashFoundation/zebra.git)", "zingo-infra-fetcher", ] @@ -6629,27 +6627,27 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.2.1" +version = "7.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" +version = "2.0.14+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5" dependencies = [ "cc", "pkg-config", diff --git a/zaino-fetch/src/jsonrpc/connector.rs b/zaino-fetch/src/jsonrpc/connector.rs index 99b175c..925d81a 100644 --- a/zaino-fetch/src/jsonrpc/connector.rs +++ b/zaino-fetch/src/jsonrpc/connector.rs @@ -212,7 +212,10 @@ impl JsonRpcConnector { /// /// NOTE: This function currently resends the call up to 5 times on a server response of "Work queue depth exceeded". /// This is because the node's queue can become overloaded and stop servicing RPCs. - async fn send_request Deserialize<'de>>( + async fn send_request< + T: std::fmt::Debug + Serialize, + R: std::fmt::Debug + for<'de> Deserialize<'de>, + >( &self, method: &str, params: T, @@ -263,6 +266,7 @@ impl JsonRpcConnector { .bytes() .await .map_err(JsonRpcConnectorError::ReqwestError)?; + let body_str = String::from_utf8_lossy(&body_bytes); if body_str.contains("Work queue depth exceeded") { diff --git a/zaino-fetch/src/jsonrpc/response.rs b/zaino-fetch/src/jsonrpc/response.rs index 99305f2..5f7670d 100644 --- a/zaino-fetch/src/jsonrpc/response.rs +++ b/zaino-fetch/src/jsonrpc/response.rs @@ -1,28 +1,106 @@ //! Response types for jsonRPC client. +use std::num::ParseIntError; + use hex::FromHex; +use serde::{de::Error, Deserialize, Deserializer, Serialize}; + +use zebra_chain::{ + amount::{Amount, NonNegative}, + block::Height, +}; +use zebra_rpc::methods::types::Balance; /// Response to a `getinfo` RPC request. /// /// This is used for the output parameter of [`JsonRpcConnector::get_info`]. -#[derive(Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)] +#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)] pub struct GetInfoResponse { + /// The node version + version: u64, /// The node version build number pub build: String, /// The server sub-version identifier, used as the network protocol user-agent pub subversion: String, + /// The protocol version + #[serde(rename = "protocolversion")] + protocol_version: u32, + + /// The current number of blocks processed in the server + blocks: u32, + + /// The total (inbound and outbound) number of connections the node has + connections: usize, + + /// The proxy (if any) used by the server. Currently always `None` in Zebra. + #[serde(skip_serializing_if = "Option::is_none")] + proxy: Option, + + /// The current network difficulty + difficulty: f64, + + /// True if the server is running in testnet mode, false otherwise + testnet: bool, + + /// The minimum transaction fee in ZEC/kB + #[serde(rename = "paytxfee")] + pay_tx_fee: f64, + + /// The minimum relay fee for non-free transactions in ZEC/kB + #[serde(rename = "relayfee")] + relay_fee: f64, + + /// The last error or warning message, or "no errors" if there are no errors + errors: String, + + /// The time of the last error or warning message, or "no errors timestamp" if there are no errors + #[serde(rename = "errorstimestamp")] + errors_timestamp: ErrorsTimestamp, +} + +#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)] +#[serde(untagged)] +/// A wrapper to allow both types of error timestamp +pub enum ErrorsTimestamp { + /// Returned from zcashd, the timestamp is an integer unix timstamp + Num(usize), + /// Returned from zebrad, the timestamp is a string representing a timestamp + Str(String), +} + +impl std::fmt::Display for ErrorsTimestamp { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ErrorsTimestamp::Num(n) => f.write_str(&n.to_string()), + ErrorsTimestamp::Str(s) => f.write_str(s), + } + } } impl From for zebra_rpc::methods::GetInfo { fn from(response: GetInfoResponse) -> Self { - zebra_rpc::methods::GetInfo::from_parts(response.build, response.subversion) + zebra_rpc::methods::GetInfo::from_parts( + response.version, + response.build, + response.subversion, + response.protocol_version, + response.blocks, + response.connections, + response.proxy, + response.difficulty, + response.testnet, + response.pay_tx_fee, + response.relay_fee, + response.errors, + response.errors_timestamp.to_string(), + ) } } /// Response to a `getblockchaininfo` RPC request. /// /// This is used for the output parameter of [`JsonRpcConnector::get_blockchain_info`]. -#[derive(Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)] +#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)] pub struct GetBlockchainInfoResponse { /// Current network name as defined in BIP70 (main, test, regtest) pub chain: String, @@ -40,28 +118,127 @@ pub struct GetBlockchainInfoResponse { #[serde(rename = "estimatedheight")] pub estimated_height: zebra_chain::block::Height, + /// Chain supply balance + #[serde(rename = "chainSupply")] + chain_supply: ChainBalance, + /// Status of network upgrades pub upgrades: indexmap::IndexMap< zebra_rpc::methods::ConsensusBranchIdHex, zebra_rpc::methods::NetworkUpgradeInfo, >, + /// Value pool balances + #[serde(rename = "valuePools")] + value_pools: [ChainBalance; 5], + /// Branch IDs of the current and upcoming consensus rules pub consensus: zebra_rpc::methods::TipConsensusBranch, + + /// The current number of headers we have validated in the best chain, that is, + /// the height of the best chain. + headers: Height, + + /// The estimated network solution rate in Sol/s. + difficulty: f64, + + /// The verification progress relative to the estimated network chain tip. + #[serde(rename = "verificationprogress")] + verification_progress: f64, + + /// The total amount of work in the best chain, hex-encoded. + #[serde(rename = "chainwork")] + chain_work: ChainWork, + + /// Whether this node is pruned, currently always false in Zebra. + pruned: bool, + + /// The estimated size of the block and undo files on disk + size_on_disk: u64, + + /// The current number of note commitments in the commitment tree + commitments: u64, +} + +#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)] +#[serde(untagged)] +/// A wrapper type to allow both kinds of ChainWork +pub enum ChainWork { + /// Returned from zcashd, a chainwork is a String representing a + /// base-16 integer + Str(String), + /// Returned from zebrad, a chainwork is an integer + Num(u64), +} + +impl TryFrom for u64 { + type Error = ParseIntError; + + fn try_from(value: ChainWork) -> Result { + match value { + ChainWork::Str(s) => u64::from_str_radix(&s, 16), + ChainWork::Num(u) => Ok(u), + } + } } -impl From for zebra_rpc::methods::GetBlockChainInfo { - fn from(response: GetBlockchainInfoResponse) -> Self { - zebra_rpc::methods::GetBlockChainInfo::new( +/// Wrapper struct for a Zebra [`Balance`], enabling custom deserialisation logic to handle both zebrad and zcashd. +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ChainBalance(Balance); + +impl<'de> Deserialize<'de> for ChainBalance { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + #[derive(Deserialize, Debug)] + struct TempBalance { + #[serde(default)] + id: String, + #[serde(rename = "chainValue")] + chain_value: f64, + #[serde(rename = "chainValueZat")] + chain_value_zat: u64, + #[allow(dead_code)] + monitored: bool, + } + let temp = TempBalance::deserialize(deserializer)?; + let computed_zat = (temp.chain_value * 100_000_000.0).round() as u64; + if computed_zat != temp.chain_value_zat { + return Err(D::Error::custom(format!( + "chainValue and chainValueZat mismatch: computed {} but got {}", + computed_zat, temp.chain_value_zat + ))); + } + let amount = Amount::::from_bytes(temp.chain_value_zat.to_le_bytes()) + .map_err(|e| serde::de::Error::custom(e.to_string()))?; + let balance = Balance::new(temp.id, amount); + Ok(ChainBalance(balance)) + } +} + +impl TryFrom for zebra_rpc::methods::GetBlockChainInfo { + fn try_from(response: GetBlockchainInfoResponse) -> Result { + Ok(zebra_rpc::methods::GetBlockChainInfo::new( response.chain, response.blocks, response.best_block_hash, response.estimated_height, - zebra_rpc::methods::types::ValuePoolBalance::zero_pools(), + response.chain_supply.0, + response.value_pools.map(|pool| pool.0), response.upgrades, response.consensus, - ) + response.headers, + response.difficulty, + response.verification_progress, + response.chain_work.try_into()?, + response.pruned, + response.size_on_disk, + response.commitments, + )) } + + type Error = ParseIntError; } /// The transparent balance of a set of addresses. @@ -277,6 +454,7 @@ impl TryFrom for zebra_rpc::methods::GetBlock { Ok(zebra_rpc::methods::GetBlock::Object { hash: zebra_rpc::methods::GetBlockHash(hash.0), + block_commitments: None, confirmations, size: None, height, diff --git a/zaino-state/src/config.rs b/zaino-state/src/config.rs index aa631be..42b5e9a 100644 --- a/zaino-state/src/config.rs +++ b/zaino-state/src/config.rs @@ -27,6 +27,7 @@ pub struct StateServiceConfig { impl StateServiceConfig { /// Returns a new instance of [`StateServiceConfig`]. + #[allow(clippy::too_many_arguments)] pub fn new( validator_config: zebra_state::Config, validator_rpc_address: std::net::SocketAddr, diff --git a/zaino-state/src/fetch.rs b/zaino-state/src/fetch.rs index 72effc0..5e10338 100644 --- a/zaino-state/src/fetch.rs +++ b/zaino-state/src/fetch.rs @@ -180,6 +180,10 @@ impl ZcashIndexer for FetchServiceSubscriber { /// /// # Notes /// + /// TODO: [Issue #221](https://github.com/zingolabs/zaino/issues/221) + /// Eleven fields have been added to this type, since this comment + /// was written. Investigate whether there is field-parity between us and + /// zcashd, or if fields are still missing from some implementations /// [The zcashd reference](https://zcash.github.io/rpc/getinfo.html) might not show some fields /// in Zebra's [`GetInfo`]. Zebra uses the field names and formats from the /// [zcashd code](https://github.com/zcash/zcash/blob/v4.6.0-1/src/rpc/misc.cpp#L86-L87). @@ -187,10 +191,7 @@ impl ZcashIndexer for FetchServiceSubscriber { /// Some fields from the zcashd reference are missing from Zebra's [`GetInfo`]. It only contains the fields /// [required for lightwalletd support.](https://github.com/zcash/lightwalletd/blob/v0.4.9/common/common.go#L91-L95) async fn get_info(&self) -> Result { - Ok(GetInfo::from_parts( - self.data.zebra_build(), - self.data.zebra_subversion(), - )) + Ok(self.fetcher.get_info().await?.into()) } /// Returns blockchain state information, as a [`GetBlockChainInfo`] JSON struct. @@ -204,7 +205,18 @@ impl ZcashIndexer for FetchServiceSubscriber { /// Some fields from the zcashd reference are missing from Zebra's [`GetBlockChainInfo`]. It only contains the fields /// [required for lightwalletd support.](https://github.com/zcash/lightwalletd/blob/v0.4.9/common/common.go#L72-L89) async fn get_blockchain_info(&self) -> Result { - Ok(self.fetcher.get_blockchain_info().await?.into()) + Ok(self + .fetcher + .get_blockchain_info() + .await? + .try_into() + .map_err(|_e| { + FetchServiceError::SerializationError( + zebra_chain::serialization::SerializationError::Parse( + "chainwork not hex-encoded integer", + ), + ) + })?) } /// Returns the total balance of a provided `addresses` in an [`AddressBalance`] instance. diff --git a/zaino-state/src/state.rs b/zaino-state/src/state.rs index 43ef8eb..8648ab9 100644 --- a/zaino-state/src/state.rs +++ b/zaino-state/src/state.rs @@ -22,14 +22,14 @@ use tower::Service; use zaino_fetch::jsonrpc::connector::{JsonRpcConnector, RpcError}; use zaino_fetch::jsonrpc::response::TxidsResponse; +use zaino_proto::proto::compact_formats::ChainMetadata; use zaino_proto::proto::compact_formats::{ - ChainMetadata, CompactBlock, CompactOrchardAction, CompactSaplingOutput, CompactSaplingSpend, - CompactTx, + CompactBlock, CompactOrchardAction, CompactSaplingOutput, CompactSaplingSpend, CompactTx, }; use zaino_proto::proto::service::BlockRange; use zebra_chain::{ - block::{Height, SerializedBlock}, + block::{Header, Height, SerializedBlock}, chain_tip::{ChainTip, NetworkChainTipHeightEstimator}, parameters::{ConsensusBranchId, Network, NetworkUpgrade}, serialization::{ZcashDeserialize, ZcashSerialize}, @@ -38,9 +38,10 @@ use zebra_chain::{ }; use zebra_rpc::{ methods::{ + chain_tip_difficulty, hex_data::HexData, trees::{GetSubtrees, GetTreestate, SubtreeRpcData}, - types::ValuePoolBalance, + types::Balance, AddressBalance, AddressStrings, ConsensusBranchIdHex, GetAddressTxIdsRequest, GetAddressUtxos, GetBlock, GetBlockChainInfo, GetBlockHash, GetBlockHeader, GetBlockHeaderObject, GetBlockTransaction, GetBlockTrees, GetInfo, GetRawTransaction, @@ -218,10 +219,13 @@ impl ZcashIndexer for StateService { type Error = StateServiceError; async fn get_info(&self) -> Result { - Ok(GetInfo::from_parts( - self.data.zebra_build(), - self.data.zebra_subversion(), - )) + // A number of these fields are difficult to access from the state service + // TODO: Fix this + self.rpc_client + .get_info() + .await + .map(GetInfo::from) + .map_err(Self::Error::from) } async fn get_blockchain_info(&self) -> Result { @@ -236,6 +240,8 @@ impl ZcashIndexer for StateService { unreachable!("Unexpected response from state service: {unexpected:?}") } }; + let usage_response = self.checked_call(ReadRequest::UsageInfo).await?; + let size_on_disk = expected_read_response!(usage_response, UsageInfo); let request = zebra_state::ReadRequest::BlockHeader(hash.into()); let response = self.checked_call(request).await?; let header = match response { @@ -300,15 +306,33 @@ impl ZcashIndexer for StateService { ) .inner(), ); + let difficulty = + chain_tip_difficulty(self.config.network.clone(), self.read_state_service.clone()) + .await + .unwrap(); + + let verification_progress = f64::from(height.0) / f64::from(zebra_estimated_height.0); Ok(GetBlockChainInfo::new( self.config.network.bip70_network_name(), height, hash, estimated_height, - ValuePoolBalance::from_value_balance(balance), + Balance::chain_supply(balance), + Balance::value_pools(balance), upgrades, consensus, + height, + difficulty, + verification_progress, + // TODO: store work in the finalized state for each height + // see https://github.com/ZcashFoundation/zebra/issues/7109 + 0, + false, + size_on_disk, + // TODO (copied from zebra): Investigate whether this needs to + // be implemented (it's sprout-only in zcashd) + 0, )) } @@ -394,6 +418,7 @@ impl ZcashIndexer for StateService { difficulty, previous_block_hash, next_block_hash, + block_commitments, } = *header_obj; let transactions_response: Vec = match txids_or_fullblock { @@ -462,6 +487,7 @@ impl ZcashIndexer for StateService { final_orchard_root, previous_block_hash: Some(previous_block_hash), next_block_hash, + block_commitments: Some(block_commitments), }) } more_than_two => Err(StateServiceError::RpcError(RpcError::new_from_legacycode( @@ -870,6 +896,12 @@ impl StateService { }; let difficulty = header.difficulty_threshold.relative_to_network(&network); + let block_commitments = header_to_block_commitments( + &header, + &self.config.network, + height, + final_sapling_root, + )?; let block_header = GetBlockHeaderObject { hash: GetBlockHash(hash), @@ -886,6 +918,7 @@ impl StateService { difficulty, previous_block_hash: GetBlockHash(header.previous_block_hash), next_block_hash: next_block_hash.map(GetBlockHash), + block_commitments, }; GetBlockHeader::Object(Box::new(block_header)) @@ -999,6 +1032,8 @@ impl StateService { let difficulty = header .difficulty_threshold .relative_to_network(&cloned_network); + let block_commitments = + header_to_block_commitments(&header, &cloned_network, height, final_sapling_root)?; Ok(GetBlockHeaderObject { hash: GetBlockHash(hash), @@ -1015,6 +1050,7 @@ impl StateService { difficulty, previous_block_hash: GetBlockHash(header.previous_block_hash), next_block_hash: next_block_hash.map(GetBlockHash), + block_commitments, }) }); @@ -1297,6 +1333,36 @@ fn tx_to_compact( }) } +fn header_to_block_commitments( + header: &Header, + network: &Network, + height: Height, + final_sapling_root: [u8; 32], +) -> Result<[u8; 32], StateServiceError> { + let hash = match header.commitment(network, height).map_err(|e| { + StateServiceError::SerializationError( + zebra_chain::serialization::SerializationError::Parse( + // For some reason this error type takes a + // &'static str, and the the only way to create one + // dynamically is to leak a String. This shouldn't + // be a concern, as this error case should + // never occur when communing with a zebrad, which + // validates this field before serializing it + e.to_string().leak(), + ), + ) + })? { + zebra_chain::block::Commitment::PreSaplingReserved(bytes) => bytes, + zebra_chain::block::Commitment::FinalSaplingRoot(_root) => final_sapling_root, + zebra_chain::block::Commitment::ChainHistoryActivationReserved => [0; 32], + zebra_chain::block::Commitment::ChainHistoryRoot(root) => root.bytes_in_display_order(), + zebra_chain::block::Commitment::ChainHistoryBlockTxAuthCommitment(hash) => { + hash.bytes_in_display_order() + } + }; + Ok(hash) +} + /// !!! NOTE / TODO: This code should be retested before continued development, once zebra regtest is fully operational. #[cfg(test)] mod tests { @@ -1547,7 +1613,7 @@ mod tests { let fetch_service_get_blockchain_info = json_service.get_blockchain_info().await.unwrap(); let fetch_service_duration = fetch_start.elapsed(); let fetch_service_get_blockchain_info: GetBlockChainInfo = - fetch_service_get_blockchain_info.into(); + fetch_service_get_blockchain_info.try_into().unwrap(); // Zaino-Fetch does not return value_pools, ignore this field. assert_eq!( @@ -1625,7 +1691,7 @@ mod tests { let fetch_service_get_blockchain_info = json_service.get_blockchain_info().await.unwrap(); let fetch_service_duration = fetch_start.elapsed(); let fetch_service_get_blockchain_info: GetBlockChainInfo = - fetch_service_get_blockchain_info.into(); + fetch_service_get_blockchain_info.try_into().unwrap(); println!( "Fetch Service Chain Height: {}", diff --git a/zainod/src/config.rs b/zainod/src/config.rs index abae26e..8c55cbd 100644 --- a/zainod/src/config.rs +++ b/zainod/src/config.rs @@ -252,18 +252,10 @@ pub(crate) fn is_private_listen_addr(addr: &SocketAddr) -> bool { let ip = addr.ip(); match ip { IpAddr::V4(ipv4) => { - if ipv4.is_private() || ipv4.is_loopback() { - true - } else { - false - } + ipv4.is_private() || ipv4.is_loopback() } IpAddr::V6(ipv6) => { - if ipv6.is_unique_local() || ip.is_loopback() { - true - } else { - false - } + ipv6.is_unique_local() || ip.is_loopback() } } } @@ -275,18 +267,10 @@ pub(crate) fn is_loopback_listen_addr(addr: &SocketAddr) -> bool { let ip = addr.ip(); match ip { IpAddr::V4(ipv4) => { - if ipv4.is_loopback() { - true - } else { - false - } + ipv4.is_loopback() } IpAddr::V6(ipv6) => { - if ipv6.is_loopback() { - true - } else { - false - } + ipv6.is_loopback() } } } diff --git a/zainod/src/indexer.rs b/zainod/src/indexer.rs index dcfdb39..c74d600 100644 --- a/zainod/src/indexer.rs +++ b/zainod/src/indexer.rs @@ -150,11 +150,11 @@ impl Indexer { /// Returns the indexers current status usize, caliculates from internal statuses. fn status_int(&self) -> u16 { let service_status = match &self.service { - Some(service) => service.inner_ref().status().into(), + Some(service) => service.inner_ref().status(), None => return 7, }; let server_status = match &self.server { - Some(server) => server.status().into(), + Some(server) => server.status(), None => return 7, }; @@ -169,11 +169,11 @@ impl Indexer { /// Logs the indexers status. pub fn log_status(&self) { let service_status = match &self.service { - Some(service) => service.inner_ref().status().into(), + Some(service) => service.inner_ref().status(), None => StatusType::Offline, }; let grpc_server_status = match &self.server { - Some(server) => server.status().into(), + Some(server) => server.status(), None => StatusType::Offline, }; @@ -187,12 +187,6 @@ impl Indexer { } } -impl Drop for Indexer { - fn drop(&mut self) { - let _ = self.close(); - } -} - /// Prints Zaino's startup message. fn startup_message() { let welcome_message = r#"