@aztec/sequencer-client 0.80.0 → 0.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,5 +67,6 @@ export declare class SequencerClient {
67
67
  get coinbase(): EthAddress;
68
68
  get feeRecipient(): AztecAddress;
69
69
  get forwarderAddress(): EthAddress;
70
+ get validatorAddress(): EthAddress | undefined;
70
71
  }
71
72
  //# sourceMappingURL=sequencer-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sequencer-client.d.ts","sourceRoot":"","sources":["../../src/client/sequencer-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAUhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,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mBAAmB,EAAE,mBAAmB,CAAC;QACzC,SAAS,EAAE,eAAe,CAAC;QAC3B,SAAS,CAAC,EAAE,kBAAkB,CAAC;QAC/B,cAAc,CAAC,EAAE,uBAAuB,CAAC;QACzC,YAAY,EAAE,YAAY,CAAC;QAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,SAAS,CAAC,EAAE,kBAAkB,CAAC;KAChC;IAiHH;;;OAGG;IACI,qBAAqB,CAAC,MAAM,EAAE,eAAe;IAIpD;;OAEG;IACU,IAAI;IAIjB,uGAAuG;IAChG,KAAK;IAIZ;;OAEG;IACI,OAAO;IAId,IAAI,QAAQ,IAAI,UAAU,CAEzB;IAED,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,IAAI,gBAAgB,IAAI,UAAU,CAEjC;IAED,IAAI,gBAAgB,IAAI,UAAU,GAAG,SAAS,CAE7C;CACF"}
@@ -114,4 +114,7 @@ import { Sequencer } from '../sequencer/index.js';
114
114
  get forwarderAddress() {
115
115
  return this.sequencer.getForwarderAddress();
116
116
  }
117
+ get validatorAddress() {
118
+ return this.sequencer.getValidatorAddress();
119
+ }
117
120
  }
