refactor!: upgrade ant-node 0.7, close group quoting and replication#5
Merged
refactor!: upgrade ant-node 0.7, close group quoting and replication#5
Conversation
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>
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>
jacderida
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ant-nodefrom 0.6 to 0.7REQUIRED_QUOTESwithCLOSE_GROUP_SIZEandCLOSE_GROUP_MAJORITYfromant_protocolCLOSE_GROUP_SIZE(5) closest peersCLOSE_GROUP_MAJORITY(3) already-stored confirmations before skipping payment, with early returnCLOSE_GROUP_MAJORITY(3) peers instead of a single targetclose_group_sizeconfig to the protocol'sCLOSE_GROUP_SIZEconstant instead of hardcoded 8CLIENT_TIMEOUT_SECSconst, remove redundant per-test declarationsTest plan
cargo checkpassescargo clippy --all-targets --all-features -- -D warningscleancargo test --allpasses🤖 Generated with Claude Code