From Fiber Channels to CKB Settlement
Week 11 ended with incident replay. Reef could preserve a baseline success, a routed failure, a route autopsy, channel and peer correlation, CKB funding evidence, and a later matching success without claiming causal repair. Week 12 asks the next technical question:What happens when a Fiber channel has to touch CKB again?
Fiber gives the payment experience its speed by moving updates off-chain. But that does not erase CKB. It changes when CKB matters. The channel is funded on CKB. It can close on CKB. Settlement finality is a CKB evidence path. Dispute and watchtower posture are only knowable when real sources expose them.
The thesis for the week is:
Fiber makes payments fast off-chain, but CKB remains the settlement and dispute boundary.
That is the technical boundary a diagnostics tool has to respect.
A channel is not only a Fiber row
From the operator side, it is tempting to treat a channel as a single dashboard object:ready or not ready
That is too flat.
A Fiber channel crosses multiple evidence domains:
- a CKB funding transaction creates the anchor;
- Fiber reports the channel lifecycle and current off-chain state;
- commitment updates describe the latest agreed channel state;
- closing creates or reveals an on-chain spend path;
- final settlement depends on CKB transaction visibility and confirmation depth;
- watchtower or dispute posture is only source-backed if logs, metrics, Fiber APIs, or future read surfaces expose it.
Commitment state is the safety boundary
Payment channels work because participants keep updating the off-chain state. That creates a technical risk: old signed state may still exist. The system is safe only if the latest state is distinguishable from stale state and stale state is punishable, invalidated, or otherwise unsafe to use. For learning purposes, the important model is:- commitment number tells you which state is newer;
- latest fully signed state is the state the peers currently agree on;
- older commitments become stale;
- stale commitments must have revocation evidence or equivalent protection;
- if old state can still settle cleanly, the channel has a dispute risk.
Settlement is a CKB evidence path
When a channel moves back on-chain, the diagnostic question becomes very CKB-shaped. The tool needs to ask:- can CKB RPC read the funding transaction?
- has the funding outpoint been spent?
- is there a close transaction?
- how many confirmations does the close transaction have?
- has the required finality depth been reached?
- is settlement evidence missing, pending, or final?
Watchtower evidence must stay honest
Watchtower and dispute coverage are important, but they are easy to overclaim. If Reef can read a stable Fiber API, metric, or log row that proves watchtower state, it can report that evidence. If it can only read a channel close log, it can report the close observation. It cannot turn that into proof that a watchtower protected the channel. If no source exposes dispute posture, the correct state is unknown. That may feel unsatisfying, but it is the safer product behavior. The source-backed rules from Week 9 still apply:- missing watchtower source means unknown;
- missing dispute source means unknown;
- a close transaction is not automatically a dispute;
- a later settlement is not automatically proof that a stale state was impossible;
- future read APIs can improve coverage, but they should not be guessed before they exist.
Why this matters for Reef
Reef started with payment diagnostics because failed payments are the easiest place to see Fiber operational pain. But operators also need a boundary between:- payment failure;
- channel readiness;
- channel closing;
- on-chain settlement;
- stale-state risk;
- dispute evidence;
- watchtower coverage.
What to build locally this week
Run the Week 12 exercises from the Fiber settlement boundary package:45-channel-as-ckb-state-machine.ts46-commitment-and-revocation-model.ts47-settlement-evidence-tracker.ts48-watchtower-and-dispute-boundary.ts
- treat a Fiber channel as a CKB-anchored state machine;
- distinguish latest commitment, stale commitment, and revoked commitment;
- track funding, close, and finality evidence from CKB-style reads;
- keep watchtower and dispute posture source-backed instead of invented.