Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into local_as_runtime_opt
Browse files Browse the repository at this point in the history
  • Loading branch information
b-zee committed Jan 14, 2025
2 parents 540906c + 225a5ed commit f98319e
Show file tree
Hide file tree
Showing 58 changed files with 274 additions and 749 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ jobs:
mkdir $ANT_DATA_PATH/client
ls -l $ANT_DATA_PATH
./target/release/ant --log-output-dest=data-dir --local file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'Total cost: 0 AttoTokens' ./upload_output_second -c --stats
./target/release/ant --log-output-dest=data-dir --local file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'All chunks already exist on the network.' ./upload_output_second -c --stats
env:
ANT_LOG: "all"
timeout-minutes: 25
Expand Down
83 changes: 62 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ant-bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ license = "GPL-3.0"
name = "ant-bootstrap"
readme = "README.md"
repository = "https://github.com/maidsafe/autonomi"
version = "0.1.2"
version = "0.1.3"

[features]
local = []

[dependencies]
ant-logging = { path = "../ant-logging", version = "0.2.43" }
ant-protocol = { path = "../ant-protocol", version = "0.3.2" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
atomic-write-file = "0.2.2"
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4.2.1", features = ["derive", "env"] }
Expand Down
2 changes: 1 addition & 1 deletion ant-build-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "ant-build-info"
readme = "README.md"
repository = "https://github.com/maidsafe/autonomi"
version = "0.1.22"
version = "0.1.23"
build = "build.rs"
include = ["Cargo.toml", "src/**/*", "build.rs"]

Expand Down
2 changes: 1 addition & 1 deletion ant-build-info/src/release_info.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub const RELEASE_YEAR: &str = "2024";
pub const RELEASE_MONTH: &str = "12";
pub const RELEASE_CYCLE: &str = "1";
pub const RELEASE_CYCLE_COUNTER: &str = "7";
pub const RELEASE_CYCLE_COUNTER: &str = "8";
16 changes: 7 additions & 9 deletions ant-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers <dev@maidsafe.net>"]
name = "ant-cli"
description = "CLI client for the Autonomi network"
license = "GPL-3.0"
version = "0.3.2"
version = "0.3.3"
edition = "2021"
homepage = "https://maidsafe.net"
readme = "README.md"
Expand All @@ -23,13 +23,11 @@ name = "files"
harness = false

[dependencies]
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.2" }
ant-build-info = { path = "../ant-build-info", version = "0.1.22" }
ant-logging = { path = "../ant-logging", version = "0.2.43" }
ant-protocol = { path = "../ant-protocol", version = "0.3.2" }
autonomi = { path = "../autonomi", version = "0.3.2", features = [
"loud",
] }
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.3" }
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
autonomi = { path = "../autonomi", version = "0.3.3", features = [ "loud" ] }
clap = { version = "4.2.1", features = ["derive"] }
color-eyre = "0.6.3"
const-hex = "1.13.1"
Expand All @@ -56,7 +54,7 @@ tracing = { version = "~0.1.26" }
walkdir = "2.5.0"

[dev-dependencies]
autonomi = { path = "../autonomi", version = "0.3.2"}
autonomi = { path = "../autonomi", version = "0.3.3" }
criterion = "0.5.1"
eyre = "0.6.8"
rand = { version = "~0.8.5", features = ["small_rng"] }
Expand Down
8 changes: 6 additions & 2 deletions ant-cli/src/commands/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ pub async fn upload(file: &str, public: bool, peers: NetworkPeers) -> Result<()>

// get summary
let summary = upload_summary_thread.await?;
if summary.record_count == 0 {
if summary.records_paid == 0 {
println!("All chunks already exist on the network.");
} else {
println!("Successfully uploaded: {file}");
println!("At address: {local_addr}");
info!("Successfully uploaded: {file} at address: {local_addr}");
println!("Number of chunks uploaded: {}", summary.record_count);
println!("Number of chunks uploaded: {}", summary.records_paid);
println!(
"Number of chunks already paid/uploaded: {}",
summary.records_already_paid
);
println!("Total cost: {} AttoTokens", summary.tokens_spent);
}
info!("Summary for upload of file {file} at {local_addr:?}: {summary:?}");
Expand Down
2 changes: 1 addition & 1 deletion ant-cli/src/commands/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub async fn create(name: &str, value: &str, public: bool, peers: NetworkPeers)
}

let summary = upload_summary_thread.await?;
if summary.record_count == 0 {
if summary.records_paid == 0 {
println!("✅ The register already exists on the network at address: {address}.");
println!("No tokens were spent.");
} else {
Expand Down
Loading

0 comments on commit f98319e

Please sign in to comment.