@aztec/aztec-node 6.0.0-nightly.20260810 → 6.0.0-nightly.20260821

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.
package/src/factory.ts CHANGED
@@ -402,16 +402,22 @@ export async function createAztecNodeService(
402
402
  }
403
403
 
404
404
  if (collectOffenses) {
405
- dataWithholdingWatcher = new DataWithholdingWatcher(
406
- epochCache,
407
- archiver,
408
- p2pClient.getTxProvider(),
409
- p2pClient,
410
- reexecutionTracker,
411
- { chainId: config.l1ChainId, rollupAddress: config.rollupAddress },
412
- config,
413
- );
414
- watchers.push(dataWithholdingWatcher);
405
+ // The watcher's only evidence is the absence of gossiped txs in the local pool, so it cannot make a
406
+ // valid claim on a node that runs no p2p stack at all. Skipped entirely rather than gated at runtime.
407
+ if (config.p2pEnabled) {
408
+ dataWithholdingWatcher = new DataWithholdingWatcher(
409
+ epochCache,
410
+ archiver,
411
+ p2pClient.getTxProvider(),
412
+ p2pClient,
413
+ reexecutionTracker,
414
+ { chainId: config.l1ChainId, rollupAddress: config.rollupAddress },
415
+ config,
416
+ );
417
+ watchers.push(dataWithholdingWatcher);
418
+ } else {
419
+ log.verbose('Skipping data-withholding watcher since p2p is disabled');
420
+ }
415
421
 
416
422
  broadcastedInvalidCheckpointProposalWatcher = new BroadcastedInvalidCheckpointProposalWatcher(
417
423
  p2pClient,
@@ -1,5 +1,5 @@
1
1
  import { ARCHIVE_HEIGHT, type L1_TO_L2_MSG_TREE_HEIGHT, type NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
2
- import { BlockNumber, type CheckpointNumber, type EpochNumber } from '@aztec/foundation/branded-types';
2
+ import { BlockNumber, type EpochNumber } from '@aztec/foundation/branded-types';
3
3
  import { chunkBy } from '@aztec/foundation/collection';
4
4
  import { Fr } from '@aztec/foundation/curves/bn254';
5
5
  import { type Logger, createLogger } from '@aztec/foundation/log';
@@ -16,7 +16,7 @@ import {
16
16
  } from '@aztec/stdlib/block';
17
17
  import { computePublicDataTreeLeafSlot } from '@aztec/stdlib/hash';
18
18
  import type { WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
19
- import { InboxLeaf, type L1ToL2MessageSource, type L2ToL1MembershipWitness } from '@aztec/stdlib/messaging';
19
+ import type { L1ToL2MessageSource, L2ToL1MembershipWitness } from '@aztec/stdlib/messaging';
20
20
  import {
21
21
  MerkleTreeId,
22
22
  type NullifierLeafPreimage,
@@ -177,9 +177,8 @@ export class NodeWorldStateQueries {
177
177
  return [witness.index, witness.path];
178
178
  }
179
179
 
180
- public async getL1ToL2MessageCheckpoint(l1ToL2Message: Fr): Promise<CheckpointNumber | undefined> {
181
- const messageIndex = await this.l1ToL2MessageSource.getL1ToL2MessageIndex(l1ToL2Message);
182
- return messageIndex !== undefined ? InboxLeaf.checkpointNumberFromIndex(messageIndex) : undefined;
180
+ public getL1ToL2MessageIndex(l1ToL2Message: Fr): Promise<bigint | undefined> {
181
+ return this.l1ToL2MessageSource.getL1ToL2MessageIndex(l1ToL2Message);
183
182
  }
184
183
 
185
184
  /**