Add celestia blockchain type (Celestia DA JSON-RPC API) - #326
Merged
Conversation
This was referenced Aug 10, 2026
Contributor
Author
l0gun0v
force-pushed
the
celestia-da
branch
3 times, most recently
from
August 26, 2026 09:12
d2fc964 to
c334501
Compare
…eader.Tail lower bound
l0gun0v
force-pushed
the
celestia-da
branch
2 times, most recently
from
August 26, 2026 14:27
d782607 to
22cb671
Compare
added 2 commits
August 26, 2026 16:27
…pty chain id - ParseCelestiaExtendedHeader / CelestiaExtendedHeader live in specific_helpers (shared by head polling, chain validator, lower-bound detector), tests moved along - chain validator: any mismatch incl. an empty chain id is FatalSettingError, no separate branch - comment on GetFinalizedBlock: CometBFT commits are final, the head is the finalized pointer
- 05-upstream-config.md: Celestia rows in the validators/labels table - README: Celestia in chain families and interfaces
KirillPamPam
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
celestiablockchain type serving the Celestia DA node (celestia-node) JSON-RPC API — go-jsonrpc style namespaced methods (header.*,blob.*,share.*,das.*,blobstream.*).Design
xrpc.ch.valnotifications), which the current ws parser treats as a malformed message and drops the connection. Head tracking is pollingheader.LocalHead. WS support needs a dedicatedws.WsProtocolimplementation (follow-up).GenericBlockProcessor, safe-block detection off) publishes the head as the finalized pointer, like sui/stellar.header.Tail— the node reports its lowest stored header (DA sampling/pruning window) directly; one RPC per 2-minute refresh with a 3-attempt retry, no probing. Nodes older than v0.28 don't expose it: the detector errors every tick, no bound is published, the upstream is treated as archive.blob.Submit/state.*writes are excluded (they spend TIA from the provider node's own wallet);node.*/p2p.*admin methods excluded;state.AccountAddress/state.Balanceexcluded (they expose the node's own wallet).node.Inforequires an admin token.celestia/mocha-4), validated viaheader.LocalHead → .header.chain_id; any mismatch (empty id included) isFatalSettingError.specific_helpers.ParseCelestiaExtendedHeader.Changes
pkg/methods/specs/celestia.json: new plain spec,api-connectors: [json-rpc], 31 read methods, allcacheable: falsepkg/chains/chains.go:Celestiablockchain type +celestiamethod-spec name mappinginternal/upstreams/chains_specific/celestia_specific/celestia_chain_specific.go:ChainSpecificimpl (head pollheader.LocalHead, finalized == latest viaGenericBlockProcessor, subscriptions rejected, labels/caps/methods processors nil)internal/upstreams/chains_specific/specific_helpers/celestia.go: shared ExtendedHeader parsing (+ tests)internal/upstreams/validations/celestia_validations/celestia_health_validator.go: health vianode.Readyinternal/upstreams/validations/celestia_validations/celestia_chain_validator.go: chain-id validation (any mismatch incl. empty id → FatalSettingError)internal/upstreams/lower_bounds/celestia_bounds/celestia_lower_bound.go: BLOCK bound viaheader.Tail, 2m period, 3 retries (+ tests)internal/upstreams/upstream_factory.go: dispatch case ingetChainSpecificpkg/test_utils/test_helpers.go:NewCelestiaChainSpecifichelperinternal/upstreams/chains_specific/celestia_specific/celestia_chain_specific_test.go: parse/head/finalized/validators/processors testsdocs/nodecore/11-method-specs.md,docs/nodecore/04-cache.md,docs/nodecore/05-upstream-config.md,README.md: shipped-specs table, cache blockchain-type list, validators/labels table rows, chain-family listsTesting
./internal/... ./pkg/...suite green (95 pkgs; docker-backed cache e2e need a daemon)--rpc.skip-auth):State of CELESTIA-MOCHA: height=…, statuses=[AVAILABLE/1], bounds=[BLOCK=13571945]header.GetByHeight/header.NetworkHead/das.SamplingStats/share.SharesAvailableOKblob.GetAllreturned 8 real blobs at height 13581002 (active rollup namespace)blob.Submit,node.Info, unknown) →-32601(spec acts as the allowlist)requested header (100) is below Tail (13571945)Notes
Rebased on current main (Sui, sub-responses refactoring). Implements the current ChainSpecific surface:
CapDetectors/MethodsProcessorreturn nil (no ws transport, no method introspection on celestia-node).Companion PRs: emerald-grpc, public, dproxy — linked in comments.