[Feature Request]: Comprehensive proof API #3473
Labels
area:api
Related to celestia-node API
enhancement
New feature or request
external
Issues created by non node team members
Overview
Use case
As an on-chain lightclient I would like to verify blob inclusion against the
dataHash
(data availability root) tracked in celestia-core commit headers.For example, given a
blob.Commitment
in namespaceNS
I would like to query some RPC endpoint at heightH
which returns a proof veriable against the data availability root.Problem defintion
As it exists today a blob proof queried from celestia-node's
blob.GetProof
api is not verifiable against the celestia data availability root signed by the validator set. The proof returned -blob.Proof
is alias of[]*nmt.Proof
(ref).This proof(s) is intended to be verified via an RPC call to celestia-node's
Included
api. Unfortunately, this does not satisfy the requirements of an on-chain lightclient, where a proof should be submitted and verified within the state machine against the data availability root.Furthermore, namespaced merkle tree (nmt) proofs are only verifiable against their corresponding
RowRoots
(ref).And a collection of
RowRoots
for a block at a particular heightN
are merklized to produce the data availability root (ref). As I understand the data availability header (DAH
), containing Row and Column roots of the da square is discarded by the celestia application inPrepareProposal
, only storing the hash (root) in the commit header.This leads me to believe that as an off-chain actor (e.g. ibc relayer), I would be forced to additionally query the
ExtendedHeader
and manually work out and reconstruct aShareProof
which is veriable against the DA root.Or alternatively to manually work out the share indices for a particular blob and rely on the
ProveShares
rpc offered by celestia-core. I believe this would also require querying additional info to retrieve data such as:Some sample go code might look something like:
Proposal
As explained to me by @renaynay an RPC call to
blob.GetProof
rather returns a proof for an entire namespace. As far as I know this can be seen in theretrieve
method ofblob/service.go
in celestia-node.From what I understand about the celestia architecutre, a more comprehensive and cohesive proof API may look something like the following:
GetShareProof(height, startShare, endShare uint64)
GetBlobProof(height uint64, namespace share.Namespace, commitment blob.Commitment
)GetNamespaceProof(height uint64, namespace share.Namespace)
As a user I would expect each of these proofs to be veriable against the data availability root. Due to my limited knowledge of the system this may not be possible but from a user's perspective I would expect this to be a desireable feature or property of the proof APIs offered by celestia.
Feel free to close this issue if it is duplicate or if you could point me another issue or resource with work or discussion about this topic I would be very interested!
The text was updated successfully, but these errors were encountered: