Skip to content

Commit

Permalink
Merge branch 'stable' into rc-2024.12.1-hotfix5
Browse files Browse the repository at this point in the history
  • Loading branch information
jacderida committed Jan 20, 2025
2 parents 819d69b + 92ed942 commit 23d9ae4
Show file tree
Hide file tree
Showing 23 changed files with 144 additions and 120 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ jobs:
ls -l $ANT_DATA_PATH/client_first/logs
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 --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'Total cost: 0 AttoTokens' ./upload_output_second -c --stats
env:
ANT_LOG: "all"
timeout-minutes: 25

- name: showing the second upload terminal output
run: cat second_upload
run: cat upload_output_second
shell: bash
if: always()

Expand All @@ -115,7 +115,7 @@ jobs:
- name: Start the restart node again
run: |
./target/release/antnode \
--root-dir-type PARESTART_TEST_NODE_DATA_PATH \
--root-dir $RESTART_TEST_NODE_DATA_PATH \
--log-output-dest $RESTART_TEST_NODE_DATA_PATH \
--local \
--rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" &
Expand Down Expand Up @@ -164,6 +164,22 @@ jobs:
run: pgrep antnode | wc -l
if: always()

- name: confirm opened FDs
shell: bash
timeout-minutes: 1
run: |
fd_cap="30"
pids=$(pgrep antnode)
for pid in $pids; do
fd_count=$(ls /proc/$pid/fd | wc -l)
echo "Process $pid - File Descriptors: $fd_count"
if (( $(echo "$fd_count > $fd_cap" | bc -l) )); then
echo "Process $pid holding FD exceeded threshold: $fd_cap"
exit 1
fi
done
if: always()

- name: Stop the local network and upload logs
if: always()
uses: maidsafe/ant-local-testnet-action@main
Expand Down
76 changes: 74 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,88 @@ 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.*

## 2025-01-20

### Client

#### Fixed

- Remove unallocated static IP from the bootstrap mechanism. We have five static IP addresses
allocated to five hosts, each of which run nodes and a minimal web server. The web server makes a
list of peers available to nodes and clients to enable them to join the network. These static IP
addresses are hard-coded in the `antnode` and `ant` binaries. It was discovered we had accidentally
added six IPs and one of those was unallocated. Removing the unallocated IP should reduce the time
to connect to the network.

### Network

#### Changed

- Reduce the frequency of metrics collection in the node's metrics server, from fifteen to sixty
seconds. This should reduce resource usage and improve performance.
- Do not refresh all CPU information in the metrics collection process in the node's metrics server.
Again, this should reduce resource usage and improve performance.
- Remove the 50% CPU usage safety measure. We added a safety measure to the node to cause the
process to terminate if the system's CPU usage exceeded 50% for five consecutive minutes. This was
to prevent cascading failures resulting from too much churn when a large node operator pulled the
plug on tens of thousands of nodes in a very short period of time. If other operators had
provisioned to max capacity and not left some buffer room for their own nodes, many other node
processes could die from the resulting churn. After an internal discussion, the decision was taken
to remove the safety measure.

## 2025-01-14

### Client

#### Fixed

- Remove `uploaded` timestamp from archive metadata to prevent unnecessary re-uploads when archive
contents remain unchanged. This ensures we do not charge when uploading the same file more than
once on `ant file upload`.
- Switch from `HashMap` to `BTreeMap` for archive to ensure deterministic serialization, which also
prevents unnecessary re-uploads. As above, this facilitates the fix for the duplicate payment
issue.

## 2025-01-09

## Network
### Network

### Changed
#### Changed

- Network discovery no longer queries the farthest full buckets. This significantly reduces the
number of messages as the network grows, resulting in fewer open connections and reduced resource
usage.

## 2025-01-06

### Network

#### Changed

- Memory and CPU metrics use more precise `f64` measurements

### Client

#### Fixed

- Apply a timeout for EVM transactions. This fixes an issue where some uploads would freeze indefinitely.
- The `ant` CLI was not selecting its network consistently from the environment variable.

## 2024-12-21

### Network

#### Fixed

- Do not dial back when a new peer is detected. This resulted in a large number of open connections,
in turn causing increased CPU usage.

### Client

#### Changed

- Remove the 'dial error' output on the `file upload` command

## 2024-12-21

### Network
Expand Down
15 changes: 7 additions & 8 deletions Cargo.lock

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

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

[features]
local = []

