-
Notifications
You must be signed in to change notification settings - Fork 105
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: multiplicity depend on payload size #670
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit defines a function `min_multiplicity` which can compute the actual multiplicity that will be used from `max_multiplicity` and `payload_len`. The original argument `multiplicity` has been renamed to `max_multiplicity` to indicate that this is an upper bound.
…n.multiplicity (yay)
akonring
previously approved these changes
Aug 30, 2024
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.
Nice!
Made a few comments (mostly nits so feel free to ignore if they are out of scope or don't apply).
akonring
approved these changes
Sep 3, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes: #663
This PR:
This PR replaces #667. Thanks to @akonring for getting this PR started.
The fix for issue #663 has many knock-on tasks, most of which are also resolved here.
multiplicity
arg forAdvz
constructor is nowmax_multiplicity
. The user no longer specifies the multiplicity that is used for all payloads. Instead, the user specifies the maximum multiplicity that may be used. The actual multiplicity is now selected atdisperse
-time as a function of payload size. Thus, as per Fix large shares when small payload and large multiplicity #663, a small payload with large multiplicity will no longer have wastefully-large share size.max_multiplicity
that ensures small multiplicity for small payloadsdisperse
-time. We must also set the size of the FFT domains atdisperse
-time.eval_domain
,multi_open_domain
of theAdvz
struct. Now that these domains are set atdisperse
-time there is no need to store them in theAdvz
struct, so I removed them. They are now computed on-the-fly as needed, just like multiplicity.disperse_precompute
is mostly copy-pasted code fromdisperse
. I refactored these two functions intodisperse_with_polys_and_commits
.polynomial
,polynomial_internal
,bytes_to_polys
, etcThis PR does not:
Key places to review:
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
CHANGELOG.md
of touched crates.Files changed
in the GitHub PR explorer