celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

Discuss removing the blobstream endpoints from node

Open rach-id opened this issue 6 months ago • 0 comments

After merging the https://github.com/celestiaorg/celestia-node/pull/3470, we now have all the endpoints needed in blobstream in Celestia-node:

  • ProveShares: which proves that a set of shares, defined by a range, are included in a Celestia block
  • ProveCommitment: which proves that a share commitment was included in a Celestia block
  • DataRootTupleRoot: which generates the Blobstream data root tuple root from a set of data root tuples
  • DataRootTupleInclusionProof: which generates an inclusion proof of a data root tuple to the data root

The first two endpoints belong in node. However, the last two can be built outside Celestia-node as they just need access to the block headers.

In fact, the current implementations of Blobstream, BlobstreamX and Blobstream0 both rewrite that logic, and they're not using these endpoints. So the main usage of those two endpoints would be when generating an inclusion proof to verify the inclusion of a blob to the data root tuple root.

So, we have two alternatives for them:

Provide this API with the proof and users can just use it:

Pros:

  • it's self-contained a can be removed from node anytime in the future
  • ready to be used by clients without needing them to re-implement the code and worry about its validity etc.

Cons:

  • An extra module in Celestia-node

delete it and write some specs for the endpoints:

Pros:

  • Less code in Celestia-node to be maintained

Cons:

  • Having to write specs for those two endpoints.
  • Increasing the work for teams to onboard with Blobstream. Instead of asking them just to send a request, they will need to implement some specs.

Decision

Short term: we keep these endpoints in Node.

Long term: left for future us to decide.

rach-id avatar Jul 25 '24 11:07 rach-id