[dependencies]
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-logging = { path = "../ant-logging", version = "0.2.45" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
atomic-write-file = "0.2.2"
chrono = { version = "0.4", features = ["serde"] }
Expand Down
1 change: 0 additions & 1 deletion ant-bootstrap/src/contacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const MAINNET_CONTACTS: &[&str] = &[
"http://159.223.246.45/bootstrap_cache.json",
"http://139.59.201.153/bootstrap_cache.json",
"http://139.59.200.27/bootstrap_cache.json",
"http://139.59.198.251/bootstrap_cache.json",
];

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

[dependencies]
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.3" }
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.4" }
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-logging = { path = "../ant-logging", version = "0.2.45" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
autonomi = { path = "../autonomi", version = "0.3.3", features = [
autonomi = { path = "../autonomi", version = "0.3.4", features = [
"fs",
"vault",
"registers",
Expand Down Expand Up @@ -60,7 +60,7 @@ tracing = { version = "~0.1.26" }
walkdir = "2.5.0"

[dev-dependencies]
autonomi = { path = "../autonomi", version = "0.3.3", features = ["fs"]}
autonomi = { path = "../autonomi", version = "0.3.4", features = ["fs"]}
criterion = "0.5.1"
eyre = "0.6.8"
rand = { version = "~0.8.5", features = ["small_rng"] }
Expand Down
2 changes: 1 addition & 1 deletion ant-logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "ant-logging"
readme = "README.md"
repository = "https://github.com/maidsafe/autonomi"
version = "0.2.44"
version = "0.2.45"

[dependencies]
chrono = "~0.4.19"
Expand Down
4 changes: 2 additions & 2 deletions ant-logging/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::time::Duration;
use sysinfo::{self, Networks, Pid, System};
use tracing::{debug, error};

const UPDATE_INTERVAL: Duration = Duration::from_secs(15);
const UPDATE_INTERVAL: Duration = Duration::from_secs(60);
const TO_MB: u64 = 1_000_000;

// The following Metrics are collected and logged
Expand Down Expand Up @@ -44,7 +44,7 @@ struct ProcessMetrics {
// Obtains the system metrics every UPDATE_INTERVAL and logs it.
// The function should be spawned as a task and should be re-run if our main process is restarted.
pub async fn init_metrics(pid: u32) {
let mut sys = System::new_all();
let mut sys = System::new();
let mut networks = Networks::new_with_refreshed_list();
let pid = Pid::from_u32(pid);

Expand Down
4 changes: 2 additions & 2 deletions ant-networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "ant-networking"
readme = "README.md"
repository = "https://github.com/maidsafe/autonomi"
version = "0.3.3"
version = "0.3.4"

[features]
default = []
Expand All @@ -20,7 +20,7 @@ upnp = ["libp2p/upnp"]

[dependencies]
aes-gcm-siv = "0.11.1"
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.3" }
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.4" }
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-evm = { path = "../ant-evm", version = "0.1.8" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
Expand Down
4 changes: 2 additions & 2 deletions ant-networking/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use prometheus_client::{
use sysinfo::{Pid, ProcessRefreshKind, System};
use tokio::time::Duration;

const UPDATE_INTERVAL: Duration = Duration::from_secs(15);
const UPDATE_INTERVAL: Duration = Duration::from_secs(60);
const TO_MB: u64 = 1_000_000;

/// The shared recorders that are used to record metrics.
Expand Down Expand Up @@ -256,7 +256,7 @@ impl NetworkMetricsRecorder {

let pid = Pid::from_u32(std::process::id());
let process_refresh_kind = ProcessRefreshKind::everything().without_disk_usage();
let mut system = System::new_all();
let mut system = System::new();
let physical_core_count = system.physical_core_count();

tokio::spawn(async move {
Expand Down
4 changes: 2 additions & 2 deletions ant-node-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ tcp = []
websockets = []

[dependencies]
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.3" }
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.4" }
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-evm = { path = "../ant-evm", version = "0.1.8" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-logging = { path = "../ant-logging", version = "0.2.45" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
ant-releases = { version = "0.4.0" }
ant-service-management = { path = "../ant-service-management", version = "0.4.7" }
Expand Down
6 changes: 3 additions & 3 deletions ant-node-rpc-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.40"
version = "0.6.41"

[[bin]]
name = "antnode_rpc_client"
Expand All @@ -18,9 +18,9 @@ nightly = []

[dependencies]
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-logging = { path = "../ant-logging", version = "0.2.45" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3", features=["rpc"] }
ant-node = { path = "../ant-node", version = "0.3.3" }
ant-node = { path = "../ant-node", version = "0.3.5" }
ant-service-management = { path = "../ant-service-management", version = "0.4.7" }
async-trait = "0.1"
bls = { package = "blsttc", version = "8.0.1" }
Expand Down
Loading

0 comments on commit 23d9ae4

Please sign in to comment.