Skip to content

Commit

Permalink
Merge pull request #2549 from b-zee/project-dave-compatibility
Browse files Browse the repository at this point in the history
Autonomi changes for usability; deps update
  • Loading branch information
b-zee authored Dec 18, 2024
2 parents 9828d92 + 38875ac commit 3107bd1
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 25 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 4 additions & 4 deletions ant-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ autonomi = { path = "../autonomi", version = "0.3.0", 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"
Expand All @@ -55,12 +55,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.3.0", features = ["fs"]}
autonomi = { path = "../autonomi", version = "0.3.0", features = ["fs"] }
criterion = "0.5.1"
eyre = "0.6.8"
rand = { version = "~0.8.5", features = ["small_rng"] }
Expand Down
2 changes: 1 addition & 1 deletion ant-evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test-utils = []
custom_debug = "~0.6.1"
evmlib = { path = "../evmlib", version = "0.1.5" }
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"
Expand Down
2 changes: 1 addition & 1 deletion ant-logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion ant-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion ant-networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions ant-node-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ant-service-management = { path = "../ant-service-management", version = "0.4.4"
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 = [] }
Expand Down Expand Up @@ -74,5 +74,5 @@ mockall = "0.12.1"
reqwest = { version = "0.12", default-features = false, features = [
"json",
"rustls-tls",
]}
] }
predicates = "3.1.0"
8 changes: 4 additions & 4 deletions ant-node-rpc-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ nightly = []
[dependencies]
ant-build-info = { path = "../ant-build-info", version = "0.1.20" }
ant-logging = { path = "../ant-logging", version = "0.2.41" }
ant-protocol = { path = "../ant-protocol", version = "0.3.0", features=["rpc"] }
ant-protocol = { path = "../ant-protocol", version = "0.3.0", features = ["rpc"] }
ant-node = { path = "../ant-node", version = "0.3.0" }
ant-service-management = { path = "../ant-service-management", version = "0.4.4" }
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
Expand Down
2 changes: 1 addition & 1 deletion ant-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ant-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ant-evm = { path = "../ant-evm", version = "0.1.5" }
ant-registers = { path = "../ant-registers", version = "0.4.4" }
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"
Expand Down
6 changes: 6 additions & 0 deletions autonomi/src/client/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ impl DataMapChunk {
}
}

impl From<Chunk> 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);
Expand Down
2 changes: 1 addition & 1 deletion autonomi/src/client/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Item = XorName>,
) -> Result<StoreQuote, CostError> {
Expand Down
10 changes: 8 additions & 2 deletions autonomi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,26 @@
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::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};

#[doc(no_inline)] // Place this under 'Re-exports' in the docs.
pub use bytes::Bytes;
#[doc(no_inline)] // Place this under 'Re-exports' in the docs.
pub use libp2p::Multiaddr;

#[doc(inline)]
pub use client::{files::archive::Metadata, files::archive::PrivateArchive, Client, ClientConfig};
pub use client::{
files::archive::Metadata, files::archive::PrivateArchive, files::archive_public::PublicArchive,
Client, ClientConfig,
};

#[cfg(feature = "extension-module")]
mod python;
2 changes: 1 addition & 1 deletion autonomi/src/self_encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub(crate) enum DataMapLevel {
Additional(DataMap),
}

pub(crate) fn encrypt(data: Bytes) -> Result<(Chunk, Vec<Chunk>), Error> {
pub fn encrypt(data: Bytes) -> Result<(Chunk, Vec<Chunk>), Error> {
let (data_map, chunks) = self_encryption::encrypt(data)?;
let (data_map_chunk, additional_chunks) = pack_data_map(data_map)?;

Expand Down
2 changes: 1 addition & 1 deletion evmlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
6 changes: 3 additions & 3 deletions node-launchpad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = "0.4.12"

[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.5" }
libp2p = { version = "0.54.1", features = ["identify", "kad"] }
Expand Down

0 comments on commit 3107bd1

Please sign in to comment.