You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have different constructions of the Share and Namespace types across celestia repos. We should converge on types and have them standardised across repos.
typeNamespacestruct {
data []byte
}
typeSharestruct {
data []byte
}
We have decided to encapsulate the types as this completely prevents users from misusing them (i.e. incorrect length).
Encapsulation also allows us to make changes in the future that don't break users such as caching certain bytes in the struct i.e. namespace in the share struct.
The other option considered was to use type Namespace []byte
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Summary
We have different constructions of the Share and Namespace types across celestia repos. We should converge on types and have them standardised across repos.
https://github.com/celestiaorg/celestia-node/blob/762bd93b1b6242bdd5660172d1b32fcade144a8c/share/namespace.go#L34
go-square/namespace/namespace.go
Lines 8 to 11 in fd78256
https://github.com/celestiaorg/celestia-node/blob/762bd93b1b6242bdd5660172d1b32fcade144a8c/share/share.go#L29
go-square/shares/shares.go
Lines 12 to 14 in fd78256
Proposal
Agreed upon types:
We have decided to encapsulate the types as this completely prevents users from misusing them (i.e. incorrect length).
Encapsulation also allows us to make changes in the future that don't break users such as caching certain bytes in the struct i.e. namespace in the share struct.
The other option considered was to use
type Namespace []byte
For Admin Use
The text was updated successfully, but these errors were encountered: