-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make IntervalDigest
jsonable
#35
Conversation
Codecov Report
@@ Coverage Diff @@
## master #35 +/- ##
==========================================
- Coverage 94.77% 94.73% -0.04%
==========================================
Files 7 7
Lines 306 304 -2
==========================================
- Hits 290 288 -2
Misses 11 11
Partials 5 5
Continue to review full report at Codecov.
|
Co-authored-by: Ismail Khoffi <[email protected]>
type IntervalDigest struct { | ||
min ID | ||
max ID | ||
digest []byte | ||
Min ID `json:"min"` | ||
Max ID `json:"max"` | ||
Digest []byte `json:"digest"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should not get rid of this struct entirely and instead store this as raw bytes min||max||digest instead. For instance, when using this with ipfs, the CID will essentially be this plus some overhead bytes that stem from the multihash standard.
We can merge this as is to unblock celestiaorg/celestia-core#312 but we should track this somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
will merge after #317 CI passes, then I'll update that PR to use nmt |
Some tests in lazyledger-core require
DataAvailabilityHeader
to be encoded via json, this PR exports the fields of IntervalDigest, along with adding appropriate json tags.This PR, or another alternative, should be merged before #312 can be merged.
closes #34