Skip to content

Commit daa96cc

Browse files
authored
Merge pull request #282 from semiotic-ai/suchapalaver/dependency-maintenance
build: centralize dependency imports in workspace manifest
2 parents 8ddc855 + 77e9588 commit daa96cc

File tree

10 files changed

+74
-52
lines changed

10 files changed

+74
-52
lines changed

Cargo.toml

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[workspace]
22
resolver = "2"
33
members = [
4-
"tap_core",
54
"tap_aggregator",
6-
"tap_integration_tests",
7-
"tap_graph",
5+
"tap_core",
86
"tap_eip712_message",
7+
"tap_graph",
8+
"tap_integration_tests",
99
"tap_receipt",
1010
]
1111

@@ -16,13 +16,39 @@ license = "Apache-2.0"
1616
repository = "https://github.com/semiotic-ai/timeline-aggregation-protocol"
1717

1818
[workspace.dependencies]
19-
serde = { version = "1.0.217", features = ["derive"] }
20-
rstest = "0.24.0"
21-
anyhow = { version = "1.0.95" }
22-
tokio = { version = "1.43.0", features = ["macros", "signal"] }
23-
rand = "0.8.5"
24-
jsonrpsee = { version = "0.24.7", features = ["macros", "server"] }
25-
insta = { version = "1.42.0", features = ["json"] }
26-
serde_json = { version = "1.0.137", features = ["raw_value"] }
19+
anyhow = { version = "1.0.98" }
20+
anymap3 = "1.0.1"
21+
async-trait = "0.1.88"
22+
axum = { version = "0.7.5", features = [
23+
"http1",
24+
"json",
25+
"matched-path",
26+
"original-uri",
27+
"query",
28+
"tokio",
29+
], default-features = false }
30+
clap = { version = "4.5.36", features = ["derive", "env"] }
31+
criterion = { version = "0.5.1", features = ["async_std"] }
32+
futures-util = "0.3.31"
33+
hyper = { version = "1.6.0", features = ["full"] }
34+
insta = { version = "1.42.2", features = ["json"] }
35+
jsonrpsee = { version = "0.24.9", features = ["macros", "server"] }
36+
jsonrpsee-core = "0.24.9"
37+
lazy_static = "1.5.0"
38+
log = "0.4.27"
39+
prometheus = "0.14.0"
40+
prost = "0.13.5"
41+
rand = "0.9.1"
42+
rayon = "1.10.0"
43+
rdkafka = { version = "0.37.0", features = ["tokio", "sasl"] }
44+
serde = { version = "1.0.219", features = ["derive"] }
45+
serde_json = { version = "1.0.140", features = ["raw_value"] }
46+
strum = { version = "0.27.1", features = ["derive"] }
47+
rstest = "0.25.0"
48+
tap_graph = { version = "0.2.1", path = "../tap_graph", features = ["v2"] }
2749
thegraph-core = "0.12.0"
28-
thiserror = "2.0.11"
50+
thiserror = "2.0.12"
51+
tokio = { version = "1.44.2", features = ["macros", "signal"] }
52+
tonic = { version = "0.12.3", features = ["transport", "zstd"] }
53+
tower = { version = "0.5.2", features = ["util", "steer"] }
54+
tracing-subscriber = "0.3.19"

tap_aggregator/Cargo.toml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,31 @@ path = "src/main.rs"
1313

