Skip to content

refactor!: upgrade ant-node 0.7, close group quoting and replication#5

Merged
jacderida merged 5 commits intomainfrom
chore-upgrade_ant_node_0.7
Mar 25, 2026
Merged

refactor!: upgrade ant-node 0.7, close group quoting and replication#5
jacderida merged 5 commits intomainfrom
chore-upgrade_ant_node_0.7

Conversation

@mickvandijke
Copy link
Contributor

@mickvandijke mickvandijke commented Mar 25, 2026

Summary

  • Upgrade ant-node from 0.6 to 0.7
  • Replace removed REQUIRED_QUOTES with CLOSE_GROUP_SIZE and CLOSE_GROUP_MAJORITY from ant_protocol
  • Only request quotes from the CLOSE_GROUP_SIZE (5) closest peers
  • Require CLOSE_GROUP_MAJORITY (3) already-stored confirmations before skipping payment, with early return
  • Replicate chunks to CLOSE_GROUP_MAJORITY (3) peers instead of a single target
  • Default close_group_size config to the protocol's CLOSE_GROUP_SIZE constant instead of hardcoded 8
  • Extract CLIENT_TIMEOUT_SECS const, remove redundant per-test declarations
  • Reduce default peer request timeout from 30s to 10s (only covers peer-to-peer requests, not EVM payments)

Test plan

  • cargo check passes
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo test --all passes
  • E2E node management test with real testnet

🤖 Generated with Claude Code

mickvandijke and others added 2 commits March 25, 2026 17:01
Replace REQUIRED_QUOTES (removed in ant-node 0.7) with CLOSE_GROUP_SIZE
and CLOSE_GROUP_MAJORITY from ant_protocol. Quote collection now only
asks the CLOSE_GROUP_SIZE closest peers instead of over-fetching and
sorting, and requires CLOSE_GROUP_MAJORITY already-stored confirmations
before skipping payment (with early return).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Store chunks to CLOSE_GROUP_MAJORITY (3) peers instead of a single
target peer, improving data redundancy. pay_for_storage now returns all
quoted peers, and chunk_put_to_close_group sends PUT concurrently to
all peers, succeeding once a majority confirm storage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mickvandijke mickvandijke changed the title refactor!: upgrade ant-node to 0.7, use CLOSE_GROUP_SIZE refactor!: upgrade ant-node to 0.7, CLOSE_GROUP_SIZE quoting, majority replication Mar 25, 2026
mickvandijke and others added 3 commits March 25, 2026 17:55
Replace hardcoded default of 8 with the protocol's CLOSE_GROUP_SIZE (5)
so the client config aligns with the network's close group definition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract the hardcoded 30s default into a named constant and remove
redundant per-test CLIENT_TIMEOUT_SECS declarations that duplicated
the default. Tests now use ClientConfig::default() directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The timeout only applies to individual peer-to-peer requests (quotes,
PUT, GET), not EVM payments. 30s was unnecessarily generous; 10s gives
enough headroom for NAT hole-punching while failing faster on
unreachable peers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mickvandijke mickvandijke changed the title refactor!: upgrade ant-node to 0.7, CLOSE_GROUP_SIZE quoting, majority replication refactor!: upgrade ant-node 0.7, close group quoting and replication Mar 25, 2026
@jacderida jacderida merged commit 1a90ca8 into main Mar 25, 2026
11 of 12 checks passed
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.

2 participants