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

fix: bb.js cli tests #1694

Closed
wants to merge 19 commits into from
Closed

fix: bb.js cli tests #1694

wants to merge 19 commits into from

Conversation

kobyhallx
Copy link

Improves bb.js build and test scripts.

@@ -0,0 +1 @@
{"backend":"acvm-backend-barretenberg","abi":{"parameters":[{"name":"verification_key","type":{"kind":"array","length":114,"type":{"kind":"field"}},"visibility":"private"},{"name":"proof","type":{"kind":"array","length":94,"type":{"kind":"field"}},"visibility":"private"},{"name":"public_inputs","type":{"kind":"array","length":1,"type":{"kind":"field"}},"visibility":"private"},{"name":"key_hash","type":{"kind":"field"},"visibility":"private"},{"name":"input_aggregation_object","type":{"kind":"array","length":16,"type":{"kind":"field"}},"visibility":"private"},{"name":"proof_b","type":{"kind":"array","length":94,"type":{"kind":"field"}},"visibility":"private"}],"param_witnesses":{"input_aggregation_object":[211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226],"key_hash":[210],"proof":[115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208],"proof_b":[227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320],"public_inputs":[209],"verification_key":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114]},"return_type":{"kind":"array","length":16,"type":{"kind":"field"}},"return_witnesses":[337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352]},"bytecode":"H4sIAAAAAAAA/+3YY4xkaRhA4e6xp8e2bavHtj2ztjG2bdu2bWttjm3P9uyp9OnNZP/uJrOb9E2enNxblU5V3qrvVn8dg4OCYgaFH9HtB5aHgqIgKqL5eIyg8OfHQmzEQVzEQ3wkQEKEIBESIwmSIhmSIwVSIhVSIw3SIh3SIwMyIhMyIwuyIhuyIwdyIhdyIw/yIh/yowAKohAKowiKohiKowRKohRKowzKohzKowJCURGVUBlVUBXVUB01UBO1UBt1UBf1UB8N0BCN0BhN0BTN0Bwt0BKt0Bpt0Bbt0B4d0BEv4EW8hJfxCl7Fa3gdb+BNvIW38Q7exXt431lGd5btnOuH+Agf4xN8ik7ojC7oim7ojh7oiV7ojT7oi37ojwEYiEEYjCEYimEYjhEYiVEYjTEYi3EYjwmYiEmYjCmYimmYjhmYiVmYjTmYi3mYjwVYiEVYjCVYimVYjhVYiVVYjTVYi3VYjw3YiE3YjC3Yim3Yjh3YiV3YjT3Yi33YjwM4iEM4jCM4imM4jhM4iVPOIYqzCByfeS3w/Qrx2hf4El/ha3yDb/EdvscP+BE/4Wf8gl/xG3737wW+qxGzPo0zOItzOI8LuIhLuIwruIpruI4buIlbuI07uIt7uI8HeIhHeIwn+ANheBoU/gaDEQVREQ3RESOw1iAWYiMO4iIe4iMBEiIEiZAYSZAUyZAcKZASqZAaaZAW6ZAeGZARmZAZWZAV2ZAdOZATuZAbeZAX+ZAfBVAQhVAYRVAUxVAcJVASpVAaZVAW5VAeFRAaHD7jwHr47Foa5vzDnHmYswpzboHGsDFtLBvbxrFxbTwb3yawCW2ITWQT2yQ2qU1mk9sUNqVNZVPbNDatTWfT2ww2o81kM9ssNqvNZrPbHDanzWVz2zw2r81n89sCtqAtZAvbIraoLWaL2xK2pC1lS9sytqwtZ8vbCjbUVrSVbGVbxVa11Wx1W8PWtLVsbVvH1rX1bH3bwDa0jWxj28Q2tc1sc9vCtrStbGvbxra17Wx728F2tC/YF+1L9mX7in3VvmZft2/YN+1b9m37jn3Xvmfftx888zoDx4eef2Q/tp/YT20n29l2sV1tN9vd9rA9bS/b2/axfW0/298OsAPtIDvYDrFD7TA73I6wI+0oO9qOsWPtODveTrAT7SQ72U6xU+00O93OsDPtLDvbzrFz7Tw73y6wC+0iu9gusUvtMrvcrrAr7Sq72q6xa+06u95usBvtJrvZbrFb7Ta73e6wO+0uu9vusXvtPrvfHrAH7SF72B6xR+0xe9yesCftKfvsb4/A+ef2rx8gFXlGJVRGFVRFNVRHDdRELdRGHdRFPdRHg8gbX+SNz4bayBtfeP9rN77Tnp+xZ+05e95esBftJXvZXrFX7TV73d6wN+0te9vesXftPXvfPrAP7SP72D6xEf+ARHhqAwtQoME2io1qo9noNoaNaWPZ2DaOjWvj2fg2gU1oQ2wim9gmsUltMpvcprApbSqb2qaxaW06m95msBltJpvZZrFZbTab3eawOW0um9vmsXltPpvfFrAFbSFb2BaxRW0xW9yWsCVtKVvalrFlbTlb3lawoRHzDwo//n7jC372xhe4UMlWtlVsVVvNVrc1bE1by9a2dWxdW8/Wtw0iPii+joacN0JjNEFTNENztEBLtEJrtEFbtEN7dAgOf8N+7iN374L+/7t3kbt1z2e3LrBQBBaJf7ojF7kD93x24CKOf2td/ROKWJ6DKhkAAA==","proving_key":null,"verification_key":null,"gates":505505}
Copy link
Contributor

Choose a reason for hiding this comment

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

This will fail tests since bb no longer accepts ABIs, just bytecode

Copy link
Author

Choose a reason for hiding this comment

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

this changed in the mean time. note, we no longer need it in b64 format then.

@@ -0,0 +1,151 @@
#!/usr/bin/env node
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to write this is in pure javascript?

Copy link
Author

@kobyhallx kobyhallx Aug 21, 2023

Choose a reason for hiding this comment

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

for readability? using typscript would probably be an overkill, adding unnecessary step, wihtou much benefit since no type info is used.

"build:dev": "tsc -b --watch",
"build:wasm": "cd ../cpp && cmake --preset wasm-threads && cmake --build --preset wasm-threads && cmake --preset wasm && cmake --build --preset wasm",
"copy_wasm_dest": "cp ../cpp/build-wasm/bin/barretenberg.wasm ./dest/ && cp ../cpp/build-wasm-threads/bin/barretenberg.wasm ./dest/barretenberg-threads.wasm",
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't the symlink solve this issue?

Copy link
Author

Choose a reason for hiding this comment

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

aiming for same state one would expect from published package with actual file instead of links to avoid potential problems in different environments.

circuits/cpp/barretenberg/ts/bin-test/test.js Outdated Show resolved Hide resolved
circuits/cpp/barretenberg/ts/package.json Outdated Show resolved Hide resolved
@kobyhallx kobyhallx requested a review from jonybur August 22, 2023 08:58
@kobyhallx kobyhallx force-pushed the kh-improve-bbcli-test branch from eb8683e to 908f5cc Compare August 22, 2023 10:40
@kobyhallx kobyhallx enabled auto-merge (squash) August 22, 2023 11:31
@kevaundray
Copy link
Contributor

I think this is superceded by #1855

@ludamad
Copy link
Collaborator

ludamad commented Oct 11, 2023

Closed due to above comment.

@ludamad ludamad closed this Oct 11, 2023
auto-merge was automatically disabled October 11, 2023 09:58

Pull request was closed

@ludamad ludamad deleted the kh-improve-bbcli-test branch August 22, 2024 15:21
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.

5 participants