diff --git a/ckb-auth-rs/Cargo.toml b/ckb-auth-rs/Cargo.toml index 7d09f5b..d431681 100644 --- a/ckb-auth-rs/Cargo.toml +++ b/ckb-auth-rs/Cargo.toml @@ -13,6 +13,5 @@ ckb2023 = ["ckb-std/ckb2023"] ckb-std = "0.14.3" [target.'cfg(target_arch = "riscv64")'.dependencies] -log = { version = "0.4.17", default-features = false} hex = { version = "0.4.3", default-features = false, features = ["alloc"]} blake2b-rs = "0.2.0" diff --git a/ckb-auth-rs/src/ckb_auth.rs b/ckb-auth-rs/src/ckb_auth.rs index 24bae0d..0572753 100644 --- a/ckb-auth-rs/src/ckb_auth.rs +++ b/ckb-auth-rs/src/ckb_auth.rs @@ -13,7 +13,6 @@ use ckb_std::{ use ckb_std::high_level::spawn_cell; use core::mem::size_of_val; use hex::encode; -use log::info; pub fn ckb_auth( entry: &CkbEntryType, @@ -108,7 +107,6 @@ impl CKBDLLoader { }; if !has_lib { - info!("loading library"); let size = size_of_val(&self.context); let lib = self .context @@ -163,9 +161,6 @@ fn ckb_auth_dl( match rc_code { 0 => Ok(()), - _ => { - info!("run auth error({}) in dynamic linking", rc_code); - Err(CkbAuthError::RunDLError) - } + _ => Err(CkbAuthError::RunDLError), } } diff --git a/ckb-auth-rs/src/lib.rs b/ckb-auth-rs/src/lib.rs index b34d262..92cc5b5 100644 --- a/ckb-auth-rs/src/lib.rs +++ b/ckb-auth-rs/src/lib.rs @@ -17,12 +17,12 @@ pub use crate::generate_sighash_all::generate_sighash_all; #[cfg(target_arch = "riscv64")] use alloc::ffi::NulError; #[cfg(target_arch = "riscv64")] -use log::info; - #[cfg(target_arch = "riscv64")] use ckb_std::{ckb_types::core::ScriptHashType, error::SysError}; #[cfg(not(target_arch = "riscv64"))] type SysError = u64; +#[cfg(not(target_arch = "riscv64"))] +type ScriptHashType = u8; #[derive(Clone)] pub enum AuthAlgorithmIdType { @@ -81,15 +81,13 @@ pub enum CkbAuthError { #[cfg(target_arch = "riscv64")] impl From for CkbAuthError { fn from(err: SysError) -> Self { - info!("Exec error: {:?}", err); Self::ExecError(err) } } #[cfg(target_arch = "riscv64")] impl From for CkbAuthError { - fn from(err: NulError) -> Self { - info!("Exec encode args failed: {:?}", err); + fn from(_err: NulError) -> Self { Self::EncodeArgs } } diff --git a/examples/auth-rust-demo/Cargo.lock b/examples/auth-rust-demo/Cargo.lock index 1566d02..075d44c 100644 --- a/examples/auth-rust-demo/Cargo.lock +++ b/examples/auth-rust-demo/Cargo.lock @@ -56,7 +56,6 @@ dependencies = [ "blake2b-rs", "ckb-std", "hex", - "log", ] [[package]] diff --git a/examples/auth-rust-demo/contracts/auth-rust-demo/src/entry.rs b/examples/auth-rust-demo/contracts/auth-rust-demo/src/entry.rs index a0bc146..46d5283 100644 --- a/examples/auth-rust-demo/contracts/auth-rust-demo/src/entry.rs +++ b/examples/auth-rust-demo/contracts/auth-rust-demo/src/entry.rs @@ -1,5 +1,3 @@ -extern crate alloc; -use log::info; // Import from `core` instead of from `std` since we are in no-std mode use core::result::Result; @@ -25,7 +23,6 @@ use ckb_std::{ // use ckb_std::debug; pub fn main() -> Result<(), Error> { - info!("auth-script-test entry"); let mut pubkey_hash = [0u8; 20]; let auth_id: u8; let entry_type: u8; @@ -35,8 +32,6 @@ pub fn main() -> Result<(), Error> { // get message let message = generate_sighash_all().map_err(|_| Error::GeneratedMsgError)?; let signature = { - info!("run as standalone script"); - let script = load_script()?; let args: Bytes = script.args().unpack(); if args.len() != 55 { diff --git a/tests/auth-c-tests/Cargo.lock b/tests/auth-c-tests/Cargo.lock index 2d6c846..e45465d 100644 --- a/tests/auth-c-tests/Cargo.lock +++ b/tests/auth-c-tests/Cargo.lock @@ -812,9 +812,9 @@ dependencies = [ name = "ckb-auth-rs" version = "0.1.0" dependencies = [ + "blake2b-rs", "ckb-std", "hex", - "log", ] [[package]] diff --git a/tests/auth-spawn-tests/Cargo.lock b/tests/auth-spawn-tests/Cargo.lock index 701191f..6590a92 100644 --- a/tests/auth-spawn-tests/Cargo.lock +++ b/tests/auth-spawn-tests/Cargo.lock @@ -358,9 +358,9 @@ dependencies = [ name = "ckb-auth-rs" version = "0.1.0" dependencies = [ + "blake2b-rs", "ckb-std", "hex", - "log 0.4.20", ] [[package]] diff --git a/tools/ckb-auth-cli/Cargo.lock b/tools/ckb-auth-cli/Cargo.lock index 10528fb..3160d57 100644 --- a/tools/ckb-auth-cli/Cargo.lock +++ b/tools/ckb-auth-cli/Cargo.lock @@ -323,9 +323,9 @@ dependencies = [ name = "ckb-auth-rs" version = "0.1.0" dependencies = [ + "blake2b-rs", "ckb-std", "hex", - "log", ] [[package]]