-
Notifications
You must be signed in to change notification settings - Fork 73
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
fix!: UnmarshalJSON is limited to the default Tree bug #277
Conversation
@sontrinh16 test fails here |
yeah i have to move to draft to fix this |
alright seem all test pass now, sorry for the inconvenience guys |
Thanks for fixing this! Committing to review this tmrw |
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.
Thanks for the contribution! Excited to see this land
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #277 +/- ##
==========================================
+ Coverage 80.76% 80.89% +0.12%
==========================================
Files 7 8 +1
Lines 806 869 +63
==========================================
+ Hits 651 703 +52
- Misses 112 119 +7
- Partials 43 47 +4 ☔ View full report in Codecov by Sentry. |
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.
LGTM!
Co-authored-by: Sanaz Taheri <35961250+staheri14@users.noreply.github.com>
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.
Thanks for addressing the comments. LGTM!
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 have a few comments about the tests that were added. Also one question about what happens if UnmarshalJSON
is invoked on a tree that doesn't contain the Tree
field. Do we want a test case for that scenario? I assume it should unmarshal with the default tree.
hmmmmm yeah i think we could add default tree as a fallback when Tree field is missing |
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.
Overall LGTM. A few nits before we merge this. Thanks for all your hard work!
thanks for persevering through all the typo errors guys |
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.
fantastic work
approving as I don't want to block, but we should have @Wondertan review things again to ensure this is exactly what they wanted meaning, we could merge and just not release until one last approval or wait for that approval thanks a lot tho @sontrinh16 this took a lot |
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.
We wanted JSONUnmarshal to work with the correct tree builder, and we got it here without breaking anything, so approve ;)
…tiaorg#277)" This reverts commit bb5e119.
While attempting to bump celestia-app to the v0.12.0-rc2, I noticed that the `RegisterTree` design leaks an implementation detail to celestia-app: the registering and managing of `treeName`s. Celestia-app has two categories of of trees: 1. erasured namespaced merkle tree in [nmt_wrapper.go](https://github.com/celestiaorg/celestia-app/blob/main/pkg/wrapper/nmt_wrapper.go) 2. EDS subtree root cacher [nmt_caching.go](https://github.com/celestiaorg/celestia-app/blob/main/pkg/inclusion/nmt_caching.go) Each of those categories has trees based on square size and NMT options. Celestia-app needs to be careful to register all the appropriate trees once (and only once) before they are used (via `Compute` or `Import`). I'd like to explore a less breaking option to get celestia-node the original desired feature which was #275. In the meantime, I think we should revert the two big breaking changes so that main can remain release-able. Revert #277 Revert #287 Closes #295 because no longer relevant if we merge this.
Overview
Closed: #275
Checklist