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

update dependencies #3848

Merged
merged 5 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1,832 changes: 967 additions & 865 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async-broadcast = "0.7"
async-compatibility-layer = { version = "1.2.1", default-features = false, features = [
"logging-utils",
] }
async-lock = "2"
async-lock = "3"
async-std = { version = "1", features = ["attributes"] }
async-trait = "0.1"
bincode = "1"
Expand Down Expand Up @@ -174,3 +174,6 @@ rust_2018_idioms = { level = "warn", priority = -1 }
# TODO change to deny
missing_docs = "warn"
warnings = "warn"
unexpected_cfgs = { level = "allow", check-cfg = [
'cfg(async_executor_impl, values("tokio", "async-std"))',
] }
5 changes: 5 additions & 0 deletions crates/example-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ reqwest = { workspace = true }
tokio = { workspace = true }
[target.'cfg(all(async_executor_impl = "async-std"))'.dependencies]
async-std = { workspace = true }

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = [
'cfg(async_executor_impl, values("tokio", "async-std"))',
] }
4 changes: 2 additions & 2 deletions crates/hotshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1029,9 +1029,9 @@ impl<TYPES: NodeType> HotShotInitializer<TYPES> {
///
/// # Arguments
/// * `start_view` - The minimum view number that we are confident won't lead to a double vote
/// after restart.
/// after restart.
/// * `validated_state` - Optional validated state that if given, will be used to construct the
/// `SystemContext`.
/// `SystemContext`.
#[allow(clippy::too_many_arguments)]
pub fn from_reload(
anchor_leaf: Leaf<TYPES>,
Expand Down
6 changes: 2 additions & 4 deletions crates/hotshot/src/traits/networking/push_cdn_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,8 @@ impl<K: SignatureKey + 'static> ConnectedNetwork<K> for PushCdnNetwork<K> {
) -> Result<(), NetworkError> {
self.broadcast_message(message, topic.into())
.await
.map_err(|e| {
.inspect_err(|_e| {
self.metrics.num_failed_messages.add(1);
e
})
}

Expand All @@ -491,9 +490,8 @@ impl<K: SignatureKey + 'static> ConnectedNetwork<K> for PushCdnNetwork<K> {
) -> Result<(), NetworkError> {
self.broadcast_message(message, Topic::Da)
.await
.map_err(|e| {
.inspect_err(|_e| {
self.metrics.num_failed_messages.add(1);
e
})
}

Expand Down
1 change: 1 addition & 0 deletions crates/hotshot/src/types/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES> + 'static, V: Versions>
/// there are two cleaner solutions:
/// - make the stream generic and in nodetypes or nodeimpelmentation
/// - type wrapper
///
/// NOTE: this is only used for sanity checks in our tests
#[must_use]
pub fn internal_event_stream_receiver_known_impl(&self) -> Receiver<Arc<HotShotEvent<TYPES>>> {
Expand Down
4 changes: 2 additions & 2 deletions crates/task-impls/src/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct TestHarnessState<TYPES: NodeType> {
/// # Arguments
/// * `event_stream` - if given, will be used to register the task builder.
/// * `allow_extra_output` - whether to allow an extra output after we've seen all expected
/// outputs. Should be `false` in most cases.
/// outputs. Should be `false` in most cases.
///
/// # Panics
/// Panics if any state the test expects is not set. Panicking causes a test failure
Expand Down Expand Up @@ -82,7 +82,7 @@ pub async fn run_harness<TYPES, S: TaskState<Event = HotShotEvent<TYPES>> + Send
///
/// # Arguments
/// * `allow_extra_output` - whether to allow an extra output after we've seen all expected
/// outputs. Should be `false` in most cases.
/// outputs. Should be `false` in most cases.
///
/// # Panics
/// Will panic to fail the test when it receives and unexpected event
Expand Down
6 changes: 3 additions & 3 deletions crates/task-impls/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ impl<TYPES: NodeType + Default> Default for LeafChainTraversalOutcome<TYPES> {
/// [HotStuff](https://arxiv.org/pdf/1803.05069) section 5:
///
/// > When a node b* carries a QC that refers to a direct parent, i.e., b*.justify.node = b*.parent,
/// we say that it forms a One-Chain. Denote by b'' = b*.justify.node. Node b* forms a Two-Chain,
/// if in addition to forming a One-Chain, b''.justify.node = b''.parent.
/// It forms a Three-Chain, if b'' forms a Two-Chain.
/// > we say that it forms a One-Chain. Denote by b'' = b*.justify.node. Node b* forms a Two-Chain,
/// > if in addition to forming a One-Chain, b''.justify.node = b''.parent.
/// > It forms a Three-Chain, if b'' forms a Two-Chain.
///
/// We follow this exact logic to determine if we are able to reach a commit and a decide. A commit
/// is reached when we have a two chain, and a decide is reached when we have a three chain.
Expand Down
5 changes: 5 additions & 0 deletions crates/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ tokio = { workspace = true }

[target.'cfg(all(async_executor_impl = "async-std"))'.dependencies]
async-std = { workspace = true }

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = [
'cfg(async_executor_impl, values("tokio", "async-std"))',
] }
2 changes: 1 addition & 1 deletion crates/testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#![cfg_attr(
// hotshot_example option is set manually in justfile when running examples
not(any(test, debug_assertions, hotshot_example)),
not(any(test, debug_assertions)),
deprecated = "suspicious usage of testing/demo implementations in non-test/non-debug build"
)]

Expand Down
2 changes: 1 addition & 1 deletion crates/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ serde_bytes = { workspace = true }
tagged-base64 = { workspace = true }
vbs = { workspace = true }
displaydoc = { version = "0.2.5", default-features = false }
dyn-clone = { git = "https://github.com/dtolnay/dyn-clone", tag = "1.0.17" }
dyn-clone = "1.0.17"
url = { workspace = true }
utils = { path = "../utils" }
vec1 = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/types/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ pub struct QuorumProposal<TYPES: NodeType> {
/// Possible timeout or view sync certificate.
/// - A timeout certificate is only present if the justify_qc is not for the preceding view
/// - A view sync certificate is only present if the justify_qc and timeout_cert are not
/// present.
/// present.
pub proposal_certificate: Option<ViewChangeEvidence<TYPES>>,
}

Expand Down Expand Up @@ -817,7 +817,7 @@ pub mod null_block {
#[memoize(SharedCache, Capacity: 10)]
#[must_use]
pub fn commitment(num_storage_nodes: usize) -> Option<VidCommitment> {
let vid_result = vid_scheme(num_storage_nodes).commit_only(&Vec::new());
let vid_result = vid_scheme(num_storage_nodes).commit_only(Vec::new());

match vid_result {
Ok(r) => Some(r),
Expand Down
3 changes: 2 additions & 1 deletion crates/types/src/traits/states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ pub trait StateDelta:
/// * The type of block that modifies this type of state ([`BlockPayload`](`ValidatedStates::
/// BlockPayload`))
/// * The ability to validate that a block header is actually a valid extension of this state and
/// produce a new state, with the modifications from the block applied
/// produce a new state, with the modifications from the block applied
///
/// ([`validate_and_apply_header`](`ValidatedState::validate_and_apply_header))
pub trait ValidatedState<TYPES: NodeType>:
Serialize + DeserializeOwned + Debug + Default + PartialEq + Eq + Send + Sync + Clone
Expand Down
1 change: 1 addition & 0 deletions crates/types/src/vid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ impl Precomputable for VidSchemeType {
/// Foreign type rules prevent us from doing:
/// - `impl From<VidDisperse<VidSchemeType>> for VidDisperse<Advz>`
/// - `impl VidDisperse<VidSchemeType> {...}`
///
/// and similarly for `Statement`.
/// Thus, we accomplish type conversion via functions.
fn vid_disperse_conversion(vid_disperse: VidDisperse<Advz>) -> VidDisperse<VidSchemeType> {
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
])
(fenix.packages.${system}.fromToolchainFile {
dir = ./.;
sha256 = "sha256-opUgs6ckUQCyDxcB9Wy51pqhd0MPGHUVbwRKKPGiwZU=";
sha256 = "sha256-yMuSb5eQPO/bHv+Bcf/US8LVMbf/G/0MSfiPwBhiPpk=";
})
];
# needed for compiling static binary
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.78"
channel = "1.82"
components = [ "cargo", "clippy", "rust-src", "rustc", "rustfmt", "llvm-tools-preview" ]