diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index 972ef5ce916a..e099f5cc0681 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -563,6 +563,13 @@ export class PXEService implements PXE { if (await this.node.getTxEffect(txHash)) { throw new Error(`A settled tx with equal hash ${txHash.toString()} exists.`); } + + const isValidTx = await this.node.validateTx(tx); + + if (!isValidTx) { + throw new Error('The simulated transaction is unable to be added to state and is invalid.'); + } + this.log.info(`Sending transaction ${txHash}`); await this.node.sendTx(tx); this.log.info(`Sent transaction ${txHash}`);