From 25c0a2cd834a285ad58e29374134dcdf7325e90e Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 15:57:17 +0800 Subject: [PATCH 1/9] Use native-tls-vendored feature for `ckb-sdk` to static link openssl --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index db6b850a..d105c9c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ ckb-error = "=0.111.0" ckb-script = "=0.111.0" ckb-chain-spec = "=0.111.0" ckb-mock-tx-types = "=0.111.0" -ckb-sdk = "3.0.0" +ckb-sdk = { version="3.0.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" } jsonrpc-core-client = "18" From 618775de8112978ecc5daf914653dd9ae2a2570a Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 16:02:41 +0800 Subject: [PATCH 2/9] Update Cargo.lock by `make prod` --- Cargo.lock | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index ac9f556e..a64c3648 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2218,6 +2218,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "111.28.1+1.1.1w" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf7e82ffd6d3d6e6524216a0bfd85509f68b5b28354e8e7800057e44cefa9b4" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.90" @@ -2226,6 +2235,7 @@ checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] From a5b4a4c1db1f9073dbbd4586e03745acbbd48c1d Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 16:02:56 +0800 Subject: [PATCH 3/9] Upgrade ckb-sdk-rust to 3.0.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d105c9c9..88bf5142 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ ckb-error = "=0.111.0" ckb-script = "=0.111.0" ckb-chain-spec = "=0.111.0" ckb-mock-tx-types = "=0.111.0" -ckb-sdk = { version="3.0.0",features = ["native-tls-vendored"] } +ckb-sdk = { version="3.0.1",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" } jsonrpc-core-client = "18" From ddafd9479d23b5540406a84b05142dd8603b13fe Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 16:08:04 +0800 Subject: [PATCH 4/9] Fix get_fee_rate_statistics return an Option --- src/utils/rpc/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/rpc/client.rs b/src/utils/rpc/client.rs index d06793d0..bb6035b2 100644 --- a/src/utils/rpc/client.rs +++ b/src/utils/rpc/client.rs @@ -271,10 +271,10 @@ impl HttpRpcClient { pub fn get_fee_rate_statistics( &mut self, target: Option, - ) -> Result { + ) -> Result, String> { self.client .get_fee_rate_statics(target.map(Into::into)) - .map(Into::into) + .map(|fee_rate_statistics| fee_rate_statistics.map(Into::into)) .map_err(|err| err.to_string()) } pub fn get_deployments_info(&mut self) -> Result { From 03f97cf2756d319c626de26575bce0d6ea923bbc Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 16:09:33 +0800 Subject: [PATCH 5/9] Update Cargo.lock by `make prod` --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a64c3648..26f681d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -714,9 +714,9 @@ dependencies = [ [[package]] name = "ckb-sdk" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ded3042867b04f20456f17a1f752f2604a24659f3aeec1928917d9ee6b659d4" +checksum = "718c12dee9e39d9e438a6cc6da0168ac83ca8dc17ace32ce08a2568d4b574398" dependencies = [ "anyhow", "bech32 0.8.1", From 1d786817071b25f4d4803853613b7948ad24ee20 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 16:12:08 +0800 Subject: [PATCH 6/9] Package workflow do not need openssl env anymore --- .github/workflows/package.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index e6b50442..d1e19429 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -51,7 +51,7 @@ jobs: GPG_SIGNER: ${{ secrets.GPG_SIGNER }} run: | export GIT_TAG_NAME=` echo ${{ github.ref }} | awk -F '/' '{print $4}' ` - docker run --rm -i -w /ckb-cli -v $(pwd):/ckb-cli -e OPENSSL_STATIC=1 $BUILDER_IMAGE make prod + docker run --rm -i -w /ckb-cli -v $(pwd):/ckb-cli $BUILDER_IMAGE make prod gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output devtools/ci/signer.asc devtools/ci/signer.asc.gpg gpg --import devtools/ci/signer.asc devtools/ci/package.sh target/release/ckb-cli @@ -91,15 +91,7 @@ jobs: run: | export GIT_TAG_NAME=` echo ${{ github.ref }} | awk -F '/' '{print $4}' ` export TOP_DIR=$(pwd) - curl -LO https://www.openssl.org/source/openssl-1.1.1.tar.gz - tar -xzf openssl-1.1.1.tar.gz - cd openssl-1.1.1 - CC=aarch64-linux-gnu-gcc ./Configure linux-aarch64 no-shared - CC=aarch64-linux-gnu-gcc make - cd .. - export OPENSSL_LIB_DIR=${TOP_DIR}/openssl-1.1.1 - export OPENSSL_INCLUDE_DIR=${TOP_DIR}/openssl-1.1.1/include - PKG_CONFIG_ALLOW_CROSS=1 OPENSSL_STATIC=1 CC=gcc CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc cargo build --target=aarch64-unknown-linux-gnu --release + PKG_CONFIG_ALLOW_CROSS=1 CC=gcc CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc cargo build --target=aarch64-unknown-linux-gnu --release gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output devtools/ci/signer.asc devtools/ci/signer.asc.gpg gpg --import devtools/ci/signer.asc devtools/ci/package.sh target/aarch64-unknown-linux-gnu/release/ckb-cli @@ -168,7 +160,7 @@ jobs: GPG_SIGNER: ${{ secrets.GPG_SIGNER }} run: | export GIT_TAG_NAME=` echo ${{ github.ref }} | awk -F '/' '{print $4}' ` - make OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/local/opt/openssl@1.1/lib OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include prod + make prod gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output devtools/ci/signer.asc devtools/ci/signer.asc.gpg gpg --import devtools/ci/signer.asc devtools/ci/package.sh target/release/ckb-cli @@ -219,7 +211,7 @@ jobs: GPG_SIGNER: ${{ secrets.GPG_SIGNER }} run: | export GIT_TAG_NAME=` echo ${{ github.ref }} | awk -F '/' '{print $4}' ` - make OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/local/opt/openssl@1.1/lib OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include prod + make prod gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output devtools/ci/signer.asc devtools/ci/signer.asc.gpg gpg --import devtools/ci/signer.asc devtools/ci/package.sh target/release/ckb-cli From 3be5d9ff41df01c285fbd41a1f3655a54538f991 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Mon, 18 Dec 2023 21:00:34 +0800 Subject: [PATCH 7/9] Upgrade ahash to 0.7.7 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26f681d4..6e24e029 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,9 +42,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom 0.2.10", "once_cell", From 1e26d69e1e0429c2a47804715ea28967c0c5f8eb Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 16:12:36 +0800 Subject: [PATCH 8/9] Upgrade ckb-cli to `1.6.0` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 88bf5142..00d95748 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-cli" -version = "1.5.0" +version = "1.6.0" license = "MIT" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2021" From 24cbf993f70df270d51815f2b3ca15fbc23539b7 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Thu, 14 Dec 2023 16:19:17 +0800 Subject: [PATCH 9/9] Update ckb-cli:1.6.0's Cargo.lock --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 6e24e029..d7dc0762 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -409,7 +409,7 @@ dependencies = [ [[package]] name = "ckb-cli" -version = "1.5.0" +version = "1.6.0" dependencies = [ "ansi_term", "anyhow",