Skip to content

Commit

Permalink
Merge pull request #75 from noir-lang/zpedro/0.25.0
Browse files Browse the repository at this point in the history
chore: bumping to 0.25.0
  • Loading branch information
signorecello authored Mar 15, 2024
2 parents a651a7e + f45b58e commit 80282b2
Show file tree
Hide file tree
Showing 8 changed files with 396 additions and 173 deletions.
477 changes: 349 additions & 128 deletions vite-hardhat/circuit/contract/noirstarter/plonk_vk.sol

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions vite-hardhat/circuit/target/noirstarter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"noir_version":"0.24.0+9544813fabbd18a87dd88456e6a5b781bd0cf008","hash":5369864856198621426,"abi":{"parameters":[{"name":"x","type":{"kind":"field"},"visibility":"private"},{"name":"y","type":{"kind":"field"},"visibility":"public"}],"param_witnesses":{"x":[{"start":0,"end":1}],"y":[{"start":1,"end":2}]},"return_type":null,"return_witnesses":[]},"bytecode":"H4sIAAAAAAAA/7WUPQ7DIAyFTZNWHXsUm59gtlylqOT+J6iqqqmCiDfMW2CwzGc/mxkArnDWtJ/rfjpcvC/RFnL0RJsyB/QhL0xMgcPLsnOFPceUU8RE3hXaQnIb/lTnwj6RUeS66HHht2dG6KVpeol9Ik1m03j+n4WbwF/Htfd7FfdWrLV9t2V5CJwnD1ZFmBFmTgPyzqC7vCPqnvU9QhAGYkRPsVMGjuUxArP0kcAH+JIvC64FAAA=","debug_symbols":"lc9BCoAgEIXhu7y1i0or8CrRYioDQVRUghDvntIJ3M0/fJuXYdxJSTsbITMGyC0jerKtYqKQIMXKoOwFOfPCcGuj6m8pO8PYx6c+zvu46OE1HgqaDqPa8Jrp9f9ZPg==","file_map":{"46":{"source":"fn main(x : Field, y : pub Field) {\n assert(x != y);\n}\n","path":"/Users/zpedro/Documents/GitHub/noir-starter/vite-hardhat/circuit/src/main.nr"}}}
2 changes: 1 addition & 1 deletion vite-hardhat/hooks/useOffChainVerification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function useOffChainVerification(noir?: Noir, proofData?: ProofData) {
useEffect(() => {
if (!proofData || !noir) return;

toast.promise(noir.verifyFinalProof(proofData), {
toast.promise(noir.verifyProof(proofData), {
pending: 'Verifying proof off-chain',
success: 'Proof verified off-chain',
error: 'Error verifying proof off-chain',
Expand Down
2 changes: 1 addition & 1 deletion vite-hardhat/hooks/useProofGeneration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function useProofGeneration(inputs?: { [key: string]: string }) {
error: 'Error initializing Noir',
});

const data = await toast.promise(noir.generateFinalProof(inputs), {
const data = await toast.promise(noir.generateProof(inputs), {
pending: 'Generating proof',
success: 'Proof generated',
error: 'Error generating proof',
Expand Down
8 changes: 4 additions & 4 deletions vite-hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"test": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only' hardhat test"
},
"dependencies": {
"@noir-lang/backend_barretenberg": "^0.23.0",
"@noir-lang/noir_js": "^0.23.0",
"@noir-lang/noir_wasm": "^0.23.0",
"@noir-lang/types": "^0.23.0",
"@noir-lang/backend_barretenberg": "^0.25.0",
"@noir-lang/noir_js": "^0.25.0",
"@noir-lang/noir_wasm": "^0.25.0",
"@noir-lang/types": "^0.25.0",
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
"@nomicfoundation/hardhat-toolbox-viem": "1.0.0",
"@nomicfoundation/hardhat-viem": "1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions vite-hardhat/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ describe('It compiles noir program code, receiving circuit bytes and abi object.
it('Should generate valid proof for correct input', async () => {
const input = { x: 1, y: 2 };
// Generate proof
correctProof = await noir.generateFinalProof(input);
correctProof = await noir.generateProof(input);
expect(correctProof.proof instanceof Uint8Array).to.be.true;
});

it('Should verify valid proof for correct input', async () => {
const verification = await noir.verifyFinalProof(correctProof);
const verification = await noir.verifyProof(correctProof);
expect(verification).to.be.true;
});

it('Should fail to generate valid proof for incorrect input', async () => {
try {
const input = { x: 1, y: 1 };
const incorrectProof = await noir.generateFinalProof(input);
const incorrectProof = await noir.generateProof(input);
} catch (err) {
// TODO(Ze): Not sure how detailed we want this test to be
expect(err instanceof Error).to.be.true;
Expand Down
2 changes: 1 addition & 1 deletion vite-hardhat/utils/addresses.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"chainId":31337,"verifier":"0x0165878a594ca255338adfa4d48449f69242eb8f"}
{"chainId":31337,"verifier":"0x5fbdb2315678afecb367f032d93f642f64180aa3"}
71 changes: 36 additions & 35 deletions vite-hardhat/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.4.tgz#aae21cb858bbb0411949d5b7b3051f4209043f62"
integrity sha512-UK0bHA7hh9cR39V+4gl2/NnBBjoXIxkuWAPCaY4X7fbH4L/azIi7ilWOCjMUYfpJgraLUAqkRi2BqrjME8Rynw==

"@aztec/bb.js@0.19.0":
version "0.19.0"
resolved "https://registry.yarnpkg.com/@aztec/bb.js/-/bb.js-0.19.0.tgz#1c9c1d386954398e99c024425d9f282955389d59"
integrity sha512-I28AdggGl/5FjOEdOCYXviH0TnQUjEl2B95sux1kVJj8MiwD1rmx/tuaQBvUwRKe3hg/4C1KQRYWFn4vwlhg3A==
"@aztec/bb.js@0.26.3":
version "0.26.3"
resolved "https://registry.yarnpkg.com/@aztec/bb.js/-/bb.js-0.26.3.tgz#a148c3c8b35d78a92568f2f7ce9c05a8de4ead22"
integrity sha512-iZXQyjVVgDYQt77IggxC1MUZDBd68Q9aXepclq1kv4Ube1wllmlZ3+NGKZx/ma8yd24ytYGtIx/7kY8L4SbdkQ==
dependencies:
comlink "^4.4.1"
commander "^10.0.1"
Expand Down Expand Up @@ -756,47 +756,48 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@noir-lang/acvm_js@0.39.0":
version "0.39.0"
resolved "https://registry.yarnpkg.com/@noir-lang/acvm_js/-/acvm_js-0.39.0.tgz#8d05c0fee40b378beeede6f68e6e243e43bd74d2"
integrity sha512-Y77qyfamkYSIzzKFkewTwExzTvxYcRd1XBqo950ti4uKMdu18GthkOssqC7CGacwx5PdrdOGFGRJbVtjoXeKIg==
"@noir-lang/acvm_js@0.41.0":
version "0.41.0"
resolved "https://registry.yarnpkg.com/@noir-lang/acvm_js/-/acvm_js-0.41.0.tgz#7636ac018e26271c113309cd8883d95aa661ac2a"
integrity sha512-/FST2lHKOpe/US6UFtTYSJZFtmvTjTtW7zBkcp1VaEn00SqezJszuwv9oQOfVz7F59LBL3b4+JFi5oIHlzef0g==

"@noir-lang/backend_barretenberg@0.23.0":
version "0.23.0"
resolved "https://registry.yarnpkg.com/@noir-lang/backend_barretenberg/-/backend_barretenberg-0.23.0.tgz#19a85be2c4f83b87e8b4c03eb4e8f3e108304d51"
integrity sha512-amehMEE8kEMEbuxvPT1H9BwVQyEFFip6ajHWhgJjw/PkNB8tBzP+ekVrcEvxVerAKNikfzCEWS/kV7CEWcQNzA==
"@noir-lang/backend_barretenberg@^0.25.0":
version "0.25.0"
resolved "https://registry.yarnpkg.com/@noir-lang/backend_barretenberg/-/backend_barretenberg-0.25.0.tgz#4f4abf5bbdcb5d88fa4dbb29f68eddb513a3070c"
integrity sha512-Dipgpc1DmxLAtB4CEXwOQw8EA/DLqALD+F3cezwuo4vCiB+pvALaUBTDSco6TP1VINRzelzWvUL5BIEoEAlByQ==
dependencies:
"@aztec/bb.js" "0.19.0"
"@noir-lang/types" "0.23.0"
"@aztec/bb.js" "0.26.3"
"@noir-lang/types" "0.25.0"
fflate "^0.8.0"

"@noir-lang/noir_js@0.23.0":
version "0.23.0"
resolved "https://registry.yarnpkg.com/@noir-lang/noir_js/-/noir_js-0.23.0.tgz#fd85e4b3f1434b8ff811ec4ceb19a5814474289f"
integrity sha512-eblqgm0PjgptYG+TkK2Dmp/Y2fEhjM5sqMam+QUQHn/2WmC+8/LO2a0FQU0t1432BGCII6/TfojQzgQobuXJAw==
"@noir-lang/noir_js@^0.25.0":
version "0.25.0"
resolved "https://registry.yarnpkg.com/@noir-lang/noir_js/-/noir_js-0.25.0.tgz#7ff8f0ffc2d1fe0e180156b2c2131374b0d544be"
integrity sha512-hCfTfM6QU7s2ZC8rxf0JEm+7bHIsLnH1FHsw7W2cQB9g69U4HBs0cY7Sc8XUHPpabxQ8VC1kcNTsoQwDvocF0g==
dependencies:
"@noir-lang/acvm_js" "0.39.0"
"@noir-lang/noirc_abi" "0.23.0"
"@noir-lang/types" "0.23.0"
"@noir-lang/acvm_js" "0.41.0"
"@noir-lang/noirc_abi" "0.25.0"
"@noir-lang/types" "0.25.0"

"@noir-lang/noir_wasm@0.23.0":
version "0.23.0"
resolved "https://registry.yarnpkg.com/@noir-lang/noir_wasm/-/noir_wasm-0.23.0.tgz#5fe49f31d7fd67963d166439f7402a09668aec95"
integrity sha512-HL78frUo60bKrUaxOAJQtyrmBWUyiQbSp4yQkh9A/vFAnEhxehDwd8peCGKMZKX66JpRccClv52zyb5O/ECE4g==
"@noir-lang/noir_wasm@^0.25.0":
version "0.25.0"
resolved "https://registry.yarnpkg.com/@noir-lang/noir_wasm/-/noir_wasm-0.25.0.tgz#20641eba0c99583e13cbd77d0a1d82f409edb4b9"
integrity sha512-S8x3E9q+UqtvkLO76IDr2f6st8/3VihtHDioR+TwI10SO2LkKssq1QLNLAyrE0P8BFjZNHlcchbSjOylKDQp9A==
dependencies:
"@noir-lang/types" "0.25.0"
pako "^2.1.0"

"@noir-lang/[email protected]":
version "0.23.0"
resolved "https://registry.yarnpkg.com/@noir-lang/noirc_abi/-/noirc_abi-0.23.0.tgz#47dcfd724e205eadc3a6d4ebab9b11355cb0d0cb"
integrity sha512-MYBkj6hSpiimlcBmX6n/hY+y2Kk39Qh8qre5c41GZPvmC88f7MqhAdDTSsfrFnNg1pvpY5UX6/G1D8jEkT11qA==

"@noir-lang/[email protected]":
version "0.23.0"
resolved "https://registry.yarnpkg.com/@noir-lang/types/-/types-0.23.0.tgz#a99c7bc6eaffbf9e1209d1cb2ca7ecd0f047f62f"
integrity sha512-jgA4thao714WHiXVE3KS7Y2vQnH3gvsVM1cO1kQsihgmqX5VO+Kk6bI3Yck9HUvAqgcjJgSeOeBtbdTYSzjzkw==
"@noir-lang/[email protected]":
version "0.25.0"
resolved "https://registry.yarnpkg.com/@noir-lang/noirc_abi/-/noirc_abi-0.25.0.tgz#098eea2bf65a0a2dc180041330c26a089c39709c"
integrity sha512-uoNfRgGP9qAfovZKrtfZIE6cKCH2OiuKrsCRvNvSxx2Nv57sN93YYpKF+g1726Y6d/a5vxbxP6z5+uvoEALkDw==
dependencies:
"@noir-lang/noirc_abi" "0.23.0"
"@noir-lang/types" "0.25.0"

"@noir-lang/[email protected]", "@noir-lang/types@^0.25.0":
version "0.25.0"
resolved "https://registry.yarnpkg.com/@noir-lang/types/-/types-0.25.0.tgz#e05843ba2850e222c2c1e7b1ed5634460bfa7c9f"
integrity sha512-kt1R0vd/J116Q8dTZt3iIEg4d17wzvXOHmw5HbfYbWnFbepA8AlAneEDpYusmZoTwFcxqPKiZu45aUrezFd+kQ==

"@nomicfoundation/[email protected]":
version "5.0.2"
Expand Down

0 comments on commit 80282b2

Please sign in to comment.