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

Move Poseidon primitive into halo2_poseidon #831

Merged
merged 3 commits into from
Dec 16, 2024
Merged

Move Poseidon primitive into halo2_poseidon #831

merged 3 commits into from
Dec 16, 2024

Conversation

str4d
Copy link
Contributor

@str4d str4d commented Dec 13, 2024

No description provided.

@str4d str4d force-pushed the poseidon-primitive branch 2 times, most recently from 0192b97 to 0d88368 Compare December 16, 2024 13:25
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

utACK 0d88368 with two minor questions.

Comment on lines +174 to +175
self.mode = Absorbing::init_empty();
self.mode.absorb(value).expect("state is not full");
Copy link
Contributor

Choose a reason for hiding this comment

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

/// Attempts to absorb a value into the sponge state.
///
/// Returns the value if it was not absorbed because the sponge is full.
pub fn absorb(&mut self, value: F) -> Result<(), F> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Result the right type to return here? Or should it be a bespoke enum? It looks to me like the kind of thing that I would ordinarily use Either for rather than Result, but a bespoke enum might be better.

@str4d str4d force-pushed the poseidon-primitive branch from 0d88368 to 5893850 Compare December 16, 2024 15:31
@str4d str4d marked this pull request as ready for review December 16, 2024 15:31
@str4d
Copy link
Contributor Author

str4d commented Dec 16, 2024

Rebased on main to fix CI.

Copy link
Contributor

@nuttycom nuttycom 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 5893850

@str4d str4d merged commit c91cc5c into main Dec 16, 2024
39 of 42 checks passed
@str4d str4d deleted the poseidon-primitive branch December 16, 2024 16:21
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