Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
appaquet committed Oct 11, 2023
1 parent 6d7d2bc commit be8216c
Show file tree
Hide file tree
Showing 19 changed files with 191 additions and 193 deletions.
283 changes: 133 additions & 150 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ anyhow = "1.0.75"
futures = "0.3.28"
log = "0.4.20"
quote = "1.0.33"
syn = { version = "2.0.37", features = ["full", "fold"] }
syn = { version = "2.0.38", features = ["full", "fold"] }
thiserror = "1.0.49"
2 changes: 1 addition & 1 deletion apps/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ thiserror = "1.0.49"
chrono = { version = "0.4.31", default-features = false, features = [] }

[dev-dependencies]
tokio = { version = "1.32.0", features = ["macros"], default-features = false }
tokio = { version = "1.33.0", features = ["macros"], default-features = false }
6 changes: 3 additions & 3 deletions chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tests-utils = ["engine", "tempfile", "directory-chain", "memory-pending", "exoco

[dependencies]
anyhow = "1.0.75"
byteorder = "1.4.3"
byteorder = "1.5.0"
exocore-core = {version = "0.1.25", path = "../core"}
exocore-protos = {version = "0.1.25", path = "../protos"}
exocore-transport = {version = "0.1.25", path = "../transport", default-features = false}
Expand All @@ -32,7 +32,7 @@ bytes = "1.5.0"

# For directory chain
extindex = { version = "0.5.0", optional = true }
memmap2 = { version = "0.8.0", optional = true }
memmap2 = { version = "0.9.0", optional = true }

# For tests
tempfile = { version = "3.8.0", optional = true }
Expand All @@ -41,7 +41,7 @@ tempfile = { version = "3.8.0", optional = true }
exocore-core = {version = "0.1.25", path = "../core", features = ["tests-utils"]}
exocore-transport = {version = "0.1.25", path = "../transport", features = ["tests-utils"]}
tempfile = "3.8.0"
tokio = { version = "1.32.0", features = ["macros"], default-features = false }
tokio = { version = "1.33.0", features = ["macros"], default-features = false }

[[test]]
name = "engine"
Expand Down
4 changes: 2 additions & 2 deletions chain/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ impl BlockBuilder {
header_msg_builder.set_previous_offset(previous_offset);
header_msg_builder.set_previous_hash(previous_hash);
header_msg_builder.set_proposed_operation_id(proposed_operation_id);
header_msg_builder.set_proposed_node_id(&local_node.id().to_string());
header_msg_builder.set_proposed_node_id(local_node.id().to_string().as_str().into());
header_msg_builder.set_operations_size(operations_data_size);
header_msg_builder.set_operations_hash(&operations.hash.to_bytes());

Expand Down Expand Up @@ -729,7 +729,7 @@ impl BlockSignature {
}

pub fn copy_into_builder(&self, builder: &mut block_signature::Builder) {
builder.set_node_id(&self.node_id.to_string());
builder.set_node_id(self.node_id.to_string().as_str().into());
builder.set_node_signature(self.signature.get_bytes());
}
}
Expand Down
19 changes: 13 additions & 6 deletions chain/src/engine/commit_manager/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ impl PendingBlocks {
operations.push(operation_header.get_operation_id());
}

let node_id_str = operation_reader.get_node_id()?;
let node_id_str = operation_reader
.get_node_id()?
.to_str()
.map_err(|err| anyhow!("couldn't convert node id to utf8: {err}"))?;
let node_id = NodeId::from_str(node_id_str)
.map_err(|_| anyhow!("Couldn't convert to NodeID: {}", node_id_str))?;
let node = cell.nodes().get(&node_id).map(|cn| cn.node().clone());
Expand Down Expand Up @@ -207,9 +210,7 @@ impl PendingBlocks {
let mut operations_blocks: HashMap<OperationId, HashSet<OperationId>> = HashMap::new();
for block in pending_blocks.values() {
for operation_id in &block.operations {
let operation = operations_blocks
.entry(*operation_id)
.or_insert_with(HashSet::new);
let operation = operations_blocks.entry(*operation_id).or_default();
operation.insert(block.group_id);
}
}
Expand Down Expand Up @@ -372,7 +373,10 @@ impl PendingBlockRefusal {
let inner_operation = operation_reader.get_operation();
match inner_operation.which()? {
chain_operation::operation::Which::BlockRefuse(_sig) => {
let node_id_str = operation_reader.get_node_id()?;
let node_id_str = operation_reader
.get_node_id()?
.to_str()
.map_err(|err| anyhow!("couldn't convert node id to utf8: {err}"))?;
let node_id = NodeId::from_str(node_id_str)
.map_err(|_| anyhow!("Couldn't convert to NodeID: {}", node_id_str))?;
Ok(PendingBlockRefusal { node_id })
Expand Down Expand Up @@ -401,7 +405,10 @@ impl PendingBlockSignature {
let op_signature_reader = sig?;
let signature_reader = op_signature_reader.get_signature()?;

let node_id_str = operation_reader.get_node_id()?;
let node_id_str = operation_reader
.get_node_id()?
.to_str()
.map_err(|err| anyhow!("couldn't convert node id to utf8: {err}"))?;
let node_id = NodeId::from_str(node_id_str)
.map_err(|_| anyhow!("Couldn't convert to NodeID: {}", node_id_str))?;
let signature = Signature::from_bytes(signature_reader.get_node_signature()?);
Expand Down
2 changes: 1 addition & 1 deletion chain/src/engine/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ pub fn create_dummy_block<I: FrameReader>(
block_builder.set_height(height);
block_builder.set_operations_size(operations_size);
block_builder.set_signatures_size(signatures_size);
block_builder.set_proposed_node_id(&format!("seed={}", seed));
block_builder.set_proposed_node_id(format!("seed={}", seed).as_str().into());

if let Some(previous_block) = previous_block {
let previous_block_header_reader: block_header::Reader =
Expand Down
10 changes: 5 additions & 5 deletions chain/src/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl OperationBuilder {
let mut operation_builder: chain_operation::Builder = frame_builder.get_builder();
operation_builder.set_operation_id(operation_id);
operation_builder.set_group_id(operation_id);
operation_builder.set_node_id(&node_id.to_string());
operation_builder.set_node_id(node_id.to_string().as_str().into());

let inner_operation_builder = operation_builder.init_operation();

Expand Down Expand Up @@ -111,7 +111,7 @@ impl OperationBuilder {
let mut operation_builder: chain_operation::Builder = frame_builder.get_builder();
operation_builder.set_operation_id(operation_id);
operation_builder.set_group_id(operation_id);
operation_builder.set_node_id(&node_id.to_string());
operation_builder.set_node_id(node_id.to_string().as_str().into());

let inner_operation_builder = operation_builder.init_operation();
let mut new_block_builder = inner_operation_builder.init_block_propose();
Expand All @@ -134,7 +134,7 @@ impl OperationBuilder {
let mut operation_builder: chain_operation::Builder = frame_builder.get_builder();
operation_builder.set_operation_id(operation_id);
operation_builder.set_group_id(group_id);
operation_builder.set_node_id(&node_id.to_string());
operation_builder.set_node_id(node_id.to_string().as_str().into());

let inner_operation_builder = operation_builder.init_operation();
let new_sig_builder = inner_operation_builder.init_block_sign();
Expand All @@ -144,7 +144,7 @@ impl OperationBuilder {
let signature = Signature::empty();

let mut sig_builder: block_signature::Builder = new_sig_builder.init_signature();
sig_builder.set_node_id(&node_id.to_string());
sig_builder.set_node_id(node_id.to_string().as_str().into());
sig_builder.set_node_signature(signature.get_bytes());

Ok(OperationBuilder {
Expand All @@ -163,7 +163,7 @@ impl OperationBuilder {
let mut operation_builder: chain_operation::Builder = frame_builder.get_builder();
operation_builder.set_operation_id(operation_id);
operation_builder.set_group_id(group_id);
operation_builder.set_node_id(&node_id.to_string());
operation_builder.set_node_id(node_id.to_string().as_str().into());

let inner_operation_builder = operation_builder.init_operation();
let _new_refuse_builder = inner_operation_builder.init_block_refuse();
Expand Down
5 changes: 4 additions & 1 deletion chain/tests/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ async fn two_nodes_one_data_node() -> anyhow::Result<()> {
let (offset, _height) = handle.get_chain_last_block_info()?.unwrap();
let block = handle.get_chain_block(offset)?.unwrap();
let block_header_reader = block.header.get_reader()?;
assert_eq!(node0_id, block_header_reader.get_proposed_node_id()?);
assert_eq!(
node0_id,
block_header_reader.get_proposed_node_id()?.to_string()?
);
}

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion clients/c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exocore-store = {version = "0.1.25", path = "../../store", default-features = fa
exocore-transport = {version = "0.1.25", path = "../../transport", features = ["p2p-full"]}
weak-table = "0.3.2"
futures = "0.3.28"
libc = "0.2.148"
libc = "0.2.149"
log = "0.4.20"
log4rs = "1.2.0"
serde_json = "1.0.107"
12 changes: 6 additions & 6 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ web = [
[dependencies]
anyhow = "1.0.75"
bs58 = "0.5.0"
byteorder = "1.4.3"
byteorder = "1.5.0"
bytes = "1.5.0"
chrono = "0.4.31"
exocore-protos = {version = "0.1.25", path = "../protos"}
futures = { version = "0.3.28", features = ["async-await"] }
libp2p = { version = "0.52.3", features = ["noise", "secp256k1"], default-features = false }
libp2p-identity = { version = "0.2.4", features = ["secp256k1", "ed25519"], default-features = false }
libp2p-identity = { version = "0.2.5", features = ["secp256k1", "ed25519"], default-features = false }
log = "0.4.20"
log4rs = { version = "1.2.0", optional = true }
multihash = "0.19.1"
Expand All @@ -48,7 +48,7 @@ serde = "1.0.188"
serde_derive = "1.0.188"
serde_json = "1.0.107"
serde_yaml = "0.9.25"
shadow-rs = { version = "0.24.0", default-features = false }
shadow-rs = { version = "0.24.1", default-features = false }
thiserror = "1.0.49"
url = "2.4.1"
uuid = { version = "1.4.1", features = ["v4", "wasm-bindgen"] }
Expand All @@ -64,16 +64,16 @@ wasm-bindgen-futures = "0.4.37"
chrono = { version = "0.4.31", default-features = false, features = [] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.32.0", features = ["rt"], default-features = false }
tokio = { version = "1.33.0", features = ["rt"], default-features = false }

[build-dependencies]
shadow-rs = { version = "0.24.0", default-features = false }
shadow-rs = { version = "0.24.1", default-features = false }

[dev-dependencies]
criterion_bencher_compat = "0.4.0"
log4rs = "1.2.0"
tempfile = "3.8.0"
tokio = { version = "1.32.0", features = ["macros", "rt", "rt-multi-thread", "time"], default-features = false }
tokio = { version = "1.33.0", features = ["macros", "rt", "rt-multi-thread", "time"], default-features = false }

[[bench]]
harness = false
Expand Down
2 changes: 1 addition & 1 deletion discovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ wasm-timer = "0.2.5"

# For server
hyper = { version = "0.14.27", features = ["full"], optional = true }
tokio = { version = "1.32.0", default-features = false, features = ["macros", "time"], optional = true }
tokio = { version = "1.33.0", default-features = false, features = ["macros", "time"], optional = true }

[[test]]
name = "discovery"
Expand Down
2 changes: 1 addition & 1 deletion exo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ serde_derive = "1.0.188"
serde_json = "1.0.107"
tempfile = "3.8.0"
thiserror = "1.0.49"
tokio = { version = "1.32.0", features = ["macros"], default-features = false }
tokio = { version = "1.33.0", features = ["macros"], default-features = false }
url = "2.4.1"
zip = { version = "0.6.6", features = ["deflate"], default-features = false }
4 changes: 2 additions & 2 deletions protos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ version = "0.1.25"
[dependencies]
anyhow = "1.0.75"
base64 = "0.21"
capnp = { version = "0.17", features = ["sync_reader"] }
capnp = { version = "0.18", features = ["sync_reader"] }
chrono = "0.4.31"
prost = "0.12.1"
prost-types = "0.12.1"
protobuf = "3.2.0"
protobuf = "3.3.0"
serde = "1.0.188"
serde_derive = "1.0.188"
serde_json = "1.0.107"
Expand Down
6 changes: 3 additions & 3 deletions store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ exocore-core = {version = "0.1.25", path = "../core", optional = true}
exocore-transport = {version = "0.1.25", path = "../transport", default-features = false, optional = true}

# local
byteorder = {version = "1.4.3", optional = true}
byteorder = {version = "1.5.0", optional = true}
crc = {version = "3.0.1", optional = true}
extsort = {version = "0.4.2", optional = true}
lru = {version = "0.11.1", optional = true}
lru = {version = "0.12.0", optional = true}
serde = {version = "1.0.188", optional = true}
serde_derive = {version = "1.0.188", optional = true}
serde_json = {version = "1.0.107", optional = true}
Expand All @@ -58,4 +58,4 @@ tantivy = {version = "0.19.2", optional = true}
exocore-chain = {version = "0.1.25", path = "../chain", features = ["tests-utils"]}
exocore-core = {version = "0.1.25", path = "../core", features = ["tests-utils"]}
tempfile = "3.8.0"
tokio = {version = "1.32.0", features = ["macros"], default-features = false}
tokio = {version = "1.33.0", features = ["macros"], default-features = false}
12 changes: 8 additions & 4 deletions store/src/remote/seri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn query_results_to_response_frame(
msg_builder.set_response(&buf);
}
Err(err) => {
msg_builder.set_error(&err.to_string());
msg_builder.set_error(err.to_string().as_str().into());
}
}

Expand All @@ -80,7 +80,9 @@ where
{
let reader = frame.get_reader()?;
if reader.has_error() {
Err(Error::Remote(reader.get_error()?.to_owned()))
Err(Error::Remote(reader.get_error()?.to_string().map_err(
|err| anyhow!("couldn't convert error to utf8: {err}"),
)?))
} else {
let data = reader.get_response()?;
let res = EntityResults::decode(data)?;
Expand Down Expand Up @@ -125,7 +127,7 @@ pub fn mutation_result_to_response_frame(
msg_builder.set_response(&buf);
}
Err(err) => {
msg_builder.set_error(&err.to_string());
msg_builder.set_error(err.to_string().as_str().into());
}
}

Expand All @@ -140,7 +142,9 @@ where
{
let reader = frame.get_reader()?;
if reader.has_error() {
Err(Error::Remote(reader.get_error()?.to_owned()))
Err(Error::Remote(reader.get_error()?.to_string().map_err(
|err| anyhow!("couldn't convert error to utf8: {err}"),
)?))
} else {
let data = reader.get_response()?;
Ok(MutationResult::decode(data)?)
Expand Down
6 changes: 3 additions & 3 deletions transport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ tests-utils = ["exocore-core/tests-utils"]

[dependencies]
anyhow = "1.0.75"
byteorder = "1.4.3"
byteorder = "1.5.0"
bytes = "1.5.0"
exocore-core = {version = "0.1.25", path = "../core"}
exocore-protos = {version = "0.1.25", path = "../protos"}
futures = "0.3.28"
gloo-timers = {version = "0.3", optional = true}
hyper = {version = "0.14.27", features = ["full"], optional = true}
libp2p = {version = "0.52.3", optional = true, default-features = false, features = ["noise", "websocket", "yamux", "ping", "identify", "macros", "tokio", "dns"]}
libp2p-identity = { version = "0.2.4", features = ["secp256k1", "ed25519"], default-features = false }
libp2p-identity = { version = "0.2.5", features = ["secp256k1", "ed25519"], default-features = false }
libp2p-mplex = {version = "0.40.0", optional = true}
log = "0.4.20"
pin-project = "1.1.3"
Expand All @@ -36,4 +36,4 @@ url = {version = "2.4.1", optional = true}

[dev-dependencies]
exocore-core = {version = "0.1.25", path = "../core", features = ["tests-utils"]}
tokio = {version = "1.32.0", features = ["macros"], default-features = false}
tokio = {version = "1.33.0", features = ["macros"], default-features = false}
3 changes: 2 additions & 1 deletion transport/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ impl OutMessage {
envelope_message_builder.set_service(service.to_code());
envelope_message_builder.set_type(T::MESSAGE_TYPE);
envelope_message_builder.set_cell_id(cell.id().as_bytes());
envelope_message_builder.set_from_node_id(&cell.local_node().id().to_string());
envelope_message_builder
.set_from_node_id(cell.local_node().id().to_string().as_str().into());
envelope_message_builder.set_data(&frame.as_bytes());

Ok(OutMessage {
Expand Down
2 changes: 1 addition & 1 deletion transport/src/p2p/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl NetworkBehaviour for ExocoreBehaviour {
.peers
.get(peer_id)
.map(|p| p.addresses.clone())
.unwrap_or_else(Vec::new);
.unwrap_or_default();

Ok(addrs)
}
Expand Down

0 comments on commit be8216c

Please sign in to comment.