@aztec/stdlib 4.0.0-nightly.20260112 → 4.0.0-nightly.20260113

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.
Files changed (143) hide show
  1. package/dest/block/attestation_info.d.ts +5 -5
  2. package/dest/block/attestation_info.d.ts.map +1 -1
  3. package/dest/block/attestation_info.js +4 -4
  4. package/dest/block/l2_block.d.ts +6 -3
  5. package/dest/block/l2_block.d.ts.map +1 -1
  6. package/dest/block/l2_block.js +2 -2
  7. package/dest/block/l2_block_new.d.ts +1 -2
  8. package/dest/block/l2_block_new.d.ts.map +1 -1
  9. package/dest/block/l2_block_new.js +4 -1
  10. package/dest/block/l2_block_source.d.ts +245 -41
  11. package/dest/block/l2_block_source.d.ts.map +1 -1
  12. package/dest/block/l2_block_source.js +23 -5
  13. package/dest/block/l2_block_stream/index.d.ts +2 -1
  14. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  15. package/dest/block/l2_block_stream/index.js +1 -0
  16. package/dest/block/l2_block_stream/interfaces.d.ts +16 -5
  17. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  18. package/dest/block/l2_block_stream/l2_block_stream.d.ts +4 -2
  19. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  20. package/dest/block/l2_block_stream/l2_block_stream.js +102 -30
  21. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -16
  22. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  23. package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -61
  24. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
  25. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
  26. package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
  27. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  28. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  29. package/dest/block/test/l2_tips_store_test_suite.js +483 -38
  30. package/dest/block/validate_block_result.d.ts +24 -24
  31. package/dest/block/validate_block_result.d.ts.map +1 -1
  32. package/dest/block/validate_block_result.js +13 -13
  33. package/dest/checkpoint/checkpoint.d.ts +1 -1
  34. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  35. package/dest/checkpoint/checkpoint.js +1 -0
  36. package/dest/checkpoint/checkpoint_info.d.ts +32 -3
  37. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  38. package/dest/checkpoint/checkpoint_info.js +34 -1
  39. package/dest/checkpoint/index.d.ts +2 -1
  40. package/dest/checkpoint/index.d.ts.map +1 -1
  41. package/dest/checkpoint/index.js +1 -0
  42. package/dest/interfaces/api_limit.d.ts +2 -1
  43. package/dest/interfaces/api_limit.d.ts.map +1 -1
  44. package/dest/interfaces/api_limit.js +1 -0
  45. package/dest/interfaces/archiver.d.ts +6 -6
  46. package/dest/interfaces/archiver.d.ts.map +1 -1
  47. package/dest/interfaces/archiver.js +6 -4
  48. package/dest/interfaces/aztec-node-admin.d.ts +12 -6
  49. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  50. package/dest/interfaces/aztec-node-admin.js +2 -2
  51. package/dest/interfaces/aztec-node.d.ts +2 -2
  52. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  53. package/dest/interfaces/aztec-node.js +8 -3
  54. package/dest/interfaces/configs.d.ts +6 -1
  55. package/dest/interfaces/configs.d.ts.map +1 -1
  56. package/dest/interfaces/configs.js +2 -1
  57. package/dest/interfaces/p2p.d.ts +7 -9
  58. package/dest/interfaces/p2p.d.ts.map +1 -1
  59. package/dest/interfaces/p2p.js +3 -4
  60. package/dest/interfaces/proving-job.d.ts +166 -166
  61. package/dest/interfaces/validator.d.ts +41 -7
  62. package/dest/interfaces/validator.d.ts.map +1 -1
  63. package/dest/interfaces/validator.js +3 -1
  64. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +6 -5
  65. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  66. package/dest/kernel/hints/build_note_hash_read_request_hints.js +5 -6
  67. package/dest/p2p/attestation_utils.d.ts +3 -3
  68. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  69. package/dest/p2p/attestation_utils.js +1 -1
  70. package/dest/p2p/block_proposal.d.ts +85 -21
  71. package/dest/p2p/block_proposal.d.ts.map +1 -1
  72. package/dest/p2p/block_proposal.js +120 -37
  73. package/dest/p2p/checkpoint_attestation.d.ts +77 -0
  74. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
  75. package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +22 -19
  76. package/dest/p2p/checkpoint_proposal.d.ts +154 -0
  77. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
  78. package/dest/p2p/checkpoint_proposal.js +217 -0
  79. package/dest/p2p/consensus_payload.d.ts +4 -2
  80. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  81. package/dest/p2p/consensus_payload.js +3 -2
  82. package/dest/p2p/index.d.ts +4 -2
  83. package/dest/p2p/index.d.ts.map +1 -1
  84. package/dest/p2p/index.js +3 -1
  85. package/dest/p2p/signature_utils.d.ts +5 -3
  86. package/dest/p2p/signature_utils.d.ts.map +1 -1
  87. package/dest/p2p/signature_utils.js +3 -1
  88. package/dest/p2p/signed_txs.d.ts +40 -0
  89. package/dest/p2p/signed_txs.d.ts.map +1 -0
  90. package/dest/p2p/signed_txs.js +70 -0
  91. package/dest/p2p/topic_type.d.ts +3 -2
  92. package/dest/p2p/topic_type.d.ts.map +1 -1
  93. package/dest/p2p/topic_type.js +8 -2
  94. package/dest/rollup/checkpoint_header.d.ts +5 -1
  95. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  96. package/dest/rollup/checkpoint_header.js +4 -0
  97. package/dest/tests/factories.d.ts +13 -1
  98. package/dest/tests/factories.d.ts.map +1 -1
  99. package/dest/tests/factories.js +50 -1
  100. package/dest/tests/mocks.d.ts +55 -9
  101. package/dest/tests/mocks.d.ts.map +1 -1
  102. package/dest/tests/mocks.js +84 -35
  103. package/dest/tx/private_execution_result.d.ts +1 -5
  104. package/dest/tx/private_execution_result.d.ts.map +1 -1
  105. package/dest/tx/private_execution_result.js +3 -20
  106. package/package.json +8 -8
  107. package/src/block/attestation_info.ts +9 -6
  108. package/src/block/l2_block.ts +3 -3
  109. package/src/block/l2_block_new.ts +5 -1
  110. package/src/block/l2_block_source.ts +66 -16
  111. package/src/block/l2_block_stream/index.ts +1 -0
  112. package/src/block/l2_block_stream/interfaces.ts +16 -4
  113. package/src/block/l2_block_stream/l2_block_stream.ts +121 -38
  114. package/src/block/l2_block_stream/l2_tips_memory_store.ts +62 -56
  115. package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
  116. package/src/block/test/l2_tips_store_test_suite.ts +485 -36
  117. package/src/block/validate_block_result.ts +35 -31
  118. package/src/checkpoint/checkpoint.ts +1 -0
  119. package/src/checkpoint/checkpoint_info.ts +45 -2
  120. package/src/checkpoint/index.ts +1 -0
  121. package/src/interfaces/api_limit.ts +1 -0
  122. package/src/interfaces/archiver.ts +14 -6
  123. package/src/interfaces/aztec-node-admin.ts +5 -2
  124. package/src/interfaces/aztec-node.ts +30 -3
  125. package/src/interfaces/configs.ts +5 -0
  126. package/src/interfaces/p2p.ts +8 -12
  127. package/src/interfaces/validator.ts +57 -7
  128. package/src/kernel/hints/build_note_hash_read_request_hints.ts +5 -8
  129. package/src/p2p/attestation_utils.ts +3 -3
  130. package/src/p2p/block_proposal.ts +185 -41
  131. package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +31 -25
  132. package/src/p2p/checkpoint_proposal.ts +337 -0
  133. package/src/p2p/consensus_payload.ts +5 -2
  134. package/src/p2p/index.ts +3 -1
  135. package/src/p2p/signature_utils.ts +3 -1
  136. package/src/p2p/signed_txs.ts +83 -0
  137. package/src/p2p/topic_type.ts +3 -2
  138. package/src/rollup/checkpoint_header.ts +13 -0
  139. package/src/tests/factories.ts +42 -1
  140. package/src/tests/mocks.ts +146 -50
  141. package/src/tx/private_execution_result.ts +0 -15
  142. package/dest/p2p/block_attestation.d.ts +0 -77
  143. package/dest/p2p/block_attestation.d.ts.map +0 -1
