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 diff --git a/Cargo.lock b/Cargo.lock index ac9f556e..d7dc0762 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", @@ -409,7 +409,7 @@ dependencies = [ [[package]] name = "ckb-cli" -version = "1.5.0" +version = "1.6.0" dependencies = [ "ansi_term", "anyhow", @@ -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", @@ -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", ] diff --git a/Cargo.toml b/Cargo.toml index db6b850a..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" @@ -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.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" 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 {