From e163508b6671cc0ffaeef47de84e31eb38bb7829 Mon Sep 17 00:00:00 2001 From: benesjan Date: Mon, 4 Sep 2023 13:07:26 +0000 Subject: [PATCH] WIP --- yarn-project/aztec-node/src/aztec-node/server.ts | 4 ++-- .../src/structs/kernel/combined_accumulated_data.ts | 2 +- .../easy-private-state/src/easy_private_state.nr | 12 ++++++------ yarn-project/p2p/src/client/p2p_client.ts | 4 ++-- .../src/sequencer/public_processor.ts | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index b2235f1b31b2..f457247f9dbb 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -250,7 +250,7 @@ export class AztecNodeService implements AztecNode { * @returns - The pending tx if it exists. */ public async getPendingTxByHash(txHash: TxHash) { - return await this.p2pClient!.getTxByhash(txHash); + return await this.p2pClient!.getTxByHash(txHash); } /** @@ -388,7 +388,7 @@ export class AztecNodeService implements AztecNode { const newGlobalVariables = await this.globalVariableBuilder.buildGlobalVariables(new Fr(blockNumber)); const prevGlobalVariables = (await this.blockSource.getL2Block(-1))?.globalVariables ?? GlobalVariables.empty(); - // Instantiate merkle trees so uncommited updates by this simulation are local to it. + // Instantiate merkle trees so uncommitted updates by this simulation are local to it. // TODO we should be able to remove this after https://github.com/AztecProtocol/aztec-packages/issues/1869 // So simulation of public functions doesn't affect the merkle trees. const merkleTrees = new MerkleTrees(this.merkleTreesDb, this.log); diff --git a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts b/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts index 0a145480d448..aa7b25af1d08 100644 --- a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts @@ -467,7 +467,7 @@ export class CombinedAccumulatedData { } /** - * Specific accumululated data structure for the final ordering private kernel circuit. It is included + * Specific accumulated data structure for the final ordering private kernel circuit. It is included * in the final public inputs of private kernel circuit. */ export class FinalAccumulatedData { diff --git a/yarn-project/noir-libs/easy-private-state/src/easy_private_state.nr b/yarn-project/noir-libs/easy-private-state/src/easy_private_state.nr index a78096c07729..df5390631a42 100644 --- a/yarn-project/noir-libs/easy-private-state/src/easy_private_state.nr +++ b/yarn-project/noir-libs/easy-private-state/src/easy_private_state.nr @@ -48,10 +48,10 @@ impl EasyPrivateUint { // Emit the newly created encrypted note preimages via oracle calls. let owner_key = get_public_key(owner); - let _context = self.context.unwrap(); + let maybeContext = self.context.unwrap(); emit_encrypted_log( - _context, - (*_context).this_address(), + maybeContext, + (*maybeContext).this_address(), self.set.storage_slot, owner_key, addend_note.serialise(), @@ -94,10 +94,10 @@ impl EasyPrivateUint { let owner_key = get_public_key(owner); - let _context = self.context.unwrap(); + let maybeContext = self.context.unwrap(); emit_encrypted_log( - _context, - (*_context).this_address(), + maybeContext, + (*maybeContext).this_address(), self.set.storage_slot, owner_key, encrypted_data, diff --git a/yarn-project/p2p/src/client/p2p_client.ts b/yarn-project/p2p/src/client/p2p_client.ts index d64ef1861edf..e8e34868a780 100644 --- a/yarn-project/p2p/src/client/p2p_client.ts +++ b/yarn-project/p2p/src/client/p2p_client.ts @@ -57,7 +57,7 @@ export interface P2P { * @param txHash - Hash of tx to return. * @returns A single tx or undefined. */ - getTxByhash(txHash: TxHash): Promise; + getTxByHash(txHash: TxHash): Promise; /** * Starts the p2p client. @@ -200,7 +200,7 @@ export class P2PClient implements P2P { * @param txHash - Hash of the transaction to look for in the pool. * @returns A single tx or undefined. */ - getTxByhash(txHash: TxHash): Promise { + getTxByHash(txHash: TxHash): Promise { return Promise.resolve(this.txPool.getTxByHash(txHash)); } diff --git a/yarn-project/sequencer-client/src/sequencer/public_processor.ts b/yarn-project/sequencer-client/src/sequencer/public_processor.ts index ee1b3ea397c2..da0e7e7e00dc 100644 --- a/yarn-project/sequencer-client/src/sequencer/public_processor.ts +++ b/yarn-project/sequencer-client/src/sequencer/public_processor.ts @@ -109,7 +109,7 @@ export class PublicProcessor { */ public async process(txs: Tx[]): Promise<[ProcessedTx[], FailedTx[]]> { // The processor modifies the tx objects in place, so we need to clone them. - txs = txs.map(tx => Tx.fromJSON(tx.toJSON())); + txs = txs.map(tx => Tx.clone(tx)); const result: ProcessedTx[] = []; const failed: FailedTx[] = [];