Skip to content

Commit

Permalink
Merge pull request #103 from eval-exec/exec/0.114
Browse files Browse the repository at this point in the history
Upgrade `ckb` dependencies to `v0.114.0`, bump `ckb-sdk` to `3.1.0`
  • Loading branch information
quake authored Mar 1, 2024
2 parents a5e0dc5 + 31d07e7 commit c45c4dc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-sdk"
version = "3.0.1"
version = "3.1.0"
authors = ["Linfeng Qian <[email protected]>", "Nervos Core Dev <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down Expand Up @@ -29,22 +29,22 @@ lru = "0.7.1"
dashmap = "5.4"
dyn-clone = "1.0"

ckb-types = "0.111.0"
ckb-dao-utils = "0.111.0"
ckb-traits = "0.111.0"
ckb-jsonrpc-types = "0.111.0"
ckb-hash = "0.111.0"
ckb-resource = "0.111.0"
ckb-crypto = { version = "=0.111.0", features = ["secp"] }
ckb-script = "0.111.0"
ckb-types = "0.114.0"
ckb-dao-utils = "0.114.0"
ckb-traits = "0.114.0"
ckb-jsonrpc-types = "0.114.0"
ckb-hash = "0.114.0"
ckb-resource = "0.114.0"
ckb-crypto = { version = "=0.114.0", features = ["secp"] }
ckb-script = "0.114.0"
bitflags = "1.3.2"
sha3 = "0.10.1"
enum-repr-derive = "0.2.0"

# for feature test
rand = { version = "0.7.3", optional = true }
ckb-mock-tx-types = "0.111.0"
ckb-chain-spec = "0.111.0"
ckb-mock-tx-types = "0.114.0"
ckb-chain-spec = "0.114.0"

sparse-merkle-tree = "0.6.1"
lazy_static = "1.3.0"
Expand All @@ -57,7 +57,7 @@ rustls-tls = ["reqwest/rustls-tls"]
test = []

[dev-dependencies]
clap = { version = "~4.4.18", features = ["derive"] } # TODO clap v4.5 requires rustc v1.74.0+
clap = { version = "=4.4.18", features = ["derive"] } # TODO clap v4.5 requires rustc v1.74.0+
httpmock = "0.6"
async-global-executor = "2.3.1"
hex = "0.4"
8 changes: 2 additions & 6 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ vulnerability = "deny"
unmaintained = "warn"
yanked = "deny"
notice = "deny"
ignore = [
# TODO Potential segfault in the time crate; waiting for the fix from upstream (chrono)
"RUSTSEC-2020-0071",
# TODO Potential segfault in the chrono crate; waiting for the new release of chrono
"RUSTSEC-2020-0159"
]
ignore = []

[licenses]
unlicensed = "deny"
Expand All @@ -20,6 +15,7 @@ allow = [
"ISC",
"MIT",
"Unicode-DFS-2016",
"BSL-1.0", # xxhash-rust 0.8.10
]
copyleft = "deny"
default = "deny"
Expand Down
5 changes: 3 additions & 2 deletions src/rpc/ckb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use ckb_jsonrpc_types::{
BlockTemplate, BlockView, Capacity, CellWithStatus, ChainInfo, Consensus,
DaoWithdrawingCalculationKind, DeploymentsInfo, EpochNumber, EpochNumberWithFraction,
EpochView, EstimateCycles, ExtraLoggerConfig, FeeRateStatistics, HeaderView, JsonBytes,
LocalNode, MainLoggerConfig, OutPoint, OutputsValidator, RawTxPool, RemoteNode, SyncState,
Timestamp, Transaction, TransactionAndWitnessProof, TransactionProof,
LocalNode, MainLoggerConfig, OutPoint, OutputsValidator, PoolTxDetailInfo, RawTxPool,
RemoteNode, SyncState, Timestamp, Transaction, TransactionAndWitnessProof, TransactionProof,
TransactionWithStatusResponse, TxPoolInfo, Uint32, Uint64, Version,
};
use ckb_types::{core::Cycle, H256};
Expand Down Expand Up @@ -74,6 +74,7 @@ crate::jsonrpc!(pub struct CkbRpcClient {
pub fn send_transaction(&self, tx: Transaction, outputs_validator: Option<OutputsValidator>) -> H256;
pub fn remove_transaction(&self, tx_hash: H256) -> bool;
pub fn tx_pool_info(&self) -> TxPoolInfo;
pub fn get_pool_tx_detail_info(&self, tx_hash: H256) -> PoolTxDetailInfo;
pub fn clear_tx_pool(&self) -> ();
pub fn get_raw_tx_pool(&self, verbose: Option<bool>) -> RawTxPool;
pub fn tx_pool_ready(&self) -> bool;
Expand Down
2 changes: 1 addition & 1 deletion src/tests/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn build_script(loops: u64) -> Script {
let cycle_data_hash = H256::from(blake2b_256(CYCLE_BIN));
Script::new_builder()
.code_hash(cycle_data_hash.pack())
.hash_type(ScriptHashType::Data1.into())
.hash_type(ScriptHashType::Data.into())
.args(build_args(loops).pack())
.build()
}
Expand Down
2 changes: 1 addition & 1 deletion src/traits/offchain_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl OffchainTransactionDependencyProvider {
) -> Result<(), TransactionDependencyError> {
self.truncate(tip_blocknumber);
let tx_view = tx.into_view();
let tx_hash = tx_view.hash().unpack();
let tx_hash: H256 = tx_view.hash().unpack();
self.tx_tip_num_map.insert(tx_hash.clone(), tip_blocknumber);
self.txs.insert(tx_hash.clone(), tx_view.clone());

Expand Down

0 comments on commit c45c4dc

Please sign in to comment.