diff --git a/Cargo.lock b/Cargo.lock index 8c6c2a5eb..e8a985242 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1876,8 +1876,8 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "dash-platform-macros", "futures-core", @@ -1978,8 +1978,8 @@ dependencies = [ [[package]] name = "dash-async" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "futures", "thiserror 2.0.18", @@ -1990,8 +1990,8 @@ dependencies = [ [[package]] name = "dash-context-provider" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "dash-async", "dpp", @@ -2012,7 +2012,6 @@ dependencies = [ "async-trait", "axum", "base64 0.22.1", - "bincode 2.0.1", "bip39", "bitflags 2.13.0", "cbc", @@ -2035,6 +2034,7 @@ dependencies = [ "enum-iterator", "envy", "futures", + "grovedb-bincode", "grovestark", "hex", "humantime", @@ -2082,26 +2082,26 @@ dependencies = [ [[package]] name = "dash-network" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ - "bincode 2.0.1", - "bincode_derive", "cbindgen", + "grovedb-bincode", + "grovedb-bincode-derive", "serde", ] [[package]] name = "dash-network-seeds" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ "dash-network", ] [[package]] name = "dash-platform-macros" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "heck", "quote", @@ -2110,8 +2110,8 @@ dependencies = [ [[package]] name = "dash-platform-queries" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "dapi-grpc", "dash-context-provider", @@ -2128,8 +2128,8 @@ dependencies = [ [[package]] name = "dash-sdk" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "arc-swap", "async-trait", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "dash-spv" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ "async-trait", "chrono", @@ -2197,13 +2197,11 @@ dependencies = [ [[package]] name = "dashcore" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ "anyhow", "base64-compat", "bech32 0.9.1", - "bincode 2.0.1", - "bincode_derive", "bitvec", "blake3", "blsful", @@ -2211,6 +2209,8 @@ dependencies = [ "dashcore-private", "dashcore_hashes", "ed25519-dalek", + "grovedb-bincode", + "grovedb-bincode-derive", "hex", "hex_lit", "rustversion", @@ -2223,12 +2223,12 @@ dependencies = [ [[package]] name = "dashcore-private" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" [[package]] name = "dashcore-rpc" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ "dashcore-rpc-json", "hex", @@ -2241,10 +2241,10 @@ dependencies = [ [[package]] name = "dashcore-rpc-json" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ - "bincode 2.0.1", "dashcore", + "grovedb-bincode", "hex", "key-wallet", "serde", @@ -2256,18 +2256,18 @@ dependencies = [ [[package]] name = "dashcore_hashes" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ - "bincode 2.0.1", "dashcore-private", + "grovedb-bincode", "rs-x11-hash", "serde", ] [[package]] name = "dashpay-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "platform-value", "platform-version", @@ -2277,8 +2277,8 @@ dependencies = [ [[package]] name = "data-contracts" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "dashpay-contract", "document-history-contract", @@ -2545,8 +2545,8 @@ dependencies = [ [[package]] name = "document-history-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "platform-value", "platform-version", @@ -2574,8 +2574,8 @@ checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" [[package]] name = "dpns-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "platform-value", "platform-version", @@ -2585,14 +2585,13 @@ dependencies = [ [[package]] name = "dpp" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "anyhow", "async-trait", "base64 0.22.1", "bech32 0.11.1", - "bincode 2.0.1", "bs58", "byteorder", "chrono", @@ -2606,6 +2605,7 @@ dependencies = [ "dpp-json-convertible-derive", "env_logger", "getrandom 0.2.17", + "grovedb-bincode", "grovedb-commitment-tree", "hex", "indexmap 2.14.0", @@ -2614,6 +2614,7 @@ dependencies = [ "key-wallet", "key-wallet-manager", "lazy_static", + "libm", "nohash-hasher", "num_enum 0.7.6", "once_cell", @@ -2635,8 +2636,8 @@ dependencies = [ [[package]] name = "dpp-json-convertible-derive" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "proc-macro2", "quote", @@ -2645,19 +2646,19 @@ dependencies = [ [[package]] name = "drive" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ - "bincode 2.0.1", "byteorder", "derive_more 1.0.0", "dpp", - "grovedb 5.0.1", - "grovedb-costs 5.0.1", + "grovedb 6.0.0", + "grovedb-bincode", + "grovedb-costs 6.0.0", "grovedb-epoch-based-storage-flags", - "grovedb-path 5.0.1", + "grovedb-path 6.0.0", "grovedb-query", - "grovedb-version 5.0.1", + "grovedb-version 6.0.0", "hex", "indexmap 2.14.0", "integer-encoding", @@ -2671,15 +2672,15 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ - "bincode 2.0.1", "dapi-grpc", "dash-context-provider", "derive_more 1.0.0", "dpp", "drive", + "grovedb-bincode", "hex", "indexmap 2.14.0", "platform-serialization", @@ -3695,7 +3696,7 @@ dependencies = [ [[package]] name = "git-state" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" [[package]] name = "gl_generator" @@ -3892,39 +3893,59 @@ dependencies = [ [[package]] name = "grovedb" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "bincode 2.0.1", - "bincode_derive", "blake3", + "grovedb-bincode", + "grovedb-bincode-derive", "grovedb-bulk-append-tree", - "grovedb-costs 5.0.1", + "grovedb-costs 6.0.0", "grovedb-dense-fixed-sized-merkle-tree", - "grovedb-element 5.0.1", - "grovedb-merk 5.0.1", + "grovedb-element 6.0.0", + "grovedb-merk 6.0.0", "grovedb-merkle-mountain-range", - "grovedb-path 5.0.1", + "grovedb-path 6.0.0", "grovedb-query", - "grovedb-version 5.0.1", + "grovedb-version 6.0.0", "hex", "indexmap 2.14.0", "integer-encoding", "thiserror 2.0.18", ] +[[package]] +name = "grovedb-bincode" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce912028682ecc5870a5ad609ea456b76b0bf4ec1ba1eb649400b64ff73a7782" +dependencies = [ + "grovedb-bincode-derive", + "serde", + "unty", +] + +[[package]] +name = "grovedb-bincode-derive" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eaff4e961dcb3e7e55c34c8c6982249036e5aaa19e55f6dab94ebcd4896b03a" +dependencies = [ + "virtue 0.0.18", +] + [[package]] name = "grovedb-bulk-append-tree" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "bincode 2.0.1", "blake3", - "grovedb-costs 5.0.1", + "grovedb-bincode", + "grovedb-costs 6.0.0", "grovedb-dense-fixed-sized-merkle-tree", "grovedb-merkle-mountain-range", "grovedb-query", - "grovedb-version 5.0.1", + "grovedb-version 6.0.0", "hex", "integer-encoding", "thiserror 2.0.18", @@ -3932,13 +3953,13 @@ dependencies = [ [[package]] name = "grovedb-commitment-tree" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ "blake3", "grovedb-bulk-append-tree", - "grovedb-costs 5.0.1", - "grovedb-version 5.0.1", + "grovedb-costs 6.0.0", + "grovedb-version 6.0.0", "incrementalmerkletree", "orchard", "rusqlite", @@ -3958,8 +3979,8 @@ dependencies = [ [[package]] name = "grovedb-costs" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ "integer-encoding", "intmap", @@ -3968,14 +3989,14 @@ dependencies = [ [[package]] name = "grovedb-dense-fixed-sized-merkle-tree" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "bincode 2.0.1", "blake3", - "grovedb-costs 5.0.1", + "grovedb-bincode", + "grovedb-costs 6.0.0", "grovedb-query", - "grovedb-version 5.0.1", + "grovedb-version 6.0.0", "thiserror 2.0.18", ] @@ -3995,14 +4016,14 @@ dependencies = [ [[package]] name = "grovedb-element" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "bincode 2.0.1", - "bincode_derive", - "grovedb-path 5.0.1", + "grovedb-bincode", + "grovedb-bincode-derive", + "grovedb-path 6.0.0", "grovedb-query", - "grovedb-version 5.0.1", + "grovedb-version 6.0.0", "hex", "integer-encoding", "thiserror 2.0.18", @@ -4010,10 +4031,10 @@ dependencies = [ [[package]] name = "grovedb-epoch-based-storage-flags" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "grovedb-costs 5.0.1", + "grovedb-costs 6.0.0", "hex", "integer-encoding", "intmap", @@ -4043,20 +4064,20 @@ dependencies = [ [[package]] name = "grovedb-merk" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "bincode 2.0.1", - "bincode_derive", "blake3", "byteorder", "ed", - "grovedb-costs 5.0.1", - "grovedb-element 5.0.1", - "grovedb-path 5.0.1", + "grovedb-bincode", + "grovedb-bincode-derive", + "grovedb-costs 6.0.0", + "grovedb-element 6.0.0", + "grovedb-path 6.0.0", "grovedb-query", - "grovedb-version 5.0.1", - "grovedb-visualize 5.0.1", + "grovedb-version 6.0.0", + "grovedb-visualize 6.0.0", "hex", "indexmap 2.14.0", "integer-encoding", @@ -4065,13 +4086,13 @@ dependencies = [ [[package]] name = "grovedb-merkle-mountain-range" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "bincode 2.0.1", "blake3", - "grovedb-costs 5.0.1", - "grovedb-version 5.0.1", + "grovedb-bincode", + "grovedb-costs 6.0.0", + "grovedb-version 6.0.0", ] [[package]] @@ -4084,20 +4105,20 @@ dependencies = [ [[package]] name = "grovedb-path" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ "hex", ] [[package]] name = "grovedb-query" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ - "bincode 2.0.1", "byteorder", "ed", + "grovedb-bincode", "hex", "indexmap 2.14.0", "integer-encoding", @@ -4115,8 +4136,8 @@ dependencies = [ [[package]] name = "grovedb-version" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ "thiserror 2.0.18", "versioned-feature-core", @@ -4133,8 +4154,8 @@ dependencies = [ [[package]] name = "grovedb-visualize" -version = "5.0.1" -source = "git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e#6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e" +version = "6.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=6816457d2b2df98653f286bf9a374f236a17748f#6816457d2b2df98653f286bf9a374f236a17748f" dependencies = [ "hex", "itertools 0.14.0", @@ -5025,7 +5046,7 @@ dependencies = [ [[package]] name = "key-wallet" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ "async-trait", "base58ck", @@ -5048,7 +5069,7 @@ dependencies = [ [[package]] name = "key-wallet-manager" version = "0.45.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd#93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd" +source = "git+https://github.com/dashpay/rust-dashcore?rev=e4208c90786a6854bd498315bcb571ef24182c15#e4208c90786a6854bd498315bcb571ef24182c15" dependencies = [ "async-trait", "dashcore", @@ -5071,8 +5092,8 @@ dependencies = [ [[package]] name = "keyword-search-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "platform-value", "platform-version", @@ -5284,8 +5305,8 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "platform-value", "platform-version", @@ -6507,8 +6528,8 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "platform-encryption" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "aes", "cbc", @@ -6520,17 +6541,17 @@ dependencies = [ [[package]] name = "platform-serialization" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ - "bincode 2.0.1", + "grovedb-bincode", "platform-version", ] [[package]] name = "platform-serialization-derive" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "proc-macro2", "quote", @@ -6540,13 +6561,13 @@ dependencies = [ [[package]] name = "platform-value" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "base64 0.22.1", - "bincode 2.0.1", "bs58", "ciborium", + "grovedb-bincode", "hex", "indexmap 2.14.0", "platform-serialization", @@ -6560,19 +6581,19 @@ dependencies = [ [[package]] name = "platform-version" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ - "bincode 2.0.1", - "grovedb-version 5.0.1", + "grovedb-bincode", + "grovedb-version 6.0.0", "thiserror 2.0.18", "versioned-feature-core", ] [[package]] name = "platform-versioning" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "proc-macro2", "quote", @@ -6581,8 +6602,8 @@ dependencies = [ [[package]] name = "platform-wallet" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "arc-swap", "async-trait", @@ -6615,12 +6636,11 @@ dependencies = [ [[package]] name = "platform-wallet-storage" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "apple-native-keyring-store", "argon2", - "bincode 2.0.1", "chacha20poly1305", "chrono", "clap", @@ -6630,6 +6650,7 @@ dependencies = [ "dpp", "fd-lock", "getrandom 0.2.17", + "grovedb-bincode", "hex", "humantime", "key-wallet", @@ -6901,7 +6922,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" dependencies = [ "heck", - "itertools 0.10.5", + "itertools 0.14.0", "log", "multimap", "petgraph", @@ -6922,7 +6943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.14.0", "proc-macro2", "quote", "syn 2.0.117", @@ -7615,8 +7636,8 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "backon", "chrono", @@ -7641,8 +7662,8 @@ dependencies = [ [[package]] name = "rs-sdk-trusted-context-provider" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "arc-swap", "dash-async", @@ -8882,8 +8903,8 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "token-history-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "platform-value", "platform-version", @@ -9722,8 +9743,8 @@ dependencies = [ [[package]] name = "wallet-utils-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "platform-value", "platform-version", @@ -10304,7 +10325,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] @@ -11044,8 +11065,8 @@ dependencies = [ [[package]] name = "withdrawals-contract" -version = "4.2.0-dev.8" -source = "git+https://github.com/dashpay/platform?rev=63cf57f40d0000bf3b2b26026c8fa1c71162852d#63cf57f40d0000bf3b2b26026c8fa1c71162852d" +version = "4.2.0-dev.10" +source = "git+https://github.com/dashpay/platform?rev=01d944795e3dc9776fd4d01959df9abc1ea98c87#01d944795e3dc9776fd4d01959df9abc1ea98c87" dependencies = [ "num_enum 0.5.11", "platform-value", diff --git a/Cargo.toml b/Cargo.toml index 033cb8928..eecf4332c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ eframe = { version = "0.35.0", features = ["persistence", "wgpu"] } base64 = "0.22.1" # TODO: GHSA-7gcf-g7xr-8hxj (serde_with <3.21.0) is unfixable from here — the 2.x pin lives in # dashcore-rpc-json (dashpay/rust-dashcore, rpc-json/Cargo.toml). Re-check when these pins move. -dash-sdk = { git = "https://github.com/dashpay/platform", rev = "63cf57f40d0000bf3b2b26026c8fa1c71162852d", features = [ +dash-sdk = { git = "https://github.com/dashpay/platform", rev = "01d944795e3dc9776fd4d01959df9abc1ea98c87", features = [ "core_key_wallet", "core_key_wallet_manager", "core_bincode", @@ -30,15 +30,15 @@ dash-sdk = { git = "https://github.com/dashpay/platform", rev = "63cf57f40d0000b "core_spv", "shielded", ] } -rs-sdk-trusted-context-provider = { git = "https://github.com/dashpay/platform", rev = "63cf57f40d0000bf3b2b26026c8fa1c71162852d" } -platform-wallet = { git = "https://github.com/dashpay/platform", rev = "63cf57f40d0000bf3b2b26026c8fa1c71162852d", features = [ +rs-sdk-trusted-context-provider = { git = "https://github.com/dashpay/platform", rev = "01d944795e3dc9776fd4d01959df9abc1ea98c87" } +platform-wallet = { git = "https://github.com/dashpay/platform", rev = "01d944795e3dc9776fd4d01959df9abc1ea98c87", features = [ "serde", "shielded", ] } # `serde` backs `model::secret::Secret`'s `Deserialize`: the upstream # visitor copies a borrowed `&str` straight into guarded memory instead of # routing through a transient `String`. Secret schemas are included by `secrets`. -platform-wallet-storage = { git = "https://github.com/dashpay/platform", rev = "63cf57f40d0000bf3b2b26026c8fa1c71162852d", features = [ +platform-wallet-storage = { git = "https://github.com/dashpay/platform", rev = "01d944795e3dc9776fd4d01959df9abc1ea98c87", features = [ "shielded", "serde", ] } @@ -50,15 +50,21 @@ serde = "1.0.219" serde_json = "1.0.140" serde_yaml_ng = { version = "0.10.0" } tokio = { version = "1.46.1", features = ["full"] } -# INTENTIONAL(bincode-unmaintained-pin): the pin is deliberate; do not "fix" the audit -# warning by bumping. bincode is flagged unmaintained (RUSTSEC-2025-0141, INFO-level — -# no known vulnerability). The advisory -# covers *all* versions, so no bump can clear it: 2.0.1 is the last functional release -# and 3.0.0 is a tombstone whose lib.rs is a bare `compile_error!`. This crate encodes -# the on-disk wallet-secret envelopes and QualifiedIdentity blobs, so switching encoders -# changes the wire format of data users already have on disk — that needs a designed -# read-old/write-new migration, not a dependency bump. -bincode = { version = "=2.0.1", features = ["serde"] } +# INTENTIONAL(bincode-unmaintained-pin): the exact pin is deliberate; do not "fix" the audit +# warning by bumping. bincode is flagged unmaintained (RUSTSEC-2025-0141, INFO-level — no +# known vulnerability). The advisory covers *all* versions, so no bump can clear it: 2.0.1 +# is the last functional release and 3.0.0 is a tombstone whose lib.rs is a bare +# `compile_error!`. +# The dependency is aliased to `grovedb-bincode`, the bincode 2.0.1 fork that dpp, +# platform-value and rust-dashcore implement `Encode`/`Decode` against; the trait +# identities must match or DET's codecs over those types stop compiling. On the ordinary +# (non-`*_untrusted`) paths DET uses — native, `bincode::serde` and the derive macros — +# its wire format is identical to bincode 2.0.1, per source-level analysis of hash-identical +# function bodies and derive-codegen substitution (docs/ai-design/2026-09-14-platform-4.2-dev-bump/); +# no executable fixture pins it. This switch therefore needs no read-old/write-new +# migration. Any other encoder change still does: +# this crate encodes the on-disk wallet-secret envelopes and QualifiedIdentity blobs. +bincode = { package = "grovedb-bincode", version = "=2.1.0", features = ["serde"] } hex = { version = "0.4.3" } async-trait = "0.1.89" itertools = "0.14.0" diff --git a/docs/ai-design/2026-09-14-platform-4.2-dev-bump/upgrade-notes.md b/docs/ai-design/2026-09-14-platform-4.2-dev-bump/upgrade-notes.md new file mode 100644 index 000000000..8933e05e9 --- /dev/null +++ b/docs/ai-design/2026-09-14-platform-4.2-dev-bump/upgrade-notes.md @@ -0,0 +1,122 @@ +# Platform `v4.2-dev` pin upgrade + +Reviewed on 2026-09-14. The four Platform dependencies (`dash-sdk`, +`rs-sdk-trusted-context-provider`, `platform-wallet`, `platform-wallet-storage`) +move together from `63cf57f40d0000bf3b2b26026c8fa1c71162852d` (`4.2.0-dev.8`) +to `01d944795e3dc9776fd4d01959df9abc1ea98c87` (`4.2.0-dev.10`, `v4.2-dev` HEAD). +The old pin is an ancestor of the new one: 29 new commits, none dropped. + +Transitive moves: + +- rust-dashcore: `93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd` becomes + `e4208c90786a6854bd498315bcb571ef24182c15` (0.45.0; five commits, including + transaction detection and filter-sync fixes). +- GroveDB: 5.0.1 becomes 6.0.0 (`6816457d`). The grovestark dependency keeps + its own 4.0.0 copy. +- `grovedb-bincode` / `grovedb-bincode-derive` 2.1.0 are added. crates.io + `bincode` 2.0.1 and 1.3.3 stay in the lock for grovestark and GroveDB 4.0.0 + only. + +The full analysis (findings F1–F17, wire-compatibility proof and compile +probe) lives outside the repository in +`/data/artifacts/dash-evo-tool/2026-09-14/`: +`platform-4.2-dev-impact.md`, `platform-4.2-dev-compile-probe.md` and +`platform-3968-dropped-content.md`. + +## Compatibility work + +| Upstream change | DET change | +| --- | --- | +| [#4635](https://github.com/dashpay/platform/pull/4635): dpp, platform-value and rust-dashcore implement `Encode`/`Decode` from `grovedb-bincode`, which has its own trait identities | `bincode` is aliased to `grovedb-bincode =2.1.0` (`Cargo.toml`). DET's derives and manual codecs over dpp types compile again; import paths are unchanged. | +| [#4625](https://github.com/dashpay/platform/pull/4625): dpp deserialization traits split into trusted and untrusted pairs | The state transition and contract visualizers use the untrusted decoders for pasted bytes. The saved-contract reader (`contract_token_db.rs`) uses the untrusted decoder as well: under the same no-limit config it accepts every valid stored contract, and it does not pre-allocate from length prefixes. | +| [#4645](https://github.com/dashpay/platform/pull/4645): `rewards_in_interval_with_explanation` takes a `&PlatformVersion` | The estimated token-reward query passes the app's active platform version, which selects the version-gated distribution math. | +| [#4708](https://github.com/dashpay/platform/pull/4708) / [#4711](https://github.com/dashpay/platform/pull/4711): new `PlatformWalletError` variants `ShieldedIdentityDebitPending`, `ShieldedRecoveryCorrupted`, `ShieldedRecoveryKeysRequired` | New `TaskError` variants with fixed, actionable messages. The upstream `reason` text stays in the source chain only. Both exhaustive matches name the variants explicitly; identity funding buckets them as `Other` because no identity flow runs a shielded operation. | + +## Existing data + +**bincode blobs: no migration.** `grovedb-bincode` 2.1.0 is a fork of bincode +2.0.1. On every ordinary (non-`*_untrusted`) entry point DET uses (native +`encode_to_vec`/`decode_from_slice`, `bincode::serde`, and the derive macros), +it produces the same bytes and accepts the same inputs. That covers stored +`QualifiedIdentity`/`KeyStorage`, token configurations, the secret envelopes +and every serde sidecar. + +This verdict rests on source-level analysis only (see +`## grovedb-bincode wire compatibility` in `platform-4.2-dev-impact.md`): + +- **Runtime.** Every file outside the untrusted additions is byte-identical + between bincode 2.0.1 and grovedb-bincode 2.1.0. In the files that differ, + the bodies on the ordinary path hash-identical (`Decoder for DecoderImpl`, + `decode_from_slice`, `borrow_decode_from_slice`, the serde decode chain, + limit accounting). The serde deserializer's edited methods reduce to the old + behaviour under the fixed `Ordinary` policy. +- **Derive macros.** `Encode` generation is hash-identical. `Decode` and + `BorrowDecode` generation reduce to bincode_derive 2.0.1's output by literal + substitution when the fork's `untrusted` attribute is unset, which holds for + every plain `#[derive(Decode)]`/`#[derive(BorrowDecode)]`. + +This repository has no executable regression fixture for bincode wire +compatibility. The fork's own compatibility tests against bincode 2.0.1 were +read, not run. Existing blobs round-trip through the persistence unit tests, +but those tests encode and decode with the same crate, so they cannot detect +an encoder drift. + +**`platform-wallet-storage`: no change.** No migration, schema or secret-envelope +change between the pins. + +**Shielded store: additive.** `shielded_pending_spends` gains two +`INTEGER NOT NULL DEFAULT 0` columns via an idempotent `ALTER TABLE`. Older +builds still read the table. Opening the store is stricter: an already-malformed pending-spend row that +cannot be classified now fails the open (`ShieldedRecoveryCorrupted`) instead +of being skipped. + +## Deferred + +- **Contested DPNS fee label.** At protocol version 14 the contested + registration fee is 0.1 DASH and consensus requires the exact amount. The + transition amount already comes from the SDK's platform version, but + `register_dpns_name_screen.rs` still shows "Cost ≈ 0.2006 Dash". Marked + `TODO(platform-4.2-dev-bump)` (impact report F4). +- **Devnet protocol seed.** Upstream seeds devnets at protocol version 14 + because lower versions cannot deserialize devnet contracts. DET still seeds + every network at version 12 (`default_platform_version`). Marked + `TODO(platform-4.2-dev-bump)` (F5). Visibility is not the blocker: + `dash_sdk::sdk` is a public module and `min_protocol_version` is a + `pub const fn` at the new pin (`rs-sdk/src/sdk.rs:70`). What remains is the + seeding decision itself. The older `TODO(platform#4231)` beside it is a + separate cleanup; that PR is already merged. +- Other runtime deltas are covered only by network-dependent tests, which were + not run: + - rust-dashcore transaction detection and filter sync; + - the protocol-14 GroveDB proof-envelope floor; + - grovestark's GroveDB 4.0.0 parsing proofs from GroveDB 6.0 nodes. + +## Corrections to the previous notes + +`docs/ai-design/2026-09-10-platform-pin/upgrade-notes.md` is kept as a +historical record. Two of its claims are stale: + +- [#4585](https://github.com/dashpay/platform/pull/4585) is described as open. + It merged on 2026-09-11 and is included in this pin (FFI-only; DET does not + use it). +- [#4587](https://github.com/dashpay/platform/pull/4587) is described as + carrying the contact-account filter-scan generation fix. That fix was + removed from #4587 on 2026-09-14 and now lives, unmerged, in + [#4740](https://github.com/dashpay/platform/pull/4740). Neither pin contains + it. DET still invalidates scan coverage only for contact accounts it + creates at bootstrap or unlock. This bump does not change that. + +## Validation and limits + +- bincode wire compatibility: source-level analysis only (see + "Existing data"); no executable fixture. +- `cargo check --all-features --all-targets`, + `cargo fmt --all`, and + `cargo clippy --all-features --all-targets -- -D warnings` on the new pin. +- `cargo test --all-features --lib`, scoped to the bincode-persistence modules + (identity blobs including the golden v0.9.3 blob, key storage, seed and + single-key envelopes, DET k/v, wallet meta, settings, contested names, token + registry), and the new shielded error-mapping and + message tests. +- Not run: the full workspace suite (CI covers it), backend E2E, GUI tests, and + opening a real user's shielded store. Checks used Linux and synthetic data. diff --git a/src/backend_task/error.rs b/src/backend_task/error.rs index ddcc65bd6..b5e17062d 100644 --- a/src/backend_task/error.rs +++ b/src/backend_task/error.rs @@ -2456,6 +2456,54 @@ pub enum TaskError { source: platform_wallet::wallet::shielded::FileShieldedStoreError, }, + /// An earlier identity-funded shielded payment is still unresolved, so the + /// upstream coordinator refused to start this one. Nothing was built or + /// broadcast; retrying immediately hits the same refusal. + /// + /// Populated by `map_shielded_op_error` from + /// `PlatformWalletError::ShieldedIdentityDebitPending`. + #[error( + "An earlier shielded payment from identity {identity_id} has not finished yet, so this payment was not started. Wait for the earlier payment to complete, then try again." + )] + ShieldedIdentityDebitPending { + identity_id: Identifier, + #[source] + source: Box, + }, + + /// Durable shielded recovery data is damaged, so a pending payment cannot + /// be identified or reconstructed safely. The upstream `reason` stays in + /// the source chain (details/logs) and never reaches the message. + /// + /// The advised recourse is real: removing the wallet runs upstream + /// `remove_wallet` → `unregister_wallet` → `purge_wallet`, which deletes + /// the wallet's `shielded_pending_spends` rows (damaged guards included); + /// re-importing then re-binds and re-syncs from chain. + /// + /// Populated by `map_shielded_op_error` from + /// `PlatformWalletError::ShieldedRecoveryCorrupted`. + #[error("{message}", message = shielded_recovery_corrupted_message(*.account_index))] + ShieldedRecoveryCorrupted { + account_index: Option, + #[source] + source: Box, + }, + + /// An unresolved shielded payment needs viewing keys for an account that + /// is not currently available. The upstream `reason` stays in the source + /// chain (details/logs) and never reaches the message. + /// + /// Populated by `map_shielded_op_error` from + /// `PlatformWalletError::ShieldedRecoveryKeysRequired`. + #[error( + "A pending shielded payment needs shielded account #{account_index}, which is not available right now. Unlock or restore the wallet that holds this account, then try again." + )] + ShieldedRecoveryKeysRequired { + account_index: u32, + #[source] + source: Box, + }, + // ────────────────────────────────────────────────────────────────────────── // Network context errors // ────────────────────────────────────────────────────────────────────────── @@ -2859,6 +2907,18 @@ pub(crate) fn vault_error( class(Box::new(source)) } +/// User-facing text for [`TaskError::ShieldedRecoveryCorrupted`]. Upstream +/// reports the account only when the damaged record identifies one, so each +/// case gets its own complete sentence rather than a spliced fragment. +fn shielded_recovery_corrupted_message(account_index: Option) -> String { + match account_index { + Some(account_index) => format!( + "Saved recovery data for shielded account #{account_index} is damaged, so a pending payment cannot be checked safely. Make sure you have this wallet's recovery phrase, remove the wallet, then import it again with that phrase." + ), + None => "Saved recovery data for your shielded funds is damaged, so a pending payment cannot be checked safely. Make sure you have this wallet's recovery phrase, remove the wallet, then import it again with that phrase.".to_string(), + } +} + /// Escapes control characters in a token name for safe display in error messages. fn escape_token_name(name: &str) -> String { name.chars().filter(|c| !c.is_control()).collect() @@ -4644,6 +4704,65 @@ mod tests { ); } + /// The shielded recovery messages interpolate only DET-owned fields and + /// never echo the upstream `reason` (which targets developers). + #[test] + fn shielded_recovery_displays_are_actionable_and_hide_upstream_reason() { + use platform_wallet::error::PlatformWalletError as P; + const REASON: &str = "pending spend row 7 has an ill-formed nullifier"; + + let corrupted = |account_index| TaskError::ShieldedRecoveryCorrupted { + account_index, + source: Box::new(P::ShieldedRecoveryCorrupted { + account_index, + reason: REASON.to_string(), + }), + }; + let with_account = corrupted(Some(3)).to_string(); + assert!(with_account.contains("#3"), "got: {with_account}"); + let without_account = corrupted(None).to_string(); + assert!(!without_account.contains('#'), "got: {without_account}"); + + let keys = TaskError::ShieldedRecoveryKeysRequired { + account_index: 2, + source: Box::new(P::ShieldedRecoveryKeysRequired { + account_index: 2, + reason: REASON.to_string(), + }), + } + .to_string(); + assert!(keys.contains("#2"), "got: {keys}"); + + let identity_id = Identifier::from([0x5D; 32]); + let pending = TaskError::ShieldedIdentityDebitPending { + identity_id, + source: Box::new(P::ShieldedIdentityDebitPending { + identity_id: [0x5D; 32], + }), + } + .to_string(); + assert!( + pending.contains(&identity_id.to_string(Encoding::Base58)), + "got: {pending}" + ); + + for msg in [&with_account, &without_account, &keys, &pending] { + assert!(!msg.contains(REASON), "upstream reason leaked: {msg}"); + } + // Each action names a flow DET actually has (Remove + import with the + // recovery phrase; unlock/restore; wait) — never an absent backup flow. + for msg in [&with_account, &without_account] { + assert!( + msg.contains("recovery phrase") && msg.contains("import it again"), + "no remove-and-import action in: {msg}" + ); + assert!(!msg.contains("backup"), "no backup flow exists: {msg}"); + } + for msg in [&keys, &pending] { + assert!(msg.contains("then try again"), "no action in: {msg}"); + } + } + #[test] fn shielded_fee_exceeds_balance_display_shows_dash() { let err = TaskError::ShieldedFeeExceedsBalance { diff --git a/src/backend_task/tokens/query_token_non_claimed_perpetual_distribution_rewards.rs b/src/backend_task/tokens/query_token_non_claimed_perpetual_distribution_rewards.rs index c99512c7e..66477b4f7 100644 --- a/src/backend_task/tokens/query_token_non_claimed_perpetual_distribution_rewards.rs +++ b/src/backend_task/tokens/query_token_non_claimed_perpetual_distribution_rewards.rs @@ -246,6 +246,7 @@ impl AppContext { max_cycle_moment, Some(get_epoch_reward_ratio), last_claim.is_none(), + self.platform_version(), ) .map_err(|e| TaskError::TokenQueryError { detail: format!("Failed to calculate estimated rewards: {}", e), @@ -258,6 +259,7 @@ impl AppContext { max_cycle_moment, None, last_claim.is_none(), + self.platform_version(), ) .map_err(|e| TaskError::TokenQueryError { detail: format!("Failed to calculate estimated rewards: {}", e), diff --git a/src/context/contract_token_db.rs b/src/context/contract_token_db.rs index 45f28137e..2bb044e63 100644 --- a/src/context/contract_token_db.rs +++ b/src/context/contract_token_db.rs @@ -14,7 +14,7 @@ use dash_sdk::dpp::data_contract::associated_token::token_configuration::accesso use dash_sdk::dpp::data_contract::associated_token::token_configuration_convention::accessors::v0::TokenConfigurationConventionV0Getters; use dash_sdk::dpp::platform_value::string_encoding::Encoding; use dash_sdk::dpp::serialization::{ - PlatformDeserializableWithPotentialValidationFromVersionedStructure, + PlatformDeserializableWithPotentialValidationFromVersionedStructureUntrusted, PlatformSerializableWithPlatformVersion, }; use dash_sdk::platform::{DataContract, Identifier}; @@ -184,7 +184,11 @@ impl AppContext { &self, stored: StoredContract, ) -> std::result::Result { - let contract = DataContract::versioned_deserialize( + // DET wrote these bytes, but the untrusted decoder accepts every valid + // stored contract under the same no-limit config and does not + // pre-allocate from length prefixes, so a corrupt local entry fails + // the decode instead of aborting on a huge allocation. + let contract = DataContract::versioned_deserialize_untrusted( &stored.contract_bytes, false, self.platform_version(), diff --git a/src/context/mod.rs b/src/context/mod.rs index 20735b7c3..1f6a24400 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -1619,6 +1619,7 @@ impl AppContext { // Revert to `.with_version()` (a hard pin) or otherwise reconsider this once // https://github.com/dashpay/platform/pull/4231 merges and this repo's platform // pin advances past it. +// TODO(platform-4.2-dev-bump): devnet should seed at ≥PV14 per rs-sdk::min_protocol_version; needs to confirm that function is reachable from DET's dash-sdk re-export first (open question) — see platform-4.2-dev-impact.md F5 pub(crate) const fn default_platform_version(_network: &Network) -> &'static PlatformVersion { &PLATFORM_V12 } diff --git a/src/ui/identity/register_dpns_name_screen.rs b/src/ui/identity/register_dpns_name_screen.rs index de468b1a8..d8267a4a6 100644 --- a/src/ui/identity/register_dpns_name_screen.rs +++ b/src/ui/identity/register_dpns_name_screen.rs @@ -535,6 +535,7 @@ impl ScreenLike for RegisterDpnsNameScreen { ); ui.colored_label( egui::Color32::DARK_RED, + // TODO(platform-4.2-dev-bump): derive from the active platform version's contested_document_vote_resolution_fund_required_amount once PV14 is live on a real network; see /data/artifacts/dash-evo-tool/2026-09-14/platform-4.2-dev-impact.md F4 "Cost ≈ 0.2006 Dash", ); } else { diff --git a/src/ui/tools/contract_visualizer_screen.rs b/src/ui/tools/contract_visualizer_screen.rs index ea3003f7d..912511f78 100644 --- a/src/ui/tools/contract_visualizer_screen.rs +++ b/src/ui/tools/contract_visualizer_screen.rs @@ -7,7 +7,7 @@ use crate::ui::components::tools_subscreen_chooser_panel::add_tools_subscreen_ch use crate::ui::components::top_panel::add_top_panel; use crate::ui::theme::DashColors; use base64::{Engine, engine::general_purpose::STANDARD}; -use dash_sdk::dpp::serialization::PlatformDeserializableWithPotentialValidationFromVersionedStructure; +use dash_sdk::dpp::serialization::PlatformDeserializableWithPotentialValidationFromVersionedStructureUntrusted; use dash_sdk::platform::DataContract; use eframe::egui::{Color32, Frame, Margin, RichText, ScrollArea, TextEdit, Ui}; use std::sync::Arc; @@ -88,7 +88,9 @@ impl ContractVisualizerScreen { } }; - match DataContract::versioned_deserialize( + // Pasted bytes are untrusted input: decode without pre-allocating + // from length prefixes. + match DataContract::versioned_deserialize_untrusted( &bytes, false, self.app_context.platform_version(), diff --git a/src/ui/tools/transition_visualizer_screen.rs b/src/ui/tools/transition_visualizer_screen.rs index 128939bad..63c87db41 100644 --- a/src/ui/tools/transition_visualizer_screen.rs +++ b/src/ui/tools/transition_visualizer_screen.rs @@ -13,7 +13,7 @@ use crate::ui::{MessageType, RootScreenType, ScreenLike}; use base64::{Engine, engine::general_purpose::STANDARD}; use dash_sdk::dpp::data_contract::accessors::v0::DataContractV0Getters; use dash_sdk::dpp::platform_value::string_encoding::Encoding; -use dash_sdk::dpp::serialization::PlatformDeserializable; +use dash_sdk::dpp::serialization::PlatformDeserializableUntrusted; use dash_sdk::dpp::state_transition::StateTransition; use dash_sdk::platform::Identifier; use eframe::egui::{self, Color32, ScrollArea, TextEdit, Ui, Window}; @@ -122,8 +122,9 @@ impl TransitionVisualizerScreen { match decoded_bytes { Ok(bytes) => { - // Try to deserialize into a StateTransition - match StateTransition::deserialize_from_bytes(&bytes) { + // Pasted bytes are untrusted input: decode without + // pre-allocating from length prefixes. + match StateTransition::deserialize_from_bytes_untrusted(&bytes) { Ok(state_transition) => { // Convert to JSON match serde_json::to_string_pretty(&state_transition) { diff --git a/src/wallet_backend/mod.rs b/src/wallet_backend/mod.rs index 17e5aacd2..49b433372 100644 --- a/src/wallet_backend/mod.rs +++ b/src/wallet_backend/mod.rs @@ -3136,6 +3136,31 @@ fn map_shielded_op_error(e: platform_wallet::error::PlatformWalletError) -> Task } } + // Upstream refused to start a new identity-funded shield while an + // earlier one is unresolved. Nothing was built or broadcast, so the + // user must wait for the earlier payment rather than retry now. + other @ P::ShieldedIdentityDebitPending { identity_id } => { + TaskError::ShieldedIdentityDebitPending { + identity_id: dash_sdk::platform::Identifier::from(identity_id), + source: Box::new(other), + } + } + + // Durable recovery data is damaged or needs keys that are not loaded. + // Retrying cannot help; the user must restore data or keys first. + other @ P::ShieldedRecoveryCorrupted { account_index, .. } => { + TaskError::ShieldedRecoveryCorrupted { + account_index, + source: Box::new(other), + } + } + other @ P::ShieldedRecoveryKeysRequired { account_index, .. } => { + TaskError::ShieldedRecoveryKeysRequired { + account_index, + source: Box::new(other), + } + } + // Every remaining variant → generic WalletBackend wrapper. other @ (P::WalletCreation(_) | P::StaleReservation @@ -3508,6 +3533,11 @@ fn identity_op_error_kind(e: &platform_wallet::error::PlatformWalletError) -> Id // shielded op. `map_shielded_op_error` routes it where it can occur. | P::ShieldedBroadcastUnconfirmed { .. } | P::ShieldedSpendUnconfirmed { .. } + // Shielded debit / recovery outcomes are likewise unreachable from + // identity register, top-up or address funding. + | P::ShieldedIdentityDebitPending { .. } + | P::ShieldedRecoveryCorrupted { .. } + | P::ShieldedRecoveryKeysRequired { .. } // Funding and credit shortfalls, like their `CoreInsufficientFunds` // sibling above: the submission never reached Platform. | P::CorePooledInsufficientFunds { .. } @@ -4430,6 +4460,75 @@ mod tests { )); } + /// Debit-pending and the two recovery outcomes carry guidance the generic + /// `WalletBackend` envelope ("please retry") would contradict, so each + /// routes to its own typed variant with its identifying field intact. + #[test] + fn map_shielded_op_error_routes_recovery_and_debit_pending() { + use platform_wallet::error::PlatformWalletError as P; + + let identity_bytes = [0x5D; 32]; + match map_shielded_op_error(P::ShieldedIdentityDebitPending { + identity_id: identity_bytes, + }) { + TaskError::ShieldedIdentityDebitPending { identity_id, .. } => { + assert_eq!( + identity_id, + dash_sdk::platform::Identifier::from(identity_bytes) + ); + } + other => panic!("Expected ShieldedIdentityDebitPending, got: {other:?}"), + } + + for expected in [Some(3), None] { + match map_shielded_op_error(P::ShieldedRecoveryCorrupted { + account_index: expected, + reason: "row 7 is damaged".to_string(), + }) { + TaskError::ShieldedRecoveryCorrupted { account_index, .. } => { + assert_eq!(account_index, expected); + } + other => panic!("Expected ShieldedRecoveryCorrupted, got: {other:?}"), + } + } + + match map_shielded_op_error(P::ShieldedRecoveryKeysRequired { + account_index: 2, + reason: "viewing keys missing".to_string(), + }) { + TaskError::ShieldedRecoveryKeysRequired { account_index, .. } => { + assert_eq!(account_index, 2); + } + other => panic!("Expected ShieldedRecoveryKeysRequired, got: {other:?}"), + } + } + + /// No identity register / top-up / address-funding flow runs a shielded + /// op, so these outcomes land in the generic `Other` bucket there. + #[test] + fn identity_op_error_kind_buckets_new_shielded_recovery_variants_as_other() { + use platform_wallet::error::PlatformWalletError as P; + let errors = [ + P::ShieldedIdentityDebitPending { + identity_id: [0x5D; 32], + }, + P::ShieldedRecoveryCorrupted { + account_index: None, + reason: "damaged".to_string(), + }, + P::ShieldedRecoveryKeysRequired { + account_index: 0, + reason: "keys missing".to_string(), + }, + ]; + for error in &errors { + assert!( + matches!(identity_op_error_kind(error), IdentityOpErrorKind::Other), + "Expected IdentityOpErrorKind::Other for {error:?}" + ); + } + } + fn broadcast_unconfirmed() -> platform_wallet::error::PlatformWalletError { platform_wallet::error::PlatformWalletError::TransactionBroadcastUnconfirmed( "peer timed out after send".to_string(),