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

feat(blob): blobsub

Open distractedm1nd opened this issue 7 months ago • 0 comments

Introduces blob.Subscribe. Takes a share.Namespace, returns a <-chan *BlobsubResponse containing a height uint64 and blobs []*blob.Blob.

I made the decision to not support subscribing to multiple namespaces with one call, because the complexity of the return type mitigates the benefits for the client. It is likely more convenient to have one subscription per namespace:

Imagine you are watching two namespaces for different things. On the client side, you would have a select statement reading from the two channels in two cases. This is cleaner than receiving everything in one case, but then having to manually parse and send to the respective handlers yourself.

TODO:

  • [ ] Unit tests
  • [ ] Mockgen
  • [ ] Document w @jcstein

distractedm1nd avatar Jun 28 '24 17:06 distractedm1nd