From 63da31a27f1d1165a2a16f2b358838f0e4bf1fb5 Mon Sep 17 00:00:00 2001 From: xcshuan Date: Fri, 2 Aug 2024 15:38:41 +0800 Subject: [PATCH] feat: replace blake2b-rs with blake2b-ref --- ckb-auth-rs/Cargo.toml | 2 +- ckb-auth-rs/src/generate_sighash_all.rs | 2 +- tests/auth-rust-lock/Cargo.lock | 18 ++++-------------- tests/auth-rust-lock/tests/Cargo.lock | 2 +- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/ckb-auth-rs/Cargo.toml b/ckb-auth-rs/Cargo.toml index 7db5251..de804bc 100644 --- a/ckb-auth-rs/Cargo.toml +++ b/ckb-auth-rs/Cargo.toml @@ -21,4 +21,4 @@ lazy_static = { version = "1.4.0", optional = true, features = ["spin_no_std"] } [target.'cfg(target_arch = "riscv64")'.dependencies] hex = { version = "0.4.3", default-features = false, features = ["alloc"]} -blake2b-rs = "0.2.0" +blake2b-ref = "0.3.1" diff --git a/ckb-auth-rs/src/generate_sighash_all.rs b/ckb-auth-rs/src/generate_sighash_all.rs index b56b281..35e5e52 100644 --- a/ckb-auth-rs/src/generate_sighash_all.rs +++ b/ckb-auth-rs/src/generate_sighash_all.rs @@ -1,5 +1,5 @@ use crate::CkbAuthError; -use blake2b_rs::{Blake2b, Blake2bBuilder}; +use blake2b_ref::{Blake2b, Blake2bBuilder}; use ckb_std::ckb_constants::{InputField, Source}; use ckb_std::high_level::load_tx_hash; use ckb_std::syscalls::{load_input_by_field, load_witness, SysError}; diff --git a/tests/auth-rust-lock/Cargo.lock b/tests/auth-rust-lock/Cargo.lock index 08a6a41..8c4ca44 100644 --- a/tests/auth-rust-lock/Cargo.lock +++ b/tests/auth-rust-lock/Cargo.lock @@ -13,14 +13,10 @@ dependencies = [ ] [[package]] -name = "blake2b-rs" -version = "0.2.0" +name = "blake2b-ref" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89a8565807f21b913288968e391819e7f9b2f0f46c7b89549c051cccf3a2771" -dependencies = [ - "cc", - "cty", -] +checksum = "294d17c72e0ba59fad763caa112368d0672083779cdebbb97164f4bb4c1e339a" [[package]] name = "buddy-alloc" @@ -44,7 +40,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" name = "ckb-auth-rs" version = "0.1.0" dependencies = [ - "blake2b-rs", + "blake2b-ref", "ckb-std", "hex", "lazy_static", @@ -72,12 +68,6 @@ dependencies = [ "gcd", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "gcd" version = "2.3.0" diff --git a/tests/auth-rust-lock/tests/Cargo.lock b/tests/auth-rust-lock/tests/Cargo.lock index 1ccc790..8092d95 100644 --- a/tests/auth-rust-lock/tests/Cargo.lock +++ b/tests/auth-rust-lock/tests/Cargo.lock @@ -177,7 +177,7 @@ checksum = "8b3b72a38c9920a29990df12002c4d069a147c8782f0c211f8a01b2df8f42bfd" name = "ckb-auth-rs" version = "0.1.0" dependencies = [ - "blake2b-rs", + "blake2b-ref", "ckb-std", "hex", "lazy_static",