Skip to main content

Replaying Fiber Failure

Week 10 was the build week where Reef became a real CKB/Fiber diagnostics system. It connected Fiber RPC objects to payment rows, attempted routes, channel state, peer state, graph evidence, CKB funding outpoints, optional CCH coverage, and bounded observation history. Week 11 is the next step: prove the diagnostic model against a failure sequence. The thesis for the week is: A Fiber diagnostic is only useful if it can replay a real failure sequence without pretending it knows more than the node proved. That is the line Reef has to hold.

From diagnosis to replay

A single failed payment diagnosis is useful, but operators usually need a sequence. They need to know:
  • did the same route shape work before?
  • what failed during the incident?
  • what attempted route did Fiber expose?
  • which channel edges were involved?
  • which peers were connected or missing?
  • did CKB funding evidence still exist for those channel outpoints?
  • did a later matching payment succeed?
  • does that later success prove recovery, or only show that recovery happened?
Week 11 is about that difference. The goal is not to make Reef sound more certain. The goal is to make the evidence trail harder to misread.

The incident shape

The useful replay shape is:
  1. A baseline success.
  2. A controlled or observed disruption.
  3. A failed routed payment attempt.
  4. An attempted route autopsy.
  5. Channel, peer, and CKB funding correlation.
  6. A later matching success.
  7. A clear statement that causal repair is not proven unless the evidence actually proves it.
That sequence is technical because each step has a source boundary. The baseline and recovery come from retained Fiber payment rows. The failed attempt comes from Fiber payment evidence and error text. The route autopsy comes from attempted route data when Fiber exposes it. Peer state comes from list_peers. Channel edges and funding outpoints come from list_channels. Funding checks come from CKB RPC. Graph context comes from local Fiber graph rows or public topology fallback. Those sources should be correlated, not collapsed.

Route autopsy without overclaiming

The route autopsy is the center of the replay. It should preserve:
  • ordered nodes;
  • channel edges;
  • forward amounts;
  • receiver amount;
  • route fee;
  • retry count;
  • failed-hop attribution if Fiber exposed it;
  • an explicit limitation if Fiber did not expose it.
That last item is not a footnote. It is the difference between useful infrastructure and fake certainty. If Fiber exposes an attempted route but not the failed hop, Reef can say: this was the route attempted It cannot say: this exact hop failed unless the node exposes that evidence.

CKB still matters during replay

Fiber is a payment-channel network on CKB, so a route edge is not only a graph edge. It is also tied to a funded channel. During replay, Reef should carry channel outpoints into CKB RPC checks. That gives the incident view a chain evidence path:
  • Fiber reports the channel edge.
  • Fiber reports the channel funding outpoint.
  • CKB RPC reports whether the funding transaction can be read.
  • Reef keeps funding lookup failure separate from peer failure.
That separation matters. A peer can be disconnected while CKB funding evidence is still available. A CKB lookup can fail while a peer is connected. Those are different failure surfaces.

Recovery is not causality

The most dangerous part of incident replay is the end. A later matching success is strong evidence that the payment path recovered. It may match the same route fingerprint, amount, and fee. It may happen seconds after the failure. That still does not prove what fixed the route. Reef should say:
  • baseline success existed;
  • failed routed attempt existed;
  • later matching success existed;
  • recovery evidence is strong;
  • causal repair is unproven unless the operator action and failed-hop evidence are both present.
That restraint is what makes the replay credible.

What to build locally this week

Run the Week 11 exercises from the Fiber incident replay package:
The scripts are dry-run. They do not require a Fiber node, funded wallet, private key, hosted Reef deployment, or credentials. Read them in order:
  • 41-fiber-incident-sequence.ts
  • 42-route-autopsy.ts
  • 43-funding-and-peer-correlation.ts
  • 44-recovery-without-causality.ts
Together they model the Week 11 replay layer:
  • prove a success -> failure -> recovery sequence from retained Fiber payment rows;
  • preserve attempted route details without inventing failed-hop attribution;
  • correlate route edges with peer state and CKB funding evidence;
  • treat later success as recovery evidence, not automatic causal repair proof.
Week 11 is where Reef stops being only a diagnostic snapshot and becomes an incident replay system.