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
Currently the pkg/shares implementation treats compact and spare shares differently. Instead of describing shares as compact or sparse, one can describe all shares as using the sparse format with the addition that Celestia transaction & PFB transaction shares encode additional metadata in their blobs (in the form of reserved bytes). In this way we could describe a share structure that applies to all shares and a way of encoding blob data (i.e. the current compact share schema) that enables developers to parse shares in the middle of a sequence.
Proposal
Refactor pkg/shares to treat all shares identically. The high level structure may be:
parse(shares) => share sequences
getBlob(shareSequence) => blob
parseCelestiaTransactions(blob) => transactions or PFB transactions
The text was updated successfully, but these errors were encountered:
I didn't see this issue beforehand but 100% agree with refactoring it to this structure.
My personal preference would be to have another package called aggregate (or combine. I don't really mind the naming) which implements the "compact" part. Thus you would have:
I briefly explored this issue and the CompactShareSplitter can't easily be decoupled from share indexes because it is aware of ShareRanges. If we remove the index from PFB txs (CIP-20) then this refactor becomes significantly easier / cleaner.
Separately, we're punting this refactor for now to work on higher priority issues.
Context
celestiaorg/celestia-app#1880
Problem
Currently the
pkg/shares
implementation treats compact and spare shares differently. Instead of describing shares as compact or sparse, one can describe all shares as using the sparse format with the addition that Celestia transaction & PFB transaction shares encode additional metadata in their blobs (in the form of reserved bytes). In this way we could describe a share structure that applies to all shares and a way of encoding blob data (i.e. the current compact share schema) that enables developers to parse shares in the middle of a sequence.Proposal
Refactor
pkg/shares
to treat all shares identically. The high level structure may be:parse(shares)
=> share sequencesgetBlob(shareSequence)
=> blobparseCelestiaTransactions(blob)
=> transactions or PFB transactionsThe text was updated successfully, but these errors were encountered: