From 11c973a6c9eef1c50be14319ec091e648811e3a5 Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Mon, 16 Dec 2024 12:36:08 +0100 Subject: [PATCH 1/9] chore: update `lazy_static` versions --- ant-evm/Cargo.toml | 2 +- ant-networking/Cargo.toml | 2 +- ant-protocol/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index 6e184a6ee1..c530d8799f 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -18,7 +18,7 @@ test-utils = [] custom_debug = "~0.6.1" evmlib = { path = "../evmlib", version = "0.1.4" } hex = "~0.4.3" -lazy_static = "~1.4.0" +lazy_static = "^1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = { version = "~0.8.5", features = ["small_rng"] } ring = "0.17.8" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index 8849a3752b..8824de96f6 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -38,7 +38,7 @@ hyper = { version = "0.14", features = [ "http1", ], optional = true } itertools = "~0.12.1" -lazy_static = "~1.4.0" +lazy_static = "^1.4.0" libp2p = { version = "0.54.1", features = [ "tokio", "dns", diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index c8c4b6808d..9efabd5435 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -25,7 +25,7 @@ custom_debug = "~0.6.1" dirs-next = "~2.0.0" exponential-backoff = "2.0.0" hex = "~0.4.3" -lazy_static = "1.4.0" +lazy_static = "^1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } # # watch out updating this, protoc compiler needs to be installed on all build systems # # arm builds + musl are very problematic From 5468aafb7419aa148bae2eeb9e44848b41aa69ec Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Mon, 16 Dec 2024 12:40:56 +0100 Subject: [PATCH 2/9] chore: change `serde` version --- evmlib/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmlib/Cargo.toml b/evmlib/Cargo.toml index 5e4a5b805e..bde3e9b6d8 100644 --- a/evmlib/Cargo.toml +++ b/evmlib/Cargo.toml @@ -16,7 +16,7 @@ external-signer = [] [dependencies] alloy = { version = "0.7.3", default-features = false, features = ["contract", "json-rpc", "network", "node-bindings", "provider-http", "reqwest-rustls-tls", "rpc-client", "rpc-types", "signer-local", "std"] } dirs-next = "~2.0.0" -serde = "=1.0.210" +serde = "1" serde_with = { version = "3.11.0", features = ["macros"] } thiserror = "1.0" tracing = { version = "~0.1.26" } From e21c0d397277d6c409427276af1fc2f0c03cbeb6 Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Mon, 16 Dec 2024 13:06:56 +0100 Subject: [PATCH 3/9] chore: change `color-eyre` versions --- Cargo.toml | 3 +++ ant-cli/Cargo.toml | 8 ++++---- ant-logging/Cargo.toml | 2 +- ant-metrics/Cargo.toml | 2 +- ant-node-manager/Cargo.toml | 4 ++-- ant-node-rpc-client/Cargo.toml | 8 ++++---- ant-node/Cargo.toml | 2 +- ant-protocol/Cargo.toml | 2 +- node-launchpad/Cargo.toml | 6 +++--- test-utils/Cargo.toml | 2 +- 10 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6840a1e40d..fad606de58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,3 +50,6 @@ pre-release-commit-message = "chore(release): release commit, tags, deps and cha publish = false push = false tag = false + +[workspace.dependencies] +backtrace = "=0.3.71" diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index c6eecb42f6..6c89266a4d 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -32,9 +32,9 @@ autonomi = { path = "../autonomi", version = "0.2.4", features = [ "vault", "registers", "loud", -]} +] } clap = { version = "4.2.1", features = ["derive"] } -color-eyre = "~0.6" +color-eyre = "0.6.3" const-hex = "1.13.1" dirs-next = "~2.0.0" hex = "0.4.3" @@ -54,12 +54,12 @@ tokio = { version = "1.32.0", features = [ "sync", "time", "fs", -]} +] } tracing = { version = "~0.1.26" } walkdir = "2.5.0" [dev-dependencies] -autonomi = { path = "../autonomi", version = "0.2.4", features = ["fs"]} +autonomi = { path = "../autonomi", version = "0.2.4", features = ["fs"] } criterion = "0.5.1" eyre = "0.6.8" rand = { version = "~0.8.5", features = ["small_rng"] } diff --git a/ant-logging/Cargo.toml b/ant-logging/Cargo.toml index d923329bca..96845dd9f1 100644 --- a/ant-logging/Cargo.toml +++ b/ant-logging/Cargo.toml @@ -29,7 +29,7 @@ tracing-opentelemetry = { version = "0.21", optional = true } tracing-subscriber = { version = "0.3.16", features = ["json"] } [dev-dependencies] -color-eyre = "~0.6" +color-eyre = "0.6.3" tracing-test = "0.2.4" [features] diff --git a/ant-metrics/Cargo.toml b/ant-metrics/Cargo.toml index 45efbc4eea..2dacbfede7 100644 --- a/ant-metrics/Cargo.toml +++ b/ant-metrics/Cargo.toml @@ -15,7 +15,7 @@ name = "metrics" [dependencies] clap = { version = "4.2.1", features = ["cargo", "string"] } -color-eyre = "~0.6.2" +color-eyre = "0.6.3" dirs-next = "~2.0.0" regex = "1.10" serde = { version = "1.0.133", features = ["derive"] } diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index ad66bd6d5f..971e2b4e1a 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -40,7 +40,7 @@ ant-service-management = { path = "../ant-service-management", version = "0.4.3" chrono = "~0.4.19" clap = { version = "4.4.6", features = ["derive", "env"] } colored = "2.0.4" -color-eyre = "~0.6" +color-eyre = "0.6.3" dirs-next = "2.0.0" indicatif = { version = "0.17.5", features = ["tokio"] } libp2p = { version = "0.54.1", features = [] } @@ -74,5 +74,5 @@ mockall = "0.12.1" reqwest = { version = "0.12", default-features = false, features = [ "json", "rustls-tls", -]} +] } predicates = "3.1.0" diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index 9d8b9cc61d..6a7a1681a5 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -19,16 +19,16 @@ nightly = [] [dependencies] ant-build-info = { path = "../ant-build-info", version = "0.1.19" } ant-logging = { path = "../ant-logging", version = "0.2.40" } -ant-protocol = { path = "../ant-protocol", version = "0.17.15", features=["rpc"] } +ant-protocol = { path = "../ant-protocol", version = "0.17.15", features = ["rpc"] } ant-node = { path = "../ant-node", version = "0.112.6" } ant-service-management = { path = "../ant-service-management", version = "0.4.3" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } clap = { version = "4.2.1", features = ["derive"] } -color-eyre = "0.6.2" +color-eyre = "0.6.3" hex = "~0.4.3" -libp2p = { version = "0.54.1", features = ["kad"]} -libp2p-identity = { version="0.2.7", features = ["rand"] } +libp2p = { version = "0.54.1", features = ["kad"] } +libp2p-identity = { version = "0.2.7", features = ["rand"] } thiserror = "1.0.23" # # watch out updating this, protoc compiler needs to be installed on all build systems # # arm builds + musl are very problematic diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index 09741f2fb9..853828639b 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -40,7 +40,7 @@ bytes = { version = "1.0.1", features = ["serde"] } clap = { version = "4.2.1", features = ["derive"] } crdts = { version = "7.3", default-features = false, features = ["merkle"] } chrono = "~0.4.19" -color-eyre = "0.6.2" +color-eyre = "0.6.3" const-hex = "1.12.0" custom_debug = "~0.6.1" dirs-next = "~2.0.0" diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index 9efabd5435..50bfd29f90 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -19,7 +19,7 @@ ant-evm = { path = "../ant-evm", version = "0.1.4" } ant-registers = { path = "../ant-registers", version = "0.4.3" } bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } -color-eyre = "0.6.2" +color-eyre = "0.6.3" crdts = { version = "7.3", default-features = false, features = ["merkle"] } custom_debug = "~0.6.1" dirs-next = "~2.0.0" diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index d1605468ad..1ff9acd2aa 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -36,8 +36,8 @@ clap = { version = "4.4.5", features = [ "unicode", "string", "unstable-styles", -]} -color-eyre = "0.6.2" +] } +color-eyre = "0.6.3" config = "0.14.0" crossterm = { version = "0.27.0", features = ["serde", "event-stream"] } derive_deref = "1.1.1" @@ -57,7 +57,7 @@ ratatui = { version = "0.29.0", features = ["serde", "macros", "unstable-widget- regex = "1.11.0" reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", -]} +] } serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" signal-hook = "0.3.17" diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 417428de02..9b07a63980 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -11,7 +11,7 @@ version = "0.4.11" [dependencies] bytes = { version = "1.0.1", features = ["serde"] } -color-eyre = "~0.6.2" +color-eyre = "0.6.3" dirs-next = "~2.0.0" evmlib = { path = "../evmlib", version = "0.1.4" } libp2p = { version = "0.54.1", features = ["identify", "kad"] } From fcf498224e452280488e66d5c8ebf32684723c68 Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Mon, 16 Dec 2024 15:39:56 +0100 Subject: [PATCH 4/9] chore: make `self_encryption::encrypt` public --- autonomi/src/lib.rs | 2 +- autonomi/src/self_encryption.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autonomi/src/lib.rs b/autonomi/src/lib.rs index f612146f1d..a8bd4ec56d 100644 --- a/autonomi/src/lib.rs +++ b/autonomi/src/lib.rs @@ -63,7 +63,7 @@ extern crate tracing; pub mod client; -mod self_encryption; +pub mod self_encryption; pub use ant_evm::get_evm_network_from_env; pub use ant_evm::EvmNetwork as Network; diff --git a/autonomi/src/self_encryption.rs b/autonomi/src/self_encryption.rs index 30f7454457..958b355058 100644 --- a/autonomi/src/self_encryption.rs +++ b/autonomi/src/self_encryption.rs @@ -30,7 +30,7 @@ pub(crate) enum DataMapLevel { Additional(DataMap), } -pub(crate) fn encrypt(data: Bytes) -> Result<(Chunk, Vec), Error> { +pub fn encrypt(data: Bytes) -> Result<(Chunk, Vec), Error> { let (data_map, chunks) = self_encryption::encrypt(data)?; let (data_map_chunk, additional_chunks) = pack_data_map(data_map)?; From 6b7156fc6b6ba7563f93fd5a0f25561c5bf73a23 Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Mon, 16 Dec 2024 16:28:46 +0100 Subject: [PATCH 5/9] chore: expose `Chunk` and `ChunkAddress` --- autonomi/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/autonomi/src/lib.rs b/autonomi/src/lib.rs index a8bd4ec56d..9215fce4d9 100644 --- a/autonomi/src/lib.rs +++ b/autonomi/src/lib.rs @@ -69,6 +69,7 @@ pub use ant_evm::get_evm_network_from_env; pub use ant_evm::EvmNetwork as Network; pub use ant_evm::EvmWallet as Wallet; pub use ant_evm::RewardsAddress; +pub use ant_protocol::storage::{Chunk, ChunkAddress}; #[doc(no_inline)] // Place this under 'Re-exports' in the docs. pub use bytes::Bytes; From 1b9440a8c0fef32464450a31b967719692629da9 Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Mon, 16 Dec 2024 18:22:46 +0100 Subject: [PATCH 6/9] chore: expose `QuoteHash` and `Amount` --- autonomi/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autonomi/src/lib.rs b/autonomi/src/lib.rs index 9215fce4d9..a1d223b75a 100644 --- a/autonomi/src/lib.rs +++ b/autonomi/src/lib.rs @@ -66,8 +66,10 @@ pub mod client; pub mod self_encryption; pub use ant_evm::get_evm_network_from_env; +pub use ant_evm::Amount; pub use ant_evm::EvmNetwork as Network; pub use ant_evm::EvmWallet as Wallet; +pub use ant_evm::QuoteHash; pub use ant_evm::RewardsAddress; pub use ant_protocol::storage::{Chunk, ChunkAddress}; From 2c0327b6955411877c52400433113bc07fc8064e Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Tue, 17 Dec 2024 16:04:24 +0100 Subject: [PATCH 7/9] chore: expose `PublicArchive` & `get_store_quotes` --- autonomi/src/client/quote.rs | 2 +- autonomi/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autonomi/src/client/quote.rs b/autonomi/src/client/quote.rs index 9794f165d7..4c076dcad5 100644 --- a/autonomi/src/client/quote.rs +++ b/autonomi/src/client/quote.rs @@ -53,7 +53,7 @@ impl StoreQuote { } impl Client { - pub(crate) async fn get_store_quotes( + pub async fn get_store_quotes( &self, content_addrs: impl Iterator, ) -> Result { diff --git a/autonomi/src/lib.rs b/autonomi/src/lib.rs index a1d223b75a..237a1dccff 100644 --- a/autonomi/src/lib.rs +++ b/autonomi/src/lib.rs @@ -79,7 +79,7 @@ pub use bytes::Bytes; pub use libp2p::Multiaddr; #[doc(inline)] -pub use client::{files::archive::PrivateArchive, Client}; +pub use client::{files::archive::PrivateArchive, files::archive_public::PublicArchive, Client}; #[cfg(feature = "extension-module")] mod python; From 4df8573b7287d2fb4effcf451a311b8ed4ef5c8b Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Tue, 17 Dec 2024 16:20:27 +0100 Subject: [PATCH 8/9] chore: add From implementation for DataMapChunk --- autonomi/src/client/data/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autonomi/src/client/data/mod.rs b/autonomi/src/client/data/mod.rs index e1967f0c95..5834366c2f 100644 --- a/autonomi/src/client/data/mod.rs +++ b/autonomi/src/client/data/mod.rs @@ -151,6 +151,12 @@ impl DataMapChunk { } } +impl From for DataMapChunk { + fn from(value: Chunk) -> Self { + Self(value) + } +} + fn hash_to_short_string(input: &str) -> String { let mut hasher = DefaultHasher::new(); input.hash(&mut hasher); From fd2b4f5e3b569a252e93c2725196221f09b3b205 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Wed, 18 Dec 2024 15:17:18 +0100 Subject: [PATCH 9/9] chore(global): caret strategy is default --- ant-evm/Cargo.toml | 2 +- ant-networking/Cargo.toml | 2 +- ant-protocol/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index c530d8799f..c73a1cd984 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -18,7 +18,7 @@ test-utils = [] custom_debug = "~0.6.1" evmlib = { path = "../evmlib", version = "0.1.4" } hex = "~0.4.3" -lazy_static = "^1.4.0" +lazy_static = "1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = { version = "~0.8.5", features = ["small_rng"] } ring = "0.17.8" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index 8824de96f6..eb8f114473 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -38,7 +38,7 @@ hyper = { version = "0.14", features = [ "http1", ], optional = true } itertools = "~0.12.1" -lazy_static = "^1.4.0" +lazy_static = "1.4.0" libp2p = { version = "0.54.1", features = [ "tokio", "dns", diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index 50bfd29f90..8ace6092bd 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -25,7 +25,7 @@ custom_debug = "~0.6.1" dirs-next = "~2.0.0" exponential-backoff = "2.0.0" hex = "~0.4.3" -lazy_static = "^1.4.0" +lazy_static = "1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } # # watch out updating this, protoc compiler needs to be installed on all build systems # # arm builds + musl are very problematic