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/auth-c-tests/Cargo.lock b/tests/auth-c-tests/Cargo.lock index a92d7e1..6d807fd 100644 --- a/tests/auth-c-tests/Cargo.lock +++ b/tests/auth-c-tests/Cargo.lock @@ -695,12 +695,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.14.0" @@ -940,6 +934,16 @@ dependencies = [ "numext-fixed-uint", ] +[[package]] +name = "ckb-gen-types" +version = "0.112.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a12020d50dd3757cde0fdc88d3837b7a2ab503fe38bd11be86ddace11318c77" +dependencies = [ + "cfg-if", + "molecule", +] + [[package]] name = "ckb-hash" version = "0.111.0" @@ -1067,26 +1071,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 0.112.1", + "gcd", ] [[package]] @@ -1123,7 +1116,7 @@ dependencies = [ "ckb-constant", "ckb-error", "ckb-fixed-hash", - "ckb-gen-types", + "ckb-gen-types 0.111.0", "ckb-hash", "ckb-merkle-mountain-range", "ckb-occupied-capacity", @@ -1906,6 +1899,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" 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); }