@aztec/sequencer-client 1.0.0-nightly.20250721 → 1.0.0-nightly.20250723

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.
@@ -1,2 +1,2 @@
1
- export { SequencerPublisher, VoteType } from './sequencer-publisher.js';
1
+ export { SequencerPublisher, SignalType } from './sequencer-publisher.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/publisher/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/publisher/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- export { SequencerPublisher, VoteType } from './sequencer-publisher.js';
1
+ export { SequencerPublisher, SignalType } from './sequencer-publisher.js';
@@ -1,5 +1,4 @@
1
1
  import type { L2Block } from '@aztec/aztec.js';
2
- import { Blob } from '@aztec/blob-lib';
3
2
  import { type BlobSinkClientInterface } from '@aztec/blob-sink/client';
4
3
  import type { EpochCache } from '@aztec/epoch-cache';
5
4
  import { FormattedViemError, type GasPrice, type GovernanceProposerContract, type L1BlobInputs, type L1ContractsConfig, type L1GasConfig, type L1TxRequest, RollupContract, type SlashingProposerContract, type TransactionStats } from '@aztec/ethereum';
@@ -11,12 +10,12 @@ import { type ProposedBlockHeader, TxHash } from '@aztec/stdlib/tx';
11
10
  import { type TelemetryClient } from '@aztec/telemetry-client';
12
11
  import { type TransactionReceipt } from 'viem';
13
12
  import type { PublisherConfig, TxSenderConfig } from './config.js';