@@ -70,6 +70,7 @@ export declare class Sequencer {
70
70
  constructor(publisher: SequencerPublisher, validatorClient: ValidatorClient | undefined, // During migration the validator client can be inactive
71
71
  globalsBuilder: GlobalVariableBuilder, p2pClient: P2P, worldState: WorldStateSynchronizer, slasherClient: SlasherClient, blockBuilderFactory: BlockBuilderFactory, l2BlockSource: L2BlockSource, l1ToL2MessageSource: L1ToL2MessageSource, publicProcessorFactory: PublicProcessorFactory, contractDataSource: ContractDataSource, l1Constants: SequencerRollupConstants, dateProvider: DateProvider, config?: SequencerConfig, telemetry?: TelemetryClient, log?: import("@aztec/aztec.js").Logger);
72
72
  get tracer(): Tracer;
73
+ getValidatorAddress(): EthAddress | undefined;
73
74
  /**
74
75
  * Updates sequencer config.
75
76
  * @param config - New parameters.
@@ -1 +1 @@
1
- {"version":3,"file":"sequencer.d.ts","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EzB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC;IA6CzG;;;OAGG;cAIa,qBAAqB,CACnC,KAAK,EAAE,OAAO,EACd,YAAY,CAAC,EAAE,SAAS,EAAE,EAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,OAAO,CAAC,IAAI,CAAC;IAiBhB;;;;OAIG;cACa,WAAW,IAAI,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,EAAE,CAAA;KAAE,GAAG,SAAS,CAAC;IAsDxF,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,kBAAkB;IAK1B,IAAI,iBAAiB,WAEpB;IAED,IAAI,QAAQ,IAAI,UAAU,CAEzB;IAED,IAAI,YAAY,IAAI,YAAY,CAE/B;CACF"}
@@ -102,6 +102,9 @@ export { SequencerState };
102
102
  get tracer() {
103
103
  return this.metrics.tracer;
104
104
  }
105
+ getValidatorAddress() {
106
+ return this.validatorClient?.getValidatorAddress();
107
+ }
105
108
  /**
106
109
  * Updates sequencer config.
107
110
  * @param config - New parameters.
@@ -342,13 +345,13 @@ export { SequencerState };
342
345
  await this.worldState.syncImmediate(blockNumber - 1);
343
346
  this.log.debug(`Synced to previous block ${blockNumber - 1}`);
344
347
  // NB: separating the dbs because both should update the state
345
- const publicProcessorFork = await this.worldState.fork();
346
- const orchestratorFork = await this.worldState.fork();
347
- const previousBlockHeader = (await this.l2BlockSource.getBlock(blockNumber - 1))?.header ?? orchestratorFork.getInitialHeader();
348
+ const publicProcessorDBFork = await this.worldState.fork();
349
+ const orchestratorDBFork = await this.worldState.fork();
350
+ const previousBlockHeader = (await this.l2BlockSource.getBlock(blockNumber - 1))?.header ?? orchestratorDBFork.getInitialHeader();
348
351
  try {
349
- const processor = this.publicProcessorFactory.create(publicProcessorFork, newGlobalVariables, true);
352
+ const processor = this.publicProcessorFactory.create(publicProcessorDBFork, newGlobalVariables, true);
350
353
  const blockBuildingTimer = new Timer();
351
- const blockBuilder = this.blockBuilderFactory.create(orchestratorFork);
354
+ const blockBuilder = this.blockBuilderFactory.create(orchestratorDBFork);
352
355
  await blockBuilder.startNewBlock(newGlobalVariables, l1ToL2Messages, previousBlockHeader);
353
356
  // Deadline for processing depends on whether we're proposing a block
354
357
  const secondsIntoSlot = this.getSecondsIntoSlot(slot);
@@ -361,7 +364,7 @@ export { SequencerState };
361
364
  now: new Date(this.dateProvider.now()),
362
365
  deadline
363
366
  });
364
- const validators = createValidatorsForBlockBuilding(publicProcessorFork, this.contractDataSource, newGlobalVariables, this.allowedInSetup);
367
+ const validators = createValidatorsForBlockBuilding(publicProcessorDBFork, this.contractDataSource, newGlobalVariables, this.allowedInSetup);
365
368
  // TODO(#11000): Public processor should just handle processing, one tx at a time. It should be responsibility
366
369
  // of the sequencer to update world state and iterate over txs. We should refactor this along with unifying the
367
370
  // publicProcessorFork and orchestratorFork, to avoid doing tree insertions twice when building the block.
@@ -418,8 +421,8 @@ export { SequencerState };
418
421
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
419
422
  setTimeout(async ()=>{
420
423
  try {
421
- await publicProcessorFork.close();
422
- await orchestratorFork.close();
424
+ await publicProcessorDBFork.close();
425
+ await orchestratorDBFork.close();
423
426
  } catch (err) {
424
427
  // This can happen if the sequencer is stopped before we hit this timeout.
425
428
  this.log.warn(`Error closing forks for block processing`, err);
@@ -4,8 +4,9 @@ import { type PublicExecutionRequest, Tx, type TxValidationResult, type TxValida
4
4
  export declare class PhasesTxValidator implements TxValidator<Tx> {
5
5
  #private;
6
6
  private setupAllowList;
7
- private contractDataSource;
8
- constructor(contracts: ContractDataSource, setupAllowList: AllowedElement[]);
7
+ private blockNumber;
8
+ private contractsDB;
9
+ constructor(contracts: ContractDataSource, setupAllowList: AllowedElement[], blockNumber: number);
9
10
  validateTx(tx: Tx): Promise<TxValidationResult>;
10
11
  isOnAllowList(publicCall: PublicExecutionRequest, allowList: AllowedElement[]): Promise<boolean>;
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"phases_validator.d.ts","sourceRoot":"","sources":["../../src/tx_validator/phases_validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACL,KAAK,sBAAsB,EAC3B,EAAE,EAEF,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAE1B,qBAAa,iBAAkB,YAAW,WAAW,CAAC,EAAE,CAAC;;IAIZ,OAAO,CAAC,cAAc;IAFjE,OAAO,CAAC,kBAAkB,CAA8B;gBAE5C,SAAS,EAAE,kBAAkB,EAAU,cAAc,EAAE,cAAc,EAAE;IAI7E,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgC/C,aAAa,CAAC,UAAU,EAAE,sBAAsB,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CA6CvG"}
1
+ {"version":3,"file":"phases_validator.d.ts","sourceRoot":"","sources":["../../src/tx_validator/phases_validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACL,KAAK,sBAAsB,EAC3B,EAAE,EAEF,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAE1B,qBAAa,iBAAkB,YAAW,WAAW,CAAC,EAAE,CAAC;;IAIZ,OAAO,CAAC,cAAc;IAAoB,OAAO,CAAC,WAAW;IAFxG,OAAO,CAAC,WAAW,CAAoB;gBAE3B,SAAS,EAAE,kBAAkB,EAAU,cAAc,EAAE,cAAc,EAAE,EAAU,WAAW,EAAE,MAAM;IAI1G,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAkC/C,aAAa,CAAC,UAAU,EAAE,sBAAsB,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CA6CvG"}
@@ -1,23 +1,25 @@
1
1
  import { createLogger } from '@aztec/foundation/log';
2
- import { ContractsDataSourcePublicDB, getExecutionRequestsByPhase } from '@aztec/simulator/server';
2
+ import { PublicContractsDB, getExecutionRequestsByPhase } from '@aztec/simulator/server';
3
3
  import { Tx, TxExecutionPhase } from '@aztec/stdlib/tx';
4
4
  export class PhasesTxValidator {
5
5
  setupAllowList;
6
+ blockNumber;
6
7
  #log;
7
- contractDataSource;
8
- constructor(contracts, setupAllowList){
8
+ contractsDB;
9
+ constructor(contracts, setupAllowList, blockNumber){
9
10
  this.setupAllowList = setupAllowList;
11
+ this.blockNumber = blockNumber;
10
12
  this.#log = createLogger('sequencer:tx_validator:tx_phases');
11
- this.contractDataSource = new ContractsDataSourcePublicDB(contracts);
13
+ this.contractsDB = new PublicContractsDB(contracts);
12
14
  }
13
15
  async validateTx(tx) {
14
16
  try {
15
17
  // TODO(@spalladino): We add this just to handle public authwit-check calls during setup
16
18
  // which are needed for public FPC flows, but fail if the account contract hasnt been deployed yet,
17
19
  // which is what we're trying to do as part of the current txs.
18
- await this.contractDataSource.addNewContracts(tx);
20
+ await this.contractsDB.addNewContracts(tx);
19
21
  if (!tx.data.forPublic) {
20
- this.#log.debug(`Tx ${Tx.getHash(tx)} does not contain enqueued public functions. Skipping phases validation.`);
22
+ this.#log.debug(`Tx ${await Tx.getHash(tx)} does not contain enqueued public functions. Skipping phases validation.`);
21
23
  return {
22
24
  result: 'valid'
23
25
  };
@@ -25,7 +27,7 @@ export class PhasesTxValidator {
25
27
  const setupFns = getExecutionRequestsByPhase(tx, TxExecutionPhase.SETUP);
26
28
  for (const setupFn of setupFns){
27
29
  if (!await this.isOnAllowList(setupFn, this.setupAllowList)) {
28
- this.#log.warn(`Rejecting tx ${Tx.getHash(tx)} because it calls setup function not on allow list: ${setupFn.callContext.contractAddress}:${setupFn.callContext.functionSelector}`, {
30
+ this.#log.warn(`Rejecting tx ${await Tx.getHash(tx)} because it calls setup function not on allow list: ${setupFn.callContext.contractAddress}:${setupFn.callContext.functionSelector}`, {
29
31
  allowList: this.setupAllowList
30
32
  });
31
33
  return {
@@ -40,7 +42,7 @@ export class PhasesTxValidator {
40
42
  result: 'valid'
41
43
  };
42
44
  } finally{
43
- this.contractDataSource.clearContractsForTx();
45
+ this.contractsDB.clearContractsForTx();
44
46
  }
45
47
  }
46
48
  async isOnAllowList(publicCall, allowList) {
@@ -60,7 +62,7 @@ export class PhasesTxValidator {
60
62
  return true;
61
63
  }
62
64
  }
63
- const contractClass = await this.contractDataSource.getContractInstance(contractAddress);
65
+ const contractClass = await this.contractsDB.getContractInstance(contractAddress, this.blockNumber);
64
66
  if (!contractClass) {
65
67
  throw new Error(`Contract not found: ${contractAddress}`);
66
68
  }
@@ -11,7 +11,7 @@ export function createValidatorForAcceptingTxs(db, contractDataSource, verifier,
11
11
  new DataTxValidator(),
12
12
  new MetadataTxValidator(new Fr(l1ChainId), new Fr(blockNumber)),
13
13
  new DoubleSpendTxValidator(new NullifierCache(db)),
14
- new PhasesTxValidator(contractDataSource, setupAllowList),
14
+ new PhasesTxValidator(contractDataSource, setupAllowList, blockNumber),
15
15
  new BlockHeaderTxValidator(new ArchiveCache(db))
16
16
  ];
17
17
  if (!skipFeeEnforcement) {
@@ -43,7 +43,7 @@ class DatabasePublicStateSource {
43
43
  }
44
44
  function preprocessValidator(nullifierCache, archiveCache, publicStateSource, contractDataSource, globalVariables, setupAllowList) {
45
45
  // We don't include the TxProofValidator nor the DataTxValidator here because they are already checked by the time we get to block building.
46
- return new AggregateTxValidator(new MetadataTxValidator(globalVariables.chainId, globalVariables.blockNumber), new DoubleSpendTxValidator(nullifierCache), new PhasesTxValidator(contractDataSource, setupAllowList), new GasTxValidator(publicStateSource, ProtocolContractAddress.FeeJuice, globalVariables.gasFees), new BlockHeaderTxValidator(archiveCache));
46
+ return new AggregateTxValidator(new MetadataTxValidator(globalVariables.chainId, globalVariables.blockNumber), new DoubleSpendTxValidator(nullifierCache), new PhasesTxValidator(contractDataSource, setupAllowList, globalVariables.blockNumber.toNumber()), new GasTxValidator(publicStateSource, ProtocolContractAddress.FeeJuice, globalVariables.gasFees), new BlockHeaderTxValidator(archiveCache));
47
47
  }
48
48
  function postprocessValidator(nullifierCache) {
49
49
  return new DoubleSpendTxValidator(nullifierCache);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/sequencer-client",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -28,36 +28,36 @@
28
28
  "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json"
29
29
  },
30
30
  "dependencies": {
31
- "@aztec/aztec.js": "0.80.0",
32
- "@aztec/bb-prover": "0.80.0",
33
- "@aztec/blob-lib": "0.80.0",
34
- "@aztec/blob-sink": "0.80.0",
35
- "@aztec/constants": "0.80.0",
36
- "@aztec/epoch-cache": "0.80.0",
37
- "@aztec/ethereum": "0.80.0",
38
- "@aztec/foundation": "0.80.0",
39
- "@aztec/l1-artifacts": "0.80.0",
40
- "@aztec/merkle-tree": "0.80.0",
41
- "@aztec/noir-acvm_js": "0.80.0",
42
- "@aztec/noir-contracts.js": "0.80.0",
43
- "@aztec/noir-protocol-circuits-types": "0.80.0",
44
- "@aztec/noir-types": "0.80.0",
45
- "@aztec/p2p": "0.80.0",
46
- "@aztec/protocol-contracts": "0.80.0",
47
- "@aztec/prover-client": "0.80.0",
48
- "@aztec/simulator": "0.80.0",
49
- "@aztec/stdlib": "0.80.0",
50
- "@aztec/telemetry-client": "0.80.0",
51
- "@aztec/validator-client": "0.80.0",
52
- "@aztec/world-state": "0.80.0",
31
+ "@aztec/aztec.js": "0.81.0",
32
+ "@aztec/bb-prover": "0.81.0",
33
+ "@aztec/blob-lib": "0.81.0",
34
+ "@aztec/blob-sink": "0.81.0",
35
+ "@aztec/constants": "0.81.0",
36
+ "@aztec/epoch-cache": "0.81.0",
37
+ "@aztec/ethereum": "0.81.0",
38
+ "@aztec/foundation": "0.81.0",
39
+ "@aztec/l1-artifacts": "0.81.0",
40
+ "@aztec/merkle-tree": "0.81.0",
41
+ "@aztec/noir-acvm_js": "0.81.0",
42
+ "@aztec/noir-contracts.js": "0.81.0",
43
+ "@aztec/noir-protocol-circuits-types": "0.81.0",
44
+ "@aztec/noir-types": "0.81.0",
45
+ "@aztec/p2p": "0.81.0",
46
+ "@aztec/protocol-contracts": "0.81.0",
47
+ "@aztec/prover-client": "0.81.0",
48
+ "@aztec/simulator": "0.81.0",
49
+ "@aztec/stdlib": "0.81.0",
50
+ "@aztec/telemetry-client": "0.81.0",
51
+ "@aztec/validator-client": "0.81.0",
52
+ "@aztec/world-state": "0.81.0",
53
53
  "lodash.chunk": "^4.2.0",
54
54
  "lodash.pick": "^4.4.0",
55
55
  "tslib": "^2.4.0",
56
56
  "viem": "2.23.7"
57
57
  },
58
58
  "devDependencies": {
59
- "@aztec/archiver": "0.80.0",
60
- "@aztec/kv-store": "0.80.0",
59
+ "@aztec/archiver": "0.81.0",
60
+ "@aztec/kv-store": "0.81.0",
61
61
  "@jest/globals": "^29.5.0",
62
62
  "@types/jest": "^29.5.0",
63
63
  "@types/levelup": "^5.1.2",
@@ -216,4 +216,8 @@ export class SequencerClient {
216
216
  get forwarderAddress(): EthAddress {
217
217
  return this.sequencer.getForwarderAddress();
218
218
  }
219
+
220
+ get validatorAddress(): EthAddress | undefined {
221
+ return this.sequencer.getValidatorAddress();
222
+ }
219
223
  }
@@ -111,6 +111,10 @@ export class Sequencer {
111
111
  return this.metrics.tracer;
112
112
  }
113
113
 
114
+ public getValidatorAddress() {
115
+ return this.validatorClient?.getValidatorAddress();
116
+ }
117
+
114
118
  /**
115
119
  * Updates sequencer config.
116
120
  * @param config - New parameters.
@@ -418,16 +422,16 @@ export class Sequencer {
418
422
  this.log.debug(`Synced to previous block ${blockNumber - 1}`);
419
423
 
420
424
  // NB: separating the dbs because both should update the state
421
- const publicProcessorFork = await this.worldState.fork();
422
- const orchestratorFork = await this.worldState.fork();
425
+ const publicProcessorDBFork = await this.worldState.fork();
426
+ const orchestratorDBFork = await this.worldState.fork();
423
427
 
424
428
  const previousBlockHeader =
425
- (await this.l2BlockSource.getBlock(blockNumber - 1))?.header ?? orchestratorFork.getInitialHeader();
429
+ (await this.l2BlockSource.getBlock(blockNumber - 1))?.header ?? orchestratorDBFork.getInitialHeader();
426
430
 
427
431
  try {
428
- const processor = this.publicProcessorFactory.create(publicProcessorFork, newGlobalVariables, true);
432
+ const processor = this.publicProcessorFactory.create(publicProcessorDBFork, newGlobalVariables, true);
429
433
  const blockBuildingTimer = new Timer();
430
- const blockBuilder = this.blockBuilderFactory.create(orchestratorFork);
434
+ const blockBuilder = this.blockBuilderFactory.create(orchestratorDBFork);
431
435
  await blockBuilder.startNewBlock(newGlobalVariables, l1ToL2Messages, previousBlockHeader);
432
436
 
433
437
  // Deadline for processing depends on whether we're proposing a block
@@ -449,7 +453,7 @@ export class Sequencer {
449
453
  });
450
454
 
451
455
  const validators = createValidatorsForBlockBuilding(
452
- publicProcessorFork,
456
+ publicProcessorDBFork,
453
457
  this.contractDataSource,
454
458
  newGlobalVariables,
455
459
  this.allowedInSetup,
@@ -516,8 +520,8 @@ export class Sequencer {
516
520
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
517
521
  setTimeout(async () => {
518
522
  try {
519
- await publicProcessorFork.close();
520
- await orchestratorFork.close();
523
+ await publicProcessorDBFork.close();
524
+ await orchestratorDBFork.close();
521
525
  } catch (err) {
522
526
  // This can happen if the sequencer is stopped before we hit this timeout.
523
527
  this.log.warn(`Error closing forks for block processing`, err);
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from '@aztec/foundation/log';
2
- import { ContractsDataSourcePublicDB, getExecutionRequestsByPhase } from '@aztec/simulator/server';
2
+ import { PublicContractsDB, getExecutionRequestsByPhase } from '@aztec/simulator/server';
3
3
  import type { ContractDataSource } from '@aztec/stdlib/contract';
4
4
  import type { AllowedElement } from '@aztec/stdlib/interfaces/server';
5
5
  import {
@@ -12,10 +12,10 @@ import {
12
12
 
13
13
  export class PhasesTxValidator implements TxValidator<Tx> {
14
14
  #log = createLogger('sequencer:tx_validator:tx_phases');
15
- private contractDataSource: ContractsDataSourcePublicDB;
15
+ private contractsDB: PublicContractsDB;
16
16
 
17
- constructor(contracts: ContractDataSource, private setupAllowList: AllowedElement[]) {
18
- this.contractDataSource = new ContractsDataSourcePublicDB(contracts);
17
+ constructor(contracts: ContractDataSource, private setupAllowList: AllowedElement[], private blockNumber: number) {
18
+ this.contractsDB = new PublicContractsDB(contracts);
19
19
  }
20
20
 
21
21
  async validateTx(tx: Tx): Promise<TxValidationResult> {
@@ -23,10 +23,12 @@ export class PhasesTxValidator implements TxValidator<Tx> {
23
23
  // TODO(@spalladino): We add this just to handle public authwit-check calls during setup
24
24
  // which are needed for public FPC flows, but fail if the account contract hasnt been deployed yet,
25
25
  // which is what we're trying to do as part of the current txs.
26
- await this.contractDataSource.addNewContracts(tx);
26
+ await this.contractsDB.addNewContracts(tx);
27
27
 
28
28
  if (!tx.data.forPublic) {
29
- this.#log.debug(`Tx ${Tx.getHash(tx)} does not contain enqueued public functions. Skipping phases validation.`);
29
+ this.#log.debug(
30
+ `Tx ${await Tx.getHash(tx)} does not contain enqueued public functions. Skipping phases validation.`,
31
+ );
30
32
  return { result: 'valid' };
31
33
  }
32
34
 
@@ -34,7 +36,7 @@ export class PhasesTxValidator implements TxValidator<Tx> {
34
36
  for (const setupFn of setupFns) {
35
37
  if (!(await this.isOnAllowList(setupFn, this.setupAllowList))) {
36
38
  this.#log.warn(
37
- `Rejecting tx ${Tx.getHash(tx)} because it calls setup function not on allow list: ${
39
+ `Rejecting tx ${await Tx.getHash(tx)} because it calls setup function not on allow list: ${
38
40
  setupFn.callContext.contractAddress
39
41
  }:${setupFn.callContext.functionSelector}`,
40
42
  { allowList: this.setupAllowList },
@@ -46,7 +48,7 @@ export class PhasesTxValidator implements TxValidator<Tx> {
46
48
 
47
49
  return { result: 'valid' };
48
50
  } finally {
49
- this.contractDataSource.clearContractsForTx();
51
+ this.contractsDB.clearContractsForTx();
50
52
  }
51
53
  }
52
54
 
@@ -71,7 +73,7 @@ export class PhasesTxValidator implements TxValidator<Tx> {
71
73
  }
72
74
  }
73
75
 
74
- const contractClass = await this.contractDataSource.getContractInstance(contractAddress);
76
+ const contractClass = await this.contractsDB.getContractInstance(contractAddress, this.blockNumber);
75
77
 
76
78
  if (!contractClass) {
77
79
  throw new Error(`Contract not found: ${contractAddress}`);
@@ -46,7 +46,7 @@ export function createValidatorForAcceptingTxs(
46
46
  new DataTxValidator(),
47
47
  new MetadataTxValidator(new Fr(l1ChainId), new Fr(blockNumber)),
48
48
  new DoubleSpendTxValidator(new NullifierCache(db)),
49
- new PhasesTxValidator(contractDataSource, setupAllowList),
49
+ new PhasesTxValidator(contractDataSource, setupAllowList, blockNumber),
50
50
  new BlockHeaderTxValidator(new ArchiveCache(db)),
51
51
  ];
52
52
 
@@ -109,7 +109,7 @@ function preprocessValidator(
109
109
  return new AggregateTxValidator(
110
110
  new MetadataTxValidator(globalVariables.chainId, globalVariables.blockNumber),
111
111
  new DoubleSpendTxValidator(nullifierCache),
112
- new PhasesTxValidator(contractDataSource, setupAllowList),
112
+ new PhasesTxValidator(contractDataSource, setupAllowList, globalVariables.blockNumber.toNumber()),
113
113
  new GasTxValidator(publicStateSource, ProtocolContractAddress.FeeJuice, globalVariables.gasFees),
114
114
  new BlockHeaderTxValidator(archiveCache),
115
115
  );