diff --git a/Cargo.lock b/Cargo.lock index 9afc0be2..7f5dfec2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,15 +58,6 @@ dependencies = [ "winapi 0.3.8", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi 0.3.8", -] - [[package]] name = "arrayref" version = "0.3.6" @@ -324,19 +315,18 @@ checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" dependencies = [ "num-integer", "num-traits", - "serde", "time", ] [[package]] name = "ckb-build-info" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" [[package]] name = "ckb-chain-spec" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-crypto", "ckb-dao-utils", @@ -354,9 +344,9 @@ dependencies = [ [[package]] name = "ckb-cli" -version = "0.34.0" +version = "0.35.0" dependencies = [ - "ansi_term 0.11.0", + "ansi_term", "atty", "byteorder", "chrono", @@ -419,8 +409,8 @@ dependencies = [ [[package]] name = "ckb-crypto" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-fixed-hash", "failure", @@ -432,8 +422,8 @@ dependencies = [ [[package]] name = "ckb-dao-utils" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "byteorder", "ckb-error", @@ -444,8 +434,8 @@ dependencies = [ [[package]] name = "ckb-error" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-occupied-capacity", "enum-display-derive", @@ -455,8 +445,8 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-hack", @@ -465,8 +455,8 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "failure", "faster-hex 0.4.1", @@ -475,8 +465,8 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-hack" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-fixed-hash-core", "proc-macro-hack", @@ -487,15 +477,15 @@ dependencies = [ [[package]] name = "ckb-hash" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "blake2b-rs", ] [[package]] name = "ckb-index" -version = "0.34.0" +version = "0.35.0" dependencies = [ "bincode", "ckb-rocksdb", @@ -509,8 +499,8 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-types", "faster-hex 0.4.1", @@ -532,27 +522,17 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ - "ansi_term 0.12.1", - "backtrace", - "chrono", - "ckb-util", - "crossbeam-channel", - "env_logger", - "lazy_static", "log 0.4.11", - "regex", - "sentry", - "serde", "serde_json", ] [[package]] name = "ckb-occupied-capacity" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -561,16 +541,16 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-occupied-capacity-core", "proc-macro-hack", @@ -580,28 +560,29 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "byteorder", "ckb-hash", "ckb-types", "eaglesong", + "log 0.4.11", "serde", ] [[package]] name = "ckb-rational" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "numext-fixed-uint", ] [[package]] name = "ckb-resource" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -625,35 +606,27 @@ dependencies = [ [[package]] name = "ckb-script" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "byteorder", "ckb-chain-spec", "ckb-error", "ckb-hash", "ckb-logger", - "ckb-script-data-loader", + "ckb-traits", "ckb-types", "ckb-vm", "ckb-vm-definitions", "failure", "faster-hex 0.4.1", - "goblin 0.1.3", + "goblin", "serde", ] -[[package]] -name = "ckb-script-data-loader" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" -dependencies = [ - "ckb-types", -] - [[package]] name = "ckb-sdk" -version = "0.34.0" +version = "0.35.0" dependencies = [ "aes-ctr", "bech32", @@ -684,13 +657,13 @@ dependencies = [ [[package]] name = "ckb-sdk-types" -version = "0.34.0" +version = "0.35.0" dependencies = [ "ckb-crypto", "ckb-error", "ckb-hash", "ckb-jsonrpc-types", - "ckb-script", + "ckb-traits", "ckb-types", "serde", "serde_derive", @@ -709,10 +682,18 @@ dependencies = [ "phf", ] +[[package]] +name = "ckb-traits" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" +dependencies = [ + "ckb-types", +] + [[package]] name = "ckb-types" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ "bit-vec", "bytes 0.5.4", @@ -731,10 +712,10 @@ dependencies = [ [[package]] name = "ckb-util" -version = "0.34.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.34.0-rc1#673fd25518f9e9cea8814b9870758a8e7ba7dc14" +version = "0.35.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.35.0-rc1#0c1a61c0ca13b300a83832a760b9899cc401dcfd" dependencies = [ - "linked-hash-map 0.5.1", + "linked-hash-map", "parking_lot 0.7.1", ] @@ -749,7 +730,7 @@ dependencies = [ "cc", "ckb-vm-definitions", "derive_more", - "goblin 0.2.1", + "goblin", "libc", "memmap", ] @@ -978,18 +959,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" -[[package]] -name = "debugid" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088c9627adec1e494ff9dea77377f1e69893023d631254a0ec68b16ee20be3e9" -dependencies = [ - "lazy_static", - "regex", - "serde", - "uuid", -] - [[package]] name = "derive_more" version = "0.99.5" @@ -1231,17 +1200,6 @@ dependencies = [ "regex", ] -[[package]] -name = "goblin" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da" -dependencies = [ - "log 0.4.11", - "plain", - "scroll", -] - [[package]] name = "goblin" version = "0.2.1" @@ -1308,16 +1266,6 @@ dependencies = [ "digest", ] -[[package]] -name = "hostname" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" -dependencies = [ - "libc", - "winutil", -] - [[package]] name = "http" version = "0.1.21" @@ -1347,12 +1295,6 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" - [[package]] name = "humantime" version = "1.3.0" @@ -1427,17 +1369,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "im" -version = "12.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de38d1511a0ce7677538acb1e31b5df605147c458e061b2cdb89858afb1cd182" -dependencies = [ - "rustc_version", - "sized-chunks", - "typenum", -] - [[package]] name = "includedir" version = "0.5.0" @@ -1624,11 +1555,6 @@ version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0" -[[package]] -name = "linked-hash-map" -version = "0.5.1" -source = "git+https://github.com/nervosnetwork/linked-hash-map?rev=df27f21#df27f2194df66d3c652b0fb661da707cc167c9d1" - [[package]] name = "linked-hash-map" version = "0.5.2" @@ -2700,46 +2626,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -[[package]] -name = "sentry" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509c5fbb9e875fafcd9c4612c0e49d476083b848bf87380cfe1126ebc745c140" -dependencies = [ - "backtrace", - "env_logger", - "failure", - "hostname", - "httpdate", - "im", - "lazy_static", - "libc", - "log 0.4.11", - "rand 0.6.5", - "regex", - "reqwest", - "rustc_version", - "sentry-types", - "uname", - "url 1.7.2", -] - -[[package]] -name = "sentry-types" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23e3d9c8c6e4a1523f24df6753c4088bfe16c44a73c8881c1d23c70f28ae280" -dependencies = [ - "chrono", - "debugid", - "failure", - "serde", - "serde_json", - "url 1.7.2", - "url_serde", - "uuid", -] - [[package]] name = "serde" version = "1.0.105" @@ -2790,7 +2676,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16c7a592a1ec97c9c1c68d75b6e537dcbf60c7618e038e7841e00af1d9ccf0c4" dependencies = [ "dtoa", - "linked-hash-map 0.5.2", + "linked-hash-map", "serde", "yaml-rust", ] @@ -2844,15 +2730,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" -[[package]] -name = "sized-chunks" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d3e7f23bad2d6694e0f46f5e470ec27eb07b8f3e8b309a4b0dc17501928b9f2" -dependencies = [ - "typenum", -] - [[package]] name = "slab" version = "0.4.2" @@ -3287,15 +3164,6 @@ version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" -[[package]] -name = "uname" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8" -dependencies = [ - "libc", -] - [[package]] name = "unicase" version = "2.6.0" @@ -3381,16 +3249,6 @@ dependencies = [ "percent-encoding 2.1.0", ] -[[package]] -name = "url_serde" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea" -dependencies = [ - "serde", - "url 1.7.2", -] - [[package]] name = "utf8parse" version = "0.1.1" @@ -3404,7 +3262,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" dependencies = [ "rand 0.6.5", - "serde", ] [[package]] @@ -3511,15 +3368,6 @@ dependencies = [ "winapi 0.3.8", ] -[[package]] -name = "winutil" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" -dependencies = [ - "winapi 0.3.8", -] - [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -3536,5 +3384,5 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" dependencies = [ - "linked-hash-map 0.5.2", + "linked-hash-map", ] diff --git a/Cargo.toml b/Cargo.toml index 1bf0a0d9..ed01aeb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,19 +1,19 @@ [package] name = "ckb-cli" -version = "0.34.0" +version = "0.35.0" license = "MIT" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" [dependencies] -ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1", features = ["secp"] } -ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-util = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-dao-utils = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } +ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1", features = ["secp"] } +ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-util = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-dao-utils = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } ckb-sdk = { path = "ckb-sdk" } ckb-index = { path = "ckb-index" } plugin-protocol = { path = "plugin-protocol", package = "ckb-cli-plugin-protocol" } @@ -56,7 +56,7 @@ tui = "0.6.0" termion = "1.5" [build-dependencies] -ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } +ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } [workspace] members = ["ckb-sdk", "ckb-index", "ckb-sdk-types", "plugin-protocol"] diff --git a/Makefile b/Makefile index 26673ab1..23057498 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ci: fmt clippy test security-audit git diff --exit-code Cargo.lock integration: - bash devtools/ci/integration.sh v0.34.0-rc1 + bash devtools/ci/integration.sh v0.35.0-rc1 prod: ## Build binary with release profile. cargo build --release diff --git a/ckb-index/Cargo.toml b/ckb-index/Cargo.toml index 6c4f82e4..e2b5efa5 100644 --- a/ckb-index/Cargo.toml +++ b/ckb-index/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-index" -version = "0.34.0" +version = "0.35.0" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" license = "MIT" @@ -11,6 +11,6 @@ serde_derive = "1.0" bincode = "1.1.4" log = "0.4.6" failure = "0.1.5" -ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } ckb-sdk = { path = "../ckb-sdk" } rocksdb = { package = "ckb-rocksdb", version = "=0.13.0", features = ["snappy"] } diff --git a/ckb-sdk-types/Cargo.toml b/ckb-sdk-types/Cargo.toml index bf10325b..6b658508 100644 --- a/ckb-sdk-types/Cargo.toml +++ b/ckb-sdk-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-sdk-types" -version = "0.34.0" +version = "0.35.0" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" license = "MIT" @@ -9,16 +9,11 @@ license = "MIT" serde = { version = "1.0", features = ["rc"] } serde_derive = "1.0" -ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-script = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1", default-features = false } -ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-error = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-traits = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-error = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } [dev-dependencies] -ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1", features = ["secp"] } - -[features] -default = ["ckb-script/default"] -asm = ["ckb-script/asm"] -logging = ["ckb-script/logging"] +ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1", features = ["secp"] } diff --git a/ckb-sdk-types/src/transaction.rs b/ckb-sdk-types/src/transaction.rs index cc49c184..889737ad 100644 --- a/ckb-sdk-types/src/transaction.rs +++ b/ckb-sdk-types/src/transaction.rs @@ -1,12 +1,11 @@ use ckb_jsonrpc_types as json_types; -use ckb_script::DataLoader; +use ckb_traits::{CellDataProvider, HeaderProvider}; use ckb_types::{ bytes::Bytes, core::{ cell::{CellMeta, CellMetaBuilder, CellProvider, CellStatus, HeaderChecker}, error::OutPointError, - BlockExt, DepType, EpochExt, EpochNumberWithFraction, HeaderView, TransactionInfo, - TransactionView, + DepType, EpochNumberWithFraction, HeaderView, TransactionInfo, TransactionView, }, packed::{Byte32, CellDep, CellInput, CellOutput, OutPoint, OutPointVec, Transaction}, prelude::*, @@ -221,25 +220,24 @@ impl CellProvider for Resource { } } -impl DataLoader for Resource { - // load CellOutput +impl CellDataProvider for Resource { fn load_cell_data(&self, cell: &CellMeta) -> Option<(Bytes, Byte32)> { - cell.mem_cell_data.clone().or_else(|| { - self.required_cells - .get(&cell.out_point) - .and_then(|cell_meta| cell_meta.mem_cell_data.clone()) - }) - } - // load BlockExt - fn get_block_ext(&self, _block_hash: &Byte32) -> Option { - // TODO: visit this later - None + cell.mem_cell_data + .as_ref() + .map(ToOwned::to_owned) + .or_else(|| self.get_cell_data(&cell.out_point)) } - fn get_block_epoch(&self, _block_hash: &Byte32) -> Option { - None + + fn get_cell_data(&self, out_point: &OutPoint) -> Option<(Bytes, Byte32)> { + self.required_cells + .get(out_point) + .and_then(|cell_meta| cell_meta.mem_cell_data.clone()) } - fn get_header(&self, block_hash: &Byte32) -> Option { - self.required_headers.get(block_hash).cloned() +} + +impl HeaderProvider for Resource { + fn get_header(&self, hash: &Byte32) -> Option { + self.required_headers.get(hash).cloned() } } diff --git a/ckb-sdk/Cargo.toml b/ckb-sdk/Cargo.toml index e83bd490..f21d001f 100644 --- a/ckb-sdk/Cargo.toml +++ b/ckb-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-sdk" -version = "0.34.0" +version = "0.35.0" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" license = "MIT" @@ -25,10 +25,10 @@ uuid = { version = "0.7.4", features = ["v4"] } chrono = "0.4.6" failure = "0.1.5" -ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-script = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1" } -ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.34.0-rc1", features = ["secp"] } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-script = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1" } +ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.35.0-rc1", features = ["secp"] } ckb-sdk-types = { path = "../ckb-sdk-types" } diff --git a/ckb-sdk/src/rpc/client.rs b/ckb-sdk/src/rpc/client.rs index 09999dff..5e6ea064 100644 --- a/ckb-sdk/src/rpc/client.rs +++ b/ckb-sdk/src/rpc/client.rs @@ -1,8 +1,9 @@ use ckb_jsonrpc_types::{ BannedAddr, Block, BlockNumber, BlockReward, BlockTemplate, BlockView, CellOutputWithOutPoint, - CellTransaction, CellWithStatus, ChainInfo, EpochNumber, EpochView, HeaderView, LiveCell, - LocalNode, LockHashIndexState, OutPoint, PeerState, RemoteNode, Timestamp, Transaction, - TransactionWithStatus, TxPoolInfo, Uint64, Version, + CellTransaction, CellWithStatus, ChainInfo, EpochNumber, EpochView, ExtraLoggerConfig, + HeaderView, JsonBytes, LiveCell, LocalNode, LockHashIndexState, MainLoggerConfig, OutPoint, + PeerState, RemoteNode, Script, Timestamp, Transaction, TransactionWithStatus, TxPoolInfo, + Uint64, Version, }; use super::types; @@ -114,6 +115,10 @@ jsonrpc!(pub struct RawHttpRpcClient { absolute: Option, reason: Option ) -> (); + pub fn sync_state(&mut self) -> types::PeerSyncState; + pub fn set_network_active(&mut self, state: bool) -> (); + pub fn add_node(&mut self, peer_id: String, address: String) -> (); + pub fn remove_node(&mut self, peer_id: String) -> (); // Pool pub fn send_transaction(&mut self, tx: Transaction) -> H256; @@ -123,14 +128,21 @@ jsonrpc!(pub struct RawHttpRpcClient { pub fn get_blockchain_info(&mut self) -> ChainInfo; pub fn get_peers_state(&mut self) -> Vec; - // IntegrationTest - pub fn add_node(&mut self, peer_id: String, address: String) -> (); - pub fn remove_node(&mut self, peer_id: String) -> (); - pub fn broadcast_transaction(&mut self, tx: Transaction) -> H256; - // Miner pub fn get_block_template(&mut self, bytes_limit: Option, proposals_limit: Option, max_version: Option) -> BlockTemplate; pub fn submit_block(&mut self, _work_id: String, _data: Block) -> H256; + + // IntegrationTest + pub fn process_block_without_verify(&mut self, data: Block, broadcast: bool) -> Option; + pub fn truncate(&mut self, target_tip_hash: H256) -> (); + pub fn generate_block(&mut self, block_assembler_script: Option