Skip to content

Commit

Permalink
[refactor]: bump dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Marin Veršić <[email protected]>
  • Loading branch information
mversic committed Apr 18, 2024
1 parent 963c096 commit 742a9ba
Show file tree
Hide file tree
Showing 56 changed files with 583 additions and 536 deletions.
748 changes: 395 additions & 353 deletions Cargo.lock

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,76 +54,76 @@ iroha_executor_derive = { version = "=2.0.0-pre-rc.20", path = "smart_contract/e
iroha_trigger_derive = { version = "=2.0.0-pre-rc.20", path = "smart_contract/trigger/derive" }

test_network = { version = "=2.0.0-pre-rc.20", path = "core/test_network" }
proc-macro2 = "1.0.69"
syn = { version = "2.0.38", default-features = false }
quote = "1.0.33"
proc-macro2 = "1.0.81"
syn = { version = "2.0.60", default-features = false }
quote = "1.0.36"
manyhow = { version = "0.8.1", features = ["darling"] }
darling = "0.20.3"
darling = "0.20.8"
drop_bomb = "0.1.5"

futures = { version = "0.3.30", default-features = false }
tokio = "1.33.0"
tokio-stream = "0.1.14"
tokio = "1.37.0"
tokio-stream = "0.1.15"
tokio-tungstenite = "0.20.1"
tungstenite = "0.20.1"
crossbeam-queue = "0.3.8"
crossbeam-queue = "0.3.11"
parking_lot = { version = "0.12.1" }

once_cell = "1.18.0"
tempfile = "3.8.0"
once_cell = "1.19.0"
tempfile = "3.10.1"
path-absolutize = "3.1.1"
pathdiff = "0.2.1"
bytes = "1.5.0"
bytes = "1.6.0"

vergen = { version = "8.3.1", default-features = false }
trybuild = "1.0.85"
trybuild = "1.0.91"
impls = "1.0.3"

base64 = { version = "0.21.4", default-features = false }
base64 = { version = "0.21.7", default-features = false }
hex = { version = "0.4.3", default-features = false }
nonzero_ext = { version = "0.3.0", default-features = false }

url = "2.4.1"
url = "2.5.0"
prometheus = { version = "0.13.3", default-features = false }

clap = "4.4.6"
clap = "4.5.4"
owo-colors = "3.5.0"
supports-color = "2.1.0"
inquire = "0.6.2"
spinoff = "0.8.0"

criterion = "0.5.1"
expect-test = "1.4.1"
expect-test = "1.5.0"

eyre = "0.6.8"
color-eyre = "0.6.2"
thiserror = { version = "1.0.49", default-features = false }
eyre = "0.6.12"
color-eyre = "0.6.3"
thiserror = { version = "1.0.58", default-features = false }
displaydoc = { version = "0.2.4", default-features = false }

cfg-if = "1.0.0"
derive_more = { version = "0.99.17", default-features = false }
async-trait = "0.1.73"
async-trait = "0.1.80"
strum = { version = "0.25.0", default-features = false }
getset = "0.1.2"
hex-literal = "0.4.1"

rand = { version = "0.8.5", default-features = false, features = ["getrandom", "alloc"] }
warp = { version = "0.3.6", default-features = false }
wasmtime = "15.0.0"
warp = { version = "0.3.7", default-features = false }
wasmtime = "15.0.1"

tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", default-features = false }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", default-features = false }

dashmap = "5.5.3"
rustc-hash = "1.1.0"

serde = { version = "1.0.188", default-features = false }
serde_json = { version = "1.0.107", default-features = false }
serde_yaml = "0.9.29"
serde_with = { version = "3.3.0", default-features = false }
parity-scale-codec = { version = "3.6.5", default-features = false }
serde = { version = "1.0.198", default-features = false }
serde_json = { version = "1.0.116", default-features = false }
serde_yaml = "0.9.34"
serde_with = { version = "3.7.0", default-features = false }
parity-scale-codec = { version = "3.6.9", default-features = false }
json5 = "0.4.1"
toml = "0.8.8"
toml = "0.8.12"

