celestiaorg / celestiaorg/nmt

api: `Push` for data/shares with decoupled namespace

Open
#55 2 comments 3 reactions 1 assignee Claimed by @liamsi View on GitHub
enhancement
Dominant language
Go
Stars
122
Forks
53
Avg merge
1d 15h
Merged PRs (30d)
5

Description

Currently, `tree.Push` requires passing `namespace.PrefixedData`, which is a byte slice prepending `namespace.ID`. However, there is a use case where we don't need to push data that is not prepended with a `namespace.ID`, and it can be passed as a separate field. This is the case where we push parity data generated via rsmt2d. Currently, we prepend parity namespace to the parity shares, which is not required. This is one of the issues causing us to store an additional 8 bytes of parity namespace per parity share via NMTWrapper, as outlined in https://github.com/celestiaorg/celestia-node/issues/183. I propose adding an additional method like `PushWith` to the `nmt.Tree` to allow passing decoupled namespace from the share data to allow mentioned disk usage optimization.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.