diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 173e7a0..9026ef8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,9 +9,13 @@ jobs: steps: - uses: actions/checkout@v1 + - name: install rust format + run: rustup component add rustfmt + - name: check format + run: cargo fmt --all -- --check - name: Build run: cargo build - name: Install dependencies - run: cargo install --version 0.6.0 moleculec + run: cargo install --version 0.7.3 moleculec - name: Run tests run: cargo run -p tests diff --git a/Cargo.lock b/Cargo.lock index 26a37f1..dfa0507 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,49 +1,47 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "aead" -version = "0.3.2" +name = "ahash" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "generic-array 0.14.4", + "getrandom 0.2.7", + "once_cell", + "version_check", ] -[[package]] -name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ "winapi 0.3.9", ] [[package]] name = "anyhow" -version = "1.0.38" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" +checksum = "c794e162a5eff65c72ef524dfe393eb923c354e350bb78b9c7383df13f3bc142" [[package]] name = "ascii" @@ -53,15 +51,15 @@ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "async-compression" -version = "0.3.7" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72c1f1154e234325b50864a349b9c8e56939e266a4c307c0f159812df2f9537" +checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" dependencies = [ "bytes 0.5.6", "flate2", "futures-core", "memchr", - "pin-project-lite 0.2.4", + "pin-project-lite 0.2.9", ] [[package]] @@ -77,15 +75,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" - -[[package]] -name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" @@ -101,15 +93,15 @@ checksum = "58946044516aa9dc922182e0d6e9d124a31aafe6b421614654eb27cf90cec09c" [[package]] name = "bit-vec" -version = "0.5.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "blake2b-ref" @@ -119,99 +111,64 @@ checksum = "95916998c798756098a4eb1b3f2cd510659705a9817bf203d61abd30fbec3e7b" [[package]] name = "blake2b-rs" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e35e362830ef90ecea16f09b21b75d22d33a8562a679c74ab4f4fa49b4fcb87" +checksum = "a89a8565807f21b913288968e391819e7f9b2f0f46c7b89549c051cccf3a2771" dependencies = [ "cc", + "cty", ] [[package]] name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array 0.12.3", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "block-padding" -version = "0.1.5" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "byte-tools", + "generic-array", ] -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - [[package]] name = "bstr" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "memchr", ] [[package]] name = "bumpalo" -version = "3.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" - -[[package]] -name = "byte-tools" -version = "0.3.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" -dependencies = [ - "serde", -] [[package]] name = "bytes" -version = "1.0.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +dependencies = [ + "serde", +] [[package]] name = "cc" -version = "1.0.67" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" -dependencies = [ - "jobserver", -] +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -225,124 +182,69 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chacha20" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed8738f14471a99f0e316c327e68fc82a3611cc2895fcb604b89eedaf8f39d95" -dependencies = [ - "cipher", - "zeroize", -] - -[[package]] -name = "chacha20poly1305" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "zeroize", -] - [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "6127248204b9aba09a362f6c930ef6a78f2c1b2215f8a7b398c06e1083f17af0" dependencies = [ - "libc", + "js-sys", "num-integer", "num-traits", "time", + "wasm-bindgen", "winapi 0.3.9", ] [[package]] name = "chrono-tz" -version = "0.5.3" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2554a3155fec064362507487171dcc4edc3df60cb10f3a1fb10ed8094822b120" +checksum = "29c39203181991a7dd4343b8005bd804e7a9a37afb8ac070e43771e8c820bbde" dependencies = [ "chrono", - "parse-zoneinfo", -] - -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "ckb-app-config" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af401bb42d9a3340cc8f1c6ac903557c78001cd851e4102644798d435a649777" -dependencies = [ - "ckb-build-info", - "ckb-chain-spec", - "ckb-fee-estimator", - "ckb-jsonrpc-types", - "ckb-logger", - "ckb-logger-config", - "ckb-metrics-config", - "ckb-pow", - "ckb-resource", - "ckb-types", - "clap", - "path-clean", - "rand 0.6.5", - "serde", - "serde_plain", - "tentacle-multiaddr", - "tentacle-secio", - "toml", + "chrono-tz-build", + "phf 0.11.0", ] [[package]] -name = "ckb-async-runtime" -version = "0.39.1" +name = "chrono-tz-build" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "657a970f4849f2c65ae486ae4a06f1d030c1a56a0d03062ae5fd4f73654bbc01" +checksum = "6f509c3a87b33437b05e2458750a0700e5bdd6956176773e6c7d6dd15a283a0c" dependencies = [ - "ckb-logger", - "ckb-spawn", - "ckb-stop-handler", - "tokio", + "parse-zoneinfo", + "phf 0.11.0", + "phf_codegen 0.11.0", ] [[package]] -name = "ckb-build-info" -version = "0.39.1" +name = "ckb-always-success-script" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027dcb7d0c770d6a7e99cb63e51762f1c6952828f1d01d13f9f044c40a174aee" +checksum = "8b3b72a38c9920a29990df12002c4d069a147c8782f0c211f8a01b2df8f42bfd" [[package]] name = "ckb-capsule" -version = "0.4.6" +version = "0.8.0" dependencies = [ "anyhow", "bech32", "chrono", - "ckb-tool", + "ckb-testtool", "clap", "ctrlc", "env_logger", - "faster-hex 0.4.1", - "includedir 0.6.0", - "includedir_codegen 0.6.0", + "faster-hex", + "includedir", + "includedir_codegen", + "jsonrpc-core 17.1.0", "lazy_static", "log", "phf 0.8.0", + "reqwest 0.11.11", "rpassword", - "secp256k1 0.20.1", + "secp256k1", "serde", "serde_json", "serde_yaml", @@ -355,10 +257,11 @@ dependencies = [ [[package]] name = "ckb-chain-spec" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176d4cf36860bc689689e35769fc89518eec5e17a609c8a2df4ea6e5db253264" +checksum = "d9d7c40f6ede10a33d07bee585cf30b1d16588e60ccccc2ad134b6ce00ef10d8" dependencies = [ + "ckb-constant", "ckb-crypto", "ckb-dao-utils", "ckb-error", @@ -367,6 +270,7 @@ dependencies = [ "ckb-pow", "ckb-rational", "ckb-resource", + "ckb-traits", "ckb-types", "serde", "toml", @@ -374,79 +278,62 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a936e1a1478d71c8598637ff9e8305d56bbe1e928a90b6e223d66836a28110" +checksum = "6fe17832858b599109ac9cee6d9dcde419dad958a1982d6e37eb97fedb0ef5e6" dependencies = [ - "crossbeam-channel 0.3.9", + "crossbeam-channel", ] +[[package]] +name = "ckb-constant" +version = "0.104.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92a4ba4a395a9e50a7179e08252276b183310c32c24dfc8b521925fdf8a9afa0" + [[package]] name = "ckb-crypto" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64756fe43008f0d97bae38b0a9fd2d527ddbba5107cb38a368922e83de53bb4" +checksum = "1a600bb463e6d72acb85c0ba821b106a1710855a52737b434a4afd6fcbab0e55" dependencies = [ "ckb-fixed-hash", - "faster-hex 0.4.1", + "faster-hex", "lazy_static", - "rand 0.6.5", - "secp256k1 0.19.0", + "rand 0.7.3", + "secp256k1", "thiserror", ] [[package]] name = "ckb-dao" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce7fa333b5f7a1381e8f44786f0d8d5227478fd090e553f5cad98240fe0cf25" +checksum = "a43f31909ad4da633f92af306fa179f2cb52ba5618e77fc6954e10b17734a0c3" dependencies = [ "byteorder", "ckb-chain-spec", "ckb-dao-utils", - "ckb-error", - "ckb-store", "ckb-traits", "ckb-types", ] [[package]] name = "ckb-dao-utils" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66634d0c64d13d17ceed6cb4fa58df65f6c77e9f6055539c2c8a5e1685a3f5ea" +checksum = "ac8bee17950819b550031c81b4200e1e6eddc364c5aab16d5fc9407d2035c775" dependencies = [ "byteorder", "ckb-error", "ckb-types", ] -[[package]] -name = "ckb-db" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5611f67a4d5c0c9181ed2401c9da4be37a22e3d6b575b1928b1a1c550804b52b" -dependencies = [ - "ckb-app-config", - "ckb-db-schema", - "ckb-error", - "ckb-logger", - "ckb-rocksdb", - "libc", - "tempfile", -] - -[[package]] -name = "ckb-db-schema" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9df68e18e8e96f5ec2738ba061fcd3070b4e85ff656c7aa6c10253f70e666bf" - [[package]] name = "ckb-error" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc02c2c1a503d987358f8ad20d204c92a7df3fd36ca2e59850a704f1a850cbd2" +checksum = "73dc4bb1f4c889f42edc9509005aa593ca1b88b6f43f9cfbd59c6d4897994783" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -454,22 +341,11 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ckb-fee-estimator" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ee22ecb814a54cd52e60dd099df8e8e9e95dc54eff6a542025b590cbc89dc1" -dependencies = [ - "ckb-logger", - "ckb-types", - "serde", -] - [[package]] name = "ckb-fixed-hash" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20731ac8621f23fce74250162f40bb4dd4dc60c49de7aab6b222ee67c34b6dc6" +checksum = "8183ed12fd0fff3abfb142d3dde7b501f211519e2b77972c64815e00d38c8ed3" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -477,20 +353,20 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05178965b0039edcdc3b9b1f9484713f4b0029d14b9a746e17182faca3d02135" +checksum = "01e9a8f69f7174ce9f9b6045a82aafb2ceafc2aa6eedffa0562e0d6defaa4732" dependencies = [ - "faster-hex 0.4.1", + "faster-hex", "serde", "thiserror", ] [[package]] name = "ckb-fixed-hash-macros" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16a3185c5089f6be8b8573044b371778cbb508de171fc1399caddecb66d03e5" +checksum = "0f73281677e79cd8cbd873b86701209d560038549823e915cb3505d1b348f0a6" dependencies = [ "ckb-fixed-hash-core", "proc-macro2", @@ -500,9 +376,9 @@ dependencies = [ [[package]] name = "ckb-hash" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa5d974dec2e3e08aca1d9f6162ea8fb5f1c62f915a2862e105e0383acd6555c" +checksum = "ac70ef20b9dac406f06bead70c0a2e4742205234f58051885e6ae1f50786e6be" dependencies = [ "blake2b-ref", "blake2b-rs", @@ -510,61 +386,30 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4877f7a0c8ef2af8d770cea24655828f20e9d956f3fc80652eb8937be2bd5c5" +checksum = "520d1cc13b7d5ea93a2b9a28362555410e6621e8141eb1289a0547e0c5ef6e46" dependencies = [ "ckb-types", - "faster-hex 0.4.1", - "jsonrpc-core", + "faster-hex", "serde", "serde_json", ] -[[package]] -name = "ckb-librocksdb-sys" -version = "6.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995341a6dea5f0d8ff4570bebbde3691349842d2c671472e09ea2ee2e3e0b083" -dependencies = [ - "cc", - "glob", - "libc", -] - [[package]] name = "ckb-logger" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fab1e2ad6cb9fa49e8c18f74dff07284f45ea9020f67f8d545015adee190ca9" -dependencies = [ - "log", -] - -[[package]] -name = "ckb-logger-config" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cac35cd235547b83bff7726d3eaf37baff6bd2305f5ed39330d2039e3450c7" -dependencies = [ - "serde", -] - -[[package]] -name = "ckb-metrics-config" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2eb8ad61f3466b0168fb869744e44dba4d5c8f26d96de8920f1103eeed1c24" +checksum = "d6839e2ab382fa92f3d3cb71d18d55a0c65965d54674dd5e375854bf07248ae6" dependencies = [ "log", - "serde", ] [[package]] name = "ckb-occupied-capacity" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da8163d7b8a9bd8d32a7a7e0b9f27a7ca9c2181e07f800c5ad15fe5470f6e3bc" +checksum = "2f0e4ccbc2b6af791b589a09db77518fb2b0fa79a72ba568e6a7dade7e935721" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -572,18 +417,18 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef61317d703c949451bf1a6880ceda8ad611b5223a706a85172149a9402292ee" +checksum = "773a03d5c3cf71d5f9b0e620b193fdd82a3e1f3434022792a32a8b4037550fa1" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d4a64b3fbe806b1070c560689053374b3ef215824e5439e525913ecd26a6d0" +checksum = "dfcfb1f9f3812fd5e306d88f0a3683cdf9e8350f5a79c3288e835b8355425635" dependencies = [ "ckb-occupied-capacity-core", "quote", @@ -592,9 +437,9 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d67e66fd31a7c8ace07137aef767755b9b0679bf3f757fa05500b4d63c8e3b81" +checksum = "a4c09ed8c7588b6722bfba5c1df618943bccab49904fd2e0f4a8b7b978f55731" dependencies = [ "byteorder", "ckb-hash", @@ -606,9 +451,9 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9923a5f788bc805afc047182c07f7e661bd789a3d291138f68b62bcaab20a05f" +checksum = "a70041296dc87341c1993ff3c12268937bb998145b49afc5c299a764dc9ed12a" dependencies = [ "numext-fixed-uint", "serde", @@ -616,50 +461,24 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd0effa2cab347bd3955cb965340b17bc907d76a7845228105f7c509f4a0bd4" +checksum = "c45669446b51b6336f407044c1940cb31d709c09638fe4c2b34d6910d7d55f13" dependencies = [ "ckb-system-scripts", "ckb-types", - "includedir 0.5.0", - "includedir_codegen 0.5.0", - "phf 0.7.24", + "includedir", + "includedir_codegen", + "phf 0.8.0", "serde", - "tempfile", "walkdir", ] -[[package]] -name = "ckb-reward-calculator" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f372728f0bf2c84a9c0f0f70dc54d088f8526516a89c05d9330f1a5c02fd9b" -dependencies = [ - "ckb-chain-spec", - "ckb-dao", - "ckb-error", - "ckb-logger", - "ckb-store", - "ckb-types", -] - -[[package]] -name = "ckb-rocksdb" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809a3a50c82a5fd7429c5141e64d8c4c37451ceb25fe3b51fce7fd5d929ad521" -dependencies = [ - "ckb-librocksdb-sys", - "libc", - "tempfile", -] - [[package]] name = "ckb-script" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf96863a12f90cdfd78afd55f4147514a6c2b74b92b18cd17419ad1caacdc66" +checksum = "b75232e549f5b4eba2442eaca5232ab87a9deee54bfb1c9761f00b9978f17365" dependencies = [ "byteorder", "ckb-chain-spec", @@ -669,67 +488,30 @@ dependencies = [ "ckb-traits", "ckb-types", "ckb-vm", - "ckb-vm-definitions", - "faster-hex 0.4.1", - "goblin", + "faster-hex", "serde", ] -[[package]] -name = "ckb-spawn" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645bf535532192a4f69e1ab12d87633b817d4389a060dd3a26baef8c7c5ca4c6" - -[[package]] -name = "ckb-stop-handler" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdeffad3f320711ab1aa20749fda671214b77f9bfa65f0c602e7cfd03f9bbe7d" -dependencies = [ - "ckb-channel", - "ckb-logger", - "futures 0.1.30", - "parking_lot", - "tokio", -] - -[[package]] -name = "ckb-store" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaaf6ef0db61e18bb9d6b100e21a7694dbe900c03ba0192a38d2f81775165073" -dependencies = [ - "ckb-app-config", - "ckb-chain-spec", - "ckb-db", - "ckb-db-schema", - "ckb-error", - "ckb-traits", - "ckb-types", - "ckb-util", - "lru", -] - [[package]] name = "ckb-system-scripts" -version = "0.5.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261dd95a93c09ea24397c85b4fbca061e1da2d6573189749aeb99fe840aaf0c9" +checksum = "fa5c59063142de7a68cfad4449c6b3863563856219a2925dfb8c5f019ec2aa47" dependencies = [ "blake2b-rs", - "faster-hex 0.3.1", - "includedir 0.5.0", - "includedir_codegen 0.5.0", - "phf 0.7.24", + "faster-hex", + "includedir", + "includedir_codegen", + "phf 0.8.0", ] [[package]] -name = "ckb-tool" -version = "0.3.0" +name = "ckb-testtool" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9c66e7025f8b3d5dd9ca93cd5c6bbe3da8e9efc1f44218558d47216740798e3" +checksum = "703aaa11e6b29154b78a52feb259329d7dadba5401b0cebd13f0356bdd5c6999" dependencies = [ + "ckb-always-success-script", "ckb-chain-spec", "ckb-crypto", "ckb-error", @@ -740,106 +522,103 @@ dependencies = [ "ckb-traits", "ckb-types", "ckb-verification", - "faster-hex 0.4.1", - "serde", - "serde_derive", - "serde_json", - "simple-jsonrpc-client", + "ckb-vm-definitions", + "lazy_static", + "linked_hash_set", + "rand 0.7.3", ] [[package]] name = "ckb-traits" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf82d86c73053824af004e1777c3e19e72f70f1da1757370ac1cef9077f63b15" +checksum = "50acf0a06a8d1f32e1c5cf4638ad97e0d94a61ae2ca4dab797b40cb602e2260a" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4280fb735841fe17b9ef8902e7efc4c4d75084e58bebcb3be2960b4f1111aa23" +checksum = "e9ba3e13c93900267bc9670b3ea4379eab1a234c7cb470fcd6856640f165e2af" dependencies = [ "bit-vec", - "bytes 0.5.6", + "bytes 1.2.1", "ckb-channel", "ckb-error", "ckb-fixed-hash", "ckb-hash", "ckb-occupied-capacity", "ckb-rational", + "derive_more", "merkle-cbt", "molecule", "numext-fixed-uint", "once_cell", ] -[[package]] -name = "ckb-util" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec466af99019b00dabc4f5993753da20190f58d1912ca38d2e7c158fc41341c" -dependencies = [ - "linked-hash-map", - "parking_lot", - "regex", -] - [[package]] name = "ckb-verification" -version = "0.39.1" +version = "0.104.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031e27b63d4aa4c5351cbef853aa538a847e80a1e19c2922078d31a2272f6c15" +checksum = "940acea7bc1cb74529219a4366879f12b8c11029393f23575e8a41a7d59b5d8b" dependencies = [ - "ckb-async-runtime", "ckb-chain-spec", "ckb-dao", "ckb-dao-utils", "ckb-error", - "ckb-logger", "ckb-pow", - "ckb-reward-calculator", "ckb-script", - "ckb-store", "ckb-traits", "ckb-types", + "ckb-verification-traits", "derive_more", "faketime", "lru", - "rayon", - "tokio", +] + +[[package]] +name = "ckb-verification-traits" +version = "0.104.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42dda3f885786628c743c43289c259d765dc33d82a1ebd3fdaeca913618f54c4" +dependencies = [ + "bitflags", + "ckb-error", ] [[package]] name = "ckb-vm" -version = "0.19.3" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc2fb181a6653bb13315dc7f60fbe32cd3d697553b24687613da984faf2a2c5" +checksum = "dc81aeacb7eaa4981e4c4f8285e30bca92f8d7346937cbcfc0b77f26b21da2de" dependencies = [ "byteorder", - "bytes 0.5.6", + "bytes 1.2.1", "cc", "ckb-vm-definitions", "derive_more", - "goblin", + "goblin 0.2.3", + "goblin 0.4.0", "libc", "mapr", + "rand 0.7.3", "scroll", + "serde", ] [[package]] name = "ckb-vm-definitions" -version = "0.19.3" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea76d3867d00736c64876ab0cd304be73691b91990a90ebbf100d36af85fdb05" +checksum = "7968c559498b68833791364e87182fdd1a3aba803e8a16c34b1aa45fc08add1c" [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", @@ -850,15 +629,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "combine" version = "3.8.1" @@ -872,11 +642,17 @@ dependencies = [ "unreachable", ] +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "core-foundation" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -884,138 +660,84 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" - -[[package]] -name = "cpuid-bool" -version = "0.1.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] -name = "cpuid-bool" -version = "0.2.0" +name = "cpufeatures" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "crossbeam-channel" -version = "0.3.9" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "crossbeam-utils 0.6.6", + "cfg-if 1.0.0", + "crossbeam-utils", ] [[package]] -name = "crossbeam-channel" -version = "0.5.0" +name = "crossbeam-utils" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.2", + "once_cell", ] [[package]] -name = "crossbeam-deque" -version = "0.8.0" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils 0.8.2", + "generic-array", + "typenum", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.2" +name = "ctrlc" +version = "3.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d60ab4a8dba064f2fbb5aa270c28da5cf4bbd0e72dae1140a6b0353a779dbe00" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.2", - "lazy_static", - "loom", - "memoffset", - "scopeguard 1.1.0", -] - -[[package]] -name = "crossbeam-utils" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" -dependencies = [ - "cfg-if 0.1.10", - "lazy_static", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae8f328835f8f5a6ceb6a7842a7f2d0c03692adb5c889347235d59194731fe3" -dependencies = [ - "autocfg 1.0.1", - "cfg-if 1.0.0", - "lazy_static", - "loom", -] - -[[package]] -name = "crypto-mac" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] - -[[package]] -name = "ctrlc" -version = "3.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b57a92e9749e10f25a171adcebfafe72991d45e7ec2dcb853e8f83d9dafaeb08" +checksum = "b37feaa84e6861e00a1f5e5aa8da3ee56d605c9992d33e082786754828e20865" dependencies = [ "nix", "winapi 0.3.9", ] [[package]] -name = "curve25519-dalek" -version = "3.0.2" +name = "cty" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f627126b946c25a4638eec0ea634fc52506dea98db118aae985118ce7c3d723f" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "derive_more" -version = "0.99.11" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version", "syn", ] @@ -1027,28 +749,14 @@ checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" [[package]] name = "digest" -version = "0.8.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "generic-array 0.12.3", + "block-buffer", + "crypto-common", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "dtoa" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" - [[package]] name = "eaglesong" version = "0.1.0" @@ -1057,15 +765,15 @@ checksum = "8d978bd5d343e8ab9b5c0fc8d93ff9c602fdc96616ffff9c05ac7a155419b824" [[package]] name = "either" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" [[package]] name = "encoding_rs" -version = "0.8.28" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ "cfg-if 1.0.0", ] @@ -1083,12 +791,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "faketime" version = "0.2.1" @@ -1101,25 +803,26 @@ dependencies = [ [[package]] name = "faster-hex" -version = "0.3.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b8cccaafb5aae8c282692e5590f341925edea6c696e8715ff0d973320b2646" +checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" [[package]] -name = "faster-hex" -version = "0.4.1" +name = "fastrand" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348138dd23e03bb0018caef99647fb1a5befec5ff4b501991de88f09854d4c28" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] [[package]] name = "flate2" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if 1.0.0", "crc32fast", - "libc", "miniz_oxide", ] @@ -1154,12 +857,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -1178,15 +875,15 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -1199,9 +896,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -1209,15 +906,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -1226,17 +923,16 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-macro" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -1244,24 +940,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" -dependencies = [ - "once_cell", -] +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-util" -version = "0.3.12" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ "futures-channel", "futures-core", @@ -1270,40 +963,16 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.4", + "pin-project-lite 0.2.9", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] -[[package]] -name = "generator" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cdc09201b2e8ca1b19290cf7e65de2246b8e91fb6874279722189c4de7b94dc" -dependencies = [ - "cc", - "libc", - "log", - "rustc_version", - "winapi 0.3.9", -] - [[package]] name = "generic-array" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -1316,34 +985,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "glob" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" - [[package]] name = "globset" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" +checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" dependencies = [ "aho-corasick", "bstr", @@ -1374,6 +1035,17 @@ dependencies = [ "scroll", ] +[[package]] +name = "goblin" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "532a09cd3df2c6bbfc795fb0434bff8f22255d1d07328180e918a2e6ce122d4d" +dependencies = [ + "log", + "plain", + "scroll", +] + [[package]] name = "h2" version = "0.2.7" @@ -1388,17 +1060,36 @@ dependencies = [ "http", "indexmap", "slab", - "tokio", - "tokio-util", + "tokio 0.2.25", + "tokio-util 0.3.1", "tracing", "tracing-futures", ] +[[package]] +name = "h2" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +dependencies = [ + "bytes 1.2.1", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio 1.20.1", + "tokio-util 0.7.3", + "tracing", +] + [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] @@ -1414,32 +1105,22 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] -[[package]] -name = "hmac" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - [[package]] name = "http" -version = "0.2.3" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes 1.0.1", + "bytes 1.2.1", "fnv", - "itoa", + "itoa 1.0.3", ] [[package]] @@ -1452,11 +1133,22 @@ dependencies = [ "http", ] +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes 1.2.1", + "http", + "pin-project-lite 0.2.9", +] + [[package]] name = "httparse" -version = "1.3.5" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" [[package]] name = "httpdate" @@ -1464,11 +1156,17 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + [[package]] name = "humansize" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" +checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" [[package]] name = "humantime" @@ -1489,15 +1187,39 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.2.7", "http", - "http-body", + "http-body 0.3.1", "httparse", - "httpdate", - "itoa", + "httpdate 0.3.2", + "itoa 0.4.8", "pin-project", - "socket2", - "tokio", + "socket2 0.3.19", + "tokio 0.2.25", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "0.14.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +dependencies = [ + "bytes 1.2.1", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.13", + "http", + "http-body 0.4.5", + "httparse", + "httpdate 1.0.2", + "itoa 1.0.3", + "pin-project-lite 0.2.9", + "socket2 0.4.4", + "tokio 1.20.1", "tower-service", "tracing", "want", @@ -1510,17 +1232,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" dependencies = [ "bytes 0.5.6", - "hyper", + "hyper 0.13.10", "native-tls", - "tokio", + "tokio 0.2.25", "tokio-tls", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes 1.2.1", + "hyper 0.14.20", + "native-tls", + "tokio 1.20.1", + "tokio-native-tls", +] + [[package]] name = "idna" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ "matches", "unicode-bidi", @@ -1529,11 +1264,11 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b287fb45c60bb826a0dc68ff08742b9d88a2fea13d6e0c286b3172065aaf878c" +checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" dependencies = [ - "crossbeam-utils 0.8.2", + "crossbeam-utils", "globset", "lazy_static", "log", @@ -1545,16 +1280,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "includedir" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97402f770a519ebea51b27131c3b6558cfd2375aff21294bad806bad91bf0b6" -dependencies = [ - "flate2", - "phf 0.7.24", -] - [[package]] name = "includedir" version = "0.6.0" @@ -1565,17 +1290,6 @@ dependencies = [ "phf 0.8.0", ] -[[package]] -name = "includedir_codegen" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7d542be113fd84855692fb536c16cc4c09527724d1dca8953047d71cccadef" -dependencies = [ - "flate2", - "phf_codegen 0.7.24", - "walkdir", -] - [[package]] name = "includedir_codegen" version = "0.6.0" @@ -1589,14 +1303,23 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ - "autocfg 1.0.1", + "autocfg", "hashbrown", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "iovec" version = "0.1.4" @@ -1608,30 +1331,27 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itoa" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] -name = "jobserver" -version = "0.1.21" +name = "itoa" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" -dependencies = [ - "libc", -] +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" [[package]] name = "js-sys" -version = "0.3.47" +version = "0.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" +checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" dependencies = [ "wasm-bindgen", ] @@ -1642,7 +1362,22 @@ version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62" dependencies = [ - "futures 0.1.30", + "futures 0.1.31", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "jsonrpc-core" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4467ab6dfa369b69e52bd0692e480c4d117410538526a57a304a0f2250fd95e" +dependencies = [ + "futures 0.3.21", + "futures-executor", + "futures-util", "log", "serde", "serde_derive", @@ -1667,62 +1402,43 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.86" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" +checksum = "505e71a4706fa491e9b1b55f51b95d4037d0821ee40131190475f692b35b009b" [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] -name = "lock_api" -version = "0.1.5" +name = "linked_hash_set" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" dependencies = [ - "owning_ref", - "scopeguard 0.3.3", + "linked-hash-map", ] [[package]] name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", - "serde", -] - -[[package]] -name = "loom" -version = "0.4.0" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44c73b4636e497b4917eb21c33539efa3816741a2d3ff26c6316f1b529481a4" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if 1.0.0", - "generator", - "scoped-tls", ] [[package]] name = "lru" -version = "0.6.5" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f374d42cdfc1d7dbf3d3dec28afab2eb97ffbf43a3234d795b5986dbf4b90ba" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" dependencies = [ "hashbrown", ] -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - [[package]] name = "mapr" version = "0.8.0" @@ -1735,38 +1451,23 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "memchr" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" - -[[package]] -name = "memoffset" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" -dependencies = [ - "autocfg 1.0.1", -] +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "merkle-cbt" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1ac8428ec02d6caa5a79c15e851d84d5dc7a00df0429a8aa860d104f0a81be" +checksum = "171d2f700835121c3b04ccf0880882987a050fd5c7ae88148abf537d33dd3a56" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", ] [[package]] @@ -1777,9 +1478,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", @@ -1787,12 +1488,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.3" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", - "autocfg 1.0.1", ] [[package]] @@ -1808,33 +1508,22 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow 0.2.2", + "miow", "net2", "slab", "winapi 0.2.8", ] [[package]] -name = "mio-named-pipes" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" -dependencies = [ - "log", - "mio", - "miow 0.3.6", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" +name = "mio" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ - "iovec", "libc", - "mio", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] @@ -1849,32 +1538,22 @@ dependencies = [ "ws2_32-sys", ] -[[package]] -name = "miow" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" -dependencies = [ - "socket2", - "winapi 0.3.9", -] - [[package]] name = "molecule" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "663f76cc52219e5957e2f5563cce9d89f98aa8503c9c898b5c412d97df663998" +checksum = "edc8276c02a006bddad7d1c28c1a88f30421e1b5f0ba0ca96ceb8077c7d20c01" dependencies = [ - "bytes 0.5.6", - "cfg-if 0.1.10", - "faster-hex 0.4.1", + "bytes 1.2.1", + "cfg-if 1.0.0", + "faster-hex", ] [[package]] name = "native-tls" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ "lazy_static", "libc", @@ -1901,40 +1580,39 @@ dependencies = [ [[package]] name = "nix" -version = "0.18.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" dependencies = [ "bitflags", - "cc", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -1988,85 +1666,53 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "openssl" -version = "0.10.32" +version = "0.10.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" +checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" dependencies = [ "bitflags", "cfg-if 1.0.0", "foreign-types", - "lazy_static", "libc", + "once_cell", + "openssl-macros", "openssl-sys", ] [[package]] -name = "openssl-probe" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" - -[[package]] -name = "openssl-sys" -version = "0.9.60" +name = "openssl-macros" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "autocfg 1.0.1", - "cc", - "libc", - "pkg-config", - "vcpkg", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "owning_ref" -version = "0.4.1" +name = "openssl-probe" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] -name = "parking_lot" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.4.0" +name = "openssl-sys" +version = "0.9.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" dependencies = [ + "autocfg", + "cc", "libc", - "rand 0.6.5", - "rustc_version", - "smallvec", - "winapi 0.3.9", + "pkg-config", + "vcpkg", ] [[package]] @@ -2078,12 +1724,6 @@ dependencies = [ "regex", ] -[[package]] -name = "path-clean" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" - [[package]] name = "percent-encoding" version = "2.1.0" @@ -2092,18 +1732,19 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pest" -version = "2.1.3" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +checksum = "69486e2b8c2d2aeb9762db7b4e00b0331156393555cff467f4163ff06821eef8" dependencies = [ + "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +checksum = "b13570633aff33c6d22ce47dd566b10a3b9122c2fe9d8e7501895905be532b91" dependencies = [ "pest", "pest_generator", @@ -2111,9 +1752,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.1.3" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +checksum = "b3c567e5702efdc79fb18859ea74c3eb36e14c43da7b8c1f098a4ed6514ec7a0" dependencies = [ "pest", "pest_meta", @@ -2124,24 +1765,15 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.1.3" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +checksum = "5eb32be5ee3bbdafa8c7a18b0a8a8d962b66cfa2ceee4037f49267a50ee821fe" dependencies = [ - "maplit", + "once_cell", "pest", "sha-1", ] -[[package]] -name = "phf" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" -dependencies = [ - "phf_shared 0.7.24", -] - [[package]] name = "phf" version = "0.8.0" @@ -2152,13 +1784,12 @@ dependencies = [ ] [[package]] -name = "phf_codegen" -version = "0.7.24" +name = "phf" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" +checksum = "4724fa946c8d1e7cd881bd3dbee63ce32fc1e9e191e35786b3dc1320a3f68131" dependencies = [ - "phf_generator 0.7.24", - "phf_shared 0.7.24", + "phf_shared 0.11.0", ] [[package]] @@ -2172,13 +1803,13 @@ dependencies = [ ] [[package]] -name = "phf_generator" -version = "0.7.24" +name = "phf_codegen" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" +checksum = "32ba0c43d7a1b6492b2924a62290cfd83987828af037b0743b38e6ab092aee58" dependencies = [ - "phf_shared 0.7.24", - "rand 0.6.5", + "phf_generator 0.11.0", + "phf_shared 0.11.0", ] [[package]] @@ -2192,12 +1823,13 @@ dependencies = [ ] [[package]] -name = "phf_shared" -version = "0.7.24" +name = "phf_generator" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" +checksum = "5b450720b6f75cfbfabc195814bd3765f337a4f9a83186f8537297cac12f6705" dependencies = [ - "siphasher 0.2.3", + "phf_shared 0.11.0", + "rand 0.8.5", ] [[package]] @@ -2206,23 +1838,33 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" dependencies = [ - "siphasher 0.3.3", + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd5609d4b2df87167f908a32e1b146ce309c16cf35df76bc11f440b756048e4" +dependencies = [ + "siphasher", + "uncased", ] [[package]] name = "pin-project" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" +checksum = "78203e83c48cffbe01e4a2d35d566ca4de445d79a85372fc64e378bfc812a260" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" +checksum = "710faf75e1b33345361201d36d04e98ac1ed8909151a017ed384700836104c74" dependencies = [ "proc-macro2", "quote", @@ -2231,15 +1873,15 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.4" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -2249,9 +1891,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plain" @@ -2259,41 +1901,19 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" -[[package]] -name = "poly1305" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8" -dependencies = [ - "cpuid-bool 0.2.0", - "universal-hash", -] - [[package]] name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -2304,32 +1924,13 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.9" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg 0.1.2", - "rand_xorshift", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" @@ -2340,30 +1941,19 @@ dependencies = [ "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc 0.2.0", - "rand_pcg 0.2.1", + "rand_hc", + "rand_pcg", ] [[package]] name = "rand" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", - "rand_hc 0.3.0", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", + "rand_chacha 0.3.1", + "rand_core 0.6.3", ] [[package]] @@ -2378,29 +1968,14 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.2", -] - -[[package]] -name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "rand_core 0.4.2", + "ppv-lite86", + "rand_core 0.6.3", ] -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -2412,20 +1987,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.2", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "rand_core 0.3.1", + "getrandom 0.2.7", ] [[package]] @@ -2437,59 +2003,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core 0.6.2", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - [[package]] name = "rand_pcg" version = "0.2.1" @@ -2499,75 +2012,31 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rayon" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" -dependencies = [ - "autocfg 1.0.1", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" -dependencies = [ - "crossbeam-channel 0.5.0", - "crossbeam-deque", - "crossbeam-utils 0.8.2", - "lazy_static", - "num_cpus", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redox_syscall" -version = "0.2.5" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.4.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remove_dir_all" @@ -2591,9 +2060,9 @@ dependencies = [ "futures-core", "futures-util", "http", - "http-body", - "hyper", - "hyper-tls", + "http-body 0.3.1", + "hyper 0.13.10", + "hyper-tls 0.4.3", "ipnet", "js-sys", "lazy_static", @@ -2602,32 +2071,54 @@ dependencies = [ "mime_guess", "native-tls", "percent-encoding", - "pin-project-lite 0.2.4", + "pin-project-lite 0.2.9", "serde", "serde_json", "serde_urlencoded", - "tokio", + "tokio 0.2.25", "tokio-tls", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", + "winreg 0.7.0", +] + +[[package]] +name = "reqwest" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" +dependencies = [ + "base64", + "bytes 1.2.1", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.13", + "http", + "http-body 0.4.5", + "hyper 0.14.20", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite 0.2.9", + "serde", + "serde_json", + "serde_urlencoded", + "tokio 1.20.1", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.10.1", ] [[package]] @@ -2642,18 +2133,18 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "same-file" @@ -2666,32 +2157,14 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi 0.3.9", + "windows-sys", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - [[package]] name = "scroll" version = "0.10.2" @@ -2714,45 +2187,27 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6179428c22c73ac0fbb7b5579a56353ce78ba29759b3b8575183336ea74cdfb" -dependencies = [ - "secp256k1-sys 0.3.0", -] - -[[package]] -name = "secp256k1" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733b114f058f260c0af7591434eef4272ae1a8ec2751766d3cb89c6df8d5e450" +checksum = "97d03ceae636d0fed5bae6a7f4f664354c5f4fcedf6eef053fef17e49f837d0a" dependencies = [ - "secp256k1-sys 0.4.0", + "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11553d210db090930f4432bea123b31f70bbf693ace14504ea2a35e796c28dd2" -dependencies = [ - "cc", -] - -[[package]] -name = "secp256k1-sys" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e4b6455ee49f5901c8985b88f98fb0a0e1d90a6661f5a03f4888bd987dad29" +checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" dependencies = [ "cc", ] [[package]] name = "security-framework" -version = "2.0.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", @@ -2763,9 +2218,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.0.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -2773,33 +2228,24 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" [[package]] name = "serde" -version = "1.0.123" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" +checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.123" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" +checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e" dependencies = [ "proc-macro2", "quote", @@ -2808,80 +2254,48 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.62" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" +checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" dependencies = [ - "itoa", + "itoa 1.0.3", "ryu", "serde", ] -[[package]] -name = "serde_plain" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625fb0da2b006092b426a94acc1611bec52f2ec27bb27b266a9f93c29ee38eda" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.3", "ryu", "serde", ] [[package]] name = "serde_yaml" -version = "0.8.17" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15654ed4ab61726bf918a39cb8d98a2e2995b002387807fa6ba58fdf7f59bb23" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ - "dtoa", - "linked-hash-map", + "indexmap", + "ryu", "serde", "yaml-rust", ] [[package]] name = "sha-1" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha2" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" +checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool 0.1.2", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "signal-hook-registry" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" -dependencies = [ - "libc", + "cpufeatures", + "digest", ] [[package]] @@ -2890,29 +2304,26 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b737e351dd079e177a314959477627f53a6f928ec0ce37ded275e8363772c7c0" dependencies = [ - "jsonrpc-core", - "reqwest", + "jsonrpc-core 14.2.0", + "reqwest 0.10.10", "serde", "serde_json", ] [[package]] name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" - -[[package]] -name = "siphasher" -version = "0.3.3" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.2" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] [[package]] name = "slug" @@ -2923,15 +2334,6 @@ dependencies = [ "deunicode", ] -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "socket2" version = "0.3.19" @@ -2944,16 +2346,14 @@ dependencies = [ ] [[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "socket2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +dependencies = [ + "libc", + "winapi 0.3.9", +] [[package]] name = "strsim" @@ -2961,92 +2361,36 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -[[package]] -name = "subtle" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" - [[package]] name = "syn" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "synstructure" -version = "0.12.4" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" dependencies = [ "proc-macro2", "quote", - "syn", - "unicode-xid", + "unicode-ident", ] [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if 1.0.0", + "fastrand", "libc", - "rand 0.8.3", "redox_syscall", "remove_dir_all", "winapi 0.3.9", ] -[[package]] -name = "tentacle-multiaddr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6476818af8d86ba63c7f961c417c70906700166dd8fdef8b9ac7f47c629f3f" -dependencies = [ - "bs58", - "bytes 0.5.6", - "serde", - "sha2", - "unsigned-varint", -] - -[[package]] -name = "tentacle-secio" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033cf53caf3f02001269687a9aa9c871e7379deba3d88a02b95faf9a6de4397" -dependencies = [ - "bs58", - "bytes 0.5.6", - "chacha20poly1305", - "futures 0.3.12", - "hmac", - "log", - "molecule", - "openssl", - "openssl-sys", - "rand 0.7.3", - "ring", - "secp256k1 0.19.0", - "sha2", - "tokio", - "tokio-util", - "unsigned-varint", - "x25519-dalek", -] - [[package]] name = "tera" -version = "1.6.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac6ab7eacf40937241959d540670f06209c38ceadb62116999db4a950fbf8dc" +checksum = "7c9783d6ff395ae80cf17ed9a25360e7ba37742a79fa8fddabb073c5c7c8856d" dependencies = [ "chrono", "chrono-tz", @@ -3056,7 +2400,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand 0.8.3", + "rand 0.8.5", "regex", "serde", "serde_json", @@ -3066,9 +2410,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] @@ -3091,18 +2435,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.24" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" +checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.24" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" +checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" dependencies = [ "proc-macro2", "quote", @@ -3111,28 +2455,29 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[package]] name = "tinyvec" -version = "1.1.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -3154,28 +2499,39 @@ dependencies = [ "futures-core", "iovec", "lazy_static", - "libc", "memchr", - "mio", - "mio-named-pipes", - "mio-uds", + "mio 0.6.23", "num_cpus", - "pin-project-lite 0.1.11", - "signal-hook-registry", + "pin-project-lite 0.1.12", "slab", - "tokio-macros", +] + +[[package]] +name = "tokio" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" +dependencies = [ + "autocfg", + "bytes 1.2.1", + "libc", + "memchr", + "mio 0.8.4", + "num_cpus", + "once_cell", + "pin-project-lite 0.2.9", + "socket2 0.4.4", "winapi 0.3.9", ] [[package]] -name = "tokio-macros" -version = "0.2.6" +name = "tokio-native-tls" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ - "proc-macro2", - "quote", - "syn", + "native-tls", + "tokio 1.20.1", ] [[package]] @@ -3185,7 +2541,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" dependencies = [ "native-tls", - "tokio", + "tokio 0.2.25", ] [[package]] @@ -3198,15 +2554,29 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project-lite 0.1.11", - "tokio", + "pin-project-lite 0.1.12", + "tokio 0.2.25", +] + +[[package]] +name = "tokio-util" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" +dependencies = [ + "bytes 1.2.1", + "futures-core", + "futures-sink", + "pin-project-lite 0.2.9", + "tokio 1.20.1", + "tracing", ] [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] @@ -3224,29 +2594,29 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.24" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f77d3842f76ca899ff2dbcf231c5c65813dea431301d6eb686279c15c4464f12" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.4", + "pin-project-lite 0.2.9", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -3267,15 +2637,24 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "typenum" -version = "1.12.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "ucd-trie" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" + +[[package]] +name = "uncased" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" +dependencies = [ + "version_check", +] [[package]] name = "unic-char-property" @@ -3338,43 +2717,30 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" [[package]] name = "unicode-normalization" -version = "0.1.17" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" +checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "universal-hash" -version = "0.4.0" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unreachable" @@ -3385,23 +2751,11 @@ dependencies = [ "void", ] -[[package]] -name = "unsigned-varint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f67332660eb59a6f1eb24ff1220c9e8d01738a8503c6002e30bcfe4bd9f2b4a9" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "url" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", "idna", @@ -3421,9 +2775,9 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vec_map" @@ -3433,9 +2787,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "void" @@ -3445,9 +2799,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "walkdir" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", "winapi 0.3.9", @@ -3472,15 +2826,21 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.70" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" +checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" dependencies = [ "cfg-if 1.0.0", "serde", @@ -3490,13 +2850,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.70" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" +checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -3505,9 +2865,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.20" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94" +checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3517,9 +2877,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.70" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" +checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3527,9 +2887,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.70" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" +checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" dependencies = [ "proc-macro2", "quote", @@ -3540,15 +2900,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.70" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" +checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" [[package]] name = "web-sys" -version = "0.3.47" +version = "0.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" +checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" dependencies = [ "js-sys", "wasm-bindgen", @@ -3598,61 +2958,81 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "winreg" -version = "0.7.0" +name = "windows-sys" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "winapi 0.3.9", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", ] [[package]] -name = "ws2_32-sys" -version = "0.2.1" +name = "windows_aarch64_msvc" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] -name = "x25519-dalek" -version = "1.1.0" +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "winreg" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc614d95359fd7afc321b66d2107ede58b246b844cf5d8a0adcca413e439f088" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "curve25519-dalek", - "rand_core 0.5.1", - "zeroize", + "winapi 0.3.9", ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "winreg" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "linked-hash-map", + "winapi 0.3.9", ] [[package]] -name = "zeroize" -version = "1.2.0" +name = "ws2_32-sys" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" dependencies = [ - "zeroize_derive", + "winapi 0.2.8", + "winapi-build", ] [[package]] -name = "zeroize_derive" -version = "1.0.1" +name = "yaml-rust" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "linked-hash-map", ] diff --git a/Cargo.toml b/Cargo.toml index 478e22e..2e3d3b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "ckb-capsule" -version = "0.4.6" +version = "0.8.0" authors = ["Nervos Network"] -edition = "2018" +edition = "2021" license = "MIT" description = "Capsule is a development framework for creating smart contract for Nervos' CKB layer 1 blockchain." homepage = "https://github.com/nervosnetwork/capsule" @@ -18,7 +18,7 @@ lazy_static = "1.4" serde = { version = "1.0", features = [ "derive" ] } toml = "0.5" toml_edit = "0.1.5" -ckb-tool = "0.3" +ckb-testtool = "0.8.0" simple-jsonrpc-client = "0.1" bech32 = "0.6" secp256k1 = "0.20" @@ -31,9 +31,11 @@ clap = "2.33" ctrlc = "3.1" env_logger = "0.7" log = "0.4" -faster-hex = "0.4" +faster-hex = "0.6" phf = "0.8" includedir = "0.6" +reqwest = { version = "0.11.11", features = ["blocking", "json"] } +jsonrpc-core = "17.1" [build-dependencies] includedir_codegen = "0.6" diff --git a/docker/Dockerfile b/docker/Dockerfile index 3fd2dc4..6b449de 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,14 +1,12 @@ -FROM nervos/ckb-riscv-gnu-toolchain@sha256:7b168b4b109a0f741078a71b7c4dddaf1d283a5244608f7851f5714fbad273ba +FROM nervos/ckb-riscv-gnu-toolchain:bionic-20211214 # Install Rust -RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2020-09-28 -y +RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-08-01 -y ENV PATH=/root/.cargo/bin:$PATH # Install RISC-V target RUN rustup target add riscv64imac-unknown-none-elf -# Install CKB binary patcher -RUN cargo install --git https://github.com/xxuejie/ckb-binary-patcher.git --rev 930f0b468a8f426ebb759d9da735ebaa1e2f98ba # Install CKB debugger -RUN git clone https://github.com/xxuejie/ckb-standalone-debugger.git \ - && cd ckb-standalone-debugger && git checkout 7c62220552fb90de0e6cd30cb6f95bf1bdcce18f && cd - \ - && cargo install --path ckb-standalone-debugger/bins \ +RUN git clone https://github.com/nervosnetwork/ckb-standalone-debugger.git \ + && cd ckb-standalone-debugger && git checkout dd7f80a557875787964e09126d3b122146e9e88a && cd - \ + && cargo install --path ckb-standalone-debugger/bins --locked \ && rm -r ckb-standalone-debugger diff --git a/rust-toolchain b/rust-toolchain index 5a5c721..91951fd 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.50.0 +1.61.0 diff --git a/src/bin/capsule.rs b/src/bin/capsule.rs index 0ca2bb4..63b9d33 100644 --- a/src/bin/capsule.rs +++ b/src/bin/capsule.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use std::env; use std::fs; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::process::exit; use std::str::FromStr; @@ -21,7 +21,7 @@ use ckb_capsule::tester::Tester; use ckb_capsule::version::Version; use ckb_capsule::wallet::cli_types::HumanCapacity; use ckb_capsule::wallet::{Address, Wallet, DEFAULT_CKB_CLI_BIN_NAME, DEFAULT_CKB_RPC_URL}; -use ckb_tool::ckb_types::core::Capacity; +use ckb_testtool::ckb_types::core::Capacity; use clap::{App, AppSettings, Arg, SubCommand}; @@ -60,6 +60,15 @@ fn group_contracts_by_type(contracts: Vec) -> HashMap (Vec, Vec) { + let args: Vec = env::args().collect(); + let mut iter = args.splitn(2, |n| n == "--"); + ( + iter.next().unwrap().to_vec(), + iter.next().map(|f| f.to_vec()).unwrap_or(Vec::new()), + ) +} + fn run_cli() -> Result<()> { env_logger::init(); @@ -88,9 +97,15 @@ fn run_cli() -> Result<()> { .subcommand(SubCommand::with_name("check").about("Check environment and dependencies").display_order(0)) .subcommand(SubCommand::with_name("new").about("Create a new project").args(&contract_args).display_order(1)) .subcommand(SubCommand::with_name("new-contract").about("Create a new contract").args(&contract_args).display_order(2)) - .subcommand(SubCommand::with_name("build").about("Build contracts").arg(Arg::with_name("name").short("n").long("name").multiple(true).takes_value(true).help("contract name")).arg( - Arg::with_name("release").long("release").help("Build contracts in release mode.") - ).arg(Arg::with_name("debug-output").long("debug-output").help("Always enable debugging output")).display_order(3)) + .subcommand( + SubCommand::with_name("build") + .about("Build contracts") + .arg(Arg::with_name("name").short("n").long("name").multiple(true).takes_value(true).help("contract name")) + .arg(Arg::with_name("release").long("release").help("Build contracts in release mode.")) + .arg(Arg::with_name("debug-output").long("debug-output").help("Always enable debugging output")) + .arg(Arg::with_name("host").long("host").help("Docker runs in host mode")) + .arg(Arg::with_name("rustup-dir").long("rustup-dir").takes_value(true).help("Mount the directory to /root/.rustup in docker image")) + .display_order(3)) .subcommand(SubCommand::with_name("run").about("Run command in contract build image").usage("ckb_capsule run --name 'echo list contract dir: && ls'") .args(&[Arg::with_name("name").short("n").long("name").required(true).takes_value(true).help("contract name"), Arg::with_name("cmd").required(true).multiple(true).help("command to run")]) @@ -185,9 +200,9 @@ fn run_cli() -> Result<()> { .default_value("8000").required(true).takes_value(true), Arg::with_name("only-server").long("only-server").help("Only start debugger server"), ]) - ) - .display_order(8), - ); + ).display_order(8), + ) + .arg(Arg::with_name("env-file").long("env-file").takes_value(true).help("Read in a file of environment variables to docker")); let signal = signal::Signal::setup(); @@ -197,7 +212,9 @@ fn run_cli() -> Result<()> { String::from_utf8(buf)? }; - let matches = app.get_matches(); + let (args, args_last) = get_last_args(); + let matches = app.get_matches_from(args); + let docker_env_file = String::from(matches.value_of("env-file").unwrap_or_default()); match matches.subcommand() { ("check", _args) => { Checker::build()?.print_report(); @@ -218,13 +235,19 @@ fn run_cli() -> Result<()> { } else { path.push(env::current_dir()?); } - let project_path = new_project(name.to_string(), path, &signal)?; + let project_path = + new_project(name.to_string(), path, &signal, docker_env_file.clone())?; let context = Context::load_from_path(&project_path)?; let c = Contract { name, template_type, }; - get_recipe(context.clone(), c.template_type)?.create_contract(&c, true, &signal)?; + get_recipe(context.clone(), c.template_type)?.create_contract( + &c, + true, + &signal, + docker_env_file, + )?; append_contract_to_config(&context, &c)?; println!("Done"); } @@ -241,12 +264,12 @@ fn run_cli() -> Result<()> { if recipe.exists(&contract.name) { return Err(anyhow!("contract '{}' is already exists", contract.name)); } - recipe.create_contract(&contract, true, &signal)?; + recipe.create_contract(&contract, true, &signal, docker_env_file)?; append_contract_to_config(&context, &contract)?; println!("Done"); } ("build", Some(args)) => { - let context = Context::load()?; + let mut context = Context::load()?; let build_names: Vec<&str> = args .values_of("name") .map(|values| values.collect()) @@ -257,6 +280,22 @@ fn run_cli() -> Result<()> { BuildEnv::Debug }; let always_debug = args.is_present("debug-output"); + let rustup_dir = args + .value_of("rustup-dir") + .map(|value| { + let path = Path::new(value); + if !path.exists() { + return Err(anyhow!("rustup path not exists: {}", value)); + } + if !path.is_dir() { + return Err(anyhow!("rustup path is not directory: {}", value)); + } + Ok(value.to_string()) + }) + .transpose()?; + context.use_docker_host = args.is_present("host"); + context.docker_env_file = docker_env_file; + context.rustup_dir = rustup_dir; let build_config = BuildConfig { build_env, always_debug, @@ -269,7 +308,12 @@ fn run_cli() -> Result<()> { for contract in contracts { println!("Building contract {}", contract.name); let recipe = get_recipe(context.clone(), contract.template_type)?; - recipe.run_build(&contract, build_config, &signal)?; + recipe.run_build( + &contract, + build_config, + &signal, + Option::Some(args_last.clone()), + )?; } println!("Done"); } @@ -312,7 +356,7 @@ fn run_cli() -> Result<()> { } else { BuildEnv::Debug }; - Tester::run(&context, build_env, &signal)?; + Tester::run(&context, build_env, &signal, docker_env_file)?; } ("deploy", Some(args)) => { Checker::build()?.check_ckb_cli()?; @@ -377,6 +421,7 @@ fn run_cli() -> Result<()> { listen_port, tty, &signal, + docker_env_file, )?; } (command, _) => { diff --git a/src/config.rs b/src/config.rs index 5c36fd2..20f1b95 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,5 +1,5 @@ use anyhow::{anyhow, Error}; -use ckb_tool::{ckb_jsonrpc_types::Script, ckb_types::H256}; +use ckb_testtool::{ckb_jsonrpc_types::Script, ckb_types::H256}; use serde::{Deserialize, Serialize}; use std::path::PathBuf; use std::str::FromStr; diff --git a/src/debugger.rs b/src/debugger.rs index e3e3098..ddb2598 100644 --- a/src/debugger.rs +++ b/src/debugger.rs @@ -4,7 +4,7 @@ use crate::recipe::rust::DOCKER_IMAGE; use crate::signal::Signal; use crate::util::docker::DockerCommand; use anyhow::{anyhow, Result}; -use ckb_tool::ckb_hash::new_blake2b; +use ckb_testtool::ckb_hash::new_blake2b; use serde::Serialize; use std::collections::HashSet; use std::fs; @@ -23,6 +23,7 @@ pub fn start_debugger>( listen_port: usize, tty: bool, signal: &Signal, + docker_env_file: String, ) -> Result<()> { const DEBUG_SERVER_NAME: &str = "capsule-debugger-server"; @@ -49,17 +50,23 @@ pub fn start_debugger>( // start GDB server container let container_template_path = "/tmp/tx.json".to_string(); + let mode = if tty { "gdb" } else { "full" }; let cmd = format!( - "ckb-debugger --script-group-type {} --cell-index {} --cell-type {} --tx-file {} --max-cycle {} --listen 127.0.0.1:{}", - script_group_type, cell_index, cell_type, container_template_path, max_cycles, listen_port + "ckb-debugger --script-group-type {} --cell-index {} --cell-type {} --tx-file {} --max-cycles {} --mode {} --gdb-listen 127.0.0.1:{}", + script_group_type, cell_index, cell_type, container_template_path, max_cycles, mode, listen_port ); println!("GDB server is started!"); - DockerCommand::with_context(context, DOCKER_IMAGE.to_string(), project_path.clone()) - .host_network(true) - .name(DEBUG_SERVER_NAME.to_string()) - .daemon(tty) - .map_volume(patched_template_path, container_template_path) - .run(cmd, signal)?; + DockerCommand::with_context( + context, + DOCKER_IMAGE.to_string(), + project_path.clone(), + docker_env_file.clone(), + ) + .host_network(true) + .name(DEBUG_SERVER_NAME.to_string()) + .daemon(tty) + .map_volume(patched_template_path, container_template_path) + .run(cmd, signal)?; if tty { let contract_path = match env { BuildEnv::Debug => format!("build/debug/{}", contract_name), @@ -72,10 +79,14 @@ pub fn start_debugger>( contract=contract_name, contract_path=contract_path ); - let docker_cmd = - DockerCommand::with_context(context, DOCKER_IMAGE.to_string(), project_path) - .host_network(true) - .tty(true); + let docker_cmd = DockerCommand::with_context( + context, + DOCKER_IMAGE.to_string(), + project_path, + docker_env_file, + ) + .host_network(true) + .tty(true); // Prepare a specific docker environment for GDB client then enable this // @@ -88,8 +99,10 @@ pub fn start_debugger>( // } docker_cmd.run(cmd, signal)?; + + return DockerCommand::stop(DEBUG_SERVER_NAME); } - DockerCommand::stop(DEBUG_SERVER_NAME) + Ok(()) } #[derive(Serialize)] @@ -154,7 +167,7 @@ pub fn patch_template>( let patch = match attribute.as_str() { "data" => { let bin = fs::read(contract_binary_path)?; - faster_hex::hex_string(&bin)? + faster_hex::hex_string(&bin) } "code_hash" => { let bin = fs::read(contract_binary_path)?; @@ -162,7 +175,7 @@ pub fn patch_template>( hasher.update(&bin); let mut code_hash = [0u8; 32]; hasher.finalize(&mut code_hash); - faster_hex::hex_string(&code_hash)? + faster_hex::hex_string(&code_hash) } _ => panic!( "unknown template mark attribute: '{}.{}'", diff --git a/src/deployment/deployment_process.rs b/src/deployment/deployment_process.rs index c4bd9a7..420b927 100644 --- a/src/deployment/deployment_process.rs +++ b/src/deployment/deployment_process.rs @@ -4,9 +4,9 @@ use crate::config::{Cell, CellLocation, DepGroup, Deployment}; use crate::wallet::{cli_types::LiveCell, *}; use anyhow::{anyhow, Result}; -use ckb_tool::ckb_chain_spec::consensus::TYPE_ID_CODE_HASH; -use ckb_tool::ckb_hash::new_blake2b; -use ckb_tool::ckb_types::{ +use ckb_testtool::ckb_chain_spec::consensus::TYPE_ID_CODE_HASH; +use ckb_testtool::ckb_hash::new_blake2b; +use ckb_testtool::ckb_types::{ bytes::Bytes, core::{Capacity, ScriptHashType, TransactionBuilder, TransactionView}, packed, @@ -96,8 +96,9 @@ impl DeploymentProcess { let tx: packed::Transaction = self .wallet .query_transaction(&input_cell.tx_hash)? - .expect("tx") + .expect("query tx") .transaction + .expect("tx") .inner .into(); let tx: TransactionView = tx.into_view(); diff --git a/src/deployment/manage.rs b/src/deployment/manage.rs index bf2d66a..3806716 100644 --- a/src/deployment/manage.rs +++ b/src/deployment/manage.rs @@ -4,7 +4,7 @@ use crate::util::cli::ask_for_confirm; use crate::wallet::{cli_types::LiveCell, Wallet}; use anyhow::{anyhow, Result}; use chrono::prelude::*; -use ckb_tool::ckb_types::core::{Capacity, TransactionView}; +use ckb_testtool::ckb_types::core::{Capacity, TransactionView}; use std::fs; use std::io::{Read, Write}; use std::path::PathBuf; @@ -91,29 +91,33 @@ impl Manage { // query cells recipes for cell in recipe.cell_recipes { - if let Some(tx) = wallet.query_transaction(&cell.tx_hash)? { - let output = &tx.transaction.inner.outputs[cell.index as usize]; - let live_cell = LiveCell { - tx_hash: tx.transaction.hash.clone(), - index: cell.index, - capacity: output.capacity.value(), - mature: true, - }; - cells.push((cell.name.clone(), live_cell)); + if let Some(tx_with_status) = wallet.query_transaction(&cell.tx_hash)? { + if let Some(tx) = tx_with_status.transaction { + let output = &tx.inner.outputs[cell.index as usize]; + let live_cell = LiveCell { + tx_hash: tx.hash.clone(), + index: cell.index, + capacity: output.capacity.value(), + mature: true, + }; + cells.push((cell.name.clone(), live_cell)); + } } } // query dep groups recipes for dep_group in recipe.dep_group_recipes { - if let Some(tx) = wallet.query_transaction(&dep_group.tx_hash)? { - let output = &tx.transaction.inner.outputs[dep_group.index as usize]; - let live_cell = LiveCell { - tx_hash: tx.transaction.hash.clone(), - index: dep_group.index, - capacity: output.capacity.value(), - mature: true, - }; - cells.push((dep_group.name.clone(), live_cell)); + if let Some(tx_with_status) = wallet.query_transaction(&dep_group.tx_hash)? { + if let Some(tx) = tx_with_status.transaction { + let output = &tx.inner.outputs[dep_group.index as usize]; + let live_cell = LiveCell { + tx_hash: tx.hash.clone(), + index: dep_group.index, + capacity: output.capacity.value(), + mature: true, + }; + cells.push((dep_group.name.clone(), live_cell)); + } } } diff --git a/src/deployment/plan.rs b/src/deployment/plan.rs index 83dab0a..c08094e 100644 --- a/src/deployment/plan.rs +++ b/src/deployment/plan.rs @@ -1,7 +1,7 @@ use super::recipe::DeploymentRecipe; use crate::deployment::recipe::*; use crate::wallet::cli_types::HumanCapacity; -use ckb_tool::ckb_types::H256; +use ckb_testtool::ckb_types::H256; use serde::Serialize; #[derive(Serialize)] diff --git a/src/deployment/recipe.rs b/src/deployment/recipe.rs index a1e4631..4d1705d 100644 --- a/src/deployment/recipe.rs +++ b/src/deployment/recipe.rs @@ -1,6 +1,6 @@ //! Deployment Recipes -use ckb_tool::ckb_types::H256; +use ckb_testtool::ckb_types::H256; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize)] diff --git a/src/deployment/tx_check.rs b/src/deployment/tx_check.rs index f14fe37..99dbfeb 100644 --- a/src/deployment/tx_check.rs +++ b/src/deployment/tx_check.rs @@ -1,7 +1,7 @@ use crate::wallet::Wallet; use anyhow::{anyhow, Result}; -use ckb_tool::ckb_chain_spec::consensus::TYPE_ID_CODE_HASH; -use ckb_tool::ckb_types::{ +use ckb_testtool::ckb_chain_spec::consensus::TYPE_ID_CODE_HASH; +use ckb_testtool::ckb_types::{ bytes::Bytes, core::{BlockView, ScriptHashType, TransactionView}, packed, diff --git a/src/generator/mod.rs b/src/generator/mod.rs index ef4307e..188d944 100644 --- a/src/generator/mod.rs +++ b/src/generator/mod.rs @@ -82,12 +82,21 @@ fn gen_project_layout>(name: String, project_path: P) -> Result<( Ok(()) } -fn gen_project_test>(name: String, project_path: P, signal: &Signal) -> Result<()> { +fn gen_project_test>( + name: String, + project_path: P, + signal: &Signal, + docker_env_file: String, +) -> Result<()> { const DEFAULT_TESTS_DIR: &str = "tests"; let project_path = project_path.as_ref().to_str().expect("path"); - let cmd = DockerCommand::with_config(DOCKER_IMAGE.to_string(), project_path.to_string()) - .fix_dir_permission(DEFAULT_TESTS_DIR.to_string()); + let cmd = DockerCommand::with_config( + DOCKER_IMAGE.to_string(), + project_path.to_string(), + docker_env_file, + ) + .fix_dir_permission(DEFAULT_TESTS_DIR.to_string()); cmd.run( format!("cargo new {} --lib --vcs none", DEFAULT_TESTS_DIR), signal, @@ -120,7 +129,12 @@ fn gen_project_test>(name: String, project_path: P, signal: &Sign } // create a new project -pub fn new_project>(name: String, path: P, signal: &Signal) -> Result { +pub fn new_project>( + name: String, + path: P, + signal: &Signal, + docker_env_file: String, +) -> Result { let mut project_path: PathBuf = PathBuf::new(); project_path.push(path); project_path.push(&name); @@ -133,6 +147,6 @@ pub fn new_project>(name: String, path: P, signal: &Signal) -> Re contracts_path.push("contracts"); // generate contract tests println!("Created tests"); - gen_project_test(name, &project_path, signal)?; + gen_project_test(name, &project_path, signal, docker_env_file)?; Ok(project_path) } diff --git a/src/project_context.rs b/src/project_context.rs index 60b8627..acaeecb 100644 --- a/src/project_context.rs +++ b/src/project_context.rs @@ -60,6 +60,9 @@ impl FromStr for DeployEnv { pub struct Context { pub project_path: PathBuf, pub config: Config, + pub use_docker_host: bool, + pub docker_env_file: String, + pub rustup_dir: Option, } impl Context { @@ -88,6 +91,9 @@ impl Context { Ok(Context { config, project_path, + use_docker_host: false, + docker_env_file: String::new(), + rustup_dir: None, }) } diff --git a/src/recipe/c.rs b/src/recipe/c.rs index 4c8f076..43431fd 100644 --- a/src/recipe/c.rs +++ b/src/recipe/c.rs @@ -164,6 +164,7 @@ impl Recipe for C { contract: &Contract, rewrite_config: bool, _signal: &Signal, + _docker_env_file: String, ) -> Result<()> { // setup c environment if needed self.setup_c_environment()?; @@ -203,7 +204,13 @@ impl Recipe for C { /// build contract /// Delegate to Makefile - fn run_build(&self, c: &Contract, config: BuildConfig, signal: &Signal) -> Result<()> { + fn run_build( + &self, + c: &Contract, + config: BuildConfig, + signal: &Signal, + _build_args_opt: Option>, + ) -> Result<()> { let build_target = self.build_target(config.build_env, &c.name); let mut bin_path = self.c_dir(); bin_path.push(&build_target); @@ -218,7 +225,8 @@ impl Recipe for C { // copy to build dir if !bin_path.exists() { return Err(anyhow!( - "can't find contract binary from path {:?}, please check Makefile" + "can't find contract binary from path {:?}, please check Makefile", + bin_path, )); } let mut target_path = self.context.project_path.clone(); diff --git a/src/recipe/mod.rs b/src/recipe/mod.rs index 54ad306..6f642d7 100644 --- a/src/recipe/mod.rs +++ b/src/recipe/mod.rs @@ -21,8 +21,15 @@ pub trait Recipe { contract: &Contract, rewrite_config: bool, signal: &Signal, + docker_env_file: String, ) -> Result<()>; fn run(&self, contract: &Contract, build_cmd: String, signal: &Signal) -> Result<()>; - fn run_build(&self, contract: &Contract, config: BuildConfig, signal: &Signal) -> Result<()>; + fn run_build( + &self, + contract: &Contract, + config: BuildConfig, + signal: &Signal, + build_args_opt: Option>, + ) -> Result<()>; fn clean(&self, contracts: &[Contract], signal: &Signal) -> Result<()>; } diff --git a/src/recipe/rust.rs b/src/recipe/rust.rs index 86b1b56..e532bf4 100644 --- a/src/recipe/rust.rs +++ b/src/recipe/rust.rs @@ -14,7 +14,7 @@ use tera; use std::fs; use std::path::PathBuf; -pub const DOCKER_IMAGE: &str = "jjy0/ckb-capsule-recipe-rust:2020-9-28"; +pub const DOCKER_IMAGE: &str = "thewawar/ckb-capsule:2022-08-01"; const RUST_TARGET: &str = "riscv64imac-unknown-none-elf"; const CARGO_CONFIG_PATH: &str = ".cargo/config"; const BASE_RUSTFLAGS: &str = @@ -124,6 +124,7 @@ impl Recipe for Rust { contract: &Contract, rewrite_config: bool, signal: &Signal, + docker_env_file: String, ) -> Result<()> { let name = &contract.name; println!("New contract {:?}", &name); @@ -133,6 +134,7 @@ impl Recipe for Rust { let cmd = DockerCommand::with_config( self.docker_image(), path.to_str().expect("str").to_string(), + docker_env_file, ) .fix_dir_permission(name.clone()); cmd.run( @@ -166,29 +168,46 @@ impl Recipe for Rust { fn run(&self, contract: &Contract, build_cmd: String, signal: &Signal) -> Result<()> { let project_path = self.context.project_path.to_str().expect("path"); let contract_relative_path = self.contract_relative_path(&contract.name); - let cmd = DockerCommand::with_context( + let mut cmd = DockerCommand::with_context( &self.context, self.docker_image(), project_path.to_string(), + self.context.docker_env_file.clone(), ) .workdir(format!( "/code/{}", contract_relative_path.to_str().expect("path") )) .fix_dir_permission("/code/target".to_string()) - .fix_dir_permission("/code/Cargo.lock".to_string()); + .fix_dir_permission("/code/Cargo.lock".to_string()) + .host_network(self.context.use_docker_host); + if let Some(rustup_dir) = self.context.rustup_dir.as_ref() { + cmd = cmd.map_volume(rustup_dir.to_string(), "/root/.rustup".to_string()); + } + cmd.run(build_cmd, &signal)?; Ok(()) } /// build contract - fn run_build(&self, contract: &Contract, config: BuildConfig, signal: &Signal) -> Result<()> { + fn run_build( + &self, + contract: &Contract, + config: BuildConfig, + signal: &Signal, + build_args_opt: Option>, + ) -> Result<()> { // docker cargo build let mut rel_bin_path = PathBuf::new(); let (bin_dir_prefix, build_cmd_opt) = match config.build_env { BuildEnv::Debug => ("debug", ""), BuildEnv::Release => ("release", "--release"), }; + let build_cmd_opt = if build_args_opt.is_some() { + format!("{} {}", build_cmd_opt, build_args_opt.unwrap().join(" ")) + } else { + String::from(build_cmd_opt) + }; rel_bin_path.push(format!( "target/{}/{}/{}", RUST_TARGET, bin_dir_prefix, &contract.name @@ -202,14 +221,13 @@ impl Recipe for Rust { // run build command let build_cmd = format!( - "{rustflags} {cargo_cmd} build --target {rust_target} {build_env} && \ - ckb-binary-patcher -i {contract_bin} -o {contract_bin}", + "{rustflags} {cargo_cmd} build --target {rust_target} {build_env}", cargo_cmd = self.cargo_cmd(), rustflags = self.injection_rustflags(config, &contract.name), rust_target = RUST_TARGET, - contract_bin = container_bin_path.to_str().expect("bin"), build_env = build_cmd_opt ); + log::debug!("[build cmd]: {}", build_cmd); self.run(contract, build_cmd, signal)?; // copy to build dir diff --git a/src/tester.rs b/src/tester.rs index bfc107b..5184b1b 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -8,7 +8,12 @@ const TEST_ENV_VAR: &str = "CAPSULE_TEST_ENV"; pub struct Tester; impl Tester { - pub fn run(project_context: &Context, env: BuildEnv, signal: &Signal) -> Result<()> { + pub fn run( + project_context: &Context, + env: BuildEnv, + signal: &Signal, + docker_env_file: String, + ) -> Result<()> { let env_arg = match env { BuildEnv::Debug => "debug", BuildEnv::Release => "release", @@ -24,11 +29,15 @@ impl Tester { .to_str() .expect("build dir") .to_string(); - let cmd = - DockerCommand::with_context(project_context, DOCKER_IMAGE.to_string(), workspace_dir) - .map_volume(build_dir, "/code/build".to_string()) - .fix_dir_permission("target".to_string()) - .fix_dir_permission("Cargo.lock".to_string()); + let cmd = DockerCommand::with_context( + project_context, + DOCKER_IMAGE.to_string(), + workspace_dir, + docker_env_file, + ) + .map_volume(build_dir, "/code/build".to_string()) + .fix_dir_permission("target".to_string()) + .fix_dir_permission("Cargo.lock".to_string()); cmd.run( format!( "{}={} cargo test -p tests -- --nocapture", diff --git a/src/util/docker.rs b/src/util/docker.rs index fcf9b88..f63e3c6 100644 --- a/src/util/docker.rs +++ b/src/util/docker.rs @@ -30,6 +30,7 @@ pub struct DockerCommand { mapping_ports: Vec, mapping_volumes: Vec, host_network: bool, + env_file: String, name: Option, daemon: bool, tty: bool, @@ -38,11 +39,16 @@ pub struct DockerCommand { } impl DockerCommand { - pub fn with_context(_context: &Context, docker_image: String, code_path: String) -> Self { - Self::with_config(docker_image, code_path) + pub fn with_context( + _context: &Context, + docker_image: String, + code_path: String, + env_file: String, + ) -> Self { + Self::with_config(docker_image, code_path, env_file) } - pub fn with_config(docker_image: String, code_path: String) -> Self { + pub fn with_config(docker_image: String, code_path: String, env_file: String) -> Self { let bin = DOCKER_BIN.to_string(); let uid = users::get_current_uid(); let gid = users::get_current_gid(); @@ -63,11 +69,18 @@ impl DockerCommand { mapping_ports: Vec::new(), mapping_volumes: Vec::new(), host_network: false, + env_file, name: None, daemon: false, tty: false, workdir: "/code".to_string(), - inherited_env: vec!["HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY"], + inherited_env: vec![ + //"HTTP_PROXY", + //"http_proxy", + //"HTTPS_PROXY", + //"https_proxy", + //"ALL_PROXY", + ], } } @@ -160,6 +173,7 @@ impl DockerCommand { mapping_ports, mut mapping_volumes, host_network, + env_file, name, daemon, tty, @@ -201,7 +215,7 @@ impl DockerCommand { for key in inherited_env { if let Ok(value) = env::var(key) { debug!("inherited env {}={}", key, value); - cmd.arg(format!("-e{}:{}", key, value)); + cmd.arg(format!("-e{}={}", key, value)); } } @@ -209,6 +223,10 @@ impl DockerCommand { cmd.arg("--network").arg("host"); } + if !env_file.is_empty() { + cmd.arg("--env-file").arg(env_file); + } + if let Some(name) = name { cmd.arg("--name").arg(name); } diff --git a/src/wallet/cli_types/address.rs b/src/wallet/cli_types/address.rs index 9ef2f6c..ed90bca 100644 --- a/src/wallet/cli_types/address.rs +++ b/src/wallet/cli_types/address.rs @@ -3,8 +3,8 @@ use std::fmt; use std::str::FromStr; use bech32::{convert_bits, Bech32, ToBase32}; -use ckb_tool::ckb_hash::blake2b_256; -use ckb_tool::ckb_types::{ +use ckb_testtool::ckb_hash::blake2b_256; +use ckb_testtool::ckb_types::{ bytes::Bytes, core::ScriptHashType, packed::{Byte32, Script}, @@ -91,6 +91,7 @@ impl AddressPayload { AddressPayload::Short { .. } => AddressType::Short, AddressPayload::Full { hash_type, .. } => match hash_type { ScriptHashType::Data => AddressType::FullData, + ScriptHashType::Data1 => AddressType::FullData, ScriptHashType::Type => AddressType::FullType, }, } diff --git a/src/wallet/cli_types/live_cell.rs b/src/wallet/cli_types/live_cell.rs index 078124e..c29d4cf 100644 --- a/src/wallet/cli_types/live_cell.rs +++ b/src/wallet/cli_types/live_cell.rs @@ -1,4 +1,4 @@ -use ckb_tool::ckb_types::{ +use ckb_testtool::ckb_types::{ packed::{CellInput, OutPoint}, prelude::*, H256, diff --git a/src/wallet/cli_types/live_cell_info.rs b/src/wallet/cli_types/live_cell_info.rs index 662734b..f9a7e0e 100644 --- a/src/wallet/cli_types/live_cell_info.rs +++ b/src/wallet/cli_types/live_cell_info.rs @@ -1,6 +1,6 @@ use super::human_capacity::HumanCapacity; use super::live_cell::LiveCell; -use ckb_tool::ckb_types::H256; +use ckb_testtool::ckb_types::H256; use serde::{Deserialize, Serialize}; use std::str::FromStr; diff --git a/src/wallet/cli_types/mod.rs b/src/wallet/cli_types/mod.rs index ba27504..f27e7d5 100644 --- a/src/wallet/cli_types/mod.rs +++ b/src/wallet/cli_types/mod.rs @@ -11,7 +11,7 @@ pub use live_cell::LiveCell; pub use live_cell_info::{LiveCellInfo, LiveCellInfoVec}; pub use signature::SignatureOutput; -use ckb_tool::ckb_types::{h256, H256}; +use ckb_testtool::ckb_types::{h256, H256}; pub const ONE_CKB: u64 = 1_00000000; pub const PREFIX_MAINNET: &str = "ckb"; diff --git a/src/wallet/collector.rs b/src/wallet/collector.rs index 5f32a7e..98f7a7d 100644 --- a/src/wallet/collector.rs +++ b/src/wallet/collector.rs @@ -1,6 +1,6 @@ use super::cli_types::{Address, HumanCapacity, LiveCell, LiveCellInfo, LiveCellInfoVec}; use super::util::handle_cmd; -use ckb_tool::ckb_types::{core::Capacity, packed::*}; +use ckb_testtool::ckb_types::{core::Capacity, packed::*}; use log::{debug, trace}; use std::collections::HashSet; use std::process::Command; diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index bb04740..d9789b7 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -1,6 +1,7 @@ pub mod cli_types; mod collector; mod password; +mod rpc; mod util; mod wallet; diff --git a/src/wallet/rpc.rs b/src/wallet/rpc.rs new file mode 100644 index 0000000..533f7d8 --- /dev/null +++ b/src/wallet/rpc.rs @@ -0,0 +1,166 @@ +use jsonrpc_core::error::Error as JsonRpcError; +use std::fmt; +use std::sync::atomic::{AtomicU64, Ordering}; + +use ckb_testtool::ckb_error::AnyError; +use ckb_testtool::ckb_jsonrpc_types::{ + BlockNumber, BlockView, CellWithStatus, OutPoint, Transaction, TransactionWithStatus, +}; +use ckb_testtool::ckb_types::{ + core::BlockNumber as CoreBlockNumber, packed::Byte32, prelude::*, H256, +}; + +lazy_static::lazy_static! { + pub static ref HTTP_CLIENT: reqwest::blocking::Client = reqwest::blocking::Client::builder() + .timeout(::std::time::Duration::from_secs(30)) + .build() + .expect("reqwest Client build"); +} + +#[derive(Debug)] +pub struct IdGenerator { + state: AtomicU64, +} + +impl Default for IdGenerator { + fn default() -> Self { + IdGenerator { + state: AtomicU64::new(1), + } + } +} + +impl IdGenerator { + pub fn new() -> IdGenerator { + IdGenerator::default() + } + + pub fn next(&self) -> u64 { + self.state.fetch_add(1, Ordering::SeqCst) + } +} + +#[derive(Debug, PartialEq, Clone)] +pub struct Error { + pub(in crate::wallet) inner: JsonRpcError, +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!( + f, + "{}", + serde_json::to_string(&self.inner).expect("JsonRpcError to_string") + ) + } +} + +impl ::std::error::Error for Error {} + +macro_rules! jsonrpc { + ( + $(#[$struct_attr:meta])* + pub struct $struct_name:ident {$( + $(#[$attr:meta])* + pub fn $method:ident(&$selff:ident $(, $arg_name:ident: $arg_ty:ty)*) + -> $return_ty:ty; + )*} + ) => ( + $(#[$struct_attr])* + pub struct $struct_name { + pub client: &'static reqwest::blocking::Client, + pub url: reqwest::Url, + pub id_generator: $crate::wallet::rpc::IdGenerator, + } + + impl $struct_name { + pub fn new(uri: &str) -> Self { + let url = reqwest::Url::parse(uri).expect("ckb uri, e.g. \"http://127.0.0.1:8114\""); + let id_generator = $crate::wallet::rpc::IdGenerator::new(); + $struct_name { url, id_generator, client: &$crate::wallet::rpc::HTTP_CLIENT, } + } + + $( + $(#[$attr])* + pub fn $method(&$selff $(, $arg_name: $arg_ty)*) -> Result<$return_ty, ckb_testtool::ckb_error::AnyError> { + let method = String::from(stringify!($method)); + let params = serialize_parameters!($($arg_name,)*); + let id = $selff.id_generator.next(); + + let mut req_json = serde_json::Map::new(); + req_json.insert("id".to_owned(), serde_json::json!(id)); + req_json.insert("jsonrpc".to_owned(), serde_json::json!("2.0")); + req_json.insert("method".to_owned(), serde_json::json!(method)); + req_json.insert("params".to_owned(), params); + + let resp = $selff.client.post($selff.url.clone()).json(&req_json).send()?; + let output = resp.json::()?; + match output { + jsonrpc_core::response::Output::Success(success) => { + serde_json::from_value(success.result).map_err(Into::into) + }, + jsonrpc_core::response::Output::Failure(failure) => { + Err($crate::wallet::rpc::Error{ inner: failure.error }.into()) + } + } + } + )* + } + ) +} + +macro_rules! serialize_parameters { + () => ( serde_json::Value::Null ); + ($($arg_name:ident,)+) => ( serde_json::to_value(($($arg_name,)+))?) +} + +pub struct RpcClient { + inner: Inner, +} + +impl RpcClient { + pub fn new(uri: &str) -> Self { + Self { + inner: Inner::new(uri), + } + } + + // pub fn inner(&self) -> &Inner { + // &self.inner + // } + + pub fn get_transaction(&self, hash: Byte32) -> Option { + self.inner + .get_transaction(hash.unpack()) + .expect("rpc call get_transaction") + .filter(|tx_with_status| tx_with_status.transaction.is_some()) + } + pub fn send_transaction(&self, tx: Transaction) -> Byte32 { + self.send_transaction_result(tx) + .expect("rpc call send_transaction") + .pack() + } + pub fn send_transaction_result(&self, tx: Transaction) -> Result { + self.inner + .send_transaction(tx, Some("passthrough".to_string())) + } + pub fn get_live_cell( + &self, + out_point: OutPoint, + with_data: bool, + ) -> Result { + self.inner.get_live_cell(out_point, with_data) + } + pub fn get_block_by_number(&self, number: CoreBlockNumber) -> Option { + self.inner + .get_block_by_number(number.into()) + .expect("rpc call get_block_by_number") + } +} + +jsonrpc!(pub struct Inner { + pub fn get_transaction(&self, _hash: H256) -> Option; + pub fn send_transaction(&self, tx: Transaction, outputs_validator: Option) -> H256; + pub fn get_live_cell(&self, _out_point: OutPoint, _with_data: bool) -> CellWithStatus; + pub fn get_block_by_number(&self, _number: BlockNumber) -> Option; +}); diff --git a/src/wallet/util.rs b/src/wallet/util.rs index 2d2aeba..390f7d5 100644 --- a/src/wallet/util.rs +++ b/src/wallet/util.rs @@ -1,6 +1,6 @@ use anyhow::{anyhow, Result}; -use ckb_tool::ckb_hash::new_blake2b; -use ckb_tool::ckb_types::{ +use ckb_testtool::ckb_hash::new_blake2b; +use ckb_testtool::ckb_types::{ bytes::Bytes, core::TransactionView, packed::{self, WitnessArgs}, diff --git a/src/wallet/wallet.rs b/src/wallet/wallet.rs index bfc0c5c..35e6362 100644 --- a/src/wallet/wallet.rs +++ b/src/wallet/wallet.rs @@ -3,18 +3,18 @@ use super::collector::Collector; use super::password::Password; use super::util; +use super::rpc::RpcClient; use anyhow::Result; -use ckb_tool::ckb_jsonrpc_types::TransactionWithStatus; -use ckb_tool::ckb_types::{ +use ckb_testtool::ckb_jsonrpc_types::TransactionWithStatus; +use ckb_testtool::ckb_types::{ bytes::Bytes, core::{BlockView, Capacity, DepType, TransactionView}, packed, prelude::*, H256, }; -use ckb_tool::faster_hex::hex_decode; -use ckb_tool::faster_hex::hex_encode; -use ckb_tool::rpc_client::RpcClient; +use faster_hex::hex_decode; +use faster_hex::hex_encode; use std::collections::HashSet; use std::io::Write; use std::process::{Command, Stdio}; @@ -34,9 +34,7 @@ pub struct Wallet { impl Wallet { pub fn load(uri: String, ckb_cli_bin: String, address: Address) -> Self { let rpc_client = RpcClient::new(&uri); - let genesis = rpc_client - .get_block_by_number(0u64.into()) - .expect("genesis"); + let genesis = rpc_client.get_block_by_number(0u64).expect("genesis"); let collector = Collector::new(uri.clone(), ckb_cli_bin.clone()); Wallet { ckb_cli_bin, @@ -198,7 +196,7 @@ impl Wallet { } pub fn query_transaction(&self, tx_hash: &H256) -> Result> { - let tx_opt = self.rpc_client().get_transaction(tx_hash.to_owned()); + let tx_opt = self.rpc_client().get_transaction(tx_hash.pack()); Ok(tx_opt) } @@ -243,7 +241,6 @@ impl Wallet { pub fn get_cell_output(&self, out_point: packed::OutPoint) -> packed::CellOutput { let cell_resp = self .rpc_client() - .inner() .get_live_cell(out_point.into(), false) .expect("rpc get_live_cell"); cell_resp diff --git a/templates/c/Makefile b/templates/c/Makefile index 212c96c..e150ef0 100644 --- a/templates/c/Makefile +++ b/templates/c/Makefile @@ -8,10 +8,10 @@ CFLAGS := -fPIC -O3 -fno-builtin-memcmp -fno-builtin-printf -nostdinc -nostdlib LDFLAGS := -Wl,-static -fdata-sections -ffunction-sections -Wl,--gc-sections DBGFLAGS := -DCKB_C_STDLIB_PRINTF MOLC := moleculec -MOLC_VERSION := 0.6.0 +MOLC_VERSION := 0.7.3 PROTOCOL_HEADER := build/blockchain.h PROTOCOL_SCHEMA := build/blockchain.mol -PROTOCOL_VERSION := d75e4c56ffa40e17fd2fe477da3f98c5578edcd1 +PROTOCOL_VERSION := v0.104.0 PROTOCOL_URL := https://raw.githubusercontent.com/nervosnetwork/ckb/${PROTOCOL_VERSION}/util/types/schemas/blockchain.mol # docker pull nervos/ckb-riscv-gnu-toolchain:gnu-bionic-20191012 diff --git a/templates/capsule.toml b/templates/capsule.toml index 2d7d5aa..dcc1753 100644 --- a/templates/capsule.toml +++ b/templates/capsule.toml @@ -2,10 +2,10 @@ # # path of rust contracts workspace directory, # # a `Cargo.toml` file is expected under the directory. # workspace_dir = "." -# toolchain = "nightly-2020-09-28" -# docker_image = "jjy0/ckb-capsule-recipe-rust:2020-9-28" +# toolchain = "nightly-2022-08-01" +# docker_image = "thewawar/ckb-capsule:2022-08-01" # capsule version version = "{{ version }}" # path of deployment config file -deployment = "deployment.toml" +deployment = "deployment.toml" \ No newline at end of file diff --git a/templates/rust/contract/Cargo-manifest.toml b/templates/rust/contract/Cargo-manifest.toml index 30b5331..0724387 100644 --- a/templates/rust/contract/Cargo-manifest.toml +++ b/templates/rust/contract/Cargo-manifest.toml @@ -1,9 +1,9 @@ [package] name = "{{name}}" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-std = "0.7.1" +ckb-std = "0.10.0" diff --git a/templates/rust/contract/src/entry.rs b/templates/rust/contract/src/entry.rs index 5e2aebf..0fb9af2 100644 --- a/templates/rust/contract/src/entry.rs +++ b/templates/rust/contract/src/entry.rs @@ -6,7 +6,7 @@ use core::result::Result; use alloc::{vec, vec::Vec}; // Import CKB syscalls and structures -// https://nervosnetwork.github.io/ckb-std/riscv64imac-unknown-none-elf/doc/ckb_std/index.html +// https://docs.rs/ckb-std/ use ckb_std::{ debug, high_level::{load_script, load_tx_hash}, diff --git a/templates/rust/contract/src/main.rs b/templates/rust/contract/src/main.rs index b104ff1..11dc295 100644 --- a/templates/rust/contract/src/main.rs +++ b/templates/rust/contract/src/main.rs @@ -6,6 +6,7 @@ #![no_std] #![no_main] +#![feature(asm_sym)] #![feature(lang_items)] #![feature(alloc_error_handler)] #![feature(panic_info_message)] @@ -14,6 +15,7 @@ mod entry; mod error; +use core::arch::asm; use ckb_std::{ default_alloc, }; @@ -22,7 +24,9 @@ ckb_std::entry!(program_entry); default_alloc!(); /// program entry -fn program_entry() -> i8 { +/// +/// Both `argc` and `argv` can be omitted. +fn program_entry(_argc: u64, _argv: *const *const u8) -> i8 { // Call main function and return error code match entry::main() { Ok(_) => 0, diff --git a/templates/rust/tests/Cargo-manifest.toml b/templates/rust/tests/Cargo-manifest.toml index 55efe05..5b5816a 100644 --- a/templates/rust/tests/Cargo-manifest.toml +++ b/templates/rust/tests/Cargo-manifest.toml @@ -1,9 +1,9 @@ [package] name = "tests" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ckb-testtool = "0.4" +ckb-testtool = "0.8" diff --git a/templates/rust/tests/src/tests.rs b/templates/rust/tests/src/tests.rs index d8c22e5..72b0545 100644 --- a/templates/rust/tests/src/tests.rs +++ b/templates/rust/tests/src/tests.rs @@ -6,14 +6,23 @@ use ckb_testtool::ckb_types::{ packed::*, prelude::*, }; -use ckb_testtool::ckb_error::assert_error_eq; -use ckb_testtool::ckb_script::ScriptError; +use ckb_testtool::ckb_error::Error; const MAX_CYCLES: u64 = 10_000_000; // error numbers const ERROR_EMPTY_ARGS: i8 = 5; +fn assert_script_error(err: Error, err_code: i8) { + let error_string = err.to_string(); + assert!( + error_string.contains(format!("error code {} ", err_code).as_str()), + "error_string: {}, expected_error_code: {}", + error_string, + err_code + ); +} + #[test] fn test_success() { // deploy contract @@ -118,13 +127,6 @@ fn test_empty_args() { let tx = context.complete_tx(tx); // run - let err = context - .verify_tx(&tx, MAX_CYCLES) - .unwrap_err(); - // we expect an error raised from 0-indexed cell's lock script - let script_cell_index = 0; - assert_error_eq!( - err, - ScriptError::ValidationFailure(ERROR_EMPTY_ARGS).input_lock_script(script_cell_index) - ); + let err = context.verify_tx(&tx, MAX_CYCLES).unwrap_err(); + assert_script_error(err, ERROR_EMPTY_ARGS); } diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 2d6be0b..46e7599 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -2,7 +2,7 @@ name = "tests" version = "0.1.0" authors = ["jjy "] -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tests/src/main.rs b/tests/src/main.rs index b04a96d..32652f6 100644 --- a/tests/src/main.rs +++ b/tests/src/main.rs @@ -20,7 +20,7 @@ fn main() { path.push("tmp"); path }; - fs::create_dir(&tmp_dir).expect("create dir"); + fs::create_dir_all(&tmp_dir).expect("create dir"); // test cases test_build(&tmp_dir, &bin_path, "rust-demo", "rust").expect("rust demo"); @@ -57,7 +57,7 @@ fn test_build>( env::set_current_dir(&contract_path)?; let exit_code = Command::new("bash") .arg("-c") - .arg(format!("{} build", bin_path)) + .arg(format!("{} build --host", bin_path)) .spawn()? .wait()?; if !exit_code.success() { @@ -66,7 +66,7 @@ fn test_build>( println!("Run contract test ..."); let exit_code = Command::new("bash") .arg("-c") - .arg(format!("{} test", bin_path)) + .arg(format!("cargo test -p tests")) .spawn()? .wait()?; if !exit_code.success() { @@ -110,7 +110,7 @@ fn test_build_sharedlib>( env::set_current_dir(&contract_path)?; let exit_code = Command::new("bash") .arg("-c") - .arg(format!("{} build", bin_path)) + .arg(format!("{} build --host", bin_path)) .spawn()? .wait()?; if !exit_code.success() {