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

chore: update recursion example for noir v0.25.0 #18

Merged
merged 7 commits into from
Mar 13, 2024

Conversation

CodeDragonVN
Copy link
Contributor

Description

Problem*

This Pull Request updates the recursion example to be compatible with Noir v0.24.0, addressing breaking changes introduced in the update. It resolves the issue described in: Update recursion to Noir v0.24.0 #16.

Summary*

The PR makes several changes to provide compatibility with Noir v0.24.0:

  • Updated function names to match the new specifications (generateIntermediateProof to generateProof, verifyIntermediateProof to verifyProof, etc.).
  • Adjusted the package.json to the version 0.24.0 updates for @noir-lang packages.
  • Improved the UI on yarn dev localhost to enhance user experience.
  • Added the #[recursive] attribute and updated Nargo.toml files in line with Noir v0.24.0 requirements.

Additional Context

NEW UI

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link

socket-security bot commented Mar 1, 2024

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

Package New capabilities Transitives Size Publisher
npm/@babel/[email protected] None 0 247 kB nicolo-ribaudo
npm/@iarna/[email protected] eval 0 99 kB iarna
npm/@isaacs/[email protected] None +7 184 kB isaacs
npm/@jridgewell/[email protected] None 0 53.2 kB jridgewell
npm/@ledgerhq/[email protected] None 0 17.6 kB sergii-shkolin
npm/@nomicfoundation/[email protected] None +28 6.23 MB fvictorio
npm/@nomicfoundation/[email protected] None +39 8.77 MB fvictorio
npm/@nomicfoundation/[email protected] Transitive: network +16 4.36 MB fvictorio
npm/@nomicfoundation/[email protected] None +36 7.02 MB fvictorio
npm/@nomicfoundation/[email protected] environment, eval +18 4.46 MB fvictorio
npm/@nomicfoundation/[email protected] None 0 125 kB fvictorio
npm/@nomicfoundation/[email protected] environment +20 5.5 MB fvictorio
npm/@nomicfoundation/[email protected] None +19 4.11 MB fvictorio
npm/@nomicfoundation/[email protected] Transitive: network +17 5.01 MB fvictorio
npm/@nomicfoundation/[email protected] network +15 3.71 MB fvictorio
npm/@nomicfoundation/[email protected] environment Transitive: eval +43 11.1 MB fvictorio
npm/@nomicfoundation/[email protected] Transitive: environment, filesystem, network, shell +87 42.4 MB schaable
npm/@nomicfoundation/[email protected] Transitive: environment, filesystem, network, shell +74 22 MB fvictorio
npm/@nomicfoundation/[email protected] None 0 384 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 404 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 356 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 352 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 409 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 405 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 374 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 350 kB alcuadrado
npm/@nomicfoundation/[email protected] None 0 414 kB alcuadrado
npm/@npmcli/[email protected] filesystem 0 26.5 kB lukekarrys
npm/@openzeppelin/[email protected] None 0 1.7 MB frangio
npm/@pkgjs/[email protected] None 0 74.2 kB oss-bot
npm/@solana/[email protected] None +3 305 kB steveluscher
npm/@solana/[email protected] environment, eval, network Transitive: filesystem, shell +30 18.4 MB buffalojoec
npm/@tootallnate/[email protected] None 0 16.3 kB tootallnate
npm/@types/[email protected] None +1 1.96 MB types
npm/@types/[email protected] None 0 81.3 kB types
npm/@types/[email protected] None +1 1.96 MB types
npm/@types/[email protected] None 0 95.6 kB types
npm/@types/[email protected] None 0 1.68 MB types
npm/@types/[email protected] None 0 1.95 MB types
npm/@types/[email protected] None +1 1.95 MB types
npm/@types/[email protected] None 0 6.16 kB types
npm/@types/[email protected] None 0 6.4 kB types
npm/@types/[email protected] None +3 1.69 MB types
npm/@types/[email protected] None 0 8.25 kB types
npm/@types/[email protected] None +1 1.96 MB types
npm/@types/[email protected] None +1 1.97 MB types
npm/[email protected] None +5 596 kB vweevers
npm/[email protected] None 0 52.4 kB marijn
npm/[email protected] network +1 47.4 kB fengmk2
npm/[email protected] filesystem 0 2.94 MB burt_harris
npm/[email protected] None 0 8.05 kB iarna
npm/[email protected] None +1 21.8 kB lukekarrys
npm/[email protected] Transitive: eval +31 3 MB ljharb
npm/[email protected] None 0 20.4 kB ljharb
npm/[email protected] Transitive: environment, filesystem +2 75 kB no2chem
npm/[email protected] None 0 7.18 kB nohomey
npm/[email protected] environment, filesystem +1 19.3 kB tootallnate
npm/[email protected] None +2 48.5 kB volovyk-s
npm/[email protected] None 0 414 kB lpinca
npm/[email protected] filesystem Transitive: environment, shell +19 1.74 MB npm-cli-ops
npm/[email protected] Transitive: eval +6 149 kB ljharb
npm/[email protected] None 0 1.99 MB caniuse-lite
npm/[email protected] None +2 777 kB keithamus
npm/[email protected] None +1 23 kB keithamus
npm/[email protected] environment, filesystem 0 90.2 kB paulmillr
npm/[email protected] filesystem 0 5.75 kB isaacs
npm/[email protected] filesystem +6 6.35 MB vweevers
npm/[email protected] None 0 9.23 kB isaacs
npm/[email protected] None 0 12.7 kB iarna
npm/[email protected] None 0 1.25 MB faddee
npm/[email protected] Transitive: eval +7 165 kB ljharb
npm/[email protected] None 0 11.2 kB sindresorhus
npm/[email protected] None 0 7.46 kB tjholowaychuk
npm/[email protected] environment, filesystem 0 79.1 kB motdotla
npm/[email protected] None +1 24.5 kB mafintosh
npm/[email protected] None 0 13.6 kB komagata
npm/[email protected] None +1 356 kB andris
npm/[email protected] None 0 6.23 kB mafintosh
npm/[email protected] None 0 12.3 kB achingbrain
npm/[email protected] Transitive: eval +31 3 MB ljharb
npm/[email protected] Transitive: eval +7 158 kB ljharb
npm/[email protected] None 0 315 kB stefanpenner
npm/[email protected] None +1 323 kB digitaldesignlabs
npm/[email protected] filesystem 0 11.6 kB lukeed
npm/[email protected] environment, filesystem Transitive: network +22 16 MB cgewecke
npm/[email protected] None 0 37.3 kB sssayegh
npm/[email protected] None 0 14 kB indexzero
npm/[email protected] filesystem +4 199 kB mrmlnc
npm/[email protected] None 0 125 kB nickyout
npm/[email protected] None 0 41.9 kB matteo.collina
npm/[email protected] None 0 773 kB 101arrowz
npm/[email protected] None 0 8.07 kB tootallnate
npm/[email protected] network 0 29.4 kB rubenverborgh
npm/[email protected] shell Transitive: environment, filesystem +3 103 kB isaacs
npm/[email protected] filesystem 0 14.4 kB npm-cli-ops
npm/[email protected] None 0 31.4 kB ljharb
npm/[email protected] Transitive: eval +31 3 MB ljharb
npm/[email protected] Transitive: environment +5 86.5 kB gar
npm/[email protected] None 0 8.68 kB keithamus
npm/[email protected] eval +5 127 kB ljharb
npm/[email protected] Transitive: eval +7 163 kB ljharb
npm/[email protected] filesystem Transitive: environment, network, shell +91 36.1 MB cgewecke
npm/[email protected] environment, filesystem, network, shell +72 21.6 MB fvictorio
npm/[email protected] None 0 10.9 kB ljharb
npm/[email protected] None 0 12 kB ljharb
npm/[email protected] None +1 38.2 kB ljharb
npm/[email protected] environment 0 3.44 kB iarna
npm/[email protected] None 0 35.9 kB kornel
npm/[email protected] network +2 68 kB tootallnate
npm/[email protected] None 0 3.66 kB dead_horse
npm/[email protected] None 0 51.5 kB kael
npm/[email protected] None 0 679 kB leebyron
npm/[email protected] None 0 11.9 kB jensyt
npm/[email protected] None +3 73.1 kB ljharb
npm/[email protected] None 0 13.6 kB indutny
npm/[email protected] Transitive: eval +8 195 kB ljharb
npm/[email protected] Transitive: eval +7 166 kB ljharb
npm/[email protected] eval +2 70.1 kB ljharb
npm/[email protected] None 0 2.94 kB watson
npm/[email protected] None 0 27.1 kB ljharb
npm/[email protected] Transitive: eval +7 168 kB ljharb
npm/[email protected] None 0 23.3 kB ljharb
npm/[email protected] None 0 3.89 kB heineiuo
npm/[email protected] environment +9 512 kB isaacs
npm/[email protected] network Transitive: filesystem, shell +12 3.74 MB tedeh
npm/[email protected] None 0 36.8 kB creationix
npm/[email protected] None +1 36.8 kB
npm/[email protected] None +4 68 kB sindresorhus
npm/[email protected] None +1 9.64 kB sindresorhus
npm/[email protected] None 0 144 kB binarymuse
npm/[email protected] environment, filesystem, unsafe +18 70.5 MB cspotcode
npm/[email protected] None 0 42.1 kB chaijs
npm/[email protected] filesystem Transitive: environment, unsafe +50 81.4 MB ethereum-ts-bot
npm/[email protected] None 0 66.8 MB typescript-bot
npm/[email protected] environment, eval Transitive: filesystem, network, shell, unsafe +87 222 MB oreanno

