From 2d6030002e5866f55781684bcddd3bb0f55b19cb Mon Sep 17 00:00:00 2001 From: Odysseas Gabrielides Date: Wed, 8 Jan 2025 22:42:22 +0200 Subject: [PATCH] feat: state sync --- Cargo.lock | 1475 +++++++++-------- .../platform/drive/tenderdash/config.toml.dot | 6 +- packages/rs-drive-abci/.env.local | 6 + .../rs-drive-abci/src/abci/app/consensus.rs | 76 +- packages/rs-drive-abci/src/abci/app/full.rs | 67 +- packages/rs-drive-abci/src/abci/app/mod.rs | 22 +- .../src/abci/app/state_source.rs | 100 ++ packages/rs-drive-abci/src/abci/config.rs | 53 + packages/rs-drive-abci/src/abci/error.rs | 8 + .../src/abci/handler/apply_snapshot_chunk.rs | 114 ++ .../src/abci/handler/finalize_block.rs | 23 +- .../src/abci/handler/list_snapshots.rs | 52 + .../src/abci/handler/load_snapshot_chunk.rs | 47 + .../rs-drive-abci/src/abci/handler/mod.rs | 8 + .../src/abci/handler/offer_snapshot.rs | 101 ++ packages/rs-drive-abci/src/config.rs | 9 + .../rs-drive-abci/src/platform_types/mod.rs | 3 + .../src/platform_types/snapshot/mod.rs | 248 +++ packages/rs-drive-abci/src/server.rs | 7 + .../tests/strategy_tests/main.rs | 1 + .../tests/strategy_tests/state_sync.rs | 304 ++++ packages/rs-drive/Cargo.toml | 12 +- packages/rs-drive/src/error/drive.rs | 4 + packages/rs-platform-version/Cargo.toml | 2 +- 24 files changed, 2059 insertions(+), 689 deletions(-) create mode 100644 packages/rs-drive-abci/src/abci/app/state_source.rs create mode 100644 packages/rs-drive-abci/src/abci/handler/apply_snapshot_chunk.rs create mode 100644 packages/rs-drive-abci/src/abci/handler/list_snapshots.rs create mode 100644 packages/rs-drive-abci/src/abci/handler/load_snapshot_chunk.rs create mode 100644 packages/rs-drive-abci/src/abci/handler/offer_snapshot.rs create mode 100644 packages/rs-drive-abci/src/platform_types/snapshot/mod.rs create mode 100644 packages/rs-drive-abci/tests/strategy_tests/state_sync.rs diff --git a/Cargo.lock b/Cargo.lock index c2e23dbcde3..adef4d7ea6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,13 @@ version = 4 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -70,9 +64,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -97,9 +91,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -112,49 +106,49 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -167,9 +161,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -196,9 +190,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -207,24 +201,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -235,9 +229,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -266,7 +260,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tower", "tower-layer", @@ -276,9 +270,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -289,7 +283,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -297,21 +291,20 @@ dependencies = [ [[package]] name = "axum-macros" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa" +checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" dependencies = [ - "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "backon" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4fa97bb310c33c811334143cf64c5bb2b7b3c06e453db6b095d7061eff8f113" +checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7" dependencies = [ "fastrand", "gloo-timers", @@ -320,17 +313,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -407,15 +400,15 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.75", + "syn 2.0.95", "which", ] [[package]] name = "bindgen" -version = "0.69.4" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ "bitflags 2.6.0", "cexpr", @@ -428,7 +421,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -438,7 +431,7 @@ source = "git+https://github.com/dashpay/rs-bip37-bloom-filter?branch=develop#35 dependencies = [ "bitvec", "murmur3", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -458,9 +451,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitcoin-io" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" [[package]] name = "bitcoin_hashes" @@ -541,12 +534,11 @@ dependencies = [ [[package]] name = "blsful" -version = "3.0.0-pre6" +version = "3.0.0-pre8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9de4566ea9f21109f6b3f11551b591ff22683ff47c3a30d97e2feb23257427" +checksum = "384e5e9866cb7f830f06a6633ba998697d5a826e99e8c78376deaadd33cda7be" dependencies = [ "anyhow", - "arrayref", "blstrs_plus", "hex", "hkdf", @@ -560,7 +552,7 @@ dependencies = [ "sha2", "sha3", "subtle", - "thiserror", + "thiserror 2.0.10", "uint-zigzag", "vsss-rs", "zeroize", @@ -598,9 +590,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ "borsh-derive", "cfg_aliases", @@ -608,16 +600,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.75", - "syn_derive", + "syn 2.0.95", ] [[package]] @@ -671,9 +662,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde", ] @@ -707,9 +698,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.14" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "jobserver", "libc", @@ -746,9 +737,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -756,7 +747,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -833,9 +824,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "9560b07a799281c7e0958b9296854d6fafd4c5f31444a7e5bb1ad6dde5ccf1bd" dependencies = [ "clap_builder", "clap_derive", @@ -843,9 +834,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "874e0dd3eb68bf99058751ac9712f622e61e6f393a94f7128fa26e3f02f5c7cd" dependencies = [ "anstream", "anstyle", @@ -855,36 +846,36 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -898,9 +889,9 @@ dependencies = [ [[package]] name = "console-api" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ed14aa9c9f927213c6e4f3ef75faaad3406134efe84ba2cb7983431d5f0931" +checksum = "8030735ecb0d128428b64cd379809817e620a40e5001c54465b99ec5feec2857" dependencies = [ "futures-core", "prost", @@ -911,9 +902,9 @@ dependencies = [ [[package]] name = "console-subscriber" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e3a111a37f3333946ebf9da370ba5c5577b18eb342ec683eb488dd21980302" +checksum = "6539aa9c6a4cd31f4b1c040f860a1eac9aa80e7df6b05d506a6e7179936d6a01" dependencies = [ "console-api", "crossbeam-channel", @@ -969,6 +960,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -986,9 +987,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -1040,18 +1041,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1068,9 +1069,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -1125,7 +1126,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1149,9 +1150,9 @@ name = "dapi-grpc-macros" version = "1.8.0-dev.2" dependencies = [ "dapi-grpc", - "heck 0.5.0", + "heck", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1175,7 +1176,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1186,7 +1187,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1221,7 +1222,7 @@ dependencies = [ "serde", "serde_json", "test-case", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-test", "tokio-util", @@ -1303,7 +1304,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1317,20 +1318,20 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", "wallet-utils-contract", "withdrawals-contract", ] [[package]] name = "delegate" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5060bb0febb73fa907273f8a7ed17ab4bf831d585eac835b28ec24a1e2460956" +checksum = "bc2323e10c92e1cf4d86e11538512e6dc03ceb586842970b6332af3d4046a046" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1355,13 +1356,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1374,7 +1375,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1394,7 +1395,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", "unicode-xid", ] @@ -1423,7 +1424,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -1445,7 +1446,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1465,7 +1466,7 @@ dependencies = [ "data-contracts", "derive_more 1.0.0", "dpp", - "env_logger 0.11.5", + "env_logger 0.11.6", "getrandom", "hex", "indexmap 2.7.0", @@ -1494,7 +1495,7 @@ dependencies = [ "sha2", "strum", "test-case", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -1535,7 +1536,7 @@ dependencies = [ "serde_json", "sqlparser", "tempfile", - "thiserror", + "thiserror 1.0.69", "tracing", ] @@ -1586,7 +1587,7 @@ dependencies = [ "strategy-tests", "tempfile", "tenderdash-abci", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tracing", @@ -1610,7 +1611,7 @@ dependencies = [ "serde", "serde_json", "tenderdash-abci", - "thiserror", + "thiserror 1.0.69", "tracing", ] @@ -1621,7 +1622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9c8d6ea916fadcd87e3d1ff4802b696d717c83519b47e76f267ab77e536dd5a" dependencies = [ "ed-derive", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1703,9 +1704,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1727,14 +1728,14 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -1755,9 +1756,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -1793,9 +1794,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.1" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" dependencies = [ "concurrent-queue", "parking", @@ -1804,9 +1805,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ "event-listener", "pin-project-lite", @@ -1831,7 +1832,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -1841,15 +1842,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "feature-flags-contract" @@ -1858,7 +1859,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1896,12 +1897,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1921,9 +1922,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "foreign-types" @@ -1979,9 +1980,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1994,9 +1995,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2004,15 +2005,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2021,38 +2022,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2066,6 +2067,19 @@ dependencies = [ "slab", ] +[[package]] +name = "generator" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" +dependencies = [ + "cfg-if", + "libc", + "log", + "rustversion", + "windows", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2079,9 +2093,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" +checksum = "2cb8bc4c28d15ade99c7e90b219f30da4be5c88e586277e8cbe886beeb868ab2" dependencies = [ "serde", "typenum", @@ -2102,15 +2116,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "gloo-timers" @@ -2140,8 +2154,7 @@ dependencies = [ [[package]] name = "grovedb" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d91e8f87926c834c7338d0c69a48816c043e0cddf0062a8a567483db2fb1e24" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ "axum", "bincode", @@ -2165,7 +2178,7 @@ dependencies = [ "reqwest", "sha2", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tower-http", @@ -2175,32 +2188,29 @@ dependencies = [ [[package]] name = "grovedb-costs" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360f7c8d3b20beafcbf3cde8754bbcfd201ae2a30ec7594a4b9678fd2fa3c7a8" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ "integer-encoding", "intmap", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "grovedb-epoch-based-storage-flags" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acec1b6962d99d7b079c0fd1532cd3a2c83a3d659ffd9fcf02edda4599334bb4" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ "grovedb-costs", "hex", "integer-encoding", "intmap", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "grovedb-merk" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72057865f239fdd24f92eaa8668acc0d618da168f330546577a62eda1701210e" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ "bincode", "blake3", @@ -2218,21 +2228,19 @@ dependencies = [ "integer-encoding", "num_cpus", "rand", - "thiserror", + "thiserror 1.0.69", "time", ] [[package]] name = "grovedb-path" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d96cc6106e5ca88e548d66f130b877b664da78be226dfdba555fc210f8508f4" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" [[package]] name = "grovedb-storage" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1c9b59bc9fa7123b8485f87f88a886dd109e7aff5f34a29a3812cb64eb897ff" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ "blake3", "grovedb-costs", @@ -2245,24 +2253,22 @@ dependencies = [ "rocksdb", "strum", "tempfile", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "grovedb-version" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4be0c1a1ef97068fe93212e7b6f349e0b44a9fc90063c8c28e110cfb8c2fcb2" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ - "thiserror", + "thiserror 1.0.69", "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grovedb-visualize" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5865f4335eb99644512a7d80d6b1698ba1099a8268fdfd3ffb1a3a32dcb4af28" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ "hex", "itertools 0.12.1", @@ -2271,18 +2277,17 @@ dependencies = [ [[package]] name = "grovedbg-types" version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921b9a29facf9d3f0de667cd1da083a34695ede9e7bfacd74bb5bd29f8f7c178" +source = "git+https://github.com/dashpay/grovedb?branch=develop#0cce59e05e19f6a154434676c850b24b13b47c36" dependencies = [ "serde", - "serde_with 3.9.0", + "serde_with 3.12.0", ] [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -2375,12 +2380,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -2449,18 +2448,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -2508,9 +2507,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2526,9 +2525,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -2547,9 +2546,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http", @@ -2564,9 +2563,9 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ "hyper", "hyper-util", @@ -2593,9 +2592,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2606,23 +2605,22 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -2634,6 +2632,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2642,12 +2758,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2698,9 +2825,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -2757,9 +2884,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -2788,7 +2915,7 @@ checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" dependencies = [ "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2800,7 +2927,7 @@ dependencies = [ "json-schema-compatibility-validator", "once_cell", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2870,18 +2997,18 @@ checksum = "744a4c881f502e98c2241d2e5f50040ac73b30194d64452bb6260393b53f0dc9" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2890,7 +3017,7 @@ version = "0.16.0+8.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce3d60bc059831dc1c83903fb45c103f75db65c5a7bf22272764d9cc683e348c" dependencies = [ - "bindgen 0.69.4", + "bindgen 0.69.5", "bzip2-sys", "cc", "glob", @@ -2902,9 +3029,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.19" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc53a7799a7496ebc9fd29f31f7df80e83c9bda5299768af5f9e59eeea74647" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" dependencies = [ "cc", "pkg-config", @@ -2913,15 +3040,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -2945,6 +3072,19 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + [[package]] name = "lru" version = "0.12.5" @@ -2956,9 +3096,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.10.0" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -2971,7 +3111,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3019,9 +3159,9 @@ dependencies = [ [[package]] name = "metrics-exporter-prometheus" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b6f8152da6d7892ff1b7a1c0fa3f435e92b5918ad67035c3bb432111d9a29b" +checksum = "12779523996a67c13c84906a876ac6fe4d07a6e1adb54978378e13f199251a62" dependencies = [ "base64 0.22.1", "http-body-util", @@ -3032,22 +3172,24 @@ dependencies = [ "metrics", "metrics-util", "quanta", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] [[package]] name = "metrics-util" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b482df36c13dd1869d73d14d28cd4855fbd6cfc32294bee109908a9f4a4ed7" +checksum = "dbd4884b1dd24f7d6628274a2f5ae22465c337c5ba065ec9b6edccddf8acc673" dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.15.2", "metrics", "quanta", + "rand", + "rand_xoshiro", "sketches-ddsketch", ] @@ -3075,29 +3217,19 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -3105,9 +3237,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c28b3fb6d753d28c20e826cd46ee611fda1cf3cde03a443a974043247c065a" +checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" dependencies = [ "cfg-if", "downcast", @@ -3119,37 +3251,35 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "341014e7f530314e9a1fdbc7400b244efea7122662c96bfa248c31da5bfb2020" +checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "moka" -version = "0.12.8" +version = "0.12.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cf62eb4dd975d2dde76432fb1075c49e3ee2331cf36f1f8fd4b66550d32b6f" +checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926" dependencies = [ "async-lock", - "async-trait", "crossbeam-channel", "crossbeam-epoch", "crossbeam-utils", "event-listener", "futures-util", - "once_cell", + "loom", "parking_lot", - "quanta", + "portable-atomic", "rustc_version", "smallvec", "tagptr", - "thiserror", - "triomphe", + "thiserror 1.0.69", "uuid", ] @@ -3190,7 +3320,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -3278,7 +3408,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -3368,26 +3498,26 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "object" -version = "0.36.3" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -3397,9 +3527,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -3418,7 +3548,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -3429,9 +3559,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -3456,9 +3586,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -3480,7 +3610,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3536,29 +3666,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -3578,9 +3708,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "platform-serialization" @@ -3596,7 +3726,7 @@ version = "1.8.0-dev.2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", "virtue 0.0.17", ] @@ -3617,7 +3747,7 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "treediff", ] @@ -3626,7 +3756,7 @@ name = "platform-value-convertible" version = "1.8.0-dev.2" dependencies = [ "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -3636,7 +3766,7 @@ dependencies = [ "bincode", "grovedb-version", "once_cell", - "thiserror", + "thiserror 1.0.69", "versioned-feature-core 1.0.0 (git+https://github.com/dashpay/versioned-feature-core)", ] @@ -3646,14 +3776,14 @@ version = "1.8.0-dev.2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -3664,24 +3794,24 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "powerfmt" @@ -3700,9 +3830,9 @@ dependencies = [ [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "predicates-core", @@ -3710,15 +3840,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -3736,12 +3866,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "483f8c21f64f3ea09fe0f30f5d48c3e8eefe5dac9129f0075f76593b4c1da705" dependencies = [ "proc-macro2", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -3756,50 +3886,27 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit 0.22.22", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" dependencies = [ "bytes", "prost-derive", @@ -3807,12 +3914,11 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" +checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" dependencies = [ - "bytes", - "heck 0.5.0", + "heck", "itertools 0.13.0", "log", "multimap", @@ -3822,28 +3928,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.75", + "syn 2.0.95", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" dependencies = [ "anyhow", "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "prost-types" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +checksum = "cc2f1e56baa61e93533aebc21af4d2134b70f66275e0fcdf3cbe43d77ff7e8fc" dependencies = [ "prost", ] @@ -3870,9 +3976,9 @@ dependencies = [ [[package]] name = "quanta" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +checksum = "3bd1fe6824cea6538803de3ff1bc0cf3949024db3d43c9643024bfb33a807c0e" dependencies = [ "crossbeam-utils", "libc", @@ -3885,9 +3991,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -3937,11 +4043,20 @@ dependencies = [ "rand_core", ] +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core", +] + [[package]] name = "raw-cpuid" -version = "11.1.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.6.0", ] @@ -3968,23 +4083,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -3998,13 +4113,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -4015,9 +4130,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rend" @@ -4039,9 +4154,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -4069,7 +4184,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -4150,7 +4265,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -4195,31 +4310,31 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "log", "once_cell", @@ -4232,32 +4347,30 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 3.2.0", ] [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -4272,9 +4385,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" @@ -4303,13 +4416,19 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -4364,7 +4483,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -4372,9 +4504,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -4382,15 +4514,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -4425,20 +4557,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "serde_json" -version = "1.0.126" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b863381a05ffefbc82571a2d893edf47b27fb0ebedbf582c39640e51abebef" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "indexmap 2.7.0", "itoa", @@ -4465,14 +4597,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -4507,9 +4639,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "base64 0.22.1", "chrono", @@ -4519,7 +4651,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "serde_with_macros 3.9.0", + "serde_with_macros 3.12.0", "time", ] @@ -4532,19 +4664,19 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -4759,11 +4891,11 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -4794,38 +4926,20 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.75", -] - [[package]] name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -4842,6 +4956,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + [[package]] name = "system-configuration" version = "0.6.1" @@ -4849,7 +4974,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -4877,12 +5002,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -4900,7 +5026,7 @@ dependencies = [ "semver", "serde_json", "tenderdash-proto", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tracing", @@ -4940,7 +5066,7 @@ dependencies = [ "tonic-build", "ureq", "walkdir", - "zip 2.2.0", + "zip 2.2.2", ] [[package]] @@ -4954,9 +5080,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "test-case" @@ -4976,7 +5102,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -4987,48 +5113,48 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", "test-case-core", ] [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", ] [[package]] -name = "thiserror-impl" -version = "1.0.64" +name = "thiserror" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.75", + "thiserror-impl 2.0.10", ] [[package]] -name = "thiserror-impl-no-std" -version = "2.0.2" +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.95", ] [[package]] -name = "thiserror-no-std" -version = "2.0.2" +name = "thiserror-impl" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" dependencies = [ - "thiserror-impl-no-std", + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] @@ -5052,9 +5178,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -5073,14 +5199,24 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -5093,9 +5229,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -5108,9 +5244,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -5127,13 +5263,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -5148,20 +5284,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -5183,9 +5318,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -5203,7 +5338,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.22", ] [[package]] @@ -5228,26 +5363,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.7.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow 0.6.22", ] [[package]] @@ -5295,7 +5419,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -5372,7 +5496,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] @@ -5398,9 +5522,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -5408,9 +5532,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -5433,12 +5557,6 @@ version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2ce481b2b7c2534fe7b5242cccebf37f9084392665c6a3783c414a1bada5432" -[[package]] -name = "triomphe" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" - [[package]] name = "try-lock" version = "0.2.5" @@ -5462,39 +5580,21 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "untrusted" @@ -5504,34 +5604,43 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.11.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30e6f97efe1fa43535ee241ee76967d3ff6ff3953ebb430d8d55c5393029e7b" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" dependencies = [ "base64 0.22.1", "flate2", - "litemap", "log", "once_cell", "rustls", "rustls-pki-types", "url", "webpki-roots", - "yoke", - "zerofrom", ] [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -5540,9 +5649,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "rand", @@ -5591,21 +5700,20 @@ checksum = "7302ac74a033bf17b6e609ceec0f891ca9200d502d31f02dc7908d3d98767c9d" [[package]] name = "vsss-rs" -version = "5.0.0-rc1" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9860fb75908021ae4cc125917c9763134f7f236a716d181ed644627783230c5d" +checksum = "d100efd4ff7ccba787b1b1bb0045c2fe1df5ad75f74e3a63f738635d87d50da4" dependencies = [ "crypto-bigint", "elliptic-curve", "elliptic-curve-tools", - "generic-array 1.1.0", + "generic-array 1.1.1", "hex", "num", "rand_core", "serde", "sha3", "subtle", - "thiserror-no-std", "zeroize", ] @@ -5626,7 +5734,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5665,7 +5773,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", "wasm-bindgen-shared", ] @@ -5700,7 +5808,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5728,7 +5836,7 @@ dependencies = [ "serde", "serde-wasm-bindgen", "serde_json", - "thiserror", + "thiserror 1.0.69", "wasm-bindgen", "wasm-bindgen-futures", "wasm-logger", @@ -5758,9 +5866,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] @@ -5808,13 +5916,58 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets", +] + [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] @@ -5825,7 +5978,7 @@ checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -5834,7 +5987,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -5844,16 +5997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -5862,7 +6006,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -5871,22 +6015,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -5895,46 +6024,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5947,48 +6058,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -6006,9 +6093,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" dependencies = [ "memchr", ] @@ -6023,9 +6110,21 @@ dependencies = [ "serde", "serde_json", "serde_repr", - "thiserror", + "thiserror 1.0.69", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -6043,15 +6142,28 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", + "yoke-derive", "zerofrom", ] +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure 0.13.1", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -6070,14 +6182,29 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", ] [[package]] name = "zerofrom" -version = "0.1.4" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure 0.13.1", +] [[package]] name = "zeroize" @@ -6097,7 +6224,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.95", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] @@ -6122,9 +6271,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.2.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ "arbitrary", "crc32fast", @@ -6133,7 +6282,7 @@ dependencies = [ "flate2", "indexmap 2.7.0", "memchr", - "thiserror", + "thiserror 2.0.10", "zopfli", ] diff --git a/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot b/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot index a818a356409..7ca0f15c8f1 100644 --- a/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot +++ b/packages/dashmate/templates/platform/drive/tenderdash/config.toml.dot @@ -97,6 +97,10 @@ transport = "routed" #] grpc-concurrency = [ { "check_tx" = {{= it.platform.drive.tenderdash.mempool.maxConcurrentCheckTx }} }, + { "list_snapshots" = {{= it.platform.drive.tenderdash.mempool.maxConcurrentCheckTx }} }, + { "load_snapshot_chunk" = {{= it.platform.drive.tenderdash.mempool.maxConcurrentCheckTx }} }, + { "offer_snapshot" = 1 }, + { "apply_snapshot_chunk" = 1 }, ] @@ -414,7 +418,7 @@ ttl-num-blocks = {{=it.platform.drive.tenderdash.mempool.ttlNumBlocks}} # the network to take and serve state machine snapshots. State sync is not attempted if the node # has any local state (LastBlockHeight > 0). The node will have a truncated block history, # starting from the height of the snapshot. -enable = false +enable = true # State sync uses light client verification to verify state. This can be done either through the # P2P layer or RPC layer. Set this to true to use the P2P layer. If false (default), RPC layer diff --git a/packages/rs-drive-abci/.env.local b/packages/rs-drive-abci/.env.local index c0e3ac3347a..a5f6eed657d 100644 --- a/packages/rs-drive-abci/.env.local +++ b/packages/rs-drive-abci/.env.local @@ -12,6 +12,12 @@ ABCI_LOG_STDOUT_FORMAT=pretty ABCI_LOG_STDOUT_COLOR=true DB_PATH=/tmp/db + +CHECKPOINTS_PATH=${DB_PATH}/checkpoints + +# GroveDB database file +GROVEDB_LATEST_FILE=${DB_PATH}/latest_state + REJECTIONS_PATH=/tmp/rejected # Cache size for Data Contracts diff --git a/packages/rs-drive-abci/src/abci/app/consensus.rs b/packages/rs-drive-abci/src/abci/app/consensus.rs index a1f08429847..0740c5c4496 100644 --- a/packages/rs-drive-abci/src/abci/app/consensus.rs +++ b/packages/rs-drive-abci/src/abci/app/consensus.rs @@ -1,10 +1,14 @@ -use crate::abci::app::{BlockExecutionApplication, PlatformApplication, TransactionalApplication}; +use crate::abci::app::{ + BlockExecutionApplication, PlatformApplication, SnapshotFetchingApplication, + SnapshotManagerApplication, TransactionalApplication, +}; use crate::abci::handler; use crate::abci::handler::error::error_into_exception; use crate::error::execution::ExecutionError; use crate::error::Error; use crate::execution::types::block_execution_context::BlockExecutionContext; use crate::platform_types::platform::Platform; +use crate::platform_types::snapshot::{SnapshotFetchingSession, SnapshotManager}; use crate::rpc::core::CoreRPCLike; use dpp::version::PlatformVersion; use drive::grovedb::Transaction; @@ -16,46 +20,80 @@ use tenderdash_abci::proto::abci as proto; /// /// AbciApp implements logic that should be triggered when Tenderdash performs various operations, like /// creating new proposal or finalizing new block. -pub struct ConsensusAbciApplication<'a, C> { +/// 'p: 'tx, means that Platform must outlive the transaction +pub struct ConsensusAbciApplication<'p, C> { /// Platform - platform: &'a Platform, + platform: &'p Platform, /// The current GroveDb transaction - transaction: RwLock>>, + transaction: RwLock>>, /// The current block execution context block_execution_context: RwLock>, + /// The State sync session + snapshot_fetching_session: RwLock>>, + /// The snapshot manager + snapshot_manager: SnapshotManager, } -impl<'a, C> ConsensusAbciApplication<'a, C> { +impl<'p, C> ConsensusAbciApplication<'p, C> { /// Create new ABCI app - pub fn new(platform: &'a Platform) -> Self { + pub fn new(platform: &'p Platform) -> Self { + let snapshot_manager = SnapshotManager::new( + platform + .config + .state_sync_config + .checkpoints_path + .to_str() + .unwrap() + .to_string(), + platform.config.state_sync_config.max_num_snapshots, + platform.config.state_sync_config.snapshots_frequency, + ); Self { platform, transaction: Default::default(), block_execution_context: Default::default(), + snapshot_fetching_session: Default::default(), + snapshot_manager, } } } -impl<'a, C> PlatformApplication for ConsensusAbciApplication<'a, C> { +impl<'p, C> PlatformApplication for ConsensusAbciApplication<'p, C> { fn platform(&self) -> &Platform { self.platform } } -impl<'a, C> BlockExecutionApplication for ConsensusAbciApplication<'a, C> { +impl<'p, C> SnapshotManagerApplication for ConsensusAbciApplication<'p, C> { + fn snapshot_manager(&self) -> &SnapshotManager { + &self.snapshot_manager + } +} + +impl<'p, C> SnapshotFetchingApplication<'p, C> for ConsensusAbciApplication<'p, C> { + fn snapshot_fetching_session(&self) -> &RwLock>> { + &self.snapshot_fetching_session + } + + fn platform(&self) -> &'p Platform { + self.platform + } +} + +impl<'p, C> BlockExecutionApplication for ConsensusAbciApplication<'p, C> { fn block_execution_context(&self) -> &RwLock> { &self.block_execution_context } } -impl<'a, C> TransactionalApplication<'a> for ConsensusAbciApplication<'a, C> { +impl<'p, C> TransactionalApplication<'p> for ConsensusAbciApplication<'p, C> { /// create and store a new transaction fn start_transaction(&self) { let transaction = self.platform.drive.grove.start_transaction(); self.transaction.write().unwrap().replace(transaction); } - fn transaction(&self) -> &RwLock>> { + fn transaction(&self) -> &RwLock>> { &self.transaction } @@ -77,13 +115,13 @@ impl<'a, C> TransactionalApplication<'a> for ConsensusAbciApplication<'a, C> { } } -impl<'a, C> Debug for ConsensusAbciApplication<'a, C> { +impl<'p, C> Debug for ConsensusAbciApplication<'p, C> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "") } } -impl<'a, C> tenderdash_abci::Application for ConsensusAbciApplication<'a, C> +impl<'p, C> tenderdash_abci::Application for ConsensusAbciApplication<'p, C> where C: CoreRPCLike, { @@ -149,4 +187,18 @@ where ) -> Result { handler::verify_vote_extension(self, request).map_err(error_into_exception) } + + fn offer_snapshot( + &self, + request: proto::RequestOfferSnapshot, + ) -> Result { + handler::offer_snapshot(self, request).map_err(error_into_exception) + } + + fn apply_snapshot_chunk( + &self, + request: proto::RequestApplySnapshotChunk, + ) -> Result { + handler::apply_snapshot_chunk(self, request).map_err(error_into_exception) + } } diff --git a/packages/rs-drive-abci/src/abci/app/full.rs b/packages/rs-drive-abci/src/abci/app/full.rs index 55771162ad8..03435e4cd6b 100644 --- a/packages/rs-drive-abci/src/abci/app/full.rs +++ b/packages/rs-drive-abci/src/abci/app/full.rs @@ -1,10 +1,14 @@ -use crate::abci::app::{BlockExecutionApplication, PlatformApplication, TransactionalApplication}; +use crate::abci::app::{ + BlockExecutionApplication, PlatformApplication, SnapshotFetchingApplication, + SnapshotManagerApplication, TransactionalApplication, +}; use crate::abci::handler; use crate::abci::handler::error::error_into_exception; use crate::error::execution::ExecutionError; use crate::error::Error; use crate::execution::types::block_execution_context::BlockExecutionContext; use crate::platform_types::platform::Platform; +use crate::platform_types::snapshot::{SnapshotFetchingSession, SnapshotManager}; use crate::rpc::core::CoreRPCLike; use dpp::version::PlatformVersion; use drive::grovedb::Transaction; @@ -23,15 +27,32 @@ pub struct FullAbciApplication<'a, C> { pub transaction: RwLock>>, /// The current block execution context pub block_execution_context: RwLock>, + /// The State sync session + pub snapshot_fetching_session: RwLock>>, + /// The snapshot manager + pub snapshot_manager: SnapshotManager, } impl<'a, C> FullAbciApplication<'a, C> { /// Create new ABCI app pub fn new(platform: &'a Platform) -> Self { + let snapshot_manager = SnapshotManager::new( + platform + .config + .state_sync_config + .checkpoints_path + .to_str() + .unwrap() + .to_string(), + platform.config.state_sync_config.max_num_snapshots, + platform.config.state_sync_config.snapshots_frequency, + ); Self { platform, transaction: Default::default(), block_execution_context: Default::default(), + snapshot_fetching_session: Default::default(), + snapshot_manager, } } } @@ -42,6 +63,22 @@ impl<'a, C> PlatformApplication for FullAbciApplication<'a, C> { } } +impl<'a, C> SnapshotManagerApplication for FullAbciApplication<'a, C> { + fn snapshot_manager(&self) -> &SnapshotManager { + &self.snapshot_manager + } +} + +impl<'a, C> SnapshotFetchingApplication<'a, C> for FullAbciApplication<'a, C> { + fn snapshot_fetching_session(&self) -> &RwLock>> { + &self.snapshot_fetching_session + } + + fn platform(&self) -> &'a Platform { + self.platform + } +} + impl<'a, C> BlockExecutionApplication for FullAbciApplication<'a, C> { fn block_execution_context(&self) -> &RwLock> { &self.block_execution_context @@ -150,4 +187,32 @@ where ) -> Result { handler::verify_vote_extension(self, request).map_err(error_into_exception) } + + fn offer_snapshot( + &self, + request: proto::RequestOfferSnapshot, + ) -> Result { + handler::offer_snapshot(self, request).map_err(error_into_exception) + } + + fn apply_snapshot_chunk( + &self, + request: proto::RequestApplySnapshotChunk, + ) -> Result { + handler::apply_snapshot_chunk(self, request).map_err(error_into_exception) + } + + fn list_snapshots( + &self, + request: proto::RequestListSnapshots, + ) -> Result { + handler::list_snapshots(self, request).map_err(error_into_exception) + } + + fn load_snapshot_chunk( + &self, + request: proto::RequestLoadSnapshotChunk, + ) -> Result { + handler::load_snapshot_chunk(self, request).map_err(error_into_exception) + } } diff --git a/packages/rs-drive-abci/src/abci/app/mod.rs b/packages/rs-drive-abci/src/abci/app/mod.rs index d86290b566b..e9c27e11897 100644 --- a/packages/rs-drive-abci/src/abci/app/mod.rs +++ b/packages/rs-drive-abci/src/abci/app/mod.rs @@ -8,13 +8,16 @@ mod consensus; /// Convert state transition execution result into ABCI response pub mod execution_result; mod full; +mod state_source; use crate::execution::types::block_execution_context::BlockExecutionContext; +use crate::platform_types::snapshot::{SnapshotFetchingSession, SnapshotManager}; use crate::rpc::core::DefaultCoreRPC; pub use check_tx::CheckTxAbciApplication; pub use consensus::ConsensusAbciApplication; use dpp::version::PlatformVersion; pub use full::FullAbciApplication; +pub use state_source::StateSourceAbciApplication; /// Platform-based ABCI application pub trait PlatformApplication { @@ -22,13 +25,19 @@ pub trait PlatformApplication { fn platform(&self) -> &Platform; } +/// Platform-based ABCI application +pub trait SnapshotManagerApplication { + /// Returns Platform + fn snapshot_manager(&self) -> &SnapshotManager; +} + /// Transactional ABCI application -pub trait TransactionalApplication<'a> { +pub trait TransactionalApplication<'p> { /// Creates and keeps a new transaction fn start_transaction(&self); /// Returns the current transaction - fn transaction(&self) -> &RwLock>>; + fn transaction(&self) -> &RwLock>>; /// Commits created transaction fn commit_transaction(&self, platform_version: &PlatformVersion) -> Result<(), Error>; @@ -39,3 +48,12 @@ pub trait BlockExecutionApplication { /// Returns the current block execution context fn block_execution_context(&self) -> &RwLock>; } + +/// Application that can maintain state sync +pub trait SnapshotFetchingApplication<'p, C> { + /// Returns the current snapshot fetching session + fn snapshot_fetching_session(&self) -> &RwLock>>; + + /// Returns platform reference + fn platform(&self) -> &'p Platform; +} diff --git a/packages/rs-drive-abci/src/abci/app/state_source.rs b/packages/rs-drive-abci/src/abci/app/state_source.rs new file mode 100644 index 00000000000..c3b8f2c19c9 --- /dev/null +++ b/packages/rs-drive-abci/src/abci/app/state_source.rs @@ -0,0 +1,100 @@ +use crate::abci::app::{PlatformApplication, SnapshotManagerApplication}; +use crate::abci::handler; +use crate::platform_types::platform::Platform; +use crate::platform_types::snapshot::SnapshotManager; +use crate::rpc::core::CoreRPCLike; +use async_trait::async_trait; +use std::fmt::Debug; +use std::sync::Arc; +use tenderdash_abci::proto::abci as proto; +use tenderdash_abci::proto::abci::abci_application_server as grpc_abci_server; +use tenderdash_abci::proto::tonic; + +/// AbciApp is an implementation of gRPC ABCI Application, as defined by Tenderdash. +/// +/// AbciApp implements logic that should be triggered when Tenderdash performs various operations, like +/// creating new proposal or finalizing new block. +pub struct StateSourceAbciApplication +where + C: CoreRPCLike + Send + Sync + 'static, +{ + /// Platform + platform: Arc>, + /// Snapshot manager + snapshot_manager: SnapshotManager, +} + +impl PlatformApplication for StateSourceAbciApplication +where + C: CoreRPCLike + Send + Sync + 'static, +{ + fn platform(&self) -> &Platform { + self.platform.as_ref() + } +} + +impl SnapshotManagerApplication for StateSourceAbciApplication +where + C: CoreRPCLike + Send + Sync + 'static, +{ + fn snapshot_manager(&self) -> &SnapshotManager { + &self.snapshot_manager + } +} + +impl StateSourceAbciApplication +where + C: CoreRPCLike + Send + Sync + 'static, +{ + /// Create new ABCI app + pub fn new(platform: Arc>) -> Self { + let snapshot_manager = SnapshotManager::new( + platform + .config + .state_sync_config + .checkpoints_path + .to_str() + .unwrap() + .to_string(), + platform.config.state_sync_config.max_num_snapshots, + platform.config.state_sync_config.snapshots_frequency, + ); + Self { + platform, + snapshot_manager, + } + } +} + +impl Debug for StateSourceAbciApplication +where + C: CoreRPCLike + Send + Sync + 'static, +{ + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "") + } +} + +#[async_trait] +impl grpc_abci_server::AbciApplication for StateSourceAbciApplication +where + C: CoreRPCLike + Send + Sync + 'static, +{ + async fn list_snapshots( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + handler::list_snapshots(self, request.into_inner()) + .map(tonic::Response::new) + .map_err(|e| tonic::Status::internal(format!("list_snapshots failed: {}", e))) + } + + async fn load_snapshot_chunk( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + handler::load_snapshot_chunk(self, request.into_inner()) + .map(tonic::Response::new) + .map_err(|e| tonic::Status::internal(format!("load_snapshot_chunk failed: {}", e))) + } +} diff --git a/packages/rs-drive-abci/src/abci/config.rs b/packages/rs-drive-abci/src/abci/config.rs index 62779edd6b7..04d2f75961d 100644 --- a/packages/rs-drive-abci/src/abci/config.rs +++ b/packages/rs-drive-abci/src/abci/config.rs @@ -2,6 +2,7 @@ use crate::utils::from_opt_str_or_number; use serde::{Deserialize, Serialize}; +use std::path::PathBuf; // We allow changes in the ABCI configuration, but there should be a social process // involved in making this change. @@ -61,3 +62,55 @@ impl Default for AbciConfig { } } } + +/// Configuration for StateSync feature +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct StateSyncAbciConfig { + /// Enable snapshot + pub snapshots_enabled: bool, + + /// Path to checkpoints + pub checkpoints_path: PathBuf, + + /// Frequency of snapshot creation (in blocks) + pub snapshots_frequency: i64, + + /// Maximum number of snapshots to keep + pub max_num_snapshots: usize, +} + +impl Default for StateSyncAbciConfig { + fn default() -> Self { + Self::default_mainnet() + } +} + +#[allow(missing_docs)] +impl StateSyncAbciConfig { + pub fn default_local() -> Self { + Self { + snapshots_enabled: true, + checkpoints_path: PathBuf::from("/var/lib/dash-platform/checkpoints"), + snapshots_frequency: 3, + max_num_snapshots: 10, + } + } + + pub fn default_testnet() -> Self { + Self { + snapshots_enabled: true, + checkpoints_path: PathBuf::from("/var/lib/dash-platform/data/checkpoints"), + snapshots_frequency: 3, + max_num_snapshots: 10, + } + } + + pub fn default_mainnet() -> Self { + Self { + snapshots_enabled: true, + checkpoints_path: PathBuf::from("/var/lib/dash-platform/data/checkpoints"), + snapshots_frequency: 3, + max_num_snapshots: 10, + } + } +} diff --git a/packages/rs-drive-abci/src/abci/error.rs b/packages/rs-drive-abci/src/abci/error.rs index 857321a16e8..56cd78deafd 100644 --- a/packages/rs-drive-abci/src/abci/error.rs +++ b/packages/rs-drive-abci/src/abci/error.rs @@ -54,6 +54,14 @@ pub enum AbciError { #[error("bad commit signature: {0}")] BadCommitSignature(String), + /// Client State sync bad request + #[error("bad request state sync: {0}")] + StateSyncBadRequest(String), + + /// Server State sync bad request + #[error("internal error state sync: {0}")] + StateSyncInternalError(String), + /// The chain lock received was invalid #[error("invalid chain lock: {0}")] InvalidChainLock(String), diff --git a/packages/rs-drive-abci/src/abci/handler/apply_snapshot_chunk.rs b/packages/rs-drive-abci/src/abci/handler/apply_snapshot_chunk.rs new file mode 100644 index 00000000000..782a1d7c7a3 --- /dev/null +++ b/packages/rs-drive-abci/src/abci/handler/apply_snapshot_chunk.rs @@ -0,0 +1,114 @@ +use drive::grovedb_storage::rocksdb_storage::RocksDbStorage; +use tenderdash_abci::proto::abci as proto; +use crate::abci::app::{SnapshotFetchingApplication, SnapshotManagerApplication}; +use crate::abci::AbciError; +use crate::error::Error; +use dpp::version::PlatformVersion; + +pub fn apply_snapshot_chunk<'a, 'db: 'a, A, C: 'db>( + app: &'a A, + request: proto::RequestApplySnapshotChunk, +) -> Result +where + A: SnapshotManagerApplication + SnapshotFetchingApplication<'db, C> + 'db, +{ + tracing::trace!( + "[state_sync] api apply_snapshot_chunk chunk_id:{}", + hex::encode(&request.chunk_id) + ); + let mut is_state_sync_completed: bool = false; + // Lock first the RwLock + let mut session_write_guard = app.snapshot_fetching_session().write().map_err(|_| { + AbciError::StateSyncInternalError( + "apply_snapshot_chunk unable to lock session (poisoned)".to_string(), + ) + })?; + { + let session = session_write_guard + .as_mut() + .ok_or(AbciError::StateSyncInternalError( + "apply_snapshot_chunk unable to lock session".to_string(), + ))?; + let next_chunk_ids = session + .state_sync_info + .apply_chunk( + &app.platform().drive.grove, + &request.chunk_id, + request.chunk, + 1u16, + &PlatformVersion::latest().drive.grove_version, + ) + .map_err(|e| { + AbciError::StateSyncInternalError(format!( + "apply_snapshot_chunk unable to apply chunk:{}", + e + )) + })?; + if next_chunk_ids.is_empty() && session.state_sync_info.is_sync_completed() { + is_state_sync_completed = true; + } + if !is_state_sync_completed { + return Ok(proto::ResponseApplySnapshotChunk { + result: proto::response_apply_snapshot_chunk::Result::Accept.into(), + refetch_chunks: vec![], // TODO: Check when this is needed + reject_senders: vec![], // TODO: Check when this is needed + next_chunks: next_chunk_ids, + }); + } + } + { + // State sync is completed, consume session and commit it + let session = session_write_guard + .take() + .ok_or(AbciError::StateSyncInternalError( + "apply_snapshot_chunk unable to lock session (poisoned)".to_string(), + ))?; + let state_sync_info = session.state_sync_info; + app.platform() + .drive + .grove + .commit_session(state_sync_info) + .map_err(|e| { + AbciError::StateSyncInternalError( + "apply_snapshot_chunk unable to commit session".to_string(), + ) + })?; + println!("[state_sync] state sync completed. verifying"); + let incorrect_hashes = app + .platform() + .drive + .grove + .verify_grovedb( + None, + true, + false, + &PlatformVersion::latest().drive.grove_version, + ) + .map_err(|e| { + AbciError::StateSyncInternalError( + "apply_snapshot_chunk unable to verify grovedb".to_string(), + ) + })?; + if incorrect_hashes.len() > 0 { + for element in incorrect_hashes.keys() { + let subtree_path: Vec<&[u8]> = element.iter().map(|vec| vec.as_slice()).collect(); + let path: &[&[u8]] = &subtree_path; + let prefix = RocksDbStorage::build_prefix(path.into()).unwrap(); + println!( + "[state_sync] incorrect hash in prefix:{:?}", + hex::encode(prefix) + ); + } + Err(AbciError::StateSyncInternalError(format!( + "apply_snapshot_chunk grovedb verification failed with {} incorrect hashes", + incorrect_hashes.len() + )))?; + } + return Ok(proto::ResponseApplySnapshotChunk { + result: proto::response_apply_snapshot_chunk::Result::Accept.into(), + refetch_chunks: vec![], + reject_senders: vec![], + next_chunks: vec![], + }); + } +} diff --git a/packages/rs-drive-abci/src/abci/handler/finalize_block.rs b/packages/rs-drive-abci/src/abci/handler/finalize_block.rs index 852f85cc6b8..62f23be2aa0 100644 --- a/packages/rs-drive-abci/src/abci/handler/finalize_block.rs +++ b/packages/rs-drive-abci/src/abci/handler/finalize_block.rs @@ -1,4 +1,7 @@ -use crate::abci::app::{BlockExecutionApplication, PlatformApplication, TransactionalApplication}; +use crate::abci::app::{ + BlockExecutionApplication, PlatformApplication, SnapshotManagerApplication, + TransactionalApplication, +}; use crate::error::execution::ExecutionError; use crate::error::Error; use crate::execution::types::block_execution_context::v0::BlockExecutionContextV0Getters; @@ -14,7 +17,10 @@ pub fn finalize_block<'a, A, C>( request: proto::RequestFinalizeBlock, ) -> Result where - A: PlatformApplication + TransactionalApplication<'a> + BlockExecutionApplication, + A: PlatformApplication + + SnapshotManagerApplication + + TransactionalApplication<'a> + + BlockExecutionApplication, C: CoreRPCLike, { let _timer = crate::metrics::abci_request_duration("finalize_block"); @@ -94,7 +100,18 @@ where app.platform() .committed_block_height_guard - .store(block_height, Ordering::Relaxed); + .store(block_height.clone(), Ordering::Relaxed); + + if (app.platform().config.state_sync_config.snapshots_enabled) { + app.snapshot_manager() + .create_snapshot(&app.platform().drive.grove, block_height as i64) + .map_err(|e| { + Error::Execution(ExecutionError::CorruptedDriveResponse(format!( + "Unable to create snapshot:{}", + e + ))) + })?; + } Ok(proto::ResponseFinalizeBlock { retain_height: 0 }) } diff --git a/packages/rs-drive-abci/src/abci/handler/list_snapshots.rs b/packages/rs-drive-abci/src/abci/handler/list_snapshots.rs new file mode 100644 index 00000000000..a69c26c2939 --- /dev/null +++ b/packages/rs-drive-abci/src/abci/handler/list_snapshots.rs @@ -0,0 +1,52 @@ +use crate::abci::app::{PlatformApplication, SnapshotManagerApplication}; +use crate::abci::handler::error::error_into_exception; +use crate::abci::AbciError; +use crate::error::Error; +use crate::platform_types::snapshot::Snapshot; +use crate::rpc::core::CoreRPCLike; +use drive::grovedb::GroveDb; +use tenderdash_abci::proto::abci as proto; + +pub fn list_snapshots( + app: &A, + _: proto::RequestListSnapshots, +) -> Result +where + A: SnapshotManagerApplication + PlatformApplication, + C: CoreRPCLike, +{ + println!("[state_sync] api list_snapshots called"); + tracing::trace!("[state_sync] api list_snapshots called"); + let snapshots = app + .snapshot_manager() + .get_snapshots(&*app.platform().drive.grove) + .map_err(|e| { + AbciError::StateSyncInternalError(format!( + "list_snapshots unable to get snapshots: {}", + e + )) + })?; + + let mut response: proto::ResponseListSnapshots = Default::default(); + let convert_snapshots = |s: Snapshot| -> proto::Snapshot { + proto::Snapshot { + height: s.height as u64, + version: s.version as u32, + hash: s.hash.to_vec(), + metadata: s.metadata, + } + }; + let checkpoint_exists = |s: &Snapshot| -> bool { + match GroveDb::open(&s.path) { + Ok(_) => true, + Err(_) => false, + } + }; + + response.snapshots = snapshots + .into_iter() + .filter(checkpoint_exists) + .map(convert_snapshots) + .collect(); + Ok(response) +} diff --git a/packages/rs-drive-abci/src/abci/handler/load_snapshot_chunk.rs b/packages/rs-drive-abci/src/abci/handler/load_snapshot_chunk.rs new file mode 100644 index 00000000000..6af48949c31 --- /dev/null +++ b/packages/rs-drive-abci/src/abci/handler/load_snapshot_chunk.rs @@ -0,0 +1,47 @@ +use crate::abci::app::{PlatformApplication, SnapshotManagerApplication}; +use drive::grovedb::GroveDb; +use tenderdash_abci::proto::abci as proto; +//use platform_version::version::PlatformVersion; +use crate::abci::handler::error::error_into_exception; +use crate::abci::AbciError; +use crate::error::Error; +use crate::rpc::core::CoreRPCLike; +use dpp::version::PlatformVersion; + +pub fn load_snapshot_chunk( + app: &A, + request: proto::RequestLoadSnapshotChunk, +) -> Result +where + A: SnapshotManagerApplication + PlatformApplication, + C: CoreRPCLike, +{ + tracing::trace!( + "[state_sync] api load_snapshot_chunk height:{} chunk_id:{}", + request.height, + hex::encode(&request.chunk_id) + ); + let matched_snapshot = app + .snapshot_manager() + .get_snapshot_at_height(&*app.platform().drive.grove, request.height as i64) + .map_err(|_| AbciError::StateSyncInternalError("load_snapshot_chunk failed".to_string()))? + .ok_or_else(|| { + AbciError::StateSyncInternalError("load_snapshot_chunk failed".to_string()) + })?; + let db = GroveDb::open(&matched_snapshot.path).map_err(|e| { + AbciError::StateSyncInternalError(format!("load_snapshot_chunk failed:{}", e)) + })?; + let chunk = db + .fetch_chunk( + &request.chunk_id, + None, + request.version as u16, + &PlatformVersion::latest().drive.grove_version, + ) + .map_err(|e| { + AbciError::StateSyncInternalError(format!("load_snapshot_chunk failed:{}", e)) + })?; + let mut response = proto::ResponseLoadSnapshotChunk::default(); + response.chunk = chunk; + Ok(response) +} diff --git a/packages/rs-drive-abci/src/abci/handler/mod.rs b/packages/rs-drive-abci/src/abci/handler/mod.rs index 8acd0737ebe..443758734a3 100644 --- a/packages/rs-drive-abci/src/abci/handler/mod.rs +++ b/packages/rs-drive-abci/src/abci/handler/mod.rs @@ -35,6 +35,7 @@ //! can only make changes that are backwards compatible. Otherwise new calls must be made instead. //! +mod apply_snapshot_chunk; mod check_tx; mod echo; pub mod error; @@ -42,16 +43,23 @@ mod extend_vote; mod finalize_block; mod info; mod init_chain; +mod list_snapshots; +mod load_snapshot_chunk; +mod offer_snapshot; mod prepare_proposal; mod process_proposal; mod verify_vote_extension; +pub use apply_snapshot_chunk::apply_snapshot_chunk; pub use check_tx::check_tx; pub use echo::echo; pub use extend_vote::extend_vote; pub use finalize_block::finalize_block; pub use info::info; pub use init_chain::init_chain; +pub use list_snapshots::list_snapshots; +pub use load_snapshot_chunk::load_snapshot_chunk; +pub use offer_snapshot::offer_snapshot; pub use prepare_proposal::prepare_proposal; pub use process_proposal::process_proposal; pub use verify_vote_extension::verify_vote_extension; diff --git a/packages/rs-drive-abci/src/abci/handler/offer_snapshot.rs b/packages/rs-drive-abci/src/abci/handler/offer_snapshot.rs new file mode 100644 index 00000000000..597c8f4edba --- /dev/null +++ b/packages/rs-drive-abci/src/abci/handler/offer_snapshot.rs @@ -0,0 +1,101 @@ +use crate::abci::app::{SnapshotFetchingApplication, SnapshotManagerApplication}; +use crate::abci::AbciError; +use crate::error::Error; +use crate::platform_types::snapshot::SnapshotFetchingSession; +use dpp::version::PlatformVersion; +use drive::grovedb::replication::CURRENT_STATE_SYNC_VERSION; +use tenderdash_abci::proto::abci as proto; + +pub fn offer_snapshot<'a, 'db: 'a, A, C: 'db>( + app: &'a A, + request: proto::RequestOfferSnapshot, +) -> Result +where + A: SnapshotManagerApplication + SnapshotFetchingApplication<'db, C> + 'db, +{ + let request_app_hash: [u8; 32] = request.app_hash.try_into().map_err(|_| { + AbciError::StateSyncBadRequest("offer_snapshot invalid app_hash length".to_string()) + })?; + let offered_snapshot = request.snapshot.ok_or(AbciError::StateSyncBadRequest( + "offer_snapshot empty snapshot in request".to_string(), + ))?; + tracing::trace!( + "[state_sync] api offer_snapshot height:{}", + offered_snapshot.height + ); + let mut session_write_guard = app.snapshot_fetching_session().write().map_err(|_| { + AbciError::StateSyncInternalError( + "offer_snapshot unable to lock session (poisoned)".to_string(), + ) + })?; + if session_write_guard.is_none() { + // No session currently, start a new one. + app.platform().drive.grove.wipe().map_err(|e| { + AbciError::StateSyncInternalError(format!( + "offer_snapshot unable to wipe grovedb:{}", + e + )) + })?; + let state_sync_info = app + .platform() + .drive + .grove + .start_snapshot_syncing( + request_app_hash, + CURRENT_STATE_SYNC_VERSION, + &PlatformVersion::latest().drive.grove_version, + ) + .map_err(|e| { + AbciError::StateSyncInternalError(format!( + "offer_snapshot unable to start snapshot syncing session:{}", + e + )) + })?; + let session = SnapshotFetchingSession::new( + offered_snapshot, + request_app_hash.to_vec(), + state_sync_info, + ); + *session_write_guard = Some(session); + let response = proto::ResponseOfferSnapshot::default(); + Ok(response) + } else { + // Already syncing another snapshot session + let session = session_write_guard + .as_mut() + .ok_or(AbciError::StateSyncInternalError( + "offer_snapshot unable to lock session".to_string(), + ))?; + if offered_snapshot.height <= session.snapshot.height { + return Err(Error::Abci(AbciError::StateSyncBadRequest( + "offer_snapshot already syncing newest height".to_string(), + ))); + } + app.platform().drive.grove.wipe().map_err(|e| { + AbciError::StateSyncInternalError(format!( + "offer_snapshot unable to wipe grovedb:{}", + e + )) + })?; + let state_sync_info = app + .platform() + .drive + .grove + .start_snapshot_syncing( + request_app_hash, + CURRENT_STATE_SYNC_VERSION, + &PlatformVersion::latest().drive.grove_version, + ) + .map_err(|e| { + AbciError::StateSyncInternalError(format!( + "offer_snapshot unable to start snapshot syncing session:{}", + e + )) + })?; + session.snapshot = offered_snapshot; + session.app_hash = request_app_hash.to_vec(); + session.state_sync_info = state_sync_info; + let response = proto::ResponseOfferSnapshot::default(); + Ok(response) + } +} diff --git a/packages/rs-drive-abci/src/config.rs b/packages/rs-drive-abci/src/config.rs index 1e8f5f3c264..d76365b7322 100644 --- a/packages/rs-drive-abci/src/config.rs +++ b/packages/rs-drive-abci/src/config.rs @@ -1,3 +1,4 @@ +use crate::abci::config::StateSyncAbciConfig; use crate::logging::LogConfigs; use crate::utils::from_str_or_number; use crate::{abci::config::AbciConfig, error::Error}; @@ -183,6 +184,9 @@ pub struct PlatformConfig { /// Path to data storage pub db_path: PathBuf, + /// State sync configuration + pub state_sync_config: StateSyncAbciConfig, + /// Path to store rejected / invalid items (like transactions). /// Used mainly for debugging. /// @@ -274,6 +278,7 @@ impl<'de> Deserialize<'de> for PlatformConfig { instant_lock: config.instant_lock, block_spacing_ms: config.block_spacing_ms, db_path: config.db_path, + state_sync_config: StateSyncAbciConfig::default(), rejections_path: config.rejections_path, #[cfg(feature = "testing-config")] testing_configs: config.testing_configs, @@ -724,6 +729,7 @@ impl PlatformConfig { core: Default::default(), execution: Default::default(), db_path: PathBuf::from("/var/lib/dash-platform/data"), + state_sync_config: StateSyncAbciConfig::default_local(), rejections_path: Some(PathBuf::from("/var/log/dash/rejected")), #[cfg(feature = "testing-config")] testing_configs: PlatformTestConfig::default(), @@ -767,6 +773,7 @@ impl PlatformConfig { execution: Default::default(), db_path: PathBuf::from("/var/lib/dash-platform/data"), rejections_path: Some(PathBuf::from("/var/log/dash/rejected")), + state_sync_config: StateSyncAbciConfig::default_local(), #[cfg(feature = "testing-config")] testing_configs: PlatformTestConfig::default(), tokio_console_enabled: false, @@ -808,6 +815,7 @@ impl PlatformConfig { core: Default::default(), execution: Default::default(), db_path: PathBuf::from("/var/lib/dash-platform/data"), + state_sync_config: StateSyncAbciConfig::default_testnet(), rejections_path: Some(PathBuf::from("/var/log/dash/rejected")), #[cfg(feature = "testing-config")] testing_configs: PlatformTestConfig::default(), @@ -850,6 +858,7 @@ impl PlatformConfig { core: Default::default(), execution: Default::default(), db_path: PathBuf::from("/var/lib/dash-platform/data"), + state_sync_config: StateSyncAbciConfig::default_mainnet(), rejections_path: Some(PathBuf::from("/var/log/dash/rejected")), #[cfg(feature = "testing-config")] testing_configs: PlatformTestConfig::default(), diff --git a/packages/rs-drive-abci/src/platform_types/mod.rs b/packages/rs-drive-abci/src/platform_types/mod.rs index b973b9051eb..92ae30b58c2 100644 --- a/packages/rs-drive-abci/src/platform_types/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/mod.rs @@ -31,3 +31,6 @@ pub mod validator_set; pub mod verify_chain_lock_result; /// Withdrawal types pub mod withdrawal; + +/// Snapshots +pub mod snapshot; diff --git a/packages/rs-drive-abci/src/platform_types/snapshot/mod.rs b/packages/rs-drive-abci/src/platform_types/snapshot/mod.rs new file mode 100644 index 00000000000..347b07e1c14 --- /dev/null +++ b/packages/rs-drive-abci/src/platform_types/snapshot/mod.rs @@ -0,0 +1,248 @@ +use std::{ + path::{Path, PathBuf}, + pin::Pin, +}; + +use bincode::{config, Decode, Encode}; +use dapi_grpc::tonic; +use drive::error::drive::DriveError; +use drive::error::Error::{Drive, GroveDB}; +use drive::grovedb::replication::MultiStateSyncSession; +use drive::grovedb::GroveDb; +use prost::Message; +use tenderdash_abci::proto::abci; +//use platform_version::version::PlatformVersion; +use crate::error::Error; +use dpp::version::PlatformVersion; + +const SNAPSHOT_KEY: &[u8] = b"snapshots"; + +const CHUNK_SIZE_16MB: usize = 16 * 1024 * 1024; + +const SNAPSHOT_VERSION: u16 = 1; + +/// Snapshot entity +#[derive(Clone, Encode, Decode, PartialEq, Debug)] +pub struct Snapshot { + /// Block height + pub height: i64, + /// Version + pub version: u16, + /// Path to the checkpoint + pub path: String, + /// Root hash of the checkpoint + pub hash: [u8; 32], + /// Metadata + pub metadata: Vec, +} + +/// Snapshot manager is responsible for creating and managing snapshots to keep only the certain +/// number of snapshots and remove the old ones +#[derive(Default, Clone)] +pub struct SnapshotManager { + freq: i64, + number_stored_snapshots: usize, + checkpoints_path: String, +} + +/// Snapshot manager is responsible for creating and managing snapshots to keep only the certain +/// number of snapshots and remove the old ones +pub struct SnapshotFetchingSession<'db> { + /// Snapshot accepted + pub snapshot: abci::Snapshot, + /// Snapshot accepted + pub app_hash: Vec, + // sender_metrics: Option>, + /// Snapshot accepted + pub state_sync_info: Pin>>, +} + +impl<'db> SnapshotFetchingSession<'db> { + /// Creates a new `SnapshotFetchingSession`. + /// + /// # Parameters + /// + /// - `snapshot`: The accepted snapshot. + /// - `app_hash`: The application hash associated with the snapshot. + /// - `state_sync_info`: The state sync information. + /// + /// # Returns + /// + /// A new instance of `SnapshotFetchingSession`. + pub fn new( + snapshot: abci::Snapshot, + app_hash: Vec, + state_sync_info: Pin>>, + ) -> Self { + SnapshotFetchingSession { + snapshot, + app_hash, + state_sync_info, + } + } +} + +// TODO: Use Metrics for statistics +struct Metrics { + success: usize, + error: usize, +} + +enum MetricType { + Success, + Error, +} + +impl Metrics { + fn new() -> Self { + Self { + success: 0, + error: 0, + } + } + + fn incr(&mut self, metric: MetricType) { + match metric { + MetricType::Success => self.success += 1, + MetricType::Error => self.error += 1, + } + } +} + +impl SnapshotManager { + /// Create a new instance of snapshot manager + pub fn new(checkpoints_path: String, number_stored_snapshots: usize, freq: i64) -> Self { + Self { + freq, + number_stored_snapshots, + checkpoints_path, + } + } + + /// Return a persisted list of snapshots + pub fn get_snapshots(&self, grove: &GroveDb) -> Result, Error> { + let data = grove + .get_aux(SNAPSHOT_KEY, None) + .unwrap() + .map_err(|e| Error::Drive(GroveDB(e)))?; + + match data { + Some(data) => { + let conf = config::standard(); + let (mut decoded, _): (Vec, usize) = + bincode::decode_from_slice(data.as_slice(), conf) + .map_err(|e| Error::Drive(Drive(DriveError::Snapshot(e.to_string()))))?; + decoded.sort_by(|a, b| a.height.cmp(&b.height)); + Ok(decoded) + } + None => Ok(vec![]), + } + } + + /// Return the snapshot a requested height + pub fn get_snapshot_at_height( + &self, + grove: &GroveDb, + height: i64, + ) -> Result, Error> { + let snapshots = self.get_snapshots(&grove)?; + let matched_snapshot = snapshots + .iter() + .find(|&snapshot| snapshot.height == height) + .cloned(); + Ok(matched_snapshot) + } + + /// Create a new snapshot for the given height, if a height is not a multiple of N, + /// it will be skipped. + pub fn create_snapshot(&self, grove: &GroveDb, height: i64) -> Result<(), Error> { + if height == 0 || height % self.freq != 0 { + return Ok(()); + } + let checkpoint_path: PathBuf = [self.checkpoints_path.clone(), height.to_string()] + .iter() + .collect(); + grove + .create_checkpoint(&checkpoint_path) + .map_err(|e| Error::Drive(GroveDB(e)))?; + + let root_hash = grove + .root_hash(None, &PlatformVersion::latest().drive.grove_version) + .unwrap() + .map_err(|e| Error::Drive(Drive(DriveError::Snapshot(e.to_string()))))?; + + let snapshot = Snapshot { + height, + version: SNAPSHOT_VERSION, + path: checkpoint_path.to_str().unwrap().to_string(), + hash: root_hash as [u8; 32], + metadata: vec![], + }; + + let mut snapshots = self.get_snapshots(grove)?; + snapshots.push(snapshot); + snapshots = self.prune_excess_snapshots(snapshots)?; + self.save_snapshots(grove, snapshots) + } + + fn prune_excess_snapshots(&self, snapshots: Vec) -> Result, Error> { + if snapshots.len() <= self.number_stored_snapshots { + return Ok(snapshots); + } + let separator = snapshots.len() - self.number_stored_snapshots; + for snapshot in &snapshots[0..separator] { + if Path::new(&snapshot.path).is_dir() { + std::fs::remove_dir_all(&snapshot.path) + .map_err(|e| Error::Drive(Drive(DriveError::Snapshot(e.to_string()))))?; + } + } + Ok(snapshots[separator..].to_vec()) + } + + fn save_snapshots(&self, grove: &GroveDb, snapshots: Vec) -> Result<(), Error> { + let conf = config::standard(); + let data: Vec = bincode::encode_to_vec(snapshots, conf) + .map_err(|e| Error::Drive(Drive(DriveError::Snapshot(e.to_string()))))?; + grove + .put_aux(SNAPSHOT_KEY, data.as_slice(), None, None) + .unwrap() + .map_err(|e| Error::Drive(GroveDB(e)))?; + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::fs; + + #[test] + fn test_create_snapshot() { + let test_cases = vec![ + (1000, 1000, vec![1000]), + (1000, 1001, vec![1000, 1001]), + (1000, 1002, vec![1000, 1001, 1002]), + (1000, 1004, vec![1002, 1003, 1004]), + (1000, 1005, vec![1003, 1004, 1005]), + ]; + for (start, end, want) in test_cases { + let grove_dir = tempfile::tempdir().unwrap(); + let checkpoints_dir = tempfile::tempdir().unwrap(); + let grove = GroveDb::open(grove_dir.path()).unwrap(); + let manager = + SnapshotManager::new(checkpoints_dir.path().to_str().unwrap().to_string(), 3, 1); + for height in start..=end { + manager.create_snapshot(&grove, height).unwrap(); + } + let snapshots = manager.get_snapshots(&grove).unwrap(); + let res: Vec = snapshots.iter().map(|s| s.height).collect(); + assert_eq!(want, res); + + let paths: Vec = snapshots.iter().map(|s| s.path.to_string()).collect(); + for path in paths { + assert!(Path::new(&path).exists()); + } + fs::remove_dir_all(grove_dir.path()).unwrap(); + } + } +} diff --git a/packages/rs-drive-abci/src/server.rs b/packages/rs-drive-abci/src/server.rs index a24fc7495d8..3011af708d9 100644 --- a/packages/rs-drive-abci/src/server.rs +++ b/packages/rs-drive-abci/src/server.rs @@ -3,6 +3,7 @@ use crate::abci::app::CheckTxAbciApplication; use crate::abci::app::ConsensusAbciApplication; +use crate::abci::app::StateSourceAbciApplication; use crate::config::PlatformConfig; use crate::platform_types::platform::Platform; use crate::query::QueryService; @@ -31,6 +32,7 @@ pub fn start( let check_tx_service = CheckTxAbciApplication::new(Arc::clone(&platform), Arc::new(check_tx_core_rpc)); + let state_source_service = StateSourceAbciApplication::new(Arc::clone(&platform)); let grpc_server = dapi_grpc::tonic::transport::Server::builder() .add_service(dapi_grpc::platform::v0::platform_server::PlatformServer::new(query_service)) @@ -38,6 +40,11 @@ pub fn start( tenderdash_abci::proto::abci::abci_application_server::AbciApplicationServer::new( check_tx_service, ), + ) + .add_service( + tenderdash_abci::proto::abci::abci_application_server::AbciApplicationServer::new( + state_source_service, + ), ); let grpc_server_cancel = cancel.clone(); diff --git a/packages/rs-drive-abci/tests/strategy_tests/main.rs b/packages/rs-drive-abci/tests/strategy_tests/main.rs index 4194e306896..fa73bff9a88 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/main.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/main.rs @@ -26,6 +26,7 @@ mod masternode_list_item_helpers; mod masternodes; mod patch_platform_tests; mod query; +mod state_sync; mod strategy; mod upgrade_fork_tests; mod verify_state_transitions; diff --git a/packages/rs-drive-abci/tests/strategy_tests/state_sync.rs b/packages/rs-drive-abci/tests/strategy_tests/state_sync.rs new file mode 100644 index 00000000000..2d58d98c295 --- /dev/null +++ b/packages/rs-drive-abci/tests/strategy_tests/state_sync.rs @@ -0,0 +1,304 @@ +#[cfg(test)] +mod tests { + use crate::execution::run_chain_for_strategy; + use crate::strategy::NetworkStrategy; + use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::document_type::random_document::{ + DocumentFieldFillSize, DocumentFieldFillType, + }; + use dpp::tests::json_document::json_document_to_created_contract; + use drive_abci::abci::app::{FullAbciApplication, PlatformApplication}; + use drive_abci::abci::config::StateSyncAbciConfig; + use drive_abci::config::{ExecutionConfig, PlatformConfig}; + use drive_abci::test::helpers::setup::TestPlatformBuilder; + use platform_version::version::PlatformVersion; + use rand::distributions::Alphanumeric; + use rand::Rng; + use std::collections::VecDeque; + use std::fs; + use std::path::PathBuf; + use std::time::{Duration, Instant}; + use strategy_tests::frequency::Frequency; + use strategy_tests::operations::{DocumentAction, DocumentOp, Operation, OperationType}; + use strategy_tests::{IdentityInsertInfo, StartIdentities, Strategy}; + use tenderdash_abci::proto::abci::{ + RequestApplySnapshotChunk, RequestListSnapshots, RequestLoadSnapshotChunk, + RequestOfferSnapshot, + }; + use tenderdash_abci::Application; + + fn generate_random_path(prefix: &str, suffix: &str, len: usize) -> String { + let random_string: String = rand::thread_rng() + .sample_iter(&Alphanumeric) + .take(len) + .map(char::from) + .collect(); + format!("{}/{}{}", prefix, random_string, suffix) + } + + fn create_dir_if_not_exists(path: &PathBuf) -> std::io::Result<()> { + if !path.exists() { + fs::create_dir_all(path)?; + } + Ok(()) + } + + fn remove_dir(path: &PathBuf) -> std::io::Result<()> { + if path.exists() { + fs::remove_dir_all(path)?; + } + Ok(()) + } + + fn get_target_folder() -> PathBuf { + // Use the environment variable `CARGO_MANIFEST_DIR` to locate the current package + let manifest_dir = env!("CARGO_MANIFEST_DIR"); + + // Traverse up the directory tree to find the workspace root + let mut current_dir = PathBuf::from(manifest_dir); + while !current_dir.join("Cargo.lock").exists() { + current_dir.pop(); // Go up one level + } + + // The `target` folder is located at the workspace root + current_dir.join("target") + } + + fn get_target_tmp_folder() -> PathBuf { + get_target_folder().join("tmp") + } + + #[test] + fn run_state_sync() { + let platform_version = PlatformVersion::latest(); + let created_contract = json_document_to_created_contract( + "tests/supporting_files/contract/dashpay/dashpay-contract-all-mutable.json", + 1, + true, + platform_version, + ) + .expect("expected to get contract from a json document"); + + let contract = created_contract.data_contract(); + + let document_insertion_op = DocumentOp { + contract: contract.clone(), + action: DocumentAction::DocumentActionInsertRandom( + DocumentFieldFillType::FillIfNotRequired, + DocumentFieldFillSize::AnyDocumentFillSize, + ), + document_type: contract + .document_type_for_name("contactRequest") + .expect("expected a profile document type") + .to_owned_document_type(), + }; + + let strategy = NetworkStrategy { + strategy: Strategy { + start_contracts: vec![(created_contract, None)], + operations: vec![Operation { + op_type: OperationType::Document(document_insertion_op), + frequency: Frequency { + times_per_block_range: 50000..50002, + chance_per_block: None, + }, + }], + start_identities: StartIdentities::default(), + identity_inserts: IdentityInsertInfo { + frequency: Frequency { + times_per_block_range: 1..2, + chance_per_block: None, + }, + ..Default::default() + }, + + identity_contract_nonce_gaps: None, + signer: None, + }, + total_hpmns: 100, + extra_normal_mns: 0, + validator_quorum_count: 24, + chain_lock_quorum_count: 24, + upgrading_info: None, + + proposer_strategy: Default::default(), + rotate_quorums: false, + failure_testing: None, + query_testing: None, + verify_state_transition_results: true, + ..Default::default() + }; + let day_in_ms = 1000 * 60 * 60 * 24; + + let base_test_directory = PathBuf::from(generate_random_path( + get_target_tmp_folder().to_str().unwrap(), + "", + 12, + )); + + let mut checkpoint_test_directory = base_test_directory.clone(); + checkpoint_test_directory.push("checkpoints"); + + create_dir_if_not_exists(&checkpoint_test_directory) + .expect("should create checkpoint directory"); + println!( + "checkpoint_test_directory: {}", + checkpoint_test_directory.to_str().unwrap() + ); + + let mut db_test_directory = base_test_directory.clone(); + db_test_directory.push("db"); + + create_dir_if_not_exists(&db_test_directory).expect("should create db directory"); + println!("db_test_directory: {}", db_test_directory.to_str().unwrap()); + + let local_state_sync_config = StateSyncAbciConfig { + snapshots_enabled: true, + checkpoints_path: checkpoint_test_directory, + snapshots_frequency: 10, + max_num_snapshots: 3, + }; + + let config = PlatformConfig { + execution: ExecutionConfig { + verify_sum_trees: true, + ..Default::default() + }, + block_spacing_ms: day_in_ms, + db_path: db_test_directory, + state_sync_config: local_state_sync_config, + ..Default::default() + }; + + let block_count = 50; + let mut platform = TestPlatformBuilder::new() + .with_config(config.clone()) + .build_with_mock_rpc(); + + let source_outcome = run_chain_for_strategy( + &mut platform, + block_count, + strategy, + config.clone(), + 15, + &mut None, + ); + let source_snapshots = source_outcome + .abci_app + .list_snapshots(RequestListSnapshots::default()) + .expect("should expected snapshots"); + for s in &source_snapshots.snapshots { + println!( + "snapshot height:{} app_hash:{}", + s.height, + hex::encode(&s.hash) + ); + } + let best_snapshot = match source_snapshots.snapshots.iter().max_by_key(|s| s.height) { + Some(s) => s, + None => { + println!("no snapshots available. exit"); + return; // Return early if no item is found + } + }; + println!( + "best_snapshot height:{} app_hash:{}", + best_snapshot.height, + hex::encode(&best_snapshot.hash) + ); + + let target_platform = TestPlatformBuilder::new() + .with_config(config.clone()) + .build_with_mock_rpc(); + let target_abci_app = FullAbciApplication::new(&target_platform); + + let offer_snapshot_request = RequestOfferSnapshot { + snapshot: Some(best_snapshot.clone()), + app_hash: best_snapshot.hash.to_vec(), + }; + + let _ = target_abci_app + .offer_snapshot(offer_snapshot_request) + .expect("should offer_snapshot succeed"); + + let mut chunk_queue: VecDeque> = VecDeque::new(); + chunk_queue.push_back(best_snapshot.hash.to_vec()); + + let start_time = Instant::now(); + + let mut duration_sum_fetch: Duration = Duration::ZERO; + let mut duration_sum_apply: Duration = Duration::ZERO; + + let mut chunk_counter = 0; + let mut ops_counter = 0; + while let Some(chunk_id) = chunk_queue.pop_front() { + let request_load_chunk = RequestLoadSnapshotChunk { + height: best_snapshot.height, + version: best_snapshot.version, + chunk_id: chunk_id.clone(), + }; + let start_time_fetch = Instant::now(); + let load_chunk_response = source_outcome + .abci_app + .load_snapshot_chunk(request_load_chunk) + .expect("should fetch chunk"); + duration_sum_fetch += start_time_fetch.elapsed(); + + let request_apply_chunk = RequestApplySnapshotChunk { + chunk_id, + chunk: load_chunk_response.chunk, + ..Default::default() + }; + let request_apply_num_ops = request_apply_chunk.chunk.len(); + ops_counter += request_apply_num_ops; + + let elapsed = start_time.elapsed(); + let chunk_id_hex = hex::encode(&request_apply_chunk.chunk_id); + let start_time_apply = Instant::now(); + let apply_chunk_response = target_abci_app + .apply_snapshot_chunk(request_apply_chunk) + .expect("should apply chunk succeed"); + duration_sum_apply += start_time_apply.elapsed(); + println!( + "#{} apply:{} num_ops:{} returned:{} queue:{} {:.2?}", + chunk_counter, + chunk_id_hex, + request_apply_num_ops, + apply_chunk_response.next_chunks.len(), + chunk_queue.len(), + elapsed + ); + chunk_queue.extend(apply_chunk_response.next_chunks); + chunk_counter += 1; + } + println!("total chunks:{} ops:{}", chunk_counter, ops_counter); + println!("duration_sum_fetch: {}", duration_sum_fetch.as_secs_f64()); + println!("duration_sum_apply: {}", duration_sum_apply.as_secs_f64()); + + println!( + "source app_hash:{}", + hex::encode( + source_outcome + .abci_app + .platform + .drive + .grove + .root_hash(None, &PlatformVersion::latest().drive.grove_version) + .unwrap() + .unwrap() + ) + ); + println!( + "target app_hash:{}", + hex::encode( + target_abci_app + .platform() + .drive + .grove + .root_hash(None, &PlatformVersion::latest().drive.grove_version) + .unwrap() + .unwrap() + ) + ); + } +} diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index 2dccfca2570..54003510439 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -52,12 +52,12 @@ enum-map = { version = "2.0.3", optional = true } intmap = { version = "2.0.0", features = ["serde"], optional = true } chrono = { version = "0.4.35", optional = true } itertools = { version = "0.13", optional = true } -grovedb = { version = "2.1.0", optional = true, default-features = false } -grovedb-costs = { version = "2.1.0", optional = true } -grovedb-path = { version = "2.1.0" } -grovedb-storage = { version = "2.1.0", optional = true } -grovedb-version = { version = "2.1.0" } -grovedb-epoch-based-storage-flags = { version = "2.1.0" } +grovedb = { git = "https://github.com/dashpay/grovedb", branch = "develop", optional = true, default-features = false } +grovedb-costs = { git = "https://github.com/dashpay/grovedb", branch = "develop", optional = true } +grovedb-path = { git = "https://github.com/dashpay/grovedb", branch = "develop" } +grovedb-storage = { git = "https://github.com/dashpay/grovedb", branch = "develop", optional = true } +grovedb-version = { git = "https://github.com/dashpay/grovedb", branch = "develop" } +grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", branch = "develop" } [dev-dependencies] criterion = "0.5" diff --git a/packages/rs-drive/src/error/drive.rs b/packages/rs-drive/src/error/drive.rs index 922cc5b8e4b..f5e8c8b657c 100644 --- a/packages/rs-drive/src/error/drive.rs +++ b/packages/rs-drive/src/error/drive.rs @@ -188,4 +188,8 @@ pub enum DriveError { /// Data Contract not found #[error("data contract not found: {0}")] DataContractNotFound(String), + + /// Error todo + #[error("snapshot error")] + Snapshot(String), } diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index a05504d9ecb..50594f47c6e 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" thiserror = { version = "1.0.63" } bincode = { version = "2.0.0-rc.3" } versioned-feature-core = { git = "https://github.com/dashpay/versioned-feature-core", version = "1.0.0" } -grovedb-version = { version = "2.1.0" } +grovedb-version = { git = "https://github.com/dashpay/grovedb", branch = "develop" } once_cell = "1.19.0" [features]