celestiaorg / go-square

A library for encoding blobs into a 2D square of evenly sized chunks designed for sampling and reconstruction
Apache License 2.0
13 stars 16 forks source link

Add different types of validation methods to blob #69

Closed cmwaters closed 1 month ago

cmwaters commented 2 months ago

Besides Validate, the node needs two more validate funcs. https://github.com/celestiaorg/celestia-node/blob/540192259c144ccbd24e45e34616a41389232a51/share/namespace.go#L114-L129.

We need this so we can restrict to only blobs(excluding reserved) and to only real data(excluding parity)

_Originally posted by @Wondertan in https://github.com/celestiaorg/go-square/pull/68#discussion_r1636302775_

cmwaters commented 2 months ago

I had a look and found that there already exists functions that cover this purpose, for example we have an IsReserved() method to check if it's part of the primary or secondary reserved namespaces. And I will add a IsUsableNamespace in #87

cmwaters commented 1 month ago

Closing this as completed