Skip to content

Commit

Permalink
Merge branch 'rc-2024.12.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jacderida committed Dec 18, 2024
2 parents 537a040 + 8a1957c commit dbc194f
Show file tree
Hide file tree
Showing 78 changed files with 843 additions and 468 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,local --lib

- name: Run autonomi doc tests
timeout-minutes: 25
run: cargo test --release --package autonomi --features full,local --doc

- name: Run bootstrap tests
timeout-minutes: 25
Expand All @@ -134,6 +138,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.
Expand Down Expand Up @@ -404,7 +412,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
Expand All @@ -419,7 +427,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)
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
101 changes: 101 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions ant-bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ version = "0.1.0"
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" }
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"] }
Expand All @@ -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"
wasmtimer = "0.2.0"
13 changes: 9 additions & 4 deletions ant-bootstrap/src/initial_peers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion ant-build-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "ant-build-info"
readme = "README.md"
repository = "https://github.com/maidsafe/autonomi"
version = "0.1.19"
version = "0.1.20"
build = "build.rs"
include = ["Cargo.toml", "src/**/*", "build.rs"]

Expand Down
4 changes: 2 additions & 2 deletions 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 = "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 = "5";
Loading

0 comments on commit dbc194f

Please sign in to comment.