Skip to content

Commit

Permalink
change: Rename tower-batch to tower-batch-control (#6907)
Browse files Browse the repository at this point in the history
  • Loading branch information
dconnolly committed Jun 12, 2023
1 parent b14bb83 commit 006b1ca
Show file tree
Hide file tree
Showing 23 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4718,7 +4718,7 @@ dependencies = [
]

[[package]]
name = "tower-batch"
name = "tower-batch-control"
version = "0.2.40"
dependencies = [
"color-eyre",
Expand Down Expand Up @@ -5728,7 +5728,7 @@ dependencies = [
"tinyvec",
"tokio",
"tower",
"tower-batch",
"tower-batch-control",
"tower-fallback",
"tracing",
"tracing-error",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [
"zebra-node-services",
"zebra-test",
"zebra-utils",
"tower-batch",
"tower-batch-control",
"tower-fallback",
]

Expand Down
2 changes: 1 addition & 1 deletion book/src/dev/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ into several components:
of blocks and transactions: all consensus
rules that can be checked independently of the chain state, such as
verification of signatures, proofs, and scripts. Internally, the library
uses [`tower-batch`](https://doc.zebra.zfnd.org/tower_batch/index.html) to
uses [`tower-batch-control`](https://doc.zebra.zfnd.org/tower_batch_control/index.html) to
perform automatic, transparent batch processing of contemporaneous
verification requests.

Expand Down
4 changes: 2 additions & 2 deletions book/src/dev/rfcs/0011-async-rust-in-zebra.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ with the [tokio](https://docs.rs/tokio/) executor.

At a higher level, Zebra also uses [`tower::Service`s](https://docs.rs/tower/0.4.1/tower/trait.Service.html),
[`tower::Buffer`s](https://docs.rs/tower/0.4.1/tower/buffer/struct.Buffer.html),
and our own [`tower-batch`](https://github.com/ZcashFoundation/zebra/tree/main/tower-batch)
and our own [`tower-batch-control`](https://github.com/ZcashFoundation/zebra/tree/main/tower-batch-control)
implementation.

# Motivation
Expand Down Expand Up @@ -737,7 +737,7 @@ particularly important for code that modifies Zebra's highly concurrent crates:
- `zebra-network`
- `zebra-state`
- `zebra-consensus`
- `tower-batch`
- `tower-batch-control`
- `tower-fallback`

## Monitoring Async Code
Expand Down
2 changes: 1 addition & 1 deletion tower-batch/Cargo.toml → tower-batch-control/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "tower-batch"
name = "tower-batch-control"
version = "0.2.40"
authors = ["Zcash Foundation <[email protected]>"]
license = "MIT"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use ed25519_zebra::*;
use futures::stream::{FuturesOrdered, StreamExt};
use rand::thread_rng;
use tower::{Service, ServiceExt};
use tower_batch::Batch;
use tower_batch_control::Batch;
use tower_fallback::Fallback;

// ============ service impl ============
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;

use tokio_test::{assert_pending, assert_ready, assert_ready_err, task};
use tower::{Service, ServiceExt};
use tower_batch::{error, Batch};
use tower_batch_control::{error, Batch};
use tower_test::mock;

#[tokio::test]
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ orchard = "0.4.0"
zcash_proofs = { version = "0.11.0", features = ["local-prover", "multicore", "download-params"] }

tower-fallback = { path = "../tower-fallback/" }
tower-batch = { path = "../tower-batch/" }
tower-batch-control = { path = "../tower-batch-control/" }

zebra-script = { path = "../zebra-script" }
zebra-state = { path = "../zebra-state" }
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rand::thread_rng;
use rayon::prelude::*;
use tokio::sync::watch;
use tower::{util::ServiceFn, Service};
use tower_batch::{Batch, BatchControl};
use tower_batch_control::{Batch, BatchControl};
use tower_fallback::Fallback;
use zebra_chain::primitives::ed25519::{batch, *};

Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/ed25519/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::time::Duration;
use color_eyre::eyre::{eyre, Result};
use futures::stream::{FuturesUnordered, StreamExt};
use tower::ServiceExt;
use tower_batch::Batch;
use tower_batch_control::Batch;

use crate::primitives::ed25519::*;

Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/groth16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use rayon::prelude::*;
use tokio::sync::watch;
use tower::{util::ServiceFn, Service};

use tower_batch::{Batch, BatchControl};
use tower_batch_control::{Batch, BatchControl};
use tower_fallback::{BoxedError, Fallback};

use zebra_chain::{
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/halo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use rayon::prelude::*;
use thiserror::Error;
use tokio::sync::watch;
use tower::{util::ServiceFn, Service};
use tower_batch::{Batch, BatchControl};
use tower_batch_control::{Batch, BatchControl};
use tower_fallback::Fallback;

#[cfg(test)]
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/redjubjub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rand::thread_rng;
use rayon::prelude::*;
use tokio::sync::watch;
use tower::{util::ServiceFn, Service};
use tower_batch::{Batch, BatchControl};
use tower_batch_control::{Batch, BatchControl};
use tower_fallback::Fallback;

use zebra_chain::primitives::redjubjub::{batch, *};
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/redjubjub/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::time::Duration;
use color_eyre::eyre::{eyre, Result};
use futures::stream::{FuturesUnordered, StreamExt};
use tower::ServiceExt;
use tower_batch::Batch;
use tower_batch_control::Batch;

async fn sign_and_verify<V>(mut verifier: V, n: usize) -> Result<(), V::Error>
where
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/redpallas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rand::thread_rng;
use rayon::prelude::*;
use tokio::sync::watch;
use tower::{util::ServiceFn, Service};
use tower_batch::{Batch, BatchControl};
use tower_batch_control::{Batch, BatchControl};
use tower_fallback::Fallback;

use zebra_chain::primitives::reddsa::{batch, orchard, Error};
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/primitives/redpallas/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::time::Duration;
use color_eyre::eyre::{eyre, Result};
use futures::stream::{FuturesUnordered, StreamExt};
use tower::ServiceExt;
use tower_batch::Batch;
use tower_batch_control::Batch;

use zebra_chain::primitives::reddsa::{
orchard::{Binding, SpendAuth},
Expand Down

0 comments on commit 006b1ca

Please sign in to comment.