@@ -1,13 +1,14 @@
1
1
  import { Buffer32 } from '@aztec/foundation/buffer';
2
2
  import { keccak256 } from '@aztec/foundation/crypto/keccak';
3
3
  import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
5
  import { Signature } from '@aztec/foundation/eth-signature';
5
6
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
7
+ import { BlockHeader } from '../tx/block_header.js';
6
8
  import { TxHash } from '../tx/index.js';
7
- import { Tx } from '../tx/tx.js';
8
- import { ConsensusPayload } from './consensus_payload.js';
9
9
  import { Gossipable } from './gossipable.js';
10
10
  import { SignatureDomainSeparator, getHashedSignaturePayload, getHashedSignaturePayloadEthSignedMessage } from './signature_utils.js';
11
+ import { SignedTxs } from './signed_txs.js';
11
12
  import { TopicType } from './topic_type.js';
12
13
  export class BlockProposalHash extends Buffer32 {
13
14
  constructor(hash){
@@ -15,84 +16,166 @@ export class BlockProposalHash extends Buffer32 {
15
16
  }
16
17
  }
17
18
  /**
18
- * BlockProposal
19
- *
20
- * A block proposal is created by the leader of the chain proposing a sequence of transactions to
21
- * be included in the head of the chain
19
+ * A block proposal is created by the leader of the chain proposing a sequence of transactions
20
+ * to be included in a block within a checkpoint. This is used for non-last blocks in a slot.
21
+ * The last block is sent as part of a CheckpointProposal.
22
22
  */ export class BlockProposal extends Gossipable {
23
- payload;
24
- signature;
23
+ blockHeader;
24
+ indexWithinCheckpoint;
25
+ inHash;
26
+ archiveRoot;
25
27
  txHashes;
26
- txs;
28
+ signature;
29
+ signedTxs;
27
30
  static p2pTopic = TopicType.block_proposal;
28
31
  sender;
29
- constructor(/** The payload of the message, and what the signature is over */ payload, /** The signer of the BlockProposal over the header of the new block*/ signature, /** The sequence of transactions in the block */ txHashes, // Note(md): this is placed after the txs payload in order to be backwards compatible with previous versions
30
- /** The transactions in the block */ txs){
31
- super(), this.payload = payload, this.signature = signature, this.txHashes = txHashes, this.txs = txs;
32
+ constructor(/** The per-block header containing block state and global variables */ blockHeader, // TODO(palla/mbps): Is this really needed? Can we just derive it from the indexWithinCheckpoint of the parent block and the slot number?
33
+ // See the block-proposal-handler, we have a lot of extra validations to check this is correct, so maybe we can avoid storing it here.
34
+ /** Index of this block within the checkpoint (0-indexed) */ indexWithinCheckpoint, /** Hash of L1 to L2 messages for this checkpoint (constant across all blocks in checkpoint) */ inHash, /** Archive root after this block is applied */ archiveRoot, /** The sequence of transactions in the block */ txHashes, /** The proposer's signature over the block data */ signature, /** The signed transactions in the block (optional, for DA guarantees) */ signedTxs){
35
+ super(), this.blockHeader = blockHeader, this.indexWithinCheckpoint = indexWithinCheckpoint, this.inHash = inHash, this.archiveRoot = archiveRoot, this.txHashes = txHashes, this.signature = signature, this.signedTxs = signedTxs;
32
36
  }
33
37
  generateP2PMessageIdentifier() {
34
38
  return Promise.resolve(new BlockProposalHash(keccak256(this.signature.toBuffer())));
35
39
  }
36
40
  get archive() {
37
- return this.payload.archive;
41
+ return this.archiveRoot;
38
42
  }
39
43
  get slotNumber() {
40
- return this.payload.header.slotNumber;
44
+ return this.blockHeader.getSlot();
45
+ }
46
+ get blockNumber() {
47
+ return this.blockHeader.getBlockNumber();
48
+ }
49
+ /** Convenience getter for txs from signedTxs */ get txs() {
50
+ return this.signedTxs?.txs;
41
51
  }
42
52
  toBlockInfo() {
43
53
  return {
44
54
  slotNumber: this.slotNumber,
45
- lastArchive: this.payload.header.lastArchiveRoot,
46
- timestamp: this.payload.header.timestamp,
47
- archive: this.archive,
55
+ lastArchive: this.blockHeader.lastArchive.root,
56
+ timestamp: this.blockHeader.globalVariables.timestamp,
57
+ archive: this.archiveRoot,
48
58
  txCount: this.txHashes.length
49
59
  };
50
60
  }
51
- static async createProposalFromSigner(payload, txHashes, // Note(md): Provided separately to tx hashes such that this function can be optional
52
- txs, payloadSigner) {
53
- const hashed = getHashedSignaturePayload(payload, SignatureDomainSeparator.blockProposal);
61
+ /**
62
+ * Get the payload to sign for this block proposal.
63
+ * The signature is over: blockHeader + indexWithinCheckpoint + inHash + archiveRoot + txHashes
64
+ */ getPayloadToSign(domainSeparator) {
65
+ return serializeToBuffer([
66
+ domainSeparator,
67
+ this.blockHeader,
68
+ this.indexWithinCheckpoint,
69
+ this.inHash,
70
+ this.archiveRoot,
71
+ this.txHashes.length,
72
+ this.txHashes
73
+ ]);
74
+ }
75
+ static async createProposalFromSigner(blockHeader, indexWithinCheckpoint, inHash, archiveRoot, txHashes, txs, payloadSigner) {
76
+ // Create a temporary proposal to get the payload to sign
77
+ const tempProposal = new BlockProposal(blockHeader, indexWithinCheckpoint, inHash, archiveRoot, txHashes, Signature.empty());
78
+ const hashed = getHashedSignaturePayload(tempProposal, SignatureDomainSeparator.blockProposal);
54
79
  const sig = await payloadSigner(hashed);
55
- return new BlockProposal(payload, sig, txHashes, txs);
80
+ // If txs are provided, sign them as well
81
+ let signedTxs;
82
+ if (txs) {
83
+ signedTxs = await SignedTxs.createFromSigner(txs, payloadSigner);
84
+ }
85
+ return new BlockProposal(blockHeader, indexWithinCheckpoint, inHash, archiveRoot, txHashes, sig, signedTxs);
56
86
  }
57
- /**Get Sender
58
- * Lazily evaluate the sender of the proposal; result is cached
59
- * @returns The sender address, or undefined if signature recovery fails
87
+ /**
88
+ * Lazily evaluate the sender of the proposal; result is cached.
89
+ * If there's signedTxs, also verifies the signedTxs sender matches the block proposal sender.
90
+ * @returns The sender address, or undefined if signature recovery fails or senders don't match
60
91
  */ getSender() {
61
92
  if (!this.sender) {
62
- const hashed = getHashedSignaturePayloadEthSignedMessage(this.payload, SignatureDomainSeparator.blockProposal);
93
+ const hashed = getHashedSignaturePayloadEthSignedMessage(this, SignatureDomainSeparator.blockProposal);
94
+ const blockSender = tryRecoverAddress(hashed, this.signature);
95
+ // If there's signedTxs, verify the sender matches
96
+ if (blockSender && this.signedTxs) {
97
+ const txsSender = this.signedTxs.getSender();
98
+ if (!txsSender || !txsSender.equals(blockSender)) {
99
+ return undefined; // Sender mismatch - fail
100
+ }
101
+ }
63
102
  // Cache the sender for later use
64
- this.sender = tryRecoverAddress(hashed, this.signature);
103
+ this.sender = blockSender;
65
104
  }
66
105
  return this.sender;
67
106
  }
68
107
  getPayload() {
69
- return this.payload.getPayloadToSign(SignatureDomainSeparator.blockProposal);
108
+ return this.getPayloadToSign(SignatureDomainSeparator.blockProposal);
70
109
  }
71
110
  toBuffer() {
72
111
  const buffer = [
73
- this.payload,
112
+ this.blockHeader,
113
+ this.indexWithinCheckpoint,
114
+ this.inHash,
115
+ this.archiveRoot,
74
116
  this.signature,
75
117
  this.txHashes.length,
76
118
  this.txHashes
77
119
  ];
78
- if (this.txs) {
79
- buffer.push(this.txs.length);
80
- buffer.push(this.txs);
120
+ if (this.signedTxs) {
121
+ buffer.push(1); // hasSignedTxs = true
122
+ buffer.push(this.signedTxs.toBuffer());
123
+ } else {
124
+ buffer.push(0); // hasSignedTxs = false
81
125
  }
82
126
  return serializeToBuffer(buffer);
83
127
  }
84
128
  static fromBuffer(buf) {
85
129
  const reader = BufferReader.asReader(buf);
86
- const payload = reader.readObject(ConsensusPayload);
87
- const sig = reader.readObject(Signature);
130
+ const blockHeader = reader.readObject(BlockHeader);
131
+ const indexWithinCheckpoint = reader.readNumber();
132
+ const inHash = reader.readObject(Fr);
133
+ const archiveRoot = reader.readObject(Fr);
134
+ const signature = reader.readObject(Signature);
88
135
  const txHashes = reader.readArray(reader.readNumber(), TxHash);
89
136
  if (!reader.isEmpty()) {
90
- const txs = reader.readArray(reader.readNumber(), Tx);
91
- return new BlockProposal(payload, sig, txHashes, txs);
137
+ const hasSignedTxs = reader.readNumber();
138
+ if (hasSignedTxs) {
139
+ const signedTxs = SignedTxs.fromBuffer(reader);
140
+ return new BlockProposal(blockHeader, indexWithinCheckpoint, inHash, archiveRoot, txHashes, signature, signedTxs);
141
+ }
92
142
  }
93
- return new BlockProposal(payload, sig, txHashes);
143
+ return new BlockProposal(blockHeader, indexWithinCheckpoint, inHash, archiveRoot, txHashes, signature);
94
144
  }
95
145
  getSize() {
96
- return this.payload.getSize() + this.signature.getSize() + 4 /* txHashes.length */ + this.txHashes.length * TxHash.SIZE + (this.txs ? 4 /* txs.length */ + this.txs.reduce((acc, tx)=>acc + tx.getSize(), 0) : 0);
146
+ return this.blockHeader.getSize() + 4 /* indexWithinCheckpoint */ + this.inHash.size + this.archiveRoot.size + this.signature.getSize() + 4 /* txHashes.length */ + this.txHashes.length * TxHash.SIZE + 4 /* hasSignedTxs flag */ + (this.signedTxs ? this.signedTxs.getSize() : 0);
147
+ }
148
+ static empty() {
149
+ return new BlockProposal(BlockHeader.empty(), 0, Fr.ZERO, Fr.ZERO, [], Signature.empty());
150
+ }
151
+ static random() {
152
+ return new BlockProposal(BlockHeader.random(), Math.floor(Math.random() * 5), Fr.random(), Fr.random(), [
153
+ TxHash.random(),
154
+ TxHash.random()
155
+ ], Signature.random());
156
+ }
157
+ toInspect() {
158
+ return {
159
+ blockHeader: this.blockHeader.toInspect(),
160
+ indexWithinCheckpoint: this.indexWithinCheckpoint,
161
+ inHash: this.inHash.toString(),
162
+ archiveRoot: this.archiveRoot.toString(),
163
+ signature: this.signature.toString(),
164
+ txHashes: this.txHashes.map((h)=>h.toString())
165
+ };
166
+ }
167
+ /**
168
+ * Check if this proposal matches the given block.
169
+ * Compares the archive root and block header.
170
+ * @param block - The L2Block to compare against
171
+ * @returns True if the proposal matches the block
172
+ */ matchesBlock(block) {
173
+ return this.archiveRoot.equals(block.archive.root) && this.blockHeader.equals(block.getBlockHeader());
174
+ }
175
+ /**
176
+ * Returns a copy of this proposal without signedTxs.
177
+ * Used when storing proposals in attestation pool to avoid storing full tx data.
178
+ */ withoutSignedTxs() {
179
+ return new BlockProposal(this.blockHeader, this.indexWithinCheckpoint, this.inHash, this.archiveRoot, this.txHashes, this.signature);
97
180
  }
98
181
  }
@@ -0,0 +1,77 @@
1
+ import { SlotNumber } from '@aztec/foundation/branded-types';
2
+ import { Buffer32 } from '@aztec/foundation/buffer';
3
+ import type { Fr } from '@aztec/foundation/curves/bn254';
4
+ import type { EthAddress } from '@aztec/foundation/eth-address';
5
+ import { Signature } from '@aztec/foundation/eth-signature';
6
+ import { BufferReader } from '@aztec/foundation/serialize';
7
+ import type { ZodFor } from '../schemas/index.js';
8
+ import { ConsensusPayload } from './consensus_payload.js';
9
+ import { Gossipable } from './gossipable.js';
10
+ import { TopicType } from './topic_type.js';
11
+ export declare class CheckpointAttestationHash extends Buffer32 {
12
+ constructor(hash: Buffer);
13
+ }
14
+ /**
15
+ * CheckpointAttestation
16
+ *
17
+ * A validator that has attested to seeing all blocks in a checkpoint
18
+ * will produce a checkpoint attestation over the checkpoint header.
19
+ */
20
+ export declare class CheckpointAttestation extends Gossipable {
21
+ readonly payload: ConsensusPayload;
22
+ readonly signature: Signature;
23
+ readonly proposerSignature: Signature;
24
+ static p2pTopic: TopicType;
25
+ private sender;
26
+ private proposer;
27
+ constructor(
28
+ /** The payload of the message, and what the signature is over */
29
+ payload: ConsensusPayload,
30
+ /** The signature of the checkpoint attester */
31
+ signature: Signature,
32
+ /** The signature from the checkpoint proposer */
33
+ proposerSignature: Signature);
34
+ static get schema(): ZodFor<CheckpointAttestation>;
35
+ generateP2PMessageIdentifier(): Promise<Buffer32>;
36
+ get archive(): Fr;
37
+ get slotNumber(): SlotNumber;
38
+ /**
39
+ * Lazily evaluate and cache the signer of the attestation
40
+ * @returns The signer of the attestation, or undefined if signature recovery fails
41
+ */
42
+ getSender(): EthAddress | undefined;
43
+ /**
44
+ * Lazily evaluate and cache the proposer of the checkpoint
45
+ * @returns The proposer of the checkpoint
46
+ */
47
+ getProposer(): EthAddress | undefined;
48
+ getPayload(): Buffer;
49
+ toBuffer(): Buffer;
50
+ static fromBuffer(buf: Buffer | BufferReader): CheckpointAttestation;
51
+ static empty(): CheckpointAttestation;
52
+ static random(): CheckpointAttestation;
53
+ getSize(): number;
54
+ toInspect(): {
55
+ payload: {
56
+ header: {
57
+ lastArchive: `0x${string}`;
58
+ blockHeadersHash: `0x${string}`;
59
+ blobsHash: `0x${string}`;
60
+ inHash: `0x${string}`;
61
+ slotNumber: SlotNumber;
62
+ timestamp: bigint;
63
+ coinbase: `0x${string}`;
64
+ feeRecipient: `0x${string}`;
65
+ gasFees: {
66
+ feePerDaGas: bigint;
67
+ feePerL2Gas: bigint;
68
+ };
69
+ totalManaUsed: bigint;
70
+ };
71
+ archive: `0x${string}`;
72
+ };
73
+ signature: `0x${string}`;
74
+ proposerSignature: `0x${string}`;
75
+ };
76
+ }
77
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2twb2ludF9hdHRlc3RhdGlvbi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3AycC9jaGVja3BvaW50X2F0dGVzdGF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUM3RCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFHcEQsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDekQsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFDaEUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzVELE9BQU8sRUFBRSxZQUFZLEVBQXFCLE1BQU0sNkJBQTZCLENBQUM7QUFJOUUsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFbEQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sd0JBQXdCLENBQ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C,QAAQ,CAAyB;IAEzC;IACE,iEAAiE;IACjD,OAAO,EAAE,gBAAgB;IAEzC,+CAA+C;IAC/B,SAAS,EAAE,SAAS;IAEpC,iDAAiD;IACjC,iBAAiB,EAAE,SAAS,EAG7C;IAED,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC,CAQjD;IAEQ,4BAA4B,IAAI,OAAO,CAAC,QAAQ,CAAC,CAEzD;IAED,IAAI,OAAO,IAAI,EAAE,CAEhB;IAED,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED;;;OAGG;IACH,SAAS,IAAI,UAAU,GAAG,SAAS,CAYlC;IAED;;;OAGG;IACH,WAAW,IAAI,UAAU,GAAG,SAAS,CAWpC;IAED,UAAU,IAAI,MAAM,CAEnB;IAED,QAAQ,IAAI,MAAM,CAEjB;IAED,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,qBAAqB,CAOnE;IAED,MAAM,CAAC,KAAK,IAAI,qBAAqB,CAEpC;IAED,MAAM,CAAC,MAAM,IAAI,qBAAqB,CAErC;IAED,OAAO,IAAI,MAAM,CAEhB;IAED,SAAS;;;;;;;;;;;;;;;;;;;;;MAMR;CACF"}
@@ -4,28 +4,29 @@ import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
4
4
  import { Signature } from '@aztec/foundation/eth-signature';
5
5
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
6
6
  import { z } from 'zod';
7
+ import { CheckpointProposal } from './checkpoint_proposal.js';
7
8
  import { ConsensusPayload } from './consensus_payload.js';
8
9
  import { Gossipable } from './gossipable.js';
9
10
  import { SignatureDomainSeparator, getHashedSignaturePayloadEthSignedMessage } from './signature_utils.js';
10
11
  import { TopicType } from './topic_type.js';
11
- export class BlockAttestationHash extends Buffer32 {
12
+ export class CheckpointAttestationHash extends Buffer32 {
12
13
  constructor(hash){
13
14
  super(hash);
14
15
  }
15
16
  }
16
17
  /**
17
- * BlockAttestation
18
+ * CheckpointAttestation
18
19
  *
19
- * A validator that has attested to seeing the contents of a block
20
- * will produce a block attestation over the header of the block
21
- */ export class BlockAttestation extends Gossipable {
20
+ * A validator that has attested to seeing all blocks in a checkpoint
21
+ * will produce a checkpoint attestation over the checkpoint header.
22
+ */ export class CheckpointAttestation extends Gossipable {
22
23
  payload;
23
24
  signature;
24
25
  proposerSignature;
25
- static p2pTopic = TopicType.block_attestation;
26
+ static p2pTopic = TopicType.checkpoint_attestation;
26
27
  sender;
27
28
  proposer;
28
- constructor(/** The payload of the message, and what the signature is over */ payload, /** The signature of the block attester */ signature, /** The signature from the block proposer */ proposerSignature){
29
+ constructor(/** The payload of the message, and what the signature is over */ payload, /** The signature of the checkpoint attester */ signature, /** The signature from the checkpoint proposer */ proposerSignature){
29
30
  super(), this.payload = payload, this.signature = signature, this.proposerSignature = proposerSignature;
30
31
  }
31
32
  static get schema() {
@@ -33,10 +34,10 @@ export class BlockAttestationHash extends Buffer32 {
33
34
  payload: ConsensusPayload.schema,
34
35
  signature: Signature.schema,
35
36
  proposerSignature: Signature.schema
36
- }).transform((obj)=>new BlockAttestation(obj.payload, obj.signature, obj.proposerSignature));
37
+ }).transform((obj)=>new CheckpointAttestation(obj.payload, obj.signature, obj.proposerSignature));
37
38
  }
38
39
  generateP2PMessageIdentifier() {
39
- return Promise.resolve(new BlockAttestationHash(keccak256(this.signature.toBuffer())));
40
+ return Promise.resolve(new CheckpointAttestationHash(keccak256(this.signature.toBuffer())));
40
41
  }
41
42
  get archive() {
42
43
  return this.payload.archive;
@@ -50,26 +51,28 @@ export class BlockAttestationHash extends Buffer32 {
50
51
  */ getSender() {
51
52
  if (!this.sender) {
52
53
  // Recover the sender from the attestation
53
- const hashed = getHashedSignaturePayloadEthSignedMessage(this.payload, SignatureDomainSeparator.blockAttestation);
54
+ const hashed = getHashedSignaturePayloadEthSignedMessage(this.payload, SignatureDomainSeparator.checkpointAttestation);
54
55
  // Cache the sender for later use
55
56
  this.sender = tryRecoverAddress(hashed, this.signature);
56
57
  }
57
58
  return this.sender;
58
59
  }
59
60
  /**
60
- * Lazily evaluate and cache the proposer of the block
61
- * @returns The proposer of the block
61
+ * Lazily evaluate and cache the proposer of the checkpoint
62
+ * @returns The proposer of the checkpoint
62
63
  */ getProposer() {
63
64
  if (!this.proposer) {
64
- // Recover the proposer from the proposal signature
65
- const hashed = getHashedSignaturePayloadEthSignedMessage(this.payload, SignatureDomainSeparator.blockProposal);
65
+ // Create a temporary CheckpointProposal to recover the proposer address.
66
+ // We need to use CheckpointProposal because it has a different getPayloadToSign()
67
+ // implementation than ConsensusPayload (uses serializeToBuffer vs ABI encoding).
68
+ const proposal = new CheckpointProposal(this.payload.header, this.payload.archive, this.proposerSignature);
66
69
  // Cache the proposer for later use
67
- this.proposer = tryRecoverAddress(hashed, this.proposerSignature);
70
+ this.proposer = proposal.getSender();
68
71
  }
69
72
  return this.proposer;
70
73
  }
71
74
  getPayload() {
72
- return this.payload.getPayloadToSign(SignatureDomainSeparator.blockAttestation);
75
+ return this.payload.getPayloadToSign(SignatureDomainSeparator.checkpointAttestation);
73
76
  }
74
77
  toBuffer() {
75
78
  return serializeToBuffer([
@@ -80,13 +83,13 @@ export class BlockAttestationHash extends Buffer32 {
80
83
  }
81
84
  static fromBuffer(buf) {
82
85
  const reader = BufferReader.asReader(buf);
83
- return new BlockAttestation(reader.readObject(ConsensusPayload), reader.readObject(Signature), reader.readObject(Signature));
86
+ return new CheckpointAttestation(reader.readObject(ConsensusPayload), reader.readObject(Signature), reader.readObject(Signature));
84
87
  }
85
88
  static empty() {
86
- return new BlockAttestation(ConsensusPayload.empty(), Signature.empty(), Signature.empty());
89
+ return new CheckpointAttestation(ConsensusPayload.empty(), Signature.empty(), Signature.empty());
87
90
  }
88
91
  static random() {
89
- return new BlockAttestation(ConsensusPayload.random(), Signature.random(), Signature.random());
92
+ return new CheckpointAttestation(ConsensusPayload.random(), Signature.random(), Signature.random());
90
93
  }
91
94
  getSize() {
92
95
  return this.payload.getSize() + this.signature.getSize() + this.proposerSignature.getSize();
@@ -0,0 +1,154 @@
1
+ import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
2
+ import { Buffer32 } from '@aztec/foundation/buffer';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
+ import type { EthAddress } from '@aztec/foundation/eth-address';
5
+ import { Signature } from '@aztec/foundation/eth-signature';
6
+ import { BufferReader } from '@aztec/foundation/serialize';
7
+ import type { L2BlockInfo } from '../block/l2_block_info.js';
8
+ import { CheckpointHeader } from '../rollup/checkpoint_header.js';
9
+ import { BlockHeader } from '../tx/block_header.js';
10
+ import { TxHash } from '../tx/index.js';
11
+ import type { Tx } from '../tx/tx.js';
12
+ import { BlockProposal } from './block_proposal.js';
13
+ import { Gossipable } from './gossipable.js';
14
+ import { SignatureDomainSeparator } from './signature_utils.js';
15
+ import { SignedTxs } from './signed_txs.js';
16
+ import { TopicType } from './topic_type.js';
17
+ export declare class CheckpointProposalHash extends Buffer32 {
18
+ constructor(hash: Buffer);
19
+ }
20
+ export type CheckpointProposalOptions = {
21
+ publishFullTxs: boolean;
22
+ /** Whether to generate an invalid checkpoint proposal for broadcasting. Use only for testing. */
23
+ broadcastInvalidCheckpointProposal?: boolean;
24
+ };
25
+ /** Data for the last block included in a checkpoint proposal */
26
+ export type CheckpointLastBlockData = {
27
+ /** The per-block header for the last block in the checkpoint */
28
+ blockHeader: BlockHeader;
29
+ /** Index of this block within the checkpoint (should be the last index, e.g., numBlocks - 1) */
30
+ indexWithinCheckpoint: number;
31
+ /** The sequence of transactions in the last block */
32
+ txHashes: TxHash[];
33
+ /** The tx in the last block (optional, for DA guarantees) */
34
+ txs?: Tx[];
35
+ };
36
+ /** Last block included in a checkpoint proposal */
37
+ export type CheckpointLastBlock = Omit<CheckpointLastBlockData, 'txs'> & {
38
+ /** The proposer's signature over the block data (separate from checkpoint signature) */
39
+ signature: Signature;
40
+ /** The signed transactions in the last block (optional, for DA guarantees) */
41
+ signedTxs?: SignedTxs;
42
+ };
43
+ /**
44
+ * A checkpoint proposal is created by the leader of the chain for the last block in a checkpoint.
45
+ * It includes the aggregated checkpoint header that validators will attest to, plus optionally
46
+ * the last block's info for nodes to re-execute. This marks the completion of a slot's worth of blocks.
47
+ */
48
+ export declare class CheckpointProposal extends Gossipable {
49
+ readonly checkpointHeader: CheckpointHeader;
50
+ readonly archive: Fr;
51
+ readonly signature: Signature;
52
+ readonly lastBlock?: CheckpointLastBlock | undefined;
53
+ static p2pTopic: TopicType;
54
+ private sender;
55
+ constructor(
56
+ /** The aggregated checkpoint header for consensus */
57
+ checkpointHeader: CheckpointHeader,
58
+ /** Archive root after this checkpoint is applied */
59
+ archive: Fr,
60
+ /** The proposer's signature over the checkpoint payload (checkpointHeader + archive) */
61
+ signature: Signature,
62
+ /** Optional last block info, including its own signature for BlockProposal extraction */
63
+ lastBlock?: CheckpointLastBlock | undefined);
64
+ generateP2PMessageIdentifier(): Promise<Buffer32>;
65
+ get slotNumber(): SlotNumber;
66
+ get blockNumber(): BlockNumber;
67
+ /** Convenience getter for txHashes from lastBlock */
68
+ get txHashes(): TxHash[];
69
+ /** Convenience getter for txs from lastBlock */
70
+ get txs(): Tx[] | undefined;
71
+ /**
72
+ * Extract a BlockProposal from the last block info.
73
+ * Uses inHash from checkpointHeader.contentCommitment.inHash
74
+ */
75
+ getBlockProposal(): BlockProposal | undefined;
76
+ toBlockInfo(): Omit<L2BlockInfo, 'blockNumber'>;
77
+ /**
78
+ * Get the payload to sign for this checkpoint proposal.
79
+ * The signature is over the checkpoint header + archive root (for consensus).
80
+ */
81
+ getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer;
82
+ static createProposalFromSigner(checkpointHeader: CheckpointHeader, archiveRoot: Fr, lastBlockInfo: CheckpointLastBlockData | undefined, payloadSigner: (payload: Buffer32) => Promise<Signature>): Promise<CheckpointProposal>;
83
+ /**
84
+ * Lazily evaluate the sender of the proposal; result is cached.
85
+ * If there's a lastBlock, also verifies the block proposal sender matches the checkpoint sender.
86
+ * @returns The sender address, or undefined if signature recovery fails or senders don't match
87
+ */
88
+ getSender(): EthAddress | undefined;
89
+ getPayload(): Buffer<ArrayBufferLike>;
90
+ toBuffer(): Buffer;
91
+ static fromBuffer(buf: Buffer | BufferReader): CheckpointProposal;
92
+ getSize(): number;
93
+ static empty(): CheckpointProposal;
94
+ static random(): CheckpointProposal;
95
+ toInspect(): {
96
+ checkpointHeader: {
97
+ lastArchive: `0x${string}`;
98
+ blockHeadersHash: `0x${string}`;
99
+ blobsHash: `0x${string}`;
100
+ inHash: `0x${string}`;
101
+ slotNumber: SlotNumber;
102
+ timestamp: bigint;
103
+ coinbase: `0x${string}`;
104
+ feeRecipient: `0x${string}`;
105
+ gasFees: {
106
+ feePerDaGas: bigint;
107
+ feePerL2Gas: bigint;
108
+ };
109
+ totalManaUsed: bigint;
110
+ };
111
+ archive: `0x${string}`;
112
+ signature: `0x${string}`;
113
+ lastBlock: {
114
+ blockHeader: {
115
+ lastArchive: `0x${string}`;
116
+ state: {
117
+ l1ToL2MessageTree: `0x${string}`;
118
+ noteHashTree: `0x${string}`;
119
+ nullifierTree: `0x${string}`;
120
+ publicDataTree: `0x${string}`;
121
+ };
122
+ spongeBlobHash: bigint;
123
+ globalVariables: {
124
+ chainId: number;
125
+ version: number;
126
+ blockNumber: BlockNumber;
127
+ slotNumber: SlotNumber;
128
+ timestamp: bigint;
129
+ coinbase: `0x${string}`;
130
+ feeRecipient: `0x${string}`;
131
+ feePerDaGas: number;
132
+ feePerL2Gas: number;
133
+ };
134
+ totalFees: bigint;
135
+ totalManaUsed: bigint;
136
+ };
137
+ indexWithinCheckpoint: number;
138
+ txHashes: `0x${string}`[];
139
+ signature: `0x${string}`;
140
+ } | undefined;
141
+ };
142
+ /**
143
+ * Returns a copy of this proposal without lastBlock info, as a CheckpointProposalCore.
144
+ * Used when the lastBlock has been extracted and stored separately.
145
+ */
146
+ toCore(): CheckpointProposalCore;
147
+ }
148
+ /**
149
+ * A checkpoint proposal without the lastBlock info.
150
+ * Used when the lastBlock has been extracted and handled separately as a BlockProposal.
151
+ * This type makes it clear that lastBlock and getBlockProposal() are not available.
152
+ */
153
+ export type CheckpointProposalCore = Omit<CheckpointProposal, 'lastBlock' | 'getBlockProposal' | 'toCore'>;
154
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2twb2ludF9wcm9wb3NhbC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3AycC9jaGVja3BvaW50X3Byb3Bvc2FsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsVUFBVSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDMUUsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBR3BELE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNoRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDNUQsT0FBTyxFQUFFLFlBQVksRUFBcUIsTUFBTSw2QkFBNkIsQ0FBQztBQUU5RSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUM3RCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNsRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDcEQsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3hDLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUN0QyxPQUFPL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