From 8ca42af79953db961fb3b1a50344968421e4bceb Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Fri, 31 May 2024 23:03:21 -0400 Subject: [PATCH] remove unused deps in rust crates (#101) --- .github/workflows/tests.yml | 42 +- .gitignore | 1 + Cargo.lock | 392 +-- Cargo.toml | 70 +- ci/rust-version.sh | 9 - geyser-plugin-runner/Cargo.toml | 39 +- geyser-plugin-runner/demo-plugin/Cargo.toml | 22 +- geyser-plugin-runner/demo-plugin/src/lib.rs | 13 +- geyser-plugin-runner/src/block.rs | 32 +- geyser-plugin-runner/src/dataframe.rs | 31 +- geyser-plugin-runner/src/entry.rs | 30 +- geyser-plugin-runner/src/epoch.rs | 17 +- geyser-plugin-runner/src/lib.rs | 11 + geyser-plugin-runner/src/main.rs | 72 +- geyser-plugin-runner/src/node.rs | 281 +- geyser-plugin-runner/src/rewards.rs | 21 +- geyser-plugin-runner/src/subset.rs | 18 +- geyser-plugin-runner/src/transaction.rs | 27 +- geyser-plugin-runner/src/utils.rs | 33 +- rustfmt.toml | 3 + txstatus/.gitignore | 1 - txstatus/Cargo.lock | 3316 ------------------- txstatus/Cargo.toml | 25 +- txstatus/src/lib.rs | 28 +- txstatus/src/reader.rs | 11 +- 25 files changed, 402 insertions(+), 4143 deletions(-) delete mode 100755 ci/rust-version.sh create mode 100644 geyser-plugin-runner/src/lib.rs create mode 100644 rustfmt.toml delete mode 100644 txstatus/Cargo.lock diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5701fe3..28eb3fa4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,11 +2,12 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -on: [pull_request] +on: + pull_request: + workflow_dispatch: env: CARGO_TERM_COLOR: always - CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse name: tests jobs: @@ -36,36 +37,37 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - name: Install protoc + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler + + - uses: actions/cache@v4 with: path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - ./target - key: ${{ matrix.os }}-geyser-plugin-runner-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}-0001 + target + key: ${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}-0000 restore-keys: | - ${{ matrix.os }}-geyser-plugin-runner + ${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }} - name: Set rust version run: | - RUST_VERSION="$(./ci/rust-version.sh)" + RUST_VERSION="$(grep -oP 'channel = "\K\d\.\d+\.\d+(?=")' rust-toolchain.toml)" echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV" - - name: Install protoc - run: | - sudo apt-get update - sudo apt-get install -y protobuf-compiler + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + components: rustfmt - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ env.RUST_VERSION }} - profile: minimal - components: clippy, rustfmt - - - name: Enter the geyser-plugin-runner directory - run: cd geyser-plugin-runner + components: clippy - name: cargo tree run: | @@ -73,11 +75,11 @@ jobs: git checkout Cargo.lock cargo tree --frozen --offline - - name: Run fmt - run: cargo fmt --all -- --check + - name: cargo fmt + run: cargo +nightly fmt --all -- --check - name: Run clippy - run: cargo clippy --all-targets --tests -- -Dwarnings + run: cargo clippy --workspace --all-targets --tests -- -Dwarnings - name: Run test run: cargo test --all-targets diff --git a/.gitignore b/.gitignore index 5abd0d8c..9bac135a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.car _site /.cargo +/target diff --git a/Cargo.lock b/Cargo.lock index dc307049..e001c9a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -778,15 +778,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -[[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" -dependencies = [ - "tinyvec", -] - [[package]] name = "bstr" version = "1.9.0" @@ -833,12 +824,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" - [[package]] name = "byteorder" version = "1.5.0" @@ -882,16 +867,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cbor" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56053652b4b5c0ded5ae6183c7cd547ad2dd6bcce149658bef052a4995533bd" -dependencies = [ - "byteorder 0.5.3", - "rustc-serialize", -] - [[package]] name = "cc" version = "1.0.83" @@ -1042,7 +1017,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" dependencies = [ "ascii", - "byteorder 1.5.0", + "byteorder", "either", "memchr", "unreachable", @@ -1253,7 +1228,7 @@ version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" dependencies = [ - "byteorder 1.5.0", + "byteorder", "digest 0.9.0", "rand_core 0.5.1", "serde", @@ -1341,17 +1316,7 @@ name = "demo-plugin" version = "0.1.0" dependencies = [ "colored", - "libc", - "libloading 0.8.1", - "serial_test", - "socket2", - "solana-account-decoder", - "solana-core", "solana-geyser-plugin-interface", - "solana-local-cluster", - "solana-net-utils", - "solana-streamer", - "tempfile", "tracing", ] @@ -1359,20 +1324,12 @@ dependencies = [ name = "demo-rust-ipld-car" version = "0.1.0" dependencies = [ - "anyhow", "base64 0.21.7", "bincode", - "borsh 1.3.1", - "bs58 0.5.0", - "byteorder 1.5.0", - "bytes", - "cbor", "cid", "crc", "crossbeam-channel", "fnv", - "hex", - "integer-encoding", "multihash", "prost", "serde", @@ -1381,13 +1338,10 @@ dependencies = [ "solana-accounts-db", "solana-entry", "solana-geyser-plugin-manager", - "solana-ledger", - "solana-program", "solana-rpc", "solana-sdk", "solana-storage-proto", "solana-transaction-status", - "thiserror", "zstd 0.13.0", ] @@ -1395,10 +1349,6 @@ dependencies = [ name = "demo-transaction-status-ffi" version = "0.1.0" dependencies = [ - "bs58 0.4.0", - "byteorder 1.5.0", - "chrono", - "libc", "serde_json", "solana-sdk", "solana-transaction-status", @@ -1685,22 +1635,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "etcd-client" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b0ea5ef6dc2388a4b1669fa32097249bc03a15417b97cb75e38afb309e4a89" -dependencies = [ - "http", - "prost", - "tokio", - "tokio-stream", - "tonic", - "tonic-build", - "tower", - "tower-service", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -2037,7 +1971,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" dependencies = [ - "byteorder 1.5.0", + "byteorder", ] [[package]] @@ -2118,12 +2052,6 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "histogram" version = "0.6.9" @@ -2430,12 +2358,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "integer-encoding" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924df4f0e24e2e7f9cdd90babb0b96f93b20f3ecfa949ea9e6613756b8c8e1bf" - [[package]] name = "ipnet" version = "2.9.0" @@ -2850,7 +2772,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ - "byteorder 1.5.0", + "byteorder", "keccak", "rand_core 0.6.4", "zeroize", @@ -2862,12 +2784,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "min-max-heap" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2687e6cf9c00f48e9284cf9fd15f2ef341d03cc7743abf9df4c5f07fdee50b18" - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -3611,12 +3527,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "prio-graph" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6492a75ca57066a4479af45efa302bed448680182b0563f96300645d5f896097" - [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -4088,15 +3998,6 @@ dependencies = [ "librocksdb-sys", ] -[[package]] -name = "rolling-file" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8395b4f860856b740f20a296ea2cd4d823e81a2658cf05ef61be22916026a906" -dependencies = [ - "chrono", -] - [[package]] name = "rpassword" version = "7.3.1" @@ -4130,12 +4031,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-serialize" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" - [[package]] name = "rustc_version" version = "0.4.0" @@ -4411,31 +4306,6 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures 0.3.30", - "lazy_static", - "log", - "parking_lot 0.12.1", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "sha-1" version = "0.9.8" @@ -4620,7 +4490,7 @@ dependencies = [ "Inflector", "base64 0.21.7", "bincode", - "bs58 0.4.0", + "bs58", "bv", "lazy_static", "serde", @@ -4647,7 +4517,7 @@ dependencies = [ "blake3", "bv", "bytemuck", - "byteorder 1.5.0", + "byteorder", "bzip2", "crossbeam-channel", "dashmap", @@ -4744,7 +4614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09be1798b0bae75d0981ff5d978543bed490c0f460adff784bdbdd0dc73f54f3" dependencies = [ "bincode", - "byteorder 1.5.0", + "byteorder", "libsecp256k1", "log", "scopeguard", @@ -4886,83 +4756,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "solana-core" -version = "1.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d00594c90b6a64494f7117eef664989ff7fec6477bf8c15d8547fef0aaa1007" -dependencies = [ - "base64 0.21.7", - "bincode", - "bs58 0.4.0", - "bytes", - "chrono", - "crossbeam-channel", - "dashmap", - "eager", - "etcd-client", - "futures 0.3.30", - "histogram", - "itertools", - "lazy_static", - "log", - "lru", - "min-max-heap", - "num_enum 0.7.2", - "prio-graph", - "quinn", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rayon", - "rcgen", - "rolling-file", - "rustc_version", - "rustls", - "serde", - "serde_bytes", - "serde_derive", - "solana-accounts-db", - "solana-bloom", - "solana-client", - "solana-cost-model", - "solana-entry", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-geyser-plugin-manager", - "solana-gossip", - "solana-ledger", - "solana-measure", - "solana-metrics", - "solana-net-utils", - "solana-perf", - "solana-poh", - "solana-program-runtime", - "solana-quic-client", - "solana-rayon-threadlimit", - "solana-rpc", - "solana-rpc-client-api", - "solana-runtime", - "solana-sdk", - "solana-send-transaction-service", - "solana-streamer", - "solana-tpu-client", - "solana-transaction-status", - "solana-turbine", - "solana-unified-scheduler-pool", - "solana-version", - "solana-vote", - "solana-vote-program", - "solana-wen-restart", - "strum", - "strum_macros", - "sys-info", - "sysctl", - "tempfile", - "thiserror", - "tokio", - "trees", -] - [[package]] name = "solana-cost-model" version = "1.18.1" @@ -5016,7 +4809,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31184b47b738642c91463d31b0b2837325e11cf74f904e0d8c64184f03b9b6f" dependencies = [ "bincode", - "byteorder 1.5.0", + "byteorder", "clap 2.34.0", "crossbeam-channel", "log", @@ -5040,7 +4833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b24a0e5179387f145afba79d72b27db817cecf1b9494f7cd55d42aa986ed3141" dependencies = [ "block-buffer 0.10.4", - "bs58 0.4.0", + "bs58", "bv", "either", "generic-array", @@ -5088,7 +4881,7 @@ version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93fc883819fee29da37649a4ebd0dbfb88260f24dfbb00fbc6babee1ed0e885" dependencies = [ - "bs58 0.4.0", + "bs58", "crossbeam-channel", "json5", "jsonrpc-core", @@ -5168,7 +4961,7 @@ dependencies = [ "assert_matches", "bincode", "bitflags 2.4.2", - "byteorder 1.5.0", + "byteorder", "chrono", "chrono-humanize", "crossbeam-channel", @@ -5239,42 +5032,6 @@ dependencies = [ "solana_rbpf", ] -[[package]] -name = "solana-local-cluster" -version = "1.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc3906e9fa448664c49df9fd8fad3d08bc4f19fb9a3db71649c31e84fbc0f74" -dependencies = [ - "crossbeam-channel", - "itertools", - "log", - "rand 0.8.5", - "rayon", - "solana-accounts-db", - "solana-client", - "solana-config-program", - "solana-core", - "solana-entry", - "solana-gossip", - "solana-ledger", - "solana-logger", - "solana-pubsub-client", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-runtime", - "solana-sdk", - "solana-stake-program", - "solana-streamer", - "solana-thin-client", - "solana-tpu-client", - "solana-turbine", - "solana-vote", - "solana-vote-program", - "static_assertions", - "tempfile", - "trees", -] - [[package]] name = "solana-logger" version = "1.18.1" @@ -5413,7 +5170,7 @@ dependencies = [ "borsh 0.10.3", "borsh 0.9.3", "borsh 1.3.1", - "bs58 0.4.0", + "bs58", "bv", "bytemuck", "cc", @@ -5568,7 +5325,7 @@ checksum = "5c5b3765e8fe0655d66100cd1376d754e4ab5c9fcfa3c9d6cd7b83312eafbc64" dependencies = [ "base64 0.21.7", "bincode", - "bs58 0.4.0", + "bs58", "crossbeam-channel", "dashmap", "itertools", @@ -5626,7 +5383,7 @@ dependencies = [ "async-trait", "base64 0.21.7", "bincode", - "bs58 0.4.0", + "bs58", "indicatif", "log", "reqwest", @@ -5650,7 +5407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c4d480cff245c3ba367d396da87e908095160cdf57f33efb5d1b08a7763d490" dependencies = [ "base64 0.21.7", - "bs58 0.4.0", + "bs58", "jsonrpc-core", "reqwest", "semver", @@ -5691,7 +5448,7 @@ dependencies = [ "blake3", "bv", "bytemuck", - "byteorder 1.5.0", + "byteorder", "bzip2", "crossbeam-channel", "dashmap", @@ -5766,9 +5523,9 @@ dependencies = [ "bincode", "bitflags 2.4.2", "borsh 1.3.1", - "bs58 0.4.0", + "bs58", "bytemuck", - "byteorder 1.5.0", + "byteorder", "chrono", "derivation-path", "digest 0.10.7", @@ -5816,7 +5573,7 @@ version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e3cdf8616a66e99343c3f99c39f311b4dc3e13977a4c96d7bbaa82dffd2fc5" dependencies = [ - "bs58 0.4.0", + "bs58", "proc-macro2", "quote", "rustversion", @@ -5901,7 +5658,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d033b8901290140c66b57f01379ec1400d6362589df99911ba3eca60bbc9f9d0" dependencies = [ "bincode", - "bs58 0.4.0", + "bs58", "prost", "protobuf-src", "serde", @@ -6006,7 +5763,7 @@ dependencies = [ "base64 0.21.7", "bincode", "borsh 0.10.3", - "bs58 0.4.0", + "bs58", "lazy_static", "log", "serde", @@ -6021,43 +5778,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "solana-turbine" -version = "1.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91297808bb83a5288d99ac904fa7fc224d2af053d0a92e17a000e605baa16e8b" -dependencies = [ - "bincode", - "bytes", - "crossbeam-channel", - "futures 0.3.30", - "itertools", - "log", - "lru", - "quinn", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rayon", - "rcgen", - "rustls", - "solana-entry", - "solana-gossip", - "solana-ledger", - "solana-measure", - "solana-metrics", - "solana-perf", - "solana-poh", - "solana-quic-client", - "solana-rayon-threadlimit", - "solana-rpc", - "solana-rpc-client-api", - "solana-runtime", - "solana-sdk", - "solana-streamer", - "thiserror", - "tokio", -] - [[package]] name = "solana-udp-client" version = "1.18.1" @@ -6073,26 +5793,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "solana-unified-scheduler-logic" -version = "1.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b0e0eb0827d169c5f02a0ae4704725e26e5318359bbc07dddbe6a484cbb244" - -[[package]] -name = "solana-unified-scheduler-pool" -version = "1.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74465022113b55c8bd6e2dfdd1c96928f1ff97f55f4c403808f96557f512f724" -dependencies = [ - "solana-ledger", - "solana-program-runtime", - "solana-runtime", - "solana-sdk", - "solana-unified-scheduler-logic", - "solana-vote", -] - [[package]] name = "solana-version" version = "1.18.1" @@ -6150,27 +5850,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "solana-wen-restart" -version = "1.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb348d6bfddc671fb9ff4b9ad720843537912170a9e5daab2de8b62007e05f49" -dependencies = [ - "log", - "prost", - "prost-build", - "prost-types", - "protobuf-src", - "rustc_version", - "solana-gossip", - "solana-ledger", - "solana-logger", - "solana-program", - "solana-runtime", - "solana-sdk", - "solana-vote-program", -] - [[package]] name = "solana-zk-token-proof-program" version = "1.18.1" @@ -6195,7 +5874,7 @@ dependencies = [ "base64 0.21.7", "bincode", "bytemuck", - "byteorder 1.5.0", + "byteorder", "curve25519-dalek", "getrandom 0.1.16", "itertools", @@ -6220,7 +5899,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" dependencies = [ - "byteorder 1.5.0", + "byteorder", "combine", "goblin", "hash32", @@ -6577,29 +6256,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "sys-info" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "sysctl" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225e483f02d0ad107168dc57381a8a40c3aeea6abe47f37506931f861643cfa8" -dependencies = [ - "bitflags 1.3.2", - "byteorder 1.5.0", - "libc", - "thiserror", - "walkdir", -] - [[package]] name = "system-configuration" version = "0.5.1" @@ -7037,7 +6693,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ - "byteorder 1.5.0", + "byteorder", "bytes", "data-encoding", "http", diff --git a/Cargo.toml b/Cargo.toml index e2da24b6..4251517f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,53 +1,45 @@ [workspace] - members = [ - "geyser-plugin-runner", - "geyser-plugin-runner/demo-plugin", - "txstatus", + "geyser-plugin-runner", + "geyser-plugin-runner/demo-plugin", + "txstatus", ] - resolver = "2" [workspace.dependencies] -cbor = "0.4.1" -byteorder = "1.4.3" +anyhow = "1.0.79" base64 = "0.21.5" -serde = { version = "1.0.188" } -serde_cbor = "0.11" -serde_json = "1.0.108" -integer-encoding = "4.0.0" +bincode = "1.3.3" bs58 = "0.5.0" -hex = "0.4.3" +cbor = "0.4.1" cid = "0.11.0" -multihash = "0.19.1" -bincode = "1.3.3" +colored = "2.1.0" crc = "3.0.1" +crossbeam-channel = "0.5.8" fnv = "1.0.7" -bytes = "1.5.0" +multihash = "0.19.1" prost = "0.11.9" -zstd = "0.13.0" -anyhow = "1.0.79" -thiserror = "1.0.56" -tracing = "0.1.40" -borsh = "1.2.1" -crossbeam-channel = "0.5.8" -libloading = "0.8.1" -serial_test = "2.0.0" -socket2 = { version = "0.5.5", features = ["all"] } -tempfile = "3.3.0" -# solana: -solana-account-decoder = { version = "~1.18.1" } -solana-core = { version = "~1.18.1" } -solana-local-cluster = { version = "~1.18.1" } -solana-net-utils = { version = "~1.18.1" } -solana-streamer = { version = "~1.18.1" } -solana-sdk = "~1.18.1" -solana-storage-proto = "~1.18.1" -"solana-transaction-status" = "~1.18.1" -solana-geyser-plugin-manager = "~1.18.1" -solana-rpc = "~1.18.1" -solana-program = "~1.18.1" -solana-ledger = "~1.18.1" -solana-entry = "~1.18.1" +protobuf-src = "1.1.0" +serde = "1.0.188" +serde_cbor = "0.11" +serde_json = "1.0.108" solana-accounts-db = "~1.18.1" +solana-entry = "~1.18.1" solana-geyser-plugin-interface = "~1.18.1" +solana-geyser-plugin-manager = "~1.18.1" +solana-rpc = "~1.18.1" +solana-sdk = "~1.18.1" +solana-storage-proto = "~1.18.1" +solana-transaction-status = "~1.18.1" +tonic-build = "0.9.2" +tracing = "0.1.40" +zstd = "0.13.0" + +[workspace.lints.clippy] +clone_on_ref_ptr = "deny" +missing_const_for_fn = "deny" +trivially_copy_pass_by_ref = "deny" + +[profile.release] +lto = true +codegen-units = 1 diff --git a/ci/rust-version.sh b/ci/rust-version.sh deleted file mode 100755 index 6127e8e2..00000000 --- a/ci/rust-version.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# Prints Rust version - -while read -r name equals value _; do - if [[ $name = "channel" && $equals = = ]]; then - echo "${value//\"/}" - fi -done < <(cat $(dirname "${BASH_SOURCE[0]}")/../rust-toolchain.toml) diff --git a/geyser-plugin-runner/Cargo.toml b/geyser-plugin-runner/Cargo.toml index 0b501d2e..57c51800 100644 --- a/geyser-plugin-runner/Cargo.toml +++ b/geyser-plugin-runner/Cargo.toml @@ -2,38 +2,25 @@ name = "demo-rust-ipld-car" version = "0.1.0" edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +publish = false [dependencies] -cbor = { workspace = true } -byteorder = { workspace = true } base64 = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_cbor = { workspace = true } -serde_json = { workspace = true } -integer-encoding = { workspace = true } -bs58 = { workspace = true } -hex = { workspace = true } -cid = { workspace = true } -multihash = { workspace = true } -solana-sdk = { workspace = true } bincode = { workspace = true } +cid = { workspace = true } crc = { workspace = true } +crossbeam-channel = { workspace = true } fnv = { workspace = true } -solana-storage-proto = { workspace = true } -bytes = { workspace = true } -"solana-transaction-status" = { workspace = true } +multihash = { workspace = true } prost = { workspace = true } -zstd = { workspace = true } -anyhow = { workspace = true } -thiserror = { workspace = true } -# for geyser: +serde = { workspace = true, features = ["derive"] } +serde_cbor = { workspace = true } +serde_json = { workspace = true } +solana-accounts-db = { workspace = true } +solana-entry = { workspace = true } solana-geyser-plugin-manager = { workspace = true } -crossbeam-channel = { workspace = true } solana-rpc = { workspace = true } -borsh = { workspace = true } -solana-program = { workspace = true } -solana-ledger = { workspace = true } -solana-entry = { workspace = true } -solana-accounts-db = { workspace = true } +solana-sdk = { workspace = true } +solana-storage-proto = { workspace = true } +solana-transaction-status = { workspace = true } +zstd = { workspace = true } diff --git a/geyser-plugin-runner/demo-plugin/Cargo.toml b/geyser-plugin-runner/demo-plugin/Cargo.toml index 9212bcef..a6b74ed9 100644 --- a/geyser-plugin-runner/demo-plugin/Cargo.toml +++ b/geyser-plugin-runner/demo-plugin/Cargo.toml @@ -2,29 +2,15 @@ name = "demo-plugin" version = "0.1.0" edition = "2021" +publish = false -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +crate-type = ["cdylib", "rlib"] [dependencies] +colored = { workspace = true } solana-geyser-plugin-interface = { workspace = true } tracing = { workspace = true } -colored = { version = "2.1.0" } - -[dev-dependencies] -libc = "0.2.134" -libloading = { workspace = true } -serial_test = { workspace = true } -socket2 = { workspace = true, features = ["all"] } - -solana-account-decoder = { workspace = true } -solana-core = { workspace = true } -solana-local-cluster = { workspace = true } -solana-net-utils = { workspace = true } -solana-streamer = { workspace = true } -tempfile = { workspace = true } [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] - -[lib] -crate-type = ["cdylib", "rlib"] diff --git a/geyser-plugin-runner/demo-plugin/src/lib.rs b/geyser-plugin-runner/demo-plugin/src/lib.rs index ac7fd9fd..98ec5a19 100644 --- a/geyser-plugin-runner/demo-plugin/src/lib.rs +++ b/geyser-plugin-runner/demo-plugin/src/lib.rs @@ -1,11 +1,12 @@ -use solana_geyser_plugin_interface::geyser_plugin_interface::{ - GeyserPlugin, ReplicaAccountInfoVersions, ReplicaBlockInfoVersions, ReplicaEntryInfoVersions, - ReplicaTransactionInfoVersions, Result, SlotStatus, +use { + colored::Colorize, + solana_geyser_plugin_interface::geyser_plugin_interface::{ + GeyserPlugin, ReplicaAccountInfoVersions, ReplicaBlockInfoVersions, + ReplicaEntryInfoVersions, ReplicaTransactionInfoVersions, Result, SlotStatus, + }, + tracing::info, }; -use colored::Colorize; -use tracing::info; - #[no_mangle] #[allow(improper_ctypes_definitions)] /// # Safety diff --git a/geyser-plugin-runner/src/block.rs b/geyser-plugin-runner/src/block.rs index d5791573..c5c383ed 100644 --- a/geyser-plugin-runner/src/block.rs +++ b/geyser-plugin-runner/src/block.rs @@ -1,10 +1,8 @@ -use cid::Cid; - -use std::error::Error; - -use std::vec::Vec; - -use crate::node::Kind; +use { + crate::node::Kind, + cid::Cid, + std::{error::Error, vec::Vec}, +}; // type ( // List__Shredding []Shredding @@ -31,7 +29,7 @@ impl Block { pub fn from_bytes(data: Vec) -> Result> { let decoded_data: serde_cbor::Value = serde_cbor::from_slice(&data).unwrap(); let block = Block::from_cbor(decoded_data)?; - return Ok(block); + Ok(block) } // from serde_cbor::Value @@ -108,7 +106,7 @@ impl Block { block.rewards = Cid::try_from(rewards[1..].to_vec()).unwrap(); } } - return Ok(block); + Ok(block) } pub fn to_json(&self) -> serde_json::Value { @@ -132,12 +130,12 @@ impl Block { map.insert("meta".to_string(), self.meta.to_json()); map.insert( "rewards".to_string(), - serde_json::Value::from(serde_json::json!({ + serde_json::json!({ "/": self.rewards.to_string() - })), + }), ); - return serde_json::Value::from(map); + serde_json::Value::from(map) } } @@ -1128,7 +1126,7 @@ impl Shredding { shredding.shred_end_idx = *shred_end_idx as i64; } } - return shredding; + shredding } pub fn to_json(&self) -> serde_json::Value { @@ -1142,7 +1140,7 @@ impl Shredding { serde_json::Value::from(self.shred_end_idx), ); - return serde_json::Value::from(map); + serde_json::Value::from(map) } } @@ -1201,7 +1199,7 @@ impl SlotMeta { slot_meta.block_height = Some(*block_height as u64); } } - return slot_meta; + slot_meta } pub fn to_json(&self) -> serde_json::Value { @@ -1214,7 +1212,7 @@ impl SlotMeta { "blocktime".to_string(), serde_json::Value::from(self.blocktime), ); - if self.block_height == None { + if self.block_height.is_none() { map.insert("block_height".to_string(), serde_json::Value::Null); } else { map.insert( @@ -1223,7 +1221,7 @@ impl SlotMeta { ); } - return serde_json::Value::from(map); + serde_json::Value::from(map) } } diff --git a/geyser-plugin-runner/src/dataframe.rs b/geyser-plugin-runner/src/dataframe.rs index 1b80cf71..1a439033 100644 --- a/geyser-plugin-runner/src/dataframe.rs +++ b/geyser-plugin-runner/src/dataframe.rs @@ -1,11 +1,8 @@ -use cid::Cid; - -use std::error::Error; - -use std::vec::Vec; - -use crate::node::Kind; -use crate::utils::Buffer; +use { + crate::{node::Kind, utils::Buffer}, + cid::Cid, + std::{error::Error, vec::Vec}, +}; // type DataFrame struct { // Kind int @@ -29,7 +26,7 @@ impl DataFrame { pub fn from_bytes(data: Vec) -> Result> { let decoded_data: serde_cbor::Value = serde_cbor::from_slice(&data).unwrap(); let data_frame = DataFrame::from_cbor(decoded_data)?; - return Ok(data_frame); + Ok(data_frame) } // from serde_cbor::Value pub fn from_cbor(val: serde_cbor::Value) -> Result> { @@ -74,7 +71,7 @@ impl DataFrame { if array.len() > 5 { if let Some(serde_cbor::Value::Array(next)) = &array.get(5) { - if next.len() == 0 { + if next.is_empty() { data_frame.next = None; } else { let mut nexts = vec![]; @@ -88,7 +85,7 @@ impl DataFrame { } } } - return Ok(data_frame); + Ok(data_frame) } pub fn to_json(&self) -> serde_json::Value { @@ -103,18 +100,18 @@ impl DataFrame { let mut map = serde_json::Map::new(); map.insert("kind".to_string(), serde_json::Value::from(self.kind)); - if self.hash == None { + if self.hash.is_none() { map.insert("hash".to_string(), serde_json::Value::Null); } else { - let hash_as_string = format!("{}", self.hash.unwrap() as u64); + let hash_as_string = self.hash.unwrap().to_string(); map.insert("hash".to_string(), serde_json::Value::from(hash_as_string)); } - if self.index == None { + if self.index.is_none() { map.insert("index".to_string(), serde_json::Value::Null); } else { map.insert("index".to_string(), serde_json::Value::from(self.index)); } - if self.total == None { + if self.total.is_none() { map.insert("total".to_string(), serde_json::Value::Null); } else { map.insert("total".to_string(), serde_json::Value::from(self.total)); @@ -123,13 +120,13 @@ impl DataFrame { "data".to_string(), serde_json::Value::from(self.data.to_string()), ); - if next.len() == 0 { + if next.is_empty() { map.insert("next".to_string(), serde_json::Value::Null); } else { map.insert("next".to_string(), serde_json::Value::from(next)); } - return serde_json::Value::from(map); + serde_json::Value::from(map) } } diff --git a/geyser-plugin-runner/src/entry.rs b/geyser-plugin-runner/src/entry.rs index 840e6571..cee86ede 100644 --- a/geyser-plugin-runner/src/entry.rs +++ b/geyser-plugin-runner/src/entry.rs @@ -1,13 +1,11 @@ -use cid::Cid; - -use std::error::Error; - -use std::vec::Vec; - -use crate::node::Kind; -use crate::utils; - -use crate::utils::Hash; +use { + crate::{ + node::Kind, + utils::{self, Hash}, + }, + cid::Cid, + std::{error::Error, vec::Vec}, +}; // type Entry struct { // Kind int @@ -27,7 +25,7 @@ impl Entry { pub fn from_bytes(data: Vec) -> Result> { let decoded_data: serde_cbor::Value = serde_cbor::from_slice(&data).unwrap(); let entry = Entry::from_cbor(decoded_data)?; - return Ok(entry); + Ok(entry) } // from serde_cbor::Value @@ -73,7 +71,7 @@ impl Entry { } } } - return Ok(entry); + Ok(entry) } pub fn to_json(&self) -> serde_json::Value { @@ -94,16 +92,16 @@ impl Entry { "hash".to_string(), serde_json::Value::from(self.hash.clone().to_string()), ); - if self.transactions.len() > 0 { + if self.transactions.is_empty() { + map.insert("transactions".to_string(), serde_json::Value::Null); + } else { map.insert( "transactions".to_string(), serde_json::Value::from(transactions), ); - } else { - map.insert("transactions".to_string(), serde_json::Value::Null); } - return serde_json::Value::from(map); + serde_json::Value::from(map) } } diff --git a/geyser-plugin-runner/src/epoch.rs b/geyser-plugin-runner/src/epoch.rs index 466de0a1..1f6c3a4c 100644 --- a/geyser-plugin-runner/src/epoch.rs +++ b/geyser-plugin-runner/src/epoch.rs @@ -1,9 +1,8 @@ -use cid::Cid; -use std::error::Error; - -use std::vec::Vec; - -use crate::node::Kind; +use { + crate::node::Kind, + cid::Cid, + std::{error::Error, vec::Vec}, +}; // type ( // Epoch struct { // Kind int @@ -22,7 +21,7 @@ impl Epoch { pub fn from_bytes(data: Vec) -> Result> { let decoded_data: serde_cbor::Value = serde_cbor::from_slice(&data).unwrap(); let epoch = Epoch::from_cbor(decoded_data)?; - return Ok(epoch); + Ok(epoch) } pub fn from_cbor(val: serde_cbor::Value) -> Result> { @@ -63,7 +62,7 @@ impl Epoch { } } } - return Ok(epoch); + Ok(epoch) } pub fn to_json(&self) -> serde_json::Value { @@ -79,7 +78,7 @@ impl Epoch { map.insert("epoch".to_string(), serde_json::Value::from(self.epoch)); map.insert("subsets".to_string(), serde_json::Value::from(subsets)); - return serde_json::Value::from(map); + serde_json::Value::from(map) } } diff --git a/geyser-plugin-runner/src/lib.rs b/geyser-plugin-runner/src/lib.rs new file mode 100644 index 00000000..0b4af376 --- /dev/null +++ b/geyser-plugin-runner/src/lib.rs @@ -0,0 +1,11 @@ +#![recursion_limit = "512"] + +pub mod block; +pub mod dataframe; +pub mod entry; +pub mod epoch; +pub mod node; +pub mod rewards; +pub mod subset; +pub mod transaction; +pub mod utils; diff --git a/geyser-plugin-runner/src/main.rs b/geyser-plugin-runner/src/main.rs index 87807d3e..d1375c73 100644 --- a/geyser-plugin-runner/src/main.rs +++ b/geyser-plugin-runner/src/main.rs @@ -1,31 +1,17 @@ -#![recursion_limit = "512"] - -use std::env::args; -use std::error::Error; - -use std::convert::TryInto; -use std::sync::RwLock; - -// geyser: -use core::panic; - -use crossbeam_channel::unbounded; -use solana_accounts_db::stake_rewards::RewardInfo; -use solana_geyser_plugin_manager::{self}; -use solana_rpc::optimistically_confirmed_bank_tracker::SlotNotification; -use solana_sdk::reward_type::RewardType; - -use std::{convert::TryFrom, str::FromStr}; - -mod block; -mod dataframe; -mod entry; -mod epoch; -mod node; -mod rewards; -mod subset; -mod transaction; -mod utils; +use { + crossbeam_channel::unbounded, + demo_rust_ipld_car::{node, utils}, + solana_accounts_db::stake_rewards::RewardInfo, + solana_rpc::optimistically_confirmed_bank_tracker::SlotNotification, + solana_sdk::reward_type::RewardType, + std::{ + convert::{TryFrom, TryInto}, + env::args, + error::Error, + str::FromStr, + sync::RwLock, + }, +}; fn main() -> Result<(), Box> { let file_path = args().nth(1).expect("no file given"); @@ -89,11 +75,11 @@ fn main() -> Result<(), Box> { let decompressed = utils::decompress_zstd(reassembled_metadata.clone())?; let metadata: solana_storage_proto::convert::generated::TransactionStatusMeta = - prost::Message::decode(decompressed.as_slice()).or_else(|err| { - Err(Box::new(std::io::Error::new( + prost::Message::decode(decompressed.as_slice()).map_err(|err| { + Box::new(std::io::Error::new( std::io::ErrorKind::Other, std::format!("Error decoding metadata: {:?}", err), - ))) + )) })?; @@ -102,8 +88,8 @@ fn main() -> Result<(), Box> { { // TODO: test address loading. - let dummy_address_loader = MessageAddressLoaderFromTxMeta::new(as_native_metadata.clone().into()); - let sanitized_tx= match parsed.version() { + let dummy_address_loader = MessageAddressLoaderFromTxMeta::new(as_native_metadata.clone()); + let sanitized_tx = match parsed.version() { solana_sdk::transaction::TransactionVersion::Number(_)=> { let message_hash = parsed.verify_and_hash_message()?; let versioned_sanitized_tx= solana_sdk::transaction::SanitizedVersionedTransaction::try_from(parsed)?; @@ -119,9 +105,6 @@ fn main() -> Result<(), Box> { parsed.into_legacy_transaction().unwrap() , ) }, - _ => { - panic!("___ not supported version"); - } }; if sanitized_tx.is_err() { panic!( @@ -197,7 +180,7 @@ fn main() -> Result<(), Box> { Err(_err) => None, }, }; - rewards.write().unwrap().push((solana_sdk::pubkey::Pubkey::from_str(&this_block_reward.pubkey)?, reward.into())); + rewards.write().unwrap().push((solana_sdk::pubkey::Pubkey::from_str(&this_block_reward.pubkey)?, reward)); } } // if rewards.read().unwrap().len() > 0 { @@ -229,25 +212,26 @@ fn main() -> Result<(), Box> { println!("___ Rewards: {:?}", node_with_cid.get_cid()); // println!("___ Next items: {:?}", rewards.data.next); + #[allow(clippy::overly_complex_bool_expr)] if !rewards.is_complete() && false { let reassembled = nodes.reassemble_dataframes(rewards.data.clone())?; println!("___ reassembled: {:?}", reassembled.len()); let decompressed = utils::decompress_zstd(reassembled)?; - this_block_rewards= prost::Message::decode(decompressed.as_slice()).or_else(|err| { - Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - std::format!("Error decoding rewards: {:?}", err), - ))) - })?; + this_block_rewards = prost::Message::decode(decompressed.as_slice()).map_err(|err| { + Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + std::format!("Error decoding rewards: {:?}", err), + )) + })?; } } node::Node::DataFrame(_) => { println!("___ DataFrame: {:?}", node_with_cid.get_cid()); } } - return Ok(()); + Ok(()) })?; } } diff --git a/geyser-plugin-runner/src/node.rs b/geyser-plugin-runner/src/node.rs index bb1fbe25..4e14243e 100644 --- a/geyser-plugin-runner/src/node.rs +++ b/geyser-plugin-runner/src/node.rs @@ -1,21 +1,17 @@ -use cid::Cid; -use core::hash::Hasher; -use crc::{Crc, CRC_64_GO_ISO}; -use fnv::FnvHasher; - -use std::error::Error; -use std::fs::File; -use std::io::{self, BufReader, Read}; -use std::vec::Vec; - -use crate::block; -use crate::dataframe; -use crate::entry; -use crate::epoch; -use crate::rewards; -use crate::subset; -use crate::transaction; -use crate::utils; +use { + crate::{block, dataframe, entry, epoch, rewards, subset, transaction, utils}, + cid::Cid, + core::hash::Hasher, + crc::{Crc, CRC_64_GO_ISO}, + fnv::FnvHasher, + std::{ + error::Error, + fmt, + fs::File, + io::{self, BufReader, Read}, + vec::Vec, + }, +}; pub struct NodeWithCid { cid: Cid, @@ -36,6 +32,7 @@ impl NodeWithCid { } } +#[derive(Default)] pub struct NodesWithCids(pub Vec); impl NodesWithCids { @@ -51,17 +48,18 @@ impl NodesWithCids { self.0.len() } + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + pub fn get(&self, index: usize) -> &NodeWithCid { &self.0[index] } pub fn get_by_cid(&self, cid: &Cid) -> Option<&NodeWithCid> { - for node_with_cid in &self.0 { - if node_with_cid.get_cid() == cid { - return Some(node_with_cid); - } - } - return None; + self.0 + .iter() + .find(|&node_with_cid| node_with_cid.get_cid() == cid) } pub fn reassemble_dataframes( @@ -90,7 +88,7 @@ impl NodesWithCids { let next_dataframe = next_node_un.get_node().get_dataframe().unwrap(); data.extend(next_dataframe.data.to_vec()); - next_arr = next_dataframe.next.clone(); + next_arr.clone_from(&next_dataframe.next); } } @@ -98,7 +96,7 @@ impl NodesWithCids { let wanted_hash = first_dataframe.hash.unwrap(); verify_hash(data.clone(), wanted_hash)?; } - return Ok(data); + Ok(data) } pub fn each(&self, mut f: F) -> Result<(), Box> @@ -108,15 +106,15 @@ impl NodesWithCids { for node_with_cid in &self.0 { f(node_with_cid)?; } - return Ok(()); + Ok(()) } pub fn get_cids(&self) -> Vec { let mut cids = vec![]; for node_with_cid in &self.0 { - cids.push(node_with_cid.get_cid().clone()); + cids.push(*node_with_cid.get_cid()); } - return cids; + cids } pub fn get_block(&self) -> Result<&block::Block, Box> { @@ -125,7 +123,7 @@ impl NodesWithCids { if last_node.is_none() { return Err(Box::new(std::io::Error::new( std::io::ErrorKind::Other, - std::format!("No nodes"), + "No nodes".to_owned(), ))); } let last_node_un = last_node.unwrap(); @@ -136,7 +134,7 @@ impl NodesWithCids { ))); } let block = last_node_un.get_node().get_block().unwrap(); - return Ok(block); + Ok(block) } } @@ -157,22 +155,20 @@ pub fn verify_hash(data: Vec, hash: u64) -> Result<(), Box> { ))); } } - return Ok(()); + Ok(()) } -fn checksum_crc64(data: &Vec) -> u64 { +fn checksum_crc64(data: &[u8]) -> u64 { let crc = Crc::::new(&CRC_64_GO_ISO); let mut digest = crc.digest(); digest.update(data); - let crc64 = digest.finalize(); - crc64 + digest.finalize() } -fn checksum_fnv(data: &Vec) -> u64 { +fn checksum_fnv(data: &[u8]) -> u64 { let mut hasher = FnvHasher::default(); hasher.write(data); - let hash = hasher.finish(); - hash + hasher.finish() } #[derive(Clone, PartialEq, Eq, Hash, Debug)] @@ -188,46 +184,31 @@ pub enum Node { impl Node { pub fn is_transaction(&self) -> bool { - match self { - Node::Transaction(_) => true, - _ => false, - } + matches!(self, Node::Transaction(_)) } + pub fn is_entry(&self) -> bool { - match self { - Node::Entry(_) => true, - _ => false, - } + matches!(self, Node::Entry(_)) } + pub fn is_block(&self) -> bool { - match self { - Node::Block(_) => true, - _ => false, - } + matches!(self, Node::Block(_)) } + pub fn is_subset(&self) -> bool { - match self { - Node::Subset(_) => true, - _ => false, - } + matches!(self, Node::Subset(_)) } + pub fn is_epoch(&self) -> bool { - match self { - Node::Epoch(_) => true, - _ => false, - } + matches!(self, Node::Epoch(_)) } + pub fn is_rewards(&self) -> bool { - match self { - Node::Rewards(_) => true, - _ => false, - } + matches!(self, Node::Rewards(_)) } + pub fn is_dataframe(&self) -> bool { - match self { - Node::DataFrame(_) => true, - _ => false, - } + matches!(self, Node::DataFrame(_)) } pub fn get_transaction(&self) -> Option<&transaction::Transaction> { @@ -291,57 +272,48 @@ pub fn parse_any_from_cbordata(data: Vec) -> Result> { // ); // based on the kind, we can decode the rest of the data - match kind { - kind => match Kind::from_u64(*kind as u64).unwrap() { - Kind::Transaction => { - let transaction = transaction::Transaction::from_cbor(cloned_data)?; - return Ok(Node::Transaction(transaction)); - } - Kind::Entry => { - let entry = entry::Entry::from_cbor(cloned_data)?; - return Ok(Node::Entry(entry)); - } - Kind::Block => { - let block = block::Block::from_cbor(cloned_data)?; - return Ok(Node::Block(block)); - } - Kind::Subset => { - let subset = subset::Subset::from_cbor(cloned_data)?; - return Ok(Node::Subset(subset)); - } - Kind::Epoch => { - let epoch = epoch::Epoch::from_cbor(cloned_data)?; - return Ok(Node::Epoch(epoch)); - } - Kind::Rewards => { - let rewards = rewards::Rewards::from_cbor(cloned_data)?; - return Ok(Node::Rewards(rewards)); - } - Kind::DataFrame => { - let dataframe = dataframe::DataFrame::from_cbor(cloned_data)?; - return Ok(Node::DataFrame(dataframe)); - } - unknown => { - return Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - std::format!("Unknown type: {:?}", unknown), - ))) - } - }, - unknown => { - return Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - std::format!("Unknown type: {:?}", unknown), - ))) + match Kind::from_u64(*kind as u64).unwrap() { + Kind::Transaction => { + let transaction = transaction::Transaction::from_cbor(cloned_data)?; + return Ok(Node::Transaction(transaction)); + } + Kind::Entry => { + let entry = entry::Entry::from_cbor(cloned_data)?; + return Ok(Node::Entry(entry)); } + Kind::Block => { + let block = block::Block::from_cbor(cloned_data)?; + return Ok(Node::Block(block)); + } + Kind::Subset => { + let subset = subset::Subset::from_cbor(cloned_data)?; + return Ok(Node::Subset(subset)); + } + Kind::Epoch => { + let epoch = epoch::Epoch::from_cbor(cloned_data)?; + return Ok(Node::Epoch(epoch)); + } + Kind::Rewards => { + let rewards = rewards::Rewards::from_cbor(cloned_data)?; + return Ok(Node::Rewards(rewards)); + } + Kind::DataFrame => { + let dataframe = dataframe::DataFrame::from_cbor(cloned_data)?; + return Ok(Node::DataFrame(dataframe)); + } // unknown => { + // return Err(Box::new(std::io::Error::new( + // std::io::ErrorKind::Other, + // std::format!("Unknown type: {:?}", unknown), + // ))) + // } } } } - return Err(Box::new(std::io::Error::new( + Err(Box::new(std::io::Error::new( std::io::ErrorKind::Other, - std::format!("Unknown type"), - ))); + "Unknown type".to_owned(), + ))) } pub enum Kind { @@ -354,14 +326,29 @@ pub enum Kind { DataFrame, } -impl std::fmt::Debug for Kind { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl fmt::Debug for Kind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Kind") .field("kind", &self.to_string()) .finish() } } +impl fmt::Display for Kind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let kind = match self { + Kind::Transaction => "Transaction", + Kind::Entry => "Entry", + Kind::Block => "Block", + Kind::Subset => "Subset", + Kind::Epoch => "Epoch", + Kind::Rewards => "Rewards", + Kind::DataFrame => "DataFrame", + }; + write!(f, "{}", kind) + } +} + impl Kind { pub fn from_u64(kind: u64) -> Option { match kind { @@ -387,18 +374,6 @@ impl Kind { Kind::DataFrame => 6, } } - - pub fn to_string(&self) -> String { - match self { - Kind::Transaction => "Transaction".to_string(), - Kind::Entry => "Entry".to_string(), - Kind::Block => "Block".to_string(), - Kind::Subset => "Subset".to_string(), - Kind::Epoch => "Epoch".to_string(), - Kind::Rewards => "Rewards".to_string(), - Kind::DataFrame => "DataFrame".to_string(), - } - } } pub struct RawNode { @@ -407,8 +382,8 @@ pub struct RawNode { } // Debug trait for RawNode -impl std::fmt::Debug for RawNode { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl fmt::Debug for RawNode { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("RawNode") .field("cid", &self.cid) .field("data", &self.data) @@ -425,14 +400,14 @@ impl RawNode { let parsed = parse_any_from_cbordata(self.data.clone()); if parsed.is_err() { println!("Error: {:?}", parsed.err().unwrap()); + Err(Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + "Unknown type".to_owned(), + ))) } else { let node = parsed.unwrap(); - return Ok(node); + Ok(node) } - return Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - std::format!("Unknown type"), - ))); } pub fn from_cursor(cursor: &mut io::Cursor>) -> Result> { @@ -453,7 +428,7 @@ impl RawNode { if digest_length > 64 { return Err(Box::new(std::io::Error::new( std::io::ErrorKind::Other, - std::format!("Digest length too long"), + "Digest length too long".to_owned(), ))); } @@ -473,19 +448,17 @@ impl RawNode { 0 => { let cid = Cid::new_v0(ha)?; let raw_node = RawNode::new(cid, data); - return Ok(raw_node); + Ok(raw_node) } 1 => { let cid = Cid::new_v1(multicodec, ha); let raw_node = RawNode::new(cid, data); - return Ok(raw_node); - } - _ => { - return Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - std::format!("Unknown CID version"), - ))); + Ok(raw_node) } + _ => Err(Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + "Unknown CID version".to_owned(), + ))), } } } @@ -500,8 +473,7 @@ impl NodeReader { pub fn new(file_path: String) -> Result> { let file = File::open(file_path)?; // create a buffered reader over the file - let MiB = 1024 * 1024; - let capacity = MiB * 8; + let capacity = 8 * 1024 * 1024; let reader = BufReader::with_capacity(capacity, file); let node_reader = NodeReader { @@ -509,31 +481,32 @@ impl NodeReader { header: vec![], item_index: 0, }; - return Ok(node_reader); + Ok(node_reader) } pub fn read_raw_header(&mut self) -> Result, Box> { - if self.header.len() > 0 { + if !self.header.is_empty() { return Ok(self.header.clone()); }; let header_length = utils::read_uvarint(&mut self.reader)?; if header_length > 1024 { return Err(Box::new(std::io::Error::new( std::io::ErrorKind::Other, - std::format!("Header length too long"), + "Header length too long".to_owned(), ))); } let mut header = vec![0u8; header_length as usize]; self.reader.read_exact(&mut header)?; - self.header = header.clone(); + self.header.clone_from(&header); let clone = header.clone(); - return Ok(clone.as_slice().to_owned()); + Ok(clone.as_slice().to_owned()) } + #[allow(clippy::should_implement_trait)] pub fn next(&mut self) -> Result> { - if self.header.len() == 0 { + if self.header.is_empty() { self.read_raw_header()?; }; @@ -547,7 +520,7 @@ impl NodeReader { if section_size > utils::MAX_ALLOWED_SECTION_SIZE as u64 { return Err(Box::new(std::io::Error::new( std::io::ErrorKind::Other, - std::format!("Section size too long"), + "Section size too long".to_owned(), ))); } @@ -561,13 +534,13 @@ impl NodeReader { // now create a cursor over the item let mut cursor = io::Cursor::new(item); - return RawNode::from_cursor(&mut cursor); + RawNode::from_cursor(&mut cursor) } pub fn next_parsed(&mut self) -> Result> { let raw_node = self.next()?; - let cid = raw_node.cid.clone(); - return Ok(NodeWithCid::new(cid, raw_node.parse()?)); + let cid = raw_node.cid; + Ok(NodeWithCid::new(cid, raw_node.parse()?)) } pub fn read_until_block(&mut self) -> Result> { @@ -580,7 +553,7 @@ impl NodeReader { } nodes.push(node); } - return Ok(nodes); + Ok(nodes) } pub fn get_item_index(&self) -> u64 { diff --git a/geyser-plugin-runner/src/rewards.rs b/geyser-plugin-runner/src/rewards.rs index 7259617f..9fe35f68 100644 --- a/geyser-plugin-runner/src/rewards.rs +++ b/geyser-plugin-runner/src/rewards.rs @@ -1,9 +1,7 @@ -use std::error::Error; -use std::vec::Vec; - -use crate::dataframe; -use crate::node::Kind; -use crate::utils::Buffer; +use { + crate::{dataframe, node::Kind, utils::Buffer}, + std::{error::Error, vec::Vec}, +}; // type Rewards struct { // Kind int @@ -21,7 +19,7 @@ impl Rewards { pub fn from_bytes(data: Vec) -> Result> { let decoded_data: serde_cbor::Value = serde_cbor::from_slice(&data).unwrap(); let rewards = Rewards::from_cbor(decoded_data)?; - return Ok(rewards); + Ok(rewards) } // from serde_cbor::Value @@ -65,7 +63,7 @@ impl Rewards { dataframe::DataFrame::from_cbor(serde_cbor::Value::Array(data.clone()))?; } } - return Ok(rewards); + Ok(rewards) } pub fn to_json(&self) -> serde_json::Value { @@ -74,19 +72,18 @@ impl Rewards { map.insert("slot".to_string(), serde_json::Value::from(self.slot)); map.insert("data".to_string(), self.data.to_json()); - return serde_json::Value::from(map); + serde_json::Value::from(map) } /// Returns whether the rewards data is complete or is split into multiple dataframes. pub fn is_complete(&self) -> bool { - return self.data.next.is_none() || self.data.next.as_ref().unwrap().len() == 0; + self.data.next.is_none() || self.data.next.as_ref().unwrap().is_empty() } } #[cfg(test)] mod rewards_tests { - use super::*; - use cid::Cid; + use {super::*, cid::Cid}; #[test] fn test_rewards() { diff --git a/geyser-plugin-runner/src/subset.rs b/geyser-plugin-runner/src/subset.rs index 75265e27..7bf75dfa 100644 --- a/geyser-plugin-runner/src/subset.rs +++ b/geyser-plugin-runner/src/subset.rs @@ -1,10 +1,8 @@ -use cid::Cid; - -use std::error::Error; - -use std::vec::Vec; - -use crate::node::Kind; +use { + crate::node::Kind, + cid::Cid, + std::{error::Error, vec::Vec}, +}; // type Subset struct { // Kind int @@ -24,7 +22,7 @@ impl Subset { pub fn from_bytes(data: Vec) -> Result> { let decoded_data: serde_cbor::Value = serde_cbor::from_slice(&data).unwrap(); let subset = Subset::from_cbor(decoded_data)?; - return Ok(subset); + Ok(subset) } // from serde_cbor::Value @@ -70,7 +68,7 @@ impl Subset { } } } - return Ok(subset); + Ok(subset) } pub fn to_json(&self) -> serde_json::Value { @@ -87,7 +85,7 @@ impl Subset { map.insert("last".to_string(), serde_json::Value::from(self.last)); map.insert("blocks".to_string(), serde_json::Value::from(blocks)); - return serde_json::Value::from(map); + serde_json::Value::from(map) } } diff --git a/geyser-plugin-runner/src/transaction.rs b/geyser-plugin-runner/src/transaction.rs index a69cae91..fe67ce4f 100644 --- a/geyser-plugin-runner/src/transaction.rs +++ b/geyser-plugin-runner/src/transaction.rs @@ -1,10 +1,8 @@ -use bincode::deserialize; -use std::error::Error; -use std::vec::Vec; - -use crate::dataframe::DataFrame; -use crate::node::Kind; -use crate::utils::Buffer; +use { + crate::{dataframe::DataFrame, node::Kind, utils::Buffer}, + bincode::deserialize, + std::{error::Error, vec::Vec}, +}; // type Transaction struct { // Kind int @@ -26,7 +24,7 @@ impl Transaction { pub fn from_bytes(data: Vec) -> Result> { let decoded_data: serde_cbor::Value = serde_cbor::from_slice(&data).unwrap(); let transaction = Transaction::from_cbor(decoded_data)?; - return Ok(transaction); + Ok(transaction) } // from serde_cbor::Value @@ -88,7 +86,7 @@ impl Transaction { transaction.index = Some(*index as u64); } } - return Ok(transaction); + Ok(transaction) } pub fn to_json(&self) -> serde_json::Value { @@ -99,29 +97,28 @@ impl Transaction { map.insert("slot".to_string(), serde_json::Value::from(self.slot)); map.insert("index".to_string(), serde_json::Value::from(self.index)); - return serde_json::Value::from(map); + serde_json::Value::from(map) } pub fn as_parsed( &self, ) -> Result> { - return Ok(deserialize(&self.data.data.to_vec())?); + Ok(deserialize(&self.data.data.to_vec())?) } /// Returns whether the transaction dataframe is complete or is split into multiple dataframes. pub fn is_complete_data(&self) -> bool { - return self.data.next.is_none() || self.data.next.as_ref().unwrap().len() == 0; + self.data.next.is_none() || self.data.next.as_ref().unwrap().is_empty() } /// Returns whether the transaction metadata is complete or is split into multiple dataframes. pub fn is_complete_metadata(&self) -> bool { - return self.metadata.next.is_none() || self.metadata.next.as_ref().unwrap().len() == 0; + self.metadata.next.is_none() || self.metadata.next.as_ref().unwrap().is_empty() } } #[cfg(test)] mod transaction_tests { - use super::*; - use cid::Cid; + use {super::*, cid::Cid}; #[test] fn test_transaction() { diff --git a/geyser-plugin-runner/src/utils.rs b/geyser-plugin-runner/src/utils.rs index df6c8c44..a7fdd5e6 100644 --- a/geyser-plugin-runner/src/utils.rs +++ b/geyser-plugin-runner/src/utils.rs @@ -1,9 +1,11 @@ -use std::error::Error; - -use base64::engine::general_purpose::STANDARD; -use base64::engine::Engine; -use std::io::{self, Read}; -use std::vec::Vec; +use { + base64::engine::{general_purpose::STANDARD, Engine}, + std::{ + error::Error, + io::{self, Read}, + vec::Vec, + }, +}; const MAX_VARINT_LEN_64: usize = 10; @@ -101,16 +103,15 @@ impl Hash { pub fn from_vec(data: Vec) -> Hash { Hash(data) } + pub fn to_bytes(&self) -> [u8; 32] { let mut bytes = [0u8; 32]; - for i in 0..32 { - bytes[i] = self.0[i]; - } - return bytes; + bytes[..32].copy_from_slice(&self.0[..32]); + bytes } } -#[derive(Clone, PartialEq, Eq, Hash)] +#[derive(Default, Clone, PartialEq, Eq, Hash)] pub struct Buffer(Vec); impl Buffer { @@ -127,13 +128,17 @@ impl Buffer { for _ in 0..len { data.push(self.0.remove(0)); } - return data; + data } pub fn len(&self) -> usize { self.0.len() } + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + pub fn to_vec(&self) -> Vec { self.0.clone() } @@ -171,7 +176,7 @@ impl<'de> serde::Deserialize<'de> for Buffer { D: serde::de::Deserializer<'de>, { let base64 = String::deserialize(deserializer)?; - Ok(Buffer(STANDARD.decode(&base64).unwrap())) + Ok(Buffer(STANDARD.decode(base64).unwrap())) } } @@ -181,5 +186,5 @@ pub fn decompress_zstd(data: Vec) -> Result, Box> { let mut decoder = zstd::Decoder::new(&data[..])?; let mut decompressed = Vec::new(); decoder.read_to_end(&mut decompressed)?; - return Ok(decompressed); + Ok(decompressed) } diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..fe957b9b --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +edition = "2021" +imports_granularity = "One" +group_imports = "One" diff --git a/txstatus/.gitignore b/txstatus/.gitignore index b1b85578..c3af8579 100644 --- a/txstatus/.gitignore +++ b/txstatus/.gitignore @@ -1,2 +1 @@ -/target lib/ diff --git a/txstatus/Cargo.lock b/txstatus/Cargo.lock deleted file mode 100644 index 4d38837f..00000000 --- a/txstatus/Cargo.lock +++ /dev/null @@ -1,3316 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", - "opaque-debug", -] - -[[package]] -name = "aes-gcm-siv" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "polyval", - "subtle", - "zeroize", -] - -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom 0.2.10", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if", - "getrandom 0.2.10", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint 0.4.4", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint 0.4.4", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.10.7", - "num-bigint 0.4.4", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "array-bytes" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "ascii" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "async-compression" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb42b2197bf15ccb092b62c74515dbd8b86d0effd934795f6687c93b6e679a2c" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "base64" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "blake3" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.7", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", -] - -[[package]] -name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", -] - -[[package]] -name = "borsh-derive" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" -dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "brotli" -version = "3.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "bv" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -dependencies = [ - "feature-probe", - "serde", -] - -[[package]] -name = "bytemuck" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - -[[package]] -name = "combine" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" -dependencies = [ - "ascii", - "byteorder", - "either", - "memchr", - "unreachable", -] - -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - -[[package]] -name = "console_log" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" -dependencies = [ - "log", - "web-sys", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cpufeatures" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "serde", - "subtle", - "zeroize", -] - -[[package]] -name = "darling" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.37", -] - -[[package]] -name = "darling_macro" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "demo-transaction-status-ffi" -version = "0.1.0" -dependencies = [ - "bs58", - "byteorder", - "chrono", - "libc", - "serde_json", - "solana-sdk", - "solana-transaction-status", -] - -[[package]] -name = "derivation-path" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common", - "subtle", -] - -[[package]] -name = "eager" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-dalek-bip32" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" -dependencies = [ - "derivation-path", - "ed25519-dalek", - "hmac 0.12.1", - "sha2 0.10.7", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enum-iterator" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "flate2" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-core", - "futures-io", - "futures-macro", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "gethostname" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - -[[package]] -name = "goblin" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" -dependencies = [ - "log", - "plain", - "scroll", -] - -[[package]] -name = "h2" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hash32" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.6", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.3", -] - -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", -] - -[[package]] -name = "http" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.4.9", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" -dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "im" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" -dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", - "serde", - "sized-chunks", - "typenum", - "version_check", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" -dependencies = [ - "equivalent", - "hashbrown 0.14.0", -] - -[[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.148" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" - -[[package]] -name = "libsecp256k1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "merlin" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.6.4", - "zeroize", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", -] - -[[package]] -name = "num" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" -dependencies = [ - "num-bigint 0.2.6", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg", - "num-bigint 0.2.6", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.3", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "object" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac", -] - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "percentage" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" -dependencies = [ - "num", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "qstring" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rayon" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "reqwest" -version = "0.11.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" -dependencies = [ - "async-compression", - "base64 0.21.4", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-rustls", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "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", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" -dependencies = [ - "base64 0.21.4", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "semver" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" - -[[package]] -name = "serde" -version = "1.0.188" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.188" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "serde_json" -version = "1.0.107" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" -dependencies = [ - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - -[[package]] -name = "sized-chunks" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" -dependencies = [ - "bitmaps", - "typenum", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "solana-account-decoder" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b83daa56035885dac1a47f5bd3d4e02379e3fc5915b2c3ce978a9af9eeecf07d" -dependencies = [ - "Inflector", - "base64 0.21.4", - "bincode", - "bs58", - "bv", - "lazy_static", - "serde", - "serde_derive", - "serde_json", - "solana-address-lookup-table-program", - "solana-config-program", - "solana-sdk", - "spl-token", - "spl-token-2022", - "thiserror", - "zstd", -] - -[[package]] -name = "solana-address-lookup-table-program" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd3f3e85d67e559985fbdc6b5b4d5dd9c8462b78e6079c3b465496c1f3c55d6" -dependencies = [ - "bincode", - "bytemuck", - "log", - "num-derive", - "num-traits", - "rustc_version", - "serde", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-program", - "solana-program-runtime", - "solana-sdk", - "thiserror", -] - -[[package]] -name = "solana-config-program" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a35e4cc9f2996a2ef95aac398443fc4a110ef585521e11a7685b3591648b7cf" -dependencies = [ - "bincode", - "chrono", - "serde", - "serde_derive", - "solana-program-runtime", - "solana-sdk", -] - -[[package]] -name = "solana-frozen-abi" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b9e2169fd13394af838b13f047067c35ce69372aea0fb46e026405b5e931f9" -dependencies = [ - "ahash 0.8.3", - "blake3", - "block-buffer 0.10.4", - "bs58", - "bv", - "byteorder", - "cc", - "either", - "generic-array", - "getrandom 0.1.16", - "im", - "lazy_static", - "log", - "memmap2", - "once_cell", - "rand_core 0.6.4", - "rustc_version", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.10.7", - "solana-frozen-abi-macro", - "subtle", - "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db08ab0af4007dc0954b900aa5febc0c0ae50d9f9f598be27263c3195d90240b" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.37", -] - -[[package]] -name = "solana-logger" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8a48e734f78a44399516f7c130c114b455911e351f001abc0d96e7c5694efa" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - -[[package]] -name = "solana-measure" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3529d2ff63ceedd3707c51188aacb9e3c142118de3f55447c40584a78223ffd" -dependencies = [ - "log", - "solana-sdk", -] - -[[package]] -name = "solana-metrics" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4792f29de5378a13c51be3fa9fdd526a20550b5ffabd7d1a57a4e49468e17d90" -dependencies = [ - "crossbeam-channel", - "gethostname", - "lazy_static", - "log", - "reqwest", - "solana-sdk", -] - -[[package]] -name = "solana-program" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f17a1fbcf1e94e282db16153d323b446d6386ac99f597f78e76332265829336" -dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "array-bytes", - "base64 0.21.4", - "bincode", - "bitflags", - "blake3", - "borsh 0.10.3", - "borsh 0.9.3", - "bs58", - "bv", - "bytemuck", - "cc", - "console_error_panic_hook", - "console_log", - "curve25519-dalek", - "getrandom 0.2.10", - "itertools", - "js-sys", - "lazy_static", - "libc", - "libsecp256k1", - "log", - "memoffset", - "num-bigint 0.4.4", - "num-derive", - "num-traits", - "parking_lot", - "rand 0.7.3", - "rand_chacha 0.2.2", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.10.7", - "sha3 0.10.8", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk-macro", - "thiserror", - "tiny-bip39", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "solana-program-runtime" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ff9f0c8043b2e7921e25a3fee88fa253b8cb5dbab1e521a4d83e78e8874c551" -dependencies = [ - "base64 0.21.4", - "bincode", - "eager", - "enum-iterator", - "itertools", - "libc", - "log", - "num-derive", - "num-traits", - "percentage", - "rand 0.7.3", - "rustc_version", - "serde", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-measure", - "solana-metrics", - "solana-sdk", - "solana_rbpf", - "thiserror", -] - -[[package]] -name = "solana-sdk" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a01f25b9f4022fc222c21c589ef7943027fb0fa2b9f6ae943fc4a65c2c01a2" -dependencies = [ - "assert_matches", - "base64 0.21.4", - "bincode", - "bitflags", - "borsh 0.10.3", - "bs58", - "bytemuck", - "byteorder", - "chrono", - "derivation-path", - "digest 0.10.7", - "ed25519-dalek", - "ed25519-dalek-bip32", - "generic-array", - "hmac 0.12.1", - "itertools", - "js-sys", - "lazy_static", - "libsecp256k1", - "log", - "memmap2", - "num-derive", - "num-traits", - "num_enum 0.6.1", - "pbkdf2 0.11.0", - "qstring", - "rand 0.7.3", - "rand_chacha 0.2.2", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "serde_with", - "sha2 0.10.7", - "sha3 0.10.8", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-program", - "solana-sdk-macro", - "thiserror", - "uriparse", - "wasm-bindgen", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75b33716470fa4a65a23ddc2d4abcb8d28532c6e3ae3f04f4fe79b5e1f8c247" -dependencies = [ - "bs58", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.37", -] - -[[package]] -name = "solana-transaction-status" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9266f75afa4163c9a5f29f1066f907e87482858749942380d6538af567b44c7" -dependencies = [ - "Inflector", - "base64 0.21.4", - "bincode", - "borsh 0.9.3", - "bs58", - "lazy_static", - "log", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-address-lookup-table-program", - "solana-sdk", - "spl-associated-token-account", - "spl-memo", - "spl-token", - "spl-token-2022", - "thiserror", -] - -[[package]] -name = "solana-zk-token-sdk" -version = "1.16.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1669c9d223d850cd96cad69d3ba1a4234bc3e2f83ac837fbdbc0ce774dac7b92" -dependencies = [ - "aes-gcm-siv", - "base64 0.21.4", - "bincode", - "bytemuck", - "byteorder", - "curve25519-dalek", - "getrandom 0.1.16", - "itertools", - "lazy_static", - "merlin", - "num-derive", - "num-traits", - "rand 0.7.3", - "serde", - "serde_json", - "sha3 0.9.1", - "solana-program", - "solana-sdk", - "subtle", - "thiserror", - "zeroize", -] - -[[package]] -name = "solana_rbpf" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3082ec3a1d4ef7879eb5b84916d5acde057abd59733eec3647e0ab8885283ef" -dependencies = [ - "byteorder", - "combine", - "goblin", - "hash32", - "libc", - "log", - "rand 0.8.5", - "rustc-demangle", - "scroll", - "thiserror", - "winapi", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spl-associated-token-account" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" -dependencies = [ - "assert_matches", - "borsh 0.9.3", - "num-derive", - "num-traits", - "solana-program", - "spl-token", - "spl-token-2022", - "thiserror", -] - -[[package]] -name = "spl-memo" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" -dependencies = [ - "solana-program", -] - -[[package]] -name = "spl-token" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive", - "num-traits", - "num_enum 0.5.11", - "solana-program", - "thiserror", -] - -[[package]] -name = "spl-token-2022" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive", - "num-traits", - "num_enum 0.5.11", - "solana-program", - "solana-zk-token-sdk", - "spl-memo", - "spl-token", - "thiserror", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "termcolor" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "tiny-bip39" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" -dependencies = [ - "anyhow", - "hmac 0.8.1", - "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.9", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2 0.5.4", - "windows-sys", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.0.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -dependencies = [ - "void", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "uriparse" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" -dependencies = [ - "fnv", - "lazy_static", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.37", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" - -[[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "winnow" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys", -] - -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" -dependencies = [ - "cc", - "libc", - "pkg-config", -] diff --git a/txstatus/Cargo.toml b/txstatus/Cargo.toml index 8ae2752d..f85e90de 100644 --- a/txstatus/Cargo.toml +++ b/txstatus/Cargo.toml @@ -2,20 +2,7 @@ name = "demo-transaction-status-ffi" version = "0.1.0" edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -libc = "0.2.2" -chrono = "0.4.19" -bs58 = "0.4.0" -serde_json = "1.0.107" -byteorder = "1.4.3" -solana-transaction-status = "1.16.13" -solana-sdk = "1.16.13" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +publish = false [lib] # If you only wanted shared lib, you'd use only "cdylib". @@ -23,6 +10,10 @@ targets = ["x86_64-unknown-linux-gnu"] # This demo shows both. crate-type = ["staticlib", "cdylib"] -[profile.release] -lto = true -codegen-units = 1 +[dependencies] +serde_json = { workspace = true } +solana-sdk = { workspace = true } +solana-transaction-status = { workspace = true } + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] diff --git a/txstatus/src/lib.rs b/txstatus/src/lib.rs index 33716a5a..0cbd2819 100644 --- a/txstatus/src/lib.rs +++ b/txstatus/src/lib.rs @@ -1,21 +1,25 @@ -use std::slice; -// use std::time::Instant; +use { + reader::Decoder, + solana_sdk::{ + instruction::CompiledInstruction, + message::{v0::LoadedAddresses, AccountKeys}, + pubkey::Pubkey, + }, + solana_transaction_status::parse_instruction::parse, +}; -mod byte_order; -mod reader; -mod type_size; - -use reader::Decoder; -use solana_sdk::message::v0::LoadedAddresses; -use solana_sdk::{instruction::CompiledInstruction, message::AccountKeys, pubkey::Pubkey}; -use solana_transaction_status::parse_instruction::parse; +pub mod byte_order; +pub mod reader; +pub mod type_size; +/// # Safety +/// Bytes length should have at least len size. #[no_mangle] -pub extern "C" fn parse_instruction(bytes: *const u8, len: usize) -> Response { +pub unsafe extern "C" fn parse_instruction(bytes: *const u8, len: usize) -> Response { // let started_at = Instant::now(); let bytes = { assert!(!bytes.is_null()); - unsafe { slice::from_raw_parts(bytes, len) } + std::slice::from_raw_parts(bytes, len) }; let bytes = bytes.to_vec(); // println!("[rust] params raw bytes: {:?}", bytes); diff --git a/txstatus/src/reader.rs b/txstatus/src/reader.rs index cfa28e6f..465889b4 100644 --- a/txstatus/src/reader.rs +++ b/txstatus/src/reader.rs @@ -1,6 +1,7 @@ -use crate::byte_order; -use crate::type_size; -use std::error::Error as StdError; +use { + crate::{byte_order, type_size}, + std::error::Error as StdError, +}; // declare error type pub enum Error { @@ -167,6 +168,10 @@ impl Decoder { self.data.len() } + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + pub fn has_remaining(&self) -> bool { self.remaining() > 0 }