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>
This commit is contained in:
Deirdre Connolly 2023-06-13 04:46:01 -04:00 committed by GitHub
parent 329dd71dfe
commit 62d946d139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 226 additions and 67 deletions

View File

@ -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

View File

@ -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",

View File

@ -1,10 +1,26 @@
[package]
name = "tower-batch-control"
version = "0.2.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
version = "0.2.41-beta.1"
authors = ["Zcash Foundation <zebra@zfnd.org>", "Tower Maintainers <team@tower-rs.com>"]
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 <https://crates.io/category_slugs>
categories = ["algorithms", "asynchronous"]
[dependencies]
futures = "0.3.28"
futures-core = "0.3.28"

View File

@ -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.

View File

@ -84,6 +84,14 @@
//! a `Service<R>`. 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:
//! <https://github.com/tower-rs/tower/tree/master/tower/src/buffer>
//!
//! 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;

View File

@ -1,10 +1,20 @@
[package]
name = "tower-fallback"
version = "0.2.40"
version = "0.2.41-beta.1"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
categories = ["algorithms", "asynchronous"]
[dependencies]
pin-project = "1.1.0"
tower = "0.4.13"

View File

@ -2,10 +2,17 @@
name = "zebra-chain"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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

View File

@ -2,9 +2,18 @@
name = "zebra-consensus"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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 }

View File

@ -1,11 +1,24 @@
[package]
name = "zebra-network"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
license = "MIT OR Apache-2.0"
authors = ["Zcash Foundation <zebra@zfnd.org>", "Tower Maintainers <team@tower-rs.com>"]
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 <https://crates.io/category_slugs>
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"

26
zebra-network/LICENSE Normal file
View File

@ -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.

View File

@ -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
//!

View File

@ -1,10 +1,18 @@
[package]
name = "zebra-node-services"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
license = "MIT OR Apache-2.0"
version = "1.0.0-beta.25"
edition = "2021"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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

View File

@ -2,10 +2,17 @@
name = "zebra-rpc"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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"] }

View File

@ -2,15 +2,22 @@
name = "zebra-script"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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"

View File

@ -2,9 +2,18 @@
name = "zebra-state"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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 }

View File

@ -2,10 +2,17 @@
name = "zebra-test"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
categories = ["command-line-utilities", "cryptography::cryptocurrencies"]
[dependencies]
hex = "0.4.3"

View File

@ -1,10 +1,20 @@
[package]
name = "zebra-utils"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
license = "MIT OR Apache-2.0"
version = "1.0.0-beta.25"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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 }

View File

@ -1,9 +1,10 @@
[package]
# Crate metadata
name = "zebrad"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
license = "MIT OR Apache-2.0"
version = "1.0.0-rc.9"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
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 <https://crates.io/category_slugs>
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"] }

View File

@ -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/