From 1742772a8c08e7c4c30aba21f1018e6f3d300604 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Fri, 6 Dec 2024 16:59:14 +0100 Subject: [PATCH 01/43] feat(autonomi): parallel chunk copy for encrypt Testing on my local machine saved about 18s from 70s of total encrypt time with a 10GiB file in-memory. --- Cargo.lock | 1 + autonomi/Cargo.toml | 1 + autonomi/src/self_encryption.rs | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aff7d76738..0b7f1d6897 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1521,6 +1521,7 @@ dependencies = [ "libp2p", "pyo3", "rand 0.8.5", + "rayon", "rmp-serde", "self_encryption", "serde", diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index 0e15996c27..68697a160c 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -46,6 +46,7 @@ hex = "~0.4.3" libp2p = { git = "https://github.com/maqi/rust-libp2p.git", branch = "kad_0.46.2" } pyo3 = { version = "0.20", optional = true, features = ["extension-module", "abi3-py38"] } rand = "0.8.5" +rayon = "1.8.0" rmp-serde = "1.1.1" self_encryption = "~0.30.0" serde = { version = "1.0.133", features = ["derive", "rc"] } diff --git a/autonomi/src/self_encryption.rs b/autonomi/src/self_encryption.rs index 30f7454457..25bc456d45 100644 --- a/autonomi/src/self_encryption.rs +++ b/autonomi/src/self_encryption.rs @@ -8,6 +8,7 @@ use ant_protocol::storage::Chunk; use bytes::{BufMut, Bytes, BytesMut}; +use rayon::prelude::*; use self_encryption::{DataMap, MAX_CHUNK_SIZE}; use serde::{Deserialize, Serialize}; use tracing::debug; @@ -36,8 +37,8 @@ pub(crate) fn encrypt(data: Bytes) -> Result<(Chunk, Vec), Error> { // Transform `EncryptedChunk` into `Chunk` let chunks: Vec = chunks - .into_iter() - .map(|c| Chunk::new(c.content)) + .into_par_iter() + .map(|c| Chunk::new(c.content.clone())) .chain(additional_chunks) .collect(); From e9eba6b7cd7d39faedf12660858d8af88f43dd5c Mon Sep 17 00:00:00 2001 From: Ermine Jose Date: Fri, 13 Dec 2024 00:13:42 +0530 Subject: [PATCH 02/43] feat: create wallet file from env sk --- ant-cli/src/wallet/fs.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ant-cli/src/wallet/fs.rs b/ant-cli/src/wallet/fs.rs index 136ddf5c4f..41415e7201 100644 --- a/ant-cli/src/wallet/fs.rs +++ b/ant-cli/src/wallet/fs.rs @@ -15,7 +15,7 @@ use autonomi::{get_evm_network_from_env, RewardsAddress, Wallet}; use const_hex::traits::FromHex; use prettytable::{Cell, Row, Table}; use std::ffi::OsString; -use std::io::Read; +use std::io::{Read, Write}; use std::path::PathBuf; use std::sync::OnceLock; @@ -137,7 +137,15 @@ pub(crate) fn select_wallet_address() -> Result { 0 => { let secret_key = get_secret_key_from_env().map_err(|_| Error::NoWalletsFoundAndNoSecretKeysInEnv)?; - Ok(secret_key) + let network = get_evm_network_from_env().expect("Could not load EVM network from environment"); + let wallet = Wallet::new_from_private_key(network, &secret_key).expect("Could not initialize wallet"); + let public_key = wallet.address().to_string(); + let wallet_directory = get_client_wallet_dir_path()?; + let file_path = std::path::Path::new(&wallet_directory).join(&public_key); + let mut file = std::fs::File::create(&file_path).expect("Could not create file on disk"); + file.write_all(secret_key.as_bytes()).expect("Could not write secret key to file"); + + Ok(public_key) } 1 => Ok(filter_wallet_file_extension(&wallet_files[0])), _ => get_wallet_selection(wallet_files), From f3731d3ecf8fb23a2e0ac8c5fffbd4954bab24ac Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Thu, 12 Dec 2024 20:47:40 +0000 Subject: [PATCH 03/43] chore(release): release candidate 2024.12.1.1 ====================== New Crate Versions ====================== ant-bootstrap: 0.1.0-rc.1 ant-build-info: 0.1.20-rc.1 ant-cli: 0.3.0-rc.1 ant-evm: 0.1.5-rc.1 ant-logging: 0.2.41-rc.1 ant-metrics: 0.1.21-rc.1 ant-networking: 0.3.0-rc.1 ant-node: 0.3.0-rc.1 ant-node-manager: 0.11.4-rc.1 ant-node-rpc-client: 0.6.37-rc.1 ant-protocol: 0.3.0-rc.1 ant-registers: 0.4.4-rc.1 ant-service-management: 0.4.4-rc.1 ant-token-supplies: 0.1.59-rc.1 autonomi: 0.3.0-rc.1 evmlib: 0.1.5-rc.1 evm-testnet: 0.1.5-rc.1 nat-detection: 0.2.12-rc.1 node-launchpad: 0.5.0-rc.1 test-utils: 0.4.12-rc.1 --- Cargo.lock | 40 +++++++++++++++--------------- ant-bootstrap/Cargo.toml | 8 +++--- ant-build-info/Cargo.toml | 2 +- ant-build-info/src/release_info.rs | 4 +-- ant-cli/Cargo.toml | 14 +++++------ ant-evm/Cargo.toml | 4 +-- ant-logging/Cargo.toml | 2 +- ant-metrics/Cargo.toml | 2 +- ant-networking/Cargo.toml | 12 ++++----- ant-node-manager/Cargo.toml | 14 +++++------ ant-node-rpc-client/Cargo.toml | 12 ++++----- ant-node/Cargo.toml | 24 +++++++++--------- ant-protocol/Cargo.toml | 8 +++--- ant-registers/Cargo.toml | 2 +- ant-service-management/Cargo.toml | 10 ++++---- ant-token-supplies/Cargo.toml | 2 +- autonomi/Cargo.toml | 16 ++++++------ evm-testnet/Cargo.toml | 6 ++--- evmlib/Cargo.toml | 2 +- nat-detection/Cargo.toml | 8 +++--- node-launchpad/Cargo.toml | 14 +++++------ release-cycle-info | 4 +-- test-utils/Cargo.toml | 4 +-- 23 files changed, 107 insertions(+), 107 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b1c00c3cc..b7a19ed51e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,7 +773,7 @@ dependencies = [ [[package]] name = "ant-bootstrap" -version = "0.1.0" +version = "0.1.0-rc.1" dependencies = [ "ant-logging", "ant-protocol", @@ -798,7 +798,7 @@ dependencies = [ [[package]] name = "ant-build-info" -version = "0.1.19" +version = "0.1.20-rc.1" dependencies = [ "chrono", "tracing", @@ -807,7 +807,7 @@ dependencies = [ [[package]] name = "ant-cli" -version = "0.1.5" +version = "0.3.0-rc.1" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "ant-evm" -version = "0.1.4" +version = "0.1.5-rc.1" dependencies = [ "custom_debug", "evmlib", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "ant-logging" -version = "0.2.40" +version = "0.2.41-rc.1" dependencies = [ "chrono", "color-eyre", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "ant-metrics" -version = "0.1.20" +version = "0.1.21-rc.1" dependencies = [ "clap", "color-eyre", @@ -900,7 +900,7 @@ dependencies = [ [[package]] name = "ant-networking" -version = "0.19.5" +version = "0.3.0-rc.1" dependencies = [ "aes-gcm-siv", "ant-bootstrap", @@ -948,7 +948,7 @@ dependencies = [ [[package]] name = "ant-node" -version = "0.112.6" +version = "0.3.0-rc.1" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "ant-node-manager" -version = "0.11.3" +version = "0.11.4-rc.1" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "ant-node-rpc-client" -version = "0.6.36" +version = "0.6.37-rc.1" dependencies = [ "ant-build-info", "ant-logging", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "ant-protocol" -version = "0.17.15" +version = "0.3.0-rc.1" dependencies = [ "ant-build-info", "ant-evm", @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "ant-registers" -version = "0.4.3" +version = "0.4.4-rc.1" dependencies = [ "blsttc", "crdts", @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "ant-service-management" -version = "0.4.3" +version = "0.4.4-rc.1" dependencies = [ "ant-bootstrap", "ant-evm", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "ant-token-supplies" -version = "0.1.58" +version = "0.1.59-rc.1" dependencies = [ "dirs-next", "reqwest 0.11.27", @@ -1591,7 +1591,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autonomi" -version = "0.2.4" +version = "0.3.0-rc.1" dependencies = [ "alloy", "ant-bootstrap", @@ -3356,7 +3356,7 @@ dependencies = [ [[package]] name = "evm-testnet" -version = "0.1.4" +version = "0.1.5-rc.1" dependencies = [ "ant-evm", "clap", @@ -3367,7 +3367,7 @@ dependencies = [ [[package]] name = "evmlib" -version = "0.1.4" +version = "0.1.5-rc.1" dependencies = [ "alloy", "dirs-next", @@ -6284,7 +6284,7 @@ dependencies = [ [[package]] name = "nat-detection" -version = "0.2.11" +version = "0.2.12-rc.1" dependencies = [ "ant-build-info", "ant-networking", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "node-launchpad" -version = "0.4.5" +version = "0.5.0-rc.1" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -9321,7 +9321,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-utils" -version = "0.4.11" +version = "0.4.12-rc.1" dependencies = [ "bytes", "color-eyre", diff --git a/ant-bootstrap/Cargo.toml b/ant-bootstrap/Cargo.toml index 1e292cd64d..3f4f7b1794 100644 --- a/ant-bootstrap/Cargo.toml +++ b/ant-bootstrap/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0" name = "ant-bootstrap" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.0" +version = "0.1.0-rc.1" [features] local = [] [dependencies] -ant-logging = { path = "../ant-logging", version = "0.2.40" } -ant-protocol = { version = "0.17.15", path = "../ant-protocol" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } atomic-write-file = "0.2.2" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.2.1", features = ["derive", "env"] } @@ -38,4 +38,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] } tempfile = "3.8.1" [target.'cfg(target_arch = "wasm32")'.dependencies] -wasmtimer = "0.2.0" \ No newline at end of file +wasmtimer = "0.2.0" diff --git a/ant-build-info/Cargo.toml b/ant-build-info/Cargo.toml index 045ae93c4f..38e9f48d6d 100644 --- a/ant-build-info/Cargo.toml +++ b/ant-build-info/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-build-info" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.19" +version = "0.1.20-rc.1" build = "build.rs" include = ["Cargo.toml", "src/**/*", "build.rs"] diff --git a/ant-build-info/src/release_info.rs b/ant-build-info/src/release_info.rs index c79a7039a7..fff5245a43 100644 --- a/ant-build-info/src/release_info.rs +++ b/ant-build-info/src/release_info.rs @@ -1,4 +1,4 @@ pub const RELEASE_YEAR: &str = "2024"; -pub const RELEASE_MONTH: &str = "11"; +pub const RELEASE_MONTH: &str = "12"; pub const RELEASE_CYCLE: &str = "1"; -pub const RELEASE_CYCLE_COUNTER: &str = "6"; +pub const RELEASE_CYCLE_COUNTER: &str = "1"; diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index c6eecb42f6..72b48af14e 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] name = "ant-cli" description = "CLI client for the Autonomi network" license = "GPL-3.0" -version = "0.1.5" +version = "0.3.0-rc.1" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -23,11 +23,11 @@ name = "files" harness = false [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } -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" } -autonomi = { path = "../autonomi", version = "0.2.4", features = [ +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.1", features = [ "fs", "vault", "registers", @@ -59,7 +59,7 @@ 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.3.0-rc.1", features = ["fs"]} criterion = "0.5.1" eyre = "0.6.8" rand = { version = "~0.8.5", features = ["small_rng"] } diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index 6e184a6ee1..3d0b8c7636 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-evm" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.4" +version = "0.1.5-rc.1" [features] local = ["evmlib/local"] @@ -16,7 +16,7 @@ test-utils = [] [dependencies] custom_debug = "~0.6.1" -evmlib = { path = "../evmlib", version = "0.1.4" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } hex = "~0.4.3" lazy_static = "~1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } diff --git a/ant-logging/Cargo.toml b/ant-logging/Cargo.toml index d923329bca..3bd5260da8 100644 --- a/ant-logging/Cargo.toml +++ b/ant-logging/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-logging" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.40" +version = "0.2.41-rc.1" [dependencies] chrono = "~0.4.19" diff --git a/ant-metrics/Cargo.toml b/ant-metrics/Cargo.toml index 45efbc4eea..30f95709b2 100644 --- a/ant-metrics/Cargo.toml +++ b/ant-metrics/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-metrics" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.20" +version = "0.1.21-rc.1" [[bin]] path = "src/main.rs" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index 8849a3752b..9144b5f0ed 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-networking" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.19.5" +version = "0.3.0-rc.1" [features] default = [] @@ -20,11 +20,11 @@ upnp = ["libp2p/upnp"] [dependencies] aes-gcm-siv = "0.11.1" -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } -ant-build-info = { path = "../ant-build-info", version = "0.1.19" } -ant-evm = { path = "../ant-evm", version = "0.1.4" } -ant-protocol = { path = "../ant-protocol", version = "0.17.15" } -ant-registers = { path = "../ant-registers", version = "0.4.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } async-trait = "0.1" bytes = { version = "1.0.1", features = ["serde"] } custom_debug = "~0.6.1" diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index ad66bd6d5f..e25d71801c 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-manager" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.11.3" +version = "0.11.4-rc.1" [[bin]] name = "antctl" @@ -30,13 +30,13 @@ tcp = [] websockets = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } -ant-build-info = { path = "../ant-build-info", version = "0.1.19" } -ant-evm = { path = "../ant-evm", version = "0.1.4" } -ant-logging = { path = "../ant-logging", version = "0.2.40" } -ant-protocol = { path = "../ant-protocol", version = "0.17.15" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } ant-releases = { version = "0.4.0" } -ant-service-management = { path = "../ant-service-management", version = "0.4.3" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.1" } chrono = "~0.4.19" clap = { version = "4.4.6", features = ["derive", "env"] } colored = "2.0.4" diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index 9d8b9cc61d..89d54db065 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-rpc-client" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.6.36" +version = "0.6.37-rc.1" [[bin]] name = "antnode_rpc_client" @@ -17,11 +17,11 @@ path = "src/main.rs" 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-node = { path = "../ant-node", version = "0.112.6" } -ant-service-management = { path = "../ant-service-management", version = "0.4.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1", features=["rpc"] } +ant-node = { path = "../ant-node", version = "0.3.0-rc.1" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.1" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } clap = { version = "4.2.1", features = ["derive"] } diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index 09741f2fb9..a46c7c4a0b 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "The Autonomi node binary" name = "ant-node" -version = "0.112.6" +version = "0.3.0-rc.1" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -26,14 +26,14 @@ otlp = ["ant-logging/otlp"] upnp = ["ant-networking/upnp"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } -ant-build-info = { path = "../ant-build-info", version = "0.1.19" } -ant-evm = { path = "../ant-evm", version = "0.1.4" } -ant-logging = { path = "../ant-logging", version = "0.2.40" } -ant-networking = { path = "../ant-networking", version = "0.19.5" } -ant-protocol = { path = "../ant-protocol", version = "0.17.15" } -ant-registers = { path = "../ant-registers", version = "0.4.3" } -ant-service-management = { path = "../ant-service-management", version = "0.4.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.1" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } @@ -83,10 +83,10 @@ walkdir = "~2.5.0" xor_name = "5.0.0" [dev-dependencies] -ant-protocol = { path = "../ant-protocol", version = "0.17.15", features = ["rpc"] } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1", features = ["rpc"] } assert_fs = "1.0.0" -evmlib = { path = "../evmlib", version = "0.1.4" } -autonomi = { path = "../autonomi", version = "0.2.4", features = ["registers"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.1", features = ["registers"] } reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", ] } diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index c8c4b6808d..2d9fabb84d 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0" name = "ant-protocol" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.17.15" +version = "0.3.0-rc.1" [features] default = [] rpc = ["tonic", "prost"] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.19" } -ant-evm = { path = "../ant-evm", version = "0.1.4" } -ant-registers = { path = "../ant-registers", version = "0.4.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "0.6.2" diff --git a/ant-registers/Cargo.toml b/ant-registers/Cargo.toml index f7607a8398..5f992bccfe 100644 --- a/ant-registers/Cargo.toml +++ b/ant-registers/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-registers" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.3" +version = "0.4.4-rc.1" [features] test-utils = [] diff --git a/ant-service-management/Cargo.toml b/ant-service-management/Cargo.toml index 45c8a8d6b5..dbdcdb2b84 100644 --- a/ant-service-management/Cargo.toml +++ b/ant-service-management/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "ant-service-management" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.3" +version = "0.4.4-rc.1" [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } -ant-evm = { path = "../ant-evm", version = "0.1.4" } -ant-logging = { path = "../ant-logging", version = "0.2.40" } -ant-protocol = { path = "../ant-protocol", version = "0.17.15", features = ["rpc"] } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1", features = ["rpc"] } async-trait = "0.1" dirs-next = "2.0.0" libp2p = { version = "0.54.1", features = ["kad"] } diff --git a/ant-token-supplies/Cargo.toml b/ant-token-supplies/Cargo.toml index abacf83744..dfda3e1bb1 100644 --- a/ant-token-supplies/Cargo.toml +++ b/ant-token-supplies/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-token-supplies" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.58" +version = "0.1.59-rc.1" [dependencies] diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index d5089d14bc..6e3e03b4d8 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] description = "Autonomi client API" name = "autonomi" license = "GPL-3.0" -version = "0.2.4" +version = "0.3.0-rc.1" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -25,11 +25,11 @@ registers = [] vault = ["registers"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } -ant-evm = { path = "../ant-evm", version = "0.1.4" } -ant-networking = { path = "../ant-networking", version = "0.19.5" } -ant-protocol = { version = "0.17.15", path = "../ant-protocol" } -ant-registers = { path = "../ant-registers", version = "0.4.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } bip39 = "2.0.0" blst = "0.3.13" blstrs = "0.7.1" @@ -60,7 +60,7 @@ xor_name = "5.0.0" [dev-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"] } -ant-logging = { path = "../ant-logging", version = "0.2.40" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } eyre = "0.6.5" sha2 = "0.10.6" # Do not specify the version field. Release process expects even the local dev deps to be published. @@ -72,7 +72,7 @@ wasm-bindgen-test = "0.3.43" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" -evmlib = { path = "../evmlib", version = "0.1.4", features = ["wasm-bindgen"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.1", features = ["wasm-bindgen"] } # See https://github.com/sebcrozet/instant/blob/7bd13f51f5c930239fddc0476a837870fb239ed7/README.md#using-instant-for-a-wasm-platform-where-performancenow-is-not-available instant = { version = "0.1", features = ["wasm-bindgen", "inaccurate"] } js-sys = "0.3.70" diff --git a/evm-testnet/Cargo.toml b/evm-testnet/Cargo.toml index 42aaf737b6..1c675af511 100644 --- a/evm-testnet/Cargo.toml +++ b/evm-testnet/Cargo.toml @@ -6,13 +6,13 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evm-testnet" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.4" +version = "0.1.5-rc.1" [dependencies] -ant-evm = { path = "../ant-evm", version = "0.1.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } clap = { version = "4.5", features = ["derive"] } dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.4" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } tokio = { version = "1.40", features = ["rt-multi-thread", "signal"] } [lints] diff --git a/evmlib/Cargo.toml b/evmlib/Cargo.toml index 5e4a5b805e..1807921a86 100644 --- a/evmlib/Cargo.toml +++ b/evmlib/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evmlib" repository = "https://github.com/maidsafe/safe_network" -version = "0.1.4" +version = "0.1.5-rc.1" [features] wasm-bindgen = ["alloy/wasm-bindgen"] diff --git a/nat-detection/Cargo.toml b/nat-detection/Cargo.toml index 78290ad748..bae7517e30 100644 --- a/nat-detection/Cargo.toml +++ b/nat-detection/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "nat-detection" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.11" +version = "0.2.12-rc.1" [[bin]] name = "nat-detection" @@ -17,9 +17,9 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.19" } -ant-networking = { path = "../ant-networking", version = "0.19.5" } -ant-protocol = { path = "../ant-protocol", version = "0.17.15" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.1" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } clap = { version = "4.5.4", features = ["derive"] } clap-verbosity-flag = "2.2.0" color-eyre = { version = "0.6", default-features = false } diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index d1605468ad..35d841a7ff 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "TUI for running nodes on the Autonomi network" name = "node-launchpad" -version = "0.4.5" +version = "0.5.0-rc.1" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -18,13 +18,13 @@ path = "src/bin/tui/main.rs" nightly = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } -ant-build-info = { path = "../ant-build-info", version = "0.1.19" } -ant-evm = { path = "../ant-evm", version = "0.1.4" } -ant-node-manager = { version = "0.11.3", path = "../ant-node-manager" } -ant-protocol = { path = "../ant-protocol", version = "0.17.15" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-node-manager = { version = "0.11.4-rc.1", path = "../ant-node-manager" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } ant-releases = { version = "0.4.0" } -ant-service-management = { version = "0.4.3", path = "../ant-service-management" } +ant-service-management = { version = "0.4.4-rc.1", path = "../ant-service-management" } arboard = "3.4.1" atty = "0.2.14" better-panic = "0.3.0" diff --git a/release-cycle-info b/release-cycle-info index 0109aac6b2..6bbd008a74 100644 --- a/release-cycle-info +++ b/release-cycle-info @@ -13,6 +13,6 @@ # Both of these numbers are used in the packaged version number, which is a collective version # number for all the released binaries. release-year: 2024 -release-month: 11 +release-month: 12 release-cycle: 1 -release-cycle-counter: 6 +release-cycle-counter: 1 diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 417428de02..bd552ef5eb 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "test-utils" readme = "README.md" repository = "https://github.com/maidsafe/safe_network" -version = "0.4.11" +version = "0.4.12-rc.1" [dependencies] bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "~0.6.2" dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.4" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = "0.8.5" serde = { version = "1.0.133", features = ["derive"] } From f260bcce15c1ea33a152aba0560f3fbc309f3879 Mon Sep 17 00:00:00 2001 From: grumbach Date: Fri, 13 Dec 2024 14:50:26 +0900 Subject: [PATCH 04/43] feat: further expand close group get to close group x 1.5 --- ant-networking/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ant-networking/src/lib.rs b/ant-networking/src/lib.rs index c43cdcdf8e..434aa192ad 100644 --- a/ant-networking/src/lib.rs +++ b/ant-networking/src/lib.rs @@ -1111,7 +1111,8 @@ impl Network { ); } - let closest_peers = sort_peers_by_address(&closest_peers, key, CLOSE_GROUP_SIZE + 1)?; + let expanded_close_group = CLOSE_GROUP_SIZE + CLOSE_GROUP_SIZE / 2; + let closest_peers = sort_peers_by_address(&closest_peers, key, expanded_close_group)?; Ok(closest_peers.into_iter().cloned().collect()) } From 0843bba2a608f8f38a2d42b76dc8616f5775b4fa Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Fri, 13 Dec 2024 10:52:26 +0100 Subject: [PATCH 05/43] refactor: auto select wallet from env if exists --- ant-cli/src/wallet/error.rs | 4 ++-- ant-cli/src/wallet/fs.rs | 23 ++++++++--------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/ant-cli/src/wallet/error.rs b/ant-cli/src/wallet/error.rs index 1dd8fa6c91..26ca97bcbe 100644 --- a/ant-cli/src/wallet/error.rs +++ b/ant-cli/src/wallet/error.rs @@ -24,8 +24,8 @@ pub enum Error { FailedToCreateWalletsFolder, #[error("Could not find private key file")] PrivateKeyFileNotFound, - #[error("No wallets found and No secret Keys found in ENV, create one using `wallet create`")] - NoWalletsFoundAndNoSecretKeysInEnv, + #[error("No wallets found. Create one using `wallet create` or supply a private key using the `SECRET_KEY` environment variable")] + NoWalletsFound, #[error("Invalid wallet selection input")] InvalidSelection, } diff --git a/ant-cli/src/wallet/fs.rs b/ant-cli/src/wallet/fs.rs index 41415e7201..38c13e1537 100644 --- a/ant-cli/src/wallet/fs.rs +++ b/ant-cli/src/wallet/fs.rs @@ -6,7 +6,7 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. -use crate::keys::get_secret_key_from_env; +use crate::keys::load_evm_wallet_from_env; use crate::wallet::encryption::{decrypt_private_key, encrypt_private_key}; use crate::wallet::error::Error; use crate::wallet::input::{get_password_input, get_wallet_selection_input}; @@ -15,7 +15,7 @@ use autonomi::{get_evm_network_from_env, RewardsAddress, Wallet}; use const_hex::traits::FromHex; use prettytable::{Cell, Row, Table}; use std::ffi::OsString; -use std::io::{Read, Write}; +use std::io::Read; use std::path::PathBuf; use std::sync::OnceLock; @@ -115,6 +115,11 @@ pub(crate) fn load_wallet_from_address(wallet_address: &str) -> Result Result { + // try if there is a wallet set in the ENV first + if let Ok(env_wallet) = load_evm_wallet_from_env() { + return Ok(env_wallet); + } + let wallet_address = select_wallet_address()?; load_wallet_from_address(&wallet_address) } @@ -134,19 +139,7 @@ pub(crate) fn select_wallet_address() -> Result { let wallet_files = get_wallet_files(&wallets_folder)?; let wallet_address = match wallet_files.len() { - 0 => { - let secret_key = - get_secret_key_from_env().map_err(|_| Error::NoWalletsFoundAndNoSecretKeysInEnv)?; - let network = get_evm_network_from_env().expect("Could not load EVM network from environment"); - let wallet = Wallet::new_from_private_key(network, &secret_key).expect("Could not initialize wallet"); - let public_key = wallet.address().to_string(); - let wallet_directory = get_client_wallet_dir_path()?; - let file_path = std::path::Path::new(&wallet_directory).join(&public_key); - let mut file = std::fs::File::create(&file_path).expect("Could not create file on disk"); - file.write_all(secret_key.as_bytes()).expect("Could not write secret key to file"); - - Ok(public_key) - } + 0 => Err(Error::NoWalletsFound), 1 => Ok(filter_wallet_file_extension(&wallet_files[0])), _ => get_wallet_selection(wallet_files), }?; From a2dd3d386fe4f40701e3dbd3685fe2ba2ba4551c Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Fri, 13 Dec 2024 12:38:40 +0100 Subject: [PATCH 06/43] feat: add CLI `wallet import ` command --- ant-cli/src/commands.rs | 21 +++++++++-- ant-cli/src/commands/wallet.rs | 68 +++++++++++++++++++++------------- 2 files changed, 60 insertions(+), 29 deletions(-) diff --git a/ant-cli/src/commands.rs b/ant-cli/src/commands.rs index a1d1fd487a..694942493d 100644 --- a/ant-cli/src/commands.rs +++ b/ant-cli/src/commands.rs @@ -158,9 +158,18 @@ pub enum WalletCmd { /// Optional flag to not add a password. #[clap(long, action)] no_password: bool, - /// Optional hex-encoded private key. - #[clap(long)] - private_key: Option, + /// Optional password to encrypt the wallet with. + #[clap(long, short)] + password: Option, + }, + + /// Import an existing wallet. + Import { + /// Hex-encoded private key. + private_key: String, + /// Optional flag to not add a password. + #[clap(long, action)] + no_password: bool, /// Optional password to encrypt the wallet with. #[clap(long, short)] password: Option, @@ -208,9 +217,13 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> { SubCmd::Wallet { command } => match command { WalletCmd::Create { no_password, + password, + } => wallet::create(no_password, password), + WalletCmd::Import { private_key, + no_password, password, - } => wallet::create(no_password, private_key, password), + } => wallet::import(private_key, no_password, password), WalletCmd::Balance => Ok(wallet::balance().await?), }, } diff --git a/ant-cli/src/commands/wallet.rs b/ant-cli/src/commands/wallet.rs index 3b31a873b2..de4c3c7eee 100644 --- a/ant-cli/src/commands/wallet.rs +++ b/ant-cli/src/commands/wallet.rs @@ -16,34 +16,35 @@ use prettytable::{Cell, Row, Table}; const WALLET_PASSWORD_REQUIRED: bool = false; -pub fn create( +pub fn create(no_password: bool, password: Option) -> Result<()> { + let maybe_encryption_password = maybe_request_password(no_password, password)?; + + let wallet_private_key = Wallet::random_private_key(); + + let wallet_address = Wallet::new_from_private_key(DUMMY_NETWORK, &wallet_private_key) + .expect("Infallible") + .address() + .to_string(); + + // Save the private key file + let file_path = store_private_key(&wallet_private_key, maybe_encryption_password)?; + + println!("Wallet address: {wallet_address}"); + println!("Stored wallet in: {file_path:?}"); + + Ok(()) +} + +pub fn import( + wallet_private_key: String, no_password: bool, - private_key: Option, password: Option, ) -> Result<()> { - if no_password && password.is_some() { - return Err(eyre!( - "Only one of `--no-password` or `--password` may be specified" - )); - } - - // Set a password for encryption or not - let encryption_password: Option = match (no_password, password) { - (true, _) => None, - (false, Some(pass)) => Some(pass.to_owned()), - (false, None) => request_password(WALLET_PASSWORD_REQUIRED), - }; + // Validate imported key + Wallet::new_from_private_key(DUMMY_NETWORK, &wallet_private_key) + .map_err(|_| eyre!("Please provide a valid private key in hex format"))?; - let wallet_private_key = if let Some(private_key) = private_key { - // Validate imported key - Wallet::new_from_private_key(DUMMY_NETWORK, &private_key) - .map_err(|_| eyre!("Please provide a valid secret key in hex format"))?; - - private_key - } else { - // Create a new key - Wallet::random_private_key() - }; + let maybe_encryption_password = maybe_request_password(no_password, password)?; let wallet_address = Wallet::new_from_private_key(DUMMY_NETWORK, &wallet_private_key) .expect("Infallible") @@ -51,7 +52,7 @@ pub fn create( .to_string(); // Save the private key file - let file_path = store_private_key(&wallet_private_key, encryption_password)?; + let file_path = store_private_key(&wallet_private_key, maybe_encryption_password)?; println!("Wallet address: {wallet_address}"); println!("Stored wallet in: {file_path:?}"); @@ -83,3 +84,20 @@ pub async fn balance() -> Result<()> { Ok(()) } + +fn maybe_request_password(no_password: bool, password: Option) -> Result> { + if no_password && password.is_some() { + return Err(eyre!( + "Only one of `--no-password` or `--password` may be specified" + )); + } + + // Set a password for encryption or not + let maybe_password = match (no_password, password) { + (true, _) => None, + (false, Some(pass)) => Some(pass.to_owned()), + (false, None) => request_password(WALLET_PASSWORD_REQUIRED), + }; + + Ok(maybe_password) +} From c025b97205ee49eff7c207f24024affdde1bbe0c Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Fri, 13 Dec 2024 13:09:00 +0100 Subject: [PATCH 07/43] feat: print wallet private key on CLI `wallet create` command --- ant-cli/src/commands/wallet.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ant-cli/src/commands/wallet.rs b/ant-cli/src/commands/wallet.rs index de4c3c7eee..46819bc19d 100644 --- a/ant-cli/src/commands/wallet.rs +++ b/ant-cli/src/commands/wallet.rs @@ -30,6 +30,7 @@ pub fn create(no_password: bool, password: Option) -> Result<()> { let file_path = store_private_key(&wallet_private_key, maybe_encryption_password)?; println!("Wallet address: {wallet_address}"); + println!("Wallet private key: {wallet_private_key}"); println!("Stored wallet in: {file_path:?}"); Ok(()) From 7a08e279bd066a1eb5b48de68f7b55324bc0c070 Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Fri, 13 Dec 2024 13:25:38 +0100 Subject: [PATCH 08/43] feat: add CLI `wallet export` command --- ant-cli/src/commands.rs | 6 +++++- ant-cli/src/commands/wallet.rs | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ant-cli/src/commands.rs b/ant-cli/src/commands.rs index 694942493d..6c6316d3cd 100644 --- a/ant-cli/src/commands.rs +++ b/ant-cli/src/commands.rs @@ -175,6 +175,9 @@ pub enum WalletCmd { password: Option, }, + /// Print the private key of a wallet. + Export, + /// Check the balance of the wallet. Balance, } @@ -224,7 +227,8 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> { no_password, password, } => wallet::import(private_key, no_password, password), - WalletCmd::Balance => Ok(wallet::balance().await?), + WalletCmd::Export => wallet::export(), + WalletCmd::Balance => wallet::balance().await, }, } } diff --git a/ant-cli/src/commands/wallet.rs b/ant-cli/src/commands/wallet.rs index 46819bc19d..de97c77fc9 100644 --- a/ant-cli/src/commands/wallet.rs +++ b/ant-cli/src/commands/wallet.rs @@ -6,7 +6,7 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. -use crate::wallet::fs::{select_wallet, store_private_key}; +use crate::wallet::fs::{select_wallet, select_wallet_private_key, store_private_key}; use crate::wallet::input::request_password; use crate::wallet::DUMMY_NETWORK; use autonomi::Wallet; @@ -61,6 +61,20 @@ pub fn import( Ok(()) } +pub fn export() -> Result<()> { + let wallet_private_key = select_wallet_private_key()?; + + let wallet_address = Wallet::new_from_private_key(DUMMY_NETWORK, &wallet_private_key) + .expect("Infallible") + .address() + .to_string(); + + println!("Wallet address: {wallet_address}"); + println!("Wallet private key: {wallet_private_key}"); + + Ok(()) +} + pub async fn balance() -> Result<()> { let wallet = select_wallet()?; From 123f5929253883afe4bc313d4da40c71e7c20887 Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Fri, 13 Dec 2024 15:25:28 +0100 Subject: [PATCH 09/43] fix: error when decrypting wallet without 0x prefix --- ant-cli/src/commands/wallet.rs | 7 ++++++- ant-cli/src/wallet/encryption.rs | 5 +---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ant-cli/src/commands/wallet.rs b/ant-cli/src/commands/wallet.rs index de97c77fc9..b1a2caf70b 100644 --- a/ant-cli/src/commands/wallet.rs +++ b/ant-cli/src/commands/wallet.rs @@ -37,7 +37,7 @@ pub fn create(no_password: bool, password: Option) -> Result<()> { } pub fn import( - wallet_private_key: String, + mut wallet_private_key: String, no_password: bool, password: Option, ) -> Result<()> { @@ -52,6 +52,11 @@ pub fn import( .address() .to_string(); + // Prepend with 0x if it isn't already + if !wallet_private_key.starts_with("0x") { + wallet_private_key = format!("0x{wallet_private_key}"); + } + // Save the private key file let file_path = store_private_key(&wallet_private_key, maybe_encryption_password)?; diff --git a/ant-cli/src/wallet/encryption.rs b/ant-cli/src/wallet/encryption.rs index bc673574ce..88f53afa15 100644 --- a/ant-cli/src/wallet/encryption.rs +++ b/ant-cli/src/wallet/encryption.rs @@ -123,11 +123,8 @@ pub fn decrypt_private_key(encrypted_data: &str, password: &str) -> Result Date: Fri, 13 Dec 2024 16:04:42 +0100 Subject: [PATCH 10/43] fix: on duplicate wallet files (encrypted & plain), favour the plain one --- ant-cli/src/wallet/fs.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ant-cli/src/wallet/fs.rs b/ant-cli/src/wallet/fs.rs index 136ddf5c4f..1cf4bb3284 100644 --- a/ant-cli/src/wallet/fs.rs +++ b/ant-cli/src/wallet/fs.rs @@ -82,7 +82,10 @@ pub(crate) fn load_private_key(wallet_address: &str) -> Result { let encrypted_file_path = wallets_folder.join(format!("{wallet_address}{ENCRYPTED_PRIVATE_KEY_EXT}")); - let is_encrypted = encrypted_file_path.exists(); + let is_plain = wallets_folder.join(&file_name).exists(); + + // Trick to favour the plain file in case they both exist + let is_encrypted = encrypted_file_path.exists() && !is_plain; if is_encrypted { file_name.push_str(ENCRYPTED_PRIVATE_KEY_EXT); From f64a20872c237616ae551d18d631d7936af6f1e2 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Fri, 13 Dec 2024 16:06:16 +0000 Subject: [PATCH 11/43] chore(release): release candidate 2024.12.1.2 ================== Crate Versions ================== ant-bootstrap: 0.1.0-rc.2 ant-build-info: 0.1.20-rc.2 ant-cli: 0.3.0-rc.2 ant-evm: 0.1.5-rc.2 ant-logging: 0.2.41-rc.2 ant-metrics: 0.1.21-rc.2 ant-networking: 0.3.0-rc.2 ant-node: 0.3.0-rc.2 ant-node-manager: 0.11.4-rc.2 ant-node-rpc-client: 0.6.37-rc.2 ant-protocol: 0.3.0-rc.2 ant-registers: 0.4.4-rc.2 ant-service-management: 0.4.4-rc.2 ant-token-supplies: 0.1.59-rc.2 autonomi: 0.3.0-rc.2 evmlib: 0.1.5-rc.2 evm-testnet: 0.1.5-rc.2 nat-detection: 0.2.12-rc.2 node-launchpad: 0.5.0-rc.2 test-utils: 0.4.12-rc.2 =================== Binary Versions =================== ant: 0.3.0-rc.2 antctl: 0.11.4-rc.2 antctld: 0.11.4-rc.2 antnode: 0.3.0-rc.2 antnode_rpc_client: 0.6.37-rc.2 nat-detection: 0.2.12-rc.2 node-launchpad: 0.5.0-rc.2 --- Cargo.lock | 40 +++++++++++++++--------------- ant-bootstrap/Cargo.toml | 6 ++--- ant-build-info/Cargo.toml | 2 +- ant-build-info/src/release_info.rs | 2 +- ant-cli/Cargo.toml | 14 +++++------ ant-evm/Cargo.toml | 4 +-- ant-logging/Cargo.toml | 2 +- ant-metrics/Cargo.toml | 2 +- ant-networking/Cargo.toml | 12 ++++----- ant-node-manager/Cargo.toml | 14 +++++------ ant-node-rpc-client/Cargo.toml | 12 ++++----- ant-node/Cargo.toml | 24 +++++++++--------- ant-protocol/Cargo.toml | 8 +++--- ant-registers/Cargo.toml | 2 +- ant-service-management/Cargo.toml | 10 ++++---- ant-token-supplies/Cargo.toml | 2 +- autonomi/Cargo.toml | 16 ++++++------ evm-testnet/Cargo.toml | 6 ++--- evmlib/Cargo.toml | 2 +- nat-detection/Cargo.toml | 8 +++--- node-launchpad/Cargo.toml | 14 +++++------ release-cycle-info | 2 +- test-utils/Cargo.toml | 4 +-- 23 files changed, 104 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7a19ed51e..841c2070ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,7 +773,7 @@ dependencies = [ [[package]] name = "ant-bootstrap" -version = "0.1.0-rc.1" +version = "0.1.0-rc.2" dependencies = [ "ant-logging", "ant-protocol", @@ -798,7 +798,7 @@ dependencies = [ [[package]] name = "ant-build-info" -version = "0.1.20-rc.1" +version = "0.1.20-rc.2" dependencies = [ "chrono", "tracing", @@ -807,7 +807,7 @@ dependencies = [ [[package]] name = "ant-cli" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "ant-evm" -version = "0.1.5-rc.1" +version = "0.1.5-rc.2" dependencies = [ "custom_debug", "evmlib", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "ant-logging" -version = "0.2.41-rc.1" +version = "0.2.41-rc.2" dependencies = [ "chrono", "color-eyre", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "ant-metrics" -version = "0.1.21-rc.1" +version = "0.1.21-rc.2" dependencies = [ "clap", "color-eyre", @@ -900,7 +900,7 @@ dependencies = [ [[package]] name = "ant-networking" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" dependencies = [ "aes-gcm-siv", "ant-bootstrap", @@ -948,7 +948,7 @@ dependencies = [ [[package]] name = "ant-node" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "ant-node-manager" -version = "0.11.4-rc.1" +version = "0.11.4-rc.2" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "ant-node-rpc-client" -version = "0.6.37-rc.1" +version = "0.6.37-rc.2" dependencies = [ "ant-build-info", "ant-logging", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "ant-protocol" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" dependencies = [ "ant-build-info", "ant-evm", @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "ant-registers" -version = "0.4.4-rc.1" +version = "0.4.4-rc.2" dependencies = [ "blsttc", "crdts", @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "ant-service-management" -version = "0.4.4-rc.1" +version = "0.4.4-rc.2" dependencies = [ "ant-bootstrap", "ant-evm", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "ant-token-supplies" -version = "0.1.59-rc.1" +version = "0.1.59-rc.2" dependencies = [ "dirs-next", "reqwest 0.11.27", @@ -1591,7 +1591,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autonomi" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" dependencies = [ "alloy", "ant-bootstrap", @@ -3356,7 +3356,7 @@ dependencies = [ [[package]] name = "evm-testnet" -version = "0.1.5-rc.1" +version = "0.1.5-rc.2" dependencies = [ "ant-evm", "clap", @@ -3367,7 +3367,7 @@ dependencies = [ [[package]] name = "evmlib" -version = "0.1.5-rc.1" +version = "0.1.5-rc.2" dependencies = [ "alloy", "dirs-next", @@ -6284,7 +6284,7 @@ dependencies = [ [[package]] name = "nat-detection" -version = "0.2.12-rc.1" +version = "0.2.12-rc.2" dependencies = [ "ant-build-info", "ant-networking", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "node-launchpad" -version = "0.5.0-rc.1" +version = "0.5.0-rc.2" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -9321,7 +9321,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-utils" -version = "0.4.12-rc.1" +version = "0.4.12-rc.2" dependencies = [ "bytes", "color-eyre", diff --git a/ant-bootstrap/Cargo.toml b/ant-bootstrap/Cargo.toml index 3f4f7b1794..0b5d3688be 100644 --- a/ant-bootstrap/Cargo.toml +++ b/ant-bootstrap/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0" name = "ant-bootstrap" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.0-rc.1" +version = "0.1.0-rc.2" [features] local = [] [dependencies] -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } atomic-write-file = "0.2.2" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.2.1", features = ["derive", "env"] } diff --git a/ant-build-info/Cargo.toml b/ant-build-info/Cargo.toml index 38e9f48d6d..767001eb4c 100644 --- a/ant-build-info/Cargo.toml +++ b/ant-build-info/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-build-info" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.20-rc.1" +version = "0.1.20-rc.2" build = "build.rs" include = ["Cargo.toml", "src/**/*", "build.rs"] diff --git a/ant-build-info/src/release_info.rs b/ant-build-info/src/release_info.rs index fff5245a43..4b12a23257 100644 --- a/ant-build-info/src/release_info.rs +++ b/ant-build-info/src/release_info.rs @@ -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 = "1"; +pub const RELEASE_CYCLE_COUNTER: &str = "2"; diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index 72b48af14e..362724fe3c 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] name = "ant-cli" description = "CLI client for the Autonomi network" license = "GPL-3.0" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -23,11 +23,11 @@ name = "files" harness = false [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.1", features = [ +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.2", features = [ "fs", "vault", "registers", @@ -59,7 +59,7 @@ tracing = { version = "~0.1.26" } walkdir = "2.5.0" [dev-dependencies] -autonomi = { path = "../autonomi", version = "0.3.0-rc.1", features = ["fs"]} +autonomi = { path = "../autonomi", version = "0.3.0-rc.2", features = ["fs"]} criterion = "0.5.1" eyre = "0.6.8" rand = { version = "~0.8.5", features = ["small_rng"] } diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index 3d0b8c7636..6fd4a46b22 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-evm" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.1" +version = "0.1.5-rc.2" [features] local = ["evmlib/local"] @@ -16,7 +16,7 @@ test-utils = [] [dependencies] custom_debug = "~0.6.1" -evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } hex = "~0.4.3" lazy_static = "~1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } diff --git a/ant-logging/Cargo.toml b/ant-logging/Cargo.toml index 3bd5260da8..d61ae95a1a 100644 --- a/ant-logging/Cargo.toml +++ b/ant-logging/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-logging" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.41-rc.1" +version = "0.2.41-rc.2" [dependencies] chrono = "~0.4.19" diff --git a/ant-metrics/Cargo.toml b/ant-metrics/Cargo.toml index 30f95709b2..25bb745b38 100644 --- a/ant-metrics/Cargo.toml +++ b/ant-metrics/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-metrics" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.21-rc.1" +version = "0.1.21-rc.2" [[bin]] path = "src/main.rs" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index 9144b5f0ed..7a8281fe29 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-networking" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" [features] default = [] @@ -20,11 +20,11 @@ upnp = ["libp2p/upnp"] [dependencies] aes-gcm-siv = "0.11.1" -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } async-trait = "0.1" bytes = { version = "1.0.1", features = ["serde"] } custom_debug = "~0.6.1" diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index e25d71801c..0af13c1a28 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-manager" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.11.4-rc.1" +version = "0.11.4-rc.2" [[bin]] name = "antctl" @@ -30,13 +30,13 @@ tcp = [] websockets = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } ant-releases = { version = "0.4.0" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.1" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.2" } chrono = "~0.4.19" clap = { version = "4.4.6", features = ["derive", "env"] } colored = "2.0.4" diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index 89d54db065..f0483861ce 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-rpc-client" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.6.37-rc.1" +version = "0.6.37-rc.2" [[bin]] name = "antnode_rpc_client" @@ -17,11 +17,11 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1", features=["rpc"] } -ant-node = { path = "../ant-node", version = "0.3.0-rc.1" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2", features=["rpc"] } +ant-node = { path = "../ant-node", version = "0.3.0-rc.2" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.2" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } clap = { version = "4.2.1", features = ["derive"] } diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index a46c7c4a0b..f431fda1e9 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "The Autonomi node binary" name = "ant-node" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -26,14 +26,14 @@ otlp = ["ant-logging/otlp"] upnp = ["ant-networking/upnp"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.1" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.2" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } @@ -83,10 +83,10 @@ walkdir = "~2.5.0" xor_name = "5.0.0" [dev-dependencies] -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1", features = ["rpc"] } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2", features = ["rpc"] } assert_fs = "1.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.1", features = ["registers"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.2", features = ["registers"] } reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", ] } diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index 2d9fabb84d..6d5dd15073 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0" name = "ant-protocol" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" [features] default = [] rpc = ["tonic", "prost"] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "0.6.2" diff --git a/ant-registers/Cargo.toml b/ant-registers/Cargo.toml index 5f992bccfe..8681777236 100644 --- a/ant-registers/Cargo.toml +++ b/ant-registers/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-registers" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.1" +version = "0.4.4-rc.2" [features] test-utils = [] diff --git a/ant-service-management/Cargo.toml b/ant-service-management/Cargo.toml index dbdcdb2b84..e1a9273594 100644 --- a/ant-service-management/Cargo.toml +++ b/ant-service-management/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "ant-service-management" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.1" +version = "0.4.4-rc.2" [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1", features = ["rpc"] } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2", features = ["rpc"] } async-trait = "0.1" dirs-next = "2.0.0" libp2p = { version = "0.54.1", features = ["kad"] } diff --git a/ant-token-supplies/Cargo.toml b/ant-token-supplies/Cargo.toml index dfda3e1bb1..3ca19972a2 100644 --- a/ant-token-supplies/Cargo.toml +++ b/ant-token-supplies/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-token-supplies" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.59-rc.1" +version = "0.1.59-rc.2" [dependencies] diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index 6e3e03b4d8..f5fc55fe2d 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] description = "Autonomi client API" name = "autonomi" license = "GPL-3.0" -version = "0.3.0-rc.1" +version = "0.3.0-rc.2" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -25,11 +25,11 @@ registers = [] vault = ["registers"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.1" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } bip39 = "2.0.0" blst = "0.3.13" blstrs = "0.7.1" @@ -60,7 +60,7 @@ xor_name = "5.0.0" [dev-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"] } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.1" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } eyre = "0.6.5" sha2 = "0.10.6" # Do not specify the version field. Release process expects even the local dev deps to be published. @@ -72,7 +72,7 @@ wasm-bindgen-test = "0.3.43" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" -evmlib = { path = "../evmlib", version = "0.1.5-rc.1", features = ["wasm-bindgen"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.2", features = ["wasm-bindgen"] } # See https://github.com/sebcrozet/instant/blob/7bd13f51f5c930239fddc0476a837870fb239ed7/README.md#using-instant-for-a-wasm-platform-where-performancenow-is-not-available instant = { version = "0.1", features = ["wasm-bindgen", "inaccurate"] } js-sys = "0.3.70" diff --git a/evm-testnet/Cargo.toml b/evm-testnet/Cargo.toml index 1c675af511..692091c102 100644 --- a/evm-testnet/Cargo.toml +++ b/evm-testnet/Cargo.toml @@ -6,13 +6,13 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evm-testnet" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.1" +version = "0.1.5-rc.2" [dependencies] -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } clap = { version = "4.5", features = ["derive"] } dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } tokio = { version = "1.40", features = ["rt-multi-thread", "signal"] } [lints] diff --git a/evmlib/Cargo.toml b/evmlib/Cargo.toml index 1807921a86..1eb54b4500 100644 --- a/evmlib/Cargo.toml +++ b/evmlib/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evmlib" repository = "https://github.com/maidsafe/safe_network" -version = "0.1.5-rc.1" +version = "0.1.5-rc.2" [features] wasm-bindgen = ["alloy/wasm-bindgen"] diff --git a/nat-detection/Cargo.toml b/nat-detection/Cargo.toml index bae7517e30..62d9d8a095 100644 --- a/nat-detection/Cargo.toml +++ b/nat-detection/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "nat-detection" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.12-rc.1" +version = "0.2.12-rc.2" [[bin]] name = "nat-detection" @@ -17,9 +17,9 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.1" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.2" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } clap = { version = "4.5.4", features = ["derive"] } clap-verbosity-flag = "2.2.0" color-eyre = { version = "0.6", default-features = false } diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index 35d841a7ff..8639f7159c 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "TUI for running nodes on the Autonomi network" name = "node-launchpad" -version = "0.5.0-rc.1" +version = "0.5.0-rc.2" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -18,13 +18,13 @@ path = "src/bin/tui/main.rs" nightly = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.1" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.1" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.1" } -ant-node-manager = { version = "0.11.4-rc.1", path = "../ant-node-manager" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.1" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-node-manager = { version = "0.11.4-rc.2", path = "../ant-node-manager" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } ant-releases = { version = "0.4.0" } -ant-service-management = { version = "0.4.4-rc.1", path = "../ant-service-management" } +ant-service-management = { version = "0.4.4-rc.2", path = "../ant-service-management" } arboard = "3.4.1" atty = "0.2.14" better-panic = "0.3.0" diff --git a/release-cycle-info b/release-cycle-info index 6bbd008a74..4a08728277 100644 --- a/release-cycle-info +++ b/release-cycle-info @@ -15,4 +15,4 @@ release-year: 2024 release-month: 12 release-cycle: 1 -release-cycle-counter: 1 +release-cycle-counter: 2 diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index bd552ef5eb..25909a471b 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "test-utils" readme = "README.md" repository = "https://github.com/maidsafe/safe_network" -version = "0.4.12-rc.1" +version = "0.4.12-rc.2" [dependencies] bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "~0.6.2" dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.1" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = "0.8.5" serde = { version = "1.0.133", features = ["derive"] } From 06de31e71b5d99553c422f1aaa18a16107f88866 Mon Sep 17 00:00:00 2001 From: qima Date: Sat, 14 Dec 2024 02:59:14 +0800 Subject: [PATCH 12/43] fix: bootstrap node replacement only to be carried out once --- ant-networking/src/event/swarm.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ant-networking/src/event/swarm.rs b/ant-networking/src/event/swarm.rs index 3bf65eb6d9..d8d26d0a2d 100644 --- a/ant-networking/src/event/swarm.rs +++ b/ant-networking/src/event/swarm.rs @@ -627,9 +627,12 @@ impl SwarmDriver { fn remove_bootstrap_from_full(&mut self, peer_id: PeerId) { let mut shall_removed = None; + let mut bucket_index = Some(0); + if let Some(kbucket) = self.swarm.behaviour_mut().kademlia.kbucket(peer_id) { if kbucket.num_entries() >= K_VALUE.into() { - if let Some(peers) = self.bootstrap_peers.get(&kbucket.range().0.ilog2()) { + bucket_index = kbucket.range().0.ilog2(); + if let Some(peers) = self.bootstrap_peers.get(&bucket_index) { for peer_entry in kbucket.iter() { if peers.contains(peer_entry.node.key.preimage()) { shall_removed = Some(*peer_entry.node.key.preimage()); @@ -649,6 +652,13 @@ impl SwarmDriver { if let Some(removed_peer) = entry { self.update_on_peer_removal(*removed_peer.node.key.preimage()); } + + // With the switch to using bootstrap cache, workload is distributed already. + // to avoid peers keeps being replaced by each other, + // there shall be just one time of removal to be undertaken. + if let Some(peers) = self.bootstrap_peers.get_mut(&bucket_index) { + let _ = peers.remove(&to_be_removed_bootstrap); + } } } From 87f2f70f544cc10bc48c7938470d742313e6a5d5 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Sat, 14 Dec 2024 13:03:32 +0000 Subject: [PATCH 13/43] chore(release): release candidate 2024.12.1.3 ================== Crate Versions ================== ant-bootstrap: 0.1.0-rc.3 ant-build-info: 0.1.20-rc.3 ant-cli: 0.3.0-rc.3 ant-evm: 0.1.5-rc.3 ant-logging: 0.2.41-rc.3 ant-metrics: 0.1.21-rc.3 ant-networking: 0.3.0-rc.3 ant-node: 0.3.0-rc.3 ant-node-manager: 0.11.4-rc.3 ant-node-rpc-client: 0.6.37-rc.3 ant-protocol: 0.3.0-rc.3 ant-registers: 0.4.4-rc.3 ant-service-management: 0.4.4-rc.3 ant-token-supplies: 0.1.59-rc.3 autonomi: 0.3.0-rc.3 evmlib: 0.1.5-rc.3 evm-testnet: 0.1.5-rc.3 nat-detection: 0.2.12-rc.3 node-launchpad: 0.5.0-rc.3 test-utils: 0.4.12-rc.3 =================== Binary Versions =================== ant: 0.3.0-rc.3 antctl: 0.11.4-rc.3 antctld: 0.11.4-rc.3 antnode: 0.3.0-rc.3 antnode_rpc_client: 0.6.37-rc.3 nat-detection: 0.2.12-rc.3 node-launchpad: 0.5.0-rc.3 --- Cargo.lock | 40 +++++++++---------- ant-bootstrap/Cargo.toml | 6 +-- ant-build-info/Cargo.toml | 2 +- ant-build-info/src/release_info.rs | 2 +- ant-cli/Cargo.toml | 14 +++---- ant-evm/Cargo.toml | 4 +- ant-logging/Cargo.toml | 2 +- ant-metrics/Cargo.toml | 2 +- ant-networking/Cargo.toml | 12 +++--- ant-node-manager/Cargo.toml | 14 +++---- ant-node-rpc-client/Cargo.toml | 12 +++--- ant-node/Cargo.toml | 24 +++++------ ant-protocol/Cargo.toml | 8 ++-- ant-registers/Cargo.toml | 2 +- ant-service-management/Cargo.toml | 10 ++--- ant-token-supplies/Cargo.toml | 2 +- autonomi/Cargo.toml | 16 ++++---- evm-testnet/Cargo.toml | 6 +-- evmlib/Cargo.toml | 2 +- nat-detection/Cargo.toml | 8 ++-- node-launchpad/Cargo.toml | 14 +++---- release-cycle-info | 2 +- .../scripts/release-candidate-description.py | 2 +- test-utils/Cargo.toml | 4 +- 24 files changed, 105 insertions(+), 105 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 841c2070ca..6808bb63af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,7 +773,7 @@ dependencies = [ [[package]] name = "ant-bootstrap" -version = "0.1.0-rc.2" +version = "0.1.0-rc.3" dependencies = [ "ant-logging", "ant-protocol", @@ -798,7 +798,7 @@ dependencies = [ [[package]] name = "ant-build-info" -version = "0.1.20-rc.2" +version = "0.1.20-rc.3" dependencies = [ "chrono", "tracing", @@ -807,7 +807,7 @@ dependencies = [ [[package]] name = "ant-cli" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "ant-evm" -version = "0.1.5-rc.2" +version = "0.1.5-rc.3" dependencies = [ "custom_debug", "evmlib", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "ant-logging" -version = "0.2.41-rc.2" +version = "0.2.41-rc.3" dependencies = [ "chrono", "color-eyre", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "ant-metrics" -version = "0.1.21-rc.2" +version = "0.1.21-rc.3" dependencies = [ "clap", "color-eyre", @@ -900,7 +900,7 @@ dependencies = [ [[package]] name = "ant-networking" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" dependencies = [ "aes-gcm-siv", "ant-bootstrap", @@ -948,7 +948,7 @@ dependencies = [ [[package]] name = "ant-node" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "ant-node-manager" -version = "0.11.4-rc.2" +version = "0.11.4-rc.3" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "ant-node-rpc-client" -version = "0.6.37-rc.2" +version = "0.6.37-rc.3" dependencies = [ "ant-build-info", "ant-logging", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "ant-protocol" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" dependencies = [ "ant-build-info", "ant-evm", @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "ant-registers" -version = "0.4.4-rc.2" +version = "0.4.4-rc.3" dependencies = [ "blsttc", "crdts", @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "ant-service-management" -version = "0.4.4-rc.2" +version = "0.4.4-rc.3" dependencies = [ "ant-bootstrap", "ant-evm", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "ant-token-supplies" -version = "0.1.59-rc.2" +version = "0.1.59-rc.3" dependencies = [ "dirs-next", "reqwest 0.11.27", @@ -1591,7 +1591,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autonomi" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" dependencies = [ "alloy", "ant-bootstrap", @@ -3356,7 +3356,7 @@ dependencies = [ [[package]] name = "evm-testnet" -version = "0.1.5-rc.2" +version = "0.1.5-rc.3" dependencies = [ "ant-evm", "clap", @@ -3367,7 +3367,7 @@ dependencies = [ [[package]] name = "evmlib" -version = "0.1.5-rc.2" +version = "0.1.5-rc.3" dependencies = [ "alloy", "dirs-next", @@ -6284,7 +6284,7 @@ dependencies = [ [[package]] name = "nat-detection" -version = "0.2.12-rc.2" +version = "0.2.12-rc.3" dependencies = [ "ant-build-info", "ant-networking", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "node-launchpad" -version = "0.5.0-rc.2" +version = "0.5.0-rc.3" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -9321,7 +9321,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-utils" -version = "0.4.12-rc.2" +version = "0.4.12-rc.3" dependencies = [ "bytes", "color-eyre", diff --git a/ant-bootstrap/Cargo.toml b/ant-bootstrap/Cargo.toml index 0b5d3688be..910bfcbce6 100644 --- a/ant-bootstrap/Cargo.toml +++ b/ant-bootstrap/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0" name = "ant-bootstrap" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.0-rc.2" +version = "0.1.0-rc.3" [features] local = [] [dependencies] -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } atomic-write-file = "0.2.2" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.2.1", features = ["derive", "env"] } diff --git a/ant-build-info/Cargo.toml b/ant-build-info/Cargo.toml index 767001eb4c..d5fb78c426 100644 --- a/ant-build-info/Cargo.toml +++ b/ant-build-info/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-build-info" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.20-rc.2" +version = "0.1.20-rc.3" build = "build.rs" include = ["Cargo.toml", "src/**/*", "build.rs"] diff --git a/ant-build-info/src/release_info.rs b/ant-build-info/src/release_info.rs index 4b12a23257..ce747aa610 100644 --- a/ant-build-info/src/release_info.rs +++ b/ant-build-info/src/release_info.rs @@ -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 = "2"; +pub const RELEASE_CYCLE_COUNTER: &str = "3"; diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index 362724fe3c..489c0c8fb0 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] name = "ant-cli" description = "CLI client for the Autonomi network" license = "GPL-3.0" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -23,11 +23,11 @@ name = "files" harness = false [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.2", features = [ +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = [ "fs", "vault", "registers", @@ -59,7 +59,7 @@ tracing = { version = "~0.1.26" } walkdir = "2.5.0" [dev-dependencies] -autonomi = { path = "../autonomi", version = "0.3.0-rc.2", features = ["fs"]} +autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = ["fs"]} criterion = "0.5.1" eyre = "0.6.8" rand = { version = "~0.8.5", features = ["small_rng"] } diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index 6fd4a46b22..d01e9a282a 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-evm" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.2" +version = "0.1.5-rc.3" [features] local = ["evmlib/local"] @@ -16,7 +16,7 @@ test-utils = [] [dependencies] custom_debug = "~0.6.1" -evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } hex = "~0.4.3" lazy_static = "~1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } diff --git a/ant-logging/Cargo.toml b/ant-logging/Cargo.toml index d61ae95a1a..dc30c512f9 100644 --- a/ant-logging/Cargo.toml +++ b/ant-logging/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-logging" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.41-rc.2" +version = "0.2.41-rc.3" [dependencies] chrono = "~0.4.19" diff --git a/ant-metrics/Cargo.toml b/ant-metrics/Cargo.toml index 25bb745b38..7f5f3f604e 100644 --- a/ant-metrics/Cargo.toml +++ b/ant-metrics/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-metrics" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.21-rc.2" +version = "0.1.21-rc.3" [[bin]] path = "src/main.rs" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index 7a8281fe29..d73a3755ac 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-networking" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" [features] default = [] @@ -20,11 +20,11 @@ upnp = ["libp2p/upnp"] [dependencies] aes-gcm-siv = "0.11.1" -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } async-trait = "0.1" bytes = { version = "1.0.1", features = ["serde"] } custom_debug = "~0.6.1" diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index 0af13c1a28..bbfbf37410 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-manager" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.11.4-rc.2" +version = "0.11.4-rc.3" [[bin]] name = "antctl" @@ -30,13 +30,13 @@ tcp = [] websockets = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } ant-releases = { version = "0.4.0" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.2" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.3" } chrono = "~0.4.19" clap = { version = "4.4.6", features = ["derive", "env"] } colored = "2.0.4" diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index f0483861ce..f0019753d4 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-rpc-client" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.6.37-rc.2" +version = "0.6.37-rc.3" [[bin]] name = "antnode_rpc_client" @@ -17,11 +17,11 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2", features=["rpc"] } -ant-node = { path = "../ant-node", version = "0.3.0-rc.2" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3", features=["rpc"] } +ant-node = { path = "../ant-node", version = "0.3.0-rc.3" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.3" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } clap = { version = "4.2.1", features = ["derive"] } diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index f431fda1e9..053390041e 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "The Autonomi node binary" name = "ant-node" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -26,14 +26,14 @@ otlp = ["ant-logging/otlp"] upnp = ["ant-networking/upnp"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.2" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.3" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } @@ -83,10 +83,10 @@ walkdir = "~2.5.0" xor_name = "5.0.0" [dev-dependencies] -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2", features = ["rpc"] } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3", features = ["rpc"] } assert_fs = "1.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.2", features = ["registers"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = ["registers"] } reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", ] } diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index 6d5dd15073..aca39a2e4d 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0" name = "ant-protocol" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" [features] default = [] rpc = ["tonic", "prost"] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "0.6.2" diff --git a/ant-registers/Cargo.toml b/ant-registers/Cargo.toml index 8681777236..8fcc08483d 100644 --- a/ant-registers/Cargo.toml +++ b/ant-registers/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-registers" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.2" +version = "0.4.4-rc.3" [features] test-utils = [] diff --git a/ant-service-management/Cargo.toml b/ant-service-management/Cargo.toml index e1a9273594..984879ea7f 100644 --- a/ant-service-management/Cargo.toml +++ b/ant-service-management/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "ant-service-management" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.2" +version = "0.4.4-rc.3" [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2", features = ["rpc"] } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3", features = ["rpc"] } async-trait = "0.1" dirs-next = "2.0.0" libp2p = { version = "0.54.1", features = ["kad"] } diff --git a/ant-token-supplies/Cargo.toml b/ant-token-supplies/Cargo.toml index 3ca19972a2..cc59d9706b 100644 --- a/ant-token-supplies/Cargo.toml +++ b/ant-token-supplies/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-token-supplies" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.59-rc.2" +version = "0.1.59-rc.3" [dependencies] diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index f5fc55fe2d..74371bba9e 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] description = "Autonomi client API" name = "autonomi" license = "GPL-3.0" -version = "0.3.0-rc.2" +version = "0.3.0-rc.3" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -25,11 +25,11 @@ registers = [] vault = ["registers"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.2" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } bip39 = "2.0.0" blst = "0.3.13" blstrs = "0.7.1" @@ -60,7 +60,7 @@ xor_name = "5.0.0" [dev-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"] } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.2" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } eyre = "0.6.5" sha2 = "0.10.6" # Do not specify the version field. Release process expects even the local dev deps to be published. @@ -72,7 +72,7 @@ wasm-bindgen-test = "0.3.43" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" -evmlib = { path = "../evmlib", version = "0.1.5-rc.2", features = ["wasm-bindgen"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.3", features = ["wasm-bindgen"] } # See https://github.com/sebcrozet/instant/blob/7bd13f51f5c930239fddc0476a837870fb239ed7/README.md#using-instant-for-a-wasm-platform-where-performancenow-is-not-available instant = { version = "0.1", features = ["wasm-bindgen", "inaccurate"] } js-sys = "0.3.70" diff --git a/evm-testnet/Cargo.toml b/evm-testnet/Cargo.toml index 692091c102..ff3df5f3b7 100644 --- a/evm-testnet/Cargo.toml +++ b/evm-testnet/Cargo.toml @@ -6,13 +6,13 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evm-testnet" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.2" +version = "0.1.5-rc.3" [dependencies] -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } clap = { version = "4.5", features = ["derive"] } dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } tokio = { version = "1.40", features = ["rt-multi-thread", "signal"] } [lints] diff --git a/evmlib/Cargo.toml b/evmlib/Cargo.toml index 1eb54b4500..2646a874a9 100644 --- a/evmlib/Cargo.toml +++ b/evmlib/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evmlib" repository = "https://github.com/maidsafe/safe_network" -version = "0.1.5-rc.2" +version = "0.1.5-rc.3" [features] wasm-bindgen = ["alloy/wasm-bindgen"] diff --git a/nat-detection/Cargo.toml b/nat-detection/Cargo.toml index 62d9d8a095..33fe7871e5 100644 --- a/nat-detection/Cargo.toml +++ b/nat-detection/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "nat-detection" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.12-rc.2" +version = "0.2.12-rc.3" [[bin]] name = "nat-detection" @@ -17,9 +17,9 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.2" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.3" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } clap = { version = "4.5.4", features = ["derive"] } clap-verbosity-flag = "2.2.0" color-eyre = { version = "0.6", default-features = false } diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index 8639f7159c..e3269ce45b 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "TUI for running nodes on the Autonomi network" name = "node-launchpad" -version = "0.5.0-rc.2" +version = "0.5.0-rc.3" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -18,13 +18,13 @@ path = "src/bin/tui/main.rs" nightly = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.2" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.2" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.2" } -ant-node-manager = { version = "0.11.4-rc.2", path = "../ant-node-manager" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.2" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-node-manager = { version = "0.11.4-rc.3", path = "../ant-node-manager" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } ant-releases = { version = "0.4.0" } -ant-service-management = { version = "0.4.4-rc.2", path = "../ant-service-management" } +ant-service-management = { version = "0.4.4-rc.3", path = "../ant-service-management" } arboard = "3.4.1" atty = "0.2.14" better-panic = "0.3.0" diff --git a/release-cycle-info b/release-cycle-info index 4a08728277..20ffc3ce9a 100644 --- a/release-cycle-info +++ b/release-cycle-info @@ -15,4 +15,4 @@ release-year: 2024 release-month: 12 release-cycle: 1 -release-cycle-counter: 2 +release-cycle-counter: 3 diff --git a/resources/scripts/release-candidate-description.py b/resources/scripts/release-candidate-description.py index 51fb0037e8..10a91e0b96 100755 --- a/resources/scripts/release-candidate-description.py +++ b/resources/scripts/release-candidate-description.py @@ -72,7 +72,7 @@ def main(pr_numbers): crate_binary_map = { "ant-node": "antnode", "ant-node-manager": "antctl", - "autonomi-cli": "autonomi", + "ant-cli": "ant", "nat-detection": "nat-detection", "node-launchpad": "node-launchpad" } diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 25909a471b..1647917ed9 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "test-utils" readme = "README.md" repository = "https://github.com/maidsafe/safe_network" -version = "0.4.12-rc.2" +version = "0.4.12-rc.3" [dependencies] bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "~0.6.2" dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.2" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = "0.8.5" serde = { version = "1.0.133", features = ["derive"] } From 68118cbdc8c79578015f5260b29b28e31589bffe Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Sun, 15 Dec 2024 18:18:37 +0000 Subject: [PATCH 14/43] chore: versioning for `ant` binary This brings the `ant` binary in alignment with how versioning is handled for the other binaries. As with the other binaries, to save a lot of hassle, the version arguments are implemented 'manually' rather than using the direct mechanism from `clap`. Therefore, to get the expected behaviour, the main subcommand has to be made optional. From the user's point of view nothing changes. I took the opportunity to also sort the arguments alphabetically. This is how they are organised in the node manager, and I find it makes for easier reference. --- ant-cli/Cargo.toml | 1 + ant-cli/src/commands.rs | 9 ++++--- ant-cli/src/main.rs | 37 +++++++++++++++++++++++++-- ant-cli/src/opt.rs | 56 +++++++++++++++++++++++++++-------------- 4 files changed, 78 insertions(+), 25 deletions(-) diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index 489c0c8fb0..0239975d03 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -17,6 +17,7 @@ path = "src/main.rs" default = ["metrics"] local = ["ant-bootstrap/local", "autonomi/local"] metrics = ["ant-logging/process-metrics"] +nightly = [] [[bench]] name = "files" diff --git a/ant-cli/src/commands.rs b/ant-cli/src/commands.rs index 6c6316d3cd..ff065a06c0 100644 --- a/ant-cli/src/commands.rs +++ b/ant-cli/src/commands.rs @@ -187,7 +187,7 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> { let cmd = opt.command; match cmd { - SubCmd::File { command } => match command { + Some(SubCmd::File { command }) => match command { FileCmd::Cost { file } => file::cost(&file, peers.await?).await, FileCmd::Upload { file, public } => file::upload(&file, public, peers.await?).await, FileCmd::Download { addr, dest_file } => { @@ -195,7 +195,7 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> { } FileCmd::List => file::list(), }, - SubCmd::Register { command } => match command { + Some(SubCmd::Register { command }) => match command { RegisterCmd::GenerateKey { overwrite } => register::generate_key(overwrite), RegisterCmd::Cost { name } => register::cost(&name, peers.await?).await, RegisterCmd::Create { @@ -211,13 +211,13 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> { RegisterCmd::Get { address, name } => register::get(address, name, peers.await?).await, RegisterCmd::List => register::list(), }, - SubCmd::Vault { command } => match command { + Some(SubCmd::Vault { command }) => match command { VaultCmd::Cost => vault::cost(peers.await?).await, VaultCmd::Create => vault::create(peers.await?).await, VaultCmd::Load => vault::load(peers.await?).await, VaultCmd::Sync { force } => vault::sync(peers.await?, force).await, }, - SubCmd::Wallet { command } => match command { + Some(SubCmd::Wallet { command }) => match command { WalletCmd::Create { no_password, password, @@ -230,5 +230,6 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> { WalletCmd::Export => wallet::export(), WalletCmd::Balance => wallet::balance().await, }, + None => Ok(()), } } diff --git a/ant-cli/src/main.rs b/ant-cli/src/main.rs index c0404e9f75..279a354e5d 100644 --- a/ant-cli/src/main.rs +++ b/ant-cli/src/main.rs @@ -27,6 +27,7 @@ use color_eyre::Result; #[cfg(feature = "metrics")] use ant_logging::metrics::init_metrics; use ant_logging::{LogBuilder, LogFormat, ReloadHandle, WorkerGuard}; +use ant_protocol::version; use opt::Opt; use tracing::Level; @@ -37,15 +38,47 @@ async fn main() -> Result<()> { if let Some(network_id) = opt.network_id { ant_protocol::version::set_network_id(network_id); } + + // The clone is necessary to resolve a clippy warning related to a mutex. + let identify_protocol_str = version::IDENTIFY_PROTOCOL_STR + .read() + .expect("Failed to obtain read lock for IDENTIFY_PROTOCOL_STR") + .clone(); + if opt.version { + println!( + "{}", + ant_build_info::version_string( + "Autonomi Client", + env!("CARGO_PKG_VERSION"), + Some(&identify_protocol_str) + ) + ); + return Ok(()); + } + + if opt.crate_version { + println!("Crate version: {}", env!("CARGO_PKG_VERSION")); + return Ok(()); + } + + if opt.protocol_version { + println!("Network version: {identify_protocol_str}"); + return Ok(()); + } + + #[cfg(not(feature = "nightly"))] + if opt.package_version { + println!("Package version: {}", ant_build_info::package_version()); + return Ok(()); + } + let _log_guards = init_logging_and_metrics(&opt)?; #[cfg(feature = "metrics")] tokio::spawn(init_metrics(std::process::id())); - // Log the full command that was run and the git version info!("\"{}\"", std::env::args().collect::>().join(" ")); let version = ant_build_info::git_info(); info!("autonomi client built with git version: {version}"); - println!("autonomi client built with git version: {version}"); commands::handle_subcommand(opt).await?; diff --git a/ant-cli/src/opt.rs b/ant-cli/src/opt.rs index 3ffa1eb5f6..9d7e4edd9b 100644 --- a/ant-cli/src/opt.rs +++ b/ant-cli/src/opt.rs @@ -16,8 +16,29 @@ use std::time::Duration; // Please do not remove the blank lines in these doc comments. // They are used for inserting line breaks when the help menu is rendered in the UI. #[derive(Parser)] +#[command(disable_version_flag = true)] #[command(author, version, about, long_about = None)] pub(crate) struct Opt { + /// Available sub commands. + #[clap(subcommand)] + pub command: Option, + + /// The maximum duration to wait for a connection to the network before timing out. + #[clap(long = "timeout", global = true, value_parser = |t: &str| -> Result { Ok(t.parse().map(Duration::from_secs)?) })] + pub connection_timeout: Option, + + /// Print the crate version. + #[clap(long)] + pub crate_version: bool, + + /// Specify the logging format. + /// + /// Valid values are "default" or "json". + /// + /// If the argument is not used, the default format will be applied. + #[clap(long, value_parser = LogFormat::parse_from_str, verbatim_doc_comment)] + pub log_format: Option, + /// Specify the logging output destination. /// /// Valid values are "stdout", "data-dir", or a custom path. @@ -32,25 +53,6 @@ pub(crate) struct Opt { #[clap(long, value_parser = LogOutputDest::parse_from_str, verbatim_doc_comment, default_value = "data-dir")] pub log_output_dest: LogOutputDest, - /// Specify the logging format. - /// - /// Valid values are "default" or "json". - /// - /// If the argument is not used, the default format will be applied. - #[clap(long, value_parser = LogFormat::parse_from_str, verbatim_doc_comment)] - pub log_format: Option, - - #[command(flatten)] - pub(crate) peers: PeersArgs, - - /// Available sub commands. - #[clap(subcommand)] - pub command: SubCmd, - - /// The maximum duration to wait for a connection to the network before timing out. - #[clap(long = "timeout", global = true, value_parser = |t: &str| -> Result { Ok(t.parse().map(Duration::from_secs)?) })] - pub connection_timeout: Option, - /// Specify the network ID to use. This will allow you to run the CLI on a different network. /// /// By default, the network ID is set to 1, which represents the mainnet. @@ -62,4 +64,20 @@ pub(crate) struct Opt { /// This may increase operation speed, but offers no guarantees that operations were successful. #[clap(global = true, long = "no-verify", short = 'x')] pub no_verify: bool, + + #[command(flatten)] + pub(crate) peers: PeersArgs, + + /// Print the package version. + #[cfg(not(feature = "nightly"))] + #[clap(long)] + pub package_version: bool, + + /// Print the network protocol version. + #[clap(long)] + pub protocol_version: bool, + + /// Print version information. + #[clap(long)] + pub version: bool, } From 43d03ed25033c820cc5634d509d507e035d50701 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 11:39:21 +0100 Subject: [PATCH 15/43] refactor(autonomi): init from bootstrap cache --- ant-bootstrap/src/initial_peers.rs | 13 +++++-- autonomi/src/client/mod.rs | 59 +++++++++++++++++++++++++++++- autonomi/tests/put.rs | 14 +++---- 3 files changed, 74 insertions(+), 12 deletions(-) diff --git a/ant-bootstrap/src/initial_peers.rs b/ant-bootstrap/src/initial_peers.rs index 55b3f78e16..27e59d899c 100644 --- a/ant-bootstrap/src/initial_peers.rs +++ b/ant-bootstrap/src/initial_peers.rs @@ -107,14 +107,21 @@ impl PeersArgs { return Ok(vec![]); } + let mut bootstrap_addresses = vec![]; + + // Read from ANT_PEERS environment variable if present + bootstrap_addresses.extend(Self::read_bootstrap_addr_from_env()); + + if !bootstrap_addresses.is_empty() { + return Ok(bootstrap_addresses); + } + // If local mode is enabled, return empty store (will use mDNS) if self.local || cfg!(feature = "local") { info!("Local mode enabled, using only local discovery."); return Ok(vec![]); } - let mut bootstrap_addresses = vec![]; - // Add addrs from arguments if present for addr in &self.addrs { if let Some(addr) = craft_valid_multiaddr(addr, false) { @@ -124,8 +131,6 @@ impl PeersArgs { warn!("Invalid multiaddress format from arguments: {addr}"); } } - // Read from ANT_PEERS environment variable if present - bootstrap_addresses.extend(Self::read_bootstrap_addr_from_env()); if let Some(count) = count { if bootstrap_addresses.len() >= count { diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index fae0a87ba8..05ef75d789 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -34,7 +34,7 @@ pub mod wasm; mod rate_limiter; mod utils; -use ant_bootstrap::{BootstrapCacheConfig, BootstrapCacheStore}; +use ant_bootstrap::{BootstrapCacheConfig, BootstrapCacheStore, PeersArgs}; pub use ant_evm::Amount; use ant_evm::EvmNetwork; @@ -71,6 +71,17 @@ pub struct Client { pub(crate) evm_network: EvmNetwork, } +/// Configuration for [`Client::init_with_config`]. +#[derive(Debug, Clone, Default)] +pub struct ClientConfig { + /// Whether we're expected to connect to a local network. + pub local: bool, + /// List of peers to connect to. + /// + /// If not provided, the client will use the default bootstrap peers. + pub peers: Option>, +} + /// Error returned by [`Client::connect`]. #[derive(Debug, thiserror::Error)] pub enum ConnectError { @@ -80,9 +91,55 @@ pub enum ConnectError { /// Same as [`ConnectError::TimedOut`] but with a list of incompatible protocols. #[error("Could not connect to peers due to incompatible protocol: {0:?}")] TimedOutWithIncompatibleProtocol(HashSet, String), + + /// An error occurred while bootstrapping the client. + #[error("Failed to bootstrap the client")] + Bootstrap(#[from] ant_bootstrap::Error), } impl Client { + pub async fn init() -> Result { + Self::init_with_config(ClientConfig::default()).await + } + + pub async fn init_with_config(config: ClientConfig) -> Result { + let (network, event_receiver) = build_client_and_run_swarm(config.local); + + let peers_args = PeersArgs { + disable_mainnet_contacts: config.local, + addrs: config.peers.unwrap_or_default(), + ..Default::default() + }; + + let peers = match peers_args.get_addrs(None, None).await { + Ok(peers) => peers, + Err(e) => return Err(e.into()), + }; + + let network_clone = network.clone(); + let peers = peers.to_vec(); + let _handle = ant_networking::target_arch::spawn(async move { + for addr in peers { + if let Err(err) = network_clone.dial(addr.clone()).await { + error!("Failed to dial addr={addr} with err: {err:?}"); + eprintln!("addr={addr} Failed to dial: {err:?}"); + }; + } + }); + + // Wait until we have added a few peers to our routing table. + let (sender, receiver) = futures::channel::oneshot::channel(); + ant_networking::target_arch::spawn(handle_event_receiver(event_receiver, sender)); + receiver.await.expect("sender should not close")?; + debug!("Client is connected to the network"); + + Ok(Self { + network, + client_event_sender: Arc::new(None), + evm_network: Default::default(), + }) + } + /// Connect to the network. /// /// This will timeout after [`CONNECT_TIMEOUT_SECS`] secs. diff --git a/autonomi/tests/put.rs b/autonomi/tests/put.rs index f5d411e691..ca4a808c7e 100644 --- a/autonomi/tests/put.rs +++ b/autonomi/tests/put.rs @@ -7,24 +7,24 @@ // permissions and limitations relating to use of the SAFE Network Software. use ant_logging::LogBuilder; -use autonomi::Client; +use autonomi::{client::ClientConfig, Client}; use eyre::Result; -use std::time::Duration; -use test_utils::{evm::get_funded_wallet, gen_random_data, peers_from_env}; -use tokio::time::sleep; +use test_utils::{evm::get_funded_wallet, gen_random_data}; #[tokio::test] async fn put() -> Result<()> { let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("put", false); - let client = Client::connect(&peers_from_env()?).await?; + let client = Client::init_with_config(ClientConfig { + local: true, + ..Default::default() + }) + .await?; let wallet = get_funded_wallet(); let data = gen_random_data(1024 * 1024 * 10); let addr = client.data_put_public(data.clone(), wallet.into()).await?; - sleep(Duration::from_secs(10)).await; - let data_fetched = client.data_get_public(addr).await?; assert_eq!(data, data_fetched, "data fetched should match data put"); From b43962b7da8b834e8cb4fbb136e38ced5e71b707 Mon Sep 17 00:00:00 2001 From: qima Date: Sun, 15 Dec 2024 22:56:20 +0800 Subject: [PATCH 16/43] chore(CI): bring back memcheck test --- .github/workflows/memcheck.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index e6556b9f57..4853442936 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -99,8 +99,8 @@ jobs: mkdir $ANT_DATA_PATH/client ls -l $ANT_DATA_PATH cp ./the-test-data.zip ./the-test-data_1.zip - ./target/release/ant --log-output-dest data-dir file_TYPE upload "" > ./second_upload 2>&1 - enrelease-candidatev: + ./target/release/ant --log-output-dest=data-dir file upload "./the-test-data_1.zip" > ./second_upload 2>&1 + env: ANT_LOG: "all" timeout-minutes: 25 @@ -114,11 +114,7 @@ jobs: - name: Start the restart node again run: | - ./target/release/antnode \ - --root-dir-type PARESTART_TEST_NODE_DATA_PATH \ - --log-output-dest $RESTART_TEST_NODE_DATA_PATH \ - --local \ - --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" & + ./target/release/antnode --root-dir $RESTART_TEST_NODE_DATA_PATH --log-output-dest $RESTART_TEST_NODE_DATA_PATH --local --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" & sleep 10 env: ANT_LOG: "all" @@ -150,9 +146,7 @@ jobs: if: always() - name: File Download - run: > - ./target/release/ant - --log-output-dest=data-dir file download ${{ env.UPLOAD_ADDRESS }} ./downloaded_resources + run: ./target/release/ant --log-output-dest=data-dir file download ${{ env.UPLOAD_ADDRESS }} ./downloaded_resources env: ANT_LOG: "v" timeout-minutes: 2 From 1061abc0ef120aa45cfa2e656400651947fe52ce Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 13:32:44 +0100 Subject: [PATCH 17/43] refactor(autonomi): docs and refactor client config --- autonomi/src/client/mod.rs | 40 +++++++++++++++++++++++++++++++++----- autonomi/src/lib.rs | 2 +- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index 05ef75d789..b14e3f9e7f 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -53,14 +53,13 @@ const CLIENT_EVENT_CHANNEL_SIZE: usize = 100; /// /// # Example /// -/// To connect to the network, use [`Client::connect`]. +/// To start interacting with the network, use [`Client::init`]. /// /// ```no_run /// # use autonomi::client::Client; /// # #[tokio::main] /// # async fn main() -> Result<(), Box> { -/// let peers = ["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]; -/// let client = Client::connect(&peers).await?; +/// let client = Client::init().await?; /// # Ok(()) /// # } /// ``` @@ -76,18 +75,30 @@ pub struct Client { pub struct ClientConfig { /// Whether we're expected to connect to a local network. pub local: bool, + /// List of peers to connect to. /// /// If not provided, the client will use the default bootstrap peers. pub peers: Option>, } +impl ClientConfig { + /// Get a configuration for a local client. + pub fn local() -> Self { + Self { + local: true, + ..Default::default() + } + } +} + /// Error returned by [`Client::connect`]. #[derive(Debug, thiserror::Error)] pub enum ConnectError { /// Did not manage to connect to enough peers in time. #[error("Could not connect to enough peers in time.")] TimedOut, + /// Same as [`ConnectError::TimedOut`] but with a list of incompatible protocols. #[error("Could not connect to peers due to incompatible protocol: {0:?}")] TimedOutWithIncompatibleProtocol(HashSet, String), @@ -98,10 +109,25 @@ pub enum ConnectError { } impl Client { + /// Initialize the client with default configuration. + /// + /// See [`Client::init_with_config`]. pub async fn init() -> Result { - Self::init_with_config(ClientConfig::default()).await + Self::init_with_config(Default::default()).await } + /// Initialize the client with the given configuration. + /// + /// This will block until [`CLOSE_GROUP_SIZE`] have been added to the routing table. + /// + /// ```no_run + /// use autonomi::client::Client; + /// # #[tokio::main] + /// # async fn main() -> Result<(), Box> { + /// let client = Client::init_with_config(Default::default()).await?; + /// # Ok(()) + /// # } + /// ``` pub async fn init_with_config(config: ClientConfig) -> Result { let (network, event_receiver) = build_client_and_run_swarm(config.local); @@ -131,7 +157,7 @@ impl Client { let (sender, receiver) = futures::channel::oneshot::channel(); ant_networking::target_arch::spawn(handle_event_receiver(event_receiver, sender)); receiver.await.expect("sender should not close")?; - debug!("Client is connected to the network"); + debug!("Enough peers were added to our routing table, initialization complete"); Ok(Self { network, @@ -153,6 +179,10 @@ impl Client { /// # Ok(()) /// # } /// ``` + #[deprecated( + since = "0.2.4", + note = "Use [`Client::init`] or [`Client::init_with_config`] instead" + )] pub async fn connect(peers: &[Multiaddr]) -> Result { // Any global address makes the client non-local let local = !peers.iter().any(multiaddr_is_global); diff --git a/autonomi/src/lib.rs b/autonomi/src/lib.rs index f612146f1d..ef68ab79d7 100644 --- a/autonomi/src/lib.rs +++ b/autonomi/src/lib.rs @@ -76,7 +76,7 @@ pub use bytes::Bytes; pub use libp2p::Multiaddr; #[doc(inline)] -pub use client::{files::archive::PrivateArchive, Client}; +pub use client::{files::archive::PrivateArchive, Client, ClientConfig}; #[cfg(feature = "extension-module")] mod python; From 25be50f691003e6dbed45fd815c01481db576923 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 13:42:41 +0100 Subject: [PATCH 18/43] refactor(autonomi): deprecate connect; docs refactor(autonomi): simplify init --- ant-cli/src/actions/connect.rs | 2 +- ant-node/tests/common/client.rs | 2 +- autonomi/examples/put_and_dir_upload.rs | 2 +- autonomi/src/client/mod.rs | 55 ++++++++++++++++++------- autonomi/src/python.rs | 8 ++-- autonomi/tests/external_signer.rs | 4 +- autonomi/tests/fs.rs | 8 ++-- autonomi/tests/put.rs | 8 +--- autonomi/tests/register.rs | 4 +- autonomi/tests/transaction.rs | 4 +- 10 files changed, 60 insertions(+), 37 deletions(-) diff --git a/ant-cli/src/actions/connect.rs b/ant-cli/src/actions/connect.rs index cfe971d14e..cba9ac217a 100644 --- a/ant-cli/src/actions/connect.rs +++ b/ant-cli/src/actions/connect.rs @@ -22,7 +22,7 @@ pub async fn connect_to_network(peers: Vec) -> Result { progress_bar.set_message("Connecting to The Autonomi Network..."); - match Client::connect(&peers).await { + match Client::init_with_peers(peers).await { Ok(client) => { info!("Connected to the Network"); progress_bar.finish_with_message("Connected to the Network"); diff --git a/ant-node/tests/common/client.rs b/ant-node/tests/common/client.rs index 55126c1fc8..faf8c1ae05 100644 --- a/ant-node/tests/common/client.rs +++ b/ant-node/tests/common/client.rs @@ -131,7 +131,7 @@ impl LocalNetwork { println!("Client bootstrap with peer {bootstrap_peers:?}"); info!("Client bootstrap with peer {bootstrap_peers:?}"); - Client::connect(&bootstrap_peers) + Client::init_with_peers(bootstrap_peers) .await .expect("Client shall be successfully created.") } diff --git a/autonomi/examples/put_and_dir_upload.rs b/autonomi/examples/put_and_dir_upload.rs index 874ca57980..9b6d7a6a47 100644 --- a/autonomi/examples/put_and_dir_upload.rs +++ b/autonomi/examples/put_and_dir_upload.rs @@ -5,7 +5,7 @@ async fn main() -> Result<(), Box> { // Default wallet of testnet. let key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; - let client = Client::connect(&["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]).await?; + let client = Client::init_local().await?; let wallet = Wallet::new_from_private_key(Default::default(), key)?; // Put and fetch data. diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index b14e3f9e7f..1cf953d38a 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -39,7 +39,7 @@ pub use ant_evm::Amount; use ant_evm::EvmNetwork; use ant_networking::{interval, multiaddr_is_global, Network, NetworkBuilder, NetworkEvent}; -use ant_protocol::{version::IDENTIFY_PROTOCOL_STR, CLOSE_GROUP_SIZE}; +use ant_protocol::version::IDENTIFY_PROTOCOL_STR; use libp2p::{identity::Keypair, Multiaddr}; use std::{collections::HashSet, sync::Arc, time::Duration}; use tokio::sync::mpsc; @@ -49,7 +49,10 @@ pub const CONNECT_TIMEOUT_SECS: u64 = 10; const CLIENT_EVENT_CHANNEL_SIZE: usize = 100; -/// Represents a connection to the Autonomi network. +// Amount of peers to confirm into our routing table before we consider the client ready. +pub use ant_protocol::CLOSE_GROUP_SIZE; + +/// Represents a client for the Autonomi network. /// /// # Example /// @@ -82,25 +85,15 @@ pub struct ClientConfig { pub peers: Option>, } -impl ClientConfig { - /// Get a configuration for a local client. - pub fn local() -> Self { - Self { - local: true, - ..Default::default() - } - } -} - /// Error returned by [`Client::connect`]. #[derive(Debug, thiserror::Error)] pub enum ConnectError { - /// Did not manage to connect to enough peers in time. - #[error("Could not connect to enough peers in time.")] + /// Did not manage to populate the routing table with enough peers. + #[error("Failed to populate our routing table with enough peers in time")] TimedOut, /// Same as [`ConnectError::TimedOut`] but with a list of incompatible protocols. - #[error("Could not connect to peers due to incompatible protocol: {0:?}")] + #[error("Failed to populate our routing table due to incompatible protocol: {0:?}")] TimedOutWithIncompatibleProtocol(HashSet, String), /// An error occurred while bootstrapping the client. @@ -116,10 +109,42 @@ impl Client { Self::init_with_config(Default::default()).await } + /// Initialize a client that is configured to be local. + /// + /// See [`Client::init_with_config`]. + pub async fn init_local() -> Result { + Self::init_with_config(ClientConfig { + local: true, + ..Default::default() + }) + .await + } + + /// Initialize a client that bootstraps from a list of peers. + /// + /// If any of the provided peers is a global address, the client will not be local. + /// + /// ```no_run + /// // Will set `local` to true. + /// let client = Client::init_with_peers(vec!["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]).await?; + /// ``` + pub async fn init_with_peers(peers: Vec) -> Result { + // Any global address makes the client non-local + let local = !peers.iter().any(multiaddr_is_global); + + Self::init_with_config(ClientConfig { + local, + peers: Some(peers), + }) + .await + } + /// Initialize the client with the given configuration. /// /// This will block until [`CLOSE_GROUP_SIZE`] have been added to the routing table. /// + /// See [`ClientConfig`]. + /// /// ```no_run /// use autonomi::client::Client; /// # #[tokio::main] diff --git a/autonomi/src/python.rs b/autonomi/src/python.rs index 0c28401b55..1f1c4d443b 100644 --- a/autonomi/src/python.rs +++ b/autonomi/src/python.rs @@ -31,9 +31,11 @@ impl PyClient { pyo3::exceptions::PyValueError::new_err(format!("Invalid multiaddr: {e}")) })?; - let client = rt.block_on(RustClient::connect(&peers)).map_err(|e| { - pyo3::exceptions::PyValueError::new_err(format!("Failed to connect: {e}")) - })?; + let client = rt + .block_on(RustClient::init_with_peers(peers)) + .map_err(|e| { + pyo3::exceptions::PyValueError::new_err(format!("Failed to connect: {e}")) + })?; Ok(Self { inner: client }) } diff --git a/autonomi/tests/external_signer.rs b/autonomi/tests/external_signer.rs index 6b918f9370..9cc15c0a69 100644 --- a/autonomi/tests/external_signer.rs +++ b/autonomi/tests/external_signer.rs @@ -15,7 +15,7 @@ use bytes::Bytes; use std::collections::BTreeMap; use std::time::Duration; use test_utils::evm::get_funded_wallet; -use test_utils::{gen_random_data, peers_from_env}; +use test_utils::gen_random_data; use tokio::time::sleep; use xor_name::XorName; @@ -103,7 +103,7 @@ async fn external_signer_put() -> eyre::Result<()> { let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("external_signer_put", false); - let client = Client::connect(&peers_from_env()?).await?; + let client = Client::init_local().await?; let wallet = get_funded_wallet(); let data = gen_random_data(1024 * 1024 * 10); diff --git a/autonomi/tests/fs.rs b/autonomi/tests/fs.rs index 1b8b59f801..941d49cb84 100644 --- a/autonomi/tests/fs.rs +++ b/autonomi/tests/fs.rs @@ -15,7 +15,7 @@ use sha2::{Digest, Sha256}; use std::fs::File; use std::io::{BufReader, Read}; use std::time::Duration; -use test_utils::{evm::get_funded_wallet, peers_from_env}; +use test_utils::evm::get_funded_wallet; use tokio::time::sleep; use walkdir::WalkDir; @@ -26,7 +26,7 @@ async fn dir_upload_download() -> Result<()> { let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("dir_upload_download", false); - let client = Client::connect(&peers_from_env()?).await?; + let client = Client::init_local().await?; let wallet = get_funded_wallet(); let addr = client @@ -81,7 +81,7 @@ fn compute_dir_sha256(dir: &str) -> Result { async fn file_into_vault() -> Result<()> { let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("file", false); - let client = Client::connect(&peers_from_env()?).await?; + let client = Client::init_local().await?; let wallet = get_funded_wallet(); let client_sk = bls::SecretKey::random(); @@ -102,7 +102,7 @@ async fn file_into_vault() -> Result<()> { .await?; // now assert over the stored account packet - let new_client = Client::connect(&[]).await?; + let new_client = Client::init_local().await?; let (ap, got_version) = new_client.fetch_and_decrypt_vault(&client_sk).await?; assert_eq!(set_version, got_version); diff --git a/autonomi/tests/put.rs b/autonomi/tests/put.rs index ca4a808c7e..df9a9fbce8 100644 --- a/autonomi/tests/put.rs +++ b/autonomi/tests/put.rs @@ -7,7 +7,7 @@ // permissions and limitations relating to use of the SAFE Network Software. use ant_logging::LogBuilder; -use autonomi::{client::ClientConfig, Client}; +use autonomi::Client; use eyre::Result; use test_utils::{evm::get_funded_wallet, gen_random_data}; @@ -15,11 +15,7 @@ use test_utils::{evm::get_funded_wallet, gen_random_data}; async fn put() -> Result<()> { let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("put", false); - let client = Client::init_with_config(ClientConfig { - local: true, - ..Default::default() - }) - .await?; + let client = Client::init_local().await?; let wallet = get_funded_wallet(); let data = gen_random_data(1024 * 1024 * 10); diff --git a/autonomi/tests/register.rs b/autonomi/tests/register.rs index e698809d46..b8d4e86d4e 100644 --- a/autonomi/tests/register.rs +++ b/autonomi/tests/register.rs @@ -14,14 +14,14 @@ use bytes::Bytes; use eyre::Result; use rand::Rng; use std::time::Duration; -use test_utils::{evm::get_funded_wallet, peers_from_env}; +use test_utils::evm::get_funded_wallet; use tokio::time::sleep; #[tokio::test] async fn register() -> Result<()> { let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("register", false); - let client = Client::connect(&peers_from_env()?).await?; + let client = Client::init_local().await?; let wallet = get_funded_wallet(); // Owner key of the register. diff --git a/autonomi/tests/transaction.rs b/autonomi/tests/transaction.rs index 76f0bd760d..b0523618b3 100644 --- a/autonomi/tests/transaction.rs +++ b/autonomi/tests/transaction.rs @@ -10,13 +10,13 @@ use ant_logging::LogBuilder; use ant_protocol::storage::Transaction; use autonomi::{client::transactions::TransactionError, Client}; use eyre::Result; -use test_utils::{evm::get_funded_wallet, peers_from_env}; +use test_utils::evm::get_funded_wallet; #[tokio::test] async fn transaction_put() -> Result<()> { let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("transaction", false); - let client = Client::connect(&peers_from_env()?).await?; + let client = Client::init_local().await?; let wallet = get_funded_wallet(); let key = bls::SecretKey::random(); From ba73f15bc6b8cb37b6f5226d55e955fdb6703f12 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 14:09:41 +0100 Subject: [PATCH 19/43] refactor(autonomi): improve docs; fix doc tests --- autonomi/Cargo.toml | 4 ++++ autonomi/README.md | 4 ++-- autonomi/src/client/files/archive_public.rs | 10 ++++------ autonomi/src/client/mod.rs | 6 ++++++ autonomi/src/lib.rs | 6 +++--- autonomi/tests/evm/file.rs | 2 +- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index d5089d14bc..cec548a0e1 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -13,6 +13,10 @@ repository = "https://github.com/maidsafe/autonomi" name = "autonomi" crate-type = ["cdylib", "rlib"] +[[example]] +name = "put_and_dir_upload" +features = ["full"] + [features] default = ["vault"] external-signer = ["ant-evm/external-signer"] diff --git a/autonomi/README.md b/autonomi/README.md index 63235554a1..b3ca14d86c 100644 --- a/autonomi/README.md +++ b/autonomi/README.md @@ -20,10 +20,10 @@ use autonomi::{Bytes, Client, Wallet}; #[tokio::main] async fn main() -> Result<(), Box> { + let client = Client::init().await?; + // Default wallet of testnet. let key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; - - let client = Client::connect(&["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]).await?; let wallet = Wallet::new_from_private_key(Default::default(), key)?; // Put and fetch data. diff --git a/autonomi/src/client/files/archive_public.rs b/autonomi/src/client/files/archive_public.rs index 108d220553..54121ae919 100644 --- a/autonomi/src/client/files/archive_public.rs +++ b/autonomi/src/client/files/archive_public.rs @@ -118,11 +118,10 @@ impl Client { /// # Example /// /// ```no_run - /// # use autonomi::client::{Client, archive::ArchiveAddr}; + /// # use autonomi::{Client, client::files::archive_public::ArchiveAddr}; /// # #[tokio::main] /// # async fn main() -> Result<(), Box> { - /// # let peers = ["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]; - /// let client = Client::connect(&peers).await?; + /// let client = Client::init().await?; /// let archive = client.archive_get_public(ArchiveAddr::random(&mut rand::thread_rng())).await?; /// # Ok(()) /// # } @@ -139,12 +138,11 @@ impl Client { /// Create simple archive containing `file.txt` pointing to random XOR name. /// /// ```no_run - /// # use autonomi::client::{Client, data::DataAddr, archive::{PublicArchive, ArchiveAddr, Metadata}}; + /// # use autonomi::{Client, client::{data::DataAddr, files::{archive::Metadata, archive_public::{PublicArchive, ArchiveAddr}}}}; /// # use std::path::PathBuf; /// # #[tokio::main] /// # async fn main() -> Result<(), Box> { - /// # let peers = ["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]; - /// # let client = Client::connect(&peers).await?; + /// # let client = Client::init().await?; /// # let wallet = todo!(); /// let mut archive = PublicArchive::new(); /// archive.add_file(PathBuf::from("file.txt"), DataAddr::random(&mut rand::thread_rng()), Metadata::new_with_size(0)); diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index 1cf953d38a..88c181f02d 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -125,8 +125,13 @@ impl Client { /// If any of the provided peers is a global address, the client will not be local. /// /// ```no_run + /// # use autonomi::Client; + /// # #[tokio::main] + /// # async fn main() -> Result<(), Box> { /// // Will set `local` to true. /// let client = Client::init_with_peers(vec!["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]).await?; + /// # Ok(()) + /// # } /// ``` pub async fn init_with_peers(peers: Vec) -> Result { // Any global address makes the client non-local @@ -200,6 +205,7 @@ impl Client { /// # #[tokio::main] /// # async fn main() -> Result<(), Box> { /// let peers = ["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]; + /// #[allow(deprecated)] /// let client = Client::connect(&peers).await?; /// # Ok(()) /// # } diff --git a/autonomi/src/lib.rs b/autonomi/src/lib.rs index ef68ab79d7..aa95c6f648 100644 --- a/autonomi/src/lib.rs +++ b/autonomi/src/lib.rs @@ -10,12 +10,12 @@ //! //! # Example //! -//! ```rust +//! ```no_run //! use autonomi::{Bytes, Client, Wallet}; //! //! #[tokio::main] //! async fn main() -> Result<(), Box> { -//! let client = Client::connect(&["/ip4/127.0.0.1/udp/1234/quic-v1".parse()?]).await?; +//! let client = Client::init().await?; //! //! // Default wallet of testnet. //! let key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; @@ -26,7 +26,7 @@ //! let _data_fetched = client.data_get_public(data_addr).await?; //! //! // Put and fetch directory from local file system. -//! let dir_addr = client.dir_upload_public("files/to/upload".into(), &wallet).await?; +//! let dir_addr = client.dir_and_archive_upload_public("files/to/upload".into(), &wallet).await?; //! client.dir_download_public(dir_addr, "files/downloaded".into()).await?; //! //! Ok(()) diff --git a/autonomi/tests/evm/file.rs b/autonomi/tests/evm/file.rs index 3e2cbe0e5f..228efa1ed1 100644 --- a/autonomi/tests/evm/file.rs +++ b/autonomi/tests/evm/file.rs @@ -20,7 +20,7 @@ mod test { let _log_appender_guard = ant_logging::LogBuilder::init_single_threaded_tokio_test("file", false); - let mut client = Client::connect(&[]).await.unwrap(); + let mut client = Client::init_local().await?; let mut wallet = get_funded_wallet(); // let data = common::gen_random_data(1024 * 1024 * 1000); From c078c66da63fb0f453fd23984bae0178e7a5bd1f Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 14:11:22 +0100 Subject: [PATCH 20/43] ci: run autonomi doc test --- .github/workflows/merge.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 60faed6af6..95e456fb67 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -125,7 +125,11 @@ jobs: - name: Run autonomi tests timeout-minutes: 25 - run: cargo test --release --package autonomi --lib --features="full,fs" + run: cargo test --release --package autonomi --features full --lib + + - name: Run autonomi doc tests + timeout-minutes: 25 + run: cargo test --release --package autonomi --features full --doc - name: Run bootstrap tests timeout-minutes: 25 From e4f9fb9a0876ea59162931171baf5ce82dae28c2 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 14:19:22 +0100 Subject: [PATCH 21/43] fix(autonomi): fix WASM method impl --- autonomi/src/client/wasm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autonomi/src/client/wasm.rs b/autonomi/src/client/wasm.rs index 0f9a2ea802..5203c11c05 100644 --- a/autonomi/src/client/wasm.rs +++ b/autonomi/src/client/wasm.rs @@ -70,7 +70,7 @@ impl JsClient { .map(|peer| peer.parse()) .collect::, _>>()?; - let client = super::Client::connect(&peers).await?; + let client = super::Client::init_with_peers(peers).await?; Ok(JsClient(client)) } From 62805cb1ad18b653f7b4eb1f00e19ed7814f664a Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 14:29:29 +0100 Subject: [PATCH 22/43] test(autonomi): fix wasm test --- autonomi/tests/wasm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autonomi/tests/wasm.rs b/autonomi/tests/wasm.rs index efdc8d179e..d0531c0999 100644 --- a/autonomi/tests/wasm.rs +++ b/autonomi/tests/wasm.rs @@ -12,7 +12,7 @@ use std::time::Duration; use ant_networking::target_arch::sleep; use autonomi::Client; -use test_utils::{evm::get_funded_wallet, gen_random_data, peers_from_env}; +use test_utils::{evm::get_funded_wallet, gen_random_data}; use wasm_bindgen_test::*; wasm_bindgen_test_configure!(run_in_browser); @@ -21,7 +21,7 @@ wasm_bindgen_test_configure!(run_in_browser); async fn put() -> Result<(), Box> { enable_logging_wasm("ant-networking,autonomi,wasm"); - let client = Client::connect(&peers_from_env()?).await?; + let client = Client::init_local().await?; let wallet = get_funded_wallet(); let data = gen_random_data(1024 * 1024 * 10); From 039c8ba0602b978972e2277914f02a5c1d4ceefd Mon Sep 17 00:00:00 2001 From: Roland Sherwin Date: Mon, 16 Dec 2024 18:57:46 +0530 Subject: [PATCH 23/43] feat(launchpad): add network id arg for testing --- node-launchpad/src/app.rs | 23 ++++++++---- node-launchpad/src/bin/tui/main.rs | 47 +++++++++++++------------ node-launchpad/src/components/status.rs | 21 ++++++----- node-launchpad/src/node_mgmt.rs | 41 +++++++++++---------- 4 files changed, 77 insertions(+), 55 deletions(-) diff --git a/node-launchpad/src/app.rs b/node-launchpad/src/app.rs index 605c51efd3..7db62de89e 100644 --- a/node-launchpad/src/app.rs +++ b/node-launchpad/src/app.rs @@ -55,6 +55,7 @@ impl App { peers_args: PeersArgs, antnode_path: Option, app_data_path: Option, + network_id: Option, ) -> Result { // Configurations let app_data = AppData::load(app_data_path)?; @@ -93,6 +94,7 @@ impl App { allocated_disk_space: app_data.nodes_to_start, rewards_address: app_data.discord_username.clone(), peers_args, + network_id, antnode_path, data_dir_path, connection_mode, @@ -356,7 +358,7 @@ mod tests { let mut output = Cursor::new(Vec::new()); // Create and run the App, capturing its output - let app_result = App::new(60.0, 60.0, peers_args, None, Some(config_path)).await; + let app_result = App::new(60.0, 60.0, peers_args, None, Some(config_path), None).await; match app_result { Ok(app) => { @@ -417,7 +419,8 @@ mod tests { let mut output = Cursor::new(Vec::new()); // Create and run the App, capturing its output - let app_result = App::new(60.0, 60.0, peers_args, None, Some(test_app_data_path)).await; + let app_result = + App::new(60.0, 60.0, peers_args, None, Some(test_app_data_path), None).await; match app_result { Ok(app) => { @@ -472,8 +475,15 @@ mod tests { let mut output = Cursor::new(Vec::new()); // Create and run the App, capturing its output - let app_result = - App::new(60.0, 60.0, peers_args, None, Some(non_existent_config_path)).await; + let app_result = App::new( + 60.0, + 60.0, + peers_args, + None, + Some(non_existent_config_path), + None, + ) + .await; match app_result { Ok(app) => { @@ -535,7 +545,7 @@ mod tests { let peers_args = PeersArgs::default(); // Create and run the App, capturing its output - let app_result = App::new(60.0, 60.0, peers_args, None, Some(config_path)).await; + let app_result = App::new(60.0, 60.0, peers_args, None, Some(config_path), None).await; // Could be that the mountpoint doesn't exists // or that the user doesn't have permissions to access it @@ -576,7 +586,8 @@ mod tests { let peers_args = PeersArgs::default(); // Create and run the App - let app_result = App::new(60.0, 60.0, peers_args, None, Some(test_app_data_path)).await; + let app_result = + App::new(60.0, 60.0, peers_args, None, Some(test_app_data_path), None).await; match app_result { Ok(app) => { diff --git a/node-launchpad/src/bin/tui/main.rs b/node-launchpad/src/bin/tui/main.rs index 969e2c811a..46d733681d 100644 --- a/node-launchpad/src/bin/tui/main.rs +++ b/node-launchpad/src/bin/tui/main.rs @@ -26,42 +26,44 @@ use std::{env, path::PathBuf}; #[derive(Parser, Debug)] #[command(disable_version_flag = true)] pub struct Cli { - #[arg( - short, - long, - value_name = "FLOAT", - help = "Tick rate, i.e. number of ticks per second", - default_value_t = 1.0 - )] - pub tick_rate: f64, - - #[arg( - short, - long, - value_name = "FLOAT", - help = "Frame rate, i.e. number of frames per second", - default_value_t = 60.0 - )] - pub frame_rate: f64, - /// Provide a path for the antnode binary to be used by the service. /// /// Useful for creating the service using a custom built binary. #[clap(long)] antnode_path: Option, - #[command(flatten)] - pub(crate) peers: PeersArgs, - /// Print the crate version. #[clap(long)] crate_version: bool, + /// Specify the network ID to use. This will allow you to run the node on a different network. + /// + /// By default, the network ID is set to 1, which represents the mainnet. + #[clap(long, verbatim_doc_comment)] + network_id: Option, + + /// Frame rate, i.e. number of frames per second + #[arg(short, long, value_name = "FLOAT", default_value_t = 60.0)] + frame_rate: f64, + + /// Provide a path for the antnode binary to be used by the service. + /// + /// Useful for creating the service using a custom built binary. + #[clap(long)] + path: Option, + + #[command(flatten)] + peers: PeersArgs, + /// Print the package version. #[clap(long)] #[cfg(not(feature = "nightly"))] package_version: bool, + /// Tick rate, i.e. number of ticks per second + #[arg(short, long, value_name = "FLOAT", default_value_t = 1.0)] + tick_rate: f64, + /// Print the version. #[clap(long)] version: bool, @@ -129,7 +131,8 @@ async fn main() -> Result<()> { args.frame_rate, args.peers, args.antnode_path, - None, + args.path, + args.network_id, ) .await?; app.run().await?; diff --git a/node-launchpad/src/components/status.rs b/node-launchpad/src/components/status.rs index 1899bbd9bc..5ce84cf6fc 100644 --- a/node-launchpad/src/components/status.rs +++ b/node-launchpad/src/components/status.rs @@ -83,6 +83,8 @@ pub struct Status<'a> { // Nodes node_services: Vec, items: Option>>, + /// To pass into node services. + network_id: Option, // Node Management node_management: NodeManagement, // Amount of nodes @@ -117,13 +119,14 @@ pub enum LockRegistryState { pub struct StatusConfig { pub allocated_disk_space: usize, - pub rewards_address: String, - pub peers_args: PeersArgs, pub antnode_path: Option, - pub data_dir_path: PathBuf, pub connection_mode: ConnectionMode, + pub data_dir_path: PathBuf, + pub network_id: Option, + pub peers_args: PeersArgs, pub port_from: Option, pub port_to: Option, + pub rewards_address: String, } impl Status<'_> { @@ -135,6 +138,7 @@ impl Status<'_> { active: true, is_nat_status_determined: false, error_while_running_nat_detection: 0, + network_id: config.network_id, node_stats: NodeStats::default(), node_stats_last_update: Instant::now(), node_services: Default::default(), @@ -614,16 +618,17 @@ impl Component for Status<'_> { let action_sender = self.get_actions_sender()?; let maintain_nodes_args = MaintainNodesArgs { + action_sender: action_sender.clone(), + antnode_path: self.antnode_path.clone(), + connection_mode: self.connection_mode, count: self.nodes_to_start as u16, + data_dir_path: Some(self.data_dir_path.clone()), + network_id: self.network_id, owner: self.rewards_address.clone(), peers_args: self.peers_args.clone(), - run_nat_detection: self.should_we_run_nat_detection(), - antnode_path: self.antnode_path.clone(), - data_dir_path: Some(self.data_dir_path.clone()), - action_sender: action_sender.clone(), - connection_mode: self.connection_mode, port_range: Some(port_range), rewards_address: self.rewards_address.clone(), + run_nat_detection: self.should_we_run_nat_detection(), }; debug!("Calling maintain_n_running_nodes"); diff --git a/node-launchpad/src/node_mgmt.rs b/node-launchpad/src/node_mgmt.rs index 735f049fea..18780b4f2b 100644 --- a/node-launchpad/src/node_mgmt.rs +++ b/node-launchpad/src/node_mgmt.rs @@ -122,16 +122,17 @@ async fn stop_nodes(services: Vec, action_sender: UnboundedSender, + pub antnode_path: Option, + pub connection_mode: ConnectionMode, pub count: u16, + pub data_dir_path: Option, + pub network_id: Option, pub owner: String, pub peers_args: PeersArgs, - pub run_nat_detection: bool, - pub antnode_path: Option, - pub data_dir_path: Option, - pub action_sender: UnboundedSender, - pub connection_mode: ConnectionMode, pub port_range: Option, pub rewards_address: String, + pub run_nat_detection: bool, } /// Maintain the specified number of nodes @@ -289,16 +290,17 @@ async fn load_node_registry( } struct NodeConfig { + antnode_path: Option, auto_set_nat_flags: bool, - upnp: bool, - home_network: bool, - custom_ports: Option, - owner: Option, count: u16, + custom_ports: Option, data_dir_path: Option, + home_network: bool, + network_id: Option, + owner: Option, peers_args: PeersArgs, - antnode_path: Option, rewards_address: String, + upnp: bool, } /// Run the NAT detection process @@ -344,9 +346,10 @@ async fn run_nat_detection(action_sender: &UnboundedSender) { fn prepare_node_config(args: &MaintainNodesArgs) -> NodeConfig { NodeConfig { + antnode_path: args.antnode_path.clone(), auto_set_nat_flags: args.connection_mode == ConnectionMode::Automatic, - upnp: args.connection_mode == ConnectionMode::UPnP, - home_network: args.connection_mode == ConnectionMode::HomeNetwork, + data_dir_path: args.data_dir_path.clone(), + count: args.count, custom_ports: if args.connection_mode == ConnectionMode::CustomPorts { args.port_range.clone() } else { @@ -357,11 +360,11 @@ fn prepare_node_config(args: &MaintainNodesArgs) -> NodeConfig { } else { Some(args.owner.clone()) }, - count: args.count, - data_dir_path: args.data_dir_path.clone(), + home_network: args.connection_mode == ConnectionMode::HomeNetwork, + network_id: args.network_id, peers_args: args.peers_args.clone(), - antnode_path: args.antnode_path.clone(), rewards_address: args.rewards_address.clone(), + upnp: args.connection_mode == ConnectionMode::UPnP, } } @@ -373,8 +376,8 @@ fn debug_log_config(config: &NodeConfig, args: &MaintainNodesArgs) { config.count ); debug!( - " owner: {:?}, peers_args: {:?}, antnode_path: {:?}", - config.owner, config.peers_args, config.antnode_path + " owner: {:?}, peers_args: {:?}, antnode_path: {:?}, network_id: {:?}", + config.owner, config.peers_args, config.antnode_path, args.network_id ); debug!( " data_dir_path: {:?}, connection_mode: {:?}", @@ -423,7 +426,7 @@ async fn scale_down_nodes(config: &NodeConfig, count: u16) { None, None, None, - None, + config.network_id, None, None, // We don't care about the port, as we are scaling down config.owner.clone(), @@ -497,7 +500,7 @@ async fn add_nodes( None, None, None, - None, + config.network_id, None, port_range, config.owner.clone(), From d77e31c966a8d301b36a68cbd0e7542c94d152c2 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 16:49:10 +0100 Subject: [PATCH 24/43] refactor(autonomi): deprecate registers --- ant-cli/src/commands/register.rs | 2 ++ ant-node/tests/data_with_churn.rs | 3 +++ ant-node/tests/verify_data_location.rs | 3 +++ autonomi/README.md | 4 ++++ autonomi/src/client/registers.rs | 10 ++++++++++ autonomi/tests/register.rs | 1 + 6 files changed, 23 insertions(+) diff --git a/ant-cli/src/commands/register.rs b/ant-cli/src/commands/register.rs index 17c30b2559..5598fc0544 100644 --- a/ant-cli/src/commands/register.rs +++ b/ant-cli/src/commands/register.rs @@ -6,6 +6,8 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. +#![allow(deprecated)] + use crate::utils::collect_upload_summary; use crate::wallet::load_wallet; use autonomi::client::registers::RegisterAddress; diff --git a/ant-node/tests/data_with_churn.rs b/ant-node/tests/data_with_churn.rs index 4112863140..87261779c4 100644 --- a/ant-node/tests/data_with_churn.rs +++ b/ant-node/tests/data_with_churn.rs @@ -6,6 +6,9 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. +// TODO: Remove this once the registers are removed +#![expect(deprecated)] + mod common; use crate::common::{ diff --git a/ant-node/tests/verify_data_location.rs b/ant-node/tests/verify_data_location.rs index a15a0e18be..e8e2c6938a 100644 --- a/ant-node/tests/verify_data_location.rs +++ b/ant-node/tests/verify_data_location.rs @@ -6,7 +6,10 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. +// TODO: Remove this once the registers are removed +#![expect(deprecated)] #![allow(clippy::mutable_key_type)] + mod common; use ant_logging::LogBuilder; diff --git a/autonomi/README.md b/autonomi/README.md index 63235554a1..8f8180e80e 100644 --- a/autonomi/README.md +++ b/autonomi/README.md @@ -51,6 +51,10 @@ let wallet = Wallet::new_from_private_key(EvmNetwork::ArbitrumSepolia, key)?; let wallet = Wallet::new_from_private_key(EvmNetwork::new_custom("", "", ""), key)?; ``` +# Registers + +Registers are deprecated and planned to be replaced by transactions and pointers. Currently, transactions can already be used. For example usage, see [the transaction test](tests/transaction.rs). Pointers are not yet implemented, but will follow soon. + ## Running tests To run the tests, we can run a local network: diff --git a/autonomi/src/client/registers.rs b/autonomi/src/client/registers.rs index d2ae5f203a..dc56e37b45 100644 --- a/autonomi/src/client/registers.rs +++ b/autonomi/src/client/registers.rs @@ -6,6 +6,8 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. +#![allow(deprecated)] + use crate::client::data::PayError; use crate::client::Client; use crate::client::ClientEvent; @@ -53,6 +55,10 @@ pub enum RegisterError { PayeesMissing, } +#[deprecated( + since = "0.2.4", + note = "Use transactions instead (see Client::transaction_put)" +)] #[derive(Clone, Debug)] pub struct Register { signed_reg: SignedRegister, @@ -122,6 +128,10 @@ impl Register { } } +#[deprecated( + since = "0.2.4", + note = "Use transactions instead (see Client::transaction_put)" +)] impl Client { /// Generate a new register key pub fn register_generate_key() -> RegisterSecretKey { diff --git a/autonomi/tests/register.rs b/autonomi/tests/register.rs index e698809d46..862b4896e6 100644 --- a/autonomi/tests/register.rs +++ b/autonomi/tests/register.rs @@ -7,6 +7,7 @@ // permissions and limitations relating to use of the SAFE Network Software. #![cfg(feature = "registers")] +#![allow(deprecated)] use ant_logging::LogBuilder; use autonomi::Client; From 94aaef34f2e1281343dd460d045e003c607562b0 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 15:14:15 +0100 Subject: [PATCH 25/43] docs(autonomi): move python examples; change README --- autonomi/README.md | 8 ++ .../examples/autonomi_advanced.py | 0 .../examples/autonomi_data_registers.py | 0 .../{ => python}/examples/autonomi_example.py | 0 .../examples/autonomi_private_data.py | 0 .../examples/autonomi_private_encryption.py | 0 .../{ => python}/examples/autonomi_vault.py | 0 autonomi/{ => python}/examples/basic.py | 0 autonomi/src/client/data_private.rs | 130 ------------------ 9 files changed, 8 insertions(+), 130 deletions(-) rename autonomi/{ => python}/examples/autonomi_advanced.py (100%) rename autonomi/{ => python}/examples/autonomi_data_registers.py (100%) rename autonomi/{ => python}/examples/autonomi_example.py (100%) rename autonomi/{ => python}/examples/autonomi_private_data.py (100%) rename autonomi/{ => python}/examples/autonomi_private_encryption.py (100%) rename autonomi/{ => python}/examples/autonomi_vault.py (100%) rename autonomi/{ => python}/examples/basic.py (100%) delete mode 100644 autonomi/src/client/data_private.rs diff --git a/autonomi/README.md b/autonomi/README.md index b3ca14d86c..de2dc15dcf 100644 --- a/autonomi/README.md +++ b/autonomi/README.md @@ -130,3 +130,11 @@ Chunk payments address: 0x8464135c8F25Da09e49BC8782676a84730C318bC Deployer wallet private key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 Genesis wallet balance: (tokens: 20000000000000000000000000, gas: 9998998011366954730202) ``` + +# WASM + +For documentation on WASM, see [./README_WASM.md]. + +# Python + +For documentation on the Python bindings, see [./README_PYTHON.md]. diff --git a/autonomi/examples/autonomi_advanced.py b/autonomi/python/examples/autonomi_advanced.py similarity index 100% rename from autonomi/examples/autonomi_advanced.py rename to autonomi/python/examples/autonomi_advanced.py diff --git a/autonomi/examples/autonomi_data_registers.py b/autonomi/python/examples/autonomi_data_registers.py similarity index 100% rename from autonomi/examples/autonomi_data_registers.py rename to autonomi/python/examples/autonomi_data_registers.py diff --git a/autonomi/examples/autonomi_example.py b/autonomi/python/examples/autonomi_example.py similarity index 100% rename from autonomi/examples/autonomi_example.py rename to autonomi/python/examples/autonomi_example.py diff --git a/autonomi/examples/autonomi_private_data.py b/autonomi/python/examples/autonomi_private_data.py similarity index 100% rename from autonomi/examples/autonomi_private_data.py rename to autonomi/python/examples/autonomi_private_data.py diff --git a/autonomi/examples/autonomi_private_encryption.py b/autonomi/python/examples/autonomi_private_encryption.py similarity index 100% rename from autonomi/examples/autonomi_private_encryption.py rename to autonomi/python/examples/autonomi_private_encryption.py diff --git a/autonomi/examples/autonomi_vault.py b/autonomi/python/examples/autonomi_vault.py similarity index 100% rename from autonomi/examples/autonomi_vault.py rename to autonomi/python/examples/autonomi_vault.py diff --git a/autonomi/examples/basic.py b/autonomi/python/examples/basic.py similarity index 100% rename from autonomi/examples/basic.py rename to autonomi/python/examples/basic.py diff --git a/autonomi/src/client/data_private.rs b/autonomi/src/client/data_private.rs deleted file mode 100644 index d1288bb193..0000000000 --- a/autonomi/src/client/data_private.rs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2024 MaidSafe.net limited. -// -// This SAFE Network Software is licensed to you under The General Public License (GPL), version 3. -// Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed -// under the GPL Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. Please review the Licences for the specific language governing -// permissions and limitations relating to use of the SAFE Network Software. - -use std::hash::{DefaultHasher, Hash, Hasher}; - -use ant_evm::Amount; -use ant_protocol::storage::Chunk; -use bytes::Bytes; -use serde::{Deserialize, Serialize}; - -use super::data::{GetError, PutError}; -use crate::client::payment::PaymentOption; -use crate::client::{ClientEvent, UploadSummary}; -use crate::{self_encryption::encrypt, Client}; - -/// Private data on the network can be accessed with this -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub struct PrivateDataAccess(Chunk); - -impl PrivateDataAccess { - pub fn to_hex(&self) -> String { - hex::encode(self.0.value()) - } - - pub fn from_hex(hex: &str) -> Result { - let data = hex::decode(hex)?; - Ok(Self(Chunk::new(Bytes::from(data)))) - } - - /// Get a private address for [`PrivateDataAccess`]. Note that this is not a network address, it is only used for refering to private data client side. - pub fn address(&self) -> String { - hash_to_short_string(&self.to_hex()) - } -} - -fn hash_to_short_string(input: &str) -> String { - let mut hasher = DefaultHasher::new(); - input.hash(&mut hasher); - let hash_value = hasher.finish(); - hash_value.to_string() -} - -impl Client { - /// Fetch a blob of private data from the network - pub async fn private_data_get(&self, data_map: PrivateDataAccess) -> Result { - info!( - "Fetching private data from Data Map {:?}", - data_map.0.address() - ); - let data = self.fetch_from_data_map_chunk(data_map.0.value()).await?; - - Ok(data) - } - - /// Upload a piece of private data to the network. This data will be self-encrypted. - /// Returns the [`PrivateDataAccess`] containing the map to the encrypted chunks. - /// This data is private and only accessible with the [`PrivateDataAccess`]. - pub async fn private_data_put( - &self, - data: Bytes, - payment_option: PaymentOption, - ) -> Result { - let now = ant_networking::target_arch::Instant::now(); - let (data_map_chunk, chunks) = encrypt(data)?; - debug!("Encryption took: {:.2?}", now.elapsed()); - - // Pay for all chunks - let xor_names: Vec<_> = chunks.iter().map(|chunk| *chunk.name()).collect(); - info!("Paying for {} addresses", xor_names.len()); - let receipt = self - .pay_for_content_addrs(xor_names.into_iter(), payment_option) - .await - .inspect_err(|err| error!("Error paying for data: {err:?}"))?; - - // Upload the chunks with the payments - debug!("Uploading {} chunks", chunks.len()); - - let mut failed_uploads = self - .upload_chunks_with_retries(chunks.iter().collect(), &receipt) - .await; - - // Return the last chunk upload error - if let Some(last_chunk_fail) = failed_uploads.pop() { - tracing::error!( - "Error uploading chunk ({:?}): {:?}", - last_chunk_fail.0.address(), - last_chunk_fail.1 - ); - return Err(last_chunk_fail.1); - } - - let record_count = chunks.len(); - - // Reporting - if let Some(channel) = self.client_event_sender.as_ref() { - let tokens_spent = receipt - .values() - .map(|(_proof, price)| price.as_atto()) - .sum::(); - - let summary = UploadSummary { - record_count, - tokens_spent, - }; - if let Err(err) = channel.send(ClientEvent::UploadComplete(summary)).await { - error!("Failed to send client event: {err:?}"); - } - } - - Ok(PrivateDataAccess(data_map_chunk)) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_hex() { - let data_map = PrivateDataAccess(Chunk::new(Bytes::from_static(b"hello"))); - let hex = data_map.to_hex(); - let data_map2 = PrivateDataAccess::from_hex(&hex).expect("Failed to decode hex"); - assert_eq!(data_map, data_map2); - } -} From ed24563c4a65483c49627137d3f46a5a48cd35b5 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 15:15:11 +0100 Subject: [PATCH 26/43] feat(autonomi): borrow archive instead of clone --- autonomi/src/client/files/archive.rs | 6 +++--- autonomi/src/client/files/archive_public.rs | 8 ++++---- autonomi/src/client/files/fs.rs | 2 +- autonomi/src/client/files/fs_public.rs | 2 +- autonomi/tests/external_signer.rs | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/autonomi/src/client/files/archive.rs b/autonomi/src/client/files/archive.rs index 58f0788059..8aebc1df85 100644 --- a/autonomi/src/client/files/archive.rs +++ b/autonomi/src/client/files/archive.rs @@ -142,7 +142,7 @@ impl PrivateArchive { } /// Serialize to bytes. - pub fn into_bytes(&self) -> Result { + pub fn to_bytes(&self) -> Result { let root_serialized = rmp_serde::to_vec(&self)?; let root_serialized = Bytes::from(root_serialized); @@ -163,11 +163,11 @@ impl Client { /// Upload a [`PrivateArchive`] to the network pub async fn archive_put( &self, - archive: PrivateArchive, + archive: &PrivateArchive, payment_option: PaymentOption, ) -> Result { let bytes = archive - .into_bytes() + .to_bytes() .map_err(|e| PutError::Serialization(format!("Failed to serialize archive: {e:?}")))?; let result = self.data_put(bytes, payment_option).await; debug!("Uploaded private archive {archive:?} to the network and address is {result:?}"); diff --git a/autonomi/src/client/files/archive_public.rs b/autonomi/src/client/files/archive_public.rs index 54121ae919..0cb6cf2127 100644 --- a/autonomi/src/client/files/archive_public.rs +++ b/autonomi/src/client/files/archive_public.rs @@ -104,7 +104,7 @@ impl PublicArchive { } /// Serialize to bytes. - pub fn into_bytes(&self) -> Result { + pub fn to_bytes(&self) -> Result { let root_serialized = rmp_serde::to_vec(&self)?; let root_serialized = Bytes::from(root_serialized); @@ -152,11 +152,11 @@ impl Client { /// ``` pub async fn archive_put_public( &self, - archive: PublicArchive, + archive: &PublicArchive, wallet: &EvmWallet, ) -> Result { let bytes = archive - .into_bytes() + .to_bytes() .map_err(|e| PutError::Serialization(format!("Failed to serialize archive: {e:?}")))?; let result = self.data_put_public(bytes, wallet.into()).await; debug!("Uploaded archive {archive:?} to the network and the address is {result:?}"); @@ -166,7 +166,7 @@ impl Client { /// Get the cost to upload an archive pub async fn archive_cost(&self, archive: PublicArchive) -> Result { let bytes = archive - .into_bytes() + .to_bytes() .map_err(|e| CostError::Serialization(format!("Failed to serialize archive: {e:?}")))?; let result = self.data_cost(bytes).await; debug!("Calculated the cost to upload archive {archive:?} is {result:?}"); diff --git a/autonomi/src/client/files/fs.rs b/autonomi/src/client/files/fs.rs index 0d41f0744d..2428f2d344 100644 --- a/autonomi/src/client/files/fs.rs +++ b/autonomi/src/client/files/fs.rs @@ -173,7 +173,7 @@ impl Client { wallet: &EvmWallet, ) -> Result { let archive = self.dir_upload(dir_path, wallet).await?; - let archive_addr = self.archive_put(archive, wallet.into()).await?; + let archive_addr = self.archive_put(&archive, wallet.into()).await?; Ok(archive_addr) } diff --git a/autonomi/src/client/files/fs_public.rs b/autonomi/src/client/files/fs_public.rs index 52e79c300a..a35cce82f2 100644 --- a/autonomi/src/client/files/fs_public.rs +++ b/autonomi/src/client/files/fs_public.rs @@ -118,7 +118,7 @@ impl Client { wallet: &EvmWallet, ) -> Result { let archive = self.dir_upload_public(dir_path, wallet).await?; - let archive_addr = self.archive_put_public(archive, wallet).await?; + let archive_addr = self.archive_put_public(&archive, wallet).await?; Ok(archive_addr) } diff --git a/autonomi/tests/external_signer.rs b/autonomi/tests/external_signer.rs index 9cc15c0a69..755a1cac8f 100644 --- a/autonomi/tests/external_signer.rs +++ b/autonomi/tests/external_signer.rs @@ -120,13 +120,13 @@ async fn external_signer_put() -> eyre::Result<()> { Metadata::new_with_size(data.len() as u64), ); - let archive_serialized = private_archive.into_bytes()?; + let archive_serialized = private_archive.to_bytes()?; let receipt = pay_for_data(&client, &wallet, archive_serialized.clone()).await?; sleep(Duration::from_secs(5)).await; - let private_archive_access = client.archive_put(private_archive, receipt.into()).await?; + let private_archive_access = client.archive_put(&private_archive, receipt.into()).await?; let vault_key = VaultSecretKey::random(); From eaf033d1d2294db308fafb8ce24f17c3ff90fadf Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 16:19:55 +0100 Subject: [PATCH 27/43] refactor(autonomi): add docs; expose types; local Use `local` if feature is enabled --- .github/workflows/merge.yml | 4 +-- autonomi/Cargo.toml | 6 +++- autonomi/examples/data_and_archive.rs | 37 +++++++++++++++++++++ autonomi/examples/put_and_dir_upload.rs | 14 +++++--- autonomi/src/client/data/mod.rs | 29 ++++++++++++++++ autonomi/src/client/files/archive_public.rs | 2 +- autonomi/src/client/mod.rs | 17 ++++++++-- autonomi/src/lib.rs | 2 +- autonomi/tests/fs.rs | 7 +--- 9 files changed, 100 insertions(+), 18 deletions(-) create mode 100644 autonomi/examples/data_and_archive.rs diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 95e456fb67..1d59de2431 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -125,11 +125,11 @@ jobs: - name: Run autonomi tests timeout-minutes: 25 - run: cargo test --release --package autonomi --features full --lib + run: cargo test --release --package autonomi --features full,local --lib - name: Run autonomi doc tests timeout-minutes: 25 - run: cargo test --release --package autonomi --features full --doc + run: cargo test --release --package autonomi --features full,local --doc - name: Run bootstrap tests timeout-minutes: 25 diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index d7c424d822..32692f8ca2 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -13,9 +13,13 @@ repository = "https://github.com/maidsafe/autonomi" name = "autonomi" crate-type = ["cdylib", "rlib"] +[[example]] +name = "data_and_archive" +required-features = ["full"] + [[example]] name = "put_and_dir_upload" -features = ["full"] +required-features = ["full"] [features] default = ["vault"] diff --git a/autonomi/examples/data_and_archive.rs b/autonomi/examples/data_and_archive.rs new file mode 100644 index 0000000000..07fddd560f --- /dev/null +++ b/autonomi/examples/data_and_archive.rs @@ -0,0 +1,37 @@ +use autonomi::{Bytes, Client, Metadata, PrivateArchive}; +use test_utils::evm::get_funded_wallet; +use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; + +#[tokio::main] +async fn main() -> eyre::Result<()> { + tracing_subscriber::registry() + .with(fmt::layer()) + .with(EnvFilter::from_env("RUST_LOG")) + .init(); + + let client = Client::init().await?; + let wallet = get_funded_wallet(); + + // Upload 10MiB of random data and verify it by fetching it back. + let data = Bytes::from("Hello, World!"); + let data_map = client.data_put(data.clone(), (&wallet).into()).await?; + let data_fetched = client.data_get(data_map.clone()).await?; + assert_eq!(data, data_fetched); + + // Upload the data as part of an archive, giving it the name `test.txt`. + let mut archive = PrivateArchive::new(); + archive.add_file( + "test.txt".into(), + data_map, + Metadata::new_with_size(data.len() as u64), + ); + + // Upload the archive to the network. + let archive_data_map = client.archive_put(&archive, (&wallet).into()).await?; + let archive_fetched = client.archive_get(archive_data_map).await?; + assert_eq!(archive, archive_fetched); + + println!("Archive uploaded successfully"); + + Ok(()) +} diff --git a/autonomi/examples/put_and_dir_upload.rs b/autonomi/examples/put_and_dir_upload.rs index 9b6d7a6a47..4af5e20b11 100644 --- a/autonomi/examples/put_and_dir_upload.rs +++ b/autonomi/examples/put_and_dir_upload.rs @@ -1,12 +1,16 @@ -use autonomi::{Bytes, Client, Wallet}; +use autonomi::{Bytes, Client}; +use test_utils::evm::get_funded_wallet; +use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; #[tokio::main] async fn main() -> Result<(), Box> { - // Default wallet of testnet. - let key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; + tracing_subscriber::registry() + .with(fmt::layer()) + .with(EnvFilter::from_env("RUST_LOG")) + .init(); - let client = Client::init_local().await?; - let wallet = Wallet::new_from_private_key(Default::default(), key)?; + let client = Client::init().await?; + let wallet = get_funded_wallet(); // Put and fetch data. let data_addr = client diff --git a/autonomi/src/client/data/mod.rs b/autonomi/src/client/data/mod.rs index e1967f0c95..f1b35083b4 100644 --- a/autonomi/src/client/data/mod.rs +++ b/autonomi/src/client/data/mod.rs @@ -160,6 +160,19 @@ fn hash_to_short_string(input: &str) -> String { impl Client { /// Fetch a blob of (private) data from the network + /// + /// # Example + /// + /// ```no_run + /// use autonomi::{Client, Bytes}; + /// # #[tokio::main] + /// # async fn main() -> Result<(), Box> { + /// # let client = Client::connect(&[]).await?; + /// # let data_map = todo!(); + /// let data_fetched = client.data_get(data_map).await?; + /// # Ok(()) + /// # } + /// ``` pub async fn data_get(&self, data_map: DataMapChunk) -> Result { info!( "Fetching private data from Data Map {:?}", @@ -175,6 +188,22 @@ impl Client { /// The [`DataMapChunk`] is not uploaded to the network, keeping the data private. /// /// Returns the [`DataMapChunk`] containing the map to the encrypted chunks. + /// + /// # Example + /// + /// ```no_run + /// use autonomi::{Client, Bytes}; + /// # #[tokio::main] + /// # async fn main() -> Result<(), Box> { + /// # let client = Client::connect(&[]).await?; + /// # let wallet = todo!(); + /// let data = Bytes::from("Hello, World"); + /// let data_map = client.data_put(data, wallet).await?; + /// let data_fetched = client.data_get(data_map).await?; + /// assert_eq!(data, data_fetched); + /// # Ok(()) + /// # } + /// ``` pub async fn data_put( &self, data: Bytes, diff --git a/autonomi/src/client/files/archive_public.rs b/autonomi/src/client/files/archive_public.rs index 0cb6cf2127..f4b487747f 100644 --- a/autonomi/src/client/files/archive_public.rs +++ b/autonomi/src/client/files/archive_public.rs @@ -146,7 +146,7 @@ impl Client { /// # let wallet = todo!(); /// let mut archive = PublicArchive::new(); /// archive.add_file(PathBuf::from("file.txt"), DataAddr::random(&mut rand::thread_rng()), Metadata::new_with_size(0)); - /// let address = client.archive_put_public(archive, &wallet).await?; + /// let address = client.archive_put_public(&archive, &wallet).await?; /// # Ok(()) /// # } /// ``` diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index 88c181f02d..9f315ce765 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -36,7 +36,6 @@ mod utils; use ant_bootstrap::{BootstrapCacheConfig, BootstrapCacheStore, PeersArgs}; pub use ant_evm::Amount; - use ant_evm::EvmNetwork; use ant_networking::{interval, multiaddr_is_global, Network, NetworkBuilder, NetworkEvent}; use ant_protocol::version::IDENTIFY_PROTOCOL_STR; @@ -74,9 +73,11 @@ pub struct Client { } /// Configuration for [`Client::init_with_config`]. -#[derive(Debug, Clone, Default)] +#[derive(Debug, Clone)] pub struct ClientConfig { /// Whether we're expected to connect to a local network. + /// + /// If `local` feature is enabled, [`ClientConfig::default()`] will set this to `true`. pub local: bool, /// List of peers to connect to. @@ -85,6 +86,18 @@ pub struct ClientConfig { pub peers: Option>, } +impl Default for ClientConfig { + fn default() -> Self { + Self { + #[cfg(feature = "local")] + local: true, + #[cfg(not(feature = "local"))] + local: false, + peers: None, + } + } +} + /// Error returned by [`Client::connect`]. #[derive(Debug, thiserror::Error)] pub enum ConnectError { diff --git a/autonomi/src/lib.rs b/autonomi/src/lib.rs index aa95c6f648..81ff866006 100644 --- a/autonomi/src/lib.rs +++ b/autonomi/src/lib.rs @@ -76,7 +76,7 @@ pub use bytes::Bytes; pub use libp2p::Multiaddr; #[doc(inline)] -pub use client::{files::archive::PrivateArchive, Client, ClientConfig}; +pub use client::{files::archive::Metadata, files::archive::PrivateArchive, Client, ClientConfig}; #[cfg(feature = "extension-module")] mod python; diff --git a/autonomi/tests/fs.rs b/autonomi/tests/fs.rs index 941d49cb84..926baeb4fd 100644 --- a/autonomi/tests/fs.rs +++ b/autonomi/tests/fs.rs @@ -93,12 +93,7 @@ async fn file_into_vault() -> Result<()> { let archive = client.archive_get_public(addr).await?; let set_version = 0; client - .write_bytes_to_vault( - archive.into_bytes()?, - wallet.into(), - &client_sk, - set_version, - ) + .write_bytes_to_vault(archive.to_bytes()?, wallet.into(), &client_sk, set_version) .await?; // now assert over the stored account packet From 82c0369ff7adddd34e3d7249d54e36e067d72940 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 16:31:03 +0100 Subject: [PATCH 28/43] fix(autonomi): fix archive borrow in WASM --- autonomi/src/client/wasm.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/autonomi/src/client/wasm.rs b/autonomi/src/client/wasm.rs index 5203c11c05..ce49ba83d2 100644 --- a/autonomi/src/client/wasm.rs +++ b/autonomi/src/client/wasm.rs @@ -263,10 +263,7 @@ mod archive { archive: &JsArchive, wallet: &JsWallet, ) -> Result { - let addr = self - .0 - .archive_put_public(archive.0.clone(), &wallet.0) - .await?; + let addr = self.0.archive_put_public(&archive.0, &wallet.0).await?; Ok(addr_to_str(addr)) } @@ -348,10 +345,7 @@ mod archive_private { archive: &JsPrivateArchive, wallet: &JsWallet, ) -> Result { - let private_archive_access = self - .0 - .archive_put(archive.0.clone(), (&wallet.0).into()) - .await?; + let private_archive_access = self.0.archive_put(&archive.0, (&wallet.0).into()).await?; let js_value = serde_wasm_bindgen::to_value(&private_archive_access)?; @@ -370,10 +364,7 @@ mod archive_private { ) -> Result { let receipt: Receipt = serde_wasm_bindgen::from_value(receipt)?; - let private_archive_access = self - .0 - .archive_put(archive.0.clone(), receipt.into()) - .await?; + let private_archive_access = self.0.archive_put(&archive.0, receipt.into()).await?; let js_value = serde_wasm_bindgen::to_value(&private_archive_access)?; From a2da9bb747b216a8e47919e5c3b78c8523609533 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 16 Dec 2024 17:08:23 +0100 Subject: [PATCH 29/43] docs(autonomi): replace with init in doctest --- autonomi/src/client/data/mod.rs | 4 ++-- autonomi/src/client/mod.rs | 2 +- autonomi/tests/evm/file.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autonomi/src/client/data/mod.rs b/autonomi/src/client/data/mod.rs index f1b35083b4..e64c6872e4 100644 --- a/autonomi/src/client/data/mod.rs +++ b/autonomi/src/client/data/mod.rs @@ -167,7 +167,7 @@ impl Client { /// use autonomi::{Client, Bytes}; /// # #[tokio::main] /// # async fn main() -> Result<(), Box> { - /// # let client = Client::connect(&[]).await?; + /// # let client = Client::init().await?; /// # let data_map = todo!(); /// let data_fetched = client.data_get(data_map).await?; /// # Ok(()) @@ -195,7 +195,7 @@ impl Client { /// use autonomi::{Client, Bytes}; /// # #[tokio::main] /// # async fn main() -> Result<(), Box> { - /// # let client = Client::connect(&[]).await?; + /// # let client = Client::init().await?; /// # let wallet = todo!(); /// let data = Bytes::from("Hello, World"); /// let data_map = client.data_put(data, wallet).await?; diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index 9f315ce765..f245833b91 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -98,7 +98,7 @@ impl Default for ClientConfig { } } -/// Error returned by [`Client::connect`]. +/// Error returned by [`Client::init`]. #[derive(Debug, thiserror::Error)] pub enum ConnectError { /// Did not manage to populate the routing table with enough peers. diff --git a/autonomi/tests/evm/file.rs b/autonomi/tests/evm/file.rs index 228efa1ed1..0c2aff9fe6 100644 --- a/autonomi/tests/evm/file.rs +++ b/autonomi/tests/evm/file.rs @@ -47,7 +47,7 @@ mod test { async fn file_into_vault() -> eyre::Result<()> { common::enable_logging(); - let mut client = Client::connect(&[]) + let mut client = Client::init() .await? .with_vault_entropy(Bytes::from("at least 32 bytes of entropy here"))?; @@ -66,7 +66,7 @@ mod test { ); // now assert over the stored account packet - let new_client = Client::connect(&[]) + let new_client = Client::init() .await? .with_vault_entropy(Bytes::from("at least 32 bytes of entropy here"))?; From f2b3cf7afb62013513ab00f4c2586f49b890514c Mon Sep 17 00:00:00 2001 From: Roland Sherwin Date: Mon, 16 Dec 2024 19:11:50 +0530 Subject: [PATCH 30/43] chore(ci): add launchpad tests to ci --- .github/workflows/merge.yml | 4 ++++ .github/workflows/nightly.yml | 4 ++++ node-launchpad/src/app.rs | 14 +++++--------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 60faed6af6..d426b66cd5 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -134,6 +134,10 @@ jobs: - name: Run node tests timeout-minutes: 25 run: cargo test --release --package ant-node --lib + + - name: Run launchpad tests + timeout-minutes: 25 + run: cargo test --release --package node-launchpad # The `can_store_after_restart` can be executed with other package tests together and passing # on local machine. However keeps failing (when executed together) on CI machines. diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 23a9b78f99..8b4cc22cce 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -252,6 +252,10 @@ jobs: timeout-minutes: 25 run: cargo test --release --package ant-bootstrap + - name: Run launchpad tests + timeout-minutes: 25 + run: cargo test --release --package node-launchpad + - name: Run node tests timeout-minutes: 25 run: cargo test --release --package ant-node --lib diff --git a/node-launchpad/src/app.rs b/node-launchpad/src/app.rs index 7db62de89e..457ba41f6d 100644 --- a/node-launchpad/src/app.rs +++ b/node-launchpad/src/app.rs @@ -321,6 +321,7 @@ mod tests { use super::*; use ant_bootstrap::PeersArgs; use color_eyre::eyre::Result; + use serde_json::json; use std::io::Cursor; use std::io::Write; use tempfile::tempdir; @@ -333,22 +334,17 @@ mod tests { let mountpoint = get_primary_mount_point(); - // Create a valid configuration file with all fields - let valid_config = format!( - r#" - {{ + let config = json!({ "discord_username": "happy_user", "nodes_to_start": 5, - "storage_mountpoint": "{}", + "storage_mountpoint": mountpoint.display().to_string(), "storage_drive": "C:", "connection_mode": "Automatic", "port_from": 12000, "port_to": 13000 - }} - "#, - mountpoint.display() - ); + }); + let valid_config = serde_json::to_string_pretty(&config)?; std::fs::write(&config_path, valid_config)?; // Create default PeersArgs From 157239eba38f0e081a8ba01a0a63e2fe41fe2951 Mon Sep 17 00:00:00 2001 From: qima Date: Sun, 15 Dec 2024 21:32:45 +0800 Subject: [PATCH 31/43] fix(client): carry out retries in case of got less of quotes --- autonomi/src/client/quote.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/autonomi/src/client/quote.rs b/autonomi/src/client/quote.rs index 9794f165d7..38dfd7f6fd 100644 --- a/autonomi/src/client/quote.rs +++ b/autonomi/src/client/quote.rs @@ -11,7 +11,7 @@ use crate::client::rate_limiter::RateLimiter; use ant_evm::payment_vault::get_market_price; use ant_evm::{Amount, EvmNetwork, PaymentQuote, QuotePayment, QuotingMetrics}; use ant_networking::{Network, NetworkError}; -use ant_protocol::{storage::ChunkAddress, NetworkAddress}; +use ant_protocol::{storage::ChunkAddress, NetworkAddress, CLOSE_GROUP_SIZE}; use libp2p::PeerId; use std::collections::HashMap; use xor_name::XorName; @@ -159,6 +159,14 @@ async fn fetch_store_quote_with_retries( loop { match fetch_store_quote(network, content_addr).await { Ok(quote) => { + if quote.len() < CLOSE_GROUP_SIZE { + retries += 1; + error!("Error while fetching store quote: not enough quotes ({}/{CLOSE_GROUP_SIZE}), retry #{retries}, quotes {quote:?}", + quote.len()); + if retries > 2 { + break Err(CostError::CouldNotGetStoreQuote(content_addr)); + } + } break Ok((content_addr, quote)); } Err(err) if retries < 2 => { @@ -172,6 +180,9 @@ async fn fetch_store_quote_with_retries( break Err(CostError::CouldNotGetStoreQuote(content_addr)); } } + // Shall have a sleep between retries to avoid choking the network. + // This shall be rare to happen though. + std::thread::sleep(std::time::Duration::from_secs(5)); } } From 2e1d830a03d4bac0a325a29961997bfed8233e32 Mon Sep 17 00:00:00 2001 From: qima Date: Sun, 15 Dec 2024 22:01:50 +0800 Subject: [PATCH 32/43] fix(client): expand replicator_factor to get more closest_peers --- ant-networking/src/driver.rs | 2 +- ant-networking/src/lib.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ant-networking/src/driver.rs b/ant-networking/src/driver.rs index 4534b49110..bb1637a099 100644 --- a/ant-networking/src/driver.rs +++ b/ant-networking/src/driver.rs @@ -135,7 +135,7 @@ const PERIODIC_KAD_BOOTSTRAP_INTERVAL_MAX_S: u64 = 21600; // Init during compilation, instead of runtime error that should never happen // Option::expect will be stabilised as const in the future (https://github.com/rust-lang/rust/issues/67441) -const REPLICATION_FACTOR: NonZeroUsize = match NonZeroUsize::new(CLOSE_GROUP_SIZE) { +const REPLICATION_FACTOR: NonZeroUsize = match NonZeroUsize::new(CLOSE_GROUP_SIZE + 2) { Some(v) => v, None => panic!("CLOSE_GROUP_SIZE should not be zero"), }; diff --git a/ant-networking/src/lib.rs b/ant-networking/src/lib.rs index 434aa192ad..fca47f18d0 100644 --- a/ant-networking/src/lib.rs +++ b/ant-networking/src/lib.rs @@ -387,6 +387,10 @@ impl Network { .await?; // Filter out results from the ignored peers. close_nodes.retain(|peer_id| !ignore_peers.contains(peer_id)); + info!( + "For record {record_address:?} quoting {} nodes. ignore_peers is {ignore_peers:?}", + close_nodes.len() + ); if close_nodes.is_empty() { error!("Can't get store_cost of {record_address:?}, as all close_nodes are ignored"); From 491b24e075da03193c7df7a7bd2d4ab0e3a9b95f Mon Sep 17 00:00:00 2001 From: qima Date: Mon, 16 Dec 2024 19:21:17 +0800 Subject: [PATCH 33/43] fix(client): wait a short while before startup quoting/upload tasks --- .github/workflows/merge.yml | 4 ++-- ant-node/src/node.rs | 6 ++++-- autonomi/src/client/mod.rs | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 1d59de2431..aebccee63f 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -408,7 +408,7 @@ jobs: if: matrix.os != 'windows-latest' run: | set -e - for i in {1..100}; do + for i in {1..50}; do dd if=/dev/urandom of=random_file_$i.bin bs=1M count=1 status=none ./target/release/ant --log-output-dest data-dir file upload random_file_$i.bin --public ./target/release/ant --log-output-dest data-dir file upload random_file_$i.bin @@ -423,7 +423,7 @@ jobs: shell: pwsh run: | $ErrorActionPreference = "Stop" - for ($i = 1; $i -le 100; $i++) { + for ($i = 1; $i -le 50; $i++) { $fileName = "random_file_$i.bin" $byteArray = [byte[]]@(0xFF) * (1MB) # Create a 1 MB array filled with 0xFF [System.IO.File]::WriteAllBytes($fileName, $byteArray) diff --git a/ant-node/src/node.rs b/ant-node/src/node.rs index 4908c0bc23..2515af6344 100644 --- a/ant-node/src/node.rs +++ b/ant-node/src/node.rs @@ -16,7 +16,9 @@ use ant_bootstrap::BootstrapCacheStore; use ant_evm::RewardsAddress; #[cfg(feature = "open-metrics")] use ant_networking::MetricsRegistries; -use ant_networking::{Instant, Network, NetworkBuilder, NetworkEvent, NodeIssue, SwarmDriver}; +use ant_networking::{ + target_arch::sleep, Instant, Network, NetworkBuilder, NetworkEvent, NodeIssue, SwarmDriver, +}; use ant_protocol::{ convert_distance_to_u256, error::Error as ProtocolError, @@ -969,7 +971,7 @@ impl Node { } } // Sleep a short while to avoid causing a spike on resource usage. - std::thread::sleep(std::time::Duration::from_secs(10)); + sleep(std::time::Duration::from_secs(10)).await; } } } diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index f245833b91..d118a5f065 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -251,6 +251,12 @@ impl Client { receiver.await.expect("sender should not close")?; debug!("Client is connected to the network"); + // With the switch to the new bootstrap cache scheme, + // Seems the too many `initial dial`s could result in failure, + // when startup quoting/upload tasks got started up immediatly. + // Hence, put in a forced wait to allow `initial network discovery` to be completed. + ant_networking::target_arch::sleep(Duration::from_secs(5)).await; + Ok(Self { network, client_event_sender: Arc::new(None), From 4c4ef789cf618dbd485f9d3734396c662fab42cb Mon Sep 17 00:00:00 2001 From: Roland Sherwin Date: Mon, 16 Dec 2024 17:23:22 +0530 Subject: [PATCH 34/43] chore: make metrics logging to work with local networks only --- ant-cli/Cargo.toml | 2 +- ant-cli/src/main.rs | 4 ++-- ant-node/Cargo.toml | 4 ++-- ant-node/src/bin/antnode/main.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index 0239975d03..7834564d07 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -15,7 +15,7 @@ path = "src/main.rs" [features] default = ["metrics"] -local = ["ant-bootstrap/local", "autonomi/local"] +local = ["ant-bootstrap/local", "autonomi/local", "ant-logging/process-metrics"] metrics = ["ant-logging/process-metrics"] nightly = [] diff --git a/ant-cli/src/main.rs b/ant-cli/src/main.rs index 279a354e5d..971c38fd6a 100644 --- a/ant-cli/src/main.rs +++ b/ant-cli/src/main.rs @@ -24,7 +24,7 @@ pub use access::user_data; use clap::Parser; use color_eyre::Result; -#[cfg(feature = "metrics")] +#[cfg(feature = "local")] use ant_logging::metrics::init_metrics; use ant_logging::{LogBuilder, LogFormat, ReloadHandle, WorkerGuard}; use ant_protocol::version; @@ -73,7 +73,7 @@ async fn main() -> Result<()> { } let _log_guards = init_logging_and_metrics(&opt)?; - #[cfg(feature = "metrics")] + #[cfg(feature = "local")] tokio::spawn(init_metrics(std::process::id())); info!("\"{}\"", std::env::args().collect::>().join(" ")); diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index 053390041e..a7b9b817b7 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -17,9 +17,9 @@ path = "src/bin/antnode/main.rs" default = ["metrics", "upnp", "open-metrics", "encrypt-records"] encrypt-records = ["ant-networking/encrypt-records"] extension-module = ["pyo3/extension-module"] -local = ["ant-networking/local", "ant-evm/local", "ant-bootstrap/local"] +local = ["ant-networking/local", "ant-evm/local", "ant-bootstrap/local", "ant-logging/process-metrics"] loud = ["ant-networking/loud"] # loud mode: print important messages to console -metrics = ["ant-logging/process-metrics"] +metrics = [] nightly = [] open-metrics = ["ant-networking/open-metrics", "prometheus-client"] otlp = ["ant-logging/otlp"] diff --git a/ant-node/src/bin/antnode/main.rs b/ant-node/src/bin/antnode/main.rs index db40d00101..3397d81461 100644 --- a/ant-node/src/bin/antnode/main.rs +++ b/ant-node/src/bin/antnode/main.rs @@ -15,7 +15,7 @@ mod subcommands; use crate::subcommands::EvmNetworkCommand; use ant_bootstrap::{BootstrapCacheConfig, BootstrapCacheStore, PeersArgs}; use ant_evm::{get_evm_network_from_env, EvmNetwork, RewardsAddress}; -#[cfg(feature = "metrics")] +#[cfg(feature = "local")] use ant_logging::metrics::init_metrics; use ant_logging::{Level, LogFormat, LogOutputDest, ReloadHandle}; use ant_node::{Marker, NodeBuilder, NodeEvent, NodeEventsReceiver}; @@ -306,7 +306,7 @@ fn main() -> Result<()> { // Create a tokio runtime per `run_node` attempt, this ensures // any spawned tasks are closed before we would attempt to run // another process with these args. - #[cfg(feature = "metrics")] + #[cfg(feature = "local")] rt.spawn(init_metrics(std::process::id())); let initial_peres = rt.block_on(opt.peers.get_addrs(None, Some(100)))?; debug!("Node's owner set to: {:?}", opt.owner); From 663bad89bbf945222107bbb30c013d67bb5d065f Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Mon, 16 Dec 2024 20:50:44 +0000 Subject: [PATCH 35/43] chore(release): release candidate 2024.12.1.4 ================== Crate Versions ================== ant-bootstrap: 0.1.0-rc.4 ant-build-info: 0.1.20-rc.4 ant-cli: 0.3.0-rc.4 ant-evm: 0.1.5-rc.4 ant-logging: 0.2.41-rc.4 ant-metrics: 0.1.21-rc.4 ant-networking: 0.3.0-rc.4 ant-node: 0.3.0-rc.4 ant-node-manager: 0.11.4-rc.4 ant-node-rpc-client: 0.6.37-rc.4 ant-protocol: 0.3.0-rc.4 ant-registers: 0.4.4-rc.4 ant-service-management: 0.4.4-rc.4 ant-token-supplies: 0.1.59-rc.4 autonomi: 0.3.0-rc.4 evmlib: 0.1.5-rc.4 evm-testnet: 0.1.5-rc.4 nat-detection: 0.2.12-rc.4 node-launchpad: 0.5.0-rc.4 test-utils: 0.4.12-rc.4 =================== Binary Versions =================== ant: 0.3.0-rc.4 antctl: 0.11.4-rc.4 antctld: 0.11.4-rc.4 antnode: 0.3.0-rc.4 antnode_rpc_client: 0.6.37-rc.4 nat-detection: 0.2.12-rc.4 node-launchpad: 0.5.0-rc.4 --- Cargo.lock | 40 +++++++++++++++--------------- ant-bootstrap/Cargo.toml | 6 ++--- ant-build-info/Cargo.toml | 2 +- ant-build-info/src/release_info.rs | 2 +- ant-cli/Cargo.toml | 14 +++++------ ant-evm/Cargo.toml | 4 +-- ant-logging/Cargo.toml | 2 +- ant-metrics/Cargo.toml | 2 +- ant-networking/Cargo.toml | 12 ++++----- ant-node-manager/Cargo.toml | 14 +++++------ ant-node-rpc-client/Cargo.toml | 12 ++++----- ant-node/Cargo.toml | 24 +++++++++--------- ant-protocol/Cargo.toml | 8 +++--- ant-registers/Cargo.toml | 2 +- ant-service-management/Cargo.toml | 10 ++++---- ant-token-supplies/Cargo.toml | 2 +- autonomi/Cargo.toml | 16 ++++++------ evm-testnet/Cargo.toml | 6 ++--- evmlib/Cargo.toml | 2 +- nat-detection/Cargo.toml | 8 +++--- node-launchpad/Cargo.toml | 14 +++++------ release-cycle-info | 2 +- test-utils/Cargo.toml | 4 +-- 23 files changed, 104 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6808bb63af..4d3e36b1d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,7 +773,7 @@ dependencies = [ [[package]] name = "ant-bootstrap" -version = "0.1.0-rc.3" +version = "0.1.0-rc.4" dependencies = [ "ant-logging", "ant-protocol", @@ -798,7 +798,7 @@ dependencies = [ [[package]] name = "ant-build-info" -version = "0.1.20-rc.3" +version = "0.1.20-rc.4" dependencies = [ "chrono", "tracing", @@ -807,7 +807,7 @@ dependencies = [ [[package]] name = "ant-cli" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "ant-evm" -version = "0.1.5-rc.3" +version = "0.1.5-rc.4" dependencies = [ "custom_debug", "evmlib", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "ant-logging" -version = "0.2.41-rc.3" +version = "0.2.41-rc.4" dependencies = [ "chrono", "color-eyre", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "ant-metrics" -version = "0.1.21-rc.3" +version = "0.1.21-rc.4" dependencies = [ "clap", "color-eyre", @@ -900,7 +900,7 @@ dependencies = [ [[package]] name = "ant-networking" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" dependencies = [ "aes-gcm-siv", "ant-bootstrap", @@ -948,7 +948,7 @@ dependencies = [ [[package]] name = "ant-node" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "ant-node-manager" -version = "0.11.4-rc.3" +version = "0.11.4-rc.4" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "ant-node-rpc-client" -version = "0.6.37-rc.3" +version = "0.6.37-rc.4" dependencies = [ "ant-build-info", "ant-logging", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "ant-protocol" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" dependencies = [ "ant-build-info", "ant-evm", @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "ant-registers" -version = "0.4.4-rc.3" +version = "0.4.4-rc.4" dependencies = [ "blsttc", "crdts", @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "ant-service-management" -version = "0.4.4-rc.3" +version = "0.4.4-rc.4" dependencies = [ "ant-bootstrap", "ant-evm", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "ant-token-supplies" -version = "0.1.59-rc.3" +version = "0.1.59-rc.4" dependencies = [ "dirs-next", "reqwest 0.11.27", @@ -1591,7 +1591,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autonomi" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" dependencies = [ "alloy", "ant-bootstrap", @@ -3356,7 +3356,7 @@ dependencies = [ [[package]] name = "evm-testnet" -version = "0.1.5-rc.3" +version = "0.1.5-rc.4" dependencies = [ "ant-evm", "clap", @@ -3367,7 +3367,7 @@ dependencies = [ [[package]] name = "evmlib" -version = "0.1.5-rc.3" +version = "0.1.5-rc.4" dependencies = [ "alloy", "dirs-next", @@ -6284,7 +6284,7 @@ dependencies = [ [[package]] name = "nat-detection" -version = "0.2.12-rc.3" +version = "0.2.12-rc.4" dependencies = [ "ant-build-info", "ant-networking", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "node-launchpad" -version = "0.5.0-rc.3" +version = "0.5.0-rc.4" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -9321,7 +9321,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-utils" -version = "0.4.12-rc.3" +version = "0.4.12-rc.4" dependencies = [ "bytes", "color-eyre", diff --git a/ant-bootstrap/Cargo.toml b/ant-bootstrap/Cargo.toml index 910bfcbce6..bd20684218 100644 --- a/ant-bootstrap/Cargo.toml +++ b/ant-bootstrap/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0" name = "ant-bootstrap" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.0-rc.3" +version = "0.1.0-rc.4" [features] local = [] [dependencies] -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } atomic-write-file = "0.2.2" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.2.1", features = ["derive", "env"] } diff --git a/ant-build-info/Cargo.toml b/ant-build-info/Cargo.toml index d5fb78c426..bc35344e85 100644 --- a/ant-build-info/Cargo.toml +++ b/ant-build-info/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-build-info" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.20-rc.3" +version = "0.1.20-rc.4" build = "build.rs" include = ["Cargo.toml", "src/**/*", "build.rs"] diff --git a/ant-build-info/src/release_info.rs b/ant-build-info/src/release_info.rs index ce747aa610..2bee868786 100644 --- a/ant-build-info/src/release_info.rs +++ b/ant-build-info/src/release_info.rs @@ -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 = "3"; +pub const RELEASE_CYCLE_COUNTER: &str = "4"; diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index 7834564d07..efc577f16f 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] name = "ant-cli" description = "CLI client for the Autonomi network" license = "GPL-3.0" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -24,11 +24,11 @@ name = "files" harness = false [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = [ +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.4", features = [ "fs", "vault", "registers", @@ -60,7 +60,7 @@ tracing = { version = "~0.1.26" } walkdir = "2.5.0" [dev-dependencies] -autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = ["fs"]} +autonomi = { path = "../autonomi", version = "0.3.0-rc.4", features = ["fs"]} criterion = "0.5.1" eyre = "0.6.8" rand = { version = "~0.8.5", features = ["small_rng"] } diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index d01e9a282a..f813fe501f 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-evm" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.3" +version = "0.1.5-rc.4" [features] local = ["evmlib/local"] @@ -16,7 +16,7 @@ test-utils = [] [dependencies] custom_debug = "~0.6.1" -evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } hex = "~0.4.3" lazy_static = "~1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } diff --git a/ant-logging/Cargo.toml b/ant-logging/Cargo.toml index dc30c512f9..2637242a80 100644 --- a/ant-logging/Cargo.toml +++ b/ant-logging/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-logging" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.41-rc.3" +version = "0.2.41-rc.4" [dependencies] chrono = "~0.4.19" diff --git a/ant-metrics/Cargo.toml b/ant-metrics/Cargo.toml index 7f5f3f604e..4b3369e646 100644 --- a/ant-metrics/Cargo.toml +++ b/ant-metrics/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-metrics" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.21-rc.3" +version = "0.1.21-rc.4" [[bin]] path = "src/main.rs" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index d73a3755ac..7098d309dc 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-networking" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" [features] default = [] @@ -20,11 +20,11 @@ upnp = ["libp2p/upnp"] [dependencies] aes-gcm-siv = "0.11.1" -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } async-trait = "0.1" bytes = { version = "1.0.1", features = ["serde"] } custom_debug = "~0.6.1" diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index bbfbf37410..042bfdb2e2 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-manager" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.11.4-rc.3" +version = "0.11.4-rc.4" [[bin]] name = "antctl" @@ -30,13 +30,13 @@ tcp = [] websockets = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } ant-releases = { version = "0.4.0" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.3" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.4" } chrono = "~0.4.19" clap = { version = "4.4.6", features = ["derive", "env"] } colored = "2.0.4" diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index f0019753d4..79afb98221 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-rpc-client" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.6.37-rc.3" +version = "0.6.37-rc.4" [[bin]] name = "antnode_rpc_client" @@ -17,11 +17,11 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3", features=["rpc"] } -ant-node = { path = "../ant-node", version = "0.3.0-rc.3" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4", features=["rpc"] } +ant-node = { path = "../ant-node", version = "0.3.0-rc.4" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.4" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } clap = { version = "4.2.1", features = ["derive"] } diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index a7b9b817b7..cbccdbeebc 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "The Autonomi node binary" name = "ant-node" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -26,14 +26,14 @@ otlp = ["ant-logging/otlp"] upnp = ["ant-networking/upnp"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.4" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } @@ -83,10 +83,10 @@ walkdir = "~2.5.0" xor_name = "5.0.0" [dev-dependencies] -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3", features = ["rpc"] } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4", features = ["rpc"] } assert_fs = "1.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = ["registers"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.4", features = ["registers"] } reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", ] } diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index aca39a2e4d..5f3dceb21d 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0" name = "ant-protocol" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" [features] default = [] rpc = ["tonic", "prost"] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "0.6.2" diff --git a/ant-registers/Cargo.toml b/ant-registers/Cargo.toml index 8fcc08483d..1bc9ed344f 100644 --- a/ant-registers/Cargo.toml +++ b/ant-registers/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-registers" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.3" +version = "0.4.4-rc.4" [features] test-utils = [] diff --git a/ant-service-management/Cargo.toml b/ant-service-management/Cargo.toml index 984879ea7f..d1724f11ff 100644 --- a/ant-service-management/Cargo.toml +++ b/ant-service-management/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "ant-service-management" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.3" +version = "0.4.4-rc.4" [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3", features = ["rpc"] } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4", features = ["rpc"] } async-trait = "0.1" dirs-next = "2.0.0" libp2p = { version = "0.54.1", features = ["kad"] } diff --git a/ant-token-supplies/Cargo.toml b/ant-token-supplies/Cargo.toml index cc59d9706b..4a55b4cb8f 100644 --- a/ant-token-supplies/Cargo.toml +++ b/ant-token-supplies/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-token-supplies" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.59-rc.3" +version = "0.1.59-rc.4" [dependencies] diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index 32692f8ca2..9ce0e1a597 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] description = "Autonomi client API" name = "autonomi" license = "GPL-3.0" -version = "0.3.0-rc.3" +version = "0.3.0-rc.4" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -33,11 +33,11 @@ registers = [] vault = ["registers"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } bip39 = "2.0.0" blst = "0.3.13" blstrs = "0.7.1" @@ -68,7 +68,7 @@ xor_name = "5.0.0" [dev-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"] } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } eyre = "0.6.5" sha2 = "0.10.6" # Do not specify the version field. Release process expects even the local dev deps to be published. @@ -80,7 +80,7 @@ wasm-bindgen-test = "0.3.43" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" -evmlib = { path = "../evmlib", version = "0.1.5-rc.3", features = ["wasm-bindgen"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.4", features = ["wasm-bindgen"] } # See https://github.com/sebcrozet/instant/blob/7bd13f51f5c930239fddc0476a837870fb239ed7/README.md#using-instant-for-a-wasm-platform-where-performancenow-is-not-available instant = { version = "0.1", features = ["wasm-bindgen", "inaccurate"] } js-sys = "0.3.70" diff --git a/evm-testnet/Cargo.toml b/evm-testnet/Cargo.toml index ff3df5f3b7..5a98932dc3 100644 --- a/evm-testnet/Cargo.toml +++ b/evm-testnet/Cargo.toml @@ -6,13 +6,13 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evm-testnet" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.3" +version = "0.1.5-rc.4" [dependencies] -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } clap = { version = "4.5", features = ["derive"] } dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } tokio = { version = "1.40", features = ["rt-multi-thread", "signal"] } [lints] diff --git a/evmlib/Cargo.toml b/evmlib/Cargo.toml index 2646a874a9..673e2f8cfa 100644 --- a/evmlib/Cargo.toml +++ b/evmlib/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evmlib" repository = "https://github.com/maidsafe/safe_network" -version = "0.1.5-rc.3" +version = "0.1.5-rc.4" [features] wasm-bindgen = ["alloy/wasm-bindgen"] diff --git a/nat-detection/Cargo.toml b/nat-detection/Cargo.toml index 33fe7871e5..e5888d1dce 100644 --- a/nat-detection/Cargo.toml +++ b/nat-detection/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "nat-detection" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.12-rc.3" +version = "0.2.12-rc.4" [[bin]] name = "nat-detection" @@ -17,9 +17,9 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.3" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.4" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } clap = { version = "4.5.4", features = ["derive"] } clap-verbosity-flag = "2.2.0" color-eyre = { version = "0.6", default-features = false } diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index e3269ce45b..e55ebcdf93 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "TUI for running nodes on the Autonomi network" name = "node-launchpad" -version = "0.5.0-rc.3" +version = "0.5.0-rc.4" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -18,13 +18,13 @@ path = "src/bin/tui/main.rs" nightly = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.3" } -ant-node-manager = { version = "0.11.4-rc.3", path = "../ant-node-manager" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-node-manager = { version = "0.11.4-rc.4", path = "../ant-node-manager" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } ant-releases = { version = "0.4.0" } -ant-service-management = { version = "0.4.4-rc.3", path = "../ant-service-management" } +ant-service-management = { version = "0.4.4-rc.4", path = "../ant-service-management" } arboard = "3.4.1" atty = "0.2.14" better-panic = "0.3.0" diff --git a/release-cycle-info b/release-cycle-info index 20ffc3ce9a..efbf249835 100644 --- a/release-cycle-info +++ b/release-cycle-info @@ -15,4 +15,4 @@ release-year: 2024 release-month: 12 release-cycle: 1 -release-cycle-counter: 3 +release-cycle-counter: 4 diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 1647917ed9..616dfaf07a 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "test-utils" readme = "README.md" repository = "https://github.com/maidsafe/safe_network" -version = "0.4.12-rc.3" +version = "0.4.12-rc.4" [dependencies] bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "~0.6.2" dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.3" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = "0.8.5" serde = { version = "1.0.133", features = ["derive"] } From 42b23cf6837134a4aa42f5f6466c3378da983b12 Mon Sep 17 00:00:00 2001 From: Nic-dorman Date: Mon, 16 Dec 2024 18:14:17 +0000 Subject: [PATCH 36/43] chore: update readme to remove wasm ref --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index c6a1f504f4..f2dee6452b 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,6 @@ More options about EVM Network below. The Autonomi network uses `quic` as the default transport protocol. -#### Building for wasm32 - -WASM support for the autonomi API is currently under active development. More docs coming soon. ### For the Technical From 5f2f98564f1c4d7f6363783f8e212b217b7953c6 Mon Sep 17 00:00:00 2001 From: Nic-dorman Date: Tue, 17 Dec 2024 10:28:26 +0000 Subject: [PATCH 37/43] chore: update cli readme --- ant-cli/README.md | 295 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 233 insertions(+), 62 deletions(-) diff --git a/ant-cli/README.md b/ant-cli/README.md index c8c57392ad..6093ff220d 100644 --- a/ant-cli/README.md +++ b/ant-cli/README.md @@ -1,87 +1,258 @@ -# A CLI for the Autonomi Network +# CLI for the Autonomi Network +## Usage ``` -Usage: ant [OPTIONS] +ant [OPTIONS] +``` +### Options +- `--log-output-dest `: Specify the logging output destination. [default: data-dir] +- `--log-format `: Specify the logging format. +- `--peer `: Peer(s) to use for bootstrap, in a 'multiaddr' format containing the peer ID [env: ANT_PEERS=] +- `--timeout `: The maximum duration to wait for a connection to the network before timing out +- `-x, --no-verify`: Prevent verification of data storage on the network +- `-h, --help`: Print help (see more with '--help') +- `-V, --version`: Print version -Commands: - file Operations related to file handling - register Operations related to register management - vault Operations related to vault management - wallet Operations related to wallet management - help Print this message or the help of the given subcommand(s) +## Commands -Options: - --log-output-dest - Specify the logging output destination. [default: data-dir] - --log-format - Specify the logging format. - --peer - Peer(s) to use for bootstrap, in a 'multiaddr' format containing the peer ID [env: ANT_PEERS=] - --timeout - The maximum duration to wait for a connection to the network before timing out - -x, --no-verify - Prevent verification of data storage on the network - -h, --help - Print help (see more with '--help') - -V, --version - Print version -``` +### File +- `file cost ` +- `file upload [--public]` +- `file download ` +- `file list` + +[Reference : File](#file-operations) + +### Register [Deprecated] +- `register generate-key [--overwrite]` +- `register cost ` +- `register create [--public]` +- `register edit [--name]
` +- `register get [--name]
` +- `register list` + +### Vault +- `vault cost` +- `vault create` +- `vault load` +- `vault sync [--force]` + +[Reference : Vault](#vault-operations) + +### Wallet +- `wallet create [--no-password] [--password ]` +- `wallet import [--no-password] [--password ]` +- `wallet balance` +- `wallet export` + +[Reference : Wallet](#wallet-operations) + +### Help +- `help` +- `help ` + + +## Installation +You can install the Autonomi CLI in two ways: by directly downloading the binary from GitHub or by building it from source using a terminal. -## Wallet +### Option 1: Downloading the Binary from GitHub -### Create a new wallet +1. Go to the [Releases](https://github.com/maidsafe/autonomi/releases) page on GitHub. +2. Download the latest release for your operating system. +3. Extract the downloaded archive. +4. Move the binary to a directory included in your system's PATH. +### Option 2: Build locally + +1. Ensure you have Rust and Cargo installed on your machine. You can download them from rust-lang.org +2. Clone the repository +``` +git clone https://github.com/maidsafe/autonomi.git +cd autonomi +``` +3. Build the CLI: +``` +cargo build --release --bin=ant +``` +4. Add the CLI to your PATH / Environment Variables +#### Windows (PowerShell) +```powershell +$env:PATH += ";C:\path\to\your\binary" +[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:\path\to\your\binary", [System.EnvironmentVariableTarget]::User) +``` + +#### macOS and Linux (Bash) ```bash -wallet create +export PATH=$PATH:/path/to/your/binary +echo 'export PATH=$PATH:/path/to/your/binary' >> ~/.bashrc +source ~/.bashrc ``` -> Add the `--no-password` flag to skip the optional encryption step. +## Reference -> **Wallet Security** -> -> Encrypted wallets provide an additional layer of security, requiring a password to read the private key and perform -> transactions. However, ensure you remember your password; losing it may result in the inability to access your encrypted -> wallet. +### Specify the logging output destination. +``` +--log-output-dest +``` -Example: +Default value: `data-dir`\ +Valid values: [`stdout` , `data-dir` , ] - ```bash - $ wallet create - Enter password (leave empty for none): - Repeat password: - Wallet address: 0xaf676aC7C821977506AC9DcE28bFe83fb06938d8 - Stored wallet in: "/Users/macuser/Library/Application Support/autonomi/client/wallets/0xaf676aC7C821977506AC9DcE28bFe83fb06938d8.encrypted" - ``` +The data directory location is platform specific: +| OS | Path | +| ------------- |:-------------:| +| Linux | $HOME/.local/share/autonomi/client/logs | +| macOS | $HOME/Library/Application Support/autonomi/client/logs | +| Windows | %AppData%\autonomi\client\logs | -### Import a wallet +### Specify the logging format. +``` +--log-format +``` +Valid values [`default` , `json`] -```bash -wallet create --private-key +If the argument is not used, the default format will be applied. + +### Specify the Connection Timeout ``` +--timeout +``` -### Check wallet balance +Default value: `120`\ +Valid values: [`0 - 999`] -```bash -wallet balance +The maximum duration to wait for a connection to the network before timing out.\ +This value is expressed in seconds. + +### Prevent verification of data storage on the network. ``` +-x, --no-verify +``` +This may increase operation speed, but offers no guarantees that operations were successful. -Example: - ```bash - $ wallet balance - Wallet balances: 0x5A631e17FfB0F07b00D88E0e42246495Bf21d698 - +---------------+---+ - | Token Balance | 0 | - +---------------+---+ - | Gas Balance | 0 | - +---------------+---+ - ``` +### File Operations -## License +#### Get a cost estimate for storing a file +``` +file cost +``` + +Gets a cost estimate for uploading a file to the network. +This returns both the storage costs and gas fees for the file. + +Expected value: +- ``: File path (accessible by current user) + + +#### Upload a file +``` +file upload [--public] +``` +Uploads a file to the network. + +Expected value: +- ``: File path (accessible by current user) + +The following flag can be added: +`--public` (Optional) Specifying this will make this file publicly available to anyone on the network + +#### Download a file +``` +file download +``` +Download a file from network address to output path + +Expected values: +- ``: The network address of a file +- ``: The output path to download the file to -This Safe Network repository is licensed under the General Public License (GPL), version -3 ([LICENSE](LICENSE) http://www.gnu.org/licenses/gpl-3.0.en.html). ---- +#### List the files in a vault +``` +file list +``` +Lists all files (both public and private) in a vault. + + +### Vault Operations + +#### Get a cost estimate for storing a vault on the network +``` +vault cost +``` +Gets a cost estimate for uploading a vault to the network. +This returns both the storage costs and gas fees for the vault. + +#### Create a new vault and upload to the network +``` +vault create +``` +Creates a new vault and uploads it to the network. +This will initialise a new vault in the local storage and then upload it to the network. + +#### Load vault from the network +``` +vault load +``` +Retrieves data from the network and writes it to local storage. +This will download the vault data from the network and synchronise it with the local storage. + +#### Sync local data with the network +``` +vault sync [--force] +``` +Sync the users local data with the network vault data. + +The following flag can be applied: +`--force` (Optional) Add this flag to overwrite data in the vault with local user data + +### Wallet Operations +#### Create a new wallet +``` +wallet create [--no-password] +``` + +You will be prompted for an optional password, ignoring this will not encrypt the wallet. +This will output the private key for the wallet, the public key for the wallet, and the stored location on device. + +The following flags can be used to explictly include or exclude encryption of the created wallet + +`--no-password` (Optional) Add this flag to skip the password prompt and encryption step. \ +`--password ` (Optional) Add this flag to encrypt the create wallet + +Note on wallet security +Encrypted wallets provide an additional layer of security, requiring a password to read the private key and perform transactions. However, ensure you remember your password; losing it may result in the inability to access your encrypted wallet. + +#### Imports an existing wallet from a private key +``` +wallet import +``` + +The following flags can be used to explictly include or exclude encryption of the imported wallet + +`--no-password` (Optional) Add this flag to skip the password prompt and encryption step. \ +`--password ` (Optional) Add this flag to encrypt the create wallet + + +#### Displays the wallet balance +``` +wallet balance +``` +This will display both the token and gas balances. + +#### Display the wallet details +``` +wallet export +``` +This will display both the address and private key of the wallet. + + +## Error Handling +If you encounter any errors while using the CLI, you can use the `--log-output-dest` and `--log-format` options to specify logging details. This can help with debugging and understanding the behavior of the CLI. + +## License +This Safe Network repository is licensed under the General Public License (GPL), version 3 (LICENSE http://www.gnu.org/licenses/gpl-3.0.en.html). -Feel free to modify or expand upon this README as needed. Would you like to add or change anything else? +## Contributing +Contributions are welcome! Please read the [CONTRIBUTING.md](https://github.com/maidsafe/autonomi/blob/main/CONTRIBUTING.md) file for guidelines on how to contribute to this project. From 0ec89a10ba33efe928fec142ddc26c3d907a5e21 Mon Sep 17 00:00:00 2001 From: qima Date: Wed, 18 Dec 2024 04:48:10 +0800 Subject: [PATCH 38/43] chore: no longer carryout out bootstrap node replacement --- ant-networking/src/event/swarm.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ant-networking/src/event/swarm.rs b/ant-networking/src/event/swarm.rs index d8d26d0a2d..6897ff8a08 100644 --- a/ant-networking/src/event/swarm.rs +++ b/ant-networking/src/event/swarm.rs @@ -253,7 +253,10 @@ impl SwarmDriver { // If we are not local, we care only for peers that we dialed and thus are reachable. if self.local || has_dialed { // A bad node cannot establish a connection with us. So we can add it to the RT directly. - self.remove_bootstrap_from_full(peer_id); + + // With the new bootstrap cache, the workload is distributed, + // hence no longer need to replace bootstrap nodes for workload share. + // self.remove_bootstrap_from_full(peer_id); // Avoid have `direct link format` addrs co-exists with `relay` addr if has_relayed { @@ -624,6 +627,7 @@ impl SwarmDriver { } // if target bucket is full, remove a bootstrap node if presents. + #[allow(dead_code)] fn remove_bootstrap_from_full(&mut self, peer_id: PeerId) { let mut shall_removed = None; From 6c6feea9584c404f0c6136a38d30eadd074dd9a6 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Tue, 17 Dec 2024 21:30:04 +0000 Subject: [PATCH 39/43] docs: provide changelog for `2024.12.1.5` release --- CHANGELOG.md | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c26c8e9c2d..0791380b8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,107 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 *When editing this file, please respect a line length of 100.* +## 2024-12-18 + +### General + +#### Changed + +- For a branding alignment that moves Safe Network to Autonomi, all crates in the workspace prefixed + `sn-` were renamed with an `ant-` prefix. For example, `sn-node` was renamed `ant-node`. +- To further support this alignment, several binaries were renamed: + + `autonomi` -> `ant` + + `safenode` -> `antnode` + + `safenode-manager` -> `antctl` + + `safenode_rpc_client` -> `antnode_rpc_client` +- The location of data directories used by the binaries were changed from `~/.local/share/safe` to + `~/.local/share/autonomi`. The same is true of the equivalent locations on macOS and Windows. +- The prefixes of metric names in the `safenode` binary (now `antnode`) were changed from `sn_` to + `ant_`. + +### Network + +#### Added + +- Provide Python bindings for `antnode`. +- Generic `Transaction` data type +- Upgraded quoting with smart-contract-based pricing. This makes pricing fairer, as more nodes + are rewarded and there are less incentives to cheat. +- Upgraded data payments verification. +- New storage proof verification which attempts to avoid outsourcing attack +- RBS support, dynamic `responsible_range` based on `network_density` equation estimation. +- Node support for client’s RBS `get_closest` query. +- More quoting metrics for potential future quoting scheme. +- Implement bootstrap cache for local, decentralized network contacts. +- Increased the number of peers returned for the `get_closest` query result. + +#### Changed + +- The `SignedSpend` data type was replaced by `Transaction`. +- Removed `group_consensus` on `BadNode` to support RBS in the future. +- Removed node-side quoting history check as part of the new quoting scheme. +- Rename `continuous_bootstrap` to `network_discovery`. +- Convert `Distance` into `U256` via output string. This avoids the need to access the + `libp2p::Distance` private field because the change for it has not been published yet. +- For node and protocol versioning we remove the use of various keys in favour of a simple + integer between `0` and `255`. We reserve the value `1` for the main production network. +- The `websockets` feature was removed from the node binary. We will no longer support the `ws` + protocol for connections. + +#### Fixed + +- Populate `records_by_bucket` during restart so that proper quoting can be retained after restart. +- Scramble `libp2p` native bootstrap to avoid patterned spike of resource usage. +- Replicate fresh `ScratchPad` +- Accumulate and merge `ScratchPad` on record get. +- Remove an external address if it is unreliable. +- Bootstrap nodes were being replaced too frequently in the routing table. + +### Client + +#### Added + +- Provide Python bindings. +- Support for generic `Transaction` data type. +- Upgraded quoting with smart contract. +- Upgraded data payments with new quoting. +- Retry failed PUTs. This will retry when chunks failed to upload. +- WASM function to generate a vault key from a wallet signature. +- Use bootstrap cache mechanism to initialize `Client` object. +- Exposed many types at top-level, for more ergonomic use of the API. Together with more examples on + function usage. +- Deprecated registers for the client, planning on replacing them fully with transactions and + pointers. +- Wait a short while for initial network discovery to settle before quoting or uploading tasks + begin. +- Stress tests for the register features of the vault. +- Improved logging for vault end-to-end test cases. +- More debugging logging for the client API and `evmlib`. +- Added support for adding a wallet from an environment variable if no wallet files are present. +- Provide `wallet export` command to export a wallet’s private key + +#### Changed + +- Added and modified documentation in various places to improve developer experience. +- Renamed various methods to 'default' to private uploading, while public will have `_public` + suffixed. Also has various changes to allow more granular uploading of archives and data maps. +- Archives now store relative paths to files instead of absolute paths. +- The `wallet create --private-key` command has been changed to `wallet import`. + +#### Fixed + +- Files now download to a specific destination path. +- Retry when the number of quotes obtained are not enough. +- Return the wallet from an environment variable rather than creating a file. +- Error when decrypting a wallet that was imported without the `0x` prefix. +- Issue when selecting a wallet that had multiple wallet files (unencrypted & encrypted). + +### Launchpad + +#### Added + +- Added `--network-id` and `--antnode-path` args for testing + ## 2024-11-25 ### Network From 2f207a5e1798cd5087c7ff0175c2628c9cbf1132 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Tue, 17 Dec 2024 21:46:27 +0000 Subject: [PATCH 40/43] chore(release): release candidate 2024.12.1.5 ================== Crate Versions ================== ant-bootstrap: 0.1.0-rc.5 ant-build-info: 0.1.20-rc.5 ant-cli: 0.3.0-rc.5 ant-evm: 0.1.5-rc.5 ant-logging: 0.2.41-rc.5 ant-metrics: 0.1.21-rc.5 ant-networking: 0.3.0-rc.5 ant-node: 0.3.0-rc.5 ant-node-manager: 0.11.4-rc.5 ant-node-rpc-client: 0.6.37-rc.5 ant-protocol: 0.3.0-rc.5 ant-registers: 0.4.4-rc.5 ant-service-management: 0.4.4-rc.5 ant-token-supplies: 0.1.59-rc.5 autonomi: 0.3.0-rc.5 evmlib: 0.1.5-rc.5 evm-testnet: 0.1.5-rc.5 nat-detection: 0.2.12-rc.5 node-launchpad: 0.5.0-rc.5 test-utils: 0.4.12-rc.5 =================== Binary Versions =================== ant: 0.3.0-rc.5 antctl: 0.11.4-rc.5 antctld: 0.11.4-rc.5 antnode: 0.3.0-rc.5 antnode_rpc_client: 0.6.37-rc.5 nat-detection: 0.2.12-rc.5 node-launchpad: 0.5.0-rc.5 --- Cargo.lock | 40 +++++++++++++++--------------- ant-bootstrap/Cargo.toml | 6 ++--- ant-build-info/Cargo.toml | 2 +- ant-build-info/src/release_info.rs | 2 +- ant-cli/Cargo.toml | 14 +++++------ ant-evm/Cargo.toml | 4 +-- ant-logging/Cargo.toml | 2 +- ant-metrics/Cargo.toml | 2 +- ant-networking/Cargo.toml | 12 ++++----- ant-node-manager/Cargo.toml | 14 +++++------ ant-node-rpc-client/Cargo.toml | 12 ++++----- ant-node/Cargo.toml | 24 +++++++++--------- ant-protocol/Cargo.toml | 8 +++--- ant-registers/Cargo.toml | 2 +- ant-service-management/Cargo.toml | 10 ++++---- ant-token-supplies/Cargo.toml | 2 +- autonomi/Cargo.toml | 16 ++++++------ evm-testnet/Cargo.toml | 6 ++--- evmlib/Cargo.toml | 2 +- nat-detection/Cargo.toml | 8 +++--- node-launchpad/Cargo.toml | 14 +++++------ release-cycle-info | 2 +- test-utils/Cargo.toml | 4 +-- 23 files changed, 104 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d3e36b1d8..a139d07e35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,7 +773,7 @@ dependencies = [ [[package]] name = "ant-bootstrap" -version = "0.1.0-rc.4" +version = "0.1.0-rc.5" dependencies = [ "ant-logging", "ant-protocol", @@ -798,7 +798,7 @@ dependencies = [ [[package]] name = "ant-build-info" -version = "0.1.20-rc.4" +version = "0.1.20-rc.5" dependencies = [ "chrono", "tracing", @@ -807,7 +807,7 @@ dependencies = [ [[package]] name = "ant-cli" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "ant-evm" -version = "0.1.5-rc.4" +version = "0.1.5-rc.5" dependencies = [ "custom_debug", "evmlib", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "ant-logging" -version = "0.2.41-rc.4" +version = "0.2.41-rc.5" dependencies = [ "chrono", "color-eyre", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "ant-metrics" -version = "0.1.21-rc.4" +version = "0.1.21-rc.5" dependencies = [ "clap", "color-eyre", @@ -900,7 +900,7 @@ dependencies = [ [[package]] name = "ant-networking" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" dependencies = [ "aes-gcm-siv", "ant-bootstrap", @@ -948,7 +948,7 @@ dependencies = [ [[package]] name = "ant-node" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "ant-node-manager" -version = "0.11.4-rc.4" +version = "0.11.4-rc.5" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "ant-node-rpc-client" -version = "0.6.37-rc.4" +version = "0.6.37-rc.5" dependencies = [ "ant-build-info", "ant-logging", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "ant-protocol" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" dependencies = [ "ant-build-info", "ant-evm", @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "ant-registers" -version = "0.4.4-rc.4" +version = "0.4.4-rc.5" dependencies = [ "blsttc", "crdts", @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "ant-service-management" -version = "0.4.4-rc.4" +version = "0.4.4-rc.5" dependencies = [ "ant-bootstrap", "ant-evm", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "ant-token-supplies" -version = "0.1.59-rc.4" +version = "0.1.59-rc.5" dependencies = [ "dirs-next", "reqwest 0.11.27", @@ -1591,7 +1591,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autonomi" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" dependencies = [ "alloy", "ant-bootstrap", @@ -3356,7 +3356,7 @@ dependencies = [ [[package]] name = "evm-testnet" -version = "0.1.5-rc.4" +version = "0.1.5-rc.5" dependencies = [ "ant-evm", "clap", @@ -3367,7 +3367,7 @@ dependencies = [ [[package]] name = "evmlib" -version = "0.1.5-rc.4" +version = "0.1.5-rc.5" dependencies = [ "alloy", "dirs-next", @@ -6284,7 +6284,7 @@ dependencies = [ [[package]] name = "nat-detection" -version = "0.2.12-rc.4" +version = "0.2.12-rc.5" dependencies = [ "ant-build-info", "ant-networking", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "node-launchpad" -version = "0.5.0-rc.4" +version = "0.5.0-rc.5" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -9321,7 +9321,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-utils" -version = "0.4.12-rc.4" +version = "0.4.12-rc.5" dependencies = [ "bytes", "color-eyre", diff --git a/ant-bootstrap/Cargo.toml b/ant-bootstrap/Cargo.toml index bd20684218..94ef901af0 100644 --- a/ant-bootstrap/Cargo.toml +++ b/ant-bootstrap/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0" name = "ant-bootstrap" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.0-rc.4" +version = "0.1.0-rc.5" [features] local = [] [dependencies] -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } atomic-write-file = "0.2.2" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.2.1", features = ["derive", "env"] } diff --git a/ant-build-info/Cargo.toml b/ant-build-info/Cargo.toml index bc35344e85..998a599570 100644 --- a/ant-build-info/Cargo.toml +++ b/ant-build-info/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-build-info" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.20-rc.4" +version = "0.1.20-rc.5" build = "build.rs" include = ["Cargo.toml", "src/**/*", "build.rs"] diff --git a/ant-build-info/src/release_info.rs b/ant-build-info/src/release_info.rs index 2bee868786..cc425f22fc 100644 --- a/ant-build-info/src/release_info.rs +++ b/ant-build-info/src/release_info.rs @@ -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 = "4"; +pub const RELEASE_CYCLE_COUNTER: &str = "5"; diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index efc577f16f..9f1096fa16 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] name = "ant-cli" description = "CLI client for the Autonomi network" license = "GPL-3.0" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -24,11 +24,11 @@ name = "files" harness = false [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.4", features = [ +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.5", features = [ "fs", "vault", "registers", @@ -60,7 +60,7 @@ tracing = { version = "~0.1.26" } walkdir = "2.5.0" [dev-dependencies] -autonomi = { path = "../autonomi", version = "0.3.0-rc.4", features = ["fs"]} +autonomi = { path = "../autonomi", version = "0.3.0-rc.5", features = ["fs"]} criterion = "0.5.1" eyre = "0.6.8" rand = { version = "~0.8.5", features = ["small_rng"] } diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index f813fe501f..327d552925 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-evm" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.4" +version = "0.1.5-rc.5" [features] local = ["evmlib/local"] @@ -16,7 +16,7 @@ test-utils = [] [dependencies] custom_debug = "~0.6.1" -evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } hex = "~0.4.3" lazy_static = "~1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } diff --git a/ant-logging/Cargo.toml b/ant-logging/Cargo.toml index 2637242a80..0ff04f3d8f 100644 --- a/ant-logging/Cargo.toml +++ b/ant-logging/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-logging" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.41-rc.4" +version = "0.2.41-rc.5" [dependencies] chrono = "~0.4.19" diff --git a/ant-metrics/Cargo.toml b/ant-metrics/Cargo.toml index 4b3369e646..780af0e8a8 100644 --- a/ant-metrics/Cargo.toml +++ b/ant-metrics/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-metrics" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.21-rc.4" +version = "0.1.21-rc.5" [[bin]] path = "src/main.rs" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index 7098d309dc..c2a4b05e6f 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-networking" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" [features] default = [] @@ -20,11 +20,11 @@ upnp = ["libp2p/upnp"] [dependencies] aes-gcm-siv = "0.11.1" -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } async-trait = "0.1" bytes = { version = "1.0.1", features = ["serde"] } custom_debug = "~0.6.1" diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index 042bfdb2e2..2e8dc493dc 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-manager" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.11.4-rc.4" +version = "0.11.4-rc.5" [[bin]] name = "antctl" @@ -30,13 +30,13 @@ tcp = [] websockets = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } ant-releases = { version = "0.4.0" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.4" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.5" } chrono = "~0.4.19" clap = { version = "4.4.6", features = ["derive", "env"] } colored = "2.0.4" diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index 79afb98221..5a5fd34b22 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-rpc-client" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.6.37-rc.4" +version = "0.6.37-rc.5" [[bin]] name = "antnode_rpc_client" @@ -17,11 +17,11 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4", features=["rpc"] } -ant-node = { path = "../ant-node", version = "0.3.0-rc.4" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5", features=["rpc"] } +ant-node = { path = "../ant-node", version = "0.3.0-rc.5" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.5" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } clap = { version = "4.2.1", features = ["derive"] } diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index cbccdbeebc..8c82a708d3 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "The Autonomi node binary" name = "ant-node" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -26,14 +26,14 @@ otlp = ["ant-logging/otlp"] upnp = ["ant-networking/upnp"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.4" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.5" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } @@ -83,10 +83,10 @@ walkdir = "~2.5.0" xor_name = "5.0.0" [dev-dependencies] -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4", features = ["rpc"] } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5", features = ["rpc"] } assert_fs = "1.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.4", features = ["registers"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } +autonomi = { path = "../autonomi", version = "0.3.0-rc.5", features = ["registers"] } reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", ] } diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index 5f3dceb21d..81517ee234 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0" name = "ant-protocol" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" [features] default = [] rpc = ["tonic", "prost"] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "0.6.2" diff --git a/ant-registers/Cargo.toml b/ant-registers/Cargo.toml index 1bc9ed344f..270495f7f5 100644 --- a/ant-registers/Cargo.toml +++ b/ant-registers/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-registers" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.4" +version = "0.4.4-rc.5" [features] test-utils = [] diff --git a/ant-service-management/Cargo.toml b/ant-service-management/Cargo.toml index d1724f11ff..5ac4e0b32a 100644 --- a/ant-service-management/Cargo.toml +++ b/ant-service-management/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "ant-service-management" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.4" +version = "0.4.4-rc.5" [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4", features = ["rpc"] } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5", features = ["rpc"] } async-trait = "0.1" dirs-next = "2.0.0" libp2p = { version = "0.54.1", features = ["kad"] } diff --git a/ant-token-supplies/Cargo.toml b/ant-token-supplies/Cargo.toml index 4a55b4cb8f..fef4cf14dc 100644 --- a/ant-token-supplies/Cargo.toml +++ b/ant-token-supplies/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-token-supplies" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.59-rc.4" +version = "0.1.59-rc.5" [dependencies] diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index 9ce0e1a597..9495d364ed 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] description = "Autonomi client API" name = "autonomi" license = "GPL-3.0" -version = "0.3.0-rc.4" +version = "0.3.0-rc.5" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -33,11 +33,11 @@ registers = [] vault = ["registers"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.4" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } bip39 = "2.0.0" blst = "0.3.13" blstrs = "0.7.1" @@ -68,7 +68,7 @@ xor_name = "5.0.0" [dev-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"] } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.4" } +ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } eyre = "0.6.5" sha2 = "0.10.6" # Do not specify the version field. Release process expects even the local dev deps to be published. @@ -80,7 +80,7 @@ wasm-bindgen-test = "0.3.43" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" -evmlib = { path = "../evmlib", version = "0.1.5-rc.4", features = ["wasm-bindgen"] } +evmlib = { path = "../evmlib", version = "0.1.5-rc.5", features = ["wasm-bindgen"] } # See https://github.com/sebcrozet/instant/blob/7bd13f51f5c930239fddc0476a837870fb239ed7/README.md#using-instant-for-a-wasm-platform-where-performancenow-is-not-available instant = { version = "0.1", features = ["wasm-bindgen", "inaccurate"] } js-sys = "0.3.70" diff --git a/evm-testnet/Cargo.toml b/evm-testnet/Cargo.toml index 5a98932dc3..6fb29d07b9 100644 --- a/evm-testnet/Cargo.toml +++ b/evm-testnet/Cargo.toml @@ -6,13 +6,13 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evm-testnet" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.4" +version = "0.1.5-rc.5" [dependencies] -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } clap = { version = "4.5", features = ["derive"] } dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } tokio = { version = "1.40", features = ["rt-multi-thread", "signal"] } [lints] diff --git a/evmlib/Cargo.toml b/evmlib/Cargo.toml index 673e2f8cfa..7db75c67fc 100644 --- a/evmlib/Cargo.toml +++ b/evmlib/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evmlib" repository = "https://github.com/maidsafe/safe_network" -version = "0.1.5-rc.4" +version = "0.1.5-rc.5" [features] wasm-bindgen = ["alloy/wasm-bindgen"] diff --git a/nat-detection/Cargo.toml b/nat-detection/Cargo.toml index e5888d1dce..497c0f2987 100644 --- a/nat-detection/Cargo.toml +++ b/nat-detection/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "nat-detection" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.12-rc.4" +version = "0.2.12-rc.5" [[bin]] name = "nat-detection" @@ -17,9 +17,9 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.4" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-networking = { path = "../ant-networking", version = "0.3.0-rc.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } clap = { version = "4.5.4", features = ["derive"] } clap-verbosity-flag = "2.2.0" color-eyre = { version = "0.6", default-features = false } diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index e55ebcdf93..2cda3f2f60 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "TUI for running nodes on the Autonomi network" name = "node-launchpad" -version = "0.5.0-rc.4" +version = "0.5.0-rc.5" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -18,13 +18,13 @@ path = "src/bin/tui/main.rs" nightly = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.4" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.4" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.4" } -ant-node-manager = { version = "0.11.4-rc.4", path = "../ant-node-manager" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.4" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-node-manager = { version = "0.11.4-rc.5", path = "../ant-node-manager" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } ant-releases = { version = "0.4.0" } -ant-service-management = { version = "0.4.4-rc.4", path = "../ant-service-management" } +ant-service-management = { version = "0.4.4-rc.5", path = "../ant-service-management" } arboard = "3.4.1" atty = "0.2.14" better-panic = "0.3.0" diff --git a/release-cycle-info b/release-cycle-info index efbf249835..2d3c9fa1ee 100644 --- a/release-cycle-info +++ b/release-cycle-info @@ -15,4 +15,4 @@ release-year: 2024 release-month: 12 release-cycle: 1 -release-cycle-counter: 4 +release-cycle-counter: 5 diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 616dfaf07a..44aadb7084 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "test-utils" readme = "README.md" repository = "https://github.com/maidsafe/safe_network" -version = "0.4.12-rc.4" +version = "0.4.12-rc.5" [dependencies] bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "~0.6.2" dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.4" } +evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = "0.8.5" serde = { version = "1.0.133", features = ["derive"] } From 8a1957cb95aab9467725aec909ba372fb7a008a9 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Wed, 18 Dec 2024 11:47:31 +0000 Subject: [PATCH 41/43] chore(release): stable release 2024.12.1.5 ================== Crate Versions ================== ant-bootstrap: 0.1.0 ant-build-info: 0.1.20 ant-cli: 0.3.0 ant-evm: 0.1.5 ant-logging: 0.2.41 ant-metrics: 0.1.21 ant-networking: 0.3.0 ant-node: 0.3.0 ant-node-manager: 0.11.4 ant-node-rpc-client: 0.6.37 ant-protocol: 0.3.0 ant-registers: 0.4.4 ant-service-management: 0.4.4 ant-token-supplies: 0.1.59 autonomi: 0.3.0 evmlib: 0.1.5 evm-testnet: 0.1.5 nat-detection: 0.2.12 node-launchpad: 0.5.0 test-utils: 0.4.12 =================== Binary Versions =================== ant: 0.3.0 antctl: 0.11.4 antctld: 0.11.4 antnode: 0.3.0 antnode_rpc_client: 0.6.37 nat-detection: 0.2.12 node-launchpad: 0.5.0 --- Cargo.lock | 40 +++++++++++++++---------------- ant-bootstrap/Cargo.toml | 6 ++--- ant-build-info/Cargo.toml | 2 +- ant-cli/Cargo.toml | 14 +++++------ ant-evm/Cargo.toml | 4 ++-- ant-logging/Cargo.toml | 2 +- ant-metrics/Cargo.toml | 2 +- ant-networking/Cargo.toml | 12 +++++----- ant-node-manager/Cargo.toml | 14 +++++------ ant-node-rpc-client/Cargo.toml | 12 +++++----- ant-node/Cargo.toml | 24 +++++++++---------- ant-protocol/Cargo.toml | 8 +++---- ant-registers/Cargo.toml | 2 +- ant-service-management/Cargo.toml | 10 ++++---- ant-token-supplies/Cargo.toml | 2 +- autonomi/Cargo.toml | 16 ++++++------- evm-testnet/Cargo.toml | 6 ++--- evmlib/Cargo.toml | 2 +- nat-detection/Cargo.toml | 8 +++---- node-launchpad/Cargo.toml | 14 +++++------ test-utils/Cargo.toml | 4 ++-- 21 files changed, 102 insertions(+), 102 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a139d07e35..d6534ec427 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,7 +773,7 @@ dependencies = [ [[package]] name = "ant-bootstrap" -version = "0.1.0-rc.5" +version = "0.1.0" dependencies = [ "ant-logging", "ant-protocol", @@ -798,7 +798,7 @@ dependencies = [ [[package]] name = "ant-build-info" -version = "0.1.20-rc.5" +version = "0.1.20" dependencies = [ "chrono", "tracing", @@ -807,7 +807,7 @@ dependencies = [ [[package]] name = "ant-cli" -version = "0.3.0-rc.5" +version = "0.3.0" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "ant-evm" -version = "0.1.5-rc.5" +version = "0.1.5" dependencies = [ "custom_debug", "evmlib", @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "ant-logging" -version = "0.2.41-rc.5" +version = "0.2.41" dependencies = [ "chrono", "color-eyre", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "ant-metrics" -version = "0.1.21-rc.5" +version = "0.1.21" dependencies = [ "clap", "color-eyre", @@ -900,7 +900,7 @@ dependencies = [ [[package]] name = "ant-networking" -version = "0.3.0-rc.5" +version = "0.3.0" dependencies = [ "aes-gcm-siv", "ant-bootstrap", @@ -948,7 +948,7 @@ dependencies = [ [[package]] name = "ant-node" -version = "0.3.0-rc.5" +version = "0.3.0" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "ant-node-manager" -version = "0.11.4-rc.5" +version = "0.11.4" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -1049,7 +1049,7 @@ dependencies = [ [[package]] name = "ant-node-rpc-client" -version = "0.6.37-rc.5" +version = "0.6.37" dependencies = [ "ant-build-info", "ant-logging", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "ant-protocol" -version = "0.3.0-rc.5" +version = "0.3.0" dependencies = [ "ant-build-info", "ant-evm", @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "ant-registers" -version = "0.4.4-rc.5" +version = "0.4.4" dependencies = [ "blsttc", "crdts", @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "ant-service-management" -version = "0.4.4-rc.5" +version = "0.4.4" dependencies = [ "ant-bootstrap", "ant-evm", @@ -1167,7 +1167,7 @@ dependencies = [ [[package]] name = "ant-token-supplies" -version = "0.1.59-rc.5" +version = "0.1.59" dependencies = [ "dirs-next", "reqwest 0.11.27", @@ -1591,7 +1591,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autonomi" -version = "0.3.0-rc.5" +version = "0.3.0" dependencies = [ "alloy", "ant-bootstrap", @@ -3356,7 +3356,7 @@ dependencies = [ [[package]] name = "evm-testnet" -version = "0.1.5-rc.5" +version = "0.1.5" dependencies = [ "ant-evm", "clap", @@ -3367,7 +3367,7 @@ dependencies = [ [[package]] name = "evmlib" -version = "0.1.5-rc.5" +version = "0.1.5" dependencies = [ "alloy", "dirs-next", @@ -6284,7 +6284,7 @@ dependencies = [ [[package]] name = "nat-detection" -version = "0.2.12-rc.5" +version = "0.2.12" dependencies = [ "ant-build-info", "ant-networking", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "node-launchpad" -version = "0.5.0-rc.5" +version = "0.5.0" dependencies = [ "ant-bootstrap", "ant-build-info", @@ -9321,7 +9321,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-utils" -version = "0.4.12-rc.5" +version = "0.4.12" dependencies = [ "bytes", "color-eyre", diff --git a/ant-bootstrap/Cargo.toml b/ant-bootstrap/Cargo.toml index 94ef901af0..9f4714c4b0 100644 --- a/ant-bootstrap/Cargo.toml +++ b/ant-bootstrap/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0" name = "ant-bootstrap" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.0-rc.5" +version = "0.1.0" [features] local = [] [dependencies] -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0" } atomic-write-file = "0.2.2" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.2.1", features = ["derive", "env"] } diff --git a/ant-build-info/Cargo.toml b/ant-build-info/Cargo.toml index 998a599570..084f626445 100644 --- a/ant-build-info/Cargo.toml +++ b/ant-build-info/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-build-info" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.20-rc.5" +version = "0.1.20" build = "build.rs" include = ["Cargo.toml", "src/**/*", "build.rs"] diff --git a/ant-cli/Cargo.toml b/ant-cli/Cargo.toml index 9f1096fa16..69aa0a7c3e 100644 --- a/ant-cli/Cargo.toml +++ b/ant-cli/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] name = "ant-cli" description = "CLI client for the Autonomi network" license = "GPL-3.0" -version = "0.3.0-rc.5" +version = "0.3.0" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -24,11 +24,11 @@ name = "files" harness = false [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.5", features = [ +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } +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" } +autonomi = { path = "../autonomi", version = "0.3.0", features = [ "fs", "vault", "registers", @@ -60,7 +60,7 @@ tracing = { version = "~0.1.26" } walkdir = "2.5.0" [dev-dependencies] -autonomi = { path = "../autonomi", version = "0.3.0-rc.5", 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"] } diff --git a/ant-evm/Cargo.toml b/ant-evm/Cargo.toml index 327d552925..88ce78eaeb 100644 --- a/ant-evm/Cargo.toml +++ b/ant-evm/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-evm" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.5" +version = "0.1.5" [features] local = ["evmlib/local"] @@ -16,7 +16,7 @@ test-utils = [] [dependencies] custom_debug = "~0.6.1" -evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } +evmlib = { path = "../evmlib", version = "0.1.5" } hex = "~0.4.3" lazy_static = "~1.4.0" libp2p = { version = "0.54.1", features = ["identify", "kad"] } diff --git a/ant-logging/Cargo.toml b/ant-logging/Cargo.toml index 0ff04f3d8f..8fb4cf86f4 100644 --- a/ant-logging/Cargo.toml +++ b/ant-logging/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-logging" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.41-rc.5" +version = "0.2.41" [dependencies] chrono = "~0.4.19" diff --git a/ant-metrics/Cargo.toml b/ant-metrics/Cargo.toml index 780af0e8a8..1a57195b2f 100644 --- a/ant-metrics/Cargo.toml +++ b/ant-metrics/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-metrics" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.21-rc.5" +version = "0.1.21" [[bin]] path = "src/main.rs" diff --git a/ant-networking/Cargo.toml b/ant-networking/Cargo.toml index c2a4b05e6f..d23fff4e84 100644 --- a/ant-networking/Cargo.toml +++ b/ant-networking/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-networking" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.5" +version = "0.3.0" [features] default = [] @@ -20,11 +20,11 @@ upnp = ["libp2p/upnp"] [dependencies] aes-gcm-siv = "0.11.1" -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20" } +ant-evm = { path = "../ant-evm", version = "0.1.5" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0" } +ant-registers = { path = "../ant-registers", version = "0.4.4" } async-trait = "0.1" bytes = { version = "1.0.1", features = ["serde"] } custom_debug = "~0.6.1" diff --git a/ant-node-manager/Cargo.toml b/ant-node-manager/Cargo.toml index 2e8dc493dc..23b4ecc1f4 100644 --- a/ant-node-manager/Cargo.toml +++ b/ant-node-manager/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-manager" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.11.4-rc.5" +version = "0.11.4" [[bin]] name = "antctl" @@ -30,13 +30,13 @@ tcp = [] websockets = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20" } +ant-evm = { path = "../ant-evm", version = "0.1.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0" } ant-releases = { version = "0.4.0" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.5" } +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" diff --git a/ant-node-rpc-client/Cargo.toml b/ant-node-rpc-client/Cargo.toml index 5a5fd34b22..c58e8cadc7 100644 --- a/ant-node-rpc-client/Cargo.toml +++ b/ant-node-rpc-client/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-node-rpc-client" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.6.37-rc.5" +version = "0.6.37" [[bin]] name = "antnode_rpc_client" @@ -17,11 +17,11 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5", features=["rpc"] } -ant-node = { path = "../ant-node", version = "0.3.0-rc.5" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.5" } +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-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"] } diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index 8c82a708d3..63add89f00 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "The Autonomi node binary" name = "ant-node" -version = "0.3.0-rc.5" +version = "0.3.0" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -26,14 +26,14 @@ otlp = ["ant-logging/otlp"] upnp = ["ant-networking/upnp"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } -ant-service-management = { path = "../ant-service-management", version = "0.4.4-rc.5" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20" } +ant-evm = { path = "../ant-evm", version = "0.1.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41" } +ant-networking = { path = "../ant-networking", version = "0.3.0" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0" } +ant-registers = { path = "../ant-registers", version = "0.4.4" } +ant-service-management = { path = "../ant-service-management", version = "0.4.4" } async-trait = "0.1" bls = { package = "blsttc", version = "8.0.1" } bytes = { version = "1.0.1", features = ["serde"] } @@ -83,10 +83,10 @@ walkdir = "~2.5.0" xor_name = "5.0.0" [dev-dependencies] -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5", features = ["rpc"] } +ant-protocol = { path = "../ant-protocol", version = "0.3.0", features = ["rpc"] } assert_fs = "1.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } -autonomi = { path = "../autonomi", version = "0.3.0-rc.5", features = ["registers"] } +evmlib = { path = "../evmlib", version = "0.1.5" } +autonomi = { path = "../autonomi", version = "0.3.0", features = ["registers"] } reqwest = { version = "0.12.2", default-features = false, features = [ "rustls-tls-manual-roots", ] } diff --git a/ant-protocol/Cargo.toml b/ant-protocol/Cargo.toml index 81517ee234..d84d5b5404 100644 --- a/ant-protocol/Cargo.toml +++ b/ant-protocol/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0" name = "ant-protocol" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.3.0-rc.5" +version = "0.3.0" [features] default = [] rpc = ["tonic", "prost"] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20" } +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" diff --git a/ant-registers/Cargo.toml b/ant-registers/Cargo.toml index 270495f7f5..5c54f01f6f 100644 --- a/ant-registers/Cargo.toml +++ b/ant-registers/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-registers" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.5" +version = "0.4.4" [features] test-utils = [] diff --git a/ant-service-management/Cargo.toml b/ant-service-management/Cargo.toml index 5ac4e0b32a..8fadb57777 100644 --- a/ant-service-management/Cargo.toml +++ b/ant-service-management/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "ant-service-management" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.4.4-rc.5" +version = "0.4.4" [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5", features = ["rpc"] } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } +ant-evm = { path = "../ant-evm", version = "0.1.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0", features = ["rpc"] } async-trait = "0.1" dirs-next = "2.0.0" libp2p = { version = "0.54.1", features = ["kad"] } diff --git a/ant-token-supplies/Cargo.toml b/ant-token-supplies/Cargo.toml index fef4cf14dc..95aa9ceac7 100644 --- a/ant-token-supplies/Cargo.toml +++ b/ant-token-supplies/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "ant-token-supplies" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.59-rc.5" +version = "0.1.59" [dependencies] diff --git a/autonomi/Cargo.toml b/autonomi/Cargo.toml index 9495d364ed..40e8ad3feb 100644 --- a/autonomi/Cargo.toml +++ b/autonomi/Cargo.toml @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers "] description = "Autonomi client API" name = "autonomi" license = "GPL-3.0" -version = "0.3.0-rc.5" +version = "0.3.0" edition = "2021" homepage = "https://maidsafe.net" readme = "README.md" @@ -33,11 +33,11 @@ registers = [] vault = ["registers"] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } -ant-registers = { path = "../ant-registers", version = "0.4.4-rc.5" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } +ant-evm = { path = "../ant-evm", version = "0.1.5" } +ant-networking = { path = "../ant-networking", version = "0.3.0" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0" } +ant-registers = { path = "../ant-registers", version = "0.4.4" } bip39 = "2.0.0" blst = "0.3.13" blstrs = "0.7.1" @@ -68,7 +68,7 @@ xor_name = "5.0.0" [dev-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"] } -ant-logging = { path = "../ant-logging", version = "0.2.41-rc.5" } +ant-logging = { path = "../ant-logging", version = "0.2.41" } eyre = "0.6.5" sha2 = "0.10.6" # Do not specify the version field. Release process expects even the local dev deps to be published. @@ -80,7 +80,7 @@ wasm-bindgen-test = "0.3.43" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" -evmlib = { path = "../evmlib", version = "0.1.5-rc.5", features = ["wasm-bindgen"] } +evmlib = { path = "../evmlib", version = "0.1.5", features = ["wasm-bindgen"] } # See https://github.com/sebcrozet/instant/blob/7bd13f51f5c930239fddc0476a837870fb239ed7/README.md#using-instant-for-a-wasm-platform-where-performancenow-is-not-available instant = { version = "0.1", features = ["wasm-bindgen", "inaccurate"] } js-sys = "0.3.70" diff --git a/evm-testnet/Cargo.toml b/evm-testnet/Cargo.toml index 6fb29d07b9..da64a097db 100644 --- a/evm-testnet/Cargo.toml +++ b/evm-testnet/Cargo.toml @@ -6,13 +6,13 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evm-testnet" repository = "https://github.com/maidsafe/autonomi" -version = "0.1.5-rc.5" +version = "0.1.5" [dependencies] -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } +ant-evm = { path = "../ant-evm", version = "0.1.5" } clap = { version = "4.5", features = ["derive"] } dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } +evmlib = { path = "../evmlib", version = "0.1.5" } tokio = { version = "1.40", features = ["rt-multi-thread", "signal"] } [lints] diff --git a/evmlib/Cargo.toml b/evmlib/Cargo.toml index 7db75c67fc..770c23788e 100644 --- a/evmlib/Cargo.toml +++ b/evmlib/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://maidsafe.net" license = "GPL-3.0" name = "evmlib" repository = "https://github.com/maidsafe/safe_network" -version = "0.1.5-rc.5" +version = "0.1.5" [features] wasm-bindgen = ["alloy/wasm-bindgen"] diff --git a/nat-detection/Cargo.toml b/nat-detection/Cargo.toml index 497c0f2987..cbca793e61 100644 --- a/nat-detection/Cargo.toml +++ b/nat-detection/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0" name = "nat-detection" readme = "README.md" repository = "https://github.com/maidsafe/autonomi" -version = "0.2.12-rc.5" +version = "0.2.12" [[bin]] name = "nat-detection" @@ -17,9 +17,9 @@ path = "src/main.rs" nightly = [] [dependencies] -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-networking = { path = "../ant-networking", version = "0.3.0-rc.5" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20" } +ant-networking = { path = "../ant-networking", version = "0.3.0" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0" } clap = { version = "4.5.4", features = ["derive"] } clap-verbosity-flag = "2.2.0" color-eyre = { version = "0.6", default-features = false } diff --git a/node-launchpad/Cargo.toml b/node-launchpad/Cargo.toml index 2cda3f2f60..1709de4dac 100644 --- a/node-launchpad/Cargo.toml +++ b/node-launchpad/Cargo.toml @@ -2,7 +2,7 @@ authors = ["MaidSafe Developers "] description = "TUI for running nodes on the Autonomi network" name = "node-launchpad" -version = "0.5.0-rc.5" +version = "0.5.0" edition = "2021" license = "GPL-3.0" homepage = "https://maidsafe.net" @@ -18,13 +18,13 @@ path = "src/bin/tui/main.rs" nightly = [] [dependencies] -ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.5" } -ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.5" } -ant-evm = { path = "../ant-evm", version = "0.1.5-rc.5" } -ant-node-manager = { version = "0.11.4-rc.5", path = "../ant-node-manager" } -ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.5" } +ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" } +ant-build-info = { path = "../ant-build-info", version = "0.1.20" } +ant-evm = { path = "../ant-evm", version = "0.1.5" } +ant-node-manager = { version = "0.11.4", path = "../ant-node-manager" } +ant-protocol = { path = "../ant-protocol", version = "0.3.0" } ant-releases = { version = "0.4.0" } -ant-service-management = { version = "0.4.4-rc.5", path = "../ant-service-management" } +ant-service-management = { version = "0.4.4", path = "../ant-service-management" } arboard = "3.4.1" atty = "0.2.14" better-panic = "0.3.0" diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 44aadb7084..89409905b8 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0" name = "test-utils" readme = "README.md" repository = "https://github.com/maidsafe/safe_network" -version = "0.4.12-rc.5" +version = "0.4.12" [dependencies] bytes = { version = "1.0.1", features = ["serde"] } color-eyre = "~0.6.2" dirs-next = "~2.0.0" -evmlib = { path = "../evmlib", version = "0.1.5-rc.5" } +evmlib = { path = "../evmlib", version = "0.1.5" } libp2p = { version = "0.54.1", features = ["identify", "kad"] } rand = "0.8.5" serde = { version = "1.0.133", features = ["derive"] } From d128fa7399407a48356a954c3f56db0c13afbb2e Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Wed, 18 Dec 2024 12:41:00 +0000 Subject: [PATCH 42/43] chore: switch back to github build agent For the last several months we have been using a self-hosted build agent for the publishing step because we encountered problems with disk space on the Github build agent. Now there is some kind of issue with the connection from Github to the self-hosted agent. Going to try switching back to Github infrastructure again. Perhaps we won't encounter the disk space issue. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bac187978..fc0a33f781 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -245,7 +245,7 @@ jobs: publish-crates: if: ${{ github.repository_owner == 'maidsafe' && github.ref == 'refs/heads/stable' }} needs: [ build, s3-release ] - runs-on: self-hosted + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: From 1499aef10e49570914d102868768a996ad8996f9 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Wed, 18 Dec 2024 13:04:40 +0000 Subject: [PATCH 43/43] chore: install rust toolchain The job was assuming the existence of the Rust installation on the self-hosted agent. --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc0a33f781..a7050591cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -251,6 +251,7 @@ jobs: with: fetch-depth: "0" token: ${{ secrets.VERSION_BUMP_COMMIT_PAT }} + - uses: dtolnay/rust-toolchain@stable # Required for the creation of tags - shell: bash