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

Fix/core validation #648

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

Fix/core validation #648

wants to merge 6 commits into from

Conversation

themighty1
Copy link
Member

This PR adds validation to some of the core types.

Also renames tree_len to leaf_count since "tree length" is too ambiguous.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 76.27119% with 14 lines in your changes missing coverage. Please review.

Project coverage is 54.43%. Comparing base (2c045e5) to head (82e254c).

Files with missing lines Patch % Lines
crates/core/src/transcript/proof.rs 12.50% 7 Missing ⚠️
crates/core/src/transcript/encoding/proof.rs 84.21% 6 Missing ⚠️
crates/verifier/src/verify.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #648      +/-   ##
==========================================
+ Coverage   54.35%   54.43%   +0.07%     
==========================================
  Files         192      192              
  Lines       20474    20530      +56     
==========================================
+ Hits        11129    11175      +46     
- Misses       9345     9355      +10     

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

@themighty1 themighty1 requested a review from sinui0 October 22, 2024 09:33
@yuroitaki yuroitaki self-requested a review December 3, 2024 15:14
Copy link
Member

@yuroitaki yuroitaki left a comment

Choose a reason for hiding this comment

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

LGTM! just some questions

crates/core/src/transcript/encoding/proof.rs Show resolved Hide resolved
///
/// DO NOT use bit encodings which have less than 50 uniformly random bits,
/// since the SSP < 40 bits is widely considered inadequate.
const MAX_HEIGHT: usize = 10;
Copy link
Member

Choose a reason for hiding this comment

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

is there any reason why 10 is chosen?

Copy link
Member Author

@themighty1 themighty1 Dec 12, 2024

Choose a reason for hiding this comment

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

No specific reason other than we want to achieve SSP=40 and don't want to mandate that encodings are unnecessarily large. It seemes reasonable that there won't be > 1024 commitments. Although, now I'm realizing that with our json commit-to-everything strategy 1024 may be insufficient.

Let's tag @sinui0 to double check.

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.

2 participants