From 0c7459b77b772f0868ba0216ad249cbf2fe4e1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Rodr=C3=ADguez?= Date: Tue, 16 Jul 2024 13:02:19 +0200 Subject: [PATCH] fix(pxe): Best effort noir call stack generation (#7336) Resolves https://github.com/AztecProtocol/aztec-packages/issues/7188 --- yarn-project/pxe/src/pxe_service/pxe_service.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index 1d38298b6fd..b14c7d5232b 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -724,8 +724,14 @@ export class PXEService implements PXE { ); const noirCallStack = err.getNoirCallStack(); if (debugInfo && isNoirCallStackUnresolved(noirCallStack)) { - const parsedCallStack = resolveOpcodeLocations(noirCallStack, debugInfo); - err.setNoirCallStack(parsedCallStack); + try { + const parsedCallStack = resolveOpcodeLocations(noirCallStack, debugInfo); + err.setNoirCallStack(parsedCallStack); + } catch (err) { + this.log.warn( + `Could not resolve noir call stack for ${originalFailingFunction.contractAddress.toString()}:${originalFailingFunction.functionSelector.toString()}: ${err}`, + ); + } } await this.#enrichSimulationError(err); }