Skip to content

Commit

Permalink
More renames
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Dec 5, 2024
1 parent d3e12cd commit 93ce5cf
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/utils/anvil_test_watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class AnvilTestWatcher {

private filledRunningPromise?: RunningPromise;

private logger: Logger = createLogger(`aztec:utils:watcher`);
private logger: Logger = createLogger(`aztecjs:utils:watcher`);

constructor(
private cheatcodes: EthCheatCodes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class BlacklistTokenContractTest {
blacklisted!: AccountWallet;

constructor(testName: string) {
this.logger = createLogger(`aztec:e2e_blacklist_token_contract:${testName}`);
this.logger = createLogger(`e2e:e2e_blacklist_token_contract:${testName}`);
this.snapshotManager = createSnapshotManager(`e2e_blacklist_token_contract/${testName}`, dataPath);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class CrossChainMessagingTest {
outbox!: any; // GetContractReturnType<typeof OutboxAbi> | undefined;

constructor(testName: string) {
this.logger = createLogger(`aztec:e2e_cross_chain_messaging:${testName}`);
this.logger = createLogger(`e2e:e2e_cross_chain_messaging:${testName}`);
this.snapshotManager = createSnapshotManager(`e2e_cross_chain_messaging/${testName}`, dataPath);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class DeployTest {
public aztecNode!: AztecNode;

constructor(testName: string) {
this.logger = createLogger(`aztec:e2e_deploy_contract:${testName}`);
this.logger = createLogger(`e2e:e2e_deploy_contract:${testName}`);
this.snapshotManager = createSnapshotManager(`e2e_deploy_contract/${testName}`, dataPath);
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_fees/fees_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class FeesTest {
public readonly APP_SPONSORED_TX_GAS_LIMIT = BigInt(10e9);

constructor(testName: string) {
this.logger = createLogger(`aztec:e2e_fees:${testName}`);
this.logger = createLogger(`e2e:e2e_fees:${testName}`);
this.snapshotManager = createSnapshotManager(`e2e_fees/${testName}`, dataPath);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class NestedContractTest {
childContract!: ChildContract;

constructor(testName: string) {
this.logger = createLogger(`aztec:e2e_nested_contract:${testName}`);
this.logger = createLogger(`e2e:e2e_nested_contract:${testName}`);
this.snapshotManager = createSnapshotManager(`e2e_nested_contract/${testName}`, dataPath);
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class P2PNetworkTest {
// If set enable metrics collection
metricsPort?: number,
) {
this.logger = createLogger(`aztec:e2e_p2p:${testName}`);
this.logger = createLogger(`e2e:e2e_p2p:${testName}`);

// Set up the base account and node private keys for the initial network deployment
this.baseAccount = privateKeyToAccount(`0x${getPrivateKeyFromIndex(0)!.toString('hex')}`);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class FullProverTest {
coinbase: EthAddress,
private realProofs = true,
) {
this.logger = createLogger(`aztec:full_prover_test:${testName}`);
this.logger = createLogger(`e2e:full_prover_test:${testName}`);
this.snapshotManager = createSnapshotManager(
`full_prover_integration/${testName}`,
dataPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class TokenContractTest {
badAccount!: DocsExampleContract;

constructor(testName: string) {
this.logger = createLogger(`aztec:e2e_token_contract:${testName}`);
this.logger = createLogger(`e2e:e2e_token_contract:${testName}`);
this.snapshotManager = createSnapshotManager(`e2e_token_contract/${testName}`, dataPath, {
metricsPort: metricsPort ? parseInt(metricsPort) : undefined,
});
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/fixtures/setup_p2p_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function createNode(

return await AztecNodeService.createAndSync(validatorConfig, {
telemetry: telemetryClient,
logger: createLogger(`aztec:node-${tcpPort}`),
logger: createLogger(`node:${tcpPort}`),
});
}

Expand Down
4 changes: 2 additions & 2 deletions yarn-project/end-to-end/src/fixtures/snapshot_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MockSnapshotManager implements ISnapshotManager {
private config: Partial<AztecNodeConfig> = {},
private deployL1ContractsArgs: Partial<DeployL1ContractsArgs> = { assumeProvenThrough: Number.MAX_SAFE_INTEGER },
) {
this.logger = createLogger(`aztec:snapshot_manager:${testName}`);
this.logger = createLogger(`e2e:snapshot_manager:${testName}`);
this.logger.warn(`No data path given, will not persist any snapshots.`);
}

Expand Down Expand Up @@ -143,7 +143,7 @@ class SnapshotManager implements ISnapshotManager {
private deployL1ContractsArgs: Partial<DeployL1ContractsArgs> = { assumeProvenThrough: Number.MAX_SAFE_INTEGER },
) {
this.livePath = join(this.dataPath, 'live', testName);
this.logger = createLogger(`aztec:snapshot_manager:${testName}`);
this.logger = createLogger(`e2e:snapshot_manager:${testName}`);
}

public async snapshot<T>(
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/shared/jest_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ beforeEach(() => {
if (!testPath || !currentTestName) {
return;
}
const logger = createLogger(`aztec:${basename(testPath).replace('.test.ts', '')}`);
const logger = createLogger(`e2e:${basename(testPath).replace('.test.ts', '')}`);
logger.info(`Running test: ${currentTestName}`);
});
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/spartan/4epochs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const config = setupEnvironment(process.env);
describe('token transfer test', () => {
jest.setTimeout(10 * 60 * 4000); // 40 minutes

const logger = createLogger(`aztec:spartan:4epochs`);
const logger = createLogger(`e2e:spartan:4epochs`);
const l1Config = getL1ContractsConfigEnvVars();

// We want plenty of minted tokens for a lot of slots that fill up multiple epochs
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/spartan/transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const config = setupEnvironment(process.env);
describe('token transfer test', () => {
jest.setTimeout(10 * 60 * 2000); // 20 minutes

const logger = createLogger(`aztec:spartan-test:transfer`);
const logger = createLogger(`e2e:spartan-test:transfer`);
const MINT_AMOUNT = 20n;

const ROUNDS = 5n;
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/merkle-tree/src/tree_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export abstract class TreeBase<T extends Bufferable> implements MerkleTree<T> {
this.root = root ? root : current;
this.maxIndex = 2n ** BigInt(depth) - 1n;

this.log = createLogger(`aztec:merkle-tree:${name.toLowerCase()}`);
this.log = createLogger(`merkle-tree:${name.toLowerCase()}`);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class PXEService implements PXE {
config: PXEServiceConfig,
logSuffix?: string,
) {
this.log = createLogger(logSuffix ? `aztec:pxe_service_${logSuffix}` : `aztec:pxe_service`);
this.log = createLogger(logSuffix ? `pxe:service:${logSuffix}` : `pxe:service`);
this.synchronizer = new Synchronizer(node, db, tipsStore, config, logSuffix);
this.contractDataOracle = new ContractDataOracle(db);
this.simulator = getAcirSimulator(db, node, keyStore, this.contractDataOracle);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/synchronizer/synchronizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Synchronizer implements L2BlockStreamEventHandler {
config: Partial<Pick<PXEConfig, 'l2BlockPollingIntervalMS' | 'l2StartingBlock'>> = {},
logSuffix?: string,
) {
this.log = createLogger(logSuffix ? `aztec:pxe_synchronizer_${logSuffix}` : 'aztec:pxe_synchronizer');
this.log = createLogger(logSuffix ? `pxe:synchronizer:${logSuffix}` : 'pxe:synchronizer');
this.blockStream = this.createBlockStream(config);
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/simulator/src/avm/avm_simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class AvmSimulator {
context.machineState.gasLeft.l2Gas <= MAX_L2_GAS_PER_ENQUEUED_CALL,
`Cannot allocate more than ${MAX_L2_GAS_PER_ENQUEUED_CALL} to the AVM for execution of an enqueued call`,
);
this.log = createLogger(`aztec:avm_simulator:core(f:${context.environment.functionSelector.toString()})`);
this.log = createLogger(`simulator:avm:core(f:${context.environment.functionSelector.toString()})`);
// TODO(palla/log): Should tallies be printed on debug, or only on trace?
if (this.log.isLevelEnabled('debug')) {
this.tallyPrintFunction = this.printOpcodeTallies;
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/simulator/src/public/public_tx_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class PublicTxContext {
public readonly revertibleAccumulatedDataFromPrivate: PrivateToPublicAccumulatedData,
public trace: PublicEnqueuedCallSideEffectTrace, // FIXME(dbanks12): should be private
) {
this.log = createLogger(`aztec:public_tx_context`);
this.log = createLogger(`simulator:public_tx_context`);
this.gasUsed = startGasUsed;
}

Expand Down Expand Up @@ -379,7 +379,7 @@ class PhaseStateManager {
private currentlyActiveStateManager: AvmPersistableStateManager | undefined;

constructor(private readonly txStateManager: AvmPersistableStateManager) {
this.log = createLogger(`aztec:public_phase_state_manager`);
this.log = createLogger(`simulator:public_phase_state_manager`);
}

fork() {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/simulator/src/public/public_tx_simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class PublicTxSimulator {
private realAvmProvingRequests: boolean = true,
private doMerkleOperations: boolean = false,
) {
this.log = createLogger(`aztec:public_tx_simulator`);
this.log = createLogger(`simulator:public_tx_simulator`);
this.metrics = new ExecutorMetrics(telemetryClient, 'PublicTxSimulator');
}

Expand Down

0 comments on commit 93ce5cf

Please sign in to comment.