diff --git a/.github/workflows/continous-integration-os.yml b/.github/workflows/continous-integration-os.yml index dcd6fabeb..c7adf92b7 100644 --- a/.github/workflows/continous-integration-os.yml +++ b/.github/workflows/continous-integration-os.yml @@ -311,7 +311,7 @@ jobs: cargo machete --skip-target-dir || true echo "-- unused dependencies are below this line, full output is above --" if (cargo machete --skip-target-dir 2>/dev/null || true) | \ - grep -v -e gumdrop -e humantime-serde -e tinyvec -e "found the following" -e Cargo.toml -e Done; then + grep -v -e gumdrop -e humantime-serde -e tinyvec -e zebra-utils -e "found the following" -e Cargo.toml -e Done; then echo "New unused dependencies were found, please remove them!" exit 1 else diff --git a/Cargo.lock b/Cargo.lock index 27a0c1840..84323d018 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4719,7 +4719,7 @@ dependencies = [ [[package]] name = "tower-batch-control" -version = "0.2.40" +version = "0.2.41-beta.1" dependencies = [ "color-eyre", "ed25519-zebra", @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "tower-fallback" -version = "0.2.40" +version = "0.2.41-beta.1" dependencies = [ "futures-core", "pin-project", diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index 8d1b66c1f..d8d202acd 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -1,10 +1,26 @@ [package] name = "tower-batch-control" -version = "0.2.40" -authors = ["Zcash Foundation "] +version = "0.2.41-beta.1" +authors = ["Zcash Foundation ", "Tower Maintainers "] +description = "Tower middleware for batch request processing" +# # Legal +# +# This licence is deliberately different to the rest of Zebra. +# +# This code was modified from a 2019 version of: +# https://github.com/tower-rs/tower/tree/master/tower/src/buffer license = "MIT" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" +# TODO: decide if we want to use the Zebra readme and home page +#readme = "../README.md" +#homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["tower", "batch"] +# Must be one of +categories = ["algorithms", "asynchronous"] + [dependencies] futures = "0.3.28" futures-core = "0.3.28" diff --git a/tower-batch-control/LICENSE b/tower-batch-control/LICENSE new file mode 100644 index 000000000..9862976a6 --- /dev/null +++ b/tower-batch-control/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2019-2023 Zcash Foundation +Copyright (c) 2019 Tower Contributors + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/tower-batch-control/src/lib.rs b/tower-batch-control/src/lib.rs index 855b1a962..2628a0956 100644 --- a/tower-batch-control/src/lib.rs +++ b/tower-batch-control/src/lib.rs @@ -84,6 +84,14 @@ //! a `Service`. The wrapped service does not need to implement any batch //! control logic, as it will receive explicit [`Flush`](BatchControl::Flush) //! requests from the wrapper. +//! +//! ## Implementation History +//! +//! The `tower-batch-control` code was modified from a 2019 version of: +//! +//! +//! A modified fork of this crate is available on crates.io as `tower-batch`. +//! It is focused on batching disk writes. pub mod error; pub mod future; diff --git a/tower-fallback/Cargo.toml b/tower-fallback/Cargo.toml index de3c4d7ae..af4aa8d10 100644 --- a/tower-fallback/Cargo.toml +++ b/tower-fallback/Cargo.toml @@ -1,10 +1,20 @@ [package] name = "tower-fallback" -version = "0.2.40" +version = "0.2.41-beta.1" authors = ["Zcash Foundation "] -license = "MIT" +description = "A Tower service combinator that sends requests to a first service, then retries processing on a second fallback service if the first service errors." +license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" +# TODO: decide if we want to use the Zebra readme and home page +#readme = "../README.md" +#homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["tower", "batch"] +# Must be one of +categories = ["algorithms", "asynchronous"] + [dependencies] pin-project = "1.1.0" tower = "0.4.13" diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index f1e24ad2b..5495b1a35 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -2,10 +2,17 @@ name = "zebra-chain" version = "1.0.0-beta.25" authors = ["Zcash Foundation "] +description = "Core Zcash data structures" license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["asynchronous", "cryptography::cryptocurrencies", "encoding"] [features] default = [] @@ -109,7 +116,7 @@ rand_chacha = { version = "0.3.1", optional = true } tokio = { version = "1.28.2", features = ["tracing"], optional = true } -zebra-test = { path = "../zebra-test/", optional = true } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.25", optional = true } [dev-dependencies] # Benchmarks diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 70b279a2d..3c0e108fa 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -2,9 +2,18 @@ name = "zebra-consensus" version = "1.0.0-beta.25" authors = ["Zcash Foundation "] +description = "Implementation of Zcash consensus checks" license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["asynchronous", "cryptography::cryptocurrencies"] + [features] default = [] @@ -53,13 +62,13 @@ orchard = "0.4.0" zcash_proofs = { version = "0.11.0", features = ["local-prover", "multicore", "download-params"] } -tower-fallback = { path = "../tower-fallback/" } -tower-batch-control = { path = "../tower-batch-control/" } +tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.1" } +tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.1" } -zebra-script = { path = "../zebra-script" } -zebra-state = { path = "../zebra-state" } -zebra-node-services = { path = "../zebra-node-services" } -zebra-chain = { path = "../zebra-chain" } +zebra-script = { path = "../zebra-script", version = "1.0.0-beta.25" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.25" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.25" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.25" } # prod feature progress-bar howudoin = { version = "0.1.2", optional = true } diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index 9c66368e3..f1b5429c2 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -1,11 +1,24 @@ [package] name = "zebra-network" version = "1.0.0-beta.25" -authors = ["Zcash Foundation "] -license = "MIT OR Apache-2.0" +authors = ["Zcash Foundation ", "Tower Maintainers "] +description = "Networking code for Zebra" +# # Legal +# +# This licence is deliberately different to the rest of Zebra. +# +# zebra-network/src/peer_set/set.rs was modified from a 2019 version of: +# https://github.com/tower-rs/tower/tree/master/tower/src/balance/p2c/service.rs +license = "MIT" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["asynchronous", "cryptography::cryptocurrencies", "encoding", "network-programming"] [features] default = [] @@ -65,7 +78,7 @@ howudoin = { version = "0.1.2", optional = true } proptest = { version = "1.2.0", optional = true } proptest-derive = { version = "0.3.0", optional = true } -zebra-chain = { path = "../zebra-chain" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.25" } [dev-dependencies] proptest = "1.2.0" diff --git a/zebra-network/LICENSE b/zebra-network/LICENSE new file mode 100644 index 000000000..9862976a6 --- /dev/null +++ b/zebra-network/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2019-2023 Zcash Foundation +Copyright (c) 2019 Tower Contributors + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/zebra-network/src/peer_set/set.rs b/zebra-network/src/peer_set/set.rs index 8611ef7c6..b3ff2a92d 100644 --- a/zebra-network/src/peer_set/set.rs +++ b/zebra-network/src/peer_set/set.rs @@ -2,8 +2,8 @@ //! //! # Implementation //! -//! The [`PeerSet`] implementation is adapted from the one in the [Tower Balance][tower-balance] crate. -//! As described in that crate's documentation, it: +//! The [`PeerSet`] implementation is adapted from the one in [tower::Balance][tower-balance]. +//! As described in Tower's documentation, it: //! //! > Distributes requests across inner services using the [Power of Two Choices][p2c]. //! > @@ -40,7 +40,7 @@ //! //! [finagle]: https://twitter.github.io/finagle/guide/Clients.html#power-of-two-choices-p2c-least-loaded //! [p2c]: http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf -//! [tower-balance]: https://crates.io/crates/tower-balance +//! [tower-balance]: https://github.com/tower-rs/tower/tree/master/tower/src/balance //! //! # Behavior During Network Upgrades //! diff --git a/zebra-node-services/Cargo.toml b/zebra-node-services/Cargo.toml index 2f888bbda..04639549a 100644 --- a/zebra-node-services/Cargo.toml +++ b/zebra-node-services/Cargo.toml @@ -1,10 +1,18 @@ [package] name = "zebra-node-services" -authors = ["Zcash Foundation "] -license = "MIT OR Apache-2.0" version = "1.0.0-beta.25" -edition = "2021" +authors = ["Zcash Foundation "] +description = "The interfaces of some Zebra node services" +license = "MIT OR Apache-2.0" repository = "https://github.com/ZcashFoundation/zebra" +edition = "2021" + +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["asynchronous", "cryptography::cryptocurrencies", "network-programming"] [features] default = [] @@ -27,7 +35,7 @@ rpc-client = [ ] [dependencies] -zebra-chain = { path = "../zebra-chain" } +zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.25"} # Optional dependencies diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index 1cca24fcf..db597d6b2 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -2,10 +2,17 @@ name = "zebra-rpc" version = "1.0.0-beta.25" authors = ["Zcash Foundation "] +description = "A Zebra JSON Remote Procedure Call (JSON-RPC) interface" license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["asynchronous", "cryptography::cryptocurrencies", "encoding", "network-programming"] [features] default = [] @@ -63,12 +70,12 @@ zcash_address = { version = "0.2.1", optional = true } # Test-only feature proptest-impl proptest = { version = "1.2.0", optional = true } -zebra-chain = { path = "../zebra-chain", features = ["json-conversion"] } -zebra-consensus = { path = "../zebra-consensus" } -zebra-network = { path = "../zebra-network" } -zebra-node-services = { path = "../zebra-node-services" } -zebra-script = { path = "../zebra-script" } -zebra-state = { path = "../zebra-state" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.25", features = ["json-conversion"] } +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.25" } +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.25" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.25" } +zebra-script = { path = "../zebra-script", version = "1.0.0-beta.25" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.25" } [dev-dependencies] insta = { version = "1.29.0", features = ["redactions", "json", "ron"] } diff --git a/zebra-script/Cargo.toml b/zebra-script/Cargo.toml index 4d9d41efa..618f51b93 100644 --- a/zebra-script/Cargo.toml +++ b/zebra-script/Cargo.toml @@ -2,15 +2,22 @@ name = "zebra-script" version = "1.0.0-beta.25" authors = ["Zcash Foundation "] +description = "Zebra script verification wrapping zcashd's zcash_script library" license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["api-bindings", "cryptography::cryptocurrencies"] [dependencies] zcash_script = "0.1.12" -zebra-chain = { path = "../zebra-chain" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.25" } thiserror = "1.0.40" displaydoc = "0.2.4" diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index e0e268f5a..20df4da55 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -2,9 +2,18 @@ name = "zebra-state" version = "1.0.0-beta.25" authors = ["Zcash Foundation "] +description = "State contextual verification and storage code for Zebra" license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["asynchronous", "caching", "cryptography::cryptocurrencies"] + [features] # Production features that activate extra dependencies, or extra features in dependencies @@ -60,13 +69,13 @@ tracing = "0.1.37" elasticsearch = { version = "8.5.0-alpha.1", package = "elasticsearch", optional = true } serde_json = { version = "1.0.96", package = "serde_json", optional = true } -zebra-chain = { path = "../zebra-chain" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.25" } # prod feature progress-bar howudoin = { version = "0.1.2", optional = true } # test feature proptest-impl -zebra-test = { path = "../zebra-test/", optional = true } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.25", optional = true } proptest = { version = "1.2.0", optional = true } proptest-derive = { version = "0.3.0", optional = true } diff --git a/zebra-test/Cargo.toml b/zebra-test/Cargo.toml index db74ee3b3..649a3835b 100644 --- a/zebra-test/Cargo.toml +++ b/zebra-test/Cargo.toml @@ -2,10 +2,17 @@ name = "zebra-test" version = "1.0.0-beta.25" authors = ["Zcash Foundation "] +description = "Test harnesses and test vectors for Zebra" license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["command-line-utilities", "cryptography::cryptocurrencies"] [dependencies] hex = "0.4.3" diff --git a/zebra-utils/Cargo.toml b/zebra-utils/Cargo.toml index 9d78f43aa..99c80d62d 100644 --- a/zebra-utils/Cargo.toml +++ b/zebra-utils/Cargo.toml @@ -1,10 +1,20 @@ [package] name = "zebra-utils" -authors = ["Zcash Foundation "] -license = "MIT OR Apache-2.0" version = "1.0.0-beta.25" +authors = ["Zcash Foundation "] +description = "Developer tools for Zebra maintenance and testing" +license = "MIT OR Apache-2.0" +repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" +# zebra-utils has a separate README file +readme = "README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["command-line-utilities", "cryptography::cryptocurrencies"] + [[bin]] name = "zebra-checkpoints" # this setting is required for Zebra's Docker build caches @@ -60,8 +70,11 @@ tracing-error = "0.2.0" tracing-subscriber = "0.3.17" thiserror = "1.0.40" -zebra-node-services = { path = "../zebra-node-services" } -zebra-chain = { path = "../zebra-chain" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.25" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.25" } + +# These crates are needed for the block-template-to-proposal binary +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.25", optional = true } # These crates are needed for the zebra-checkpoints binary itertools = { version = "0.10.5", optional = true } @@ -72,6 +85,3 @@ reqwest = { version = "0.11.18", optional = true } # These crates are needed for the zebra-checkpoints and search-issue-refs binaries tokio = { version = "1.28.2", features = ["full"], optional = true } - -# These crates are needed for the block-template-to-proposal binary -zebra-rpc = { path = "../zebra-rpc", optional = true } diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 3bd556669..6316d5996 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -1,9 +1,10 @@ [package] # Crate metadata name = "zebrad" -authors = ["Zcash Foundation "] -license = "MIT OR Apache-2.0" version = "1.0.0-rc.9" +authors = ["Zcash Foundation "] +description = "The Zcash Foundation's independent, consensus-compatible implementation of a Zcash node" +license = "MIT OR Apache-2.0" repository = "https://github.com/ZcashFoundation/zebra" # Settings that impact compilation @@ -19,6 +20,13 @@ rust-version = "1.66" # when run in the workspace directory default-run = "zebrad" +readme = "../README.md" +homepage = "https://zfnd.org/zebra/" +# crates.io is limited to 5 keywords and categories +keywords = ["zebra", "zcash"] +# Must be one of +categories = ["command-line-utilities", "cryptography::cryptocurrencies"] + [features] # In release builds, don't compile debug logging code, to improve performance. default = ["release_max_level_info"] @@ -108,12 +116,14 @@ test_sync_past_mandatory_checkpoint_mainnet = [] test_sync_past_mandatory_checkpoint_testnet = [] [dependencies] -zebra-chain = { path = "../zebra-chain" } -zebra-consensus = { path = "../zebra-consensus" } -zebra-network = { path = "../zebra-network" } -zebra-node-services = { path = "../zebra-node-services" } -zebra-rpc = { path = "../zebra-rpc" } -zebra-state = { path = "../zebra-state" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.25" } +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.25" } +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.25" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.25" } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.25" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.25" } +# Required for crates.io publishing, but it's only used in tests +zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.25", optional = true } abscissa_core = "0.7.0" clap = { version = "4.3.3", features = ["cargo"] } diff --git a/zebrad/README.md b/zebrad/README.md deleted file mode 100644 index 4dee5cbb2..000000000 --- a/zebrad/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Zebrad - -Zebrad is an application. - -## Getting Started - -This application is authored using [Abscissa], a Rust application framework. - -For more information, see: - -[Documentation] - -[Abscissa]: https://github.com/iqlusioninc/abscissa -[Documentation]: https://docs.rs/abscissa_core/