diff --git a/yarn-project/p2p/src/tx_validator/data_validator.test.ts b/yarn-project/p2p/src/tx_validator/data_validator.test.ts index c2e5473180c..729e7818b66 100644 --- a/yarn-project/p2p/src/tx_validator/data_validator.test.ts +++ b/yarn-project/p2p/src/tx_validator/data_validator.test.ts @@ -38,12 +38,12 @@ describe('TxDataValidator', () => { it('rejects txs with mismatch revertible execution requests', async () => { const goodTxs = mockTxs(3); - const badTxs = mockTxs(5); + const badTxs = mockTxs(4); badTxs[0].data.forPublic!.end.publicCallStack[0].callContext.msgSender = AztecAddress.random(); badTxs[1].data.forPublic!.end.publicCallStack[1].callContext.contractAddress = AztecAddress.random(); badTxs[2].data.forPublic!.end.publicCallStack[0].callContext.functionSelector = FunctionSelector.random(); - badTxs[4].data.forPublic!.end.publicCallStack[0].callContext.isStaticCall = - !badTxs[4].enqueuedPublicFunctionCalls[0].callContext.isStaticCall; + badTxs[3].data.forPublic!.end.publicCallStack[0].callContext.isStaticCall = + !badTxs[3].enqueuedPublicFunctionCalls[0].callContext.isStaticCall; await expect(validator.validateTxs([...badTxs, ...goodTxs])).resolves.toEqual([goodTxs, badTxs]); }); diff --git a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts index bed9f0467c9..c34fa969661 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts @@ -7,7 +7,6 @@ import { } from '@aztec/circuit-types'; import { CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS, - FunctionData, FunctionSelector, MAX_NOTE_HASHES_PER_CALL, MAX_NOTE_HASHES_PER_TX, @@ -61,8 +60,7 @@ describe('Kernel Prover', () => { : NoteHash.empty(), 0, ); - const functionData = FunctionData.empty(); - functionData.selector = new FunctionSelector(fnName.charCodeAt(0)); + publicInputs.callContext.functionSelector = new FunctionSelector(fnName.charCodeAt(0)); return new PrivateExecutionResult( Buffer.alloc(0), VerificationKey.makeFake().toBuffer(), diff --git a/yarn-project/txe/src/oracle/txe_oracle.ts b/yarn-project/txe/src/oracle/txe_oracle.ts index 3d22a5f8893..e2de6356223 100644 --- a/yarn-project/txe/src/oracle/txe_oracle.ts +++ b/yarn-project/txe/src/oracle/txe_oracle.ts @@ -695,7 +695,12 @@ export class TXE implements TypedOracle { this.setFunctionSelector(functionSelector); this.setCalldata(args); - const callContext = new CallContext(this.contractAddress, targetContractAddress, functionSelector, isStaticCall); + const callContext = new CallContext( + /* msgSender */ currentContractAddress, + targetContractAddress, + functionSelector, + isStaticCall, + ); const executionResult = await this.executePublicFunction(args, callContext, this.sideEffectsCounter); @@ -726,7 +731,7 @@ export class TXE implements TypedOracle { this.setFunctionSelector(functionSelector); const callContext = new CallContext( - this.contractAddress, + /* msgSender */ currentContractAddress, targetContractAddress, FunctionSelector.fromField(new Fr(PUBLIC_DISPATCH_SELECTOR)), isStaticCall,