Conversation
|
Important Review skippedDraft detected. 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 |
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @julienrbrt's task in 2m 40s —— View job Code Review
OverviewThis PR introduces a new Fiber DA backend by wrapping a Critical Issues1. Unbounded memory growth in the local index — The 2. func (c *fiberDAClient) retrieve(_ context.Context, height uint64, _ []byte, _ bool) datypes.ResultRetrieve {All four method parameters beyond the receiver are ignored. The local index stores blobs without namespace segregation, so 3. The comment on
But there is no fallback — it returns Architecture Concerns4. var lastHeight uint64
initialHeight, err := c.fiber.GetLatestHeight(heightCtx)
if err == nil {
lastHeight = initialHeight
}5. Height re-indexing can silently corrupt downloads — When multiple blobs are uploaded sequentially, each upload may land at a different validator-set height ( submitHeight := uploaded[len(uploaded)-1].height
...
id := makeFiberID(submitHeight, u.blobID)Later, Code Quality Issues6. if string(b.id) == string(id) {
...
results[i] = len(proofs[i]) > 0 && string(proofs[i]) == string(b.promise)Use 7. Potential nil-pointer dereference in base := da.NewFiberClient(da.FiberConfig{...})
if config.Instrumentation.IsTracingEnabled() {
return da.WithTracingClient(base) // base may be nil if fiberClient was nil
}
return base
if base == nil {
return nil
}8. Missing
Minor / Nits9. If an ID is not found in the index, the corresponding 10. The 11.
12. This is technically correct but worth documenting; callers must check Test Coverage Gaps
SummaryThe implementation is a solid first pass with good interface design and test breadth. The most important issues before merging are the unbounded index memory growth (will cause OOM in production), the namespace-blind |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3244 +/- ##
==========================================
+ Coverage 61.81% 62.34% +0.53%
==========================================
Files 120 121 +1
Lines 12670 12916 +246
==========================================
+ Hits 7832 8053 +221
- Misses 3961 3982 +21
- Partials 877 881 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Overview
Support Fiber client (based on https://github.com/celestiaorg/celestia-app/blob/63fbf31cca216fc4e067a9e1b3a3431115c7009b/fibre), but not via celestia node or apex for this PoC
celestiaorg/celestia-node#4892