14
- export declare enum VoteType {
13
+ export declare enum SignalType {
15
14
  GOVERNANCE = 0,
16
15
  SLASHING = 1
17
16
  }
18
17
  type GetSlashPayloadCallBack = (slotNumber: bigint) => Promise<EthAddress | undefined>;
19
- export type Action = 'propose' | 'governance-vote' | 'slashing-vote';
18
+ export type Action = 'propose' | 'governance-signal' | 'slashing-signal';
20
19
  interface RequestWithExpiry {
21
20
  action: Action;
22
21
  request: L1TxRequest;
@@ -42,7 +41,7 @@ export declare class SequencerPublisher {
42
41
  protected slashingLog: import("@aztec/foundation/log").Logger;
43
42
  protected slashingProposerAddress?: EthAddress;
44
43
  private getSlashPayload?;
45
- private myLastVotes;
44
+ private myLastSignals;
46
45
  protected log: import("@aztec/foundation/log").Logger;
47
46
  protected ethereumSlotDuration: bigint;
48
47
  private blobSinkClient;
@@ -126,16 +125,16 @@ export declare class SequencerPublisher {
126
125
  digest: Buffer;
127
126
  attestations: CommitteeAttestation[];
128
127
  }): Promise<bigint>;
129
- private enqueueCastVoteHelper;
130
- private getVoteConfig;
128
+ private enqueueCastSignalHelper;
129
+ private getSignalConfig;
131
130
  /**
132
- * Enqueues a castVote transaction to cast a vote for a given slot number.
133
- * @param slotNumber - The slot number to cast a vote for.
134
- * @param timestamp - The timestamp of the slot to cast a vote for.
135
- * @param voteType - The type of vote to cast.
136
- * @returns True if the vote was successfully enqueued, false otherwise.
131
+ * Enqueues a castSignal transaction to cast a signal for a given slot number.
132
+ * @param slotNumber - The slot number to cast a signal for.
133
+ * @param timestamp - The timestamp of the slot to cast a signal for.
134
+ * @param signalType - The type of signal to cast.
135
+ * @returns True if the signal was successfully enqueued, false otherwise.
137
136
  */
138
- enqueueCastVote(slotNumber: bigint, timestamp: bigint, voteType: VoteType, signerAddress: EthAddress, signer: (msg: `0x${string}`) => Promise<`0x${string}`>): Promise<boolean>;
137
+ enqueueCastSignal(slotNumber: bigint, timestamp: bigint, signalType: SignalType, signerAddress: EthAddress, signer: (msg: `0x${string}`) => Promise<`0x${string}`>): Promise<boolean>;
139
138
  /**
140
139
  * Proposes a L2 block on L1.
141
140
  *
@@ -163,15 +162,6 @@ export declare class SequencerPublisher {
163
162
  */
164
163
  private simulateProposeTx;
165
164
  private addProposeTx;
166
- /**
167
- * Send blobs to the blob sink
168
- *
169
- * If a blob sink url is configured, then we send blobs to the blob sink
170
- * - for now we use the blockHash as the identifier for the blobs;
171
- * In the future this will move to be the beacon block id - which takes a bit more work
172
- * to calculate and will need to be mocked in e2e tests
173
- */
174
- protected sendBlobsToBlobSink(blockHash: string, blobs: Blob[]): Promise<boolean>;
175
165
  }
176
166
  export {};
177
167
  //# sourceMappingURL=sequencer-publisher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sequencer-publisher.d.ts","sourceRoot":"","sources":["../../src/publisher/sequencer-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,0BAA0B,EAE/B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAGhB,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EAKtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAGjF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAS,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,KAAK,mBAAmB,EAAkB,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAGnF,OAAO,EAAE,KAAK,kBAAkB,EAA0D,MAAM,M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;OAKG;IACI,SAAS;IAKhB,wDAAwD;IACjD,OAAO;YAKA,gBAAgB;IAoD9B;;;;;OAKG;YACW,iBAAiB;YA6DjB,YAAY;CA6E3B"}
@@ -13,10 +13,10 @@ import { getTelemetryClient } from '@aztec/telemetry-client';
13
13
  import pick from 'lodash.pick';
14
14
  import { encodeFunctionData, getAbiItem, toEventSelector, toHex } from 'viem';
15
15
  import { SequencerPublisherMetrics } from './sequencer-publisher-metrics.js';
16
- export var VoteType = /*#__PURE__*/ function(VoteType) {
17
- VoteType[VoteType["GOVERNANCE"] = 0] = "GOVERNANCE";
18
- VoteType[VoteType["SLASHING"] = 1] = "SLASHING";
19
- return VoteType;
16
+ export var SignalType = /*#__PURE__*/ function(SignalType) {
17
+ SignalType[SignalType["GOVERNANCE"] = 0] = "GOVERNANCE";
18
+ SignalType[SignalType["SLASHING"] = 1] = "SLASHING";
19
+ return SignalType;
20
20
  }({});
21
21
  export class SequencerPublisher {
22
22
  config;
@@ -30,7 +30,7 @@ export class SequencerPublisher {
30
30
  slashingLog;
31
31
  slashingProposerAddress;
32
32
  getSlashPayload;
33
- myLastVotes;
33
+ myLastSignals;
34
34
  log;
35
35
  ethereumSlotDuration;
36
36
  blobSinkClient;
@@ -54,7 +54,7 @@ export class SequencerPublisher {
54
54
  this.governancePayload = EthAddress.ZERO;
55
55
  this.slashingLog = createLogger('sequencer:publisher:slashing');
56
56
  this.getSlashPayload = undefined;
57
- this.myLastVotes = {
57
+ this.myLastSignals = {
58
58
  [0]: 0n,
59
59
  [1]: 0n
60
60
  };
@@ -301,8 +301,8 @@ export class SequencerPublisher {
301
301
  await this.simulateProposeTx(args, ts);
302
302
  return ts;
303
303
  }
304
- async enqueueCastVoteHelper(slotNumber, timestamp, voteType, payload, base, signerAddress, signer) {
305
- if (this.myLastVotes[voteType] >= slotNumber) {
304
+ async enqueueCastSignalHelper(slotNumber, timestamp, signalType, payload, base, signerAddress, signer) {
305
+ if (this.myLastSignals[signalType] >= slotNumber) {
306
306
  return false;
307
307
  }
308
308
  if (payload.equals(EthAddress.ZERO)) {
@@ -310,13 +310,13 @@ export class SequencerPublisher {
310
310
  }
311
311
  const round = await base.computeRound(slotNumber);
312
312
  const roundInfo = await base.getRoundInfo(this.rollupContract.address, round);
313
- if (roundInfo.lastVote >= slotNumber) {
313
+ if (roundInfo.lastSignalSlot >= slotNumber) {
314
314
  return false;
315
315
  }
316
- const cachedLastVote = this.myLastVotes[voteType];
317
- this.myLastVotes[voteType] = slotNumber;
318
- const action = voteType === 0 ? 'governance-vote' : 'slashing-vote';
319
- const request = await base.createVoteRequestWithSignature(payload.toString(), round, this.config.l1ChainId, signerAddress.toString(), signer);
316
+ const cachedLastVote = this.myLastSignals[signalType];
317
+ this.myLastSignals[signalType] = slotNumber;
318
+ const action = signalType === 0 ? 'governance-signal' : 'slashing-signal';
319
+ const request = await base.createSignalRequestWithSignature(payload.toString(), round, this.config.l1ChainId, signerAddress.toString(), signer);
320
320
  this.log.debug(`Created ${action} request with signature`, {
321
321
  request,
322
322
  round,
@@ -344,7 +344,7 @@ export class SequencerPublisher {
344
344
  checkSuccess: (_request, result)=>{
345
345
  const success = result && result.receipt && result.receipt.status === 'success' && result.receipt.logs.find((log)=>log.topics[0] === toEventSelector(getAbiItem({
346
346
  abi: EmpireBaseAbi,
347
- name: 'VoteCast'
347
+ name: 'SignalCast'
348
348
  })));
349
349
  const logData = {
350
350
  ...result,
@@ -354,7 +354,7 @@ export class SequencerPublisher {
354
354
  };
355
355
  if (!success) {
356
356
  this.log.error(`Voting in [${action}] for ${payload} at slot ${slotNumber} in round ${round} failed`, logData);
357
- this.myLastVotes[voteType] = cachedLastVote;
357
+ this.myLastSignals[signalType] = cachedLastVote;
358
358
  return false;
359
359
  } else {
360
360
  this.log.info(`Voting in [${action}] for ${payload} at slot ${slotNumber} in round ${round} succeeded`, logData);
@@ -364,13 +364,13 @@ export class SequencerPublisher {
364
364
  });
365
365
  return true;
366
366
  }
367
- async getVoteConfig(slotNumber, voteType) {
368
- if (voteType === 0) {
367
+ async getSignalConfig(slotNumber, signalType) {
368
+ if (signalType === 0) {
369
369
  return {
370
370
  payload: this.governancePayload,
371
371
  base: this.govProposerContract
372
372
  };
373
- } else if (voteType === 1) {
373
+ } else if (signalType === 1) {
374
374
  if (!this.getSlashPayload) {
375
375
  return undefined;
376
376
  }
@@ -384,23 +384,23 @@ export class SequencerPublisher {
384
384
  base: this.slashingProposerContract
385
385
  };
386
386
  } else {
387
- const _ = voteType;
388
- throw new Error('Unreachable: Invalid vote type');
387
+ const _ = signalType;
388
+ throw new Error('Unreachable: Invalid signal type');
389
389
  }
390
390
  }
391
391
  /**
392
- * Enqueues a castVote transaction to cast a vote for a given slot number.
393
- * @param slotNumber - The slot number to cast a vote for.
394
- * @param timestamp - The timestamp of the slot to cast a vote for.
395
- * @param voteType - The type of vote to cast.
396
- * @returns True if the vote was successfully enqueued, false otherwise.
397
- */ async enqueueCastVote(slotNumber, timestamp, voteType, signerAddress, signer) {
398
- const voteConfig = await this.getVoteConfig(slotNumber, voteType);
399
- if (!voteConfig) {
392
+ * Enqueues a castSignal transaction to cast a signal for a given slot number.
393
+ * @param slotNumber - The slot number to cast a signal for.
394
+ * @param timestamp - The timestamp of the slot to cast a signal for.
395
+ * @param signalType - The type of signal to cast.
396
+ * @returns True if the signal was successfully enqueued, false otherwise.
397
+ */ async enqueueCastSignal(slotNumber, timestamp, signalType, signerAddress, signer) {
398
+ const signalConfig = await this.getSignalConfig(slotNumber, signalType);
399
+ if (!signalConfig) {
400
400
  return false;
401
401
  }
402
- const { payload, base } = voteConfig;
403
- return this.enqueueCastVoteHelper(slotNumber, timestamp, voteType, payload, base, signerAddress, signer);
402
+ const { payload, base } = signalConfig;
403
+ return this.enqueueCastSignalHelper(slotNumber, timestamp, signalType, payload, base, signerAddress, signer);
404
404
  }
405
405
  /**
406
406
  * Proposes a L2 block on L1.
@@ -556,6 +556,11 @@ export class SequencerPublisher {
556
556
  const { rollupData, simulationResult, blobEvaluationGas } = await this.prepareProposeTx(encodedData, timestamp);
557
557
  const startBlock = await this.l1TxUtils.getBlockNumber();
558
558
  const gasLimit = this.l1TxUtils.bumpGasLimit(BigInt(Math.ceil(Number(simulationResult.gasUsed) * 64 / 63)) + blobEvaluationGas + SequencerPublisher.MULTICALL_OVERHEAD_GAS_GUESS);
559
+ // Send the blobs to the blob sink preemptively. This helps in tests where the sequencer mistakingly thinks that the propose
560
+ // tx fails but it does get mined. We make sure that the blobs are sent to the blob sink regardless of the tx outcome.
561
+ void this.blobSinkClient.sendBlobsToBlobSink(encodedData.blobs).catch((_err)=>{
562
+ this.log.error('Failed to send blobs to blob sink');
563
+ });
559
564
  return this.addRequest({
560
565
  action: 'propose',
561
566
  request: {
@@ -601,10 +606,6 @@ export class SequencerPublisher {
601
606
  ...receipt
602
607
  });
603
608
  this.metrics.recordProcessBlockTx(timer.ms(), publishStats);
604
- // Send the blobs to the blob sink
605
- this.sendBlobsToBlobSink(receipt.blockHash, encodedData.blobs).catch((_err)=>{
606
- this.log.error('Failed to send blobs to blob sink');
607
- });
608
609
  return true;
609
610
  } else {
610
611
  this.metrics.recordFailedTx('process');
@@ -619,14 +620,4 @@ export class SequencerPublisher {
619
620
  }
620
621
  });
621
622
  }
622
- /**
623
- * Send blobs to the blob sink
624
- *
625
- * If a blob sink url is configured, then we send blobs to the blob sink
626
- * - for now we use the blockHash as the identifier for the blobs;
627
- * In the future this will move to be the beacon block id - which takes a bit more work
628
- * to calculate and will need to be mocked in e2e tests
629
- */ sendBlobsToBlobSink(blockHash, blobs) {
630
- return this.blobSinkClient.sendBlobsToBlobSink(blockHash, blobs);
631
- }
632
623
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sequencer.d.ts","sourceRoot":"","sources":["../../src/sequencer/sequencer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAK/C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO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AAO,CAAA;KAAE,GAAG,IAAI;IACrG,QAAQ,CACN,aAAa,EAAE,OAAO,CAAC,cAAc,EAAE,sBAAsB,CAAC,EAC9D,UAAU,CAAC,EAAE,SAAS,EACtB,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GACzB,IAAI;YAsBO,oBAAoB;IAUlC,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB;IAiBrE;;;;;;;;;;OAUG;YAIW,2BAA2B;cAsFzB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,EAAE,EAAE,EACT,eAAe,EAAE,UAAU,GAAG,SAAS,GACtC,OAAO,CAAC,oBAAoB,EAAE,GAAG,SAAS,CAAC;IA4E9C;;;OAGG;cAIa,qBAAqB,CACnC,KAAK,EAAE,OAAO,EACd,YAAY,CAAC,EAAE,oBAAoB,EAAE,EACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,OAAO,CAAC,IAAI,CAAC;IAiBhB;;;;OAIG;cACa,WAAW,IAAI,OAAO,CACpC;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CACvF;IAmDD,OAAO,CAAC,0BAA0B;IAQlC,OAAO,CAAC,kBAAkB;IAK1B,IAAI,iBAAiB,WAEpB;IAED,IAAI,QAAQ,IAAI,UAAU,CAMzB;IAED,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;IAEM,gBAAgB,IAAI,aAAa;CAGzC"}
@@ -23,7 +23,7 @@ import { ContentCommitment, ProposedBlockHeader, Tx } from '@aztec/stdlib/tx';
23
23
  import { AttestationTimeoutError } from '@aztec/stdlib/validators';
24
24
  import { Attributes, L1Metrics, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
25
25
  import EventEmitter from 'node:events';
26
- import { VoteType } from '../publisher/sequencer-publisher.js';
26
+ import { SignalType } from '../publisher/sequencer-publisher.js';
27
27
  import { SequencerMetrics } from './metrics.js';
28
28
  import { SequencerTimetable, SequencerTooSlowError } from './timetable.js';
29
29
  import { SequencerState, orderAttestations } from './utils.js';
@@ -295,8 +295,8 @@ export { SequencerState };
295
295
  validatorAddresses
296
296
  });
297
297
  const newGlobalVariables = await this.globalsBuilder.buildGlobalVariables(newBlockNumber, this.coinbase, this._feeRecipient, slot);
298
- const enqueueGovernanceVotePromise = this.publisher.enqueueCastVote(slot, newGlobalVariables.timestamp, VoteType.GOVERNANCE, proposerAddress, (msg)=>this.validatorClient.signWithAddress(proposerAddress, Buffer32.fromString(msg)).then((s)=>s.toString()));
299
- const enqueueSlashingVotePromise = this.publisher.enqueueCastVote(slot, newGlobalVariables.timestamp, VoteType.SLASHING, proposerAddress, (msg)=>this.validatorClient.signWithAddress(proposerAddress, Buffer32.fromString(msg)).then((s)=>s.toString()));
298
+ const enqueueGovernanceVotePromise = this.publisher.enqueueCastSignal(slot, newGlobalVariables.timestamp, SignalType.GOVERNANCE, proposerAddress, (msg)=>this.validatorClient.signWithAddress(proposerAddress, Buffer32.fromString(msg)).then((s)=>s.toString()));
299
+ const enqueueSlashingVotePromise = this.publisher.enqueueCastSignal(slot, newGlobalVariables.timestamp, SignalType.SLASHING, proposerAddress, (msg)=>this.validatorClient.signWithAddress(proposerAddress, Buffer32.fromString(msg)).then((s)=>s.toString()));
300
300
  this.setState(SequencerState.INITIALIZING_PROPOSAL, slot);
301
301
  this.log.verbose(`Preparing proposal for block ${newBlockNumber} at slot ${slot}`, {
302
302
  proposer: proposerInNextSlot?.toString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/sequencer-client",
3
- "version": "1.0.0-nightly.20250721",
3
+ "version": "1.0.0-nightly.20250723",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -26,37 +26,37 @@
26
26
  "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json"
27
27
  },
28
28
  "dependencies": {
29
- "@aztec/aztec.js": "1.0.0-nightly.20250721",
30
- "@aztec/bb-prover": "1.0.0-nightly.20250721",
31
- "@aztec/blob-lib": "1.0.0-nightly.20250721",
32
- "@aztec/blob-sink": "1.0.0-nightly.20250721",
33
- "@aztec/constants": "1.0.0-nightly.20250721",
34
- "@aztec/epoch-cache": "1.0.0-nightly.20250721",
35
- "@aztec/ethereum": "1.0.0-nightly.20250721",
36
- "@aztec/foundation": "1.0.0-nightly.20250721",
37
- "@aztec/l1-artifacts": "1.0.0-nightly.20250721",
38
- "@aztec/merkle-tree": "1.0.0-nightly.20250721",
39
- "@aztec/noir-acvm_js": "1.0.0-nightly.20250721",
40
- "@aztec/noir-contracts.js": "1.0.0-nightly.20250721",
41
- "@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250721",
42
- "@aztec/noir-types": "1.0.0-nightly.20250721",
43
- "@aztec/p2p": "1.0.0-nightly.20250721",
44
- "@aztec/protocol-contracts": "1.0.0-nightly.20250721",
45
- "@aztec/prover-client": "1.0.0-nightly.20250721",
46
- "@aztec/simulator": "1.0.0-nightly.20250721",
47
- "@aztec/slasher": "1.0.0-nightly.20250721",
48
- "@aztec/stdlib": "1.0.0-nightly.20250721",
49
- "@aztec/telemetry-client": "1.0.0-nightly.20250721",
50
- "@aztec/validator-client": "1.0.0-nightly.20250721",
51
- "@aztec/world-state": "1.0.0-nightly.20250721",
29
+ "@aztec/aztec.js": "1.0.0-nightly.20250723",
30
+ "@aztec/bb-prover": "1.0.0-nightly.20250723",
31
+ "@aztec/blob-lib": "1.0.0-nightly.20250723",
32
+ "@aztec/blob-sink": "1.0.0-nightly.20250723",
33
+ "@aztec/constants": "1.0.0-nightly.20250723",
34
+ "@aztec/epoch-cache": "1.0.0-nightly.20250723",
35
+ "@aztec/ethereum": "1.0.0-nightly.20250723",
36
+ "@aztec/foundation": "1.0.0-nightly.20250723",
37
+ "@aztec/l1-artifacts": "1.0.0-nightly.20250723",
38
+ "@aztec/merkle-tree": "1.0.0-nightly.20250723",
39
+ "@aztec/noir-acvm_js": "1.0.0-nightly.20250723",
40
+ "@aztec/noir-contracts.js": "1.0.0-nightly.20250723",
41
+ "@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250723",
42
+ "@aztec/noir-types": "1.0.0-nightly.20250723",
43
+ "@aztec/p2p": "1.0.0-nightly.20250723",
44
+ "@aztec/protocol-contracts": "1.0.0-nightly.20250723",
45
+ "@aztec/prover-client": "1.0.0-nightly.20250723",
46
+ "@aztec/simulator": "1.0.0-nightly.20250723",
47
+ "@aztec/slasher": "1.0.0-nightly.20250723",
48
+ "@aztec/stdlib": "1.0.0-nightly.20250723",
49
+ "@aztec/telemetry-client": "1.0.0-nightly.20250723",
50
+ "@aztec/validator-client": "1.0.0-nightly.20250723",
51
+ "@aztec/world-state": "1.0.0-nightly.20250723",
52
52
  "lodash.chunk": "^4.2.0",
53
53
  "lodash.pick": "^4.4.0",
54
54
  "tslib": "^2.4.0",
55
55
  "viem": "2.23.7"
56
56
  },
57
57
  "devDependencies": {
58
- "@aztec/archiver": "1.0.0-nightly.20250721",
59
- "@aztec/kv-store": "1.0.0-nightly.20250721",
58
+ "@aztec/archiver": "1.0.0-nightly.20250723",
59
+ "@aztec/kv-store": "1.0.0-nightly.20250723",
60
60
  "@jest/globals": "^30.0.0",
61
61
  "@types/jest": "^30.0.0",
62
62
  "@types/lodash.chunk": "^4.2.7",
@@ -1 +1 @@
1
- export { SequencerPublisher, VoteType } from './sequencer-publisher.js';
1
+ export { SequencerPublisher, SignalType } from './sequencer-publisher.js';
@@ -56,14 +56,14 @@ type L1ProcessArgs = {
56
56
  attestations?: CommitteeAttestation[];
57
57
  };
58
58
 
59
- export enum VoteType {
59
+ export enum SignalType {
60
60
  GOVERNANCE,
61
61
  SLASHING,
62
62
  }
63
63
 
64
64
  type GetSlashPayloadCallBack = (slotNumber: bigint) => Promise<EthAddress | undefined>;
65
65
 
66
- export type Action = 'propose' | 'governance-vote' | 'slashing-vote';
66
+ export type Action = 'propose' | 'governance-signal' | 'slashing-signal';
67
67
 
68
68
  interface RequestWithExpiry {
69
69
  action: Action;
@@ -91,9 +91,9 @@ export class SequencerPublisher {
91
91
  protected slashingProposerAddress?: EthAddress;
92
92
  private getSlashPayload?: GetSlashPayloadCallBack = undefined;
93
93
 
94
- private myLastVotes: Record<VoteType, bigint> = {
95
- [VoteType.GOVERNANCE]: 0n,
96
- [VoteType.SLASHING]: 0n,
94
+ private myLastSignals: Record<SignalType, bigint> = {
95
+ [SignalType.GOVERNANCE]: 0n,
96
+ [SignalType.SLASHING]: 0n,
97
97
  };
98
98
 
99
99
  protected log = createLogger('sequencer:publisher');
@@ -398,16 +398,16 @@ export class SequencerPublisher {
398
398
  return ts;
399
399
  }
400
400
 
401
- private async enqueueCastVoteHelper(
401
+ private async enqueueCastSignalHelper(
402
402
  slotNumber: bigint,
403
403
  timestamp: bigint,
404
- voteType: VoteType,
404
+ signalType: SignalType,
405
405
  payload: EthAddress,
406
406
  base: IEmpireBase,
407
407
  signerAddress: EthAddress,
408
408
  signer: (msg: `0x${string}`) => Promise<`0x${string}`>,
409
409
  ): Promise<boolean> {
410
- if (this.myLastVotes[voteType] >= slotNumber) {
410
+ if (this.myLastSignals[signalType] >= slotNumber) {
411
411
  return false;
412
412
  }
413
413
  if (payload.equals(EthAddress.ZERO)) {
@@ -416,16 +416,16 @@ export class SequencerPublisher {
416
416
  const round = await base.computeRound(slotNumber);
417
417
  const roundInfo = await base.getRoundInfo(this.rollupContract.address, round);
418
418
 
419
- if (roundInfo.lastVote >= slotNumber) {
419
+ if (roundInfo.lastSignalSlot >= slotNumber) {
420
420
  return false;
421
421
  }
422
422
 
423
- const cachedLastVote = this.myLastVotes[voteType];
424
- this.myLastVotes[voteType] = slotNumber;
423
+ const cachedLastVote = this.myLastSignals[signalType];
424
+ this.myLastSignals[signalType] = slotNumber;
425
425
 
426
- const action = voteType === VoteType.GOVERNANCE ? 'governance-vote' : 'slashing-vote';
426
+ const action = signalType === SignalType.GOVERNANCE ? 'governance-signal' : 'slashing-signal';
427
427
 
428
- const request = await base.createVoteRequestWithSignature(
428
+ const request = await base.createSignalRequestWithSignature(
429
429
  payload.toString(),
430
430
  round,
431
431
  this.config.l1ChainId,
@@ -458,7 +458,7 @@ export class SequencerPublisher {
458
458
  result.receipt &&
459
459
  result.receipt.status === 'success' &&
460
460
  result.receipt.logs.find(
461
- log => log.topics[0] === toEventSelector(getAbiItem({ abi: EmpireBaseAbi, name: 'VoteCast' })),
461
+ log => log.topics[0] === toEventSelector(getAbiItem({ abi: EmpireBaseAbi, name: 'SignalCast' })),
462
462
  );
463
463
 
464
464
  const logData = { ...result, slotNumber, round, payload: payload.toString() };
@@ -467,7 +467,7 @@ export class SequencerPublisher {
467
467
  `Voting in [${action}] for ${payload} at slot ${slotNumber} in round ${round} failed`,
468
468
  logData,
469
469
  );
470
- this.myLastVotes[voteType] = cachedLastVote;
470
+ this.myLastSignals[signalType] = cachedLastVote;
471
471
  return false;
472
472
  } else {
473
473
  this.log.info(
@@ -481,13 +481,13 @@ export class SequencerPublisher {
481
481
  return true;
482
482
  }
483
483
 
484
- private async getVoteConfig(
484
+ private async getSignalConfig(
485
485
  slotNumber: bigint,
486
- voteType: VoteType,
486
+ signalType: SignalType,
487
487
  ): Promise<{ payload: EthAddress; base: IEmpireBase } | undefined> {
488
- if (voteType === VoteType.GOVERNANCE) {
488
+ if (signalType === SignalType.GOVERNANCE) {
489
489
  return { payload: this.governancePayload, base: this.govProposerContract };
490
- } else if (voteType === VoteType.SLASHING) {
490
+ } else if (signalType === SignalType.SLASHING) {
491
491
  if (!this.getSlashPayload) {
492
492
  return undefined;
493
493
  }
@@ -498,31 +498,31 @@ export class SequencerPublisher {
498
498
  this.log.info(`Slash payload: ${slashPayload}`);
499
499
  return { payload: slashPayload, base: this.slashingProposerContract };
500
500
  } else {
501
- const _: never = voteType;
502
- throw new Error('Unreachable: Invalid vote type');
501
+ const _: never = signalType;
502
+ throw new Error('Unreachable: Invalid signal type');
503
503
  }
504
504
  }
505
505
 
506
506
  /**
507
- * Enqueues a castVote transaction to cast a vote for a given slot number.
508
- * @param slotNumber - The slot number to cast a vote for.
509
- * @param timestamp - The timestamp of the slot to cast a vote for.
510
- * @param voteType - The type of vote to cast.
511
- * @returns True if the vote was successfully enqueued, false otherwise.
507
+ * Enqueues a castSignal transaction to cast a signal for a given slot number.
508
+ * @param slotNumber - The slot number to cast a signal for.
509
+ * @param timestamp - The timestamp of the slot to cast a signal for.
510
+ * @param signalType - The type of signal to cast.
511
+ * @returns True if the signal was successfully enqueued, false otherwise.
512
512
  */
513
- public async enqueueCastVote(
513
+ public async enqueueCastSignal(
514
514
  slotNumber: bigint,
515
515
  timestamp: bigint,
516
- voteType: VoteType,
516
+ signalType: SignalType,
517
517
  signerAddress: EthAddress,
518
518
  signer: (msg: `0x${string}`) => Promise<`0x${string}`>,
519
519
  ): Promise<boolean> {
520
- const voteConfig = await this.getVoteConfig(slotNumber, voteType);
521
- if (!voteConfig) {
520
+ const signalConfig = await this.getSignalConfig(slotNumber, signalType);
521
+ if (!signalConfig) {
522
522
  return false;
523
523
  }
524
- const { payload, base } = voteConfig;
525
- return this.enqueueCastVoteHelper(slotNumber, timestamp, voteType, payload, base, signerAddress, signer);
524
+ const { payload, base } = signalConfig;
525
+ return this.enqueueCastSignalHelper(slotNumber, timestamp, signalType, payload, base, signerAddress, signer);
526
526
  }
527
527
 
528
528
  /**
@@ -729,6 +729,12 @@ export class SequencerPublisher {
729
729
  SequencerPublisher.MULTICALL_OVERHEAD_GAS_GUESS, // We issue the simulation against the rollup contract, so we need to account for the overhead of the multicall3
730
730
  );
731
731
 
732
+ // Send the blobs to the blob sink preemptively. This helps in tests where the sequencer mistakingly thinks that the propose
733
+ // tx fails but it does get mined. We make sure that the blobs are sent to the blob sink regardless of the tx outcome.
734
+ void this.blobSinkClient.sendBlobsToBlobSink(encodedData.blobs).catch(_err => {
735
+ this.log.error('Failed to send blobs to blob sink');
736
+ });
737
+
732
738
  return this.addRequest({
733
739
  action: 'propose',
734
740
  request: {
@@ -770,10 +776,6 @@ export class SequencerPublisher {
770
776
  this.log.info(`Published L2 block to L1 rollup contract`, { ...stats, ...block.getStats(), ...receipt });
771
777
  this.metrics.recordProcessBlockTx(timer.ms(), publishStats);
772
778
 
773
- // Send the blobs to the blob sink
774
- this.sendBlobsToBlobSink(receipt.blockHash, encodedData.blobs).catch(_err => {
775
- this.log.error('Failed to send blobs to blob sink');
776
- });
777
779
  return true;
778
780
  } else {
779
781
  this.metrics.recordFailedTx('process');
@@ -788,16 +790,4 @@ export class SequencerPublisher {
788
790
  },
789
791
  });
790
792
  }
791
-
792
- /**
793
- * Send blobs to the blob sink
794
- *
795
- * If a blob sink url is configured, then we send blobs to the blob sink
796
- * - for now we use the blockHash as the identifier for the blobs;
797
- * In the future this will move to be the beacon block id - which takes a bit more work
798
- * to calculate and will need to be mocked in e2e tests
799
- */
800
- protected sendBlobsToBlobSink(blockHash: string, blobs: Blob[]): Promise<boolean> {
801
- return this.blobSinkClient.sendBlobsToBlobSink(blockHash, blobs);
802
- }
803
793
  }
@@ -48,7 +48,7 @@ import type { ValidatorClient } from '@aztec/validator-client';
48
48
  import EventEmitter from 'node:events';
49
49
 
50
50
  import type { GlobalVariableBuilder } from '../global_variable_builder/global_builder.js';
51
- import { type Action, type SequencerPublisher, VoteType } from '../publisher/sequencer-publisher.js';
51
+ import { type Action, type SequencerPublisher, SignalType } from '../publisher/sequencer-publisher.js';
52
52
  import type { SequencerConfig } from './config.js';
53
53
  import { SequencerMetrics } from './metrics.js';
54
54
  import { SequencerTimetable, SequencerTooSlowError } from './timetable.js';
@@ -400,18 +400,18 @@ export class Sequencer extends (EventEmitter as new () => TypedEventEmitter<Sequ
400
400
  slot,
401
401
  );
402
402
 
403
- const enqueueGovernanceVotePromise = this.publisher.enqueueCastVote(
403
+ const enqueueGovernanceVotePromise = this.publisher.enqueueCastSignal(
404
404
  slot,
405
405
  newGlobalVariables.timestamp,
406
- VoteType.GOVERNANCE,
406
+ SignalType.GOVERNANCE,
407
407
  proposerAddress,
408
408
  msg => this.validatorClient!.signWithAddress(proposerAddress, Buffer32.fromString(msg)).then(s => s.toString()),
409
409
  );
410
410
 
411
- const enqueueSlashingVotePromise = this.publisher.enqueueCastVote(
411
+ const enqueueSlashingVotePromise = this.publisher.enqueueCastSignal(
412
412
  slot,
413
413
  newGlobalVariables.timestamp,
414
- VoteType.SLASHING,
414
+ SignalType.SLASHING,
415
415
  proposerAddress,
416
416
  msg => this.validatorClient!.signWithAddress(proposerAddress, Buffer32.fromString(msg)).then(s => s.toString()),
417
417
  );