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: reveal multiple rangesets with one rangeset. #664

Open
wants to merge 21 commits into
base: dev
Choose a base branch
from

Conversation

yuroitaki
Copy link
Member

Addresses #655

@yuroitaki yuroitaki requested a review from themighty1 November 29, 2024 05:25
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 86.14719% with 32 lines in your changes missing coverage. Please review.

Project coverage is 56.22%. Comparing base (65299d7) to head (f26630e).

Files with missing lines Patch % Lines
crates/core/src/transcript/proof.rs 85.02% 25 Missing ⚠️
crates/core/src/transcript.rs 85.71% 6 Missing ⚠️
crates/core/src/index.rs 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #664      +/-   ##
==========================================
+ Coverage   55.76%   56.22%   +0.45%     
==========================================
  Files         189      189              
  Lines       20886    20854      -32     
==========================================
+ Hits        11648    11725      +77     
+ Misses       9238     9129     -109     

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

@yuroitaki yuroitaki marked this pull request as draft November 29, 2024 10:33
@sinui0
Copy link
Member

sinui0 commented Dec 2, 2024

This doesn't address the issue, we're not looking for a method to pass in a slice. Instead, we want to address the problem that the user has to specify each range individually which corresponds to a commitment. When the user provides a range set to reveal, we should look into the encoding tree/hash commitments and determine if we can satisfy it with one or more of the available commitments.

@yuroitaki
Copy link
Member Author

This doesn't address the issue, we're not looking for a method to pass in a slice. Instead, we want to address the problem that the user has to specify each range individually which corresponds to a commitment. When the user provides a range set to reveal, we should look into the encoding tree/hash commitments and determine if we can satisfy it with one or more of the available commitments.

Yeap! Got the same feedback from @themighty1 , and am working on it

@yuroitaki yuroitaki changed the title Add reveal groups of ranges. feat: reveal committed ranges given one rangeset. Dec 5, 2024
@yuroitaki yuroitaki marked this pull request as ready for review December 6, 2024 11:20
@yuroitaki yuroitaki requested review from heeckhau and sinui0 December 6, 2024 11:20
@yuroitaki yuroitaki changed the title feat: reveal committed ranges given one rangeset. feat: reveal committed ranges with one rangeset. Dec 6, 2024
@yuroitaki yuroitaki changed the title feat: reveal committed ranges with one rangeset. feat: reveal multiple rangesets with one rangeset. Dec 6, 2024
@yuroitaki yuroitaki requested a review from themighty1 December 10, 2024 16:32
crates/core/src/transcript/proof.rs Outdated Show resolved Hide resolved
@themighty1
Copy link
Member

I'm sorry @yuroitaki , I left my comment above a few days ago but gh still had it as "pending". Apparently i am not able to leave a single comment without explicitely marking the review as "request changes".

// Lookup by transcript index.
transcript_idxs: HashMap<Idx, usize>,
// Lookup by transcript direction and index.
transcript_idxs: HashMap<(Direction, Idx), usize>,
Copy link
Member Author

Choose a reason for hiding this comment

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

bug: Direction needs to be stored alongside Idx as the latter doesn't contain any direction info.

Copy link
Member

Choose a reason for hiding this comment

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

good catch, i'll open an issue lest we forget (but i think this bug was already addressed in one of the open PRs, or maybe it's in my local wip review branch.)

Copy link
Member Author

Choose a reason for hiding this comment

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

ah i actually also fixed this bug in this PR itself

crates/core/src/transcript/proof.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants