fix(chain): tolerate recovered RPC minority during CG binding - #2218
Merged
Conversation
branarakic
force-pushed
the
codex/cg-name-hash-rpc-quorum
branch
from
August 10, 2026 01:14
c94b576 to
e039cca
Compare
10 tasks
branarakic
marked this pull request as ready for review
August 10, 2026 05:07
branarakic
pushed a commit
that referenced
this pull request
Aug 10, 2026
branarakic
changed the base branch from
codex/vm-metadata-provenance-repair
to
testnet-canary
August 10, 2026 16:11
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.
Stack dependency
This PR is stacked on #2184 because
testnet-canarydoes not yet contain the finalized Context Graph name-hash resolver.After #2184 merges, retarget this PR to
testnet-canarybefore merging. Do not merge the stacked PR independently of #2184.User impact
Cold VM / Context Graph name-hash resolution no longer restarts the complete
O(slots × providers)refresh merely because a minority of public RPC backends times out, disconnects, or returns HTTP 429.The 2-of-3 rule applies only to per-slot reads. A positive/null resolution and index/cache commit still require every configured backend to answer the final registry high-water fence; persistent minority unavailability remains retryable and fails closed.
For a three-provider configuration, two agreeing covering providers may stage slot work while the third has a retryable transport failure. The refresh does not return a positive/null resolution or commit its index/cache until final high-water verification confirms the complete provider boundary. If the third provider remains unavailable at that boundary, the refresh fails closed and stays retryable. Safety remains fail-closed:
BAD_DATAare non-retryable;Before
sequenceDiagram participant Agent as DKG Agent participant RPC1 as RPC A participant RPC2 as RPC B participant RPC3 as RPC C Agent->>RPC1: Read registry high-water and slot Agent->>RPC2: Read registry high-water and slot Agent->>RPC3: Read registry high-water and slot RPC1-->>Agent: Matching value RPC2-->>Agent: Matching value RPC3--xAgent: Timeout or HTTP 429 Agent-->>Agent: Abort the complete refreshAfter
sequenceDiagram participant Agent as DKG Agent participant RPC1 as RPC A participant RPC2 as RPC B participant RPC3 as RPC C Agent->>RPC1: Read registry high-water and slot Agent->>RPC2: Read registry high-water and slot Agent->>RPC3: Read registry high-water and slot RPC1-->>Agent: Matching slot value RPC2-->>Agent: Matching slot value RPC3--xAgent: Retryable slot timeout or HTTP 429 Agent->>Agent: Stage the strict-majority slot result Agent->>RPC1: Verify final registry high-water Agent->>RPC2: Verify final registry high-water Agent->>RPC3: Verify final registry high-water alt Every configured backend answers consistently RPC1-->>Agent: Final high-water RPC2-->>Agent: Final high-water RPC3-->>Agent: Final high-water Agent-->>Agent: Commit the fully fenced refresh else Any backend remains unavailable or disagrees RPC3--xAgent: Unavailable or inconsistent Agent-->>Agent: Fail closed without index/cache commit endValidation
pnpm --filter @origintrail-official/dkg-chain buildgit diff --check