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

feat: Use unconstrained for public, view and note getter functions #1198

Merged
merged 9 commits into from
Jul 26, 2023

Conversation

sirasistant
Copy link
Collaborator

@sirasistant sirasistant commented Jul 26, 2023

Description

All functions marked as "should be unconstrained" and all open functions are compiled as brillig.

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.

@netlify
Copy link

netlify bot commented Jul 26, 2023

Deploy Preview for preeminent-bienenstitch-606ad0 canceled.

Name Link
🔨 Latest commit 756c33f
🔍 Latest deploy log https://app.netlify.com/sites/preeminent-bienenstitch-606ad0/deploys/64c1307d9020df00083a43bd

@sirasistant sirasistant changed the title WIP: experimenting with compiling functions as brillig feat: use unconstrained for public, view and note getter functions Jul 26, 2023
@sirasistant sirasistant changed the title feat: use unconstrained for public, view and note getter functions feat: Use unconstrained for public, view and note getter functions Jul 26, 2023
@sirasistant sirasistant marked this pull request as ready for review July 26, 2023 14:38
fn arr_copy_slice<T, M>(
src: [T],
fn arr_copy_slice<T, N, M>(
src: [T; N],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We aren't able to freely move slices around until this noir-lang/noir#1963 is finished

@@ -295,7 +295,7 @@ describe('Private Execution test suite', () => {
expect(newNullifiers).toEqual(consumedNotes.map(n => n.nullifier));

expect(result.preimages.newNotes).toHaveLength(2);
const [recipientNote, changeNote] = result.preimages.newNotes;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The order of the sideffects has changed. There is probably some non-determinism in the compiler if we change the point at which the functions stop being acir 🤔

Copy link
Collaborator

@ludamad ludamad left a comment

Choose a reason for hiding this comment

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

LGTM

@sirasistant sirasistant merged commit 63f7c1f into master Jul 26, 2023
@sirasistant sirasistant deleted the arv/brillig_funs branch July 26, 2023 14:52
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.

2 participants