1414
[dependencies]
1515
anyhow.workspace = true
16-
axum = { version = "0.7.5", features = [
17-
"http1",
18-
"json",
19-
"matched-path",
20-
"original-uri",
21-
"query",
22-
"tokio",
23-
], default-features = false }
24-
clap = { version = "4.5.15", features = ["derive", "env"] }
25-
futures-util = "0.3.28"
26-
hyper = { version = "1", features = ["full"] }
27-
jsonrpsee = { workspace = true, features = ["server", "macros"] }
28-
lazy_static = "1.4.0"
29-
log = "0.4.19"
30-
prometheus = "0.13.3"
31-
prost = "0.13.3"
32-
rayon = "1.10.0"
16+
axum.workspace = true
17+
clap.workspace = true
18+
futures-util.workspace = true
19+
hyper.workspace = true
20+
jsonrpsee.workspace = true
21+
lazy_static.workspace = true
22+
log.workspace = true
23+
prometheus.workspace = true
24+
prost.workspace = true
25+
rayon.workspace = true
26+
rdkafka.workspace = true
3327
serde.workspace = true
3428
serde_json.workspace = true
35-
strum = { version = "0.26.3", features = ["derive"] }
29+
strum.workspace = true
3630
tap_core = { path = "../tap_core", version = "4.0.0" }
31+
tap_graph = { version = "0.2.1", path = "../tap_graph", features = ["v2"] }
3732
thegraph-core = { workspace = true, features = ["alloy-eip712"] }
3833
tokio.workspace = true
39-
tonic = { version = "0.12.3", features = ["transport", "zstd"] }
40-
tower = { version = "0.5.2", features = ["util", "steer"] }
41-
tracing-subscriber = "0.3.17"
42-
tap_graph = { version = "0.2.1", path = "../tap_graph", features = ["v2"] }
43-
rdkafka = { version = "0.37.0", features = ["tokio", "sasl"] }
34+
tonic.workspace = true
35+
tower.workspace = true
36+
tracing-subscriber.workspace = true
4437

4538
[build-dependencies]
4639
tonic-build = "0.12.3"
4740

4841
[dev-dependencies]
49-
jsonrpsee = { workspace = true, features = ["http-client", "jsonrpsee-core"] }
5042
rand.workspace = true
5143
rstest.workspace = true

