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

Check for "REQNACK" response from indy ledger #569

Closed
TimoGlastra opened this issue Dec 8, 2021 · 0 comments · Fixed by #626
Closed

Check for "REQNACK" response from indy ledger #569

TimoGlastra opened this issue Dec 8, 2021 · 0 comments · Fixed by #626

Comments

@TimoGlastra
Copy link
Contributor

TimoGlastra commented Dec 8, 2021

Currently we check if a transaction failed by checking for the REJECT value on response.op, but I noticed that it is also possible to get a REQNACK response if you try to write something to the ledger while that did is not registered on the ledger.

See logs for more info

server_1  | 2021-12-08 08:35:06.777  DEBUG [IndyLedgerService.registerCredentialDefinition] Registered credential definition 'SK8di1uRdeC8e1zMksoHUz:3:CL:95154:Crypto Wallet' on ledger 'BCOVRIN_TEST_GENESIS'
server_1  | {
server_1  |   response: {
server_1  |     op: 'REQNACK',
server_1  |     identifier: 'SK8di1uRdeC8e1zMksoHUz',
server_1  |     reqId: 1638952506203019800,
server_1  |     reason: 'client request invalid: could not authenticate, verkey for SK8di1uRdeC8e1zMksoHUz cannot be found'
server_1  |   },
server_1  |   credentialDefinition: {
server_1  |     ver: '1.0',
server_1  |     id: 'SK8di1uRdeC8e1zMksoHUz:3:CL:95154:Crypto Wallet',
server_1  |     schemaId: '95154',
server_1  |     type: 'CL',
server_1  |     tag: 'Crypto Wallet',
server_1  |     value: {
server_1  |       primary: {
server_1  |         n: '97743451841326778227641653730537624191340665687172518469820133433815801000797936061661012472341235246949095122217732134658777546977245327358514710072351592210846621971323039750446364590824983220814323674668208979123426482465763971908429674125375262077508259867958928969835469223077106244655103284044268209307669206155967742710267167093819266178336358107283136000277023496128496566969144343710489058530163886756406417723937553385321530288380419605941224464397998770862506756847680765563246449553960409132429261481014057069890877186503339169247734719573259692689960149406054935083621200297829711769841873461908009439301',
server_1  |         s: '44565435609291708663499652210183953544229227346717146124673737514370794038013562984404285239220171124438728427296858635293278871706638649951701547834083783950054246997423533700384267781871684996042860107303940041335870208041849031304510044901622808984689911479416410927555331446342642867375738555346651306316781303689511247467511892930557280435492659218309907099885107663532616243231671308208195113481935522978229355770148308896653250242058878745054044485666158040788068132683749667899213247281688774662824581021400920622664343365132386899433281937664605945104629914519428963996669982435077640042273704134949564368321',
server_1  |         r: {
server_1  |           master_secret: '39536436135449955171575483553657590167166021246973082263237162495322297687396720323515589188805207327645772833673213654064258803238008183370169521499968242837049483353091946389856690707352924613994718027989363641980506133505824593354809014091951085858171024466719057036084787967754168588168269324440968029909083027093705255361168835399386574295555220261081062515079238566940375622854018730277654778358145488528835341257013866025559797683568502356400273249387860273559372161178007552951042541031718312010836092389003279016250037557204826758637027884682806567562562595989352435122055751905135666540376828322267222837223',
server_1  |           balance: '48323276642963223096549113483253762636568976480959628221917730528524340833425861109825101260391222505517665061371694954200149506322118181977681796579497519236677029355439444928377228301759651511730705001911634872938900680668147185957171568158236662229227500090048474559660027074361723279227052969359126250302075367653410889796524256591246035357832992388199676997491404500686725769250771091312119108421563458941371312854885296221265806578391216955032021572881736361624807345216460776637830187605496662655095918896784489236397950177259677778087120951520243977824426529371781873608049579485335192368683404414317648678532',
server_1  |           address: '24933529636608181539197093725282765159657938142753715888909029596882413144567041070612042511805166355950092489203772407412478695542487889299542508637549577792879528358598637710271077631876717834251368422620832197897467716628151352133955885925011038894380156694377114345580676045193519346610281737320441995067895974365040911071776293888388154981377213952920570302906071134690912552444385082552638601665529140646998609071911738197964856001319484422694866935257682797287202369403381519509853280783944475154143072590560106231197482157198500341682042712289821369536394045019432356730363325463422627477209331743965205655386'
server_1  |         },
server_1  |         rctxt: '84208541207399114344966783234481497780331164051876769559071074533741540799405195461343200356614599234691142219791584670459404241024413294787622920282781896809269145312080582115813058197286958009939716496314112704268001707160885512654998110280999068929356359436628239371289450525765460948214652642203338212226291184643567990928295089190956496046172116453040484350110143545852407941187520383370217929270683827567857486545253909601705951184715598905411105944024346425522326154676162494574308092632146200077390830906184677811830892801251884177278817852003338724541859043808920235274916830074665594903106783380470055753571',
server_1  |         z: '56711043478116332394114802689057535541910595478128916430903229986450810600062222115665157727267081166373835280086514321958739461153494807479673189839612271453843787581818402818265231028746605424264272658272251030007569734182216195812909439968725677208289472478825130905682708593451993777645289952302789467271902206297946785935736017259266602564707511722549923874795408749747683102399200193651766797347049402194254508254998439678073913255943451152676057096655878862879752377827610607292010794705525116729132313845525055381611082148981572383259608805404662565227046967180550668233490563618824564505068039393172143366841'
server_1  |       }
server_1  |     }
server_1  |   }
server_1  | }

Link: https://github.com/hyperledger/aries-framework-javascript/blob/beff6b0ae0ad100ead1a4820ebf6c12fb3ad148d/packages/core/src/modules/ledger/IndyPool.ts#L122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant