diff --git a/l1-contracts/test/portals/UniswapPortal.t.sol b/l1-contracts/test/portals/UniswapPortal.t.sol index 25587cc5b893..45792a2f1bce 100644 --- a/l1-contracts/test/portals/UniswapPortal.t.sol +++ b/l1-contracts/test/portals/UniswapPortal.t.sol @@ -154,10 +154,10 @@ contract UniswapPortalTest is Test { entryKey = outbox.computeEntryKey(message); } - function _addMessagesToOutbox(bytes32 daiWithdrawentryKey, bytes32 swapentryKey) internal { + function _addMessagesToOutbox(bytes32 daiWithdrawEntryKey, bytes32 swapEntryKey) internal { bytes32[] memory entryKeys = new bytes32[](2); - entryKeys[0] = daiWithdrawentryKey; - entryKeys[1] = swapentryKey; + entryKeys[0] = daiWithdrawEntryKey; + entryKeys[1] = swapEntryKey; vm.prank(address(rollup)); outbox.sendL1Messages(entryKeys); @@ -215,10 +215,10 @@ contract UniswapPortalTest is Test { } function testRevertIfSwapParamsDifferentToOutboxMessage() public { - bytes32 daiWithdrawMsgKey = + bytes32 daiWithdrawEntryKey = _createDaiWithdrawMessage(address(uniswapPortal), address(uniswapPortal)); - bytes32 swapMsgKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); - _addMessagesToOutbox(daiWithdrawMsgKey, swapMsgKey); + bytes32 swapEntryKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); + _addMessagesToOutbox(daiWithdrawEntryKey, swapEntryKey); bytes32 newAztecRecipient = bytes32(uint256(0x4)); bytes32 entryKeyPortalChecksAgainst = @@ -241,12 +241,12 @@ contract UniswapPortalTest is Test { } function testSwapWithDesignatedCaller() public { - bytes32 daiWithdrawMsgKey = + bytes32 daiWithdrawEntryKey = _createDaiWithdrawMessage(address(uniswapPortal), address(uniswapPortal)); - bytes32 swapMsgKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); - _addMessagesToOutbox(daiWithdrawMsgKey, swapMsgKey); + bytes32 swapEntryKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); + _addMessagesToOutbox(daiWithdrawEntryKey, swapEntryKey); - bytes32 l1ToL2entryKey = uniswapPortal.swapPublic( + bytes32 l1ToL2EntryKey = uniswapPortal.swapPublic( address(daiTokenPortal), amount, uniswapFeePool, @@ -264,22 +264,22 @@ contract UniswapPortalTest is Test { // there should be some weth in the weth portal assertGt(WETH9.balanceOf(address(wethTokenPortal)), 0); // there should be a message in the inbox: - assertEq(inbox.get(l1ToL2entryKey).count, 1); + assertEq(inbox.get(l1ToL2EntryKey).count, 1); // there should be no message in the outbox: - assertFalse(outbox.contains(daiWithdrawMsgKey)); - assertFalse(outbox.contains(swapMsgKey)); + assertFalse(outbox.contains(daiWithdrawEntryKey)); + assertFalse(outbox.contains(swapEntryKey)); } function testSwapCalledByAnyoneIfDesignatedCallerNotSet(address _caller) public { vm.assume(_caller != address(uniswapPortal)); - bytes32 daiWithdrawMsgKey = + bytes32 daiWithdrawEntryKey = _createDaiWithdrawMessage(address(uniswapPortal), address(uniswapPortal)); // don't set caller on swapPublic() -> so anyone can call this method. - bytes32 swapMsgKey = _createUniswapSwapMessagePublic(aztecRecipient, address(0)); - _addMessagesToOutbox(daiWithdrawMsgKey, swapMsgKey); + bytes32 swapEntryKey = _createUniswapSwapMessagePublic(aztecRecipient, address(0)); + _addMessagesToOutbox(daiWithdrawEntryKey, swapEntryKey); vm.prank(_caller); - bytes32 l1ToL2entryKey = uniswapPortal.swapPublic( + bytes32 l1ToL2EntryKey = uniswapPortal.swapPublic( address(daiTokenPortal), amount, uniswapFeePool, @@ -297,18 +297,18 @@ contract UniswapPortalTest is Test { // there should be some weth in the weth portal assertGt(WETH9.balanceOf(address(wethTokenPortal)), 0); // there should be a message in the inbox: - assertEq(inbox.get(l1ToL2entryKey).count, 1); + assertEq(inbox.get(l1ToL2EntryKey).count, 1); // there should be no message in the outbox: - assertFalse(outbox.contains(daiWithdrawMsgKey)); - assertFalse(outbox.contains(swapMsgKey)); + assertFalse(outbox.contains(daiWithdrawEntryKey)); + assertFalse(outbox.contains(swapEntryKey)); } function testRevertIfSwapWithDesignatedCallerCalledByWrongCaller(address _caller) public { vm.assume(_caller != address(this)); - bytes32 daiWithdrawMsgKey = + bytes32 daiWithdrawEntryKey = _createDaiWithdrawMessage(address(uniswapPortal), address(uniswapPortal)); - bytes32 swapMsgKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); - _addMessagesToOutbox(daiWithdrawMsgKey, swapMsgKey); + bytes32 swapEntryKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); + _addMessagesToOutbox(daiWithdrawEntryKey, swapEntryKey); vm.startPrank(_caller); bytes32 entryKeyPortalChecksAgainst = _createUniswapSwapMessagePublic(aztecRecipient, _caller); @@ -352,12 +352,12 @@ contract UniswapPortalTest is Test { // if the sequencer doesn't consume the L1->L2 message, then `canceller` can // cancel the message and retrieve the funds (instead of them being stuck on the portal) function testMessageToInboxIsCancellable() public { - bytes32 daiWithdrawMsgKey = + bytes32 daiWithdrawEntryKey = _createDaiWithdrawMessage(address(uniswapPortal), address(uniswapPortal)); - bytes32 swapMsgKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); - _addMessagesToOutbox(daiWithdrawMsgKey, swapMsgKey); + bytes32 swapEntryKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); + _addMessagesToOutbox(daiWithdrawEntryKey, swapEntryKey); - bytes32 l1ToL2entryKey = uniswapPortal.swapPublic{value: 1 ether}( + bytes32 l1ToL2EntryKey = uniswapPortal.swapPublic{value: 1 ether}( address(daiTokenPortal), amount, uniswapFeePool, @@ -376,13 +376,13 @@ contract UniswapPortalTest is Test { // check event was emitted vm.expectEmit(true, false, false, false); // expected event: - emit L1ToL2MessageCancelled(l1ToL2entryKey); + emit L1ToL2MessageCancelled(l1ToL2EntryKey); // perform op // TODO(2167) - Update UniswapPortal properly with new portal standard. bytes32 entryKey = wethTokenPortal.cancelL1ToAztecMessagePublic( aztecRecipient, wethAmountOut, deadlineForL1ToL2Message, secretHash, 1 ether ); - assertEq(entryKey, l1ToL2entryKey, "returned entry key and calculated entryKey should match"); + assertEq(entryKey, l1ToL2EntryKey, "returned entry key and calculated entryKey should match"); assertFalse(inbox.contains(entryKey), "entry still in inbox"); assertEq( WETH9.balanceOf(address(this)), @@ -393,12 +393,12 @@ contract UniswapPortalTest is Test { } function testRevertIfSwapMessageWasForDifferentPublicOrPrivateFlow() public { - bytes32 daiWithdrawMsgKey = + bytes32 daiWithdrawEntryKey = _createDaiWithdrawMessage(address(uniswapPortal), address(uniswapPortal)); // Create message for `_isPrivateFlow`: - bytes32 swapMsgKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); - _addMessagesToOutbox(daiWithdrawMsgKey, swapMsgKey); + bytes32 swapEntryKey = _createUniswapSwapMessagePublic(aztecRecipient, address(this)); + _addMessagesToOutbox(daiWithdrawEntryKey, swapEntryKey); bytes32 entryKeyPortalChecksAgainst = _createUniswapSwapMessagePrivate(secretHashForRedeemingMintedNotes, address(this)); diff --git a/noir-projects/aztec-nr/aztec/src/messaging.nr b/noir-projects/aztec-nr/aztec/src/messaging.nr index 32beec4e3909..958a5e863f46 100644 --- a/noir-projects/aztec-nr/aztec/src/messaging.nr +++ b/noir-projects/aztec-nr/aztec/src/messaging.nr @@ -2,8 +2,6 @@ mod l1_to_l2_message; use crate::oracle::get_l1_to_l2_membership_witness::get_l1_to_l2_membership_witness; -use crate::oracle::debug_log::debug_log_format; - use dep::std::merkle::compute_merkle_root; use crate::messaging::l1_to_l2_message::L1ToL2Message; use dep::protocol_types::{constants::L1_TO_L2_MSG_TREE_HEIGHT, address::{AztecAddress, EthAddress}, utils::arr_copy_slice}; @@ -26,18 +24,6 @@ pub fn process_l1_to_l2_message( secret ); let entry_key = msg.hash(); - debug_log_format( - "L1ToL2Message entry_key: H({0}, {1}, {2}, {3}, {4}, {5}) = {6} ", - [ - portal_contract_address.to_field(), - chain_id, - storage_contract_address.to_field(), - version, - content, - secret, - entry_key - ] - ); let returned_message = get_l1_to_l2_membership_witness(entry_key); let leaf_index = returned_message[0]; diff --git a/yarn-project/archiver/src/archiver/archiver.test.ts b/yarn-project/archiver/src/archiver/archiver.test.ts index 88fb7c7fc4b6..2adcd5cb681b 100644 --- a/yarn-project/archiver/src/archiver/archiver.test.ts +++ b/yarn-project/archiver/src/archiver/archiver.test.ts @@ -101,12 +101,12 @@ describe('Archiver', () => { // Check that only 2 messages (l1ToL2MessageAddedEvents[3][2] and l1ToL2MessageAddedEvents[3][3]) are pending. // Other two (l1ToL2MessageAddedEvents[3][0..2]) were cancelled. And the previous messages were confirmed. - const expectedPendingentryKeys = [ + const expectedPendingEntryKeys = [ l1ToL2MessageAddedEvents[3][2].args.entryKey, l1ToL2MessageAddedEvents[3][3].args.entryKey, ]; - const actualPendingentryKeys = (await archiver.getPendingL1ToL2EntryKeys(10)).map(key => key.toString()); - expect(expectedPendingentryKeys).toEqual(actualPendingentryKeys); + const actualPendingEntryKeys = (await archiver.getPendingL1ToL2EntryKeys(10)).map(key => key.toString()); + expect(expectedPendingEntryKeys).toEqual(actualPendingEntryKeys); // Expect logs to correspond to what is set by L2Block.random(...) const encryptedLogs = await archiver.getLogs(1, 100, LogType.ENCRYPTED); @@ -199,9 +199,9 @@ describe('Archiver', () => { expect(latestBlockNum).toEqual(numL2BlocksInTest); // Check that the only pending L1 to L2 messages are those from eth bock 102 - const expectedPendingentryKeys = additionalL1ToL2MessagesBlock102; - const actualPendingentryKeys = (await archiver.getPendingL1ToL2EntryKeys(100)).map(key => key.toString()); - expect(actualPendingentryKeys).toEqual(expectedPendingentryKeys); + const expectedPendingEntryKeys = additionalL1ToL2MessagesBlock102; + const actualPendingEntryKeys = (await archiver.getPendingL1ToL2EntryKeys(100)).map(key => key.toString()); + expect(actualPendingEntryKeys).toEqual(expectedPendingEntryKeys); await archiver.stop(); }, 10_000); diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 1c1241e02ce8..5b7ffc3c5913 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -551,7 +551,7 @@ export class Archiver implements ArchiveSource { * @returns The requested L1 to L2 messages' keys. */ getPendingL1ToL2EntryKeys(limit: number): Promise { - return this.store.getPendingL1ToL2entryKeys(limit); + return this.store.getPendingL1ToL2EntryKeys(limit); } /** diff --git a/yarn-project/archiver/src/archiver/archiver_store.ts b/yarn-project/archiver/src/archiver/archiver_store.ts index e87170844179..f5449bcc26f5 100644 --- a/yarn-project/archiver/src/archiver/archiver_store.ts +++ b/yarn-project/archiver/src/archiver/archiver_store.ts @@ -95,7 +95,7 @@ export interface ArchiverDataStore { * @param limit - The number of entries to return (by default NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP). * @returns The requested L1 to L2 entry keys. */ - getPendingL1ToL2entryKeys(limit: number): Promise; + getPendingL1ToL2EntryKeys(limit: number): Promise; /** * Gets the confirmed L1 to L2 message corresponding to the given entry key. diff --git a/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts b/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts index 05ae69234444..be90e7da57c7 100644 --- a/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts +++ b/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts @@ -185,7 +185,7 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch const message = L1ToL2Message.random(Fr.random()); await expect(store.addPendingL1ToL2Messages([message, message], 1n)).resolves.toEqual(true); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([message.entryKey!, message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([message.entryKey!, message.entryKey!]); }); it('allows duplicate pending messages in different blocks', async () => { @@ -193,14 +193,14 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch await expect(store.addPendingL1ToL2Messages([message], 1n)).resolves.toEqual(true); await expect(store.addPendingL1ToL2Messages([message], 2n)).resolves.toEqual(true); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([message.entryKey!, message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([message.entryKey!, message.entryKey!]); }); it('is idempotent', async () => { const message = L1ToL2Message.random(Fr.random()); await expect(store.addPendingL1ToL2Messages([message], 1n)).resolves.toEqual(true); await expect(store.addPendingL1ToL2Messages([message], 1n)).resolves.toEqual(false); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([message.entryKey!]); }); }); @@ -208,7 +208,7 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch it('returns previously stored pending L1 to L2 messages', async () => { const message = L1ToL2Message.random(Fr.random()); await store.addPendingL1ToL2Messages([message], 1n); - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([message.entryKey!]); }); it('returns messages ordered by fee', async () => { @@ -219,13 +219,13 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch await store.addPendingL1ToL2Messages(messages, 1n); messages.sort((a, b) => b.fee - a.fee); - await expect(store.getPendingL1ToL2entryKeys(messages.length)).resolves.toEqual( + await expect(store.getPendingL1ToL2EntryKeys(messages.length)).resolves.toEqual( messages.map(message => message.entryKey!), ); }); it('returns an empty array if no messages are found', async () => { - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([]); }); }); @@ -240,7 +240,7 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch const message = L1ToL2Message.random(Fr.random()); await store.addPendingL1ToL2Messages([message], 1n); await store.confirmL1ToL2EntryKeys([message.entryKey!]); - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([]); }); it('once confirmed a message can also be pending if added again', async () => { @@ -248,14 +248,14 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch await store.addPendingL1ToL2Messages([message], 1n); await store.confirmL1ToL2EntryKeys([message.entryKey!]); await store.addPendingL1ToL2Messages([message], 2n); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([message.entryKey!]); }); it('once confirmed a message can remain pending if more of it were pending', async () => { const message = L1ToL2Message.random(Fr.random()); await store.addPendingL1ToL2Messages([message, message], 1n); await store.confirmL1ToL2EntryKeys([message.entryKey!]); - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([message.entryKey!]); }); }); @@ -264,14 +264,14 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch const message = L1ToL2Message.random(Fr.random()); await store.addPendingL1ToL2Messages([message], 1n); await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 1n); - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([]); }); it('cancels only one of the pending messages if duplicates exist', async () => { const message = L1ToL2Message.random(Fr.random()); await store.addPendingL1ToL2Messages([message, message], 1n); await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 1n); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([message.entryKey]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([message.entryKey]); }); it('once canceled a message can also be pending if added again', async () => { @@ -279,17 +279,17 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch await store.addPendingL1ToL2Messages([message], 1n); await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 1n); - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([]); await store.addPendingL1ToL2Messages([message], 2n); - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([message.entryKey!]); }); it('allows adding and cancelling in the same block', async () => { const message = L1ToL2Message.random(Fr.random()); await store.addPendingL1ToL2Messages([message], 1n); await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 1n); - await expect(store.getPendingL1ToL2entryKeys(1)).resolves.toEqual([]); + await expect(store.getPendingL1ToL2EntryKeys(1)).resolves.toEqual([]); }); it('allows duplicates cancellations in different positions in the same block', async () => { @@ -298,7 +298,7 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch await store.cancelPendingL1ToL2EntryKeys([message.entryKey!, message.entryKey!], 1n); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([]); }); it('allows duplicates cancellations in different blocks', async () => { @@ -308,7 +308,7 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 2n); await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 3n); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([]); }); it('is idempotent', async () => { @@ -318,7 +318,7 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 2n); await store.cancelPendingL1ToL2EntryKeys([message.entryKey!], 2n); - await expect(store.getPendingL1ToL2entryKeys(2)).resolves.toEqual([message.entryKey!]); + await expect(store.getPendingL1ToL2EntryKeys(2)).resolves.toEqual([message.entryKey!]); }); }); diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts index 6f9eea16528c..27f7073109a6 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts @@ -152,8 +152,8 @@ export class KVArchiverDataStore implements ArchiverDataStore { * @param limit - The number of messages to return (by default NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP). * @returns The requested L1 to L2 entry keys. */ - getPendingL1ToL2entryKeys(limit: number): Promise { - return Promise.resolve(this.#messageStore.getPendingentryKeysByFee(limit)); + getPendingL1ToL2EntryKeys(limit: number): Promise { + return Promise.resolve(this.#messageStore.getPendingEntryKeysByFee(limit)); } /** diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts index 4b0be6012e0b..e9e13392991a 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts @@ -152,7 +152,7 @@ export class MessageStore { * @param limit - The number of messages to return (by default NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP). * @returns The requested L1 to L2 entry keys. */ - getPendingentryKeysByFee(limit: number): Fr[] { + getPendingEntryKeysByFee(limit: number): Fr[] { const entryKeys: Fr[] = []; for (const [[_, entryKey], count] of this.#pendingMessagesByFee.entries({ diff --git a/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts index 8335eb0fca8e..e21a76d1b497 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts @@ -60,12 +60,12 @@ describe('pending_l1_to_l2_message_store', () => { }); it('get messages for an empty store', () => { - expect(store.getentryKeys(10)).toEqual([]); + expect(store.getEntryKeys(10)).toEqual([]); }); - it('getentryKeys returns an empty array if limit is 0', () => { + it('getEntryKeys returns an empty array if limit is 0', () => { store.addMessage(entryKey, msg); - expect(store.getentryKeys(0)).toEqual([]); + expect(store.getEntryKeys(0)).toEqual([]); }); it('get messages for a non-empty store when limit > number of messages in store', () => { @@ -73,7 +73,7 @@ describe('pending_l1_to_l2_message_store', () => { entryKeys.forEach(entryKey => { store.addMessage(entryKey, L1ToL2Message.random()); }); - expect(store.getentryKeys(10).length).toEqual(5); + expect(store.getEntryKeys(10).length).toEqual(5); }); it('get messages returns messages sorted by fees and also includes multiple of the same message', () => { @@ -92,7 +92,7 @@ describe('pending_l1_to_l2_message_store', () => { store.addMessage(entryKey, msg); }); const expectedMessageFees = [4n, 3n, 3n, 3n]; // the top 4. - const receivedMessageFees = store.getentryKeys(4).map(key => key.value); + const receivedMessageFees = store.getEntryKeys(4).map(key => key.value); expect(receivedMessageFees).toEqual(expectedMessageFees); }); }); diff --git a/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts index 1ac914256e3e..e1b0435db8ac 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts @@ -38,7 +38,7 @@ export class L1ToL2MessageStore { * for removing messages or fetching multiple messages. */ export class PendingL1ToL2MessageStore extends L1ToL2MessageStore { - getentryKeys(limit: number): Fr[] { + getEntryKeys(limit: number): Fr[] { if (limit < 1) { return []; } diff --git a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts index dcf30bea6984..9d27331589e4 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts @@ -246,8 +246,8 @@ export class MemoryArchiverStore implements ArchiverDataStore { * @param limit - The number of messages to return (by default NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP). * @returns The requested L1 to L2 entry keys. */ - public getPendingL1ToL2entryKeys(limit: number = NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP): Promise { - return Promise.resolve(this.pendingL1ToL2Messages.getentryKeys(limit)); + public getPendingL1ToL2EntryKeys(limit: number = NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP): Promise { + return Promise.resolve(this.pendingL1ToL2Messages.getEntryKeys(limit)); } /** diff --git a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts index 63ed1193d9f4..22eaf2f29386 100644 --- a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts @@ -161,7 +161,7 @@ export abstract class TypedOracle { throw new Error('Not available.'); } - getL1ToL2MembershipWitness(_msgKey: Fr): Promise> { + getL1ToL2MembershipWitness(_entryKey: Fr): Promise> { throw new Error('Not available.'); }