Skip to content

Release v0.10.0#71

Merged
jacderida merged 54 commits intomainfrom
rc-2026.4.1
Apr 15, 2026
Merged

Release v0.10.0#71
jacderida merged 54 commits intomainfrom
rc-2026.4.1

Conversation

@jacderida
Copy link
Copy Markdown
Collaborator

Summary

  • Update saorsa-core to v0.23.0
  • Enable logging feature flag in release builds
  • Pricing baseline recalibration with floor
  • Fix replication shutdown hang under active traffic
  • Cap concurrent outbound replication sends
  • Require --enable-logging flag for tracing subscriber
  • Bump version to 0.10.0

Test plan

  • Verify release workflow builds with --features logging
  • Smoke test a testnet with the built binaries
  • Confirm auto-upgrade works from latest RC

🤖 Generated with Claude Code

jacderida and others added 30 commits April 4, 2026 18:11
Point saorsa-core at the saorsa-labs GitHub repo rc-2026.4.1 branch
instead of the crates.io published version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 1 pricing recalibration. The legacy formula
`price = (n / 6000)²` produced ~$25/GB at the lower stable boundary
and ~$0/GB when nodes were empty (with only a 1-wei sentinel floor) —
both unreasonable for the current ~\$0.10/ANT token price.

New formula:
    price_per_chunk_ANT(n) = BASELINE + K × (n / D)²

with BASELINE = 0.00390625 ANT (spam barrier at empty), K = 0.03515625
ANT (re-anchored coefficient), and D = 6000 (unchanged). The non-zero
baseline removes the need for the legacy MIN_PRICE_WEI = 1 sentinel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…bration

feat(pricing): add baseline floor and recalibrate quadratic coefficient
jacderida and others added 20 commits April 7, 2026 20:20
Even with the `logging` feature compiled in (the default), the tracing
subscriber is now only installed when the user passes `--enable-logging`
(or sets `ANT_ENABLE_LOGGING=1`). Without the flag, ant-node and
ant-devnet emit zero log output. The remaining `--log-*` options are
ignored unless the flag is set.

BREAKING CHANGE: Default builds no longer log to stdout automatically.
Operators that relied on implicit logging must now pass
`--enable-logging` (or set `ANT_ENABLE_LOGGING=1`).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…aturation

Add a shared semaphore (MAX_CONCURRENT_REPLICATION_SENDS = 3) that limits
how many fresh-replication chunk transfers can be in-flight simultaneously.
Previously, storing a chunk immediately spawned 7 concurrent 4MB sends with
no throttling, which saturates home broadband upload links. With the
semaphore, all 7 replicas are still made (no data loss risk) but sends
queue through the semaphore instead of firing all at once. PaidNotify
messages are exempt as they carry only small metadata.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allows binary verification via `strings` and runtime observability of the
semaphore's available permits during fresh replication.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…aphore

fix: cap concurrent outbound replication sends
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ctive traffic

The neighbor sync loop ran `run_neighbor_sync_round()` outside of its
`tokio::select!` block. When shutdown was cancelled mid-round, the task
couldn't notice until the entire sync round completed — which involves
multiple network round-trips to peers that may themselves be shutting
down, causing extended blocking.

Wrap the sync round in a `tokio::select!` with `shutdown.cancelled()` so
in-progress operations are cancelled immediately when shutdown fires.

Also add a 10-second timeout to the replication engine's task joins in
`shutdown()` as defense in depth, matching the same pattern applied to
`DhtNetworkManager::stop()`.

Discovered during auto-upgrade testing on a 151-node testnet with active
client uploads. The DHT shutdown fix (saorsa-core) resolved 98% of
hangs; this fix resolved the remaining 2%.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…g-under-traffic

fix: prevent replication neighbor sync from blocking shutdown under active traffic
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat!: require --enable-logging flag to install tracing subscriber
The logging feature flag was recently added but release builds used
--no-default-features which stripped it. Enable it explicitly so
production binaries include logging infrastructure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 14, 2026 23:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Release-focused changes for ant-node v0.10.0, updating core dependencies and adjusting runtime behavior around replication, pricing, and logging for production builds.