🚮 Removed packages: npm/@ethereumjs/[email protected], npm/@nomicfoundation/[email protected], npm/@nomicfoundation/[email protected], npm/@nomicfoundation/[email protected], npm/@nomiclabs/[email protected], npm/@nomiclabs/[email protected], npm/@openzeppelin/[email protected], npm/@typechain/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

socket-security bot commented Mar 1, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package Note
Install scripts npm/[email protected]
  • Install script: install
  • Source: npm run rebuild || echo "Couldn't build bindings. Non-native version used."

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@critesjosh critesjosh requested a review from signorecello March 4, 2024 14:14
@signorecello
Copy link
Contributor

Hey @CodeDragonVN im tried to make this work and was blocked since backend_barretenberg 0.24.0 points to bb.js 0.23.0 which causes serialization issues.

Did you find any such problems?

@signorecello
Copy link
Contributor

Ok so I stopped being lazy and checked this out, indeed I get the same serialization error:

Error: Circuit execution failed: Error: Failed to deserialize circuit. This is likely due to differing serialization formats between ACVM_JS and your compiler

I'm glad to merge this branch though instead of my own branch because this frontend looks sweet! Let's just wait for 0.24.1

@CodeDragonVN
Copy link
Contributor Author

Hey @signorecello,

I'm running into the serialization error you pointed out, and it's perplexing because it was previously resolved on my end. Testing now with the backend_barretenberg at version 0.24.0 but using the recursion tests from the noir-lang/noir repository, everything still passes without issue however.

