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: Sync from aztec-packages #4811

Closed
wants to merge 9 commits into from
Closed

feat: Sync from aztec-packages #4811

wants to merge 9 commits into from

Conversation

AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Apr 16, 2024

Automated pull of Noir development from aztec-packages.
BEGIN_COMMIT_OVERRIDE
feat!: change backend width to 4 (AztecProtocol/aztec-packages#5374)
feat!: Use fixed size arrays in black box functions where sizes are known (AztecProtocol/aztec-packages#5620)
feat!: trap with revert data (AztecProtocol/aztec-packages#5732)
feat: impl of missing functionality in new key store (AztecProtocol/aztec-packages#5750)
feat(acir)!: BrilligCall opcode (AztecProtocol/aztec-packages#5709)
END_COMMIT_OVERRIDE

This starts work towards #3907
but is only the breaking serialization change.

Codegen and evaluation will come in a follow-up. This PR is purely
additive and does not remove the current way we do Brillig gen during
ACIR gen. Codegen for normal Brillig functions is working in my
follow-up, however, removing the existing Brillig opcode will most
likely have to come once we settle on how to [handle the brillig std
lib](noir-lang/acvm#471) as we are currently
generating code such as calculating a quotient during ACIR gen.

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Copy link

socket-security bot commented Apr 16, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@eslint-community/eslint-utils@4.4.0 None 0 379 kB eslint-community-bot
npm/@eslint-community/regexpp@4.10.0 None 0 431 kB eslint-community-bot
npm/@types/json-schema@7.0.15 None 0 31.7 kB types
npm/@types/semver@7.5.8 None 0 23.3 kB types
npm/@typescript-eslint/eslint-plugin@6.21.0 None 0 2.59 MB jameshenry
npm/@typescript-eslint/parser@6.21.0 None 0 17.8 kB jameshenry
npm/@typescript-eslint/scope-manager@6.21.0 None 0 612 kB jameshenry
npm/@typescript-eslint/type-utils@6.21.0 None 0 109 kB jameshenry
npm/@typescript-eslint/types@6.21.0 None 0 156 kB jameshenry
npm/@typescript-eslint/typescript-estree@6.21.0 None 0 565 kB jameshenry
npm/@typescript-eslint/utils@6.21.0 None 0 321 kB jameshenry
npm/@typescript-eslint/visitor-keys@6.21.0 None 0 19.3 kB jameshenry
npm/assertion-error@1.1.0 None 0 5.64 kB chaijs
npm/chai@4.4.1 None 0 754 kB keithamus
npm/chalk-template@1.1.0 None 0 13.7 kB sindresorhus
npm/check-error@1.0.3 None 0 14.4 kB keithamus
npm/commander@12.0.0 environment, filesystem, shell 0 181 kB abetomo
npm/cspell-gitignore@8.7.0 filesystem 0 26.5 kB jason-dent
npm/cspell-glob@8.7.0 None 0 28.4 kB jason-dent
npm/cspell-io@8.7.0 filesystem, network 0 108 kB jason-dent
npm/cspell-lib@8.7.0 environment, filesystem 0 426 kB jason-dent
npm/cspell@8.7.0 environment, filesystem, network 0 319 kB jason-dent
npm/debug@4.3.4 environment 0 42.4 kB qix
npm/deep-eql@4.1.3 None 0 24.2 kB chai
npm/eslint-plugin-prettier@5.1.3 None 0 33.9 kB jounqin
npm/eslint-visitor-keys@3.4.3 None 0 32.3 kB eslintbot
npm/eslint@8.57.0 environment, filesystem 0 3.04 MB eslintbot
npm/fast-glob@3.3.2 filesystem 0 96.7 kB mrmlnc
npm/fast-json-stable-stringify@2.1.0 None 0 17 kB esp
npm/file-entry-cache@8.0.0 filesystem 0 16 kB jaredwray
npm/get-func-name@2.0.2 None 0 8.68 kB keithamus
npm/get-stdin@9.0.0 None 0 4.54 kB sindresorhus
npm/globby@11.1.0 filesystem 0 21.8 kB sindresorhus
npm/graphemer@1.4.0 None 0 812 kB mattpauldavies
npm/ignore@5.3.1 None 0 51.5 kB kael
npm/import-meta-resolve@4.0.0 None 0 76.9 kB wooorm
npm/is-glob@4.0.3 None 0 13.6 kB phated
npm/loupe@2.3.7 None 0 58.1 kB keithamus
npm/minimatch@9.0.3 environment 0 434 kB isaacs
npm/mocha@10.4.0 environment, eval, filesystem 0 2.09 MB voxpelli
npm/natural-compare@1.4.0 None 0 5.65 kB megawac
npm/pathval@1.1.1 None 0 15.8 kB chai
npm/prettier@3.2.5 environment, filesystem, unsafe 0 8.39 MB prettier-bot
npm/strip-ansi@7.1.0 None 0 4.32 kB sindresorhus
npm/ts-api-utils@1.3.0 None 0 828 kB joshuakgoldberg
npm/ts-node@10.9.2 environment, filesystem, unsafe 0 757 kB blakeembrey
npm/type-detect@4.0.8 None 0 42.1 kB chaijs
npm/typescript@5.4.5 None 0 32.4 MB typescript-bot
npm/vscode-uri@3.0.8 None 0 204 kB vscode-bot

🚮 Removed packages: npm/@75lb/deep-merge@1.1.1, npm/@aashutoshrathi/word-wrap@1.2.6, npm/@adraffy/ens-normalize@1.10.0, npm/@algolia/autocomplete-core@1.9.3, npm/@algolia/autocomplete-plugin-algolia-insights@1.9.3, npm/@algolia/autocomplete-preset-algolia@1.9.3, npm/@algolia/autocomplete-shared@1.9.3, npm/@algolia/cache-browser-local-storage@4.23.3, npm/@algolia/cache-common@4.23.3, npm/@algolia/cache-in-memory@4.23.3, npm/@algolia/client-account@4.23.3, npm/@algolia/client-analytics@4.23.3, npm/@algolia/client-common@4.23.3, npm/@algolia/client-personalization@4.23.3, npm/@algolia/client-search@4.23.3, npm/@algolia/events@4.0.1, npm/@algolia/logger-common@4.23.3, npm/@algolia/logger-console@4.23.3, npm/@algolia/requester-browser-xhr@4.23.3, npm/@algolia/requester-common@4.23.3, npm/@algolia/requester-node-http@4.23.3, npm/@algolia/transporter@4.23.3, npm/@ampproject/remapping@2.2.1, npm/@aztec/bb.js@0.34.0, npm/@babel/code-frame@7.23.5, npm/@babel/compat-data@7.23.5, npm/@babel/core@7.12.9, npm/@babel/generator@7.24.4, npm/@babel/helper-annotate-as-pure@7.22.5, npm/@babel/helper-builder-binary-assignment-operator-visitor@7.22.15, npm/@babel/helper-compilation-targets@7.22.15, npm/@babel/helper-create-class-features-plugin@7.23.5, npm/@babel/helper-create-regexp-features-plugin@7.22.15, npm/@babel/helper-define-polyfill-provider@0.4.3, npm/@babel/helper-environment-visitor@7.22.20, npm/@babel/helper-function-name@7.23.0, npm/@babel/helper-hoist-variables@7.22.5, npm/@babel/helper-member-expression-to-functions@7.23.0, npm/@babel/helper-module-imports@7.24.3, npm/@babel/helper-module-transforms@7.23.3, npm/@babel/helper-optimise-call-expression@7.22.5, npm/@babel/helper-plugin-utils@7.24.0, npm/@babel/helper-remap-async-to-generator@7.22.20, npm/@babel/helper-replace-supers@7.24.1, npm/@babel/helper-simple-access@7.22.5, npm/@babel/helper-skip-transparent-expression-wrappers@7.22.5, npm/@babel/helper-split-export-declaration@7.22.6, npm/@babel/helper-string-parser@7.24.1, npm/@babel/helper-validator-identifier@7.22.20, npm/@babel/helper-validator-option@7.23.5, npm/@babel/helper-wrap-function@7.22.20, npm/@babel/helpers@7.24.4, npm/@babel/highlight@7.24.2, npm/@babel/parser@7.24.4, npm/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.23.3, npm/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.23.3, npm/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.23.3, npm/@babel/plugin-proposal-object-rest-spread@7.12.1, npm/@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2, npm/@babel/plugin-syntax-async-generators@7.8.4, npm/@babel/plugin-syntax-class-properties@7.12.13, npm/@babel/plugin-syntax-class-static-block@7.14.5, npm/@babel/plugin-syntax-dynamic-import@7.8.3, npm/@babel/plugin-syntax-export-namespace-from@7.8.3, npm/@babel/plugin-syntax-import-assertions@7.23.3, npm/@babel/plugin-syntax-import-attributes@7.23.3, npm/@babel/plugin-syntax-import-meta@7.10.4, npm/@babel/plugin-syntax-json-strings@7.8.3, npm/@babel/plugin-syntax-jsx@7.12.1, npm/@babel/plugin-syntax-logical-assignment-operators@7.10.4, npm/@babel/plugin-syntax-nullish-coalescing-operator@7.8.3, npm/@babel/plugin-syntax-numeric-separator@7.10.4, npm/@babel/plugin-syntax-object-rest-spread@7.8.3, npm/@babel/plugin-syntax-optional-catch-binding@7.8.3, npm/@babel/plugin-syntax-optional-chaining@7.8.3, npm/@babel/plugin-syntax-private-property-in-object@7.14.5, npm/@babel/plugin-syntax-top-level-await@7.14.5, npm/@babel/plugin-syntax-typescript@7.23.3, npm/@babel/plugin-syntax-unicode-sets-regex@7.18.6, npm/@babel/plugin-transform-arrow-functions@7.23.3, npm/@babel/plugin-transform-async-generator-functions@7.23.4, npm/@babel/plugin-transform-async-to-generator@7.23.3, npm/@babel/plugin-transform-block-scoped-functions@7.23.3, npm/@babel/plugin-transform-block-scoping@7.23.4, npm/@babel/plugin-transform-class-properties@7.23.3, npm/@babel/plugin-transform-class-static-block@7.23.4, npm/@babel/plugin-transform-classes@7.23.5, npm/@babel/plugin-transform-computed-properties@7.23.3, npm/@babel/plugin-transform-destructuring@7.23.3, npm/@babel/plugin-transform-dotall-regex@7.23.3, npm/@babel/plugin-transform-duplicate-keys@7.23.3, npm/@babel/plugin-transform-dynamic-import@7.23.4, npm/@babel/plugin-transform-exponentiation-operator@7.23.3, npm/@babel/plugin-transform-export-namespace-from@7.23.4, npm/@babel/plugin-transform-for-of@7.23.3, npm/@babel/plugin-transform-function-name@7.23.3, npm/@babel/plugin-transform-json-strings@7.23.4, npm/@babel/plugin-transform-literals@7.23.3, npm/@babel/plugin-transform-logical-assignment-operators@7.23.4, npm/@babel/plugin-transform-member-expression-literals@7.23.3, npm/@babel/plugin-transform-modules-amd@7.23.3, npm/@babel/plugin-transform-modules-commonjs@7.23.3, npm/@babel/plugin-transform-modules-systemjs@7.23.3, npm/@babel/plugin-transform-modules-umd@7.23.3, npm/@babel/plugin-transform-named-capturing-groups-regex@7.22.5, npm/@babel/plugin-transform-new-target@7.23.3, npm/@babel/plugin-transform-nullish-coalescing-operator@7.23.4, npm/@babel/plugin-transform-numeric-separator@7.23.4, npm/@babel/plugin-transform-object-rest-spread@7.23.4, npm/@babel/plugin-transform-object-super@7.23.3, npm/@babel/plugin-transform-optional-catch-binding@7.23.4, npm/@babel/plugin-transform-optional-chaining@7.24.1, npm/@babel/plugin-transform-parameters@7.24.1, npm/@babel/plugin-transform-private-methods@7.23.3, npm/@babel/plugin-transform-private-property-in-object@7.23.4, npm/@babel/plugin-transform-property-literals@7.23.3, npm/@babel/plugin-transform-react-constant-elements@7.23.3, npm/@babel/plugin-transform-react-display-name@7.23.3, npm/@babel/plugin-transform-react-jsx-development@7.22.5, npm/@babel/plugin-transform-react-jsx@7.23.4, npm/@babel/plugin-transform-react-pure-annotations@7.23.3, npm/@babel/plugin-transform-regenerator@7.23.3, npm/@babel/plugin-transform-reserved-words@7.23.3, npm/@babel/plugin-transform-runtime@7.23.4, npm/@babel/plugin-transform-shorthand-properties@7.23.3, npm/@babel/plugin-transform-spread@7.23.3, npm/@babel/plugin-transform-sticky-regex@7.23.3, npm/@babel/plugin-transform-template-literals@7.23.3, npm/@babel/plugin-transform-typeof-symbol@7.23.3, npm/@babel/plugin-transform-typescript@7.23.5, npm/@babel/plugin-transform-unicode-escapes@7.23.3, npm/@babel/plugin-transform-unicode-property-regex@7.23.3, npm/@babel/plugin-transform-unicode-regex@7.23.3, npm/@babel/plugin-transform-unicode-sets-regex@7.23.3, npm/@babel/preset-env@7.23.5, npm/@babel/preset-modules@0.1.6-no-external-plugins, npm/@babel/preset-react@7.23.3, npm/@babel/preset-typescript@7.23.3, npm/@babel/regjsgen@0.8.0, npm/@babel/runtime-corejs3@7.23.5, npm/@babel/runtime@7.24.4, npm/@babel/template@7.24.0, npm/@babel/traverse@7.24.1, npm/@babel/types@7.24.0, npm/@chainsafe/as-sha256@0.3.1, npm/@chainsafe/persistent-merkle-tree@0.4.2, npm/@chainsafe/ssz@0.10.2, npm/@colors/colors@1.5.0, npm/@cspell/cspell-bundled-dicts@8.7.0, npm/@cspell/cspell-resolver@8.7.0, npm/@cspell/cspell-service-bus@8.7.0, npm/@cspell/dict-ada@4.0.2, npm/@cspell/dict-aws@4.0.1, npm/@cspell/dict-bash@4.1.3, npm/@cspell/dict-companies@3.0.31, npm/@cspell/dict-cpp@5.1.3, npm/@cspell/dict-cryptocurrencies@5.0.0, npm/@cspell/dict-csharp@4.0.2, npm/@cspell/dict-css@4.0.12, npm/@cspell/dict-dart@2.0.3, npm/@cspell/dict-data-science@1.0.11, npm/@cspell/dict-django@4.1.0, npm/@cspell/dict-docker@1.1.7, npm/@cspell/dict-dotnet@5.0.0, npm/@cspell/dict-elixir@4.0.3, npm/@cspell/dict-en-common-misspellings@2.0.0, npm/@cspell/dict-en-gb@1.1.33, npm/@cspell/dict-en_us@4.3.17, npm/@cspell/dict-filetypes@3.0.3, npm/@cspell/dict-fonts@4.0.0, npm/@cspell/dict-fsharp@1.0.1, npm/@cspell/dict-fullstack@3.1.5, npm/@cspell/dict-gaming-terms@1.0.5, npm/@cspell/dict-git@3.0.0, npm/@cspell/dict-golang@6.0.5, npm/@cspell/dict-haskell@4.0.1, npm/@cspell/dict-html-symbol-entities@4.0.0, npm/@cspell/dict-html@4.0.5, npm/@cspell/dict-java@5.0.6, npm/@cspell/dict-k8s@1.0.2, npm/@cspell/dict-latex@4.0.0, npm/@cspell/dict-lorem-ipsum@4.0.0, npm/@cspell/dict-lua@4.0.3, npm/@cspell/dict-makefile@1.0.0, npm/@cspell/dict-node@4.0.3, npm/@cspell/dict-npm@5.0.15, npm/@cspell/dict-php@4.0.6, npm/@cspell/dict-powershell@5.0.3, npm/@cspell/dict-public-licenses@2.0.6, npm/@cspell/dict-python@4.1.11, npm/@cspell/dict-r@2.0.1, npm/@cspell/dict-ruby@5.0.2, npm/@cspell/dict-rust@4.0.2, npm/@cspell/dict-scala@5.0.0, npm/@cspell/dict-software-terms@3.3.18, npm/@cspell/dict-sql@2.1.3, npm/@cspell/dict-svelte@1.0.2, npm/@cspell/dict-swift@2.0.1, npm/@cspell/dict-typescript@3.1.2, npm/@cspell/dict-vue@3.0.0, npm/@cspell/strong-weak-map@8.7.0, npm/@cspotcode/source-map-support@0.8.1, npm/@discoveryjs/json-ext@0.5.7, npm/@docsearch/css@3.5.2, npm/@docsearch/react@3.5.2, npm/@docusaurus/core@2.4.3, npm/@docusaurus/core@3.2.1, npm/@docusaurus/cssnano-preset@2.4.3, npm/@docusaurus/logger@2.4.3, npm/@docusaurus/mdx-loader@2.4.3, npm/@docusaurus/module-type-aliases@2.4.3, npm/@docusaurus/module-type-aliases@3.2.1, npm/@docusaurus/plugin-content-blog@3.0.1, npm/@docusaurus/plugin-content-docs@3.0.1, npm/@docusaurus/plugin-content-pages@3.0.1, npm/@docusaurus/plugin-debug@3.0.1, npm/@docusaurus/plugin-google-analytics@3.0.1, npm/@docusaurus/plugin-google-gtag@3.0.1, npm/@docusaurus/types@3.2.1, npm/@types/readable-stream@4.0.11, npm/@web/test-runner-playwright@0.11.0, npm/adm-zip@0.5.12, npm/axios@1.6.8, npm/copy-webpack-plugin@12.0.2, npm/ethers@6.11.1, npm/memfs@4.8.1, npm/react-dom@18.2.0, npm/readable-stream@4.5.2, npm/webpack-dev-server@5.0.4

View full report↗︎

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 16, 2024
AztecBot and others added 8 commits April 16, 2024 06:10
This PR adds revert data for user-defined messages in the TRAP opcode.
Not all messages are returned as revert data, since compiler intrinsic
messages are spammed all over SSA and codegening revert data for all
those makes brillig function size blow up and impacts performance in a
hard way due to deserializing load.
This is currently only for static assert messages, since dynamic ones
are implemented as an oracle and probably need a rework to be able to
return them as revert data.

---------

Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
This PR adds revert data for user-defined messages in the TRAP opcode.
Not all messages are returned as revert data, since compiler intrinsic
messages are spammed all over SSA and codegening revert data for all
those makes brillig function size blow up and impacts performance in a
hard way due to deserializing load.
This is currently only for static assert messages, since dynamic ones
are implemented as an oracle and probably need a rework to be able to
return them as revert data.

---------

Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
…nown (AztecProtocol/aztec-packages#5620)

This PR enforces the sizes of inputs/outputs of blackbox functions to
remove some runtime checks and allocations.

---------

Co-authored-by: guipublic <guipublic@gmail.com>
Co-authored-by: vezenovm <mvezenov@gmail.com>
…nown (AztecProtocol/aztec-packages#5620)

This PR enforces the sizes of inputs/outputs of blackbox functions to
remove some runtime checks and allocations.

---------

Co-authored-by: guipublic <guipublic@gmail.com>
Co-authored-by: vezenovm <mvezenov@gmail.com>
This is a breaking change because it will change the acir opcode
compiled by Noir. If they are not updated, proving and verification will
fail.

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
This is a breaking change because it will change the acir opcode
compiled by Noir. If they are not updated, proving and verification will
fail.

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
@TomAFrench TomAFrench closed this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants