@aztec/aztec-rpc
Advanced tools
Comparing version 0.1.0-alpha42 to 0.1.0-alpha43
@@ -134,2 +134,3 @@ import { CircuitsWasm, MAX_NEW_COMMITMENTS_PER_TX, MAX_NEW_NULLIFIERS_PER_TX } from '@aztec/circuits.js'; | ||
let innerNoteHash; | ||
let siloedNoteHash; | ||
let uniqueSiloedNoteHash; | ||
@@ -142,3 +143,4 @@ let innerNullifier; | ||
const expectedNonce = computeCommitmentNonce(wasm, firstNullifier, commitmentIndex); | ||
const { innerNoteHash: innerNoteHashTmp, uniqueSiloedNoteHash: uniqueSiloedNoteHashTmp, innerNullifier: innerNullifierTmp, } = await this.simulator.computeNoteHashAndNullifier(contractAddress, expectedNonce, storageSlot, notePreimage.items); | ||
const { innerNoteHash: innerNoteHashTmp, siloedNoteHash: siloedNoteHashTmp, uniqueSiloedNoteHash: uniqueSiloedNoteHashTmp, innerNullifier: innerNullifierTmp, } = await this.simulator.computeNoteHashAndNullifier(contractAddress, expectedNonce, storageSlot, notePreimage.items); | ||
siloedNoteHash = siloedNoteHashTmp; | ||
if (commitment.equals(uniqueSiloedNoteHashTmp)) { | ||
@@ -153,3 +155,21 @@ nonce = expectedNonce; | ||
if (!nonce) { | ||
throw new Error('Cannot find a matching commitment for the note.'); | ||
let errorString; | ||
if (siloedNoteHash == undefined) { | ||
errorString = 'Cannot find a matching commitment for the note.'; | ||
} | ||
else { | ||
errorString = `We decrypted a log, but couldn't find a corresponding note in the tree. | ||
This might be because the note was nullified in the same tx which created it. | ||
In that case, everything is fine. To check whether this is the case, look back through | ||
the logs for a notification | ||
'important: chopped commitment for siloed inner hash note | ||
${siloedNoteHash.toString()}'. | ||
If you can see that notification. Everything's fine. | ||
If that's not the case, and you can't find such a notification, something has gone wrong. | ||
There could be a problem with the way you've defined a custom note, or with the way you're | ||
serialising / deserialising / hashing / encrypting / decrypting that note. | ||
Please see the following github issue to track an improvement that we're working on: | ||
https://github.com/AztecProtocol/aztec-packages/issues/1641`; | ||
} | ||
throw new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1.0-alpha42", | ||
"@aztec/circuits.js": "0.1.0-alpha42", | ||
"@aztec/foundation": "0.1.0-alpha42", | ||
"@aztec/key-store": "0.1.0-alpha42", | ||
"@aztec/types": "0.1.0-alpha42", | ||
"@aztec/acir-simulator": "0.1.0-alpha43", | ||
"@aztec/circuits.js": "0.1.0-alpha43", | ||
"@aztec/foundation": "0.1.0-alpha43", | ||
"@aztec/key-store": "0.1.0-alpha43", | ||
"@aztec/types": "0.1.0-alpha43", | ||
"lodash.omit": "^4.5.0", | ||
@@ -13,0 +13,0 @@ "lodash.partition": "^4.6.0", |
@@ -183,2 +183,3 @@ import { CircuitsWasm, MAX_NEW_COMMITMENTS_PER_TX, MAX_NEW_NULLIFIERS_PER_TX } from '@aztec/circuits.js'; | ||
let innerNoteHash: Fr | undefined; | ||
let siloedNoteHash: Fr | undefined; | ||
let uniqueSiloedNoteHash: Fr | undefined; | ||
@@ -193,2 +194,3 @@ let innerNullifier: Fr | undefined; | ||
innerNoteHash: innerNoteHashTmp, | ||
siloedNoteHash: siloedNoteHashTmp, | ||
uniqueSiloedNoteHash: uniqueSiloedNoteHashTmp, | ||
@@ -202,2 +204,3 @@ innerNullifier: innerNullifierTmp, | ||
); | ||
siloedNoteHash = siloedNoteHashTmp; | ||
if (commitment.equals(uniqueSiloedNoteHashTmp)) { | ||
@@ -213,3 +216,21 @@ nonce = expectedNonce; | ||
if (!nonce) { | ||
throw new Error('Cannot find a matching commitment for the note.'); | ||
let errorString; | ||
if (siloedNoteHash == undefined) { | ||
errorString = 'Cannot find a matching commitment for the note.'; | ||
} else { | ||
errorString = `We decrypted a log, but couldn't find a corresponding note in the tree. | ||
This might be because the note was nullified in the same tx which created it. | ||
In that case, everything is fine. To check whether this is the case, look back through | ||
the logs for a notification | ||
'important: chopped commitment for siloed inner hash note | ||
${siloedNoteHash.toString()}'. | ||
If you can see that notification. Everything's fine. | ||
If that's not the case, and you can't find such a notification, something has gone wrong. | ||
There could be a problem with the way you've defined a custom note, or with the way you're | ||
serialising / deserialising / hashing / encrypting / decrypting that note. | ||
Please see the following github issue to track an improvement that we're working on: | ||
https://github.com/AztecProtocol/aztec-packages/issues/1641`; | ||
} | ||
throw new Error(errorString); | ||
} | ||
@@ -216,0 +237,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
586175
6373
+ Added@aztec/acir-simulator@0.1.0-alpha43(transitive)
+ Added@aztec/circuits.js@0.1.0-alpha43(transitive)
+ Added@aztec/foundation@0.1.0-alpha43(transitive)
+ Added@aztec/key-store@0.1.0-alpha43(transitive)
+ Added@aztec/types@0.1.0-alpha43(transitive)
+ Addedlodash.clonedeepwith@4.5.0(transitive)
- Removed@aztec/acir-simulator@0.1.0-alpha42(transitive)
- Removed@aztec/circuits.js@0.1.0-alpha42(transitive)
- Removed@aztec/foundation@0.1.0-alpha42(transitive)
- Removed@aztec/key-store@0.1.0-alpha42(transitive)
- Removed@aztec/types@0.1.0-alpha42(transitive)
Updated@aztec/types@0.1.0-alpha43