storage = { git = "https://github.com/Erigara/storage.git", rev = "e0afe4b42810e9b3cf067cfbaa63a6ad7af6e2ba" }

Expand Down Expand Up @@ -188,7 +188,7 @@ clippy.string_lit_as_bytes = "warn"
clippy.suspicious_operation_groupings = "warn"
clippy.useless_let_if_seq = "warn"

#cargo
# cargo
clippy.redundant_feature_names = "deny"
clippy.wildcard_dependencies = "deny"

Expand Down
4 changes: 2 additions & 2 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ iroha_version = { workspace = true, features = ["http"] }

attohttpc = { version = "0.26.1", default-features = false }
eyre = { workspace = true }
http = "0.2.9"
http = "0.2.12"
url = { workspace = true }
rand = { workspace = true }
serde = { workspace = true, features = ["derive"] }
Expand All @@ -73,7 +73,7 @@ parity-scale-codec = { workspace = true, default-features = false, features = ["
tokio = { workspace = true, features = ["rt"] }
tokio-tungstenite = { workspace = true }
tungstenite = { workspace = true }
futures-util = "0.3.28"
futures-util = "0.3.30"
merge = "0.1.0"
toml = { workspace = true }
nonzero_ext = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ impl Client {
match transaction_event.status() {
TransactionStatus::Queued => {}
TransactionStatus::Approved => {
block_height = transaction_event.block_height;
block_height = transaction_event.block_height();
}
TransactionStatus::Rejected(reason) => {
return Err((Clone::clone(&**reason)).into());
Expand Down
15 changes: 3 additions & 12 deletions client/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,13 @@ pub trait RequestBuilder {

/// Add a single query param
#[must_use]
fn param<K, V: ?Sized>(self, key: K, value: &V) -> Self
where
K: AsRef<str>,
V: ToString;
fn param<K: AsRef<str>, V: ToString + ?Sized>(self, key: K, value: &V) -> Self;

/// Add multiple headers at once. Uses [`RequestBuilder::header`] for each param.
#[must_use]
fn headers<H, N, V>(mut self, headers: H) -> Self
fn headers<H: IntoIterator, N: AsRef<str>, V: ToString>(mut self, headers: H) -> Self
where
H: IntoIterator,
H::Item: Borrow<(N, V)>,
N: AsRef<str>,
V: ToString,
Self: Sized,
{
for pair in headers {
Expand All @@ -59,10 +53,7 @@ pub trait RequestBuilder {

/// Add a single header
#[must_use]
fn header<N, V: ?Sized>(self, name: N, value: &V) -> Self
where
N: AsRef<str>,
V: ToString;
fn header<N: AsRef<str>, V: ToString + ?Sized>(self, name: N, value: &V) -> Self;

/// Set request's binary body
#[must_use]
Expand Down
18 changes: 3 additions & 15 deletions client/src/http_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,13 @@ impl RequestBuilder for DefaultRequestBuilder {
}
}

fn header<K, V: ?Sized>(self, key: K, value: &V) -> Self
where
K: AsRef<str>,
V: ToString,
{
fn header<K: AsRef<str>, V: ToString + ?Sized>(self, key: K, value: &V) -> Self {
self.and_then(|builder| {
Ok(builder.header(header_name_from_str(key.as_ref())?, value.to_string()))
})
}

fn param<K, V: ?Sized>(self, key: K, value: &V) -> Self
where
K: AsRef<str>,
V: ToString,
{
fn param<K: AsRef<str>, V: ToString + ?Sized>(self, key: K, value: &V) -> Self {
self.and_then(|b| Ok(b.param(key, value.to_string())))
}

Expand Down Expand Up @@ -157,11 +149,7 @@ impl RequestBuilder for DefaultWebSocketRequestBuilder {
Self(self.0.and(Err(eyre!("No params expected"))))
}

fn header<N, V: ?Sized>(self, name: N, value: &V) -> Self
where
N: AsRef<str>,
V: ToString,
{
fn header<N: AsRef<str>, V: ToString + ?Sized>(self, name: N, value: &V) -> Self {
self.and_then(|b| Ok(b.header(header_name_from_str(name.as_ref())?, value.to_string())))
}

Expand Down
2 changes: 1 addition & 1 deletion client_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ erased-serde = "0.3.31"

[build-dependencies]
vergen = { version = "8.3.1", default-features = false }
color-eyre = "0.6.2"
color-eyre = "0.6.3"
8 changes: 4 additions & 4 deletions client_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl MetadataArgs {
/// Should be combined with `#[command(flatten)]` attr.
#[derive(clap::Args, Debug, Clone, PartialEq, Eq)]
pub struct MetadataValueArg {
/// Wrapper around MetadataValue to accept possible values and fallback to json.
/// Wrapper around `MetadataValue` to accept possible values and fallback to json.
///
/// The following types are supported:
/// Numbers: decimal with optional point
Expand Down Expand Up @@ -400,10 +400,10 @@ mod domain {
/// Domain name as double-quited string
#[arg(short, long)]
pub id: DomainId,
/// Account from which to transfer (in form `name@domain_name')
/// Account from which to transfer (in form `name@domain_name`)
#[arg(short, long)]
pub from: AccountId,
/// Account to which to transfer (in form `name@domain_name')
/// Account to which to transfer (in form `name@domain_name`)
#[arg(short, long)]
pub to: AccountId,
#[command(flatten)]
Expand Down Expand Up @@ -531,7 +531,7 @@ mod account {
/// Register account
#[derive(clap::Args, Debug)]
pub struct Register {
/// Id of account in form `name@domain_name'
/// Id of account in form `name@domain_name`
#[arg(short, long)]
pub id: AccountId,
/// Its public key
Expand Down
2 changes: 1 addition & 1 deletion config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ toml = { workspace = true }
merge = "0.1.0"

[dev-dependencies]
proptest = "1.3.1"
proptest = "1.4.0"
stacker = "0.1.15"
expect-test = { workspace = true }
trybuild = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion config/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ eyre = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_with = { workspace = true, features = ["macros", "std"] }
thiserror = { workspace = true }
num-traits = "0.2.17"
num-traits = "0.2.18"

serde_json = { version = "1", optional = true }

Expand Down
12 changes: 6 additions & 6 deletions config/base/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,12 @@ impl<'a> Iterator for ExtendsPathsIter<'a> {
mod tests {
use super::*;

impl ExtendsPaths {
fn as_str_vec(&self) -> Vec<&str> {
self.iter().map(|p| p.to_str().unwrap()).collect()
}
}

#[test]
fn single_missing_field() {
let mut emitter: Emitter<MissingFieldError> = Emitter::new();
Expand Down Expand Up @@ -670,12 +676,6 @@ mod tests {

#[test]
fn iterating_over_extends() {
impl ExtendsPaths {
fn as_str_vec(&self) -> Vec<&str> {
self.iter().map(|p| p.to_str().unwrap()).collect()
}
}

let single = ExtendsPaths::Single("single".into());
assert_eq!(single.as_str_vec(), vec!["single"]);

Expand Down
Binary file modified configs/swarm/executor.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ parking_lot = { workspace = true, features = ["deadlock_detection"] }
derive_more = { workspace = true }
nonzero_ext = { workspace = true }

uuid = { version = "1.4.1", features = ["v4"] }
indexmap = "2.1.0"
uuid = { version = "1.8.0", features = ["v4"] }
indexmap = "2.2.6"

[dev-dependencies]
criterion = { workspace = true }
Expand Down
5 changes: 2 additions & 3 deletions core/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub enum BlockValidationError {
/// Error during signature verification
#[derive(thiserror::Error, displaydoc::Display, Debug, Clone, Copy, PartialEq, Eq)]
pub enum SignatureVerificationError {
/// The block doesn't have enough valid signatures to be committed ({votes_count} out of {min_votes_for_commit})
/// The block doesn't have enough valid signatures to be committed (`votes_count` out of `min_votes_for_commit`)
NotEnoughSignatures {
/// Current number of signatures
votes_count: usize,
Expand Down Expand Up @@ -607,8 +607,7 @@ mod valid {
let payload = payload(&block).clone();
key_pairs
.iter()
.enumerate()
.map(|(_, key_pair)| SignatureOf::new(key_pair, &payload))
.map(|key_pair| SignatureOf::new(key_pair, &payload))
.try_for_each(|signature| block.add_signature(signature))
.expect("Failed to add signatures");

Expand Down
2 changes: 1 addition & 1 deletion core/src/kura.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ pub enum Error {
Codec(#[from] parity_scale_codec::Error),
/// Failed to allocate buffer
Alloc(#[from] std::collections::TryReserveError),
/// Tried reading block data out of bounds: {start_block_height}, {block_count}
/// Tried reading block data out of bounds: `start_block_height`, `block_count`
OutOfBoundsBlockRead {
/// The block height from which the read was supposed to start
start_block_height: u64,
Expand Down
2 changes: 1 addition & 1 deletion core/src/query/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub enum Error {
/// Unknown cursor error.
#[error(transparent)]
UnknownCursor(#[from] UnknownCursor),
/// Connection with LiveQueryStore is closed.
/// Connection with `LiveQueryStore` is closed.
#[error("Connection with LiveQueryStore is closed")]
ConnectionClosed,
/// Fetch size is too big.
Expand Down
5 changes: 1 addition & 4 deletions core/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,7 @@ pub mod tests {
.expect("Failed to accept Transaction.")
};
// Check that fully signed transaction passes signature check
assert!(matches!(
fully_signed_tx.check_signature_condition(&state_view),
true
));
assert!(fully_signed_tx.check_signature_condition(&state_view));

let get_tx = |key_pair| {
AcceptedTransaction::accept(tx.clone().sign(&key_pair), &chain_id, &tx_limits)
Expand Down
2 changes: 1 addition & 1 deletion core/src/smartcontracts/isi/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ pub mod query {
domain.accounts.values().filter(move |account| {
let asset_id =
AssetId::new(asset_definition_id.clone(), account.id().clone());
account.assets.get(&asset_id).is_some()
account.assets.contains_key(&asset_id)
})
})?
.cloned(),
Expand Down
4 changes: 2 additions & 2 deletions core/src/smartcontracts/isi/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub mod isi {
}

let domain = state_transaction.world.domain_mut(&account_id.domain_id)?;
if domain.accounts.get(&account_id).is_some() {
if domain.accounts.contains_key(&account_id) {
return Err(RepetitionError {
instruction_type: InstructionType::Register,
id: IdBox::AccountId(account_id),
Expand Down Expand Up @@ -121,7 +121,7 @@ pub mod isi {
let domain = state_transaction
.world
.domain_mut(&asset_definition_id.domain_id)?;
if domain.asset_definitions.get(&asset_definition_id).is_some() {
if domain.asset_definitions.contains_key(&asset_definition_id) {
return Err(RepetitionError {
instruction_type: InstructionType::Register,
id: IdBox::AssetDefinitionId(asset_definition_id),
Expand Down
4 changes: 2 additions & 2 deletions core/src/smartcontracts/isi/triggers/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,13 @@ impl Set {
/// Apply `f` to triggers that belong to the given [`DomainId`]
///
/// Return an empty list if [`Set`] doesn't contain any triggers belonging to [`DomainId`].
pub fn inspect_by_domain_id<'a, F: 'a, R>(
pub fn inspect_by_domain_id<'a, F, R>(
&'a self,
domain_id: &DomainId,
f: F,
) -> impl Iterator<Item = R> + '_
where
F: Fn(&TriggerId, &dyn LoadedActionTrait) -> R,
F: Fn(&TriggerId, &dyn LoadedActionTrait) -> R + 'a,
{
let domain_id = domain_id.clone();

Expand Down
Loading

0 comments on commit 742a9ba

Please sign in to comment.