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

api: Consider dropping EDS importing in favour of EDS constructor #85

Open
Wondertan opened this issue Apr 27, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@Wondertan
Copy link
Member

Currently, EDS can only be imported from a flattened data square slice and is updated in place, breaking encapsulation and allowing users to incorrectly change the underlying slice causing undefined behavior for the library if used incorrectly. Instead, we should provide a new constructor that allocates/manages the EDS independently and provide proper setters/getters(such as #83) to make the rsmt2d foolproof by hiding complexity and further allocation/performance optimizations behind the API.

@Wondertan Wondertan added the enhancement New feature or request label Apr 27, 2022
rootulp added a commit that referenced this issue Jul 7, 2023
Closes #231

This PR adds a new constructor called `NewExtendedDataSquare` that
allows @celestia-node to explicitly set the `chunkSize` on an empty EDS.
I choose to not drop the existing `ImportExtendedDataSquare` as proposed
in #85 because that would be
public API breaking.

cc: @Wondertan @walldiss
0xchainlover pushed a commit to celestia-org/rsmt2d that referenced this issue Aug 1, 2024
Closes celestiaorg/rsmt2d#231

This PR adds a new constructor called `NewExtendedDataSquare` that
allows @celestia-node to explicitly set the `chunkSize` on an empty EDS.
I choose to not drop the existing `ImportExtendedDataSquare` as proposed
in celestiaorg/rsmt2d#85 because that would be
public API breaking.

cc: @Wondertan @walldiss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: TODO
Development

No branches or pull requests

1 participant