Skip to content

Commit

Permalink
Upgrade go-circuits module to support for V3 beta.1 circuits.
Browse files Browse the repository at this point in the history
  • Loading branch information
olomix committed Mar 1, 2024
1 parent bd36fc2 commit 0d8399a
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ go 1.21.4

require (
github.com/dgraph-io/badger/v4 v4.2.0
github.com/ethereum/go-ethereum v1.13.12
github.com/iden3/go-circuits/v2 v2.0.1
github.com/ethereum/go-ethereum v1.13.14
github.com/iden3/go-circuits/v2 v2.1.0
github.com/iden3/go-iden3-core/v2 v2.0.4
github.com/iden3/go-iden3-crypto v0.0.15
github.com/iden3/go-iden3-crypto v0.0.16
github.com/iden3/go-merkletree-sql/v2 v2.0.6
github.com/iden3/go-onchain-credential-adapter v0.0.0-20240223120548-5d8d1d28c6d1
github.com/iden3/go-schema-processor/v2 v2.3.0
github.com/iden3/go-schema-processor/v2 v2.3.1
github.com/iden3/merkletree-proof v0.1.0
github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f
github.com/stretchr/testify v1.8.4
Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY=
github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/ethereum/go-ethereum v1.13.12 h1:iDr9UM2JWkngBHGovRJEQn4Kor7mT4gt9rUZqB5M29Y=
github.com/ethereum/go-ethereum v1.13.12/go.mod h1:hKL2Qcj1OvStXNSEDbucexqnEt1Wh4Cz329XsjAalZY=
github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ=
github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU=
github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA=
github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
Expand Down Expand Up @@ -145,8 +145,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE=
github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0=
github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw=
github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc=
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4=
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc=
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA=
github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU=
Expand All @@ -160,18 +160,18 @@ github.com/iden3/contracts-abi/onchain-non-merklized-issuer-base/v0/go/abi v0.0.
github.com/iden3/contracts-abi/onchain-non-merklized-issuer-base/v0/go/abi v0.0.0-20240222110004-06aa097d1318/go.mod h1:vMgeBNntJeIDZrIDY0d6sZQU+JigUo4h+m95qeU03ew=
github.com/iden3/contracts-abi/state/go/abi v0.0.0-20230405152923-4a25f6f1f0f4 h1:iPvYa/AhhGo3juoUFDm/fBE2CZKy4WfQu7JY90tRf9Q=
github.com/iden3/contracts-abi/state/go/abi v0.0.0-20230405152923-4a25f6f1f0f4/go.mod h1:TxgIrXCvxms3sbOdsy8kTvffUCIpEEifNy0fSXdkU4w=
github.com/iden3/go-circuits/v2 v2.0.1 h1:tcJtBE8aLJsf9qpBoTUKE143Mne025cunQnSExMXaKo=
github.com/iden3/go-circuits/v2 v2.0.1/go.mod h1:VIFIp51+IH0hOzjnKhb84bCeyq7hq76zX/C14ua6zh4=
github.com/iden3/go-circuits/v2 v2.1.0 h1:Dk+noXGXOJYFjj2iWu3KLPd/KLoIhZ3eT6qYEfKyocc=
github.com/iden3/go-circuits/v2 v2.1.0/go.mod h1:VIFIp51+IH0hOzjnKhb84bCeyq7hq76zX/C14ua6zh4=
github.com/iden3/go-iden3-core/v2 v2.0.4 h1:ggzC2zgOWgJAAcuG9X8bQG1r4gAoHZWqY7aLV8b1qgc=
github.com/iden3/go-iden3-core/v2 v2.0.4/go.mod h1:L9PxhWPvoS9qTb3inEkZBm1RpjHBt+VTwvxssdzbAdw=
github.com/iden3/go-iden3-crypto v0.0.15 h1:4MJYlrot1l31Fzlo2sF56u7EVFeHHJkxGXXZCtESgK4=
github.com/iden3/go-iden3-crypto v0.0.15/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E=
github.com/iden3/go-iden3-crypto v0.0.16 h1:zN867xiz6HgErXVIV/6WyteGcOukE9gybYTorBMEdsk=
github.com/iden3/go-iden3-crypto v0.0.16/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E=
github.com/iden3/go-merkletree-sql/v2 v2.0.6 h1:vsVDImnvnHf7Ggr45ptFOXJyWNA/8IwVQO1jzRLUlY8=
github.com/iden3/go-merkletree-sql/v2 v2.0.6/go.mod h1:kRhHKYpui5DUsry5RpveP6IC4XMe6iApdV9VChRYuEk=
github.com/iden3/go-onchain-credential-adapter v0.0.0-20240223120548-5d8d1d28c6d1 h1:xpKhrLYi0s6ocUCrFwkjG0YQjndDGMW7/cgU9KjLyig=
github.com/iden3/go-onchain-credential-adapter v0.0.0-20240223120548-5d8d1d28c6d1/go.mod h1:1RVClY0JdWmzgx3ZBvy0Z2bNyPg2iz+0R9Ryl2Z3s64=
github.com/iden3/go-schema-processor/v2 v2.3.0 h1:86tnt1myHntcG+9pJ3I+0ycc6V59sITrsPSt0k7/DhU=
github.com/iden3/go-schema-processor/v2 v2.3.0/go.mod h1:BcHVDZyn8q8vUlL+XpOo7hpwXmEjxzO8ao1LkvFsM+k=
github.com/iden3/go-schema-processor/v2 v2.3.1 h1:cjsfUZNgyPoHQDEES4vuVod948QC9l35QkoEIat0ghc=
github.com/iden3/go-schema-processor/v2 v2.3.1/go.mod h1:BcHVDZyn8q8vUlL+XpOo7hpwXmEjxzO8ao1LkvFsM+k=
github.com/iden3/merkletree-proof v0.1.0 h1:AHmpkbCTLKv1MWWt6YwogB65E4y6UZthbZYPed81w4U=
github.com/iden3/merkletree-proof v0.1.0/go.mod h1:ul0HDU6/eVNX++u/PWScY7pTXiFjqM5kA6vl1wEoTUU=
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
Expand Down
2 changes: 1 addition & 1 deletion inputs_sig.go
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ func AtomicQueryV3OnChainInputsFromJson(ctx context.Context, cfg EnvConfig,

var out AtomicQueryInputsResponse
var inpMarsh circuits.AtomicQueryV3OnChainInputs
inpMarsh.AuthEnabled = 1
inpMarsh.IsBJJAuthEnabled = 1

var obj v3OnChainInputsRequest
err := json.Unmarshal(in, &obj)
Expand Down
2 changes: 1 addition & 1 deletion testdata/atomic_query_v3_mtp_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
},
"request": {
"id": 84239,
"circuitId": "credentialAtomicQueryV3-beta.0",
"circuitId": "credentialAtomicQueryV3-beta.1",
"query": {
"allowedIssuers": "unused",
"context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld",
Expand Down
2 changes: 1 addition & 1 deletion testdata/atomic_query_v3_mtp_output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"requestID":"84239","userGenesisID":"23529006562716512365284470649701500265624720888290140936730678617958584833","profileNonce":"123","claimSubjectProfileNonce":"234","issuerID":"24687982279323932130156062863272601148565852640780662148237991047021531649","issuerClaim":["14366836738280263696847396792315741188809","23529006562716512365284470649701500265624720888290140936730678617958584833","17078634269008282508978520614899691176511963995966531315408520179071582685488","0","227737578863135127231973914489","0","0","0"],"issuerClaimNonRevClaimsTreeRoot":"14200687038162658423445687080642044812853023721722929563326842955302298883583","issuerClaimNonRevRevTreeRoot":"0","issuerClaimNonRevRootsTreeRoot":"13682688696715423561569357932088650136406153300979709261864316589023788667102","issuerClaimNonRevState":"3115266220827509894065475154280381877956215721974280577792238675116811787563","issuerClaimNonRevMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerClaimNonRevMtpAuxHi":"0","issuerClaimNonRevMtpAuxHv":"0","issuerClaimNonRevMtpNoAux":"1","claimSchema":"74977327600848231385663280181476307657","issuerClaimSignatureR8x":"0","issuerClaimSignatureR8y":"0","issuerClaimSignatureS":"0","issuerAuthClaim":["0","0","0","0","0","0","0","0"],"issuerAuthClaimMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerAuthClaimNonRevMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerAuthClaimNonRevMtpAuxHi":"0","issuerAuthClaimNonRevMtpAuxHv":"0","issuerAuthClaimNonRevMtpNoAux":"0","issuerAuthClaimsTreeRoot":"0","issuerAuthRevTreeRoot":"0","issuerAuthRootsTreeRoot":"0","issuerAuthState":"0","isRevocationChecked":1,"claimPathNotExists":0,"claimPathMtp":["12517150030576619527252492821655890410294919107657416409973519542186017163807","11933107200150122400824598729420157563957281318882971696220077028927460055808","13748716966604096441336188506766329119346066422143435538531763565408555859415","0","20486600725567702962288985115041578424966996747359110560639957588130104510049","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"claimPathMtpNoAux":"0","claimPathMtpAuxHi":"0","claimPathMtpAuxHv":"0","claimPathKey":"17040667407194471738958340146498954457187839778402591036538781364266841966","claimPathValue":"2","operator":1,"slotIndex":0,"timestamp":1701854807,"value":["2","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerClaimMtp":["21766464054775500261540970596627132740681360541808718916226684581420553493829","0","0","2515815517939277878486495591852893192186484331807066957639537744648750241809","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerClaimClaimsTreeRoot":"9489904474292592373795528228767129060254792153148571504636433835422869094406","issuerClaimRevTreeRoot":"0","issuerClaimRootsTreeRoot":"10377178708342790262994259866714708615805144336972511218145747355348932940048","issuerClaimIdenState":"14967486669687562573593136047944554523204659672540000842773134919176536621353","proofType":"2","linkNonce":"456","verifierID":"23529006562716512365284470649701500265624720888290140936730678617958584833","nullifierSessionID":"123"}
{"requestID":"84239","userGenesisID":"23529006562716512365284470649701500265624720888290140936730678617958584833","profileNonce":"123","claimSubjectProfileNonce":"234","issuerID":"24687982279323932130156062863272601148565852640780662148237991047021531649","issuerClaim":["14366836738280263696847396792315741188809","23529006562716512365284470649701500265624720888290140936730678617958584833","17078634269008282508978520614899691176511963995966531315408520179071582685488","0","227737578863135127231973914489","0","0","0"],"issuerClaimNonRevClaimsTreeRoot":"14200687038162658423445687080642044812853023721722929563326842955302298883583","issuerClaimNonRevRevTreeRoot":"0","issuerClaimNonRevRootsTreeRoot":"13682688696715423561569357932088650136406153300979709261864316589023788667102","issuerClaimNonRevState":"3115266220827509894065475154280381877956215721974280577792238675116811787563","issuerClaimNonRevMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerClaimNonRevMtpAuxHi":"0","issuerClaimNonRevMtpAuxHv":"0","issuerClaimNonRevMtpNoAux":"1","claimSchema":"74977327600848231385663280181476307657","issuerClaimSignatureR8x":"0","issuerClaimSignatureR8y":"0","issuerClaimSignatureS":"0","issuerAuthClaim":["0","0","0","0","0","0","0","0"],"issuerAuthClaimMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerAuthClaimNonRevMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerAuthClaimNonRevMtpAuxHi":"0","issuerAuthClaimNonRevMtpAuxHv":"0","issuerAuthClaimNonRevMtpNoAux":"0","issuerAuthClaimsTreeRoot":"0","issuerAuthRevTreeRoot":"0","issuerAuthRootsTreeRoot":"0","issuerAuthState":"0","isRevocationChecked":1,"claimPathMtp":["12517150030576619527252492821655890410294919107657416409973519542186017163807","11933107200150122400824598729420157563957281318882971696220077028927460055808","13748716966604096441336188506766329119346066422143435538531763565408555859415","0","20486600725567702962288985115041578424966996747359110560639957588130104510049","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"claimPathMtpNoAux":"0","claimPathMtpAuxHi":"0","claimPathMtpAuxHv":"0","claimPathKey":"17040667407194471738958340146498954457187839778402591036538781364266841966","claimPathValue":"2","operator":1,"slotIndex":0,"timestamp":1709280282,"value":["2","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"valueArraySize":1,"issuerClaimMtp":["21766464054775500261540970596627132740681360541808718916226684581420553493829","0","0","2515815517939277878486495591852893192186484331807066957639537744648750241809","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"issuerClaimClaimsTreeRoot":"9489904474292592373795528228767129060254792153148571504636433835422869094406","issuerClaimRevTreeRoot":"0","issuerClaimRootsTreeRoot":"10377178708342790262994259866714708615805144336972511218145747355348932940048","issuerClaimIdenState":"14967486669687562573593136047944554523204659672540000842773134919176536621353","proofType":"2","linkNonce":"456","verifierID":"23529006562716512365284470649701500265624720888290140936730678617958584833","nullifierSessionID":"123"}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
},
"request": {
"id": 84239,
"circuitId": "credentialAtomicQueryV3-beta.0",
"circuitId": "credentialAtomicQueryV3-beta.1",
"query": {
"allowedIssuers": "unused",
"context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
"request": {
"id": 84239,
"circuitId": "credentialAtomicQueryV3-beta.0",
"circuitId": "credentialAtomicQueryV3-beta.1",
"query": {
"allowedIssuers": "unused",
"context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld",
Expand Down
2 changes: 1 addition & 1 deletion testdata/atomic_query_v3_on_chain_mtp_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
},
"request": {
"id": 84239,
"circuitId": "credentialAtomicQueryV3OnChain-beta.0",
"circuitId": "credentialAtomicQueryV3OnChain-beta.1",
"query": {
"allowedIssuers": "unused",
"context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld",
Expand Down
Loading

0 comments on commit 0d8399a

Please sign in to comment.