Skip to content

feat: Ripple family support (ripple, ripple-testnet)#284

Open
artemrootman wants to merge 4 commits into
arootman/near-supportfrom
arootman/ripple-support
Open

feat: Ripple family support (ripple, ripple-testnet)#284
artemrootman wants to merge 4 commits into
arootman/near-supportfrom
arootman/ripple-support

Conversation

@artemrootman

Copy link
Copy Markdown
Contributor

What

Adds the Ripple / XRP Ledger blockchain family (BlockchainType = "ripple"), covering mainnet and testnet. Not to be confused with the xrpl chain (the XRPL EVM sidechain, already served by the EVM family).

Design doc: docs/superpowers/specs/2026-07-17-ripple-support-design.md.

Stacked on #283 (near family); will retarget to main once it merges.

How

  • ripple_specific: poll-based validated-ledger head (deliberately not ledger_closed, which can return a not-yet-validated ledger; validated is XRPL finality and carries parent_hash). Poll-only — XRPL subscriptions are WS-command-framed, out of v1 scope.
  • Response normalization: XRPL application errors arrive as HTTP 200 {result:{status:"error"}} and clients (xrpl.js) expect that wire shape. A per-spec wildcard translator converts only node-health codes (noNetwork, noCurrent, noClosed, tooBusy, amendmentBlocked, notReady, failedToForward) into retryable errors so failover engages; everything else passes through byte-exact.
  • ripple_validations: network-id chain validation (the field is absent on mainnet = 0) and server_state health with a corrected state ladder (full/validating/proposing/tracking available, connected/syncing syncing, amendment_blocked hard-down).
  • ripple_bounds: real complete_ledgers parsing (single/disjoint/"empty"; start of the last range). Introduces the DecreasingBoundDetector capability: an archival rippled backfills history backwards, so its lower bound legally decreases — the shared processor's monotonic filter now honors that opt-in (only ripple opts in; other families unchanged).
  • ripple_labels: clio_version → clio, else build_version → rippled.
  • Method spec: 38-method surface (dshackle parity minus subscribe/unsubscribe — over public HTTP those are an admin-only callback mode), submit/submit_multisigned broadcast (idempotent by tx hash + account sequence), all cacheable: false in v1.

Testing

  • Unit tests across all new packages incl. the decreasing-bound processor path and the network-id-absent case.
  • Live corpus against production rippled 3.2.0 mainnet + testnet nodes: 46/46 identical, byte-exact result objects for all deterministic cases including error passthroughs and the ledger_data pagination marker. Details in the design doc.

- ripple_specific: validated-ledger head (deliberately not dshackle's
  ledger_closed - closed may be unvalidated; validated is XRPL finality and
  carries parent_hash), poll-only (XRPL subscriptions are WS-command-framed,
  out of v1 scope).
- ripple_validations: network-id chain validation (absent field = mainnet/0)
  and server_state health with a corrected mapping vs dshackle
  (full/validating/proposing/tracking available, connected/syncing syncing,
  amendment_blocked hard-down) + same-payload peer check.
- ripple_labels: clio_version -> clio, else build_version -> rippled.
- ripple_bounds: real complete_ledgers parsing (single/disjoint/empty; start
  of the last range) instead of dshackle's hardcoded STATE=1; opts into the
  new DecreasingBoundDetector capability - archival backfill legally moves
  the bound DOWN, the shared processor's monotonic filter now honors that
  opt-in only.
- flow: per-spec wildcard translator lookup + rippleErrorNormalizer - XRPL
  errors arrive as HTTP 200 {result:{status:error}}; node-health codes
  (noNetwork/noCurrent/noClosed/tooBusy/amendmentBlocked/notReady/
  failedToForward) become retryable errors so failover engages, everything
  else passes through byte-exact for xrpl.js wire parity.
- ripple method spec: 38-method surface (dshackle minus subscribe/
  unsubscribe), submit/submit_multisigned broadcast, cacheable:false v1.
- registry: Ripple BlockchainType + factory case + method-spec name.
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