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

share: Extend `GetSharesByNamespace` with an option to collect Merkle proofs

Open Wondertan opened this issue 1 year ago • 0 comments

Context

We want FN/BNs to serve data by namespace as a whole. For that, we need to read Merkle proofs while getting data by namespace so that requestors can verify its inclusion in the header.

Implementation Details

  • share.GetSharesByNamespace is used to load data from disk only and not from the network anymore
  • share.GetSharesByNamespace is extended to return NMT Merkle proofs
    • Similar to share/ipld.GetProofsForShares
    • Ensure Merkle proofs are not duplicated!

Refs

Depends on #878 Depends on #183

Wondertan avatar Sep 16 '22 11:09 Wondertan