Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
19ea929
feat(da): support fiber (not via c-node)
julienrbrt Apr 13, 2026
960146d
Merge branch 'main' into julien/fiber
julienrbrt Apr 13, 2026
ef44db2
wip
julienrbrt Apr 14, 2026
f96ab47
Merge branch 'main' into julien/fiber
julienrbrt Apr 14, 2026
f3356c6
reduce alloc
julienrbrt Apr 14, 2026
49c92d1
Merge branch 'main' into julien/fiber
julienrbrt Apr 14, 2026
7278685
lint
julienrbrt Apr 15, 2026
7109b0e
feat(da): add Go DA interface and in-memory mock for fibre (#3256)
walldiss Apr 15, 2026
4485d91
updates
julienrbrt Apr 15, 2026
6472139
wire fiber in testapp (poc)
julienrbrt Apr 20, 2026
03b4877
Merge branch 'main' into julien/fiber
julienrbrt Apr 22, 2026
da26572
tidy tool
julienrbrt Apr 22, 2026
04c70e7
updates
julienrbrt Apr 22, 2026
9e5b2ca
properly disable fi
julienrbrt Apr 22, 2026
c49fe6f
improve submission
julienrbrt Apr 22, 2026
e26879b
updates
julienrbrt Apr 22, 2026
7be668a
cleanup
julienrbrt Apr 22, 2026
a7b3859
feat(tools): celestia-node-backed Fibre DA adapter (#3279)
walldiss Apr 23, 2026
24ff04e
rm local fiber
julienrbrt Apr 23, 2026
a4a46e7
fix flags
julienrbrt Apr 23, 2026
a88b176
test(celestia-node-fiber): in-process Upload/Listen/Download showcase…
walldiss Apr 23, 2026
90a18b1
fix(celestia-node-fiber): report original payload size in BlobEvent (…
walldiss Apr 23, 2026
918acaf
cleanups
julienrbrt Apr 23, 2026
d24af8f
feat(celestia-node-fiber): Listen takes fromHeight for resume-from-he…
walldiss Apr 23, 2026
dabfe4a
updates
julienrbrt Apr 23, 2026
9c5ee4d
updates
julienrbrt Apr 23, 2026
f1c9cb8
fix flags
julienrbrt Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions block/internal/da/fiber/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Package fiber defines the Fiber DA backend interface and shared types.
//
// # Design Assumptions
//
// - The sequencer trusts the encoder to eventually confirm blob inclusion.
// Upload returns after the blob is uploaded and the PFF transaction is
// broadcast, NOT after on-chain confirmation. This keeps the sequencer's
// write path fast (~2s per 128 MB blob).
//
// - Callers are expected to batch/buffer their data into blobs sized for the
// protocol maximum (128 MiB - 5 byte header = 134,217,723 bytes).
// The interface accepts arbitrary sizes but the implementation may batch
// or reject oversized blobs.
//
// - Confirmation/finality is intentionally omitted from the initial API.
// The sequencer does not need it; the read path (Listen + Download) is
// sufficient for full nodes. A Status or Confirm RPC can be added later
// if needed without breaking existing callers.
//
// - Blob ordering is encoded in the blob data itself by the caller.
// The interface does not impose or guarantee ordering.
//
// - The interface is the same whether the encoder runs in-process or as an
// external gRPC service. For in-process use, call the mock or real
// implementation directly; for external use, connect via gRPC.
package fiber

import (
"context"
"time"
)

// BlobID uniquely identifies an uploaded blob (version byte + 32-byte commitment).
type BlobID []byte

// UploadResult is returned by Upload after the blob is accepted.
type UploadResult struct {
BlobID BlobID
ExpiresAt time.Time
}

// BlobEvent is delivered via Listen when a blob is confirmed on-chain.
type BlobEvent struct {
BlobID BlobID
Height uint64
DataSize uint64
}

// DA is the interface for interacting with the Fiber data availability layer.
type DA interface {
// Upload submits a blob under the given namespace to the DA network.
// Returns after the blob is uploaded and the payment transaction is broadcast.
// Does NOT wait for on-chain confirmation (see package doc for rationale).
Upload(ctx context.Context, namespace []byte, data []byte) (UploadResult, error)

// Download retrieves and reconstructs a blob by its ID.
// Returns the original data that was passed to Upload.
Download(ctx context.Context, blobID BlobID) ([]byte, error)

// Listen streams confirmed blob events for the given namespace,
// starting at fromHeight.
//
// fromHeight == 0 starts the stream from the current chain head; any
// positive value replays events from that block forward so a
// subscriber can resume after a restart without missing blobs (the
// DA backend is expected to block, not error, on future heights).
// The returned channel is closed when ctx is cancelled.
Listen(ctx context.Context, namespace []byte, fromHeight uint64) (<-chan BlobEvent, error)
}
Loading
Loading