From 6edc68cb44eb188471e2ba410d6826c0f933ef73 Mon Sep 17 00:00:00 2001 From: joii2020 Date: Sun, 27 Oct 2024 14:32:27 +0800 Subject: [PATCH] Update ckb-std dependencies and fix CI error --- .github/workflows/rust.yaml | 13 +- tests/Cargo.lock | 309 +++++++++++++++++++++----- tests/Cargo.toml | 2 +- tests/libs/ckb-std-wrapper/Cargo.toml | 2 +- 4 files changed, 260 insertions(+), 66 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index f6d045b..8435134 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -14,6 +14,13 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Cargo build - run: cargo build - + - name: Install llvm 18 + run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18 && rm llvm.sh + - name: Install riscv64 target + run: rustup target add riscv64imac-unknown-none-elf + - name: Run Cargo Test + run: cargo test + - name: Run Cargo clippy + run: cargo clippy --all + - name: Run Test + run: cd tests && make default \ No newline at end of file diff --git a/tests/Cargo.lock b/tests/Cargo.lock index 741514b..b0b4105 100644 --- a/tests/Cargo.lock +++ b/tests/Cargo.lock @@ -180,18 +180,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38fa470ac81179a066b3dd3e0d56e8fb9988aaddf5c2ae921cbc2ee6c60bbc56" dependencies = [ "cacache", - "ckb-constant", + "ckb-constant 0.118.0", "ckb-crypto", "ckb-dao-utils", - "ckb-error", - "ckb-hash", - "ckb-jsonrpc-types", + "ckb-error 0.118.0", + "ckb-hash 0.118.0", + "ckb-jsonrpc-types 0.118.0", "ckb-logger", "ckb-pow", - "ckb-rational", + "ckb-rational 0.118.0", "ckb-resource", - "ckb-traits", - "ckb-types", + "ckb-traits 0.118.0", + "ckb-types 0.118.0", "serde", "toml", ] @@ -205,19 +205,34 @@ dependencies = [ "crossbeam-channel", ] +[[package]] +name = "ckb-channel" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4c7f5530737f8a02329075581b29ab7003a72d6ee747d1b2ea9d2239faea7a" +dependencies = [ + "crossbeam-channel", +] + [[package]] name = "ckb-constant" version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fce0d46bfe7d555b60e7e1b589643bcd2d6a40e4cc0a04c5e9412dbb30c1f206" +[[package]] +name = "ckb-constant" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e1424bf7490c14cdbd13697629ece8c1ba0ed02ff1c8a5b14a8713431ec6ff8" + [[package]] name = "ckb-crypto" version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2b268e177104ec7089656562adac06dd8209298873cb806fff76c1d3df16566" dependencies = [ - "ckb-fixed-hash", + "ckb-fixed-hash 0.118.0", "faster-hex", "lazy_static", "rand 0.8.5", @@ -234,8 +249,8 @@ dependencies = [ "byteorder", "ckb-chain-spec", "ckb-dao-utils", - "ckb-traits", - "ckb-types", + "ckb-traits 0.118.0", + "ckb-types 0.118.0", ] [[package]] @@ -245,8 +260,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df36dfa384153423e777f3f40beeb5fbb42d5ba223d411d7850bf72e190428e" dependencies = [ "byteorder", - "ckb-error", - "ckb-types", + "ckb-error 0.118.0", + "ckb-types 0.118.0", ] [[package]] @@ -256,7 +271,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6726194aed3b38485270e64d3823b3fb5e9d7ce6ea2ea117106f97619272de5" dependencies = [ "anyhow", - "ckb-occupied-capacity", + "ckb-occupied-capacity 0.118.0", + "derive_more", + "thiserror", +] + +[[package]] +name = "ckb-error" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109adb3c26e697861e3f57c1ca8cf2f2a399c46e64c97be2b05f751535ac1b75" +dependencies = [ + "anyhow", + "ckb-occupied-capacity 0.119.0", "derive_more", "thiserror", ] @@ -267,8 +294,18 @@ version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e497f03441f4622bc6d1d44db95ff47c37bec03ef2c8132ca19ac8005c70995f" dependencies = [ - "ckb-fixed-hash-core", - "ckb-fixed-hash-macros", + "ckb-fixed-hash-core 0.118.0", + "ckb-fixed-hash-macros 0.118.0", +] + +[[package]] +name = "ckb-fixed-hash" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71ea8f4896f945ecdb473cc8b747a47a9f282393a37a681bcbe0cdde94894bfc" +dependencies = [ + "ckb-fixed-hash-core 0.119.0", + "ckb-fixed-hash-macros 0.119.0", ] [[package]] @@ -283,13 +320,37 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ckb-fixed-hash-core" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1c265cd6b0ec00b8dc671b9344906a2428f9b756e4e789660c71f535252fe2d" +dependencies = [ + "ckb_schemars", + "faster-hex", + "serde", + "thiserror", +] + [[package]] name = "ckb-fixed-hash-macros" version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00ede2291016d17450e9d117fac6fb515629779e31ea452d5146a117cd12bf0f" dependencies = [ - "ckb-fixed-hash-core", + "ckb-fixed-hash-core 0.118.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ckb-fixed-hash-macros" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976b10df5474be0ff33b22a84b44875e065679fc41155350c11e420124910ca1" +dependencies = [ + "ckb-fixed-hash-core 0.119.0", "proc-macro2", "quote", "syn 1.0.109", @@ -302,10 +363,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7891f62f4ae4f018bfde91a46178c78491a1dfee740a20b994003a23f10af" dependencies = [ "cfg-if", - "ckb-error", - "ckb-fixed-hash", - "ckb-hash", - "ckb-occupied-capacity", + "ckb-error 0.118.0", + "ckb-fixed-hash 0.118.0", + "ckb-hash 0.118.0", + "ckb-occupied-capacity 0.118.0", + "molecule", + "numext-fixed-uint", +] + +[[package]] +name = "ckb-gen-types" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc221d4b9d6d39215b1d62be855861b8b0c8d668ca29874903b0bf5d0b4d9fa" +dependencies = [ + "cfg-if", + "ckb-error 0.119.0", + "ckb-fixed-hash 0.119.0", + "ckb-hash 0.119.0", + "ckb-occupied-capacity 0.119.0", "molecule", "numext-fixed-uint", ] @@ -320,13 +396,36 @@ dependencies = [ "blake2b-rs", ] +[[package]] +name = "ckb-hash" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99ba7c72f86f239b3e0154f51d6cd5d0d83bbaa8775fdc7b6bcac459ae24b6fd" +dependencies = [ + "blake2b-ref", + "blake2b-rs", +] + [[package]] name = "ckb-jsonrpc-types" version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e622a66404770b52da9dfbc9b994f2b711ea2368ef23cc9b1c96ca38491ecf" dependencies = [ - "ckb-types", + "ckb-types 0.118.0", + "ckb_schemars", + "faster-hex", + "serde", + "serde_json", +] + +[[package]] +name = "ckb-jsonrpc-types" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3983584cc6e269125c3bf502fa6d84a4f6e47d5b4c1e3a4070db86382ed4ba15" +dependencies = [ + "ckb-types 0.119.0", "ckb_schemars", "faster-hex", "serde", @@ -357,9 +456,21 @@ version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd785084e7c3903cb49f0d2abb12c56880827cae14723cd4fed1bf3fa26a74db" dependencies = [ - "ckb-jsonrpc-types", - "ckb-traits", - "ckb-types", + "ckb-jsonrpc-types 0.118.0", + "ckb-traits 0.118.0", + "ckb-types 0.118.0", + "serde", +] + +[[package]] +name = "ckb-mock-tx-types" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bce36d06097bca7df141a89ba970566bbf4075945c6dd95a0771e8830c2c1a8" +dependencies = [ + "ckb-jsonrpc-types 0.119.0", + "ckb-traits 0.119.0", + "ckb-types 0.119.0", "serde", ] @@ -369,8 +480,18 @@ version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e01910f17fcdb1850df67a5b340bbb98d18948eacb476fc85d9a7699294d7ab" dependencies = [ - "ckb-occupied-capacity-core", - "ckb-occupied-capacity-macros", + "ckb-occupied-capacity-core 0.118.0", + "ckb-occupied-capacity-macros 0.118.0", +] + +[[package]] +name = "ckb-occupied-capacity" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6b706bce252b627543ce3bac5240f4d2f1e5d73daca9e451c88db44c2ea94bb" +dependencies = [ + "ckb-occupied-capacity-core 0.119.0", + "ckb-occupied-capacity-macros 0.119.0", ] [[package]] @@ -382,13 +503,33 @@ dependencies = [ "serde", ] +[[package]] +name = "ckb-occupied-capacity-core" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510608e5c7c2f3bf025c6ae80ed7782a1cd12897e15dc930167c8dbd3165ece6" +dependencies = [ + "serde", +] + [[package]] name = "ckb-occupied-capacity-macros" version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "893198354933ba8fa0a1d99c013c819a295f6ae30b1af89fc14e0b62d7afa024" dependencies = [ - "ckb-occupied-capacity-core", + "ckb-occupied-capacity-core 0.118.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ckb-occupied-capacity-macros" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79a3fd71708b5068fb377497d6be6dbca53725f1a13d174335105c4bd39ffd5" +dependencies = [ + "ckb-occupied-capacity-core 0.119.0", "quote", "syn 1.0.109", ] @@ -400,8 +541,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069c3db99adb9d350d186de8e02a43e77dff7be2a8b9b7cf61ba80a280e2dd00" dependencies = [ "byteorder", - "ckb-hash", - "ckb-types", + "ckb-hash 0.118.0", + "ckb-types 0.118.0", "eaglesong", "log", "serde", @@ -417,6 +558,16 @@ dependencies = [ "serde", ] +[[package]] +name = "ckb-rational" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91835c60dba878e54da2dfcfad62369638b88f910d9e8c7eb31f9c357a331ff7" +dependencies = [ + "numext-fixed-uint", + "serde", +] + [[package]] name = "ckb-resource" version = "0.118.0" @@ -424,7 +575,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1e74f9bc4039a4cf6d579dc8b444b3d76780e51aab94daccdd5e6e58d01cc32" dependencies = [ "ckb-system-scripts", - "ckb-types", + "ckb-types 0.118.0", "includedir", "includedir_codegen", "phf", @@ -440,11 +591,11 @@ checksum = "f6b92a1f4f059f4680b08817dfb739a40356dcf4798b3cb8ae1f1d67218eb0fb" dependencies = [ "byteorder", "ckb-chain-spec", - "ckb-error", - "ckb-hash", + "ckb-error 0.118.0", + "ckb-hash 0.118.0", "ckb-logger", - "ckb-traits", - "ckb-types", + "ckb-traits 0.118.0", + "ckb-types 0.118.0", "ckb-vm", "faster-hex", "serde", @@ -454,11 +605,12 @@ dependencies = [ [[package]] name = "ckb-std" version = "0.16.0" +source = "git+https://github.com/joii2020/ckb-std.git?rev=2a9e566#2a9e566ca91ad74399e2f8ac77628ad89cdc979e" dependencies = [ "buddy-alloc", "cc", - "ckb-gen-types", - "ckb-x64-simulator 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ckb-gen-types 0.118.0", + "ckb-x64-simulator 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "gcd", ] @@ -503,14 +655,14 @@ dependencies = [ "ckb-always-success-script", "ckb-chain-spec", "ckb-crypto", - "ckb-error", - "ckb-hash", - "ckb-jsonrpc-types", - "ckb-mock-tx-types", + "ckb-error 0.118.0", + "ckb-hash 0.118.0", + "ckb-jsonrpc-types 0.118.0", + "ckb-mock-tx-types 0.118.0", "ckb-resource", "ckb-script", - "ckb-traits", - "ckb-types", + "ckb-traits 0.118.0", + "ckb-types 0.118.0", "ckb-verification", "faster-hex", "lazy_static", @@ -525,7 +677,16 @@ version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6500281355bbf7a235fb386b2883e8ffb8cb5bab8447bd86dd229148ec52704" dependencies = [ - "ckb-types", + "ckb-types 0.118.0", +] + +[[package]] +name = "ckb-traits" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab91cb32bd5655b5b4c6574d6f07dd919d93759dc9e07f9ee6a2a9823848c4dc" +dependencies = [ + "ckb-types 0.119.0", ] [[package]] @@ -536,15 +697,41 @@ checksum = "88f4ef54b7665440d1984489c580e8d540888496d7b9ff8d57262ac583ff97a4" dependencies = [ "bit-vec", "bytes", - "ckb-channel", - "ckb-constant", - "ckb-error", - "ckb-fixed-hash", - "ckb-gen-types", - "ckb-hash", + "ckb-channel 0.118.0", + "ckb-constant 0.118.0", + "ckb-error 0.118.0", + "ckb-fixed-hash 0.118.0", + "ckb-gen-types 0.118.0", + "ckb-hash 0.118.0", + "ckb-merkle-mountain-range", + "ckb-occupied-capacity 0.118.0", + "ckb-rational 0.118.0", + "derive_more", + "golomb-coded-set", + "merkle-cbt", + "molecule", + "numext-fixed-uint", + "once_cell", + "paste", +] + +[[package]] +name = "ckb-types" +version = "0.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f02dc76ea18e9838ec996c0f1f8a822d65176d2c9f052b3855c1d0a2d0a4d885" +dependencies = [ + "bit-vec", + "bytes", + "ckb-channel 0.119.0", + "ckb-constant 0.119.0", + "ckb-error 0.119.0", + "ckb-fixed-hash 0.119.0", + "ckb-gen-types 0.119.0", + "ckb-hash 0.119.0", "ckb-merkle-mountain-range", - "ckb-occupied-capacity", - "ckb-rational", + "ckb-occupied-capacity 0.119.0", + "ckb-rational 0.119.0", "derive_more", "golomb-coded-set", "merkle-cbt", @@ -563,12 +750,12 @@ dependencies = [ "ckb-chain-spec", "ckb-dao", "ckb-dao-utils", - "ckb-error", + "ckb-error 0.118.0", "ckb-pow", "ckb-script", "ckb-systemtime", - "ckb-traits", - "ckb-types", + "ckb-traits 0.118.0", + "ckb-types 0.118.0", "ckb-verification-traits", "derive_more", "lru", @@ -582,7 +769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528617394f801d37aaff93da32bda8502ad61ed4706f9073c4a6761a9895df47" dependencies = [ "bitflags 1.3.2", - "ckb-error", + "ckb-error 0.118.0", ] [[package]] @@ -614,11 +801,11 @@ dependencies = [ [[package]] name = "ckb-x64-simulator" -version = "0.9.2" +version = "0.10.0" dependencies = [ "cc", - "ckb-mock-tx-types", - "ckb-types", + "ckb-mock-tx-types 0.119.0", + "ckb-types 0.119.0", "faster-hex", "lazy_static", "libc", @@ -630,10 +817,10 @@ dependencies = [ [[package]] name = "ckb-x64-simulator" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "febfea480f2e1e78d620e243447929fabcc200c647fb1073c692d632af202745" -replace = "ckb-x64-simulator 0.9.2" +checksum = "dd4734273cff42f99205f5d3b6d6673786339443ca169ed5ff85bfc69730d910" +replace = "ckb-x64-simulator 0.10.0" [[package]] name = "ckb_schemars" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 28f3e1c..498380e 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -28,7 +28,7 @@ codegen-units = 1 debug = true [replace] -"ckb-x64-simulator:0.9.2" = { path = "../" } +"ckb-x64-simulator:0.10.0" = { path = "../" } # TODO: Will be deleted after release "ckb-testtool:0.13.1" = { git = "https://github.com/joii2020/ckb-testtool.git", rev = "281c4ec" } diff --git a/tests/libs/ckb-std-wrapper/Cargo.toml b/tests/libs/ckb-std-wrapper/Cargo.toml index 93a516c..e5b4b65 100644 --- a/tests/libs/ckb-std-wrapper/Cargo.toml +++ b/tests/libs/ckb-std-wrapper/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" native-simulator = ["ckb-std/native-simulator"] [dependencies] -ckb-std = { git = "https://github.com/joii2020/ckb-std.git", rev = "a4dfebc" } +ckb-std = { git = "https://github.com/joii2020/ckb-std.git", rev = "2a9e566" } # ckb-std = { path = "../../../../ckb-std" }