Skip to content
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

feat!: delete getTreeNameFromConstructorFn #287

Merged
merged 29 commits into from
Feb 2, 2024

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jan 30, 2024

Closes #286 by deleting getTreeNameFromConstructorFn.
Closes #288, #289 by fixing those tests.
Inspired by #278
Includes two breaking changes:

  1. ComputeExtendedDataSquare now accepts a parameter treeName: string
  2. ImportExtendedDataSquare now accepts a parameter treeName: string

@rootulp rootulp self-assigned this Jan 30, 2024
@rootulp rootulp changed the title feat!: modify ComputeExtendedDataSquare to use treeName parameter feat!: delete getTreeNameFromConstructorFn Jan 30, 2024
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (bb5e119) 80.89% compared to head (bb4001a) 81.42%.
Report is 1 commits behind head on main.

Files Patch % Lines
extendeddatasquare.go 60.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
+ Coverage   80.89%   81.42%   +0.52%     
==========================================
  Files           8        8              
  Lines         869      845      -24     
==========================================
- Hits          703      688      -15     
+ Misses        119      113       -6     
+ Partials       47       44       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rootulp rootulp marked this pull request as ready for review January 30, 2024 20:57
staheri14
staheri14 previously approved these changes Jan 30, 2024
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just added a few suggestions.

extendeddatasquare_test.go Outdated Show resolved Hide resolved
extendeddatasquare_test.go Outdated Show resolved Hide resolved
extendeddatasquare_test.go Show resolved Hide resolved
evan-forbes
evan-forbes previously approved these changes Jan 31, 2024
@rootulp rootulp dismissed stale reviews from evan-forbes and staheri14 via 5c3532d January 31, 2024 16:40
@rootulp
Copy link
Collaborator Author

rootulp commented Jan 31, 2024

Ready for re-review. I would like to hold off on merging until after I verify that celestia-app is able to use this.

Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rootulp rootulp merged commit 5a03c15 into celestiaorg:main Feb 2, 2024
4 of 5 checks passed
@rootulp rootulp deleted the rp/breaking-change-for-global-tree branch February 2, 2024 14:03
rootulp added a commit to rootulp/rsmt2d that referenced this pull request Feb 3, 2024
rootulp added a commit that referenced this pull request Feb 7, 2024
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.
0xchainlover pushed a commit to celestia-org/rsmt2d that referenced this pull request Aug 1, 2024
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
celestiaorg/rsmt2d#275. In the meantime, I
think we should revert the two big breaking changes so that main can
remain release-able.

Revert celestiaorg/rsmt2d#277
Revert celestiaorg/rsmt2d#287
Closes celestiaorg/rsmt2d#295 because no longer
relevant if we merge this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants