Skip to content

fix #741 and #646#772

Merged
Maddiaa0 merged 3 commits into
masterfrom
rk/741-secrethash
Jun 8, 2023
Merged

fix #741 and #646#772
Maddiaa0 merged 3 commits into
masterfrom
rk/741-secrethash

Conversation

@rahul-kothari

Copy link
Copy Markdown
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.

@Maddiaa0 Maddiaa0 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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

Comment thread yarn-project/aztec.js/src/utils/secrets.ts Outdated
Comment thread yarn-project/acir-simulator/src/client/private_execution.test.ts

@LHerskind LHerskind left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Maddiaa0 Maddiaa0 left a comment

Copy link
Copy Markdown
Member

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