* ci: add kyc to the workflow and rm new aadhaar nullifier logic

* fix: true spelling
This commit is contained in:
Nesopie
2026-01-27 19:38:28 +05:30
committed by GitHub
parent 9f7151be7a
commit 41a4d9374d
4 changed files with 23 additions and 11 deletions

View File

@@ -208,6 +208,7 @@ jobs:
./circuits/scripts/build/build_cpp.sh register
./circuits/scripts/build/build_cpp.sh register_id
./circuits/scripts/build/build_cpp.sh register_aadhaar
./circuits/scripts/build/build_cpp.sh register_kyc
./circuits/scripts/build/build_cpp.sh disclose
./circuits/scripts/build/build_cpp.sh dsc
fi

View File

@@ -114,15 +114,16 @@ template REGISTER_AADHAAR(n, k, maxDataLength){
component qrDataHasher = PackBytesAndPoseidon(maxDataLength);
for (var i = 0; i < 9; i++){
qrDataHasher.in[i] <== qrDataPadded[i];
}
for (var i = 9; i < 26; i++) {
qrDataHasher.in[i] <== 0;
}
for (var i = 26; i < maxDataLength; i++){
qrDataHasher.in[i] <== qrDataPadded[i];
}
qrDataHasher.in <== qrDataPadded;
// for (var i = 0; i < 9; i++){
// qrDataHasher.in[i] <== qrDataPadded[i];
// }
// for (var i = 9; i < 26; i++) {
// qrDataHasher.in[i] <== 0;
// }
// for (var i = 26; i < maxDataLength; i++){
// qrDataHasher.in[i] <== qrDataPadded[i];
// }
// Generate commitment
component packedCommitment = PackBytesAndPoseidon(42 + 62);

View File

@@ -2,7 +2,7 @@
# run from root
# first argument should register | dsc | disclose
if [[ $1 != "register" && $1 != "dsc" && $1 != "disclose" && $1 != "register_id" && $1 != "register_aadhaar" ]]; then
if [[ $1 != "register" && $1 != "dsc" && $1 != "disclose" && $1 != "register_id" && $1 != "register_aadhaar" && $1 != "register_kyc" ]]; then
echo "first argument should be register | dsc | disclose | register_id | register_aadhaar"
exit 1
fi
@@ -76,10 +76,15 @@ REGISTER_AADHAAR_CIRCUITS=(
"register_aadhaar:true"
)
REGISTER_KYC_CIRCUITS=(
"register_kyc:true"
)
DISCLOSE_CIRCUITS=(
"vc_and_disclose:true"
"vc_and_disclose_id:true"
"vc_and_disclose_aadhaar:true"
"vc_and_disclose_kyc:true"
)
DSC_CIRCUITS=(
@@ -124,6 +129,11 @@ elif [[ $1 == "register_aadhaar" ]]; then
output="output/register"
mkdir -p $output
basepath="./circuits/circuits/register/instances"
elif [[ $1 == "register_kyc" ]]; then
allowed_circuits=("${REGISTER_KYC_CIRCUITS[@]}")
output="output/register"
mkdir -p $output
basepath="./circuits/circuits/register/instances"
elif [[ $1 == "dsc" ]]; then
allowed_circuits=("${DSC_CIRCUITS[@]}")
output="output/dsc"

View File

@@ -51,7 +51,7 @@ describe('REGISTER AADHAAR Circuit Tests', function () {
const w = await circuit.calculateWitness(inputs);
await circuit.checkConstraints(w);
});
it.skip('should pass constrain and output correct nullifier and commitment', async function () {
it('should pass constrain and output correct nullifier and commitment', async function () {
this.timeout(0);
const { inputs, nullifier, commitment } = prepareAadhaarRegisterTestData(
privateKeyPem,