Skip to content

chore: move ant-keygen to its own repository#2

Closed
jacderida wants to merge 1 commit into
mainfrom
chore-move_ant_keygen
Closed

chore: move ant-keygen to its own repository#2
jacderida wants to merge 1 commit into
mainfrom
chore-move_ant_keygen

Conversation

@jacderida

Copy link
Copy Markdown
Owner

Summary

  • Extracted ant-keygen into its own repository at WithAutonomi/ant-keygen with a standalone release workflow
  • Removed src/bin/keygen.rs and its [[bin]] entry from this repo
  • Release archives no longer bundle ant-keygen; the sign job now downloads it from the new repo's GitHub releases via gh release download
  • Cleaned up ant-keygen references from 4 deploy/testnet scripts

Test plan

  • cargo build --release passes after removal
  • cargo clippy --all-features -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_used passes
  • Verified ant-keygen v0.1.0 release exists and archive structure matches the download pattern in the sign job
  • End-to-end: trigger a release and confirm the sign job successfully downloads and uses ant-keygen

🤖 Generated with Claude Code

ant-keygen is now maintained at WithAutonomi/ant-keygen as a standalone
tool. This removes the binary from this repo and updates the release
workflow to download it from the new repo's GitHub releases instead of
building it locally.

Changes:
- Remove [[bin]] entry and src/bin/keygen.rs
- Release archives no longer bundle ant-keygen
- Sign job downloads ant-keygen via gh release download
- Remove ant-keygen references from deploy/testnet scripts
- Update release notes to link to new repo for verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jacderida jacderida closed this Mar 30, 2026
jacderida pushed a commit that referenced this pull request Apr 2, 2026
Add unit and e2e tests covering the remaining Section 18 scenarios:

Unit tests (32 new):
- Quorum: WithAutonomi#4 fail→abandoned, WithAutonomi#16 timeout→inconclusive, WithAutonomi#27 single-round
  dual-evidence, WithAutonomi#28 dynamic threshold undersized, WithAutonomi#33 batched per-key,
  WithAutonomi#34 partial response unresolved, WithAutonomi#42 quorum-derived paid-list auth
- Admission: WithAutonomi#5 unauthorized peer, WithAutonomi#7 out-of-range rejected
- Config: WithAutonomi#18 invalid config rejected, WithAutonomi#26 dynamic paid threshold
- Scheduling: WithAutonomi#8 dedup safety, WithAutonomi#8 replica/paid collapse
- Neighbor sync: WithAutonomi#35 round-robin cooldown skip, WithAutonomi#36 cycle completion,
  WithAutonomi#38 snapshot stability mid-join, WithAutonomi#39 unreachable removal + slot fill,
  WithAutonomi#40 cooldown peer removed, WithAutonomi#41 cycle termination guarantee,
  consecutive rounds, cycle preserves sync times
- Pruning: WithAutonomi#50 hysteresis prevents premature delete, WithAutonomi#51 timestamp reset
  on heal, WithAutonomi#52 paid/record timestamps independent, WithAutonomi#23 entry removal
- Audit: WithAutonomi#19/WithAutonomi#53 partial failure mixed responsibility, WithAutonomi#54 all pass,
  WithAutonomi#55 empty failure discard, WithAutonomi#56 repair opportunity filter,
  response count validation, digest uses full record bytes
- Types: WithAutonomi#13 bootstrap drain, repair opportunity edge cases,
  terminal state variants
- Bootstrap claims: WithAutonomi#46 first-seen recorded, WithAutonomi#49 cleared on normal

E2e tests (4 new):
- #2 fresh offer with empty PoP rejected
- WithAutonomi#5/WithAutonomi#37 neighbor sync request returns response
- WithAutonomi#11 audit challenge multi-key (present + absent)
- Fetch not-found for non-existent key

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jacderida added a commit that referenced this pull request Jun 8, 2026
… delta

PR WithAutonomi#122 made pricing and the freshness gate read the same record source, but
uploads on a fresh, rapidly-filling testnet (STG-01, 0.11.6-rc.2) still failed
~100%. The residual cause is the freshness gate itself.

The gate compared the price-derived quoted record count against the node's
current count with a fixed `max(5, 5%)` tolerance, symmetrically (abs_diff). Two
problems on an actively-replicating network:

1. Tolerance too tight for normal in-flight churn. Between a node quoting and
   verifying a payment (the client collects 7 quotes/chunk, pays on-chain via
   Arbitrum, then PUTs — several seconds) the node's record count drifts by a
   handful of records via replication. Sampled STG-01 rejects had a median
   delta of 8 — just over the floor of 5. At low/moderate fill the pricing
   curve is nearly flat, so that drift is a negligible price change, yet it was
   rejected.

2. Symmetric abs_diff rejected over-payments. ~36% of rejects had current <
   quoted: the node had FEWER records than when it quoted (prune/churn), so the
   client paid for a fuller, pricier node — an over-payment — and the node
   rejected it anyway. Rejecting money a node is owed is nonsensical.

Because an upload needs every chunk stored, even a ~40% per-chunk reject rate
drives upload success to ~0 (0.6^9 for a 9-chunk file; worse for large files).
So per-chunk rejection has to approach zero, not merely shrink.

Fix: make the gate price-based and one-directional. Compute the price the node
would charge now for its current fullness and reject only if the quote paid
less than that by more than QUOTE_PRICE_STALENESS_PCT_TOLERANCE (25%).

- Over-payment (paid >= current price) is always accepted (fixes #2).
- Comparing prices self-scales with the quadratic curve: benign churn on the
  flat part of the curve is ignored, while genuine staleness at high fill —
  where the curve is steep — is still caught (fixes #1).

Replaces the two record-delta tolerance constants with a single price
percentage. Reworks the freshness tests: a 10-record drift now passes (it was
"stale by 10" before), over-payment passes (regression test for #2), and a
quote underpricing by >25% is still rejected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant