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

chore: remove redundant methods and use hash instead of compress in the interface #3038

Closed
wants to merge 15 commits into from

Conversation

kevaundray
Copy link
Contributor

@kevaundray kevaundray commented Oct 25, 2023

This removes quite a few methods from the interface:

  • compress is effectively the same as hash now, so I've moved to using hash everywhere on the interface
  • the withIndex methods are a superset of the methods without it -- I've left pedersenHash and pedersenHashWithIndex because the 0 hash index seems to be quite useful for circuits.js, however since circuits.js does not use barretenberg_api, we could likely get rid of it and just define it in circuits.js.

Related to #3029

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@kevaundray kevaundray mentioned this pull request Oct 25, 2023
Base automatically changed from kw/pedersen-cleanup-rm-plookup-namespace to master October 25, 2023 18:12
kevaundray added a commit that referenced this pull request Oct 25, 2023
Extracting this from #3038 


# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
kevaundray added a commit that referenced this pull request Oct 25, 2023
Partly extracted from #3038 

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
@kevaundray
Copy link
Contributor Author

This has been merged into master piecewise by the linked commits, the issues encountered were:

  • arguments are in the wrong order for the hash variant
  • calling convention changes subtly which see the nuance between hash_index being a u32 and being a u32 const*

@kevaundray kevaundray closed this Oct 26, 2023
@ludamad ludamad deleted the kw/pedersen-cleanup-rm-redundant-methods branch August 22, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant