diff --git a/ckb-auth-rs/Cargo.toml b/ckb-auth-rs/Cargo.toml index 02a3cd4..7db5251 100644 --- a/ckb-auth-rs/Cargo.toml +++ b/ckb-auth-rs/Cargo.toml @@ -9,14 +9,14 @@ edition = "2021" default = ["dynamic-library-memory-200"] ckb2023 = ["ckb-std/ckb2023"] -enable-dynamic-library = ["lazy_static"] +enable-dynamic-library = ["lazy_static", "ckb-std/dlopen-c", "ckb-std/ckb-types"] dynamic-library-memory-200 = ["enable-dynamic-library"] # enable these features when memory is not enough dynamic-library-memory-400 = ["enable-dynamic-library"] dynamic-library-memory-600 = ["enable-dynamic-library"] [dependencies] -ckb-std = "0.14.3" +ckb-std = { version = "0.15", default-features = false } lazy_static = { version = "1.4.0", optional = true, features = ["spin_no_std"] } [target.'cfg(target_arch = "riscv64")'.dependencies] diff --git a/deps/ckb-c-stdlib-2023 b/deps/ckb-c-stdlib-2023 index efe1fe6..458af43 160000 --- a/deps/ckb-c-stdlib-2023 +++ b/deps/ckb-c-stdlib-2023 @@ -1 +1 @@ -Subproject commit efe1fe6b3cdda12e248e25664f5c04cbf7876265 +Subproject commit 458af43931d122559c42fdd5bf879509a3e10a21 diff --git a/tests/Makefile b/tests/Makefile index d48b7e5..e8e1b27 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -43,7 +43,11 @@ clean-c-tests: rm -rf auth-c-tests/target rust-demo-tests: - export PATH=$(shell pwd)/bin/:"$(PATH)" && cd auth-rust-lock/ && capsule build && capsule test + export PATH=$(shell pwd)/bin/:"$(PATH)" && \ + cd auth-rust-lock/ && \ + capsule build --release && \ + cd tests && \ + cargo test clean-rust-demo-tests: export PATH=$(shell pwd)/bin/:"$(PATH)" && cd auth-rust-lock/ && capsule clean @@ -51,21 +55,21 @@ clean-rust-demo-tests: rust-demo-tests-no-def-features: clean-rust-demo-tests export PATH=$(shell pwd)/bin/:"$(PATH)" && \ cd auth-rust-lock && \ - capsule build -- --no-default-features && \ + capsule build --release -- --no-default-features && \ cd tests && \ cargo test --no-default-features rust-demo-tests-only-ckb2023: clean-rust-demo-tests export PATH=$(shell pwd)/bin/:"$(PATH)" && \ cd auth-rust-lock && \ - capsule build -- --no-default-features --features="ckb2023" && \ + capsule build --release -- --no-default-features --features="ckb2023" && \ cd tests && \ cargo test --no-default-features --features="ckb2023" rust-demo-tests-only-dl: clean-rust-demo-tests export PATH=$(shell pwd)/bin/:"$(PATH)" && \ cd auth-rust-lock && \ - capsule build -- --no-default-features --features="enable-dynamic-library" && \ + capsule build --release -- --no-default-features --features="enable-dynamic-library" && \ cd tests && \ cargo test --no-default-features --features="enable-dynamic-library" @@ -86,7 +90,6 @@ install-all: \ install-ckb-tools: \ bin \ install-ckb-debugger \ - install-moleculec \ install-capsule \ install-cross @@ -100,9 +103,6 @@ else ifeq ($(shell uname),Linux) rm -rf LICENSE ckb-debugger-linux-x64.tar.gz endif -install-moleculec: - cargo install moleculec --version 0.7.3 --root ./ - install-capsule: ifeq ($(shell uname),Darwin) cargo install ckb-capsule --version "0.10.2" --root ./ diff --git a/tests/auth-c-tests/Cargo.lock b/tests/auth-c-tests/Cargo.lock index a92d7e1..7823a87 100644 --- a/tests/auth-c-tests/Cargo.lock +++ b/tests/auth-c-tests/Cargo.lock @@ -317,12 +317,10 @@ dependencies = [ name = "auth_c_tests" version = "0.1.0" dependencies = [ - "anyhow", "base58-monero", "base64 0.21.5", - "bincode", "bitcoin", - "bs58 0.5.0", + "bs58 0.5.1", "ckb-auth-rs", "ckb-chain-spec", "ckb-crypto", @@ -333,7 +331,6 @@ dependencies = [ "ckb-types", "dyn-clone", "hex", - "hex-literal 0.4.1", "lazy_static", "log", "monero", @@ -343,7 +340,6 @@ dependencies = [ "ripemd", "ripple-keypairs", "secp256k1 0.22.2", - "serde", "serde_json", "sha2 0.10.8", "sha3 0.9.1", @@ -688,19 +684,13 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "tinyvec", ] -[[package]] -name = "buddy-alloc" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" - [[package]] name = "bumpalo" version = "3.14.0" @@ -820,9 +810,9 @@ dependencies = [ [[package]] name = "ckb-chain-spec" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd58081d4ac4f08d068b52c5a07f0b379d93aad0dfa8344c6890429a9b73c2b" +checksum = "fa9b89cadf419c220fa8e1c655af73540bbc010e8c0e177127644848a25830c2" dependencies = [ "ckb-constant", "ckb-crypto", @@ -842,24 +832,24 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "701e6829c3dcbae46dd2442de63d080046480a6c2bb4951dbf419ad092459402" +checksum = "82c904fe3e29474e4d09e8e2775a472456242f8faf18edeeb8c71502710daa38" dependencies = [ "crossbeam-channel", ] [[package]] name = "ckb-constant" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5c980d4724770f72a37bceffa26ea64dd914891e45e856e2a3792fdb4a5a18" +checksum = "c7d562e7156216f00c5bf55c8f4c86bc25f9ec0603fcfa6df9b66747462a031a" [[package]] name = "ckb-crypto" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df80db694e42b64a5774ae551daff3c8310cd99bb528643dbe0dd409abb298e7" +checksum = "abac585cec6f1562e374d66b369c55a52357b33a632d30d2e45cbc455183b22d" dependencies = [ "ckb-fixed-hash", "faster-hex", @@ -871,9 +861,9 @@ dependencies = [ [[package]] name = "ckb-dao-utils" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e158ce5a4e9d1fcd08d9dee87332474572c629c6273cca0aea80ba24892a403" +checksum = "ff55485163b842c94061b755c9e6230d1a4bb092b6bc81d8387358911c750e70" dependencies = [ "byteorder", "ckb-error", @@ -882,9 +872,9 @@ dependencies = [ [[package]] name = "ckb-error" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cfd733cabcb4262ee679c02733864b13c8fa879e3aabc078fe0ec727cd95d6" +checksum = "b8418901ea0d15a8e26255bec0b71be5c59056858f51968894796f77f7eefa3e" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -894,9 +884,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1dfab045fffa31cae9680d73e1f09833ca1abfb807dc4b9544739c94c23fd0" +checksum = "1254aafda84e9abc85301e9e4c5b920c00a9bff0d42248fccf921b340ec5f13e" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -904,9 +894,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd1727a6ecd4d0bcab604cb1ef707fe92e939fa6e9a438f9f25bf05208cb080" +checksum = "5ffc2850ac8b5643c65913185020de747b290b447d1ee1fd59a2cfdf1a7ceb4f" dependencies = [ "faster-hex", "serde", @@ -915,9 +905,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5da34c32585c35715fcde4e3a1dd3b0346d7af43506c5e51c613f01483e4f9" +checksum = "baa5a19a7d18caa5a3a65e66506e28943e95696e286df44457a77692319de429" dependencies = [ "ckb-fixed-hash-core", "proc-macro2 1.0.69", @@ -927,9 +917,9 @@ dependencies = [ [[package]] name = "ckb-gen-types" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3bc54ca99b09e1eb5fc6c49bb1156644ce57fce9c6f52b5c13110b9a3143f7e" +checksum = "4a12020d50dd3757cde0fdc88d3837b7a2ab503fe38bd11be86ddace11318c77" dependencies = [ "cfg-if", "ckb-error", @@ -942,9 +932,9 @@ dependencies = [ [[package]] name = "ckb-hash" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c88e5e2d6454be488fa5cf8b49175879353c6af969ff210dd6416f315b53120" +checksum = "25af660fc8746f7c756444e6aa47ede9a874206563b6a1ce1b230a5b86519392" dependencies = [ "blake2b-ref", "blake2b-rs", @@ -952,9 +942,9 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d789a71538da07871c11aecbd28d6c632bb426bdfeed5fc2fa1b455e31152468" +checksum = "06798b5bacd7fd4125a34f1c9ebf45be59d50aff0ada003bb8b1c6634a447c73" dependencies = [ "ckb-types", "faster-hex", @@ -964,9 +954,9 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939fa09ca3534248d3d452552546f016fc7e11346644fbc5b55d2ad38d3e80e7" +checksum = "4c8d8de618d1dbc59ba9e6338a55d17f370f89aa009064dcbdd7eb0c8e8782fe" dependencies = [ "log", ] @@ -982,9 +972,9 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "358ad364465a5a359575642c12952ba8735a148382789d65ddd5231cd21899fc" +checksum = "be7132362f12a0495b3b24218afb4e774f9dc0d9254173d2444ec4ac1447461e" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -992,18 +982,18 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2dc06db98f8a995cb7145bc56dbd17bb0c8ab2e59a07aaa40f2c956c2451dd" +checksum = "a4ebe8725d6ee4feb9d376e9a600b2c78cc1dbde5aa754c9a47de871ab917635" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1709e0f101026c4ef29b1593692e480b03cdb4e0dace1e348494c6554d50d35" +checksum = "201a21d35a377b76440ce12ca62b39e548d019a6330fbdcb40ac0f73fe976cb3" dependencies = [ "ckb-occupied-capacity-core", "quote 1.0.33", @@ -1012,9 +1002,9 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "481e76388993d7e6e0dd797e8532c60398901787e28d0638ca114254257b8813" +checksum = "5895b4799fbb7e537ef0a778493b8f8678284c2bb20b476edce3f3375d1c4aa1" dependencies = [ "byteorder", "ckb-hash", @@ -1026,9 +1016,9 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3959391a4fb05d6a2578aa8db75732ada1ce381fb34d6eeaf09d395702e63c" +checksum = "5134dae6f59b1c10457d2a5def081865407e756dd42dd4c7aaf5d6c6bc92b6d1" dependencies = [ "numext-fixed-uint", "serde", @@ -1036,9 +1026,9 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03222b0613cf3f55cb181471d7a84879b6fba5e920e2e1c7ba2c2315614bd387" +checksum = "a3c79b7c1586ca652d150b2cfdc5ec8594055659f04e30f832178a14313cfff4" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -1051,9 +1041,9 @@ dependencies = [ [[package]] name = "ckb-script" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9075ad901eae97925f491b6be675d7b19bf7b10eaa94a88f6e8070c0cd00ba" +checksum = "058cb8c72a706bfc95c9b90f7c0256abbc4f44e9c5cabcbf7d1d882df977e82b" dependencies = [ "byteorder", "ckb-chain-spec", @@ -1067,26 +1057,15 @@ dependencies = [ "serde", ] -[[package]] -name = "ckb-standalone-types" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c776d70eb4f60a22a3180857646d77b2da8d33c0c4a063ad9f6610fc94609f" -dependencies = [ - "blake2b-ref", - "cfg-if", - "molecule", -] - [[package]] name = "ckb-std" -version = "0.14.3" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a08518aa0fd4ce069d3ec80b63dcd3d6543ad3805ad1c0b4e1d8e4d38f8a9fc" +checksum = "c6f72eb58dfefcc444621dc97020ef96af0636aa59e26b9c110359cb6e37db59" dependencies = [ - "buddy-alloc", "cc", - "ckb-standalone-types", + "ckb-gen-types", + "gcd", ] [[package]] @@ -1104,18 +1083,18 @@ dependencies = [ [[package]] name = "ckb-traits" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca049aba2cb2d1208c6044accb497b17290ad56de629f6a4b95eded67a43fd40" +checksum = "3396b8f328bc76bdfd9bc14ddd984a07d08120cd4e661ba1dc23fecb3a7607a3" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6ec737e4957418bbd0f4091e8565a89bbd8f6fc37a20360820e44d1f1e44e58" +checksum = "2df7c7410664bc917f1b663c574ec7c0e25711fe4f63eb0043c47c197afb0875" dependencies = [ "bit-vec", "bytes", @@ -1139,9 +1118,9 @@ dependencies = [ [[package]] name = "ckb-util" -version = "0.111.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011b907b18aa706fc224a1309f14eadd9cc14c42cf2258ca3010d1324bc20f10" +checksum = "9e6326a9adcfe1f4afa14f1a0da267e5718873e28cc271a5e03fc57ff02ce233" dependencies = [ "linked-hash-map", "once_cell", @@ -1589,9 +1568,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "eager" @@ -1906,6 +1885,12 @@ dependencies = [ "slab", ] +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + [[package]] name = "generic-array" version = "0.12.4" @@ -2124,12 +2109,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - [[package]] name = "hex_lit" version = "0.1.1" @@ -2199,11 +2178,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2687,7 +2666,7 @@ dependencies = [ "curve25519-dalek", "fixed-hash", "hex", - "hex-literal 0.3.4", + "hex-literal", "sealed", "serde", "serde-big-array", @@ -5470,6 +5449,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -5500,6 +5488,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -5512,6 +5515,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -5524,6 +5533,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -5536,6 +5551,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -5548,6 +5569,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -5560,6 +5587,12 @@ 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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -5572,6 +5605,12 @@ 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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -5584,6 +5623,12 @@ 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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + [[package]] name = "winnow" version = "0.5.19" diff --git a/tests/auth-c-tests/Cargo.toml b/tests/auth-c-tests/Cargo.toml index a503dcd..4ee5357 100644 --- a/tests/auth-c-tests/Cargo.toml +++ b/tests/auth-c-tests/Cargo.toml @@ -8,38 +8,35 @@ edition = "2018" [dependencies] ckb-auth-rs = { path = "../../ckb-auth-rs", features = ["ckb2023", "enable-dynamic-library"] } -ckb-crypto = "0.111.0" -ckb-error = "0.111.0" -ckb-hash = "0.111.0" -ckb-script = "0.111.0" -ckb-traits = "0.111.0" -ckb-types = "0.111.0" -ckb-chain-spec = "0.111.0" +ckb-crypto = "0.112" +ckb-error = "0.112" +ckb-hash = "0.112" +ckb-script = "0.112" +ckb-traits = "0.112" +ckb-types = "0.112" +ckb-chain-spec = "0.112" + ref_thread_local = "0.1.1" rand = "0.6.5" - -bitcoin = "0.30.0" -base64 = "0.21.0" -monero = { version = "0.18.2", features = ["serde"] } -hex-literal = "0.4.1" -base58-monero = "1.0.0" log = { version = "0.4.14", features = ["std"] } -bincode = "1.3.3" -serde = { version = "=1.0.163", features = ["derive"] } hex = "0.4.3" -secp256k1 = { version = "0.22.1", features = ["rand-std", "recovery"] } dyn-clone = "1.0.4" tempdir = "0.3.7" which = "4.4.0" -bs58 = "0.5.0" -anyhow = "1.0.71" -solana-sdk = { version = "1.16.1" , default-features = false } -solana-cli-output = { version = "1.16.1", default-features = false } serde_json = "1.0.99" -ripple-keypairs = "0.1.0" -p256 = { version = "^0.10.1" } lazy_static = "1.3.0" +base64 = "0.21.0" +secp256k1 = { version = "0.22.1", features = ["rand-std", "recovery"] } +bs58 = "0.5.0" sha2 = "0.10.6" sha3 = "0.9.1" ripemd = "0.1.3" +p256 = { version = "^0.10.1" } + +base58-monero = "1.0.0" +monero = { version = "0.18.2", features = ["serde"] } +bitcoin = "0.30.0" +solana-sdk = { version = "1.16.1" , default-features = false } +solana-cli-output = { version = "1.16.1", default-features = false } +ripple-keypairs = "0.1.0" \ No newline at end of file diff --git a/tests/auth-c-tests/src/lib.rs b/tests/auth-c-tests/src/lib.rs index 5066b32..8186f40 100644 --- a/tests/auth-c-tests/src/lib.rs +++ b/tests/auth-c-tests/src/lib.rs @@ -21,7 +21,6 @@ use hex; use log::{Metadata, Record}; use rand::{distributions::Standard, Rng}; use secp256k1; -use serde::{Deserialize, Serialize}; use sha3::{Digest, Keccak256}; use std::{collections::HashMap, convert::TryInto, mem::size_of, process::Stdio, result, vec}; @@ -555,13 +554,32 @@ pub fn gen_tx_with_grouped_args( tx_builder.build() } -#[derive(Serialize, Deserialize)] +// #[derive(Serialize, Deserialize)] struct EntryType { code_hash: [u8; 32], hash_type: u8, entry_category: u8, } +impl EntryType { + pub fn to_vec(&self) -> Vec { + use std::mem::size_of_val; + let mut data = Vec::new(); + data.resize( + size_of_val(&self.code_hash) + + size_of_val(&self.hash_type) + + size_of_val(&self.entry_category), + 0, + ); + + data[..32].copy_from_slice(&self.code_hash); + data[32] = self.hash_type; + data[33] = self.entry_category; + + data + } +} + #[derive(PartialEq, Eq)] pub enum TestConfigIncorrectSing { None, @@ -671,7 +689,7 @@ pub fn do_gen_args(config: &TestConfig, pub_key_hash: Option>) -> Bytes bytes.put_u8(config.auth.get_algorithm_type()); // Need to test algorithm_id out of range bytes.put(Bytes::from(ckb_auth_type.pubkey_hash.to_vec())); - bytes.put(Bytes::from(bincode::serialize(&entry_type).unwrap())); + bytes.put(Bytes::from(entry_type.to_vec())); bytes.freeze() } diff --git a/tests/auth-c-tests/src/tests/mod.rs b/tests/auth-c-tests/src/tests/mod.rs index 0bde78d..1dced12 100644 --- a/tests/auth-c-tests/src/tests/mod.rs +++ b/tests/auth-c-tests/src/tests/mod.rs @@ -3,27 +3,20 @@ use crate::{get_rng, Secp256r1RawAuth}; use ckb_auth_rs::EntryCategoryType; -use ckb_chain_spec::consensus::{Consensus, ConsensusBuilder}; use ckb_crypto::secp::{Generator, Privkey, Pubkey}; use ckb_types::{ bytes::{BufMut, Bytes, BytesMut}, - core::{hardfork::HardForks, EpochNumberWithFraction, HeaderView}, prelude::*, H256, }; -use log::{Level, LevelFilter, Metadata, Record}; use rand::Rng; -use sha3::{digest::generic_array::typenum::private::IsEqualPrivate, Digest, Keccak256}; -use std::sync::Arc; - -use hex_literal::hex; use crate::{ - assert_script_error, auth_builder, auth_program::use_libecc, build_resolved_tx, debug_printer, - gen_args, gen_tx, gen_tx_scripts_verifier, gen_tx_with_grouped_args, sign_tx, Auth, - AuthAlgorithmIdType, AuthErrorCodeType, BitcoinAuth, BitcoinSignVType, CKbAuth, - CkbMultisigAuth, DogecoinAuth, DummyDataLoader, EosAuth, EthereumAuth, LitecoinAuth, - SchnorrAuth, TestConfig, TestConfigAuthLockType, TronAuth, MAX_CYCLES, + auth_builder, auth_program::use_libecc, debug_printer, gen_args, gen_tx, + gen_tx_scripts_verifier, gen_tx_with_grouped_args, sign_tx, Auth, AuthAlgorithmIdType, + AuthErrorCodeType, BitcoinAuth, BitcoinSignVType, CKbAuth, CkbMultisigAuth, DogecoinAuth, + DummyDataLoader, EosAuth, EthereumAuth, LitecoinAuth, SchnorrAuth, TestConfig, + TestConfigAuthLockType, TronAuth, MAX_CYCLES, }; fn verify_unit(config: &TestConfig) -> Result { @@ -364,6 +357,8 @@ fn convert_eth_error() { AuthAlgorithmIdType::Ethereum as u8 } fn convert_message(&self, message: &[u8; 32]) -> H256 { + use sha3::{Digest, Keccak256}; + let eth_prefix: &[u8; 28] = b"\x19Ethereum Signed Xessage:\n32"; let mut hasher = Keccak256::new(); hasher.update(eth_prefix); @@ -411,6 +406,8 @@ fn convert_tron_error() { AuthAlgorithmIdType::Tron as u8 } fn convert_message(&self, message: &[u8; 32]) -> H256 { + use sha3::{Digest, Keccak256}; + let eth_prefix: &[u8; 24] = b"\x19TRON Signed Xessage:\n32"; let mut hasher = Keccak256::new(); hasher.update(eth_prefix); diff --git a/tests/auth-rust-lock/Cargo.lock b/tests/auth-rust-lock/Cargo.lock index ed841e2..08a6a41 100644 --- a/tests/auth-rust-lock/Cargo.lock +++ b/tests/auth-rust-lock/Cargo.lock @@ -12,12 +12,6 @@ dependencies = [ "log", ] -[[package]] -name = "blake2b-ref" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "294d17c72e0ba59fad763caa112368d0672083779cdebbb97164f4bb4c1e339a" - [[package]] name = "blake2b-rs" version = "0.2.0" @@ -36,12 +30,9 @@ checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -60,25 +51,25 @@ dependencies = [ ] [[package]] -name = "ckb-standalone-types" -version = "0.1.5" +name = "ckb-gen-types" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c776d70eb4f60a22a3180857646d77b2da8d33c0c4a063ad9f6610fc94609f" +checksum = "4a12020d50dd3757cde0fdc88d3837b7a2ab503fe38bd11be86ddace11318c77" dependencies = [ - "blake2b-ref", "cfg-if", "molecule", ] [[package]] name = "ckb-std" -version = "0.14.3" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a08518aa0fd4ce069d3ec80b63dcd3d6543ad3805ad1c0b4e1d8e4d38f8a9fc" +checksum = "9357d9464ed36a8e542a7d588e894aff25ccb0cdd66221ac94e76bc69ca3ad55" dependencies = [ "buddy-alloc", "cc", - "ckb-standalone-types", + "ckb-gen-types", + "gcd", ] [[package]] @@ -87,6 +78,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + [[package]] name = "hex" version = "0.4.3" @@ -102,17 +99,11 @@ dependencies = [ "spin", ] -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "molecule" diff --git a/tests/auth-rust-lock/contracts/auth-rust-demo/Cargo.toml b/tests/auth-rust-lock/contracts/auth-rust-demo/Cargo.toml index 691b3f7..8df47f2 100644 --- a/tests/auth-rust-lock/contracts/auth-rust-demo/Cargo.toml +++ b/tests/auth-rust-lock/contracts/auth-rust-demo/Cargo.toml @@ -11,7 +11,7 @@ ckb2023 = ["ckb-auth-rs/ckb2023", "ckb-std/ckb2023"] enable-dynamic-library = ["ckb-auth-rs/dynamic-library-memory-600"] [dependencies] -ckb-std = "0.14.3" +ckb-std = { version = "0.15", default-features = false, features = ["allocator", "ckb-types"] } ckb-auth-rs = { path = "../../../../ckb-auth-rs", default-features = false } log = { version = "0.4.17", default-features = false } hex = { version = "0.4.3", default-features = false, features = ["alloc"]} diff --git a/tests/auth-rust-lock/contracts/auth-rust-demo/src/entry.rs b/tests/auth-rust-lock/contracts/auth-rust-demo/src/entry.rs index fbe9535..74c9708 100644 --- a/tests/auth-rust-lock/contracts/auth-rust-demo/src/entry.rs +++ b/tests/auth-rust-lock/contracts/auth-rust-demo/src/entry.rs @@ -44,7 +44,7 @@ pub fn main() -> Result<(), Error> { 0 => ScriptHashType::Data, 1 => ScriptHashType::Type, 2 => ScriptHashType::Data1, - 4 => ScriptHashType::Data1, // TODO ckb-std 0.14.3 does not support Data2 yet + 4 => ScriptHashType::Data2, _ => { return Err(Error::ArgsError); } diff --git a/tests/auth-rust-lock/rust-toolchain b/tests/auth-rust-lock/rust-toolchain index 4934985..7c7053a 100644 --- a/tests/auth-rust-lock/rust-toolchain +++ b/tests/auth-rust-lock/rust-toolchain @@ -1 +1 @@ -1.69.0 +1.75.0 diff --git a/tests/auth-rust-lock/tests/Cargo.lock b/tests/auth-rust-lock/tests/Cargo.lock index fd3767c..1ccc790 100644 --- a/tests/auth-rust-lock/tests/Cargo.lock +++ b/tests/auth-rust-lock/tests/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -19,15 +28,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - [[package]] name = "anyhow" version = "1.0.75" @@ -49,6 +49,27 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "bit-vec" version = "0.6.3" @@ -61,6 +82,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + [[package]] name = "blake2b-ref" version = "0.3.1" @@ -78,10 +105,13 @@ dependencies = [ ] [[package]] -name = "buddy-alloc" -version = "0.5.1" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] [[package]] name = "byteorder" @@ -99,14 +129,38 @@ dependencies = [ ] [[package]] -name = "cc" -version = "1.0.83" +name = "cacache" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "142316461ed3a3dfcba10417317472da5bfd0461e4d276bf7c07b330766d9490" dependencies = [ + "digest", + "either", + "futures", + "hex", "libc", + "memmap2", + "miette", + "reflink-copy", + "serde", + "serde_derive", + "serde_json", + "sha1", + "sha2", + "ssri", + "tempfile", + "thiserror", + "tokio", + "tokio-stream", + "walkdir", ] +[[package]] +name = "cc" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" + [[package]] name = "cfg-if" version = "1.0.0" @@ -131,46 +185,47 @@ dependencies = [ [[package]] name = "ckb-chain-spec" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd58081d4ac4f08d068b52c5a07f0b379d93aad0dfa8344c6890429a9b73c2b" +checksum = "8212f21a597c1e9e27641b142b6559a4aa7042571ccec2a1191a7f3b680cd3b1" dependencies = [ + "cacache", "ckb-constant", "ckb-crypto", "ckb-dao-utils", "ckb-error", "ckb-hash", "ckb-jsonrpc-types", + "ckb-logger", "ckb-pow", "ckb-rational", "ckb-resource", "ckb-traits", "ckb-types", - "ckb-util", "serde", "toml", ] [[package]] name = "ckb-channel" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "701e6829c3dcbae46dd2442de63d080046480a6c2bb4951dbf419ad092459402" +checksum = "03b22e70542c9a1ec346851bfa999eb52bf6f10dac062dc7c3e83490f3129ea8" dependencies = [ "crossbeam-channel", ] [[package]] name = "ckb-constant" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5c980d4724770f72a37bceffa26ea64dd914891e45e856e2a3792fdb4a5a18" +checksum = "dbb3a59ed091a196cd2dac439917049f6b846f9aaa7aafd9b29df183994cc25e" [[package]] name = "ckb-crypto" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df80db694e42b64a5774ae551daff3c8310cd99bb528643dbe0dd409abb298e7" +checksum = "c20a2e281c9b4090c68343c03f90200e005d0f8be43a539cd6ecc7d46562cab8" dependencies = [ "ckb-fixed-hash", "faster-hex", @@ -182,9 +237,9 @@ dependencies = [ [[package]] name = "ckb-dao" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cb0dd4d284d6908595fa809668555ad36bc89538ea9440d11208090481c240" +checksum = "d66be40303a1ffd12d6a6bd15f3b949c20894caea07181dcfb6408b7aa9fcbf4" dependencies = [ "byteorder", "ckb-chain-spec", @@ -195,9 +250,9 @@ dependencies = [ [[package]] name = "ckb-dao-utils" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e158ce5a4e9d1fcd08d9dee87332474572c629c6273cca0aea80ba24892a403" +checksum = "ae082aedbb90a27364323bdf8a5d80bf916e8aafac96041168498eddc4efc0c7" dependencies = [ "byteorder", "ckb-error", @@ -206,9 +261,9 @@ dependencies = [ [[package]] name = "ckb-error" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cfd733cabcb4262ee679c02733864b13c8fa879e3aabc078fe0ec727cd95d6" +checksum = "d6d7bc8a43e036195079e3b6a144547970b6c6e1a5591ecbeea7a5478bfebcfa" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -218,9 +273,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1dfab045fffa31cae9680d73e1f09833ca1abfb807dc4b9544739c94c23fd0" +checksum = "1ab27de1271bc1064ed242d08fca2d79ca64e3f99b2680b145ac63ba069dc907" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -228,9 +283,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd1727a6ecd4d0bcab604cb1ef707fe92e939fa6e9a438f9f25bf05208cb080" +checksum = "64b63d1bc55ac6e578cdc9ad861f427e46b225a4a48bf5d0a55f6fa4a127a822" dependencies = [ "faster-hex", "serde", @@ -239,9 +294,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5da34c32585c35715fcde4e3a1dd3b0346d7af43506c5e51c613f01483e4f9" +checksum = "008f7221e3d20c4de5c7e23910d343d4938002fa9eb509e3e6fa5898dc4ecba9" dependencies = [ "ckb-fixed-hash-core", "proc-macro2", @@ -251,9 +306,19 @@ dependencies = [ [[package]] name = "ckb-gen-types" -version = "0.111.0" +version = "0.112.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a12020d50dd3757cde0fdc88d3837b7a2ab503fe38bd11be86ddace11318c77" +dependencies = [ + "cfg-if", + "molecule", +] + +[[package]] +name = "ckb-gen-types" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3bc54ca99b09e1eb5fc6c49bb1156644ce57fce9c6f52b5c13110b9a3143f7e" +checksum = "5e565b056266184d99aab11115245531127e4a8d13b7700c4839b469763a3c54" dependencies = [ "cfg-if", "ckb-error", @@ -266,9 +331,9 @@ dependencies = [ [[package]] name = "ckb-hash" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c88e5e2d6454be488fa5cf8b49175879353c6af969ff210dd6416f315b53120" +checksum = "99970478850566472a03e5cc4d57e388bb7a8255771f4308b42036f0d8a623d8" dependencies = [ "blake2b-ref", "blake2b-rs", @@ -276,9 +341,9 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d789a71538da07871c11aecbd28d6c632bb426bdfeed5fc2fa1b455e31152468" +checksum = "d6c9d60394ebc5c4f5416ca851622fe66bea9f64ef13060c2e22b2cf856af97b" dependencies = [ "ckb-types", "faster-hex", @@ -288,9 +353,9 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939fa09ca3534248d3d452552546f016fc7e11346644fbc5b55d2ad38d3e80e7" +checksum = "7b83910b3e92dd7b1b9b27c353f51ae16a48228f2b1c1f070aab7c5ea83d4df2" dependencies = [ "log", ] @@ -304,11 +369,23 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "ckb-mock-tx-types" +version = "0.114.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f9cbd58716844c28caf3e292154ebfb6dda3e824039b606a1048f1fe5e0120" +dependencies = [ + "ckb-jsonrpc-types", + "ckb-traits", + "ckb-types", + "serde", +] + [[package]] name = "ckb-occupied-capacity" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "358ad364465a5a359575642c12952ba8735a148382789d65ddd5231cd21899fc" +checksum = "ca8adc8c7723b98636ae3aeb7d14417c68edcc61cf2913414e42eca1eb2b4f7b" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -316,18 +393,18 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2dc06db98f8a995cb7145bc56dbd17bb0c8ab2e59a07aaa40f2c956c2451dd" +checksum = "1589ebe2d556a85b70d02f8dd0d022b990de1420a5de66c356eb3ea8a5526b6c" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1709e0f101026c4ef29b1593692e480b03cdb4e0dace1e348494c6554d50d35" +checksum = "bb9842edc4f65f556e57176ecce956ed32fcddcd272118a3a688116d2aba8c80" dependencies = [ "ckb-occupied-capacity-core", "quote", @@ -336,9 +413,9 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "481e76388993d7e6e0dd797e8532c60398901787e28d0638ca114254257b8813" +checksum = "f9285eae2b22b8ec1425763f1621d25e6704b26e92a4548ac1da08dafae7a279" dependencies = [ "byteorder", "ckb-hash", @@ -350,9 +427,9 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3959391a4fb05d6a2578aa8db75732ada1ce381fb34d6eeaf09d395702e63c" +checksum = "119dbe89e82f7f0f1a5ae310f40775324987c4c0b9128c49b2cfe184a90a8295" dependencies = [ "numext-fixed-uint", "serde", @@ -360,9 +437,9 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03222b0613cf3f55cb181471d7a84879b6fba5e920e2e1c7ba2c2315614bd387" +checksum = "710939ea5dd2e70d602b312d57b7bbaf2d380a8a473fb63b1d8af80c0cca74b8" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -375,9 +452,9 @@ dependencies = [ [[package]] name = "ckb-script" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9075ad901eae97925f491b6be675d7b19bf7b10eaa94a88f6e8070c0cd00ba" +checksum = "2216f261b1169c41f5a6860e3b6362df806bb40915e388a2396514fb08f08ea0" dependencies = [ "byteorder", "ckb-chain-spec", @@ -391,26 +468,15 @@ dependencies = [ "serde", ] -[[package]] -name = "ckb-standalone-types" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c776d70eb4f60a22a3180857646d77b2da8d33c0c4a063ad9f6610fc94609f" -dependencies = [ - "blake2b-ref", - "cfg-if", - "molecule", -] - [[package]] name = "ckb-std" -version = "0.14.3" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a08518aa0fd4ce069d3ec80b63dcd3d6543ad3805ad1c0b4e1d8e4d38f8a9fc" +checksum = "9357d9464ed36a8e542a7d588e894aff25ccb0cdd66221ac94e76bc69ca3ad55" dependencies = [ - "buddy-alloc", "cc", - "ckb-standalone-types", + "ckb-gen-types 0.112.1", + "gcd", ] [[package]] @@ -428,15 +494,15 @@ dependencies = [ [[package]] name = "ckb-systemtime" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5c03dd01263a66eaf171fb1bbadd12d80a0b54abe19aa55a2c53c5ae3300cda" +checksum = "ae5937620517015b665ec7f703354017d687e5a4cccc6764379f90d90f112a6a" [[package]] name = "ckb-testtool" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f7426eb44c6cfc703a68fb99c74b675a378fdca12df5af94683b27a60d377e" +checksum = "1c03584407b880869b153775190da5e1ffb9b5064273a1a116ce922ab78a8c65" dependencies = [ "ckb-always-success-script", "ckb-chain-spec", @@ -444,6 +510,7 @@ dependencies = [ "ckb-error", "ckb-hash", "ckb-jsonrpc-types", + "ckb-mock-tx-types", "ckb-resource", "ckb-script", "ckb-traits", @@ -455,18 +522,18 @@ dependencies = [ [[package]] name = "ckb-traits" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca049aba2cb2d1208c6044accb497b17290ad56de629f6a4b95eded67a43fd40" +checksum = "3e4c211d2c46be6847ef80088786bb0dff8341eb99df2c32b546c147e884c4df" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6ec737e4957418bbd0f4091e8565a89bbd8f6fc37a20360820e44d1f1e44e58" +checksum = "0e62857acdfe95b3aec162731329a19cd6ea29e8335055ebbbc0dfc8b359d2b4" dependencies = [ "bit-vec", "bytes", @@ -474,7 +541,7 @@ dependencies = [ "ckb-constant", "ckb-error", "ckb-fixed-hash", - "ckb-gen-types", + "ckb-gen-types 0.114.0", "ckb-hash", "ckb-merkle-mountain-range", "ckb-occupied-capacity", @@ -488,23 +555,11 @@ dependencies = [ "paste", ] -[[package]] -name = "ckb-util" -version = "0.111.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011b907b18aa706fc224a1309f14eadd9cc14c42cf2258ca3010d1324bc20f10" -dependencies = [ - "linked-hash-map", - "once_cell", - "parking_lot", - "regex", -] - [[package]] name = "ckb-verification" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe3338bb8cf49c5a21de636eeb448deeba1e379491d34b67f2201fc77a08e215" +checksum = "bc9f9af7f7dcd2941e2752af4fd2f7c7434a60d57de6ab6572b8d7a30f9ffd42" dependencies = [ "ckb-chain-spec", "ckb-dao", @@ -522,19 +577,19 @@ dependencies = [ [[package]] name = "ckb-verification-traits" -version = "0.111.0" +version = "0.114.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1bbfdeff1f930f26c60103b59442494dba83493254bb255f1ba318be2f27fe" +checksum = "b92f4bc9079ea35e8d52f9791f8d0c174bc5228944c5bd7cb1c6f957b9be573a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "ckb-error", ] [[package]] name = "ckb-vm" -version = "0.24.6" +version = "0.24.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc004a826b9bc9319ffae0b8415690e1b5f1482266d55fbd43843aa40ddcd63" +checksum = "8332997ee3beacb0c1b9e2489e17b33af855a0ec28d7c08a81170fae6b204340" dependencies = [ "byteorder", "bytes", @@ -550,9 +605,9 @@ dependencies = [ [[package]] name = "ckb-vm-definitions" -version = "0.24.6" +version = "0.24.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ced3ff9d79b53d93c106720f6c1f855694290e33581850e05c859500eee83f" +checksum = "27f6fa54fd079938807cce5b11b4fbb9b21984568b887204ea96a02dbd907c2f" dependencies = [ "paste", ] @@ -563,7 +618,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -572,6 +627,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.3.2" @@ -600,6 +664,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "cty" version = "0.2.2" @@ -619,18 +693,50 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + [[package]] name = "eaglesong" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d978bd5d343e8ab9b5c0fc8d93ff9c602fdc96616ffff9c05ac7a155419b824" +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "faster-hex" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" +[[package]] +name = "fastrand" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" + [[package]] name = "flate2" version = "1.0.28" @@ -647,6 +753,111 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -669,6 +880,12 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "goblin" version = "0.2.3" @@ -767,23 +984,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] -name = "linked-hash-map" -version = "0.5.6" +name = "linux-raw-sys" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -dependencies = [ - "serde", -] - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg 1.1.0", - "scopeguard", -] +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" @@ -806,6 +1010,15 @@ version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + [[package]] name = "merkle-cbt" version = "0.3.2" @@ -815,6 +1028,29 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "miette" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +dependencies = [ + "miette-derive", + "once_cell", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -882,33 +1118,19 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "parking_lot" -version = "0.12.1" +name = "object" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "lock_api", - "parking_lot_core", + "memchr", ] [[package]] -name = "parking_lot_core" -version = "0.9.9" +name = "once_cell" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "paste" @@ -954,6 +1176,18 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "plain" version = "0.2.3" @@ -1186,37 +1420,25 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "regex" -version = "1.10.2" +name = "reflink-copy" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "52b1349400e2ffd64a9fb5ed9008e33c0b8ef86bd5bae8f73080839c7082f1d5" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "cfg-if", + "rustix", + "windows", ] [[package]] -name = "regex-syntax" -version = "0.8.2" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc_version" @@ -1227,6 +1449,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "ryu" version = "1.0.15" @@ -1242,12 +1477,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "scroll" version = "0.10.2" @@ -1323,6 +1552,39 @@ dependencies = [ "serde", ] +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "siphasher" version = "0.3.11" @@ -1330,10 +1592,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] -name = "smallvec" -version = "1.11.2" +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg 1.1.0", +] [[package]] name = "spin" @@ -1341,6 +1606,23 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "ssri" +version = "9.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7a2b3c2bc9693bcb40870c4e9b5bf0d79f9cb46273321bf855ec513e919082" +dependencies = [ + "base64", + "digest", + "hex", + "miette", + "serde", + "sha-1", + "sha2", + "thiserror", + "xxhash-rust", +] + [[package]] name = "syn" version = "1.0.109" @@ -1363,6 +1645,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "tempfile" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys", +] + [[package]] name = "tests" version = "0.1.0" @@ -1392,6 +1687,40 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "pin-project-lite", + "tokio-macros", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.5.11" @@ -1401,12 +1730,24 @@ dependencies = [ "serde", ] +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + [[package]] name = "version_check" version = "0.9.4" @@ -1466,11 +1807,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1483,42 +1862,48 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "xxhash-rust" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" diff --git a/tests/auth-rust-lock/tests/Cargo.toml b/tests/auth-rust-lock/tests/Cargo.toml index c394675..ffead78 100644 --- a/tests/auth-rust-lock/tests/Cargo.toml +++ b/tests/auth-rust-lock/tests/Cargo.toml @@ -11,7 +11,7 @@ ckb2023 = ["ckb-auth-rs/ckb2023"] enable-dynamic-library = ["ckb-auth-rs/dynamic-library-memory-600"] [dependencies] -ckb-testtool = "0.10" +ckb-testtool = "0.11" ckb-auth-rs = { path = "../../../ckb-auth-rs" } rand = "0.6.5" diff --git a/tests/auth-rust-lock/tests/src/lib.rs b/tests/auth-rust-lock/tests/src/lib.rs index 055c0d2..a7be9ca 100644 --- a/tests/auth-rust-lock/tests/src/lib.rs +++ b/tests/auth-rust-lock/tests/src/lib.rs @@ -32,7 +32,7 @@ impl Default for Loader { fn default() -> Self { let test_env = match env::var(TEST_ENV_VAR) { Ok(val) => val.parse().expect("test env"), - Err(_) => TestEnv::Debug, + Err(_) => TestEnv::Release, }; Self::with_test_env(test_env) } @@ -63,7 +63,7 @@ impl Loader { fn load_binary(&self, name: &str) -> Bytes { let mut path = self.0.clone(); path.push(name); - fs::read(path).expect("binary").into() + fs::read(path.clone()).expect(&format!("binary: {:?}", path)).into() } pub fn load_demo(&self) -> Bytes { diff --git a/tests/auth-rust-lock/tests/src/tests.rs b/tests/auth-rust-lock/tests/src/tests.rs index b6ac59b..629f197 100644 --- a/tests/auth-rust-lock/tests/src/tests.rs +++ b/tests/auth-rust-lock/tests/src/tests.rs @@ -15,7 +15,7 @@ use ckb_testtool::{ use rand::{thread_rng, Rng}; use std::mem::size_of; -const MAX_CYCLES: u64 = 10_000_000; +const MAX_CYCLES: u64 = 10_000_000_000; #[derive(Clone)] struct CKbAuth { diff --git a/tests/auth-spawn-tests/.gitignore b/tests/auth-spawn-tests/.gitignore index 8b0763c..15beb28 100644 --- a/tests/auth-spawn-tests/.gitignore +++ b/tests/auth-spawn-tests/.gitignore @@ -1,3 +1,2 @@ tx.json -bin/ -test_data/ \ No newline at end of file +test_data/ diff --git a/tests/auth-spawn-tests/Cargo.lock b/tests/auth-spawn-tests/Cargo.lock index 7fe1e11..319b2aa 100644 --- a/tests/auth-spawn-tests/Cargo.lock +++ b/tests/auth-spawn-tests/Cargo.lock @@ -10,42 +10,18 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.6.10" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arrayref" @@ -58,35 +34,27 @@ name = "auth_spawn_rust" version = "0.1.0" dependencies = [ "anyhow", - "base58-monero", - "blake2b-rs", - "cardano-message-signing", - "cardano-serialization-lib", - "cbor_event", "ckb-auth-rs", + "ckb-chain-spec", "ckb-crypto", - "ckb-debugger-api", "ckb-hash", "ckb-jsonrpc-types", "ckb-mock-tx-types", "ckb-types", - "env_logger", "hex", "lazy_static", - "log 0.4.20", - "mbedtls", - "molecule", + "regex", + "ripemd", "ripple-keypairs", "serde_json", - "serde_plain", - "sparse-merkle-tree", + "sha2 0.10.8", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "base-x" @@ -94,66 +62,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base58-monero" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d079cdf47e1ca75554200bb2f30bff5a5af16964cac4a566b18de9a5d48db2b" -dependencies = [ - "thiserror", - "tiny-keccak", -] - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64-url" -version = "1.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a99c239d0c7e77c85dddfa9cebce48704b3c49550fcd3b84dd637e4484899f" -dependencies = [ - "base64", -] - -[[package]] -name = "bech32" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1" - -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log 0.4.20", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex 1.10.2", - "rustc-hash", - "shlex", - "syn 2.0.38", - "which", -] - -[[package]] -name = "bit-vec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" - [[package]] name = "bit-vec" version = "0.6.3" @@ -166,18 +74,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "blake2b-ref" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95916998c798756098a4eb1b3f2cd510659705a9817bf203d61abd30fbec3e7b" - [[package]] name = "blake2b-ref" version = "0.3.1" @@ -215,6 +111,15 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "block-padding" version = "0.1.5" @@ -224,17 +129,11 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "buddy-alloc" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" - [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-tools" @@ -250,89 +149,18 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] - -[[package]] -name = "cardano-message-signing" -version = "1.0.1" -source = "git+https://github.com/Emurgo/message-signing.git#a92757fb9c9333290e278aa32b995bcf8a3821d6" -dependencies = [ - "base64-url", - "byteorder", - "cbor_event", - "cryptoxide 0.3.6", - "hex", - "linked-hash-map", - "noop_proc_macro", - "pruefung", - "wasm-bindgen", -] - -[[package]] -name = "cardano-serialization-lib" -version = "11.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3fab2c10aa73dae6ea90ed459ef07ed7acb09270ea90d9a37fa00420b9c25c" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" dependencies = [ - "bech32", - "cbor_event", - "cfg-if 1.0.0", - "clear_on_drop", - "cryptoxide 0.4.4", - "digest 0.9.0", - "ed25519-bip32", - "getrandom 0.2.10", - "hex", - "itertools", - "js-sys", - "linked-hash-map", - "noop_proc_macro", - "num-bigint 0.4.4", - "num-integer", - "rand 0.8.5", - "rand_os", - "schemars", "serde", - "serde-wasm-bindgen", - "serde_json", - "sha2 0.9.9", - "wasm-bindgen", ] -[[package]] -name = "cbor_event" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "089a0261d1bc59e54e8e11860031efd88593f0e61b921172c474f1f38c2f2d3c" - [[package]] name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cexpr" -version = "0.6.0" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -340,20 +168,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets", -] - [[package]] name = "ckb-auth-rs" version = "0.1.0" @@ -366,9 +180,9 @@ dependencies = [ [[package]] name = "ckb-chain-spec" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985bcd83abf3cab899483bbab9d8df554081109669beb6de554597f8c490fc72" +checksum = "fa9b89cadf419c220fa8e1c655af73540bbc010e8c0e177127644848a25830c2" dependencies = [ "ckb-constant", "ckb-crypto", @@ -388,71 +202,49 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d161738a9ee6e186025b4c1199b480f20f5a88bf29326c4d67dbd5454da0cb14" +checksum = "82c904fe3e29474e4d09e8e2775a472456242f8faf18edeeb8c71502710daa38" dependencies = [ "crossbeam-channel", ] [[package]] name = "ckb-constant" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcf5d45723b1d30ea96079f437b5fb555162a8aea87de0c36822149acf1c11d" +checksum = "c7d562e7156216f00c5bf55c8f4c86bc25f9ec0603fcfa6df9b66747462a031a" [[package]] name = "ckb-crypto" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da7a6c11339609b270fbe49a082de2440a2f4d2de98b4002be83c291fb1d0d5" +checksum = "abac585cec6f1562e374d66b369c55a52357b33a632d30d2e45cbc455183b22d" dependencies = [ "ckb-fixed-hash", - "faster-hex 0.6.1", + "faster-hex", "lazy_static", - "rand 0.7.3", + "rand", "secp256k1", "thiserror", ] [[package]] name = "ckb-dao-utils" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d375858087777de31fba38412a2836247efaf130b2f91ccbbd32c440435c759" +checksum = "ff55485163b842c94061b755c9e6230d1a4bb092b6bc81d8387358911c750e70" dependencies = [ "byteorder", "ckb-error", "ckb-types", ] -[[package]] -name = "ckb-debugger-api" -version = "0.109.0" -source = "git+https://github.com/nervosnetwork/ckb-standalone-debugger.git?rev=5077c6c#5077c6c479be3271a7ff0998299fbaa741d217a0" -dependencies = [ - "ckb-chain-spec", - "ckb-hash", - "ckb-jsonrpc-types", - "ckb-mock-tx-types", - "ckb-script", - "ckb-types", - "ckb-vm", - "faster-hex 0.4.1", - "hex", - "js-sys", - "regex 1.10.2", - "serde", - "serde_json", - "serde_plain", - "wasm-bindgen", -] - [[package]] name = "ckb-error" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "485b1d7d1077385b46755ff4d0e4f01131a033d9edd1b7667c81dc248bc0abdc" +checksum = "b8418901ea0d15a8e26255bec0b71be5c59056858f51968894796f77f7eefa3e" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -462,9 +254,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86c19423eb9e6bd25a6d0fd8c82c94d99edaedf501bfc9f65cd8fc3385d08cf" +checksum = "1254aafda84e9abc85301e9e4c5b920c00a9bff0d42248fccf921b340ec5f13e" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -472,20 +264,20 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64c34f01b84f79753fff2cb4c0e2b45b9c71cf788eee32ec30aaf6e09e153e" +checksum = "5ffc2850ac8b5643c65913185020de747b290b447d1ee1fd59a2cfdf1a7ceb4f" dependencies = [ - "faster-hex 0.6.1", + "faster-hex", "serde", "thiserror", ] [[package]] name = "ckb-fixed-hash-macros" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d940e94a82a31c6c62092014207208da64e647d1a509eb8a9af37cff9b318d" +checksum = "baa5a19a7d18caa5a3a65e66506e28943e95696e286df44457a77692319de429" dependencies = [ "ckb-fixed-hash-core", "proc-macro2", @@ -493,24 +285,39 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ckb-gen-types" +version = "0.112.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a12020d50dd3757cde0fdc88d3837b7a2ab503fe38bd11be86ddace11318c77" +dependencies = [ + "cfg-if", + "ckb-error", + "ckb-fixed-hash", + "ckb-hash", + "ckb-occupied-capacity", + "molecule", + "numext-fixed-uint", +] + [[package]] name = "ckb-hash" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e82f135970de1fe6728b243c11866f81cde1bc4610ea82d6673dabfaa211296" +checksum = "25af660fc8746f7c756444e6aa47ede9a874206563b6a1ce1b230a5b86519392" dependencies = [ - "blake2b-ref 0.2.1", + "blake2b-ref", "blake2b-rs", ] [[package]] name = "ckb-jsonrpc-types" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55c0ab8688535791c7c050b2cf539354d60dd5592f3e7604828230e3819ae804" +checksum = "06798b5bacd7fd4125a34f1c9ebf45be59d50aff0ada003bb8b1c6634a447c73" dependencies = [ "ckb-types", - "faster-hex 0.6.1", + "faster-hex", "serde", "serde_json", ] @@ -521,13 +328,14 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ccb671c5921be8a84686e6212ca184cb1d7c51cadcdbfcbd1cc3f042f5dfb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "ckb-mock-tx-types" -version = "0.109.0" -source = "git+https://github.com/nervosnetwork/ckb-standalone-debugger.git?rev=5077c6c#5077c6c479be3271a7ff0998299fbaa741d217a0" +version = "0.112.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accabfa378c927109844630e4c90e0d7e7e6d6a9174c232f194f490b09e4b757" dependencies = [ "ckb-jsonrpc-types", "ckb-traits", @@ -537,9 +345,9 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3cd2af9c4989a0acfb3aebde3c6153cb5613dc980f5a72bb1f6929e2a36f2aa" +checksum = "be7132362f12a0495b3b24218afb4e774f9dc0d9254173d2444ec4ac1447461e" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -547,18 +355,18 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b61490f9b148b91c6104cb1f88ad720d2c215044d1b7aa65428e0541b84a6770" +checksum = "a4ebe8725d6ee4feb9d376e9a600b2c78cc1dbde5aa754c9a47de871ab917635" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502984083f1fd80b5405fcefc0decfd4f89b1b0a076030da127a46b32d7918e3" +checksum = "201a21d35a377b76440ce12ca62b39e548d019a6330fbdcb40ac0f73fe976cb3" dependencies = [ "ckb-occupied-capacity-core", "quote", @@ -567,23 +375,23 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c436f378e1b9d8b93da15d3953bf2548d2fdb8b4dd5341ccc49370fe2c8c45" +checksum = "5895b4799fbb7e537ef0a778493b8f8678284c2bb20b476edce3f3375d1c4aa1" dependencies = [ "byteorder", "ckb-hash", "ckb-types", "eaglesong", - "log 0.4.20", + "log", "serde", ] [[package]] name = "ckb-rational" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f9d256acded95633554d1e2aaf7b25b192af2eceda328ad0098fad3f4f38d4" +checksum = "5134dae6f59b1c10457d2a5def081865407e756dd42dd4c7aaf5d6c6bc92b6d1" dependencies = [ "numext-fixed-uint", "serde", @@ -591,9 +399,9 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e3c425b7d0b7de98bacdabce1787c81702c9fb211411b5350ed5a8b1201c342" +checksum = "a3c79b7c1586ca652d150b2cfdc5ec8594055659f04e30f832178a14313cfff4" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -604,43 +412,15 @@ dependencies = [ "walkdir", ] -[[package]] -name = "ckb-script" -version = "0.109.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e5920d980726dca9754115debdc9870210be61c0bf797f9f7d6d36acba301e" -dependencies = [ - "byteorder", - "ckb-chain-spec", - "ckb-error", - "ckb-hash", - "ckb-traits", - "ckb-types", - "ckb-vm", - "faster-hex 0.6.1", - "serde", -] - -[[package]] -name = "ckb-standalone-types" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c776d70eb4f60a22a3180857646d77b2da8d33c0c4a063ad9f6610fc94609f" -dependencies = [ - "blake2b-ref 0.3.1", - "cfg-if 1.0.0", - "molecule", -] - [[package]] name = "ckb-std" -version = "0.14.3" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a08518aa0fd4ce069d3ec80b63dcd3d6543ad3805ad1c0b4e1d8e4d38f8a9fc" +checksum = "9357d9464ed36a8e542a7d588e894aff25ccb0cdd66221ac94e76bc69ca3ad55" dependencies = [ - "buddy-alloc", "cc", - "ckb-standalone-types", + "ckb-gen-types", + "gcd", ] [[package]] @@ -650,7 +430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa5c59063142de7a68cfad4449c6b3863563856219a2925dfb8c5f019ec2aa47" dependencies = [ "blake2b-rs", - "faster-hex 0.6.1", + "faster-hex", "includedir", "includedir_codegen", "phf", @@ -658,24 +438,26 @@ dependencies = [ [[package]] name = "ckb-traits" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "654d7889edf49bf971d6e4dd54a7bc19b889564a511696095ccdd9b0f7d1c7fd" +checksum = "3396b8f328bc76bdfd9bc14ddd984a07d08120cd4e661ba1dc23fecb3a7607a3" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cf32306f52473dfa208e7a98d1edcad8227453784f722d08dac9b2704c84fbe" +checksum = "2df7c7410664bc917f1b663c574ec7c0e25711fe4f63eb0043c47c197afb0875" dependencies = [ - "bit-vec 0.6.3", + "bit-vec", "bytes", "ckb-channel", + "ckb-constant", "ckb-error", "ckb-fixed-hash", + "ckb-gen-types", "ckb-hash", "ckb-merkle-mountain-range", "ckb-occupied-capacity", @@ -686,130 +468,53 @@ dependencies = [ "molecule", "numext-fixed-uint", "once_cell", + "paste", ] [[package]] name = "ckb-util" -version = "0.109.0" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678afcb42c9db5e09a65150c1d36f4efc122314dcaa6fa561a02b45447d8e406" +checksum = "9e6326a9adcfe1f4afa14f1a0da267e5718873e28cc271a5e03fc57ff02ce233" dependencies = [ "linked-hash-map", "once_cell", "parking_lot", - "regex 1.10.2", + "regex", ] -[[package]] -name = "ckb-vm" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fee7eb8d6525a0d3a4f113414c1b51dd3aaf75ef7b54fe7ce306e545c87cdd" -dependencies = [ - "byteorder", - "bytes", - "cc", - "ckb-vm-definitions", - "derive_more", - "goblin 0.2.3", - "goblin 0.4.0", - "rand 0.7.3", - "scroll", - "serde", -] - -[[package]] -name = "ckb-vm-definitions" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9403cda7180a8203facf05e96537f0038d188b2efdcef13c84538bfbdfcbcbf" - -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clear_on_drop" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38508a63f4979f0048febc9966fadbd48e5dab31fd0ec6a3f151bbf4a74f7423" -dependencies = [ - "cc", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" dependencies = [ - "cfg-if 1.0.0", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -817,6 +522,16 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.7.0" @@ -827,18 +542,6 @@ dependencies = [ "subtle 1.0.0", ] -[[package]] -name = "cryptoxide" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42014d4c82e74bc17aaccc4bd75d3615d2b8236198de81c51bed5ddefaae6435" - -[[package]] -name = "cryptoxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382ce8820a5bb815055d3553a610e8cb542b2d767bbacea99038afda96cd760d" - [[package]] name = "cty" version = "0.2.2" @@ -851,22 +554,11 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", "syn 1.0.109", ] -[[package]] -name = "digest" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecae1c064e29fcabb6c2e9939e53dc7da72ed90234ae36ebfe03a478742efbd1" -dependencies = [ - "generic-array 0.8.4", -] - [[package]] name = "digest" version = "0.8.1" @@ -886,10 +578,14 @@ dependencies = [ ] [[package]] -name = "dyn-clone" -version = "1.0.16" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", +] [[package]] name = "eaglesong" @@ -897,53 +593,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d978bd5d343e8ab9b5c0fc8d93ff9c602fdc96616ffff9c05ac7a155419b824" -[[package]] -name = "ed25519-bip32" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb588f93c0d91b2f668849fd6d030cddb0b2e31f105963be189da5acdf492a21" -dependencies = [ - "cryptoxide 0.4.4", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "env_logger" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" -dependencies = [ - "log 0.3.9", - "regex 0.2.11", -] - -[[package]] -name = "errno" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" -dependencies = [ - "libc", - "windows-sys", -] - [[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -[[package]] -name = "faster-hex" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348138dd23e03bb0018caef99647fb1a5befec5ff4b501991de88f09854d4c28" - [[package]] name = "faster-hex" version = "0.6.1" @@ -961,20 +616,10 @@ dependencies = [ ] [[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "generic-array" -version = "0.8.4" +name = "gcd" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2297fb0e3ea512e380da24b52dca3924028f59df5e3a17a18f81d8349ca7ebe" -dependencies = [ - "nodrop", - "typenum", -] +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" [[package]] name = "generic-array" @@ -1001,50 +646,9 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "goblin" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884" -dependencies = [ - "log 0.4.20", - "plain", - "scroll", -] - -[[package]] -name = "goblin" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532a09cd3df2c6bbfc795fb0434bff8f22255d1d07328180e918a2e6ce122d4d" -dependencies = [ - "log 0.4.20", - "plain", - "scroll", + "wasi", ] [[package]] @@ -1092,38 +696,6 @@ dependencies = [ "hmac", ] -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - [[package]] name = "includedir" version = "0.6.0" @@ -1145,26 +717,17 @@ dependencies = [ "walkdir", ] -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1178,27 +741,11 @@ dependencies = [ "spin", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" -version = "0.2.149" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libsecp256k1" @@ -1210,7 +757,7 @@ dependencies = [ "crunchy", "digest 0.8.1", "hmac-drbg", - "rand 0.7.3", + "rand", "sha2 0.8.2", "subtle 2.5.0", "typenum", @@ -1225,12 +772,6 @@ dependencies = [ "serde", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" - [[package]] name = "lock_api" version = "0.4.11" @@ -1243,71 +784,15 @@ dependencies = [ [[package]] name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.20", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "mbedtls" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4cdd74b4f7c633899ce071acfd307b053ccab39b7ca1ffac6900ed39a050e85" -dependencies = [ - "bitflags 1.3.2", - "byteorder", - "cc", - "cfg-if 1.0.0", - "mbedtls-platform-support", - "mbedtls-sys-auto", - "rs-libc", - "rustc_version 0.2.3", - "serde", - "serde_derive", - "yasna", -] - -[[package]] -name = "mbedtls-platform-support" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85be113c8c2dc54cc6a5fba20130c7128f78dcb3ed0bb6797427333fa8cdb54d" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "chrono", - "mbedtls-sys-auto", -] - -[[package]] -name = "mbedtls-sys-auto" -version = "2.28.3" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe62c26febfff31e5ece6c342e20b1b356fbbf5a5c112f781bee30ae6381499" -dependencies = [ - "bindgen", - "cc", - "cfg-if 1.0.0", - "cmake", - "lazy_static", - "libc", - "quote", - "syn 1.0.109", -] +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "merkle-cbt" @@ -1315,84 +800,34 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "171d2f700835121c3b04ccf0880882987a050fd5c7ae88148abf537d33dd3a56" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "molecule" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc8276c02a006bddad7d1c28c1a88f30421e1b5f0ba0ca96ceb8077c7d20c01" -dependencies = [ - "bytes", - "cfg-if 1.0.0", - "faster-hex 0.6.1", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "noop_proc_macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd9767ab5e5f2ea40f71ff4c8bdb633c50509052e093c2fdd0e390a749dfa3" +dependencies = [ + "bytes", + "cfg-if", + "faster-hex", ] [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ "autocfg", "num-integer", @@ -1401,19 +836,18 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -1447,7 +881,7 @@ checksum = "6aab1d6457b97b49482f22a92f0f58a2f39bdd7f3b2f977eae67e8bc206aa980" dependencies = [ "heapsize", "numext-constructor", - "rand 0.7.3", + "rand", "serde", "thiserror", ] @@ -1466,9 +900,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1478,9 +912,9 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "parking_lot" @@ -1498,7 +932,7 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -1506,10 +940,10 @@ dependencies = [ ] [[package]] -name = "peeking_take_while" -version = "0.1.2" +name = "paste" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "phf" @@ -1537,7 +971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" dependencies = [ "phf_shared", - "rand 0.7.3", + "rand", ] [[package]] @@ -1549,52 +983,26 @@ dependencies = [ "siphasher", ] -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "prettyplease" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" -dependencies = [ - "proc-macro2", - "syn 2.0.38", -] - [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] -[[package]] -name = "pruefung" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734d1fcf58d4e4aa4118926d4d44b1ea8921e4064c30a0415ae273552ebdd784" -dependencies = [ - "digest 0.6.1", - "generic-array 0.8.4", -] - [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1605,25 +1013,14 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.16", + "getrandom", "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", "rand_hc", "rand_pcg", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -1631,50 +1028,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core 0.5.1", + "rand_core", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.10", + "getrandom", ] [[package]] @@ -1683,22 +1046,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "wasm-bindgen", - "winapi", + "rand_core", ] [[package]] @@ -1707,16 +1055,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", + "rand_core", ] [[package]] @@ -1725,59 +1064,37 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "regex" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -dependencies = [ - "aho-corasick 0.6.10", - "memchr", - "regex-syntax 0.5.6", - "thread_local", - "utf8-ranges", + "bitflags", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ - "aho-corasick 1.1.2", + "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ - "aho-corasick 1.1.2", + "aho-corasick", "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-syntax" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -dependencies = [ - "ucd-util", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "ring" @@ -1794,6 +1111,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "ripemd160" version = "0.9.1" @@ -1802,7 +1128,7 @@ checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -1824,64 +1150,17 @@ dependencies = [ "base-x", "hex", "libsecp256k1", - "num-bigint 0.3.3", + "num-bigint", "ring", "ripemd160", "ripple-address-codec", ] -[[package]] -name = "rs-libc" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683e8c8e8aac6ffa4b2287bac3c69575d5346accac4f218ae1e084303bb174ca" -dependencies = [ - "cc", - "zeroize", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.20", -] - -[[package]] -name = "rustix" -version = "0.38.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" -dependencies = [ - "bitflags 2.4.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "same-file" @@ -1892,56 +1171,12 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schemars" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scroll" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "secp256k1" version = "0.24.3" @@ -1960,89 +1195,37 @@ dependencies = [ "cc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" -version = "1.0.189" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] -[[package]] -name = "serde-wasm-bindgen" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" -dependencies = [ - "js-sys", - "serde", - "wasm-bindgen", -] - [[package]] name = "serde_derive" -version = "1.0.189" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.57", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", "serde", ] -[[package]] -name = "serde_plain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1fc6db65a611022b23a0dec6975d63fb80a302cb3388835ff02c097258d50" -dependencies = [ - "serde", -] - [[package]] name = "sha2" version = "0.8.2" @@ -2057,23 +1240,15 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.9" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.7", ] -[[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - [[package]] name = "siphasher" version = "0.3.11" @@ -2082,20 +1257,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "smallvec" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" - -[[package]] -name = "sparse-merkle-tree" -version = "0.6.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8851f6c92491ebe5528eabc1244292175a739eb0162974f9f9670a7dc748748b" -dependencies = [ - "blake2b-rs", - "cc", - "cfg-if 0.1.10", -] +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "spin" @@ -2128,9 +1292,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" dependencies = [ "proc-macro2", "quote", @@ -2139,40 +1303,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", -] - -[[package]] -name = "thread_local" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", + "syn 2.0.57", ] [[package]] @@ -2190,12 +1336,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "ucd-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd2fc5d32b590614af8b0a20d837f32eca055edd0bbead59a9cfe80858be003" - [[package]] name = "unicode-ident" version = "1.0.12" @@ -2208,12 +1348,6 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "utf8-ranges" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" - [[package]] name = "version_check" version = "0.9.4" @@ -2222,9 +1356,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -2236,44 +1370,36 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "cfg-if 1.0.0", - "serde", - "serde_json", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", - "log 0.4.20", + "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.57", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2281,45 +1407,33 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.57", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" @@ -2351,24 +1465,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -2425,19 +1521,3 @@ name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "yasna" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79af3189e6b0484c9fd54208f8eeb8818cadee00ec81438b67a64c8e6f2f3694" -dependencies = [ - "bit-vec 0.5.1", - "num-bigint 0.2.6", -] - -[[package]] -name = "zeroize" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/tests/auth-spawn-tests/Cargo.toml b/tests/auth-spawn-tests/Cargo.toml index 40d1148..708a303 100644 --- a/tests/auth-spawn-tests/Cargo.toml +++ b/tests/auth-spawn-tests/Cargo.toml @@ -7,25 +7,19 @@ edition = "2021" [dependencies] ckb-auth-rs = { path = "../../ckb-auth-rs", features = ["ckb2023"] } -ckb-debugger-api = { git = "https://github.com/nervosnetwork/ckb-standalone-debugger.git", rev="5077c6c" } -ckb-mock-tx-types = { git = "https://github.com/nervosnetwork/ckb-standalone-debugger.git", rev="5077c6c" } -molecule = { version = "0.7.3", default-features = false } -ckb-hash = "=0.109.0" -ckb-jsonrpc-types = "=0.109.0" -ckb-types = "=0.109.0" -ckb-crypto = "=0.109.0" -env_logger = "0.4.3" +ckb-mock-tx-types = "0.112.0" +ckb-hash = "0.112.0" +ckb-jsonrpc-types = "0.112.0" +ckb-types = "0.112.0" +ckb-chain-spec = "0.112.0" +ckb-crypto = "0.112.0" + anyhow = "1.0.70" lazy_static = "1.4.0" -log = "0.4.0" serde_json = "1.0" -serde_plain = "1.0" -sparse-merkle-tree = {version = "0.6.1"} -ripple-keypairs = "0.1.0" hex = "0.4.3" -base58-monero = "1.0.0" -mbedtls = "0.8.1" -cardano-serialization-lib = "11.4.0" -cardano-message-signing = { git = "https://github.com/Emurgo/message-signing.git" } -cbor_event = "2.4.0" -blake2b-rs = "0.2.0" +regex = "1.10.4" +sha2 = "0.10.8" +ripemd = "0.1.3" + +ripple-keypairs = "0.1.0" diff --git a/tests/auth-spawn-tests/src/bin/cardano-success.rs b/tests/auth-spawn-tests/src/bin/cardano-success.rs index 7b85daf..31dea21 100644 --- a/tests/auth-spawn-tests/src/bin/cardano-success.rs +++ b/tests/auth-spawn-tests/src/bin/cardano-success.rs @@ -1,23 +1,10 @@ use auth_spawn_rust::*; -use blake2b_rs::Blake2bBuilder; -use cardano_message_signing::{ - cbor::{CBORArray, CBORObject, CBORValue}, - utils::Deserialize, - utils::{Int, ToBytes}, -}; -use cardano_serialization_lib::{ - crypto::{Ed25519Signature, PrivateKey, PublicKey}, - utils::hash_transaction, - TransactionBody, -}; -use cbor_event::de::Deserializer; + use ckb_jsonrpc_types::JsonBytes; use ckb_mock_tx_types::ReprMockTransaction; use ckb_types::packed::Byte32; use ckb_types::{bytes::Bytes, core::ScriptHashType}; use lazy_static::lazy_static; -use molecule::prelude::*; -use std::env; pub const G_PRIVATE_KEY_PATH: &str = "test_data/cold.skey.json"; pub const G_PUBLIC_KEY_PATH: &str = "test_data/cold.vkey.json"; @@ -32,31 +19,29 @@ lazy_static! { } pub fn main() -> Result<(), Box> { - let args: Vec = env::args().collect(); + let args: Vec = std::env::args().collect(); match args.get(1) { Some(v) => { if v == "--get-sign-hash" { get_sign_hash(); + return Ok(()); } - return Ok(()); } None => (), }; - check_cardano_sign()?; - let mut tx: ReprMockTransaction = read_tx_template("templates/cardano-success.json")?; update_auth_code_hash(&mut tx); let public_key = load_public_key(G_PUBLIC_KEY_PATH); - update_args(&mut tx, 0x0b, &ckb_hash::blake2b_256(public_key.as_bytes())); - update_witness_pubkey(&mut tx, &public_key); + + update_args(&mut tx, 0x0b, &ckb_hash::blake2b_256(&public_key)); let witness = load_signature(G_TX_SIGNED_PATH); update_witness(&mut tx, vec![witness.clone()]); - // println!("{:02x?}", tx.tx.witnesses.get(0).unwrap().as_bytes()); let json = serde_json::to_string_pretty(&tx).unwrap(); println!("{}", json); + Ok(()) } @@ -64,7 +49,7 @@ fn get_sign_hash() { let mut tx: ReprMockTransaction = read_tx_template("templates/cardano-success.json").unwrap(); update_auth_code_hash(&mut tx); let public_key = load_public_key(G_PUBLIC_KEY_PATH); - update_args(&mut tx, 0x0b, &ckb_hash::blake2b_256(public_key.as_bytes())); + update_args(&mut tx, 0x0b, &ckb_hash::blake2b_256(public_key)); let hash = Byte32::new(generate_sighash_all(&tx, G_CKB_TX_INDEX).unwrap()); @@ -72,57 +57,6 @@ fn get_sign_hash() { println!("{}", &output_str[2..]); } -fn update_witness_pubkey(tx: &mut ReprMockTransaction, public_key: &PublicKey) { - let witness = tx.tx.witnesses.get_mut(G_CKB_TX_INDEX).unwrap(); - - let data = witness.as_bytes()[20..].to_vec(); - let mut des_data = Deserializer::from(std::io::Cursor::new(data)); - let root = CBORArray::deserialize(&mut des_data).unwrap(); - - let mut root2 = CBORArray::new(); - root2.add(&root.get(0)); - - let mut sign_data = CBORObject::new(); - sign_data.insert( - &CBORValue::new_int(&Int::new_i32(0)), - &CBORValue::new_bytes(public_key.as_bytes()), - ); - root2.add(&CBORValue::new_object(&sign_data)); - root2.add(&root.get(1)); - - update_witness(tx, vec![root2.to_bytes()]); -} - -fn check_cardano_sign() -> Result<(), Box> { - let private_key = load_private_key(G_PRIVATE_KEY_PATH); - let public_key = load_public_key(G_PUBLIC_KEY_PATH); - - assert_eq!(private_key.to_public().as_bytes(), public_key.as_bytes()); - - let tx_data = load_signature(G_TX_PATH); - // println!("len({}) {:02x?}", tx_data.len(), tx_data); - - let tx_body = - TransactionBody::from_bytes(tx_data[1..].to_vec()).expect("new tx body from bytes"); - - // println!("{:02x?}", tx_body.to_bytes()); - let tx_hash = hash_transaction(&tx_body); - let tx_hash2 = cardano_blake2b_256(&tx_body.to_bytes()); - assert_eq!(tx_hash.to_bytes(), tx_hash2); - // println!("{:02x?}", tx_hash2); - - let (sign_data, pubkey) = get_signature_struct(G_TX_SIGNED_PATH); - assert_eq!(public_key.as_bytes(), pubkey); - - // println!("{:02x?}", sign_data); - // println!("{:02x?}", pubkey); - - let ret = public_key.verify(&tx_hash2, &Ed25519Signature::from_bytes(sign_data).unwrap()); - assert!(ret); - - Ok(()) -} - pub fn load_file(path: &str) -> Vec { let data = std::fs::read(path).unwrap(); let v: serde_json::Value = serde_json::from_slice(&data).unwrap(); @@ -135,7 +69,7 @@ pub fn load_file(path: &str) -> Vec { hex::decode(&raw_data).unwrap() } -pub fn load_private_key(path: &str) -> PrivateKey { +pub fn load_public_key(path: &str) -> Vec { let key = load_file(path); if key[0] != 0x58 || key[1] != 0x20 { panic!("Private key is invalid, data: {:02X?}, path: {}", key, path); @@ -144,93 +78,14 @@ pub fn load_private_key(path: &str) -> PrivateKey { panic!("Load key failed, len is not 32, {:02X?}", key); } - PrivateKey::from_normal_bytes(&key[2..]).unwrap() -} - -pub fn load_public_key(path: &str) -> PublicKey { - let key = load_file(path); - if key[0] != 0x58 || key[1] != 0x20 { - panic!("Private key is invalid, data: {:02X?}, path: {}", key, path); - } - if key.len() != 32 + 2 { - panic!("Load key failed, len is not 32, {:02X?}", key); - } - - PublicKey::from_bytes(&key[2..]).unwrap() -} - -pub fn load_signature_file(path: &str) -> Vec { - let data = std::fs::read(path).unwrap(); - let v: serde_json::Value = serde_json::from_slice(&data).unwrap(); - - let mut data = v.get("cborHex").unwrap().to_string(); - - if data.as_bytes()[0] == '\"' as u8 { - data = String::from(&data[1..data.len() - 1]); - } - - hex::decode(data).unwrap() + key[2..].to_vec() } pub fn load_signature(path: &str) -> Vec { let data = load_file(path); - data } -pub fn get_signature_struct(path: &str) -> (Vec, Vec) { - let data = load_file(path); - - let mut des_data = Deserializer::from(std::io::Cursor::new(data)); - let root = CBORArray::deserialize(&mut des_data).unwrap(); - - let sign_buf = root - .get(1) - .as_object() - .unwrap() - .get(&CBORValue::new_int(&Int::new_i32(0))) - .unwrap() - .as_array() - .unwrap() - .get(0) - .as_array() - .unwrap() - .get(1) - .as_bytes() - .unwrap(); - - let data = load_file(path); - - let mut des_data = Deserializer::from(std::io::Cursor::new(data)); - let root = CBORArray::deserialize(&mut des_data).unwrap(); - - let pubkey_buf = root - .get(1) - .as_object() - .unwrap() - .get(&CBORValue::new_int(&Int::new_i32(0))) - .unwrap() - .as_array() - .unwrap() - .get(0) - .as_array() - .unwrap() - .get(0) - .as_bytes() - .unwrap(); - - (sign_buf, pubkey_buf) -} - -pub fn cardano_blake2b_256(data: &[u8]) -> [u8; 32] { - let mut ctx = Blake2bBuilder::new(32).build(); - - ctx.update(data); - let mut r = [0u8; 32]; - ctx.finalize(&mut r); - r -} - pub fn update_args(tx: &mut ReprMockTransaction, auth_id: u8, pub_key_hash: &[u8]) { let inputs = &mut tx.mock_info.inputs; diff --git a/tests/auth-spawn-tests/src/bin/ripple-success.rs b/tests/auth-spawn-tests/src/bin/ripple-success.rs index 31a2c3e..632f463 100644 --- a/tests/auth-spawn-tests/src/bin/ripple-success.rs +++ b/tests/auth-spawn-tests/src/bin/ripple-success.rs @@ -24,23 +24,19 @@ fn update_args(tx: &mut ReprMockTransaction, pubkey: [u8; 20]) { } fn hash_ripemd160(data: &[u8]) -> [u8; 20] { - use mbedtls::hash::*; - let mut md = Md::new(Type::Ripemd).unwrap(); - md.update(data).expect("hash ripemd update"); - let mut out = [0u8; 20]; - md.finish(&mut out).expect("hash ripemd finish"); + use ripemd::{Digest, Ripemd160}; + let mut hasher = Ripemd160::new(); - out + hasher.update(data); + hasher.finalize()[..].try_into().unwrap() } fn hash_sha256(data: &[u8]) -> [u8; 32] { - use mbedtls::hash::*; - let mut md = Md::new(Type::Sha256).unwrap(); - md.update(data).expect("hash sha256 update"); - let mut out = [0u8; 32]; - md.finish(&mut out).expect("hash sha256 finish"); + use sha2::{Digest, Sha256}; - out + let mut hasher = Sha256::new(); + hasher.update(data); + hasher.finalize()[..].try_into().unwrap() } fn get_ripple_hash(data: &[u8]) -> [u8; 20] { diff --git a/tests/auth-spawn-tests/src/lib.rs b/tests/auth-spawn-tests/src/lib.rs index 1ece206..ca51e4b 100644 --- a/tests/auth-spawn-tests/src/lib.rs +++ b/tests/auth-spawn-tests/src/lib.rs @@ -11,22 +11,27 @@ pub mod blockchain { use anyhow; use anyhow::Context; use ckb_auth_rs::EntryCategoryType; -use ckb_hash::new_blake2b; +use ckb_chain_spec::consensus::TYPE_ID_CODE_HASH; +use ckb_hash::{blake2b_256, new_blake2b}; use ckb_types::core::ScriptHashType; +use ckb_types::molecule::{bytes::Bytes, prelude::*}; use ckb_types::packed; use ckb_types::packed::CellOutput; +use ckb_types::packed::Script; use ckb_types::packed::WitnessArgsBuilder; use ckb_types::prelude::*; -use molecule::bytes::Bytes; -use molecule::prelude::*; -use std::{fs::read_to_string, path::PathBuf}; +use std::collections::HashMap; +use std::{ + fs::read_to_string, + path::{Path, PathBuf}, +}; use auto_complete::auto_complete; -use ckb_debugger_api::embed::Embed; use ckb_jsonrpc_types::JsonBytes; use ckb_mock_tx_types::{MockTransaction, ReprMockTransaction}; use hash::hash; use lazy_static::lazy_static; +use regex::{Captures, Regex}; use serde_json::from_str as from_json_str; lazy_static! { @@ -34,15 +39,96 @@ lazy_static! { pub static ref AUTH_DL_HASH_TYPE: ScriptHashType = ScriptHashType::Data1; } -pub fn read_tx_template(file_name: &str) -> Result { +fn load_tx(tx_file: &str) -> Result { let mock_tx = - read_to_string(file_name).with_context(|| format!("Failed to read from {}", file_name))?; - let mock_tx = auto_complete(&mock_tx)?; + read_to_string(tx_file).with_context(|| format!("Failed to read from {}", tx_file))?; + let mut mock_tx = auto_complete(&mock_tx)?; + + let tx_file = PathBuf::from(tx_file); + // replace_data + let regex = Regex::new(r"\{\{ ?data (.+?) ?\}\}").unwrap(); + mock_tx = regex + .replace_all(&mock_tx, |caps: &Captures| -> String { + let cap1 = &caps[1]; + let path = if !Path::new(cap1).is_absolute() { + let root = tx_file.parent().unwrap(); + root.join(cap1) + } else { + Path::new(cap1).to_path_buf() + }; + let data = std::fs::read(&path); + if data.is_err() { + panic!("Read {:?} failed : {:?}", path, data); + } + let data = data.unwrap(); + hex::encode(data) + }) + .to_string(); + + // replace_hash + let regex = Regex::new(r"\{\{ ?hash (.+?) ?\}\}").unwrap(); + mock_tx = regex + .replace_all(&mock_tx, |caps: &Captures| -> String { + let cap1 = &caps[1]; + let path = if !Path::new(cap1).is_absolute() { + let root = tx_file.parent().unwrap(); + root.join(cap1) + } else { + Path::new(cap1).to_path_buf() + }; + let data = std::fs::read(path).unwrap(); + hex::encode(blake2b_256(data)) + }) + .to_string(); + + // prelude_type_id + let mut type_id_dict = HashMap::new(); + let rule = Regex::new(r"\{\{ ?def_type (.+?) ?\}\}").unwrap(); + for caps in rule.captures_iter(&mock_tx) { + let type_id_name = &caps[1]; + assert!(!type_id_dict.contains_key(type_id_name)); + let type_id_script = Script::new_builder() + .args(Bytes::from(type_id_name.to_string()).pack()) + .code_hash(TYPE_ID_CODE_HASH.pack()) + .hash_type(ScriptHashType::Type.into()) + .build(); + let type_id_script_hash = type_id_script.calc_script_hash(); + let type_id_script_hash = format!("{:x}", type_id_script_hash); + type_id_dict.insert(type_id_name.to_string(), type_id_script_hash); + } + + // replace_def_type + let regex = Regex::new(r#""?\{\{ ?def_type (.+?) ?\}\}"?"#).unwrap(); + mock_tx = regex + .replace_all(&mock_tx, |caps: &Captures| -> String { + let cap1 = &caps[1]; + let type_id_script_json = ckb_jsonrpc_types::Script { + code_hash: TYPE_ID_CODE_HASH, + hash_type: ckb_jsonrpc_types::ScriptHashType::Type, + args: ckb_jsonrpc_types::JsonBytes::from_vec(cap1.as_bytes().to_vec()), + }; + return serde_json::to_string_pretty(&type_id_script_json).unwrap(); + }) + .to_string(); - let mut mock_tx_embed = Embed::new(PathBuf::from(file_name), mock_tx.clone()); - let mock_tx = mock_tx_embed.replace_all(); - let mut repr_mock_tx: ReprMockTransaction = + // replace_ref_type + let regex = Regex::new(r"\{\{ ?ref_type (.+?) ?\}\}").unwrap(); + mock_tx = regex + .replace_all(&mock_tx, |caps: &Captures| -> String { + let cap1 = &caps[1]; + return type_id_dict[&cap1.to_string()].clone(); + }) + .to_string(); + + let repr_mock_tx: ReprMockTransaction = from_json_str(&mock_tx).with_context(|| "in from_json_str(&mock_tx)")?; + + Ok(repr_mock_tx) +} + +pub fn read_tx_template(file_name: &str) -> Result { + let mut repr_mock_tx = load_tx(file_name)?; + if repr_mock_tx.tx.cell_deps.len() == 0 { repr_mock_tx.tx.cell_deps = repr_mock_tx .mock_info diff --git a/tools/ckb-auth-cli/Cargo.lock b/tools/ckb-auth-cli/Cargo.lock index afe8325..04b11d8 100644 --- a/tools/ckb-auth-cli/Cargo.lock +++ b/tools/ckb-auth-cli/Cargo.lock @@ -190,12 +190,6 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" -[[package]] -name = "blake2b-ref" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95916998c798756098a4eb1b3f2cd510659705a9817bf203d61abd30fbec3e7b" - [[package]] name = "blake2b-ref" version = "0.3.1" @@ -230,12 +224,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "buddy-alloc" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" - [[package]] name = "bumpalo" version = "3.13.0" @@ -331,9 +319,9 @@ dependencies = [ [[package]] name = "ckb-chain-spec" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f100585f61ed7e1df64b54c92fd1c372bee38bd0d5e014edb67ace34b0d9bc4" +checksum = "fa9b89cadf419c220fa8e1c655af73540bbc010e8c0e177127644848a25830c2" dependencies = [ "ckb-constant", "ckb-crypto", @@ -353,24 +341,24 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3136eeb2bb01a048f84ad3f18d12bee4335f2fcdfb234368d2be62aba4d2c86" +checksum = "82c904fe3e29474e4d09e8e2775a472456242f8faf18edeeb8c71502710daa38" dependencies = [ "crossbeam-channel", ] [[package]] name = "ckb-constant" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39eb750ac90395bd16c1b299b8b72c718509fa6297968a57ec94e7396fd482e5" +checksum = "c7d562e7156216f00c5bf55c8f4c86bc25f9ec0603fcfa6df9b66747462a031a" [[package]] name = "ckb-crypto" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915e13ec887d515960d2bafe2bcea1a546989484da2a7ecb186e0e70c5da67b7" +checksum = "abac585cec6f1562e374d66b369c55a52357b33a632d30d2e45cbc455183b22d" dependencies = [ "ckb-fixed-hash", "faster-hex", @@ -382,9 +370,9 @@ dependencies = [ [[package]] name = "ckb-dao-utils" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fb5fcae018704092447c92e87f0144eafec7e5f85379a0c1be25589d6fee72" +checksum = "ff55485163b842c94061b755c9e6230d1a4bb092b6bc81d8387358911c750e70" dependencies = [ "byteorder", "ckb-error", @@ -393,9 +381,9 @@ dependencies = [ [[package]] name = "ckb-error" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b3cb3b5e551808a7b9f57dab0707c9e04c26e06b4dc5e938e1787efe6176af" +checksum = "b8418901ea0d15a8e26255bec0b71be5c59056858f51968894796f77f7eefa3e" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -405,9 +393,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51c9b22f073377a16d326780d4466ac1634ccdfd0c1ac37128f164d55fc0128" +checksum = "1254aafda84e9abc85301e9e4c5b920c00a9bff0d42248fccf921b340ec5f13e" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -415,9 +403,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be3de13aaec5622329988d7e11a00baacc6f88a1983a2334050ca2a568cd5b1" +checksum = "5ffc2850ac8b5643c65913185020de747b290b447d1ee1fd59a2cfdf1a7ceb4f" dependencies = [ "faster-hex", "serde", @@ -426,9 +414,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dacace08ce35529a47f3cfb29471f197b58d3f4d0f5d98bf3693f92d655d58b" +checksum = "baa5a19a7d18caa5a3a65e66506e28943e95696e286df44457a77692319de429" dependencies = [ "ckb-fixed-hash-core", "proc-macro2", @@ -436,21 +424,36 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ckb-gen-types" +version = "0.112.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a12020d50dd3757cde0fdc88d3837b7a2ab503fe38bd11be86ddace11318c77" +dependencies = [ + "cfg-if", + "ckb-error", + "ckb-fixed-hash", + "ckb-hash", + "ckb-occupied-capacity", + "molecule", + "numext-fixed-uint", +] + [[package]] name = "ckb-hash" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e5d1be7bfe0794ce0737775e76a021e8687413cd282f8ae1019e12d9b072f4" +checksum = "25af660fc8746f7c756444e6aa47ede9a874206563b6a1ce1b230a5b86519392" dependencies = [ - "blake2b-ref 0.2.1", + "blake2b-ref", "blake2b-rs", ] [[package]] name = "ckb-jsonrpc-types" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaf08268d28fdb618da014b0e5afc80198e208947c3172aeed07da37a438a91" +checksum = "06798b5bacd7fd4125a34f1c9ebf45be59d50aff0ada003bb8b1c6634a447c73" dependencies = [ "ckb-types", "faster-hex", @@ -460,9 +463,9 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1ad8843d940d0fae006834eb5ce331a88f639c98df88e2171ee8177219658c" +checksum = "4c8d8de618d1dbc59ba9e6338a55d17f370f89aa009064dcbdd7eb0c8e8782fe" dependencies = [ "log", ] @@ -478,9 +481,9 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc007d0dca89955f7e905942bec8cc39fc9fbc2d84b3ecb347c5ee659ef8c03d" +checksum = "be7132362f12a0495b3b24218afb4e774f9dc0d9254173d2444ec4ac1447461e" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -488,18 +491,18 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c929c6cb3193f4c46d65dc05d3a51c6586a6db4130c431a7d3283b243988ac22" +checksum = "a4ebe8725d6ee4feb9d376e9a600b2c78cc1dbde5aa754c9a47de871ab917635" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b04126d97f33639dc384ca41e9620e62e516018a437d8f53293b42824627872" +checksum = "201a21d35a377b76440ce12ca62b39e548d019a6330fbdcb40ac0f73fe976cb3" dependencies = [ "ckb-occupied-capacity-core", "quote", @@ -508,9 +511,9 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0be02f390c7fc3183e3bb47dfd8823280d6e7330931a3e4a3f3edce39741e0" +checksum = "5895b4799fbb7e537ef0a778493b8f8678284c2bb20b476edce3f3375d1c4aa1" dependencies = [ "byteorder", "ckb-hash", @@ -522,9 +525,9 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d2a52911319a6d6c09cfc6f4e6f7dbc71c240c94cf54e6aa6927f132e98dc88" +checksum = "5134dae6f59b1c10457d2a5def081865407e756dd42dd4c7aaf5d6c6bc92b6d1" dependencies = [ "numext-fixed-uint", "serde", @@ -532,9 +535,9 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b50544a66467e5a6139cec4455e395d6ab74a3d086906d74a9a263fe152803" +checksum = "a3c79b7c1586ca652d150b2cfdc5ec8594055659f04e30f832178a14313cfff4" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -547,9 +550,9 @@ dependencies = [ [[package]] name = "ckb-script" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677d065a66016c2a996c63851249710e0299df51e56d0eac1a55a017d1ac0a" +checksum = "058cb8c72a706bfc95c9b90f7c0256abbc4f44e9c5cabcbf7d1d882df977e82b" dependencies = [ "byteorder", "ckb-chain-spec", @@ -563,26 +566,15 @@ dependencies = [ "serde", ] -[[package]] -name = "ckb-standalone-types" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c776d70eb4f60a22a3180857646d77b2da8d33c0c4a063ad9f6610fc94609f" -dependencies = [ - "blake2b-ref 0.3.1", - "cfg-if", - "molecule", -] - [[package]] name = "ckb-std" -version = "0.14.3" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a08518aa0fd4ce069d3ec80b63dcd3d6543ad3805ad1c0b4e1d8e4d38f8a9fc" +checksum = "9357d9464ed36a8e542a7d588e894aff25ccb0cdd66221ac94e76bc69ca3ad55" dependencies = [ - "buddy-alloc", "cc", - "ckb-standalone-types", + "ckb-gen-types", + "gcd", ] [[package]] @@ -600,18 +592,18 @@ dependencies = [ [[package]] name = "ckb-traits" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7eda12e72a2dccb7ebbfc5b2683f0b1f18dee868176198cc8d7810be1b9a46b" +checksum = "3396b8f328bc76bdfd9bc14ddd984a07d08120cd4e661ba1dc23fecb3a7607a3" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056d18c1bd2ff2849faa3306555d71bc84f8489f8b6e99f9f6f92c985af45a9b" +checksum = "2df7c7410664bc917f1b663c574ec7c0e25711fe4f63eb0043c47c197afb0875" dependencies = [ "bit-vec 0.6.3", "bytes", @@ -619,6 +611,7 @@ dependencies = [ "ckb-constant", "ckb-error", "ckb-fixed-hash", + "ckb-gen-types", "ckb-hash", "ckb-merkle-mountain-range", "ckb-occupied-capacity", @@ -634,9 +627,9 @@ dependencies = [ [[package]] name = "ckb-util" -version = "0.111.0-rc2" +version = "0.112.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c644c0548b82d9d7fff81d34e52c7098c751a9b2b19a01a7fd2294775eb92a09" +checksum = "9e6326a9adcfe1f4afa14f1a0da267e5718873e28cc271a5e03fc57ff02ce233" dependencies = [ "linked-hash-map", "once_cell", @@ -646,9 +639,9 @@ dependencies = [ [[package]] name = "ckb-vm" -version = "0.24.0" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77a1ce8d1ed8b18041d194ffe0d647c3a707af9347f49b5f543317c73943634" +checksum = "0cc004a826b9bc9319ffae0b8415690e1b5f1482266d55fbd43843aa40ddcd63" dependencies = [ "byteorder", "bytes", @@ -664,9 +657,12 @@ dependencies = [ [[package]] name = "ckb-vm-definitions" -version = "0.24.0" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "328c7a6b5664483d5c02fae7b0ada0c407660e7064b2f1505ee6f5d07a4dbf2b" +checksum = "c4ced3ff9d79b53d93c106720f6c1f855694290e33581850e05c859500eee83f" +dependencies = [ + "paste", +] [[package]] name = "clang-sys" @@ -899,6 +895,12 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + [[package]] name = "generic-array" version = "0.14.7" diff --git a/tools/ckb-auth-cli/Cargo.toml b/tools/ckb-auth-cli/Cargo.toml index 49157ce..ecfa8d9 100644 --- a/tools/ckb-auth-cli/Cargo.toml +++ b/tools/ckb-auth-cli/Cargo.toml @@ -7,10 +7,11 @@ edition = "2021" [dependencies] ckb-auth-rs = { path = "../../ckb-auth-rs", features = ["ckb2023"] } -ckb-vm = { version = "0.24.0", features = [ "asm" ] } -ckb-types = "=0.111.0-rc2" -ckb-hash = "=0.111.0-rc2" -ckb-script = "=0.111.0-rc2" +ckb-vm = { version = "0.24", features = [ "asm" ] } +ckb-types = "0.112" +ckb-hash = "0.112" +ckb-script = "0.112" + clap = "4.3.2" hex = "0.4.3" lazy_static = "1.3.0"