Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune dependencies #3787

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 84 additions & 127 deletions Cargo.lock

Large diffs are not rendered by default.

81 changes: 40 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ repository = "https://github.com/EspressoSystems/HotShot"
# when implementing traits externally
[workspace]
members = [
"crates/hotshot",
"crates/hotshot-stake-table",
"crates/libp2p-networking",
"crates/macros",
"crates/task",
"crates/task-impls",
"crates/testing",
"crates/examples",
"crates/example-types",
"crates/types",
"crates/builder-api",
"crates/fakeapi",
"crates/hotshot",
"crates/hotshot-stake-table",
"crates/libp2p-networking",
"crates/macros",
"crates/task",
"crates/task-impls",
"crates/testing",
"crates/examples",
"crates/example-types",
"crates/types",
"crates/builder-api",
"crates/fakeapi",
]
resolver = "2"

Expand All @@ -35,28 +35,27 @@ ark-serialize = "0.4"
ark-std = { version = "0.4", default-features = false }
async-broadcast = "0.7"
async-compatibility-layer = { version = "1.2.1", default-features = false, features = [
"logging-utils",
"logging-utils",
] }
async-lock = "2"
async-std = { version = "1", features = ["attributes"] }
async-trait = "0.1"
bincode = "1"
bitvec = { version = "1", default-features = false, features = [
"alloc",
"atomic",
"serde",
"alloc",
"atomic",
"serde",
] }
blake3 = "1.5"
chrono = { version = "0.4", default-features = false, features = ["now"] }
committable = "0.2"
custom_debug = "0.5"
digest = "0.10"
either = "1.13"
espresso-systems-common = { git = "https://github.com/espressosystems/espresso-systems-common", tag = "0.4.1" }
ethereum-types = { version = "0.14", default-features = false, features = [
"serialize",
primitive-types = { version = "0.13.1", default-features = false, features = [
"serde",
] }
derive_more = { version = "1.0", features = ["from"] }
derive_more = { version = "1.0", features = ["from", "debug"] }
futures = { version = "0.3", default-features = false }
jf-crhf = { version = "0.1.0", git = "https://github.com/EspressoSystems/jellyfish", tag = "0.4.5" }
jf-vid = { version = "0.1.0", git = "https://github.com/EspressoSystems/jellyfish", tag = "0.4.5" }
Expand All @@ -67,8 +66,9 @@ jf-utils = { version = "0.4.4", git = "https://github.com/espressosystems/jellyf
lazy_static = "1"
libp2p-identity = "0.2"
libp2p-networking = { path = "./crates/libp2p-networking", version = "0.5", default-features = false }
libp2p-swarm-derive = { version = "0.34" }
libp2p-swarm-derive = "0.34"
lru = "0.12"
multiaddr = "0.18"
portpicker = "0.1"
rand = { version = "0.8", features = ["small_rng"] }
rand_chacha = { version = "0.3", default-features = false }
Expand All @@ -81,7 +81,7 @@ surf-disco = "0.9"
tagged-base64 = "0.4"
tide-disco = "0.9"
time = "0.3"
toml = "0.8"
toml = { version = "0.8", default-features = false }
tracing = "0.1"
typenum = "1"
memoize = { version = "0.4", features = ["full"] }
Expand All @@ -92,26 +92,26 @@ vec1 = { version = "1", features = ["serde"] }
reqwest = { version = "0.12", features = ["json"] }

libp2p = { package = "libp2p", version = "0.53", default-features = false, features = [
"macros",
"autonat",
"cbor",
"dns",
"gossipsub",
"identify",
"kad",
"quic",
"request-response",
"secp256k1",
"serde",
"macros",
"autonat",
"cbor",
"dns",
"gossipsub",
"identify",
"kad",
"quic",
"request-response",
"secp256k1",
"serde",
] }
tokio = { version = "1", default-features = false, features = [
"macros",
"net",
"parking_lot",
"rt-multi-thread",
"sync",
"time",
"tracing",
"macros",
"net",
"parking_lot",
"rt-multi-thread",
"sync",
"time",
"tracing",
] }
anyhow = "1"

Expand All @@ -120,7 +120,6 @@ anyhow = "1"
cdn-client = { git = "https://github.com/EspressoSystems/Push-CDN", tag = "0.4.7" }
cdn-broker = { git = "https://github.com/EspressoSystems/Push-CDN", tag = "0.4.7" }
cdn-marshal = { git = "https://github.com/EspressoSystems/Push-CDN", tag = "0.4.7" }
cdn-proto = { git = "https://github.com/EspressoSystems/Push-CDN", tag = "0.4.7" }

### Profiles
###
Expand Down
7 changes: 0 additions & 7 deletions crates/example-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,20 @@ slow-tests = []
gpu-vid = ["hotshot-task-impls/gpu-vid"]

[dependencies]
async-broadcast = { workspace = true }
async-compatibility-layer = { workspace = true }
async-trait = { workspace = true }
anyhow = { workspace = true }
sha3 = "^0.10"
committable = { workspace = true }
either = { workspace = true }
futures = { workspace = true }
hotshot = { path = "../hotshot" }
hotshot-types = { path = "../types" }
hotshot-task-impls = { path = "../task-impls", version = "0.5.36", default-features = false }
rand = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
serde = { workspace = true }
sha2 = { workspace = true }
time = { workspace = true }
async-lock = { workspace = true }
bitvec = { workspace = true }
ethereum-types = { workspace = true }
hotshot-task = { path = "../task" }
vbs = { workspace = true }
url = { workspace = true }
reqwest = { workspace = true }
Expand Down
16 changes: 8 additions & 8 deletions crates/example-types/src/node_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
// You should have received a copy of the MIT License
// along with the HotShot repository. If not, see <https://mit-license.org/>.

use crate::{
auction_results_provider_types::{TestAuctionResult, TestAuctionResultsProvider},
block_types::{TestBlockHeader, TestBlockPayload, TestTransaction},
state_types::{TestInstanceState, TestValidatedState},
storage_types::TestStorage,
};
use hotshot::traits::{
election::{
randomized_committee::RandomizedCommittee, static_committee::StaticCommittee,
Expand All @@ -18,15 +12,21 @@ use hotshot::traits::{
implementations::{CombinedNetworks, Libp2pNetwork, MemoryNetwork, PushCdnNetwork},
NodeImplementation,
};
use hotshot_types::data::EpochNumber;
use hotshot_types::{
data::ViewNumber,
data::{EpochNumber, ViewNumber},
signature_key::{BLSPubKey, BuilderKey},
traits::node_implementation::{NodeType, Versions},
};
use serde::{Deserialize, Serialize};
use vbs::version::StaticVersion;

use crate::{
auction_results_provider_types::{TestAuctionResult, TestAuctionResultsProvider},
block_types::{TestBlockHeader, TestBlockPayload, TestTransaction},
state_types::{TestInstanceState, TestValidatedState},
storage_types::TestStorage,
};

#[derive(
Copy,
Clone,
Expand Down
24 changes: 5 additions & 19 deletions crates/examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,39 +81,25 @@ name = "whitelist-push-cdn"
path = "push-cdn/whitelist-adapter.rs"

[dependencies]
async-broadcast = { workspace = true }
async-compatibility-layer = { workspace = true }
async-lock = { workspace = true }
async-trait = { workspace = true }
bimap = "0.6"
clap = { workspace = true, optional = true }
committable = { workspace = true }
custom_debug = { workspace = true }
dashmap = "6"
either = { workspace = true }
futures = { workspace = true }
hotshot-orchestrator = { version = "0.5.36", path = "../orchestrator", default-features = false }
hotshot-task-impls = { path = "../task-impls", version = "0.5.36", default-features = false }
hotshot-types = { path = "../types" }
hotshot-testing = { path = "../testing" }
hotshot-task-impls = { path = "../task-impls", version = "0.5.36", default-features = false }
libp2p-identity = { workspace = true }
libp2p-networking = { workspace = true }
rand = { workspace = true }
serde = { workspace = true, features = ["rc"] }
thiserror = { workspace = true }
surf-disco = { workspace = true }
time = { workspace = true }
derive_more = { workspace = true }
portpicker.workspace = true
lru.workspace = true
hotshot-task = { path = "../task" }
hotshot = { path = "../hotshot" }
hotshot-example-types = { path = "../example-types" }
chrono = { workspace = true }
vbs = { workspace = true }
sha2.workspace = true
local-ip-address = "0.6"
vec1 = { workspace = true }
url = { workspace = true }

tracing = { workspace = true }
Expand All @@ -128,12 +114,12 @@ cdn-marshal = { workspace = true }
async-std = { workspace = true }
cdn-client = { workspace = true, features = ["runtime-async-std"] }
cdn-broker = { workspace = true, features = [
"runtime-async-std",
"global-permits",
"runtime-async-std",
"global-permits",
] }
cdn-marshal = { workspace = true, features = [
"runtime-async-std",
"global-permits",
"runtime-async-std",
"global-permits",
] }

[dev-dependencies]
Expand Down
2 changes: 0 additions & 2 deletions crates/fakeapi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ anyhow = { workspace = true }
async-compatibility-layer = { workspace = true }
hotshot-types = { path = "../types" }
vbs = { workspace = true }
serde = { workspace = true }
rand = { workspace = true }
hotshot-example-types = { path = "../example-types" }
async-trait = { workspace = true }
futures = { workspace = true }
async-lock = { workspace = true }
tracing = { workspace = true }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/hotshot-stake-table/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ark-ff = "0.4"
ark-serialize = { workspace = true }
ark-std = { workspace = true }
digest = { workspace = true }
ethereum-types = { workspace = true }
primitive-types = { workspace = true }
hotshot-types = { path = "../types" }
jf-crhf = { workspace = true }
jf-signature = { workspace = true, features = ["bls", "schnorr"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/hotshot-stake-table/src/mt_based.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ mod internal;

use ark_std::{collections::HashMap, rand::SeedableRng, sync::Arc};
use digest::crypto_common::rand_core::CryptoRngCore;
use ethereum_types::{U256, U512};
use hotshot_types::traits::stake_table::{SnapshotVersion, StakeTableError, StakeTableScheme};
use primitive_types::{U256, U512};
use serde::{Deserialize, Serialize};

use self::internal::{to_merkle_path, Key, MerkleCommitment, MerkleProof, PersistentMerkleNode};
Expand Down Expand Up @@ -230,8 +230,8 @@ impl<K: Key> StakeTable<K> {
#[cfg(test)]
mod tests {
use ark_std::{rand::SeedableRng, vec::Vec};
use ethereum_types::U256;
use hotshot_types::traits::stake_table::{SnapshotVersion, StakeTableError, StakeTableScheme};
use primitive_types::U256;

use super::StakeTable;

Expand Down
4 changes: 2 additions & 2 deletions crates/hotshot-stake-table/src/mt_based/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::{hash::Hash, sync::Arc, vec, vec::Vec};
use ethereum_types::U256;
use hotshot_types::traits::stake_table::StakeTableError;
use jf_crhf::CRHF;
use jf_utils::canonical;
use primitive_types::U256;
use serde::{Deserialize, Serialize};
use tagged_base64::tagged;

Expand Down Expand Up @@ -631,8 +631,8 @@ mod tests {
vec,
vec::Vec,
};
use ethereum_types::U256;
use jf_utils::test_rng;
use primitive_types::U256;

use super::{super::config, to_merkle_path, PersistentMerkleNode};

Expand Down
4 changes: 2 additions & 2 deletions crates/hotshot-stake-table/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! Utilities to help building a stake table.

use ark_ff::{Field, PrimeField};
use ethereum_types::U256;
use primitive_types::U256;

/// A trait that converts into a field element.
pub trait ToFields<F: Field> {
Expand All @@ -21,6 +21,6 @@ pub trait ToFields<F: Field> {
/// convert a U256 to a field element.
pub(crate) fn u256_to_field<F: PrimeField>(v: &U256) -> F {
let mut bytes = vec![0u8; 32];
v.to_little_endian(&mut bytes);
v.write_as_little_endian(&mut bytes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like the same thing to me, though I'm not really familiar with either crate. is the U256 the same rust type?

it might be worth having someone else (@alxiong ?) confirm this is fine/won't affect downstream repos etc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context: eth-types and primitive-types live in the same repo

The reason for the diff is they've recently updated the names for these methods recently which wasn't yet reflected in our eth-types version

F::from_le_bytes_mod_order(&bytes)
}
4 changes: 2 additions & 2 deletions crates/hotshot-stake-table/src/vec_based.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

use ark_std::{collections::HashMap, hash::Hash, rand::SeedableRng};
use digest::crypto_common::rand_core::CryptoRngCore;
use ethereum_types::{U256, U512};
use hotshot_types::traits::stake_table::{SnapshotVersion, StakeTableError, StakeTableScheme};
use jf_crhf::CRHF;
use jf_rescue::{crhf::VariableLengthRescueCRHF, RescueParameter};
use primitive_types::{U256, U512};
use serde::{Deserialize, Serialize};

use crate::{
Expand Down Expand Up @@ -387,12 +387,12 @@ where
#[cfg(test)]
mod tests {
use ark_std::{rand::SeedableRng, vec::Vec};
use ethereum_types::U256;
use hotshot_types::traits::stake_table::{SnapshotVersion, StakeTableError, StakeTableScheme};
use jf_signature::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme, schnorr::SchnorrSignatureScheme,
SignatureScheme,
};
use primitive_types::U256;

use super::{
config::{FieldType as F, QCVerKey, StateVerKey},
Expand Down
Loading