From c6bdd35814dc2d316bc5d1f0f1d13293ca2ec64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Wed, 2 Apr 2025 18:53:30 +0200 Subject: [PATCH 1/5] chore: bump MSRV to 1.81.0 --- .github/workflows/build.yml | 2 +- Cargo.lock | 155 ++++++++++++++++++------------------ Cargo.toml | 2 +- MANIFEST.yml | 2 +- 4 files changed, 79 insertions(+), 82 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d8bcaaf..edd29fa7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: strategy: fail-fast: false matrix: - toolchain: [ nightly, beta, stable, 1.77.0 ] + toolchain: [ nightly, beta, stable, 1.81.0 ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master diff --git a/Cargo.lock b/Cargo.lock index a0f1ede4..f05ed7f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,13 +95,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.100", ] [[package]] @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "block-buffer" @@ -148,15 +148,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "cfg-if" @@ -226,18 +220,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-common" @@ -288,9 +282,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "filetime" @@ -336,9 +330,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" dependencies = [ "cfg-if", "crunchy", @@ -364,9 +358,9 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "indexmap" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown", @@ -374,9 +368,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "lazy_static" @@ -386,9 +380,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libredox" @@ -403,9 +397,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "memchr" @@ -440,9 +434,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "paste" @@ -452,33 +446,33 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ "zerocopy", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -515,9 +509,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ "bitflags", ] @@ -573,9 +567,9 @@ dependencies = [ [[package]] name = "rustfix" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f5b7fc8060f4f8373f9381a630304b42e1183535d9beb1d3f596b236c9106a" +checksum = "82fa69b198d894d84e23afde8e9ab2af4400b2cba20d6bf2b428a8b01c222c5a" dependencies = [ "serde", "serde_json", @@ -585,41 +579,41 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.100", ] [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -720,9 +714,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.91" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -770,7 +764,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.100", ] [[package]] @@ -794,15 +788,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-width" @@ -834,34 +828,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.100", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -869,22 +864,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "winapi" @@ -1049,21 +1047,20 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" dependencies = [ - "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.100", ] diff --git a/Cargo.toml b/Cargo.toml index 90ad6373..68d48ba3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ version = "0.11.0" authors = ["Dr Maxim Orlovsky "] homepage = "https://github.com/LNP-BP" repository = "https://github.com/LNP-BP/client_side_validation" -rust-version = "1.77.0" # Due to `rustfix` +rust-version = "1.81.0" edition = "2021" license = "Apache-2.0" diff --git a/MANIFEST.yml b/MANIFEST.yml index eb94ce12..e90c0a90 100644 --- a/MANIFEST.yml +++ b/MANIFEST.yml @@ -3,7 +3,7 @@ Type: Library Kind: Free software License: Apache-2.0 Language: Rust -Compiler: 1.77 +Compiler: 1.81 Author: Maxim Orlovsky Maintained: UBIDECO Institute, Switzerland Maintainers: From 52a1d7fef821dbc833a483cc508b4cd12955e468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Wed, 23 Apr 2025 15:55:49 +0200 Subject: [PATCH 2/5] get ref in MerkleBlock::merge_reveal --- commit_verify/src/mpc/block.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commit_verify/src/mpc/block.rs b/commit_verify/src/mpc/block.rs index 229d364e..0e5832ff 100644 --- a/commit_verify/src/mpc/block.rs +++ b/commit_verify/src/mpc/block.rs @@ -435,12 +435,12 @@ impl MerkleBlock { message: Message, ) -> Result { let block = MerkleBlock::with(proof, protocol_id, message)?; - self.merge_reveal(block) + self.merge_reveal(&block) } /// Merges two merkle blocks together, joining revealed information from /// each one of them. - pub fn merge_reveal(&mut self, other: MerkleBlock) -> Result { + pub fn merge_reveal(&mut self, other: &MerkleBlock) -> Result { let orig = self.clone(); let base_root = self.commit_id(); let merged_root = other.commit_id(); @@ -789,7 +789,7 @@ mod test { let mut merged_block = MerkleBlock::with(proof, pid, msg).unwrap(); for (proof, (pid, msg)) in iter { let block = MerkleBlock::with(proof, pid, msg).unwrap(); - if let Err(err) = merged_block.merge_reveal(block.clone()) { + if let Err(err) = merged_block.merge_reveal(&block) { eprintln!("Error: {err}"); eprintln!("Source tree: {mpc_tree:#?}"); eprintln!("Source block: {mpc_block:#?}"); From f8dd8410fbe4b841c40056822ba3756d2b8159bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Fri, 18 Apr 2025 18:42:30 +0200 Subject: [PATCH 3/5] update deps --- Cargo.lock | 104 ++++++++++++++---------- Cargo.toml | 6 +- commit_verify/Cargo.toml | 6 +- commit_verify/src/mpc/tree.rs | 6 +- commit_verify/src/stl.rs | 8 +- stl/CommitVerify@0.1.0.sta | 18 ++--- stl/CommitVerify@0.1.0.stl | Bin 1550 -> 1550 bytes stl/CommitVerify@0.1.0.sty | 4 +- stl/Merkle.vesper | 148 +++++++++++++++++----------------- 9 files changed, 158 insertions(+), 142 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f05ed7f4..58fd7d68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "amplify" -version = "4.7.1" +version = "4.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2090b9b79b61d4047a307a46de043d0ee5ec406d99a7d652341b96d48ed5567" +checksum = "3a9d7cb29f1d4c6ec8650abbee35948b8bdefb7f0750a26445ff593eb9bf7fcf" dependencies = [ "amplify_apfloat", "amplify_derive", @@ -82,9 +82,9 @@ dependencies = [ [[package]] name = "ascii-armor" -version = "0.7.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4966ac403dc4a666d8131dfe4df684f45acc68d4c7e768db89c463aa5617910" +checksum = "0269eb842ec952b027df0fc33184b6a0dea5ea473160b36992274eb53758461e" dependencies = [ "amplify", "baid64", @@ -106,9 +106,9 @@ dependencies = [ [[package]] name = "baid64" -version = "0.2.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95dabc2759e01e2c382968639868a701f384a18890934f9e75d4feb4d6623794" +checksum = "6cb4a8b2f1afee4ef00a190b260ad871842b93206177b59631fecd325d48d538" dependencies = [ "amplify", "base64", @@ -227,12 +227,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crunchy" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" - [[package]] name = "crypto-common" version = "0.1.6" @@ -319,23 +313,25 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "half" -version = "2.5.0" +name = "getrandom" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", - "crunchy", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -358,9 +354,9 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown", @@ -380,9 +376,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libredox" @@ -461,9 +457,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -477,22 +473,27 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "rand" -version = "0.8.5" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ - "libc", "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", "rand_core", @@ -500,18 +501,18 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom", + "getrandom 0.3.2", ] [[package]] name = "redox_syscall" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" dependencies = [ "bitflags", ] @@ -522,7 +523,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.16", "libredox", "thiserror", ] @@ -652,9 +653,9 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "2.7.2" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e4b581b61221082818d58db91630aed6e4a3237afb775fc7e5e4e2eba50d5e" +checksum = "8553c0321466c11aa1e33f082c9190194f380efd8824bf5ce4fa56b64b875be9" dependencies = [ "amplify", "strict_encoding_derive", @@ -676,14 +677,13 @@ dependencies = [ [[package]] name = "strict_types" -version = "2.7.2" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bae7475fc901144d8a35d25e36d76aa020b840f233d60532d6d52318718781b" +checksum = "07dd1bdf4bfce0a1ff3eec041e7d4d20b06d22ca2aaf71338726dd9609e57a5e" dependencies = [ "amplify", "ascii-armor", "baid64", - "half", "indexmap", "sha2", "strict_encoding", @@ -812,9 +812,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vesper-lang" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72ebd3b32f16ee8ace2bd3058c2bfa0f4820992bd4ea86e73ba228bb13dd2b0" +checksum = "cd2b7e3e27aeb0524204e58042f6e4531a720745d1b1a3978d3a084f1885f63d" dependencies = [ "amplify", "strict_encoding", @@ -826,6 +826,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -1045,6 +1054,15 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + [[package]] name = "zerocopy" version = "0.8.24" diff --git a/Cargo.toml b/Cargo.toml index 68d48ba3..5c6611db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,9 @@ edition = "2021" license = "Apache-2.0" [workspace.dependencies] -amplify = "~4.7.1" -strict_encoding = "~2.7.0" -strict_types = "~2.7.0" +amplify = "~4.8.0" +strict_encoding = "~2.8.2" +strict_types = "~2.8.3" [package] name = "client_side_validation" diff --git a/commit_verify/Cargo.toml b/commit_verify/Cargo.toml index 14d19290..ae542ada 100644 --- a/commit_verify/Cargo.toml +++ b/commit_verify/Cargo.toml @@ -25,15 +25,15 @@ required-features = ["stl"] amplify = { workspace = true, features = ["hex", "apfloat"] } strict_encoding = { workspace = true } strict_types = { workspace = true } -vesper-lang = "0.1.0" +vesper-lang = "0.2.1" commit_encoding_derive = { version = "0.11.0", path = "derive" } sha2 = "0.10.8" ripemd = "0.1.3" -rand = { version = "0.8.5", optional = true } +rand = { version = "0.9.1", optional = true } serde_crate = { version = "1.0", package = "serde", optional = true } [dev-dependencies] -rand = "0.8.5" +rand = "0.9.1" [features] default = ["derive"] diff --git a/commit_verify/src/mpc/tree.rs b/commit_verify/src/mpc/tree.rs index 26c6d267..0894c5e5 100644 --- a/commit_verify/src/mpc/tree.rs +++ b/commit_verify/src/mpc/tree.rs @@ -120,7 +120,7 @@ mod commit { fn try_commit(source: &MultiSource) -> Result { #[cfg(feature = "rand")] - use rand::{thread_rng, RngCore}; + use rand::{rng, RngCore}; let msg_count = source.messages.len(); @@ -132,9 +132,7 @@ mod commit { } #[cfg(feature = "rand")] - let entropy = source - .static_entropy - .unwrap_or_else(|| thread_rng().next_u64()); + let entropy = source.static_entropy.unwrap_or_else(|| rng().next_u64()); #[cfg(not(feature = "rand"))] let entropy = source.static_entropy.expect( "use must use `rand` feature for crate commit_verify if you do not provide with a \ diff --git a/commit_verify/src/stl.rs b/commit_verify/src/stl.rs index 4fcd398e..6bfea75e 100644 --- a/commit_verify/src/stl.rs +++ b/commit_verify/src/stl.rs @@ -24,12 +24,12 @@ use strict_types::{CompileError, LibBuilder, TypeLib}; use crate::{mpc, MerkleHash, MerkleNode, ReservedBytes, StrictHash, LIB_NAME_COMMIT_VERIFY}; pub const LIB_ID_COMMIT_VERIFY: &str = - "stl:egMd32l9-y$Kod0o-$FRcNAV-Q4U$O5h-pskW9YM-$irF0yY#miller-pancake-elastic"; + "stl:TGUWcCPX-99GBEi0-tlbMxUg-1SS_~Qh-_IdYDJt-zjJ3uMI#violet-panther-herbert"; fn _commit_verify_stl() -> Result { - LibBuilder::new(libname!(LIB_NAME_COMMIT_VERIFY), tiny_bset! { - strict_types::stl::std_stl().to_dependency() - }) + LibBuilder::with(libname!(LIB_NAME_COMMIT_VERIFY), [ + strict_types::stl::std_stl().to_dependency_types() + ]) .transpile::>() .transpile::>() .transpile::>() diff --git a/stl/CommitVerify@0.1.0.sta b/stl/CommitVerify@0.1.0.sta index 5af897f2..bece03da 100644 --- a/stl/CommitVerify@0.1.0.sta +++ b/stl/CommitVerify@0.1.0.sta @@ -1,31 +1,31 @@ -----BEGIN STRICT TYPE LIB----- -Id: stl:egMd32l9-y$Kod0o-$FRcNAV-Q4U$O5h-pskW9YM-$irF0yY#miller-pancake-elastic +Id: stl:TGUWcCPX-99GBEi0-tlbMxUg-1SS_~Qh-_IdYDJt-zjJ3uMI#violet-panther-herbert Name: CommitVerify -Dependencies: Std#ralph-blue-lucky -Check-SHA256: ce5ec3f773efffb6535247e84c9da1bfc1656c1a35c616832abf5eecaa5feb44 +Dependencies: Std#delete-roman-hair +Check-SHA256: f64d9326d6c5c04e7fe205e71e2c2873b220d9b60ededce3bd17324ff5731a66 -3`1{iZE18?WpZg|c>&5S9&dx0-7pM3Z=O*v*GCA9fL-<|HrZsA`NnJlR3`&dbYuYoQ*>kj0A^Tl*p6J$ +3`1{iZE18?WpZg|c>#in>rD>}a8$2!O9kk`*PSB+rd(so&!uOW`TABoF=_)-bYuYoQ*>kj0A^Tl*p6J$ 36SYb7g#;qpQBTpwL(~+!(f@;t~vt?k^)sV5C958Z*6U9bZupBbOiwb2LJ#-AOHkRWnpFn0uTvlZfId* X>?^|00sgGaB^>SZ)0z40Wg(*<{e=)S-S-YV@1=_p5>Oab-~jCR3C`SFec^=zG+gvC|O;Wo~qGZ*X}41_B3VZgg^QaCra#2m^3$a{vGY3r%HmYiwmg -Y;R+01_T9UWpH$80?I5NZ-bfLFbqC#o>4E?M+l67UG^w8*<_XZ#%uyqCuUf1*p6J$36SYb7g#;qpQBTp +Y;R+01_T9UWpH$80)mO_O%DrjRIhYP1?a)oog)LLTw}}6rDvG=`c^zKYGzn)*p6J$36SYb7g#;qpQBTp wL(~+!(f@;t~vt?k_cmOW?^G=Z*l+t0t{nvZ*y}~Wn*+{Z*Bkx0ob*-9G+(AKhLw+s!eDmlO2> &}_PPHjCBJR{;P3000000RR90{{R3000(7mbaHQSc>n|g00eGtZe;)f009JZZ*64&1pxp62oFtVa%*g5 -LvLrD>}a8$2!O9kk`*PSB+rd(so&!uOW`TABoF=}R5aM+Gq(Fu_0Ocz)^ +@GUUoV7w&pu=F9->y0X3z7(9Z)Ra*bZ>G100IhaWpZn5Wm0c%bOAV?Lxv|61vo|G100IbYWpi_3 +000000000W000000000AO=WUxY-Ln(Wn~5h1!QG#bZ7#CiR(=d3vg7gbV~*3!PlK51EySK%g?1}nECov +JTYo!Sa8^mT+s=T=}Z?`J=~w8Q=GLzSfImTncuED0}GM|Wo~qGZ*X}400;G100IbYWpi_3 XJvB$3IQ;ce&!uvG+Da^2;||fJ!&Dp*8BS%F@mRgpt-$m)gMQunKY@^NKR1twFJLRYVe 6X<)?o3YaX0000000030|Nj6000003ZDDW#3IG5E00ja8FqMAh9bq(Cy9Eg3;jcYvA-~r9`yDZYr+MW? bl_I80W~+NQ5DGQh1^p2tAX-yWl;qtQ~GYywm#W>|38j$F|Rkm*bpSUudIqf?xWBLk*fW6RH_XPEi=Ry;9kW>|38j$F|Rkm*bpSUudIqf?x@I6Zgfm#VP*gZ0t#?)Z**^C Z){0q0Wg(*<{e=)S-S-YV@1=_p5>Oab-~j CR3C`SFec^=zG+gvC{ diff --git a/stl/CommitVerify@0.1.0.stl b/stl/CommitVerify@0.1.0.stl index 6f83b3629b8871b2098e8ede1d13f5e8a235c548..5913efed3b8ef1d525cd8a7b9ec20da496451022 100644 GIT binary patch delta 220 zcmeC<>EqGkan8@p%`6E^Ey_%*WNhku?aR+y5VF3+oAt%P>vNTvm&GKXKEE`5#?N12 pHilUf_3kSWQZqS$RbjF(V=J)=c{a;2xiS)^dh=rDxkRa42LLhIV7~wW delta 220 zcmeC<>EqGkan8@p%`6E^Ey_%*WIUxKm)|_|t^to-{=7i_>+T#q4YA)e%x Date: Wed, 30 Apr 2025 16:57:36 +0200 Subject: [PATCH 4/5] ignore very long tests --- .github/workflows/test.yml | 2 +- commit_verify/src/mpc/tree.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index edcc11e2..1204bbe9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,4 +26,4 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - name: Test ${{matrix.os}} - run: cargo test --workspace --all-features --no-fail-fast + run: cargo test --workspace --all-features --no-fail-fast -- --include-ignored diff --git a/commit_verify/src/mpc/tree.rs b/commit_verify/src/mpc/tree.rs index 0894c5e5..2184a678 100644 --- a/commit_verify/src/mpc/tree.rs +++ b/commit_verify/src/mpc/tree.rs @@ -291,6 +291,7 @@ mod test { } #[test] + #[ignore = "should be executed alone for performance reasons"] fn tree_huge() { // Tree with 8192 protocol-messages: depth 23, cofactor 103. Serialized length // 1081361 bytes. Takes 71589 msecs to generate @@ -372,6 +373,7 @@ mod test { } #[test] + #[ignore = "should be executed alone for performance reasons"] fn scalability() { let mut depths = vec![]; let mut cofacs = vec![]; From e404bcdfc84797fc4652e0b9f405d10cf2c6ddbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Wed, 30 Apr 2025 17:54:39 +0200 Subject: [PATCH 5/5] chore: bump version to 0.11.1-alpha.2 --- Cargo.lock | 36 ++++++++++++++++++------------------ Cargo.toml | 6 +++--- commit_verify/Cargo.toml | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58fd7d68..d685db73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,7 +101,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -160,7 +160,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "client_side_validation" -version = "0.11.0" +version = "0.11.1-alpha.2" dependencies = [ "commit_verify", "serde", @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "commit_encoding_derive" -version = "0.11.0" +version = "0.11.1-alpha.2" dependencies = [ "amplify", "amplify_syn", @@ -183,7 +183,7 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.11.0" +version = "0.11.1-alpha.2" dependencies = [ "amplify", "commit_encoding_derive", @@ -607,7 +607,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -634,9 +634,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -645,7 +645,7 @@ dependencies = [ [[package]] name = "single_use_seals" -version = "0.11.0" +version = "0.11.1-alpha.2" dependencies = [ "amplify_derive", "async-trait", @@ -714,9 +714,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.100" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -764,7 +764,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -857,7 +857,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -879,7 +879,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1065,20 +1065,20 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] diff --git a/Cargo.toml b/Cargo.toml index 5c6611db..a82a21f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ default-members = [ ] [workspace.package] -version = "0.11.0" +version = "0.11.1-alpha.2" authors = ["Dr Maxim Orlovsky "] homepage = "https://github.com/LNP-BP" repository = "https://github.com/LNP-BP/client_side_validation" @@ -46,8 +46,8 @@ name = "client_side_validation" path = "src/lib.rs" [dependencies] -commit_verify = { version = "0.11.0", path = "./commit_verify", default-features = false } -single_use_seals = { version = "0.11.0", path = "./single_use_seals" } +commit_verify = { version = "0.11.1-alpha.2", path = "./commit_verify", default-features = false } +single_use_seals = { version = "0.11.1-alpha.2", path = "./single_use_seals" } serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } [features] diff --git a/commit_verify/Cargo.toml b/commit_verify/Cargo.toml index ae542ada..df71eed7 100644 --- a/commit_verify/Cargo.toml +++ b/commit_verify/Cargo.toml @@ -26,7 +26,7 @@ amplify = { workspace = true, features = ["hex", "apfloat"] } strict_encoding = { workspace = true } strict_types = { workspace = true } vesper-lang = "0.2.1" -commit_encoding_derive = { version = "0.11.0", path = "derive" } +commit_encoding_derive = { version = "0.11.1-alpha.2", path = "derive" } sha2 = "0.10.8" ripemd = "0.1.3" rand = { version = "0.9.1", optional = true }