I'm finding it perplexing how It's working on my repo here: https://github.com/CodeDragonVN/noir-recursion-v0.24.0, but now it's giving me that serialization issue on this repo. The version of bb.js is also 0.23.0 on my repo.

@CodeDragonVN
Copy link
Contributor Author

I've reopened the issue about the serialization error since it has resurfaced. I'm encountering it again, similar to before. My repo https://github.com/CodeDragonVN/noir-recursion-v0.24.0 shows no issues, but the serialization error persists in this noir-examples repo. The issue is Issue #4459

@signorecello
Copy link
Contributor

Thanks @CodeDragonVN this is a known problem, caused by feedback loop from aztec-packages repo that wasn't included in 0.24.0 by mistake.

This is resolved in a next version 0.24.1 so it's just a matter of waiting for it. One way to check it will work correctly is just to use nightlies.

Let's hold on this PR until then, I'll let you know once 0.24.1 is out and you can update this PR to reflect that, then we merge 👍

@signorecello
Copy link
Contributor

I get a bit distracted with so many PRs though so please tag me here, or on discord, if I fail to see changes!

@CodeDragonVN
Copy link
Contributor Author

@signorecello Appreciated. I'll keep a close watch for the 0.24.1 release and update also. For now, I'll close the issue.

@CodeDragonVN
Copy link
Contributor Author

hey @signorecello,

I've got good news! After updating the packages to v0.25.0 the deserialization issue is gone.

  • Updated the @noir-lang packages in package.json to the latest version 0.25.0.
  • Went through the tests and dev interface again, and everything is running as expected.

@signorecello
Copy link
Contributor

Yep this one looks good, let's merge :)

@signorecello
Copy link
Contributor

@SocketSecurity ignore npm/[email protected]

@signorecello signorecello merged commit 10bb8c8 into noir-lang:master Mar 13, 2024
2 checks passed
@Savio-Sou Savio-Sou changed the title chore: update recursion example for noir v0.24.0 chore: update recursion example for noir v0.25.0 Mar 14, 2024
@Savio-Sou
Copy link
Contributor

When running nargo prove in recursion/packages/noir/recursion on Nargo v0.25.0, I'm getting this error:

