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

Introduce LookupRangeCheckConfigs for each Sinsemilla advice column #133

Merged
merged 5 commits into from
Jun 29, 2021

Conversation

therealyingtong
Copy link
Contributor

Based on #132.

Inputs to Sinsemilla are commonly decomposed into subpieces and packed into field elements. These subpieces have to be range-checked. This PR includes a LookupRangeCheckConfig for each Sinsemilla advice column, to enable subpieces to be looked up in any advice column.

This PR also moves certain APIs from the instruction level to the gadget level.

…t level

These instructions were not making any assignments; instead, they
were calling through to witness_message_piece_field().

This PR also renames the witness_message_piece_field() instruction
to witness_message_piece().
Inputs to Sinsemilla often need to be decomposed and range-constrained.
To be replaced by the public inputs API.
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

utACK modulo some mis-merges and minor comments.

src/circuit/gadget/sinsemilla/chip.rs Outdated Show resolved Hide resolved

impl SinsemillaConfig {
pub fn advices(&self) -> [Column<Advice>; 5] {
[self.bits, self.lambda_1, self.lambda_2, self.x_a, self.x_p]
Copy link
Contributor

Choose a reason for hiding this comment

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

Rebase mis-merge; this is altered and documented in ff63747 (an unrelated commit). Move those changes into this PR.

Copy link
Contributor Author

@therealyingtong therealyingtong Jun 29, 2021

Choose a reason for hiding this comment

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

I actually don't think the advices() method is needed anymore. It was only being used to construct lookup_configs, which have now been made native to the SinsemillaConfig.

The advices() method is now only used to construct the CondSwapConfig, so I've moved it into the MerkleChip PR (#98).

src/circuit/gadget/sinsemilla.rs Outdated Show resolved Hide resolved
src/circuit/gadget/sinsemilla.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

utACK

@str4d str4d closed this Jun 29, 2021
@str4d str4d deleted the branch main June 29, 2021 09:38
@str4d str4d reopened this Jun 29, 2021
@str4d str4d changed the base branch from patch-lookup-range-check to main June 29, 2021 09:40
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

re-utACK 12cef17

@str4d str4d merged commit 9f1bd64 into main Jun 29, 2021
@str4d str4d deleted the patch-sinsemilla branch June 29, 2021 09:43
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