diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index 762088b7047..6e91799224a 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -1,9 +1,16 @@ [package] name = "tower-batch-control" version = "0.2.40" -authors = ["Zcash Foundation "] +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" +license-file = "LICENSE" repository = "https://github.com/ZcashFoundation/zebra" edition = "2021" diff --git a/tower-batch-control/LICENSE b/tower-batch-control/LICENSE new file mode 100644 index 00000000000..9862976a6ce --- /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 855b1a962b0..b015ddd8a6f 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: +//! 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; diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index 278786a59f2..12b16055aca 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -3,6 +3,12 @@ name = "zebra-network" version = "1.0.0-beta.25" 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" license-file = "LICENSE" repository = "https://github.com/ZcashFoundation/zebra" diff --git a/zebra-network/LICENSE b/zebra-network/LICENSE index fb1631a2473..9862976a6ce 100644 --- a/zebra-network/LICENSE +++ b/zebra-network/LICENSE @@ -1,3 +1,4 @@ +Copyright (c) 2019-2023 Zcash Foundation Copyright (c) 2019 Tower Contributors Permission is hereby granted, free of charge, to any @@ -22,4 +23,4 @@ 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. \ No newline at end of file +DEALINGS IN THE SOFTWARE. diff --git a/zebra-network/src/peer_set/set.rs b/zebra-network/src/peer_set/set.rs index 8611ef7c633..b3ff2a92df4 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 //!