Changes:

  • Add replication shutdown hardening (timeout + abort) and cancelability improvements; cap concurrent outbound fresh-replication sends via a global semaphore.
  • Recalibrate storage pricing with a non-zero baseline floor and updated quadratic coefficient, with updated unit tests.
  • Require --enable-logging to install the tracing subscriber; enable the logging feature in stable release workflow builds; bump to v0.10.0 and update saorsa-core.

Reviewed changes

Copilot reviewed 6 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/replication/mod.rs Adds global send semaphore wiring; makes neighbor sync round cancelable; adds shutdown timeout/abort behavior.
src/replication/fresh.rs Gates outbound fresh replication sends with a semaphore permit.
src/replication/config.rs Introduces MAX_CONCURRENT_REPLICATION_SENDS constant.
src/payment/pricing.rs Replaces legacy pricing with baseline+quadratic formula and updates tests.
src/bin/ant-node/main.rs Only installs tracing subscriber when --enable-logging is provided.
src/bin/ant-node/cli.rs Adds --enable-logging CLI flag (feature-gated).
src/bin/ant-devnet/main.rs Only installs tracing subscriber when --enable-logging is provided.
src/bin/ant-devnet/cli.rs Adds --enable-logging CLI flag (feature-gated) and gates --log-level behind logging feature.
Cargo.toml Bumps crate version; updates saorsa-core dependency source/tag.
Cargo.lock Locks updated dependency graph for the release.
.github/workflows/release.yml Enables logging feature for stable release builds even with --no-default-features.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/replication/mod.rs
Ok(Err(e)) => warn!("Replication task {i} panicked during shutdown: {e}"),
Err(_) => {
warn!("Replication task {i} did not stop within 10s, aborting");
handle.abort();
Comment thread Cargo.toml Outdated
jacderida and others added 2 commits April 15, 2026 00:41
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 15, 2026 00:30
@jacderida jacderida merged commit b97aeeb into main Apr 15, 2026
13 checks passed
@jacderida jacderida deleted the rc-2026.4.1 branch April 15, 2026 00:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Release v0.10.0 updates the node’s dependency set and operational defaults while tightening replication behavior (shutdown responsiveness and outbound send concurrency) and recalibrating the pricing baseline to include a non-zero floor.

Changes:

  • Bump saorsa-core to 0.23.0 and finalize crate version 0.10.0.
  • Improve replication robustness: cap concurrent outbound fresh-replication sends and make shutdown cancel/timeout long-running tasks.
  • Gate tracing subscriber installation behind an explicit --enable-logging flag, and build release artifacts with the logging feature enabled.

Reviewed changes

Copilot reviewed 6 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/replication/mod.rs Adds a global send semaphore, improves shutdown behavior with timeouts/abort, and makes neighbor sync cancelable on shutdown.
src/replication/fresh.rs Uses a shared semaphore to cap concurrent outbound fresh replication chunk sends.
src/replication/config.rs Introduces MAX_CONCURRENT_REPLICATION_SENDS configuration constant.
src/payment/pricing.rs Replaces legacy quadratic pricing with a baseline floor + quadratic term; updates unit tests accordingly.
src/bin/ant-node/main.rs Requires --enable-logging to install the tracing subscriber even when built with logging.
src/bin/ant-node/cli.rs Adds --enable-logging CLI flag (feature-gated) and documents behavior.
src/bin/ant-devnet/main.rs Mirrors the --enable-logging gating for devnet tracing subscriber installation.
src/bin/ant-devnet/cli.rs Adds --enable-logging flag and feature-gates --log-level.
Cargo.toml Updates version to 0.10.0 and bumps saorsa-core dependency.
Cargo.lock Locks dependency graph updates for the new release and dependency bumps.
.github/workflows/release.yml Builds release binaries with --features logging while keeping other defaults stripped.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/replication/mod.rs
Ok(Err(e)) => warn!("Replication task {i} panicked during shutdown: {e}"),
Err(_) => {
warn!("Replication task {i} did not stop within 10s, aborting");
handle.abort();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants