zebra/zebra-rpc/Cargo.toml

94 lines
3.2 KiB
TOML
Raw Normal View History

[package]
name = "zebra-rpc"
version = "1.0.0-beta.31"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
change(crates): Prepare for publishing crates to crates.io (#6908) * change(crates): Publish tower-batch-control * Cargo fields for zebra-test * Cargo fields for tower-fallback * Cargo fields for zebra-chain * Cargo fields for zebra-consensus * Cargo fields for zebra-network * Cargo fields for zebra-node-services * Cargo fields for zebra-rpc * Cargo fields for zebra-script * Cargo fields for zebra-state * Cargo fields for zebrad * Cargo fields for zebra-test * Include zebra-test version and path for zebra-chain * Include zebra-chain version and path for zebra-node-services * Include zebra-chain version and path for zebra-script * Include zebra-chain and zebra-test versions and paths for zebra-state * Include zebra-* versions and paths for zebra-consensus * Include zebra-* and tower-fallback versions and paths for tower-batch-control * Include tower-* versions and paths for zebra-consensus * Fixed tower-fallback license string * Remove versions for dev-dependencise * Update zebra-rpc/Cargo.toml Co-authored-by: teor <teor@riseup.net> * tower-batch-control license MUST remain MIT only * Align zebra-network with upstream tower's MIT license * Update zebra-test/Cargo.toml Co-authored-by: teor <teor@riseup.net> * Update zebra-utils/Cargo.toml Co-authored-by: teor <teor@riseup.net> * fix(legal): Use correct licenses for tower-batch-control and zebra-network (#6927) * Don't modify whitespace * Resolve rustdoc and cargo-release warnings * Add missing zebra internal dependency versions * Workaround missing zebra-utils test dependency in zebrad test-only feature * Fix missing zebra internal dependency versions * Add README, home page, and search terms to every crate * Fix README publish warnings * Change tower crates to beta versions * Add zebra-utils to the list of allowed unused dependencies * Update tower-batch-control/Cargo.toml * Update tower-fallback/Cargo.toml --------- Co-authored-by: teor <teor@riseup.net>
2023-06-13 01:46:01 -07:00
description = "A Zebra JSON Remote Procedure Call (JSON-RPC) interface"
license = "MIT OR Apache-2.0"
change(crates): Prepare for publishing crates to crates.io (#6908) * change(crates): Publish tower-batch-control * Cargo fields for zebra-test * Cargo fields for tower-fallback * Cargo fields for zebra-chain * Cargo fields for zebra-consensus * Cargo fields for zebra-network * Cargo fields for zebra-node-services * Cargo fields for zebra-rpc * Cargo fields for zebra-script * Cargo fields for zebra-state * Cargo fields for zebrad * Cargo fields for zebra-test * Include zebra-test version and path for zebra-chain * Include zebra-chain version and path for zebra-node-services * Include zebra-chain version and path for zebra-script * Include zebra-chain and zebra-test versions and paths for zebra-state * Include zebra-* versions and paths for zebra-consensus * Include zebra-* and tower-fallback versions and paths for tower-batch-control * Include tower-* versions and paths for zebra-consensus * Fixed tower-fallback license string * Remove versions for dev-dependencise * Update zebra-rpc/Cargo.toml Co-authored-by: teor <teor@riseup.net> * tower-batch-control license MUST remain MIT only * Align zebra-network with upstream tower's MIT license * Update zebra-test/Cargo.toml Co-authored-by: teor <teor@riseup.net> * Update zebra-utils/Cargo.toml Co-authored-by: teor <teor@riseup.net> * fix(legal): Use correct licenses for tower-batch-control and zebra-network (#6927) * Don't modify whitespace * Resolve rustdoc and cargo-release warnings * Add missing zebra internal dependency versions * Workaround missing zebra-utils test dependency in zebrad test-only feature * Fix missing zebra internal dependency versions * Add README, home page, and search terms to every crate * Fix README publish warnings * Change tower crates to beta versions * Add zebra-utils to the list of allowed unused dependencies * Update tower-batch-control/Cargo.toml * Update tower-fallback/Cargo.toml --------- Co-authored-by: teor <teor@riseup.net>
2023-06-13 01:46:01 -07:00
repository = "https://github.com/ZcashFoundation/zebra"
edition = "2021"
change(crates): Prepare for publishing crates to crates.io (#6908) * change(crates): Publish tower-batch-control * Cargo fields for zebra-test * Cargo fields for tower-fallback * Cargo fields for zebra-chain * Cargo fields for zebra-consensus * Cargo fields for zebra-network * Cargo fields for zebra-node-services * Cargo fields for zebra-rpc * Cargo fields for zebra-script * Cargo fields for zebra-state * Cargo fields for zebrad * Cargo fields for zebra-test * Include zebra-test version and path for zebra-chain * Include zebra-chain version and path for zebra-node-services * Include zebra-chain version and path for zebra-script * Include zebra-chain and zebra-test versions and paths for zebra-state * Include zebra-* versions and paths for zebra-consensus * Include zebra-* and tower-fallback versions and paths for tower-batch-control * Include tower-* versions and paths for zebra-consensus * Fixed tower-fallback license string * Remove versions for dev-dependencise * Update zebra-rpc/Cargo.toml Co-authored-by: teor <teor@riseup.net> * tower-batch-control license MUST remain MIT only * Align zebra-network with upstream tower's MIT license * Update zebra-test/Cargo.toml Co-authored-by: teor <teor@riseup.net> * Update zebra-utils/Cargo.toml Co-authored-by: teor <teor@riseup.net> * fix(legal): Use correct licenses for tower-batch-control and zebra-network (#6927) * Don't modify whitespace * Resolve rustdoc and cargo-release warnings * Add missing zebra internal dependency versions * Workaround missing zebra-utils test dependency in zebrad test-only feature * Fix missing zebra internal dependency versions * Add README, home page, and search terms to every crate * Fix README publish warnings * Change tower crates to beta versions * Add zebra-utils to the list of allowed unused dependencies * Update tower-batch-control/Cargo.toml * Update tower-fallback/Cargo.toml --------- Co-authored-by: teor <teor@riseup.net>
2023-06-13 01:46:01 -07:00
readme = "../README.md"
homepage = "https://zfnd.org/zebra/"
# crates.io is limited to 5 keywords and categories
keywords = ["zebra", "zcash"]
# Must be one of <https://crates.io/category_slugs>
categories = ["asynchronous", "cryptography::cryptocurrencies", "encoding", "network-programming"]
[features]
default = []
# Production features that activate extra dependencies, or extra features in dependencies
# Experimental mining RPC support
getblocktemplate-rpcs = [
"rand",
"zcash_address",
"zebra-consensus/getblocktemplate-rpcs",
"zebra-state/getblocktemplate-rpcs",
"zebra-node-services/getblocktemplate-rpcs",
"zebra-chain/getblocktemplate-rpcs",
]
# Test-only features
proptest-impl = [
"proptest",
"zebra-consensus/proptest-impl",
"zebra-state/proptest-impl",
"zebra-network/proptest-impl",
"zebra-chain/proptest-impl",
]
[dependencies]
chrono = { version = "0.4.31", default-features = false, features = ["clock", "std"] }
futures = "0.3.29"
feature(rpc): add an rpc server to Zebra (#3589) * feature(rpc): add an rpc component * feat(rpc): add a stub for getblockchaininfo This is the first RPC used by lightwalletd, so we need it for testing. * fix(rpc): remove non-standard "jsonrpc: 1.0" from lightwalletd * fix(rpc): re-enable default RPC security checks * deps(rpc): remove not needed dependency * fix(rpc): check if RPC task has stopped * fix(rpc): reduce config by using Option * fix(rpc): use tokio executor * security(rpc): turn off rpc by default * docs(rpc): update a TODO comment Co-authored-by: teor <teor@riseup.net> * fix(rpc): blocking tasks Co-authored-by: teor <teor@riseup.net> * rename(rpc): rpc.rs to methods.rs * refactor(rpc): move the server to the zebra-rpc crate * fix(rpc): clippy derive Default for RPC Config * fix(dependencies): remove unused dependency features in zebra-rpc We expect to use all the listed tokio features to implement and test RPC methods. * doc(rpc): fix testnet port, add security note * fix(rpc): change Rust function names and update method doc TODOs * fix(rpc): add "TODO" to fake RPC responses * doc(rpc): update module docs * fix(rpc): simplify server struct derives * fix(rpc): simplify server code * doc(rpc): explain how request fixes securely handle user-supplied data * refactor(rpc): move the compatibility fix to a separate module * fix(rpc): move the open log inside the spawn, and instrument it * doc(rpc): fix toml format and provide a config example Co-authored-by: teor <teor@riseup.net>
2022-02-22 03:26:29 -08:00
# lightwalletd sends JSON-RPC requests over HTTP 1.1
hyper = { version = "0.14.27", features = ["http1", "server"] }
feature(rpc): add an rpc server to Zebra (#3589) * feature(rpc): add an rpc component * feat(rpc): add a stub for getblockchaininfo This is the first RPC used by lightwalletd, so we need it for testing. * fix(rpc): remove non-standard "jsonrpc: 1.0" from lightwalletd * fix(rpc): re-enable default RPC security checks * deps(rpc): remove not needed dependency * fix(rpc): check if RPC task has stopped * fix(rpc): reduce config by using Option * fix(rpc): use tokio executor * security(rpc): turn off rpc by default * docs(rpc): update a TODO comment Co-authored-by: teor <teor@riseup.net> * fix(rpc): blocking tasks Co-authored-by: teor <teor@riseup.net> * rename(rpc): rpc.rs to methods.rs * refactor(rpc): move the server to the zebra-rpc crate * fix(rpc): clippy derive Default for RPC Config * fix(dependencies): remove unused dependency features in zebra-rpc We expect to use all the listed tokio features to implement and test RPC methods. * doc(rpc): fix testnet port, add security note * fix(rpc): change Rust function names and update method doc TODOs * fix(rpc): add "TODO" to fake RPC responses * doc(rpc): update module docs * fix(rpc): simplify server struct derives * fix(rpc): simplify server code * doc(rpc): explain how request fixes securely handle user-supplied data * refactor(rpc): move the compatibility fix to a separate module * fix(rpc): move the open log inside the spawn, and instrument it * doc(rpc): fix toml format and provide a config example Co-authored-by: teor <teor@riseup.net>
2022-02-22 03:26:29 -08:00
jsonrpc-core = "18.0.0"
jsonrpc-derive = "18.0.0"
jsonrpc-http-server = "18.0.0"
num_cpus = "1.16.0"
feat(rpc): Implement `getblockchaininfo` RPC method (#3891) * Implement `getblockchaininfo` RPC method * add a test for `get_blockchain_info` * fix tohex/fromhex * move comment * Update lightwalletd acceptance test for getblockchaininfo RPC (#3914) * change(rpc): Return getblockchaininfo network upgrades in height order (#3915) * Update lightwalletd acceptance test for getblockchaininfo RPC * Update some doc comments for network upgrades * List network upgrades in order in the getblockchaininfo RPC Also: - Use a constant for the "missing consensus branch ID" RPC value - Simplify fetching consensus branch IDs - Make RPC type derives consistent - Update RPC type documentation * Make RPC type derives consistent * Fix a confusing test comment * get hashand height at the same time * fix estimated_height * fix lint * add extra check Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com> * fix typo Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com> * split test Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com> * fix(rpc): ignore an expected error in the RPC acceptance tests (#3961) * Add ignored regexes to test command failure regex methods * Ignore empty chain error in getblockchaininfo We expect this error when zebrad starts up with an empty state. Co-authored-by: teor <teor@riseup.net> Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-25 05:25:31 -07:00
# zebra-rpc needs the preserve_order feature in serde_json, which is a dependency of jsonrpc-core
serde_json = { version = "1.0.108", features = ["preserve_order"] }
indexmap = { version = "2.0.1", features = ["serde"] }
feature(rpc): add an rpc server to Zebra (#3589) * feature(rpc): add an rpc component * feat(rpc): add a stub for getblockchaininfo This is the first RPC used by lightwalletd, so we need it for testing. * fix(rpc): remove non-standard "jsonrpc: 1.0" from lightwalletd * fix(rpc): re-enable default RPC security checks * deps(rpc): remove not needed dependency * fix(rpc): check if RPC task has stopped * fix(rpc): reduce config by using Option * fix(rpc): use tokio executor * security(rpc): turn off rpc by default * docs(rpc): update a TODO comment Co-authored-by: teor <teor@riseup.net> * fix(rpc): blocking tasks Co-authored-by: teor <teor@riseup.net> * rename(rpc): rpc.rs to methods.rs * refactor(rpc): move the server to the zebra-rpc crate * fix(rpc): clippy derive Default for RPC Config * fix(dependencies): remove unused dependency features in zebra-rpc We expect to use all the listed tokio features to implement and test RPC methods. * doc(rpc): fix testnet port, add security note * fix(rpc): change Rust function names and update method doc TODOs * fix(rpc): add "TODO" to fake RPC responses * doc(rpc): update module docs * fix(rpc): simplify server struct derives * fix(rpc): simplify server code * doc(rpc): explain how request fixes securely handle user-supplied data * refactor(rpc): move the compatibility fix to a separate module * fix(rpc): move the open log inside the spawn, and instrument it * doc(rpc): fix toml format and provide a config example Co-authored-by: teor <teor@riseup.net>
2022-02-22 03:26:29 -08:00
build(deps): bump the prod group with 7 updates (#7938) Bumps the prod group with 7 updates: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.4.7` | `4.4.8` | | [serde](https://github.com/serde-rs/serde) | `1.0.190` | `1.0.192` | | [toml](https://github.com/toml-rs/toml) | `0.8.6` | `0.8.8` | | [tokio](https://github.com/tokio-rs/tokio) | `1.33.0` | `1.34.0` | | [sentry](https://github.com/getsentry/sentry-rust) | `0.31.7` | `0.31.8` | | [inferno](https://github.com/jonhoo/inferno) | `0.11.17` | `0.11.18` | | [proptest](https://github.com/proptest-rs/proptest) | `1.3.1` | `1.4.0` | Updates `clap` from 4.4.7 to 4.4.8 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.7...v4.4.8) Updates `serde` from 1.0.190 to 1.0.192 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.190...v1.0.192) Updates `toml` from 0.8.6 to 0.8.8 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.6...toml-v0.8.8) Updates `tokio` from 1.33.0 to 1.34.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.33.0...tokio-1.34.0) Updates `sentry` from 0.31.7 to 0.31.8 - [Release notes](https://github.com/getsentry/sentry-rust/releases) - [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-rust/compare/0.31.7...0.31.8) Updates `inferno` from 0.11.17 to 0.11.18 - [Changelog](https://github.com/jonhoo/inferno/blob/main/CHANGELOG.md) - [Commits](https://github.com/jonhoo/inferno/compare/v0.11.17...v0.11.18) Updates `proptest` from 1.3.1 to 1.4.0 - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md) - [Commits](https://github.com/proptest-rs/proptest/compare/v1.3.1...v1.4.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: sentry dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: inferno dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: proptest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 17:03:57 -08:00
tokio = { version = "1.34.0", features = ["time", "rt-multi-thread", "macros", "tracing"] }
tower = "0.4.13"
feature(rpc): add an rpc server to Zebra (#3589) * feature(rpc): add an rpc component * feat(rpc): add a stub for getblockchaininfo This is the first RPC used by lightwalletd, so we need it for testing. * fix(rpc): remove non-standard "jsonrpc: 1.0" from lightwalletd * fix(rpc): re-enable default RPC security checks * deps(rpc): remove not needed dependency * fix(rpc): check if RPC task has stopped * fix(rpc): reduce config by using Option * fix(rpc): use tokio executor * security(rpc): turn off rpc by default * docs(rpc): update a TODO comment Co-authored-by: teor <teor@riseup.net> * fix(rpc): blocking tasks Co-authored-by: teor <teor@riseup.net> * rename(rpc): rpc.rs to methods.rs * refactor(rpc): move the server to the zebra-rpc crate * fix(rpc): clippy derive Default for RPC Config * fix(dependencies): remove unused dependency features in zebra-rpc We expect to use all the listed tokio features to implement and test RPC methods. * doc(rpc): fix testnet port, add security note * fix(rpc): change Rust function names and update method doc TODOs * fix(rpc): add "TODO" to fake RPC responses * doc(rpc): update module docs * fix(rpc): simplify server struct derives * fix(rpc): simplify server code * doc(rpc): explain how request fixes securely handle user-supplied data * refactor(rpc): move the compatibility fix to a separate module * fix(rpc): move the open log inside the spawn, and instrument it * doc(rpc): fix toml format and provide a config example Co-authored-by: teor <teor@riseup.net>
2022-02-22 03:26:29 -08:00
tracing = "0.1.39"
feature(rpc): add an rpc server to Zebra (#3589) * feature(rpc): add an rpc component * feat(rpc): add a stub for getblockchaininfo This is the first RPC used by lightwalletd, so we need it for testing. * fix(rpc): remove non-standard "jsonrpc: 1.0" from lightwalletd * fix(rpc): re-enable default RPC security checks * deps(rpc): remove not needed dependency * fix(rpc): check if RPC task has stopped * fix(rpc): reduce config by using Option * fix(rpc): use tokio executor * security(rpc): turn off rpc by default * docs(rpc): update a TODO comment Co-authored-by: teor <teor@riseup.net> * fix(rpc): blocking tasks Co-authored-by: teor <teor@riseup.net> * rename(rpc): rpc.rs to methods.rs * refactor(rpc): move the server to the zebra-rpc crate * fix(rpc): clippy derive Default for RPC Config * fix(dependencies): remove unused dependency features in zebra-rpc We expect to use all the listed tokio features to implement and test RPC methods. * doc(rpc): fix testnet port, add security note * fix(rpc): change Rust function names and update method doc TODOs * fix(rpc): add "TODO" to fake RPC responses * doc(rpc): update module docs * fix(rpc): simplify server struct derives * fix(rpc): simplify server code * doc(rpc): explain how request fixes securely handle user-supplied data * refactor(rpc): move the compatibility fix to a separate module * fix(rpc): move the open log inside the spawn, and instrument it * doc(rpc): fix toml format and provide a config example Co-authored-by: teor <teor@riseup.net>
2022-02-22 03:26:29 -08:00
Refactor `SentTransactionHash` to be a stricter type (#3706) * Stub `sendrawtransaction` RPC method Register the RPC method, and stub an implementation that currently just panics. The method has a single `String` parameter with the hexadecimal string of the raw transaction's bytes and returns a `SentTransactionHash` wrapper type that's just a hexadecimal `String` of the sent transaction's hash. * Add mempool service instance to `RpcImpl` Use a type parameter to represent the mempool service using the interface defined by `zebra-node-services`. * Update test vector to use a mock mempool service Update the test to be compatible with the changes to `RpcImpl`. The mock mempool service is expected to not be used during the test. * Use a `tower::Buffer` for the mempool service Make it simpler to send requests to the service in a concurrent manner. * Return a `Future` from `send_raw_transaction` Make the call asynchronous. * Implement `sendrawtransaction` RPC Deserialize the transaction and send it to be queued for verification and subsequent inclusion in the mempool. * Test if mempool receives sent raw transaction Use a mock service as the mempool service and check that it receives a sent raw transaction. * Test using non-hexadecimal string parameter The method should return an error. * Test with bytes that fail deserialization Check that the method returns an invalid parameters error if the input can't be deserialized as a `Transaction`. * Test if mempool errors are forwarded to caller Mempool service errors should be sent back to the remote caller as server errors. * Test transactions rejected by the mempool service Transactions that are rejected by the mempool service should result in a server error being sent to the caller. * Improve error message Add the word "structurally" to make it clear that the issue is in the transaction's deserialization. Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com> * Add note regarding missing `allowhighfees` param. The parameter isn't supported yet because `lightwalletd` doesn't use it. * Update the documentation to be consistent Follow the convention adopted by the `get_info` RPC method. * Implement `ToHex` and `FromHex` for `Hash` Make it easier to generate hexadecimal strings from `transaction::Hash` instances. * Use `ToHex` in `Debug` and `Display` Reduce repeated code. * Refactor to add `bytes_in_display_order` method Use it to remove repeated code and improve clarity a bit. * Use `hex::serialize` to serialize transaction hash Make the type stricter in its contents, while still serializing the transaction has as a hexadecimal string. * Simplify serialization attribute Deserialization should also use `hex::deserialize`, so using the shorter attribute makes things easier to read and more future proof. * Update zebra-chain/src/transaction/hash.rs * Remove unnecessary lifetime The anonymous lifetime is automatically inferred by the compiler. Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-03-08 01:14:21 -08:00
hex = { version = "0.4.3", features = ["serde"] }
serde = { version = "1.0.193", features = ["serde_derive"] }
# Experimental feature getblocktemplate-rpcs
rand = { version = "0.8.5", optional = true }
# ECC deps used by getblocktemplate-rpcs feature
build(deps): update ecc dependencies for `zcashd` 5.6.0, and create legacy state format compatibility layer (#7053) * update ecc dependencies no serialization * use zcash_primitives merke tree functions for serialization/deserialization in orchard and sapling trees * some more work in sapling/orchard serialization/deserialization * clippy * fix doc links * fix missing doc * make orchard trees serializa/deserialize as they were before upgrade * make sapling trees serialize/deserialize as they were before upgrade * use legacy for sprout * remove unused code * readd snapshot tests * repalce some code * upgrade zcash_proofs * remove legacy code for sprout * fix the count method * add root to serialize * fixes in as_bytes and from_bytes * use legacy code * add todo about pow2 tests * remove unused sprout code * fix doc typos * Add a recalculate_root() method to trees for tests * Rename test tree types to make them easier to change * Add TODOs for tests for old and new serialization formats * fix doc typos * add more test to note commitment trees * fix comment * fix leaf serializatiuon, reverse to old hashes in pow2 tests * fix serialization * put sapling SerializedTree code back * put orchard SerializedTree code back * clippy * add duplicated dependencies until zebra_script updates * fix a doc link * minor cleanup * remove todo comment from tests * add one more check to tests * update zebra_script * update deny.toml * replace custom function with library * fix some tests * update docs * Remove duplicate dependencies from deny.toml Based on the list at: https://github.com/ZcashFoundation/zebra/actions/runs/5557139662/jobs/10150543673?pr=7053#step:5:14 --------- Co-authored-by: teor <teor@riseup.net>
2023-07-17 15:06:27 -07:00
zcash_address = { version = "0.3.0", optional = true }
# Test-only feature proptest-impl
build(deps): bump the prod group with 7 updates (#7938) Bumps the prod group with 7 updates: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.4.7` | `4.4.8` | | [serde](https://github.com/serde-rs/serde) | `1.0.190` | `1.0.192` | | [toml](https://github.com/toml-rs/toml) | `0.8.6` | `0.8.8` | | [tokio](https://github.com/tokio-rs/tokio) | `1.33.0` | `1.34.0` | | [sentry](https://github.com/getsentry/sentry-rust) | `0.31.7` | `0.31.8` | | [inferno](https://github.com/jonhoo/inferno) | `0.11.17` | `0.11.18` | | [proptest](https://github.com/proptest-rs/proptest) | `1.3.1` | `1.4.0` | Updates `clap` from 4.4.7 to 4.4.8 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.7...v4.4.8) Updates `serde` from 1.0.190 to 1.0.192 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.190...v1.0.192) Updates `toml` from 0.8.6 to 0.8.8 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.6...toml-v0.8.8) Updates `tokio` from 1.33.0 to 1.34.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.33.0...tokio-1.34.0) Updates `sentry` from 0.31.7 to 0.31.8 - [Release notes](https://github.com/getsentry/sentry-rust/releases) - [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-rust/compare/0.31.7...0.31.8) Updates `inferno` from 0.11.17 to 0.11.18 - [Changelog](https://github.com/jonhoo/inferno/blob/main/CHANGELOG.md) - [Commits](https://github.com/jonhoo/inferno/compare/v0.11.17...v0.11.18) Updates `proptest` from 1.3.1 to 1.4.0 - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md) - [Commits](https://github.com/proptest-rs/proptest/compare/v1.3.1...v1.4.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: sentry dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: inferno dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: proptest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 17:03:57 -08:00
proptest = { version = "1.4.0", optional = true }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.31", features = ["json-conversion"] }
zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.31" }
zebra-network = { path = "../zebra-network", version = "1.0.0-beta.31" }
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.31" }
zebra-script = { path = "../zebra-script", version = "1.0.0-beta.31" }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.31" }
[dev-dependencies]
build(deps): bump the test group with 4 updates (#7706) Bumps the test group with 4 updates: [proptest](https://github.com/proptest-rs/proptest), [insta](https://github.com/mitsuhiko/insta), [tonic](https://github.com/hyperium/tonic) and [tonic-build](https://github.com/hyperium/tonic). Updates `proptest` from 1.2.0 to 1.3.1 - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md) - [Commits](https://github.com/proptest-rs/proptest/compare/v1.2.0...v1.3.1) Updates `insta` from 1.32.0 to 1.33.0 - [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitsuhiko/insta/compare/1.32.0...1.33.0) Updates `tonic` from 0.10.1 to 0.10.2 - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/tonic/compare/v0.10.1...v0.10.2) Updates `tonic-build` from 0.10.1 to 0.10.2 - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/tonic/compare/v0.10.1...v0.10.2) --- updated-dependencies: - dependency-name: proptest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test - dependency-name: insta dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test - dependency-name: tonic dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: tonic-build dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 14:27:12 -07:00
insta = { version = "1.33.0", features = ["redactions", "json", "ron"] }
build(deps): bump the prod group with 7 updates (#7938) Bumps the prod group with 7 updates: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.4.7` | `4.4.8` | | [serde](https://github.com/serde-rs/serde) | `1.0.190` | `1.0.192` | | [toml](https://github.com/toml-rs/toml) | `0.8.6` | `0.8.8` | | [tokio](https://github.com/tokio-rs/tokio) | `1.33.0` | `1.34.0` | | [sentry](https://github.com/getsentry/sentry-rust) | `0.31.7` | `0.31.8` | | [inferno](https://github.com/jonhoo/inferno) | `0.11.17` | `0.11.18` | | [proptest](https://github.com/proptest-rs/proptest) | `1.3.1` | `1.4.0` | Updates `clap` from 4.4.7 to 4.4.8 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.7...v4.4.8) Updates `serde` from 1.0.190 to 1.0.192 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.190...v1.0.192) Updates `toml` from 0.8.6 to 0.8.8 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.6...toml-v0.8.8) Updates `tokio` from 1.33.0 to 1.34.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.33.0...tokio-1.34.0) Updates `sentry` from 0.31.7 to 0.31.8 - [Release notes](https://github.com/getsentry/sentry-rust/releases) - [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-rust/compare/0.31.7...0.31.8) Updates `inferno` from 0.11.17 to 0.11.18 - [Changelog](https://github.com/jonhoo/inferno/blob/main/CHANGELOG.md) - [Commits](https://github.com/jonhoo/inferno/compare/v0.11.17...v0.11.18) Updates `proptest` from 1.3.1 to 1.4.0 - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md) - [Commits](https://github.com/proptest-rs/proptest/compare/v1.3.1...v1.4.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: sentry dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: inferno dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: proptest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 17:03:57 -08:00
proptest = "1.4.0"
thiserror = "1.0.48"
build(deps): bump the prod group with 7 updates (#7938) Bumps the prod group with 7 updates: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.4.7` | `4.4.8` | | [serde](https://github.com/serde-rs/serde) | `1.0.190` | `1.0.192` | | [toml](https://github.com/toml-rs/toml) | `0.8.6` | `0.8.8` | | [tokio](https://github.com/tokio-rs/tokio) | `1.33.0` | `1.34.0` | | [sentry](https://github.com/getsentry/sentry-rust) | `0.31.7` | `0.31.8` | | [inferno](https://github.com/jonhoo/inferno) | `0.11.17` | `0.11.18` | | [proptest](https://github.com/proptest-rs/proptest) | `1.3.1` | `1.4.0` | Updates `clap` from 4.4.7 to 4.4.8 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.7...v4.4.8) Updates `serde` from 1.0.190 to 1.0.192 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.190...v1.0.192) Updates `toml` from 0.8.6 to 0.8.8 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.6...toml-v0.8.8) Updates `tokio` from 1.33.0 to 1.34.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.33.0...tokio-1.34.0) Updates `sentry` from 0.31.7 to 0.31.8 - [Release notes](https://github.com/getsentry/sentry-rust/releases) - [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-rust/compare/0.31.7...0.31.8) Updates `inferno` from 0.11.17 to 0.11.18 - [Changelog](https://github.com/jonhoo/inferno/blob/main/CHANGELOG.md) - [Commits](https://github.com/jonhoo/inferno/compare/v0.11.17...v0.11.18) Updates `proptest` from 1.3.1 to 1.4.0 - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md) - [Commits](https://github.com/proptest-rs/proptest/compare/v1.3.1...v1.4.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod - dependency-name: sentry dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: inferno dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod - dependency-name: proptest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 17:03:57 -08:00
tokio = { version = "1.34.0", features = ["full", "tracing", "test-util"] }
Implement `sendrawtransaction` RPC (#3685) * Stub `sendrawtransaction` RPC method Register the RPC method, and stub an implementation that currently just panics. The method has a single `String` parameter with the hexadecimal string of the raw transaction's bytes and returns a `SentTransactionHash` wrapper type that's just a hexadecimal `String` of the sent transaction's hash. * Add mempool service instance to `RpcImpl` Use a type parameter to represent the mempool service using the interface defined by `zebra-node-services`. * Update test vector to use a mock mempool service Update the test to be compatible with the changes to `RpcImpl`. The mock mempool service is expected to not be used during the test. * Use a `tower::Buffer` for the mempool service Make it simpler to send requests to the service in a concurrent manner. * Return a `Future` from `send_raw_transaction` Make the call asynchronous. * Implement `sendrawtransaction` RPC Deserialize the transaction and send it to be queued for verification and subsequent inclusion in the mempool. * Test if mempool receives sent raw transaction Use a mock service as the mempool service and check that it receives a sent raw transaction. * Test using non-hexadecimal string parameter The method should return an error. * Test with bytes that fail deserialization Check that the method returns an invalid parameters error if the input can't be deserialized as a `Transaction`. * Test if mempool errors are forwarded to caller Mempool service errors should be sent back to the remote caller as server errors. * Test transactions rejected by the mempool service Transactions that are rejected by the mempool service should result in a server error being sent to the caller. * Improve error message Add the word "structurally" to make it clear that the issue is in the transaction's deserialization. Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com> * Add note regarding missing `allowhighfees` param. The parameter isn't supported yet because `lightwalletd` doesn't use it. * Update the documentation to be consistent Follow the convention adopted by the `get_info` RPC method. * Remove mempool service usage line It contained incomplete information that's not really necessary. Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com> * Fix formatting `rustfmt` was not executed on the file for the previous commit because I had edited it on GitHub. Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com> Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2022-03-03 23:00:24 -08:00
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
zebra-consensus = { path = "../zebra-consensus", features = ["proptest-impl"] }
zebra-network = { path = "../zebra-network", features = ["proptest-impl"] }
zebra-state = { path = "../zebra-state", features = ["proptest-impl"] }
zebra-test = { path = "../zebra-test" }