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 #741 and #646 #772

Merged
merged 3 commits into from
Jun 8, 2023
Merged

fix #741 and #646 #772

merged 3 commits into from
Jun 8, 2023

Conversation

rahul-kothari
Copy link
Contributor

Description

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • The branch has been merged or rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

Copy link
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

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

small nit over typing, but looks good once ci gets resolved les do it

* @param secret - the secret to hash (defaults to a random field element)
* @returns secret and its pederson hash (in hex).
*/
export async function createMessageSecretAndHash(secret = Fr.random()) {
Copy link
Member

Choose a reason for hiding this comment

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

return as fr to prevent viem coupling

@rahul-kothari rahul-kothari changed the base branch from master to adam/chore/enforce-eslint June 7, 2023 17:23
@rahul-kothari rahul-kothari changed the base branch from adam/chore/enforce-eslint to master June 7, 2023 17:24
@rahul-kothari rahul-kothari force-pushed the rk/741-secrethash branch 2 times, most recently from 75c10c5 to 4f53e53 Compare June 7, 2023 18:02
@rahul-kothari rahul-kothari requested a review from Maddiaa0 June 8, 2023 09:09
import { computeSecretMessageHash } from '@aztec/circuits.js/abis';

/**
* Given a secret, it computes its pederson hash - used to send l1 to l2 messages
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Given a secret, it computes its pederson hash - used to send l1 to l2 messages
* Given a secret, it computes its pedersen hash - used to send l1 to l2 messages

yarn-project/aztec.js/src/utils/secrets.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

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

image
FIRE IT UP BOYS

@Maddiaa0 Maddiaa0 merged commit bb675e0 into master Jun 8, 2023
@Maddiaa0 Maddiaa0 deleted the rk/741-secrethash branch June 8, 2023 15:01
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.

Create utility in aztec.js to compute claim secret hash Remove hash in l1_to_l2_message.ts
3 participants