The parameter proof is expected to be a Array { length: 93, typ: Field } but found incompatible value Vec([Field(2), Field(10824393579292640276679628408780923644399), Field(245259312760651750434636148266637791), Field(16220608892709085881729549461059840933531), Field(29086728926417763668684368412851575), Field(86960175229511384923347249685703605573976), Field(119632588394922407903828536975742837), Field(8133670842954062125526877195552803097095), Field(77866749597867336167111883273880859), Field(71471231940114255485442979054702681468666), Field(23764813297134295735649906350412067), Field(7995811797098406394649926543277505625825), Field(129596692976341405364457231933926819), Field(42584003987106105622750099282556088552981), Field(83704113108611586325261273358909475), Field(23381474794378998045519623024244166683364), Field(58281244622276626442984716163814997), Field(29804766582689924054821691856432438879238), Field(57444262120063519768548212507957905), Field(16491241657511778684900216372384253634593), Field(41953517797133300127696735937977142), Field(68151564160769547547256134235862571492297), Field(216407266845215061217912493787155913), Field(69207649048610159988269278414443034093515), Field(15807053400682008906696955367456414), Field(10880481356747158641109320953091993808257), Field(2349200668467182599985201040167423), Field(31364921378378437615613880362128784294056), Field(39443454228419067228006125108034268), Field(20581768292632203344331303479038549047339), Field(102061500812406260120526807869958311), Field(24236701373264253026159203273786348563223), Field(7160361939492749527211926769788388), Field(63868105380635015923004029232685365912965), Field(238542531654646981940655082881081771), Field(5090616018687404140975576095173384749885), Field(43017538151095093102124813241236341), Field(4259038585770966974321899586833487122888), Field(114227111701630081242643662775400230), Field(68251179676788864790405053043314937453270), Field(9692402620334585232468065140487021), Field(2847735185949821907881170022267580238807), Field(120156717726338775729839371898339058), Field(14121884846476890623069165971469385506920), Field(83592227982249769367956318927602374), Field(10989296828477066965048323571107898543133799215759153574795593757312752813519), Field(1692002355413023306367267213642771784531727362864458766547849688766899694066), Field(3798529920491737195625363558999108934776211473679815282888537467136909974482), Field(-256275798624413393622062906902542915583317396439971975433346841900939843487), Field(8322388201023808012870399100180878830759974505798980413797440919580578045873), Field(-331192619096629662370620122212819689390196235627555437196146139630222834199), Field(2326251939241883614051705621367670708421552049794746171429699716122070839702), Field(-7868490775523227390360146959476593742454345219540388306194662761959805805275), Field(-4837239561612933720655417249630881609435728158302830702586561038269749529928), Field(-7059937854679246682309316952465684718563777857501408377784875648693204430077), Field(6421501004493454161172102601980226091172351583430306948019244908204961232450), Field(4852473425435083078587353700659053667116259568488230291627352583170990936124), Field(5433448795313040042239951003824916154714225490913731149207937064525935516374), Field(-3142739218127369117205097167650835598608566413466050106336386581732664370231), Field(8562001339324605548229470135973634788229802111240409264025659877606614976600), Field(9632251506740181241758153902970339136758527375145460422028867362307441848675), Field(10702501674155756935286837669967043485287252639050511580032074847008268720750), Field(-6875404873706023841285549468457545876118998885813823945980951136710009668145), Field(-2194778855981724790525730095918588475642910296457745123471813052655564156776), Field(3246089640769931248471626203364017474211177134741223905869740628722309947987), Field(8017291352040390036011586600418057224606339042029062360308162719474465628451), Field(-9045240862852366899902200541296822906203661233555420447659714370165886030717), Field(-7974990695436791206373516774300118557674935969650369289656506885465059158642), Field(-6904740528021215512844833007303414209146210705745318131653299400764232286567), Field(-5834490360605639819316149240306709860617485441840266973650091916063405414492), Field(11772751841571332628815521436963747833815977902955562738035282331709095592825), Field(2⁴×515015349249856027793884090616948420426494535406831519958183777312496410329), Field(-655027780306546841755476148175915721013996680692586176295616779147906181421), Field(-8176815891054077554202674580291235244747826429980231733892916755568034816733), Field(148798921886863903132781229482758217694), Field(62863334824747313451323085736833590057545117208672818611185365657622432422), Field(-9062027930855658129182172085881471197837145603556764231416228119122676787706), Field(4388110873538727912125896417094102125704040646884279841003347343229956208498), Field(-5850461569401064351417303611077900569291818716207946797419492139347994041222), Field(3842724590614690011918435231717575290652682634947443304006488952910782196646), Field(-8698646621100834496777834498192652591855389177989914219131719387988111437188), Field(4473383684656860969041250902476789967434903924167511947768870312280571111410), Field(-8784184561544884307705408906719145657180879950466192276174921944567370067929), Field(-2⁴×24756171567120416088220245109700615107341757051980874332202939304670668776), Field(7991987071397030992882361063208725973745943724802804297544427886817908667097), Field(-5508169983971286579070159697084613299339008837978731759294101384065260461007), Field(36992940453337112128528440701242819743352), Field(117689838452265778650879227913523939), Field(64927607873248691436990295648907245579578), Field(241691637338611060083000632953347194), Field(17880647516323685297027980762545736722513), Field(199138603335721403350161534864642739), Field(83146432756370824696010155233778509844385), Field(2⁴×7388079081685829759436069250324641)])

Is that expected?

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.

3 participants