Skip to content

Commit fb7a703

Browse files
committed
chore: apply prettier formatting after app tagging secret rename
1 parent ed1f075 commit fb7a703

8 files changed

Lines changed: 12 additions & 50 deletions

File tree

yarn-project/pxe/src/contract_function_simulator/oracle/private_execution_oracle.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import { AztecAddress } from '@aztec/stdlib/aztec-address';
1414
import { siloNullifier } from '@aztec/stdlib/hash';
1515
import { PrivateContextInputs } from '@aztec/stdlib/kernel';
16-
import { type ContractClassLog, AppTaggingSecret, type TaggingIndexRange } from '@aztec/stdlib/logs';
16+
import { AppTaggingSecret, type ContractClassLog, type TaggingIndexRange } from '@aztec/stdlib/logs';
1717
import { Tag } from '@aztec/stdlib/logs';
1818
import { Note, type NoteStatus } from '@aztec/stdlib/note';
1919
import {
@@ -204,11 +204,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
204204
* @returns An app tag to be used in a log.
205205
*/
206206
public async getNextAppTagAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<Tag> {
207-
const extendedSecret = await this.#calculateAppTaggingSecret(
208-
this.contractAddress,
209-
sender,
210-
recipient,
211-
);
207+
const extendedSecret = await this.#calculateAppTaggingSecret(this.contractAddress, sender, recipient);
212208

213209
if (!extendedSecret) {
214210
// We'd only fail to compute an extended secret if the recipient is an invalid address. To prevent
@@ -229,20 +225,10 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
229225
return Tag.compute({ extendedSecret, index });
230226
}
231227

232-
async #calculateAppTaggingSecret(
233-
contractAddress: AztecAddress,
234-
sender: AztecAddress,
235-
recipient: AztecAddress,
236-
) {
228+
async #calculateAppTaggingSecret(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress) {
237229
const senderCompleteAddress = await this.getCompleteAddressOrFail(sender);
238230
const senderIvsk = await this.keyStore.getMasterIncomingViewingSecretKey(sender);
239-
return AppTaggingSecret.compute(
240-
senderCompleteAddress,
241-
senderIvsk,
242-
recipient,
243-
contractAddress,
244-
recipient,
245-
);
231+
return AppTaggingSecret.compute(senderCompleteAddress, senderIvsk, recipient, contractAddress, recipient);
246232
}
247233

248234
async #getIndexToUseForSecret(secret: AppTaggingSecret): Promise<number> {

yarn-project/pxe/src/logs/log_service.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ import type { KeyStore } from '@aztec/key-store';
44
import { AztecAddress } from '@aztec/stdlib/aztec-address';
55
import type { BlockHash, L2TipsProvider } from '@aztec/stdlib/block';
66
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
7-
import {
8-
AppTaggingSecret,
9-
PendingTaggedLog,
10-
SiloedTag,
11-
type TxScopedL2Log,
12-
} from '@aztec/stdlib/logs';
7+
import { AppTaggingSecret, PendingTaggedLog, SiloedTag, type TxScopedL2Log } from '@aztec/stdlib/logs';
138
import type { BlockHeader } from '@aztec/stdlib/tx';
149

1510
import {
@@ -158,10 +153,7 @@ export class LogService {
158153
);
159154
}
160155

161-
async #getSecretsForSenders(
162-
contractAddress: AztecAddress,
163-
recipient: AztecAddress,
164-
): Promise<AppTaggingSecret[]> {
156+
async #getSecretsForSenders(contractAddress: AztecAddress, recipient: AztecAddress): Promise<AppTaggingSecret[]> {
165157
const recipientCompleteAddress = await this.addressStore.getCompleteAddress(recipient);
166158
if (!recipientCompleteAddress) {
167159
return [];

yarn-project/pxe/src/storage/backwards_compatibility_tests/schema_tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import { CompleteAddress, SerializableContractInstance } from '@aztec/stdlib/con
1616
import { GasFees } from '@aztec/stdlib/gas';
1717
import { PublicKey, PublicKeys } from '@aztec/stdlib/keys';
1818
import {
19+
AppTaggingSecret,
1920
ContractClassLog,
2021
ContractClassLogFields,
21-
AppTaggingSecret,
2222
PrivateLog,
2323
PublicLog,
2424
type TaggingIndexRange,

yarn-project/pxe/src/storage/tagging_store/recipient_tagging_store.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,7 @@ export class RecipientTaggingStore implements StagedStore {
125125
return this.#store.transactionAsync(() => this.#readHighestFinalizedIndex(jobId, secret.toString()));
126126
}
127127

128-
updateHighestFinalizedIndex(
129-
secret: AppTaggingSecret,
130-
index: number,
131-
jobId: string,
132-
): Promise<void> {
128+
updateHighestFinalizedIndex(secret: AppTaggingSecret, index: number, jobId: string): Promise<void> {
133129
return this.#store.transactionAsync(async () => {
134130
const currentIndex = await this.#readHighestFinalizedIndex(jobId, secret.toString());
135131
if (currentIndex !== undefined && index < currentIndex) {

yarn-project/pxe/src/tagging/reconcile_tagging_index_ranges.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ describe('reconcileTaggingIndexRangesAgainstSurvivingTags', () => {
1313
});
1414

1515
/** Builds a set of surviving siloed tag values from a list of `(secret, index)` pairs. */
16-
async function buildSurvivingTags(
17-
pairs: Array<{ secret: AppTaggingSecret; index: number }>,
18-
): Promise<Set<string>> {
16+
async function buildSurvivingTags(pairs: Array<{ secret: AppTaggingSecret; index: number }>): Promise<Set<string>> {
1917
const tags = await Promise.all(
2018
pairs.map(({ secret, index }) => SiloedTag.compute({ extendedSecret: secret, index })),
2119
);

yarn-project/pxe/src/tagging/sender_sync/sync_sender_tagging_indexes.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import { type IndexedTxEffect, TxEffect, TxExecutionResult, TxHash, TxReceipt, T
1111
import { type MockProxy, mock } from 'jest-mock-extended';
1212

1313
import { SenderTaggingStore } from '../../storage/tagging_store/sender_tagging_store.js';
14-
import {
15-
type AppTaggingSecret,
16-
SiloedTag,
17-
UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN,
18-
} from '../index.js';
14+
import { type AppTaggingSecret, SiloedTag, UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../index.js';
1915
import { syncSenderTaggingIndexes } from './sync_sender_tagging_indexes.js';
2016

2117
const MOCK_ANCHOR_BLOCK_HASH = BlockHash.random();

yarn-project/stdlib/src/logs/pre_tag.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import { schemas } from '@aztec/foundation/schemas';
22

33
import { z } from 'zod';
44

5-
import {
6-
type AppTaggingSecret,
7-
AppTaggingSecretSchema,
8-
} from './app_tagging_secret.js';
5+
import { type AppTaggingSecret, AppTaggingSecretSchema } from './app_tagging_secret.js';
96

107
/**
118
* Represents a preimage of a private log tag (see `Tag` in `pxe/src/tagging`).

yarn-project/stdlib/src/logs/tagging_index_range.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import { schemas } from '@aztec/foundation/schemas';
22

33
import { z } from 'zod';
44

5-
import {
6-
type AppTaggingSecret,
7-
AppTaggingSecretSchema,
8-
} from './app_tagging_secret.js';
5+
import { type AppTaggingSecret, AppTaggingSecretSchema } from './app_tagging_secret.js';
96

107
/** Represents a range of tagging indexes for a given app tagging secret. */
118
export type TaggingIndexRange = {

0 commit comments

Comments
 (0)