tap_aggregator/src/server.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,6 @@ mod tests {
496496
use std::{collections::HashSet, str::FromStr};
497497

498498
use jsonrpsee::{core::client::ClientT, http_client::HttpClientBuilder, rpc_params};
499-
use rand::{prelude::*, seq::SliceRandom};
500499
use rstest::*;
501500
use tap_core::{signed_message::Eip712SignedMessage, tap_eip712_domain};
502501
use tap_graph::{Receipt, ReceiptAggregateVoucher};
@@ -600,6 +599,8 @@ mod tests {
600599
#[values(0, 1, 2)] random_seed: u64,
601600
) {
602601
// The keys that will be used to sign the new RAVs
602+
603+
use rand::{rngs::StdRng, seq::IndexedRandom, SeedableRng};
603604
let keys_main = keys();
604605
// Extra keys to test the server's ability to accept multiple signers as input
605606
let keys_0 = keys();
@@ -681,6 +682,8 @@ mod tests {
681682
#[values(0, 1, 2, 3, 4)] random_seed: u64,
682683
) {
683684
// The keys that will be used to sign the new RAVs
685+
686+
use rand::{rngs::StdRng, seq::IndexedRandom, SeedableRng};
684687
let keys_main = keys();
685688
// Extra keys to test the server's ability to accept multiple signers as input
686689
let keys_0 = keys();

tap_core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "Core Timeline Aggregation Protocol library: a fast, efficient and
99

1010
[dependencies]
1111
anyhow.workspace = true
12-
async-trait = "0.1.85"
12+
async-trait.workspace = true
1313
rand.workspace = true
1414
tap_eip712_message = { version = "0.1.0", path = "../tap_eip712_message" }
1515
tap_graph = { version = "0.2.1", path = "../tap_graph", optional = true }
@@ -19,7 +19,7 @@ thiserror.workspace = true
1919
tokio.workspace = true
2020

2121
[dev-dependencies]
22-
criterion = { version = "0.5.1", features = ["async_std"] }
22+
criterion.workspace = true
2323
insta.workspace = true
2424
rstest.workspace = true
2525
serde_json.workspace = true

tap_core/tests/receipt_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77
sync::{Arc, RwLock},
88
};
99

10-
use rand::{seq::SliceRandom, thread_rng};
10+
use rand::{rng, seq::SliceRandom};
1111
use rstest::*;
1212
use tap_core::{
1313
manager::{adapters::ReceiptStore, context::memory::InMemoryContext},
@@ -184,7 +184,7 @@ fn safe_truncate_receipts_test(
184184
let mut receipts_truncated = receipts_orig;
185185

186186
// shuffle the input receipts
187-
receipts_truncated.shuffle(&mut thread_rng());
187+
receipts_truncated.shuffle(&mut rng());
188188

189189
tap_core::manager::adapters::safe_truncate_receipts(&mut receipts_truncated, limit);
190190

tap_graph/src/v1/receipt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
use std::time::{SystemTime, SystemTimeError, UNIX_EPOCH};
1212

13-
use rand::{thread_rng, Rng};
13+
use rand::{rng, Rng};
1414
use serde::{Deserialize, Serialize};
1515
use tap_eip712_message::Eip712SignedMessage;
1616
use tap_receipt::WithValueAndTimestamp;
@@ -42,7 +42,7 @@ impl Receipt {
4242
/// Returns a receipt with provided values
4343
pub fn new(allocation_id: Address, value: u128) -> Result<Self, SystemTimeError> {
4444
let timestamp_ns = get_current_timestamp_u64_ns()?;
45-
let nonce = thread_rng().gen::<u64>();
45+
let nonce = rng().random::<u64>();
4646
Ok(Self {
4747
allocation_id,
4848
timestamp_ns,

tap_graph/src/v2/receipt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
use std::time::{SystemTime, SystemTimeError, UNIX_EPOCH};
77

8-
use rand::{thread_rng, Rng};
8+
use rand::{rng, Rng};
99
use serde::{Deserialize, Serialize};
1010
use tap_eip712_message::Eip712SignedMessage;
1111
use tap_receipt::WithValueAndTimestamp;
@@ -50,7 +50,7 @@ impl Receipt {
5050
value: u128,
5151
) -> Result<Self, SystemTimeError> {
5252
let timestamp_ns = get_current_timestamp_u64_ns()?;
53-
let nonce = thread_rng().gen::<u64>();
53+
let nonce = rng().random::<u64>();
5454
Ok(Self {
5555
allocation_id,
5656
payer,

tap_integration_tests/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ publish = false
1111
[dependencies]
1212
tap_aggregator = { path = "../tap_aggregator" }
1313
tap_core = { path = "../tap_core", version = "4.0.0" }
14-
rand.workspace = true
14+
tap_graph = { path = "../tap_graph" }
15+
1516
anyhow.workspace = true
17+
jsonrpsee = { workspace = true, features = ["jsonrpsee-http-client"] }
18+
jsonrpsee-core.workspace = true
19+
rand.workspace = true
1620
thegraph-core.workspace = true
1721
tokio.workspace = true
18-
jsonrpsee = { workspace = true, features = ["jsonrpsee-http-client"] }
19-
jsonrpsee-core = "0.24.7"
20-
tap_graph = { path = "../tap_graph" }
2122

2223
[dev-dependencies]
2324
rstest.workspace = true

tap_integration_tests/tests/showcase.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fn query_price() -> &'static [u128] {
133133
let mut v = Vec::new();
134134

135135
for _ in 0..num_queries() {
136-
v.push(rng.gen::<u128>() % 100);
136+
v.push(rng.random::<u128>() % 100);
137137
}
138138
Box::leak(v.into_boxed_slice())
139139
}

tap_receipt/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ description = "TAP Receipt states and checks"
88

99
[dependencies]
1010
anyhow.workspace = true
11-
anymap3 = "1.0.1"
12-
async-trait = "0.1.85"
11+
anymap3.workspace = true
12+
async-trait.workspace = true
1313
serde.workspace = true
1414
tap_eip712_message = { version = "0.1.0", path = "../tap_eip712_message" }
1515
thegraph-core.workspace = true

0 commit comments

Comments
 (0)