Skip to content

Commit

Permalink
Merge pull request #126 from eval-exec/exec/bump-0.117.0
Browse files Browse the repository at this point in the history
Bump ckb dependencies to v0.117.0
  • Loading branch information
quake authored Jul 30, 2024
2 parents 7a06e3b + ef0f336 commit 40cfdda
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-sdk"
version = "3.2.1"
version = "3.3.0"
authors = [ "Linfeng Qian <[email protected]>", "Nervos Core Dev <[email protected]>" ]
edition = "2018"
license = "MIT"
Expand All @@ -18,7 +18,7 @@ bech32 = "0.8.1"
derive-getters = "0.2.1"
log = "0.4.6"
reqwest = { version = "0.11", default-features = false, features = [ "json", "blocking" ] }
secp256k1 = { version = "0.24", features = ["recovery"] }
secp256k1 = { version = "0.29.0", features = ["recovery"] }
tokio-util = { version = "0.7.7", features = ["codec"] }
tokio = { version = "1" }
bytes = "1"
Expand All @@ -29,22 +29,22 @@ lru = "0.7.1"
dashmap = "5.4"
dyn-clone = "1.0"

ckb-types = "0.116.1"
ckb-dao-utils = "0.116.1"
ckb-traits = "0.116.1"
ckb-jsonrpc-types = "0.116.1"
ckb-hash = "0.116.1"
ckb-resource = "0.116.1"
ckb-crypto = { version = "=0.116.1", features = ["secp"] }
ckb-script = "0.116.1"
ckb-types = "0.117.0"
ckb-dao-utils = "0.117.0"
ckb-traits = "0.117.0"
ckb-jsonrpc-types = "0.117.0"
ckb-hash = "0.117.0"
ckb-resource = "0.117.0"
ckb-crypto = { version = "=0.117.0", features = ["secp"] }
ckb-script = "0.117.0"
bitflags = "1.3.2"
sha3 = "0.10.1"
enum-repr-derive = "0.2.0"

# for feature test
rand = { version = "0.7.3", optional = true }
ckb-mock-tx-types = { version = "0.116.1" }
ckb-chain-spec = "0.116.1"
ckb-mock-tx-types = { version = "0.117.0" }
ckb-chain-spec = "0.117.0"

sparse-merkle-tree = "0.6.1"
lazy_static = "1.3.0"
Expand Down
3 changes: 2 additions & 1 deletion src/traits/default_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,8 @@ impl Signer for SecpCkbRawKeySigner {
message.len()
)));
}
let msg = secp256k1::Message::from_slice(message).expect("Convert to message failed");
let msg =
secp256k1::Message::from_digest_slice(message).expect("Convert to message failed");
let key = self.keys.get(&H160::from_slice(id).unwrap()).unwrap();
if recoverable {
let sig = SECP256K1.sign_ecdsa_recoverable(&msg, key);
Expand Down
6 changes: 4 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ use sha3::{Digest, Keccak256};
use crate::rpc::CkbRpcClient;
use crate::traits::LiveCell;

use secp256k1::ffi::CPtr;

pub fn zeroize_privkey(key: &mut secp256k1::SecretKey) {
let key_ptr = key.as_mut_ptr();
for i in 0..key.len() as isize {
let key_ptr = key.as_mut_c_ptr();
for i in 0..key.as_ref().len() as isize {
unsafe { ptr::write_volatile(key_ptr.offset(i), Default::default()) }
atomic::compiler_fence(atomic::Ordering::SeqCst);
}
Expand Down

0 comments on commit 40cfdda

Please sign in to comment.