Uh oh!
There was an error while loading. Please reload this page.
feat(celestia-node-fiber): Listen takes fromHeight for resume-from-height subscriptions - #3283
Conversation
…ptions Threads a fromHeight parameter through the Fibre DA Listen path so a subscriber can rejoin the stream from a past block height without missing blobs. Consumes the matching celestia-node API change landed in celestiaorg/celestia-node#4962, which gave Blob.Subscribe a fromHeight argument backed by a WaitForHeight loop. Changes: - block/internal/da/fiber/types.go: DA.Listen signature now takes fromHeight uint64. fromHeight == 0 preserves "follow from tip" semantics, >0 replays from that block forward. - block/internal/da/fibremock/mock.go: replay matching blobs with height >= fromHeight before attaching the live subscriber. - block/internal/da/fiber_client.go: outer fiberDAClient.Subscribe does not yet expose a starting height (datypes.DA doesn't plumb one), so pass 0 and defer resume-from-height wiring to a future datypes.DA change. - tools/celestia-node-fiber/listen.go: propagate fromHeight to client.Blob.Subscribe on the celestia-node API. - tools/celestia-node-fiber/go.mod: bump celestia-node to the merged pseudo-version (v0.0.0-20260423143400-194cc74ce99c) carrying #4962. - tools/celestia-node-fiber/adapter_test.go: fakeBlob.subscribeFn gets the new fromHeight arg; TestListen_FiltersFibreOnlyAndEmitsEvent asserts that fromHeight=0 is forwarded. - tools/celestia-node-fiber/testing/showcase_test.go: existing TestShowcase passes fromHeight=0. New TestShowcaseResume uploads 3 blobs, discovers their settlement heights via a live Listen, then opens a fresh Listen with fromHeight at the first blob's height and verifies every historical blob is replayed with correct Height and DataSize. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Threads a `fromHeight uint64` parameter through the Fibre DA Listen path so a subscriber can rejoin the stream from a past block height without missing blobs. Consumes the matching celestia-node API change landed in celestiaorg/celestia-node#4962, which gave `Blob.Subscribe` a `fromHeight` argument backed by a `WaitForHeight` loop.
API change
```go
// block/internal/da/fiber
```
Why
Followers restarting (crashes, rolling updates, lagging nodes) need to pick up blobs they missed while offline. Before this change, a restart either replayed nothing (missed blobs) or required a separate `GetAll`-per-height catchup pathway. Blob.Subscribe from celestia-node#4962 makes the resume path first-class; this PR surfaces it through ev-node's DA abstraction.
What ships
Verified
TestShowcaseResume sample output
```
phase1 upload[0] blob_id=00f005a3... height=111
phase1 upload[1] blob_id=002222b7... height=111
phase1 upload[2] blob_id=00d4ba53... height=112
resume fromHeight=111
phase2 listen[1/3] blob_id=00f005a3... height=111 data_size=13
phase2 listen[2/3] blob_id=002222b7... height=111 data_size=13
phase2 listen[3/3] blob_id=00d4ba53... height=112 data_size=13
```
All 3 historical blobs replayed from `fromHeight=111` with correct heights and DataSize.
Follow-up
Plumbing `fromHeight` through `datypes.DA.Subscribe` so the sequencer / follower layers can surface it end-to-end. That change is broader than the Fibre-specific plumbing here; keeping the scope tight.
🤖 Generated with Claude Code