zebra/zebrad/Cargo.toml

74 lines
2.4 KiB
TOML
Raw Normal View History

[package]
name = "zebrad"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
license = "MIT OR Apache-2.0"
version = "1.0.0-alpha.17"
edition = "2018"
repository = "https://github.com/ZcashFoundation/zebra"
# make `cargo run` use `zebrad` by default
# when run in the workspace directory
default-run = "zebrad"
[dependencies]
zebra-chain = { path = "../zebra-chain" }
zebra-consensus = { path = "../zebra-consensus/" }
zebra-network = { path = "../zebra-network" }
zebra-state = { path = "../zebra-state" }
2019-12-20 11:20:04 -08:00
abscissa_core = "0.5"
gumdrop = "0.7"
serde = { version = "1", features = ["serde_derive"] }
toml = "0.5"
chrono = "0.4"
hyper = { version = "0.14.0-dev", features = ["full"] }
futures = "0.3"
tokio = { version = "0.3.6", features = ["time", "rt-multi-thread", "stream", "macros", "tracing", "signal"] }
tower = { version = "0.4", features = ["hedge", "limit"] }
pin-project = "1.0.7"
color-eyre = { version = "0.5.11", features = ["issue-url"] }
thiserror = "1"
tracing = "0.1"
tracing-futures = "0.2"
tracing-flame = "0.1.0"
tracing-journald = "0.1.0"
tracing-subscriber = { version = "0.2.24", features = ["tracing-log"] }
tracing-error = "0.1.2"
metrics = "0.13.0-alpha.8"
metrics-exporter-prometheus = "0.1.0-alpha.7"
dirs = "4.0.0"
inferno = { version = "0.10.7", default-features = false }
atty = "0.2.14"
sentry = { version = "0.21.0", default-features = false, features = ["backtrace", "contexts", "reqwest", "rustls"] }
2020-12-04 14:23:43 -08:00
sentry-tracing = { git = "https://github.com/kellpossible/sentry-tracing.git", rev = "f1a4a4a16b5ff1022ae60be779eb3fb928ce9b0f" }
2020-12-04 00:47:52 -08:00
[build-dependencies]
vergen = { version = "5.1.12", default-features = false, features = ["cargo", "git"] }
2019-12-20 11:20:04 -08:00
[dev-dependencies]
abscissa_core = { version = "0.5", features = ["testing"] }
once_cell = "1.8"
regex = "1.4.6"
semver = "1.0.3"
tempdir = "0.3.7"
tokio = { version = "0.3.6", features = ["full", "test-util"] }
proptest = "0.10"
proptest-derive = "0.3"
Reject conflicting mempool transactions (#2765) * Add `Transaction::spent_outpoints` getter method Returns an iterator over the UTXO `OutPoint`s spent by the transaction. * Add `mempool::Error::Conflict` variant An error representing that a transaction was rejected because it conflicts with another transaction that's already in the mempool. * Reject conflicting mempool transactions Reject including a transaction in the mempool if it spends outputs already spent by, or reveals nullifiers already revealed by another transaction in the mempool. * Fix typo in documentation Remove the `r` that was incorrectly added. Co-authored-by: teor <teor@riseup.net> * Specify that the conflict is a spend conflict Make the situation clearer, because there are other types of conflict. Co-authored-by: teor <teor@riseup.net> * Clarify that the outpoints are from inputs Because otherwise it could lead to confusion because it could also mean the outputs of the transaction represented as `OutPoint` references. Co-authored-by: teor <teor@riseup.net> * Create `storage::tests::vectors` module Refactor to follow the convention used for other tests. * Add an `AtLeastOne::first_mut` method A getter to allow changing the first element. * Add an `AtLeastOne::push` method Allow appending elements to the collection. * Derive `Arbitrary` for `FieldNotPresent` This is just to make the code that generates arbitrary anchors a bit simpler. * Test if conflicting transactions are rejected Generate two transactions (either V4 or V5) and insert a conflicting spend, which can be either a transparent UTXO, or a nullifier for one of the shielded pools. Check that any attempt to insert both transactions causes one to be accepted and the other to be rejected. * Delete a TODO comment that we decided not to do Co-authored-by: teor <teor@riseup.net>
2021-09-27 18:03:08 -07:00
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
Send crawled transaction IDs to downloader (#2801) * Rename type parameter to be more explicit Replace the single letter with a proper name. * Remove imports for `Request` and `Response` The type names will conflict with the ones for the mempool service. * Attach `Mempool` service to the `Crawler` Add a field to the `Crawler` type to store a way to access the `Mempool` service. * Forward crawled transactions to downloader The crawled transactions are now sent to the transaction downloader and verifier, to be included in the mempool. * Derive `Eq` and `PartialEq` for `mempool::Request` Make it simpler to use the `MockService::expect_request` method. * Test if crawled transactions are downloaded Create some dummy crawled transactions, and let the crawler discover them. Then check if they are forwarded to the mempool to be downloaded and verified. * Don't send empty transaction ID list to downloader Ignore response from peers that don't provide any crawled transactions. * Log errors when forwarding crawled transaction IDs Calling the Mempool service should not fail, so if an error happens it should be visible. However, errors when downloading individual transactions can happen from time to time, so there's no need for them to be very visible. * Document existing `mempool::Crawler` test Provide some depth as to what the test expect from the crawler's behavior. * Refactor to create `setup_crawler` helper function Make it easier to reuse the common test setup code. * Simplify code to expect requests Now that `zebra_network::Request` implement `Eq`, the call can be simplified into `expect_request`. * Refactor to create `respond_with_transaction_ids` A helper function that checks for a network crawl request and responds with the given list of crawled transaction IDs. * Refactor to create `crawler_iterator` helper A function to intercept and respond to the fanned-out requests sent during a single crawl iteration. * Refactor to create `respond_to_queue_request` Reduce the repeated code necessary to intercept and reply to a request for queuing transactions to be downloaded. * Add `respond_to_queue_request_with_error` helper Intercepts a mempool request to queue transactions to be downloaded, and responds with an error, simulating an internal problem in the mempool service implementation. * Derive `Arbitrary` for `NetworkUpgrade` This is required for deriving `Arbitrary` for some error types. * Derive `Arbitrary` for `TransactionError` Allow random transaction errors to be generated for property tests. * Derive `Arbitrary` for `MempoolError` Allow random Mempool errors to be generated for property tests. * Test if errors don't stop the mempool crawler The crawler should be robust enough to continue operating even if the mempool service fails to download transactions or even fails to handle requests to enqueue transactions. * Reduce the log level for download errors They should happen regularly, so there's no need to have them with a high visibility level. Co-authored-by: teor <teor@riseup.net> * Stop crawler if service stops If `Mempool::poll_ready` returns an error, it's because the mempool service has stopped and can't handle any requests, so the crawler should stop as well. Co-authored-by: teor <teor@riseup.net> Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2021-10-04 17:55:42 -07:00
zebra-consensus = { path = "../zebra-consensus/", features = ["proptest-impl"] }
zebra-state = { path = "../zebra-state", features = ["proptest-impl"] }
zebra-test = { path = "../zebra-test" }
[features]
enable-sentry = []
test_sync_to_mandatory_checkpoint_mainnet = []
test_sync_to_mandatory_checkpoint_testnet = []
test_sync_past_mandatory_checkpoint_mainnet = []
test_sync_past_mandatory_checkpoint_testnet = []