feat(chunk-post): fault-domain-aware quorum + soft-preferred fallback (B2)#806
Closed
vilenarios wants to merge 1 commit into
Closed
feat(chunk-post): fault-domain-aware quorum + soft-preferred fallback (B2)#806vilenarios wants to merge 1 commit into
vilenarios wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/ip-fault-domain #806 +/- ##
========================================================
- Coverage 78.79% 78.77% -0.02%
========================================================
Files 132 132
Lines 50189 50395 +206
Branches 3803 3814 +11
========================================================
+ Hits 39548 39701 +153
- Misses 10592 10645 +53
Partials 49 49 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Makes chunk fanout fault-domain-aware and removes the single-fault-domain
tips SPOF (all five tip-*.arweave.xyz resolve into one 38.29.227.0/24, so a
tips outage hard-fails every POST today). Both behaviors are opt-in and
default to the legacy quorum exactly.
- Distinct-domain counting: buckets each successful peer by IP /24 (v4) /48
(v6) via ipFaultDomain; CHUNK_POST_MIN_DISTINCT_DOMAINS (default 0=off) adds
a soft target among successes that degrades gracefully when the eligible
peer set can't supply N (never hard-fails on scarcity).
- Soft-preferred fallback: CHUNK_POST_PREFERRED_SOFT_FALLBACK (default false)
lets a strong distinct-domain discovered quorum satisfy a POST when NO tip
was eligible (tips down/over-queue) — but never when tips merely failed,
so tips stay the hard primary on-ranp on a real outage only.
- Centralized verdict: evaluateChunkBroadcastVerdict is the single source of
truth for "seeded sufficiently?"; the handler reads result.succeeded instead
of recomputing the thresholds (removes latent drift). With both flags at
defaults it reduces EXACTLY to the legacy rule (regression test).
- Placement-evidence contract: BroadcastChunkResult now carries
distinctDomainCount/preferredEligibleCount/succeeded, and POST /chunk emits
X-AR-IO-Chunk-Placement-Domains — so the bundler can consume where a chunk
landed instead of collapsing the result to pass/fail (see plan §18).
- Metrics: chunk_post_distinct_domains (histogram),
chunk_post_preferred_shortfall_total{reason}, chunk_post_domain_shortfall_total{reason}.
Preferred shortfall is emitted even when the fallback makes the POST succeed,
so a tips outage is never silently masked.
Depends on #805 (ipFaultDomain). Default-off; soak before any default flip.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQPK4TXcVoXoyFp6sNW2Lr
fcf5e88 to
ce714b7
Compare
This was referenced Jul 1, 2026
Contributor
Author
|
Superseded by #812 — consolidated into the |
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.
Stacked on #805 (
ipFaultDomain) — base will retarget todeveloponce #805 merges.What
Makes chunk fanout fault-domain-aware and removes the single-fault-domain tips SPOF: all five
tip-*.arweave.xyzresolve into one38.29.227.0/24, so today's hardCHUNK_POST_MIN_PREFERRED_SUCCESS_COUNT=2means a tips outage hard-fails every chunk POST even when independent discovered peers accepted it. Both new behaviors are opt-in and default to the exact legacy quorum.Changes
/24·/48(ipFaultDomain).CHUNK_POST_MIN_DISTINCT_DOMAINS(default0= off) adds a soft target among successes that degrades gracefully when the eligible peer set can't supply N (never hard-fails on scarcity).CHUNK_POST_PREFERRED_SOFT_FALLBACK(defaultfalse) lets a strong distinct-domain discovered quorum satisfy a POST only when no tip was eligible (tips down/over-queue) — never when tips merely failed, so tips stay the hard primary on a real outage only.evaluateChunkBroadcastVerdictis the single source of truth for "seeded sufficiently?"; the handler readsresult.succeededinstead of recomputing thresholds (removes latent drift). With both flags at defaults it reduces exactly to the legacy rule — covered by a regression test.BroadcastChunkResultnow carriesdistinctDomainCount/preferredEligibleCount/succeeded, andPOST /chunkemits theX-AR-IO-Chunk-Placement-Domainsheader, so the bundler can consume where a chunk landed instead of collapsing the result to pass/fail. (Bundler-side consumption is a separate cross-repo proposal.)chunk_post_distinct_domains(histogram),chunk_post_preferred_shortfall_total{reason}(emitted even when the fallback makes the POST succeed → a tips outage is never silently masked),chunk_post_domain_shortfall_total{reason}.Safety / rollout
MIN_DISTINCT_DOMAINS=0+PREFERRED_SOFT_FALLBACK=false⇒ byte-identical to today's behavior (regression-tested).chunk_post_distinct_domainsrises, no regression with flags off.Tests
config20/20 ·composite-client24/24 (verdict logic exhaustively: default-off regression, fallback fires only ontips_unavailable, domain soft-degrade) ·ip-utils50/50 · lint clean.🤖 Generated with Claude Code