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

Implement Simple Registration #22

Merged
merged 33 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6506521
Base implementation
KyrylR Dec 12, 2024
89fe009
Typo fix
KyrylR Dec 12, 2024
aff1e0e
Updated deployment scripts
KyrylR Dec 12, 2024
36079ed
Updated CI
KyrylR Dec 12, 2024
bdc9247
Changes after the review
KyrylR Dec 13, 2024
842b863
Updated CI
KyrylR Dec 13, 2024
fed8a45
Updated CI
KyrylR Dec 13, 2024
676fabf
Updated CI
KyrylR Dec 13, 2024
6f25d5c
Updated CI
KyrylR Dec 13, 2024
6705d84
Added an ability to set initial signers
KyrylR Dec 13, 2024
7e7680a
Fixed hashing in test
KyrylR Dec 13, 2024
427e5df
Updated CI
KyrylR Dec 13, 2024
39a3944
Updated CI
KyrylR Dec 13, 2024
ce9c113
Updated CI
KyrylR Dec 13, 2024
f01d8e3
Updated CI
KyrylR Dec 13, 2024
1f5ec24
Updated CI
KyrylR Dec 13, 2024
50930db
Removed fs-extra
KyrylR Dec 13, 2024
c910b94
Updated CI
KyrylR Dec 13, 2024
41fbb74
Updated CI
KyrylR Dec 13, 2024
050f972
Finalized CI
KyrylR Dec 13, 2024
319faf1
Small refactoring
KyrylR Dec 13, 2024
e8b1cd1
Clean up
KyrylR Dec 13, 2024
6738fd5
Deployment scripts refactoring
KyrylR Dec 13, 2024
e1b1889
Fixed typo
KyrylR Dec 13, 2024
afbc076
Completed testing of the RegistrationSimple. Cleaned up.
KyrylR Dec 16, 2024
f1cc941
Linting.
KyrylR Dec 16, 2024
5c5602d
Fixed typo
KyrylR Dec 16, 2024
433e396
Fixed typo
KyrylR Dec 16, 2024
51845a3
Update contracts/registration/RegistrationSimple.sol
KyrylR Dec 16, 2024
0c154e6
Fixed 12th migration
KyrylR Dec 16, 2024
b6d9cb6
Merge remote-tracking branch 'origin/feature/registration-simple' int…
KyrylR Dec 16, 2024
2f80f7c
Updated CHANGELOG.md
KyrylR Dec 16, 2024
049dd37
Fixed typo
KyrylR Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Run tests
run: npm run test
15 changes: 10 additions & 5 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"reentrancy": "error",
"prettier/prettier": "warn",
"reentrancy": "off",
"modifier-name-mixedcase": "off",
"no-empty-blocks": "off",
"func-visibility": "off",
"max-states-count": "off",
"func-name-mixedcase": "off",
"no-empty-blocks": "warn",
"func-visibility": ["warn", { "ignoreConstructors": true }],
"max-states-count": "warn",
"not-rely-on-time": "off",
"compiler-version": "off"
"var-name-mixedcase": "off",
"gas-custom-errors": "off",
"reason-string": "off",
"no-inline-assembly": "off",
"explicit-types": "off"
}
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.4]

* Added a new type of registration: `RegistrationSimple`
* Added helper scripts for circuit testing

## [0.1.3]

* Relaxed passport `no AA` dispatcher to allow non-empty public keys
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"protocol": "groth16",
"curve": "bn128",
"nPublic": 3,
"vk_alpha_1": [
"20491192805390485299153009773594534940189261866228447918068658471970481763042",
"9383485363053290200918347156157836566562967994039712273449902621266178545958",
"1"
],
"vk_beta_2": [
[
"6375614351688725206403948262868962793625744043794305715222011528459656738731",
"4252822878758300859123897981450591353533073413197771768651442665752259397132"
],
[
"10505242626370262277552901082094356697409835680220590971873171140371331206856",
"21847035105528745403288232691147584728191162732299865338377159692350059136679"
],
["1", "0"]
],
"vk_gamma_2": [
[
"10857046999023057135944570762232829481370756359578518086990519993285655852781",
"11559732032986387107991004021392285783925812861821192530917403151452391805634"
],
[
"8495653923123431417604973247489272438418190587263600148770280649306958101930",
"4082367875863433681332203403145435568316851327593401208105741076214120093531"
],
["1", "0"]
],
"vk_delta_2": [
[
"10024655051728395812564307039738346388454604848124933406202507965194273799917",
"10937043963655185952891449223625636213959039570715537527210240567875698546497"
],
[
"19680239487707527798110040460768721884036997340435808307578785917462138857357",
"3288878702757913739253373321195210173509136075843368700533242800223626150044"
],
["1", "0"]
],
"vk_alphabeta_12": [
[
[
"2029413683389138792403550203267699914886160938906632433982220835551125967885",
"21072700047562757817161031222997517981543347628379360635925549008442030252106"
],
[
"5940354580057074848093997050200682056184807770593307860589430076672439820312",
"12156638873931618554171829126792193045421052652279363021382169897324752428276"
],
[
"7898200236362823042373859371574133993780991612861777490112507062703164551277",
"7074218545237549455313236346927434013100842096812539264420499035217050630853"
]
],
[
[
"7077479683546002997211712695946002074877511277312570035766170199895071832130",
"10093483419865920389913245021038182291233451549023025229112148274109565435465"
],
[
"4595479056700221319381530156280926371456704509942304414423590385166031118820",
"19831328484489333784475432780421641293929726139240675179672856274388269393268"
],
[
"11934129596455521040620786944827826205713621633706285934057045369193958244500",
"8037395052364110730298837004334506829870972346962140206007064471173334027475"
]
]
],
"IC": [
[
"4179432338433124082507168334716073369977625424306513458535481875746097550658",
"12714499129458131796726486922435073908760835207347394165560527204719372283417",
"1"
],
[
"15796010941534208751370774490726059448355760291220049636894135052670536978530",
"4411190147057228862091306245729888086078023337791017667104000774333055394870",
"1"
],
[
"18796505394079206082600292661633691936761371596120188411147722737603294837590",
"1121894399568100959910413213468154592683150638260580461512139659150923719975",
"1"
],
[
"4678945113863386760438849690757650811219476819937609876975421977973533253953",
"14173498963267645827891248481396713947897070300527005985896563335692207023061",
"1"
]
]
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const wc = require("./witness_calculator.js");
const { readFileSync, writeFile } = require("fs");

if (process.argv.length != 5) {
console.log("Usage: node generate_witness.js <file.wasm> <input.json> <output.wtns>");
} else {
const input = JSON.parse(readFileSync(process.argv[3], "utf8"));

const buffer = readFileSync(process.argv[2]);
wc(buffer).then(async witnessCalculator => {
// const w= await witnessCalculator.calculateWitness(input,0);
// for (let i=0; i< w.length; i++){
// console.log(w[i]);
// }
const buff= await witnessCalculator.calculateWTNSBin(input,0);
writeFile(process.argv[4], buff, function(err) {
if (err) throw err;
});
});
}
Loading
Loading