From 9cdd220926b3b1c50894a5f476a4feaff763e595 Mon Sep 17 00:00:00 2001 From: driftluo Date: Mon, 25 Mar 2024 15:18:42 +0800 Subject: [PATCH] chore: upgrade ckb to 0.115-rc --- Cargo.lock | 159 +++++++++++++++++++++++-------------- Cargo.toml | 35 ++++---- Makefile | 2 +- ckb-signer/Cargo.toml | 10 +-- plugin-protocol/Cargo.toml | 6 +- src/utils/rpc/types.rs | 2 + test/Cargo.toml | 8 +- 7 files changed, 132 insertions(+), 90 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b9231027..a57a17f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -419,15 +419,15 @@ dependencies = [ [[package]] name = "ckb-build-info" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6dae08675879c83a76f244e7217bf88e77cc884c3dada2f3aa74aa117a05ee6" +checksum = "d89b5d5a5371cea3f69df0ca43b8fd9f40553ef107f404e7444b232bb0ae11ab" [[package]] name = "ckb-chain-spec" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8212f21a597c1e9e27641b142b6559a4aa7042571ccec2a1191a7f3b680cd3b1" +checksum = "0b223072b7b15dd6d0f19e82aa00677a7216d7f64fbfd65e75761fc3979bf144" dependencies = [ "cacache", "ckb-constant", @@ -448,16 +448,16 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b22e70542c9a1ec346851bfa999eb52bf6f10dac062dc7c3e83490f3129ea8" +checksum = "e06c4a7bf06b5766be7bf0d0ca631fd094cba609999446fbd20520322eb950c3" dependencies = [ "crossbeam-channel", ] [[package]] name = "ckb-cli" -version = "1.7.0" +version = "1.7.1" dependencies = [ "ansi_term", "anyhow", @@ -519,7 +519,7 @@ dependencies = [ [[package]] name = "ckb-cli-plugin-protocol" -version = "1.3.0" +version = "1.3.1" dependencies = [ "ckb-jsonrpc-types", "ckb-types", @@ -531,15 +531,15 @@ dependencies = [ [[package]] name = "ckb-constant" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3a59ed091a196cd2dac439917049f6b846f9aaa7aafd9b29df183994cc25e" +checksum = "ac9ab29103caae857a53cdc8bc91c41fb4985120e4514c63a91436974e7f3a53" [[package]] name = "ckb-crypto" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20a2e281c9b4090c68343c03f90200e005d0f8be43a539cd6ecc7d46562cab8" +checksum = "8a00080cd65ffff09208312d8abc4a5288e273c46a4b6a30a7e57326ee171eb6" dependencies = [ "ckb-fixed-hash", "faster-hex", @@ -551,9 +551,9 @@ dependencies = [ [[package]] name = "ckb-dao-utils" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae082aedbb90a27364323bdf8a5d80bf916e8aafac96041168498eddc4efc0c7" +checksum = "02b77f25597d2d788916b05c0b1175e661a807f0f365f324491373666c41b8d2" dependencies = [ "byteorder", "ckb-error", @@ -562,9 +562,9 @@ dependencies = [ [[package]] name = "ckb-error" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6d7bc8a43e036195079e3b6a144547970b6c6e1a5591ecbeea7a5478bfebcfa" +checksum = "82f0c60c360e0600c3b025488afc2e7ab01b45223a7fc28304494d08ecdf13a5" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -574,9 +574,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab27de1271bc1064ed242d08fca2d79ca64e3f99b2680b145ac63ba069dc907" +checksum = "e58e9a6327549937fa6cdc604401e1f025817daeb08b80f0c86ee40a7e9d3de2" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -584,10 +584,11 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b63d1bc55ac6e578cdc9ad861f427e46b225a4a48bf5d0a55f6fa4a127a822" +checksum = "0de48cc73479f9a0fe49feef40e7e7defd71f8a2c6ebe6baf3e3809952865933" dependencies = [ + "ckb_schemars", "faster-hex", "serde", "thiserror", @@ -595,9 +596,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008f7221e3d20c4de5c7e23910d343d4938002fa9eb509e3e6fa5898dc4ecba9" +checksum = "e109e6a95ce57b84e33700050f6f97b797c9adc2c5332dc3c1e96faf708e6678" dependencies = [ "ckb-fixed-hash-core", "proc-macro2", @@ -607,9 +608,9 @@ dependencies = [ [[package]] name = "ckb-gen-types" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e565b056266184d99aab11115245531127e4a8d13b7700c4839b469763a3c54" +checksum = "37a11960650d382f7b07410252375220aa4173a5a6823844cb674b6bbdd086f0" dependencies = [ "cfg-if 1.0.0", "ckb-error", @@ -622,9 +623,9 @@ dependencies = [ [[package]] name = "ckb-hash" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99970478850566472a03e5cc4d57e388bb7a8255771f4308b42036f0d8a623d8" +checksum = "86e91d18d24197d7d27bfe5cbea05927e8c5fa58475cfbf5e914e37cb376e73a" dependencies = [ "blake2b-ref", "blake2b-rs", @@ -632,11 +633,12 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c9d60394ebc5c4f5416ca851622fe66bea9f64ef13060c2e22b2cf856af97b" +checksum = "37492efccb3f7946805c17c8ea8f938c2cd83691b6ba1caae257d883f6418299" dependencies = [ "ckb-types", + "ckb_schemars", "faster-hex", "serde", "serde_json", @@ -644,9 +646,9 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b83910b3e92dd7b1b9b27c353f51ae16a48228f2b1c1f070aab7c5ea83d4df2" +checksum = "50a3dfeb5409ba46cb70f98bc9a3e36091b5d5ffd9f64e64b361f83c119ad503" dependencies = [ "log", ] @@ -662,9 +664,9 @@ dependencies = [ [[package]] name = "ckb-mock-tx-types" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f9cbd58716844c28caf3e292154ebfb6dda3e824039b606a1048f1fe5e0120" +checksum = "af2ef95f059a7c9af29eda3ec2bfedad3aaa6ad79c2d36ba8f91b88ae3c72ce8" dependencies = [ "ckb-jsonrpc-types", "ckb-traits", @@ -674,9 +676,9 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8adc8c7723b98636ae3aeb7d14417c68edcc61cf2913414e42eca1eb2b4f7b" +checksum = "0ecfe08c41f13d0b865c10f3fa507bfffc2712d1f710c9e583410a46071e3a90" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -684,18 +686,18 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1589ebe2d556a85b70d02f8dd0d022b990de1420a5de66c356eb3ea8a5526b6c" +checksum = "709e34133b9dfb663fbf053240dc5147c72cd6f927386f5b0124e0a8aee6fe15" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb9842edc4f65f556e57176ecce956ed32fcddcd272118a3a688116d2aba8c80" +checksum = "a4c9b9f20deafc7ff3fd7ee2c0a70b5cf4eb9baee28654ec69463f9a2f97db61" dependencies = [ "ckb-occupied-capacity-core", "quote", @@ -704,9 +706,9 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9285eae2b22b8ec1425763f1621d25e6704b26e92a4548ac1da08dafae7a279" +checksum = "30bf5fb4273a2ba21659bffc06d302649c96d2c4553c4037629c3d6ad8c8f1fc" dependencies = [ "byteorder", "ckb-hash", @@ -718,9 +720,9 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119dbe89e82f7f0f1a5ae310f40775324987c4c0b9128c49b2cfe184a90a8295" +checksum = "bf35ceb2fdd1a00d12b42c5b7a28d872c4ed91ce61639247999c5463bca5815b" dependencies = [ "numext-fixed-uint", "serde", @@ -728,9 +730,9 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710939ea5dd2e70d602b312d57b7bbaf2d380a8a473fb63b1d8af80c0cca74b8" +checksum = "568839c286e8ce39af312de48f362810b068dd15a174c103cb8adf3bbabcb547" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -743,9 +745,9 @@ dependencies = [ [[package]] name = "ckb-script" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2216f261b1169c41f5a6860e3b6362df806bb40915e388a2396514fb08f08ea0" +checksum = "8f360dd7748d3e761796c29bc36c9bbe02719c9de7b5c0b74c70d7c953643550" dependencies = [ "byteorder", "ckb-chain-spec", @@ -761,9 +763,9 @@ dependencies = [ [[package]] name = "ckb-sdk" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8487deb2c0a77bbc4d33c812aa8f3f93c8786730c37a516eebfc4246602413ca" +checksum = "e1caeae8546e058af969e3c641b0d71ee435e0c33df1a667bb70937a40f3b74b" dependencies = [ "anyhow", "bech32 0.8.1", @@ -803,7 +805,7 @@ dependencies = [ [[package]] name = "ckb-signer" -version = "0.4.0" +version = "0.4.1" dependencies = [ "aes-ctr", "anyhow", @@ -839,18 +841,18 @@ dependencies = [ [[package]] name = "ckb-traits" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c211d2c46be6847ef80088786bb0dff8341eb99df2c32b546c147e884c4df" +checksum = "cf6a603fb9b4782419331857e665119fe2281ae4d491257b80439bbe693758e4" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e62857acdfe95b3aec162731329a19cd6ea29e8335055ebbbc0dfc8b359d2b4" +checksum = "5b05968a9bb72db2a4c2b5028897d2568056e257b2e7338c6532283625b6e98c" dependencies = [ "bit-vec", "bytes 1.5.0", @@ -874,9 +876,9 @@ dependencies = [ [[package]] name = "ckb-util" -version = "0.114.0" +version = "0.115.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b60f68d1f505cba650879ecdc0521fc7d43454518ac67b32972c0bbc7f2239f" +checksum = "02da4db1bedc1bd094ed715495b7f37aa0b6b2f06a05aae79e21aece87b20e0e" dependencies = [ "linked-hash-map", "once_cell", @@ -886,9 +888,9 @@ dependencies = [ [[package]] name = "ckb-vm" -version = "0.24.8" +version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8332997ee3beacb0c1b9e2489e17b33af855a0ec28d7c08a81170fae6b204340" +checksum = "a2c3d68dc7f891e5555c7ebc054722b28ab005e51c5076f54c20d36002dc8e83" dependencies = [ "byteorder", "bytes 1.5.0", @@ -904,13 +906,37 @@ dependencies = [ [[package]] name = "ckb-vm-definitions" -version = "0.24.8" +version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f6fa54fd079938807cce5b11b4fbb9b21984568b887204ea96a02dbd907c2f" +checksum = "a2fdf9c8ee14409b2208d23b9ad88828242d7881153ddc04872b66d2e018a52f" dependencies = [ "paste", ] +[[package]] +name = "ckb_schemars" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21f99fca82a4eb8708e406e99246987b087ecc1e1babeece1a0b1d5238b1750" +dependencies = [ + "ckb_schemars_derive", + "dyn-clone", + "serde", + "serde_json", +] + +[[package]] +name = "ckb_schemars_derive" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c813b4fadbdd9f33b1cf02a1ddfa9537d955c8d2fbe150d1fc1684dbf78e73" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 1.0.109", +] + [[package]] name = "clap" version = "3.0.0-beta.1" @@ -2106,9 +2132,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -3132,6 +3158,17 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "serde_json" version = "1.0.114" diff --git a/Cargo.toml b/Cargo.toml index dbe893fe..a7ea1681 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,25 +1,28 @@ [package] name = "ckb-cli" -version = "1.7.0" +version = "1.7.1" license = "MIT" -authors = ["Linfeng Qian ", "Nervos Core Dev "] +authors = [ + "Linfeng Qian ", + "Nervos Core Dev ", +] edition = "2021" description = "ckb command line interface" [dependencies] -ckb-jsonrpc-types = "=0.114.0" -ckb-hash = "=0.114.0" -ckb-crypto = { version = "=0.114.0", features = ["secp"] } -ckb-build-info = "=0.114.0" -ckb-types = "=0.114.0" -ckb-util = "=0.114.0" -ckb-error = "=0.114.0" -ckb-script = "=0.114.0" -ckb-chain-spec = "=0.114.0" -ckb-mock-tx-types = "=0.114.0" -ckb-sdk = { version = "3.1.0" ,features = ["native-tls-vendored"] } -ckb-signer = { path = "ckb-signer", version = "0.4.0" } -plugin-protocol = { path = "plugin-protocol", package = "ckb-cli-plugin-protocol", version = "=1.3.0" } +ckb-jsonrpc-types = "=0.115.0-rc2" +ckb-hash = "=0.115.0-rc2" +ckb-crypto = { version = "=0.115.0-rc2", features = ["secp"] } +ckb-build-info = "=0.115.0-rc2" +ckb-types = "=0.115.0-rc2" +ckb-util = "=0.115.0-rc2" +ckb-error = "=0.115.0-rc2" +ckb-script = "=0.115.0-rc2" +ckb-chain-spec = "=0.115.0-rc2" +ckb-sdk = { version = "3.1.1", features = ["native-tls-vendored"] } +ckb-mock-tx-types = "=0.115.0-rc2" +ckb-signer = { path = "ckb-signer", version = "0.4.1" } +plugin-protocol = { path = "plugin-protocol", package = "ckb-cli-plugin-protocol", version = "=1.3.1" } jsonrpc-core-client = "18" jsonrpc-core = "18" jsonrpc-derive = "18" @@ -73,7 +76,7 @@ termion = "1.5" rand = "0.7" [build-dependencies] -ckb-build-info = "=0.114.0" +ckb-build-info = "=0.115.0-rc2" [workspace] members = ["ckb-signer", "plugin-protocol"] diff --git a/Makefile b/Makefile index 7287bb67..937056dd 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ ci: fmt clippy test security-audit check-crates check-licenses git diff --exit-code Cargo.lock integration: - bash devtools/ci/integration.sh v0.114.0-rc3 + bash devtools/ci/integration.sh v0.115.0-rc2 prod: ## Build binary with release profile. cargo build --release diff --git a/ckb-signer/Cargo.toml b/ckb-signer/Cargo.toml index 7e857825..2faa877b 100644 --- a/ckb-signer/Cargo.toml +++ b/ckb-signer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-signer" -version = "0.4.0" +version = "0.4.1" edition = "2021" license = "MIT" description = "Signer SDK for Nervos CKB" @@ -24,7 +24,7 @@ thiserror = "1.0.30" parking_lot = "0.11" anyhow = "1.0.63" -ckb-types = "=0.114.0" -ckb-hash = "=0.114.0" -ckb-crypto = { version = "=0.114.0", features = ["secp"] } -ckb-sdk = { version = "3.1.0", features = ["native-tls-vendored"] } +ckb-types = "=0.115.0-rc2" +ckb-hash = "=0.115.0-rc2" +ckb-crypto = { version = "=0.115.0-rc2", features = ["secp"] } +ckb-sdk = { version = "3.1.1", features = ["native-tls-vendored"] } diff --git a/plugin-protocol/Cargo.toml b/plugin-protocol/Cargo.toml index c9a31e4b..9354b26b 100644 --- a/plugin-protocol/Cargo.toml +++ b/plugin-protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-cli-plugin-protocol" -version = "1.3.0" +version = "1.3.1" authors = ["Nervos Core Dev "] edition = "2021" license = "MIT" @@ -9,8 +9,8 @@ description = "ckb-cli plugin protocol" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-types = "=0.114.0" -ckb-jsonrpc-types = "=0.114.0" +ckb-types = "=0.115.0-rc2" +ckb-jsonrpc-types = "=0.115.0-rc2" serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" serde_json = "1.0" diff --git a/src/utils/rpc/types.rs b/src/utils/rpc/types.rs index ae019318..6bae918d 100644 --- a/src/utils/rpc/types.rs +++ b/src/utils/rpc/types.rs @@ -1510,6 +1510,7 @@ pub struct SyncState { pub best_known_block_number: BlockNumber, pub best_known_block_timestamp: Timestamp, pub orphan_blocks_count: Uint64, + pub orphan_blocks_size: Uint64, pub inflight_blocks_count: Uint64, pub fast_time: Uint64, pub normal_time: Uint64, @@ -1522,6 +1523,7 @@ impl From for SyncState { best_known_block_number: json.best_known_block_number.into(), best_known_block_timestamp: json.best_known_block_timestamp.into(), orphan_blocks_count: json.orphan_blocks_count.value(), + orphan_blocks_size: json.orphan_blocks_size.value(), inflight_blocks_count: json.inflight_blocks_count.value(), fast_time: json.fast_time.value(), normal_time: json.normal_time.value(), diff --git a/test/Cargo.toml b/test/Cargo.toml index 9af30e68..3bc6f3a0 100644 --- a/test/Cargo.toml +++ b/test/Cargo.toml @@ -14,12 +14,12 @@ log = "0.4" env_logger = "0.6" toml = "0.5.0" serde_yaml = "0.8.9" -ckb-sdk = { version = "3.1.0", features = ["native-tls-vendored"] } +ckb-sdk = { version = "3.1.1", features = ["native-tls-vendored"] } serde_json = "1.0" -ckb-types = "=0.114.0" -ckb-jsonrpc-types = "=0.114.0" +ckb-types = "=0.115.0-rc2" +ckb-jsonrpc-types = "=0.115.0-rc2" ckb-app-config = "=0.114.0" -ckb-chain-spec = "=0.114.0" +ckb-chain-spec = "=0.115.0-rc2" regex = "1.1.6" faster-hex = "0.6"