@aztec/stdlib 4.0.0-nightly.20260111 → 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,76 +1,225 @@
1
1
  import { GENESIS_BLOCK_HEADER_HASH } from '@aztec/constants';
2
- import { BlockNumber } from '@aztec/foundation/branded-types';
2
+ import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
3
3
  import { times } from '@aztec/foundation/collection';
4
4
  import { Fr } from '@aztec/foundation/curves/bn254';
5
- import { PublishedL2Block } from '@aztec/stdlib/block';
6
- import { L1PublishedData } from '@aztec/stdlib/checkpoint';
5
+ import { GENESIS_CHECKPOINT_HEADER_HASH, L2BlockNew } from '@aztec/stdlib/block';
6
+ import { Checkpoint, L1PublishedData, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
7
7
  import { jestExpect as expect } from '@jest/expect';
8
8
  export function testL2TipsStore(makeTipsStore) {
9
9
  let tipsStore;
10
+ // Track blocks and their hashes for test assertions
11
+ const blockHashes = new Map();
12
+ // Track checkpoints and their hashes
13
+ const checkpointHashes = new Map();
14
+ // Track which blocks belong to which checkpoint
15
+ const blockToCheckpoint = new Map();
10
16
  beforeEach(async ()=>{
11
17
  tipsStore = await makeTipsStore();
18
+ blockHashes.clear();
19
+ checkpointHashes.clear();
20
+ blockToCheckpoint.clear();
12
21
  });
13
- const makeBlock = (number)=>PublishedL2Block.fromFields({
14
- block: {
15
- number: BlockNumber(number),
16
- hash: ()=>Promise.resolve(new Fr(number))
17
- },
18
- l1: new L1PublishedData(BigInt(number), BigInt(number), `0x${number}`),
19
- attestations: []
20
- });
22
+ const makeBlock = async (number)=>{
23
+ const block = await L2BlockNew.random(BlockNumber(number));
24
+ blockHashes.set(number, (await block.hash()).toString());
25
+ return block;
26
+ };
21
27
  const makeBlockId = (number)=>({
22
28
  number: BlockNumber(number),
23
- hash: new Fr(number).toString()
29
+ hash: blockHashes.get(number) ?? new Fr(number).toString()
24
30
  });
25
31
  const makeTip = (number)=>({
26
32
  number: BlockNumber(number),
27
- hash: number === 0 ? GENESIS_BLOCK_HEADER_HASH.toString() : new Fr(number).toString()
33
+ hash: number === 0 ? GENESIS_BLOCK_HEADER_HASH.toString() : blockHashes.get(number) ?? new Fr(number).toString()
34
+ });
35
+ const makeCheckpointIdForBlock = (blockNumber)=>{
36
+ if (blockNumber === 0) {
37
+ return {
38
+ number: CheckpointNumber.ZERO,
39
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
40
+ };
41
+ }
42
+ const checkpointNum = blockToCheckpoint.get(blockNumber);
43
+ if (checkpointNum === undefined) {
44
+ return {
45
+ number: CheckpointNumber.ZERO,
46
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
47
+ };
48
+ }
49
+ const hash = checkpointHashes.get(checkpointNum);
50
+ if (!hash) {
51
+ return {
52
+ number: CheckpointNumber.ZERO,
53
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
54
+ };
55
+ }
56
+ return {
57
+ number: CheckpointNumber(checkpointNum),
58
+ hash
59
+ };
60
+ };
61
+ const makeTipId = (blockNumber)=>({
62
+ block: makeTip(blockNumber),
63
+ checkpoint: makeCheckpointIdForBlock(blockNumber)
28
64
  });
29
- const makeTips = (latest, proven, finalized)=>({
30
- latest: makeTip(latest),
31
- proven: makeTip(proven),
32
- finalized: makeTip(finalized)
65
+ const makeTips = (proposed, proven, finalized, checkpointed = 0)=>({
66
+ proposed: makeTip(proposed),
67
+ proven: makeTipId(proven),
68
+ finalized: makeTipId(finalized),
69
+ checkpointed: makeTipId(checkpointed)
33
70
  });
71
+ const makeCheckpoint = async (checkpointNumber, blocks)=>{
72
+ const checkpoint = await Checkpoint.random(CheckpointNumber(checkpointNumber), {
73
+ numBlocks: blocks.length,
74
+ startBlockNumber: blocks[0].number
75
+ });
76
+ // Override the blocks with our actual blocks (to keep hashes consistent)
77
+ checkpoint.blocks = blocks;
78
+ const checkpointHash = checkpoint.hash().toString();
79
+ checkpointHashes.set(checkpointNumber, checkpointHash);
80
+ // Track which blocks belong to this checkpoint
81
+ for (const block of blocks){
82
+ blockToCheckpoint.set(block.number, checkpointNumber);
83
+ }
84
+ return new PublishedCheckpoint(checkpoint, L1PublishedData.random(), []);
85
+ };
86
+ /** Creates a chain-checkpointed event with the required block field */ const makeCheckpointedEvent = async (checkpoint)=>{
87
+ const lastBlock = checkpoint.checkpoint.blocks.at(-1);
88
+ const blockId = {
89
+ number: lastBlock.number,
90
+ hash: (await lastBlock.hash()).toString()
91
+ };
92
+ return {
93
+ type: 'chain-checkpointed',
94
+ checkpoint,
95
+ block: blockId
96
+ };
97
+ };
34
98
  it('returns zero if no tips are stored', async ()=>{
35
99
  const tips = await tipsStore.getL2Tips();
36
100
  expect(tips).toEqual(makeTips(0, 0, 0));
37
101
  });
38
- it('stores chain tips', async ()=>{
102
+ it('sets proposed tip from blocks added', async ()=>{
39
103
  await tipsStore.handleBlockStreamEvent({
40
104
  type: 'blocks-added',
41
- blocks: times(20, (i)=>makeBlock(i + 1))
105
+ blocks: await Promise.all(times(3, (i)=>makeBlock(i + 1)))
42
106
  });
107
+ const tips = await tipsStore.getL2Tips();
108
+ expect(tips).toEqual(makeTips(3, 0, 0));
109
+ expect(await tipsStore.getL2BlockHash(1)).toEqual(blockHashes.get(1));
110
+ expect(await tipsStore.getL2BlockHash(2)).toEqual(blockHashes.get(2));
111
+ expect(await tipsStore.getL2BlockHash(3)).toEqual(blockHashes.get(3));
112
+ });
113
+ it('checkpoints all proposed blocks', async ()=>{
114
+ // Propose blocks 1-5
115
+ const blocks = await Promise.all(times(5, (i)=>makeBlock(i + 1)));
43
116
  await tipsStore.handleBlockStreamEvent({
44
- type: 'chain-finalized',
117
+ type: 'blocks-added',
118
+ blocks
119
+ });
120
+ // Checkpoint all proposed blocks (1-5)
121
+ const checkpoint1 = await makeCheckpoint(1, blocks);
122
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
123
+ const tips = await tipsStore.getL2Tips();
124
+ // Proposed and checkpointed should be the same
125
+ expect(tips.proposed).toEqual(makeTip(5));
126
+ expect(tips.checkpointed.block).toEqual(makeTip(5));
127
+ expect(tips.checkpointed.checkpoint.number).toEqual(CheckpointNumber(1));
128
+ });
129
+ it('advances proven chain with checkpoint info', async ()=>{
130
+ // Propose and checkpoint blocks 1-5
131
+ const blocks = await Promise.all(times(5, (i)=>makeBlock(i + 1)));
132
+ await tipsStore.handleBlockStreamEvent({
133
+ type: 'blocks-added',
134
+ blocks
135
+ });
136
+ const checkpoint1 = await makeCheckpoint(1, blocks);
137
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
138
+ // Prove up to block 5
139
+ await tipsStore.handleBlockStreamEvent({
140
+ type: 'chain-proven',
45
141
  block: makeBlockId(5)
46
142
  });
143
+ const tips = await tipsStore.getL2Tips();
144
+ expect(tips.proposed).toEqual(makeTip(5));
145
+ expect(tips.checkpointed.block).toEqual(makeTip(5));
146
+ expect(tips.proven.block).toEqual(makeTip(5));
147
+ // Proven tip should have the checkpoint info
148
+ expect(tips.proven.checkpoint.number).toEqual(CheckpointNumber(1));
149
+ expect(tips.proven.checkpoint.hash).toEqual(checkpointHashes.get(1));
150
+ });
151
+ it('advances finalized chain with checkpoint info', async ()=>{
152
+ // Propose and checkpoint blocks 1-5
153
+ const blocks = await Promise.all(times(5, (i)=>makeBlock(i + 1)));
154
+ await tipsStore.handleBlockStreamEvent({
155
+ type: 'blocks-added',
156
+ blocks
157
+ });
158
+ const checkpoint1 = await makeCheckpoint(1, blocks);
159
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
160
+ // Prove and finalize
47
161
  await tipsStore.handleBlockStreamEvent({
48
162
  type: 'chain-proven',
49
- block: makeBlockId(8)
163
+ block: makeBlockId(5)
50
164
  });
51
165
  await tipsStore.handleBlockStreamEvent({
52
- type: 'chain-pruned',
53
- block: makeBlockId(10)
166
+ type: 'chain-finalized',
167
+ block: makeBlockId(5)
54
168
  });
55
169
  const tips = await tipsStore.getL2Tips();
56
- expect(tips).toEqual(makeTips(10, 8, 5));
170
+ expect(tips.proposed).toEqual(makeTip(5));
171
+ expect(tips.checkpointed.block).toEqual(makeTip(5));
172
+ expect(tips.proven.block).toEqual(makeTip(5));
173
+ expect(tips.finalized.block).toEqual(makeTip(5));
174
+ // Finalized tip should have checkpoint info
175
+ expect(tips.finalized.checkpoint.number).toEqual(CheckpointNumber(1));
176
+ expect(tips.finalized.checkpoint.hash).toEqual(checkpointHashes.get(1));
57
177
  });
58
- it('sets latest tip from blocks added', async ()=>{
178
+ it('handles multiple checkpoints advancing the chain', async ()=>{
179
+ // Propose blocks 1-5
180
+ const blocks1 = await Promise.all(times(5, (i)=>makeBlock(i + 1)));
59
181
  await tipsStore.handleBlockStreamEvent({
60
182
  type: 'blocks-added',
61
- blocks: times(3, (i)=>makeBlock(i + 1))
183
+ blocks: blocks1
62
184
  });
185
+ // Checkpoint 1: all proposed blocks 1-5
186
+ const checkpoint1 = await makeCheckpoint(1, blocks1);
187
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
188
+ // Propose more blocks 6-10
189
+ const blocks2 = await Promise.all(times(5, (i)=>makeBlock(i + 6)));
190
+ await tipsStore.handleBlockStreamEvent({
191
+ type: 'blocks-added',
192
+ blocks: blocks2
193
+ });
194
+ // Checkpoint 2: all remaining proposed blocks 6-10
195
+ const checkpoint2 = await makeCheckpoint(2, blocks2);
196
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint2));
63
197
  const tips = await tipsStore.getL2Tips();
64
- expect(tips).toEqual(makeTips(3, 0, 0));
65
- expect(await tipsStore.getL2BlockHash(1)).toEqual(new Fr(1).toString());
66
- expect(await tipsStore.getL2BlockHash(2)).toEqual(new Fr(2).toString());
67
- expect(await tipsStore.getL2BlockHash(3)).toEqual(new Fr(3).toString());
198
+ expect(tips.proposed).toEqual(makeTip(10));
199
+ expect(tips.checkpointed.block).toEqual(makeTip(10));
200
+ expect(tips.checkpointed.checkpoint.number).toEqual(CheckpointNumber(2));
201
+ expect(tips.checkpointed.checkpoint.hash).toEqual(checkpointHashes.get(2));
68
202
  });
69
203
  it('clears block hashes when setting finalized chain', async ()=>{
204
+ // Propose blocks 1-3
205
+ const blocks1to3 = await Promise.all(times(3, (i)=>makeBlock(i + 1)));
206
+ await tipsStore.handleBlockStreamEvent({
207
+ type: 'blocks-added',
208
+ blocks: blocks1to3
209
+ });
210
+ // Checkpoint all proposed blocks (1-3)
211
+ const checkpoint1 = await makeCheckpoint(1, blocks1to3);
212
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
213
+ // Propose more blocks 4-5
214
+ const blocks4to5 = await Promise.all(times(2, (i)=>makeBlock(i + 4)));
70
215
  await tipsStore.handleBlockStreamEvent({
71
216
  type: 'blocks-added',
72
- blocks: times(5, (i)=>makeBlock(i + 1))
217
+ blocks: blocks4to5
73
218
  });
219
+ // Checkpoint all remaining proposed blocks (4-5)
220
+ const checkpoint2 = await makeCheckpoint(2, blocks4to5);
221
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint2));
222
+ // Prove and finalize up to block 3 (checkpoint 1)
74
223
  await tipsStore.handleBlockStreamEvent({
75
224
  type: 'chain-proven',
76
225
  block: makeBlockId(3)
@@ -79,20 +228,313 @@ export function testL2TipsStore(makeTipsStore) {
79
228
  type: 'chain-finalized',
80
229
  block: makeBlockId(3)
81
230
  });
82
- const tips = await tipsStore.getL2Tips();
83
- expect(tips).toEqual(makeTips(5, 3, 3));
231
+ // Blocks before finalized should be cleared
84
232
  expect(await tipsStore.getL2BlockHash(1)).toBeUndefined();
85
233
  expect(await tipsStore.getL2BlockHash(2)).toBeUndefined();
86
- expect(await tipsStore.getL2BlockHash(3)).toEqual(new Fr(3).toString());
87
- expect(await tipsStore.getL2BlockHash(4)).toEqual(new Fr(4).toString());
88
- expect(await tipsStore.getL2BlockHash(5)).toEqual(new Fr(5).toString());
234
+ // Finalized and later blocks should remain
235
+ expect(await tipsStore.getL2BlockHash(3)).toEqual(blockHashes.get(3));
236
+ expect(await tipsStore.getL2BlockHash(4)).toEqual(blockHashes.get(4));
237
+ expect(await tipsStore.getL2BlockHash(5)).toEqual(blockHashes.get(5));
238
+ });
239
+ it('handles chain pruning by updating proposed tip', async ()=>{
240
+ const blocks = await Promise.all(times(10, (i)=>makeBlock(i + 1)));
241
+ await tipsStore.handleBlockStreamEvent({
242
+ type: 'blocks-added',
243
+ blocks
244
+ });
245
+ // Prune to block 5
246
+ await tipsStore.handleBlockStreamEvent({
247
+ type: 'chain-pruned',
248
+ block: makeBlockId(5),
249
+ reason: 'unproven',
250
+ checkpoint: {
251
+ number: CheckpointNumber.ZERO,
252
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
253
+ }
254
+ });
255
+ const tips = await tipsStore.getL2Tips();
256
+ expect(tips.proposed).toEqual(makeTip(5));
257
+ });
258
+ it('handles pruning proposed chain to genesis, re-proposing, and checkpointing', async ()=>{
259
+ // Propose blocks 1-3
260
+ const firstBlocks = await Promise.all(times(3, (i)=>makeBlock(i + 1)));
261
+ await tipsStore.handleBlockStreamEvent({
262
+ type: 'blocks-added',
263
+ blocks: firstBlocks
264
+ });
265
+ let tips = await tipsStore.getL2Tips();
266
+ expect(tips.proposed).toEqual(makeTip(3));
267
+ // Store original hashes
268
+ const originalHash1 = blockHashes.get(1);
269
+ const originalHash2 = blockHashes.get(2);
270
+ const originalHash3 = blockHashes.get(3);
271
+ // Prune back to genesis (block 0)
272
+ await tipsStore.handleBlockStreamEvent({
273
+ type: 'chain-pruned',
274
+ block: makeTip(0),
275
+ reason: 'unproven',
276
+ checkpoint: {
277
+ number: CheckpointNumber.ZERO,
278
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
279
+ }
280
+ });
281
+ tips = await tipsStore.getL2Tips();
282
+ expect(tips.proposed).toEqual(makeTip(0));
283
+ expect(tips.checkpointed.block).toEqual(makeTip(0));
284
+ // Clear hashes and propose new blocks 1-3 (different from original)
285
+ blockHashes.delete(1);
286
+ blockHashes.delete(2);
287
+ blockHashes.delete(3);
288
+ const newBlocks = await Promise.all(times(3, (i)=>makeBlock(i + 1)));
289
+ await tipsStore.handleBlockStreamEvent({
290
+ type: 'blocks-added',
291
+ blocks: newBlocks
292
+ });
293
+ // Verify new blocks have different hashes
294
+ expect(blockHashes.get(1)).not.toEqual(originalHash1);
295
+ expect(blockHashes.get(2)).not.toEqual(originalHash2);
296
+ expect(blockHashes.get(3)).not.toEqual(originalHash3);
297
+ tips = await tipsStore.getL2Tips();
298
+ expect(tips.proposed).toEqual(makeTip(3));
299
+ expect(tips.checkpointed.block).toEqual(makeTip(0)); // Not yet checkpointed
300
+ // Checkpoint all the new proposed blocks (1-3)
301
+ const checkpoint1 = await makeCheckpoint(1, newBlocks);
302
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
303
+ tips = await tipsStore.getL2Tips();
304
+ expect(tips.proposed).toEqual(makeTip(3));
305
+ expect(tips.checkpointed.block).toEqual(makeTip(3));
306
+ expect(tips.checkpointed.checkpoint.number).toEqual(CheckpointNumber(1));
307
+ // Verify block hashes in store are the new ones
308
+ expect(await tipsStore.getL2BlockHash(1)).toEqual(blockHashes.get(1));
309
+ expect(await tipsStore.getL2BlockHash(2)).toEqual(blockHashes.get(2));
310
+ expect(await tipsStore.getL2BlockHash(3)).toEqual(blockHashes.get(3));
311
+ });
312
+ it('handles reorg: prune proposed blocks back to checkpoint, then re-propose with different blocks', async ()=>{
313
+ // Propose blocks 1-5
314
+ const firstBlocks = await Promise.all(times(5, (i)=>makeBlock(i + 1)));
315
+ await tipsStore.handleBlockStreamEvent({
316
+ type: 'blocks-added',
317
+ blocks: firstBlocks
318
+ });
319
+ // Checkpoint all proposed blocks (1-5) - these are now committed
320
+ const checkpoint1 = await makeCheckpoint(1, firstBlocks);
321
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
322
+ // Propose more blocks 6-10 (not yet checkpointed, can be pruned)
323
+ const originalBlocks6to10 = await Promise.all(times(5, (i)=>makeBlock(i + 6)));
324
+ await tipsStore.handleBlockStreamEvent({
325
+ type: 'blocks-added',
326
+ blocks: originalBlocks6to10
327
+ });
328
+ let tips = await tipsStore.getL2Tips();
329
+ expect(tips.proposed).toEqual(makeTip(10));
330
+ expect(tips.checkpointed.block).toEqual(makeTip(5)); // Only blocks 1-5 are checkpointed
331
+ // Store original hashes for proposed (non-checkpointed) blocks 6-8
332
+ const originalHash6 = blockHashes.get(6);
333
+ const originalHash7 = blockHashes.get(7);
334
+ const originalHash8 = blockHashes.get(8);
335
+ // Prune proposed blocks back to checkpoint (block 5)
336
+ // This removes proposed blocks 6-10, but checkpoint remains at 5
337
+ await tipsStore.handleBlockStreamEvent({
338
+ type: 'chain-pruned',
339
+ block: makeBlockId(5),
340
+ reason: 'unproven',
341
+ checkpoint: {
342
+ number: CheckpointNumber.ZERO,
343
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
344
+ }
345
+ });
346
+ tips = await tipsStore.getL2Tips();
347
+ expect(tips.proposed).toEqual(makeTip(5));
348
+ expect(tips.checkpointed.block).toEqual(makeTip(5)); // Checkpoint unchanged
349
+ // Propose new blocks 6-8 (different from original 6-10)
350
+ blockHashes.delete(6);
351
+ blockHashes.delete(7);
352
+ blockHashes.delete(8);
353
+ const newBlocks = await Promise.all(times(3, (i)=>makeBlock(i + 6)));
354
+ await tipsStore.handleBlockStreamEvent({
355
+ type: 'blocks-added',
356
+ blocks: newBlocks
357
+ });
358
+ // Verify the new blocks have different hashes than the original ones
359
+ expect(blockHashes.get(6)).not.toEqual(originalHash6);
360
+ expect(blockHashes.get(7)).not.toEqual(originalHash7);
361
+ expect(blockHashes.get(8)).not.toEqual(originalHash8);
362
+ tips = await tipsStore.getL2Tips();
363
+ expect(tips.proposed).toEqual(makeTip(8));
364
+ expect(tips.checkpointed.block).toEqual(makeTip(5)); // Still at checkpoint 1
365
+ // Checkpoint all the new proposed blocks (6-8)
366
+ const checkpoint2 = await makeCheckpoint(2, newBlocks);
367
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint2));
368
+ tips = await tipsStore.getL2Tips();
369
+ expect(tips.proposed).toEqual(makeTip(8));
370
+ expect(tips.checkpointed.block).toEqual(makeTip(8));
371
+ expect(tips.checkpointed.checkpoint.number).toEqual(CheckpointNumber(2));
372
+ // Block hashes in the store should reflect the new blocks
373
+ expect(await tipsStore.getL2BlockHash(6)).toEqual(blockHashes.get(6));
374
+ expect(await tipsStore.getL2BlockHash(7)).toEqual(blockHashes.get(7));
375
+ expect(await tipsStore.getL2BlockHash(8)).toEqual(blockHashes.get(8));
376
+ // And should NOT equal the original hashes
377
+ expect(await tipsStore.getL2BlockHash(6)).not.toEqual(originalHash6);
378
+ expect(await tipsStore.getL2BlockHash(7)).not.toEqual(originalHash7);
379
+ expect(await tipsStore.getL2BlockHash(8)).not.toEqual(originalHash8);
380
+ });
381
+ it('handles reorg with different chain length after prune', async ()=>{
382
+ // Propose blocks 1-3
383
+ const firstBlocks = await Promise.all(times(3, (i)=>makeBlock(i + 1)));
384
+ await tipsStore.handleBlockStreamEvent({
385
+ type: 'blocks-added',
386
+ blocks: firstBlocks
387
+ });
388
+ // Checkpoint all proposed blocks (1-3) - these are now committed
389
+ const checkpoint1 = await makeCheckpoint(1, firstBlocks);
390
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
391
+ // Propose more blocks 4-10 (not yet checkpointed, can be pruned)
392
+ const originalBlocks4to10 = await Promise.all(times(7, (i)=>makeBlock(i + 4)));
393
+ await tipsStore.handleBlockStreamEvent({
394
+ type: 'blocks-added',
395
+ blocks: originalBlocks4to10
396
+ });
397
+ let tips = await tipsStore.getL2Tips();
398
+ expect(tips.proposed).toEqual(makeTip(10));
399
+ expect(tips.checkpointed.block).toEqual(makeTip(3)); // Only blocks 1-3 are checkpointed
400
+ // Prune proposed blocks back to checkpoint (block 3)
401
+ await tipsStore.handleBlockStreamEvent({
402
+ type: 'chain-pruned',
403
+ block: makeBlockId(3),
404
+ reason: 'unproven',
405
+ checkpoint: {
406
+ number: CheckpointNumber.ZERO,
407
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
408
+ }
409
+ });
410
+ tips = await tipsStore.getL2Tips();
411
+ expect(tips.proposed).toEqual(makeTip(3));
412
+ expect(tips.checkpointed.block).toEqual(makeTip(3)); // Checkpoint unchanged
413
+ // Now propose only 2 new blocks (4-5) instead of the original 7 blocks (4-10)
414
+ blockHashes.delete(4);
415
+ blockHashes.delete(5);
416
+ const newBlocks = await Promise.all(times(2, (i)=>makeBlock(i + 4)));
417
+ await tipsStore.handleBlockStreamEvent({
418
+ type: 'blocks-added',
419
+ blocks: newBlocks
420
+ });
421
+ tips = await tipsStore.getL2Tips();
422
+ expect(tips.proposed).toEqual(makeTip(5));
423
+ expect(tips.checkpointed.block).toEqual(makeTip(3)); // Still at checkpoint 1
424
+ // Checkpoint all the new proposed blocks (4-5)
425
+ const checkpoint2 = await makeCheckpoint(2, newBlocks);
426
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint2));
427
+ tips = await tipsStore.getL2Tips();
428
+ expect(tips.proposed).toEqual(makeTip(5));
429
+ expect(tips.checkpointed.block).toEqual(makeTip(5));
430
+ expect(tips.checkpointed.checkpoint.number).toEqual(CheckpointNumber(2));
431
+ });
432
+ it('handles reorg: prune back to proven tip (including checkpointed blocks), then re-propose and checkpoint', async ()=>{
433
+ // Propose blocks 1-3
434
+ const firstBlocks = await Promise.all(times(3, (i)=>makeBlock(i + 1)));
435
+ await tipsStore.handleBlockStreamEvent({
436
+ type: 'blocks-added',
437
+ blocks: firstBlocks
438
+ });
439
+ // Checkpoint all proposed blocks (1-3)
440
+ const checkpoint1 = await makeCheckpoint(1, firstBlocks);
441
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint1));
442
+ // Prove up to block 3
443
+ await tipsStore.handleBlockStreamEvent({
444
+ type: 'chain-proven',
445
+ block: makeBlockId(3)
446
+ });
447
+ let tips = await tipsStore.getL2Tips();
448
+ expect(tips.proposed).toEqual(makeTip(3));
449
+ expect(tips.checkpointed.block).toEqual(makeTip(3));
450
+ expect(tips.proven.block).toEqual(makeTip(3));
451
+ // Propose more blocks 4-6
452
+ const blocks4to6 = await Promise.all(times(3, (i)=>makeBlock(i + 4)));
453
+ await tipsStore.handleBlockStreamEvent({
454
+ type: 'blocks-added',
455
+ blocks: blocks4to6
456
+ });
457
+ // Checkpoint blocks 4-6 (now checkpointed is ahead of proven)
458
+ const checkpoint2 = await makeCheckpoint(2, blocks4to6);
459
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint2));
460
+ tips = await tipsStore.getL2Tips();
461
+ expect(tips.proposed).toEqual(makeTip(6));
462
+ expect(tips.checkpointed.block).toEqual(makeTip(6));
463
+ expect(tips.proven.block).toEqual(makeTip(3)); // Proven is behind checkpointed
464
+ // Propose even more blocks 7-10 (proposed is now ahead of checkpointed)
465
+ const originalBlocks7to10 = await Promise.all(times(4, (i)=>makeBlock(i + 7)));
466
+ await tipsStore.handleBlockStreamEvent({
467
+ type: 'blocks-added',
468
+ blocks: originalBlocks7to10
469
+ });
470
+ tips = await tipsStore.getL2Tips();
471
+ // Now all three tips are different: proposed=10, checkpointed=6, proven=3
472
+ expect(tips.proposed).toEqual(makeTip(10));
473
+ expect(tips.checkpointed.block).toEqual(makeTip(6));
474
+ expect(tips.proven.block).toEqual(makeTip(3));
475
+ // Store original hashes for blocks 4-7
476
+ const originalHash4 = blockHashes.get(4);
477
+ const originalHash5 = blockHashes.get(5);
478
+ const originalHash6 = blockHashes.get(6);
479
+ const originalHash7 = blockHashes.get(7);
480
+ // Prune all the way back to proven tip (block 3)
481
+ // This prunes both proposed blocks (7-10) AND checkpointed blocks (4-6)
482
+ await tipsStore.handleBlockStreamEvent({
483
+ type: 'chain-pruned',
484
+ block: makeBlockId(3),
485
+ reason: 'unproven',
486
+ checkpoint: {
487
+ number: CheckpointNumber.ZERO,
488
+ hash: GENESIS_CHECKPOINT_HEADER_HASH.toString()
489
+ }
490
+ });
491
+ tips = await tipsStore.getL2Tips();
492
+ expect(tips.proposed).toEqual(makeTip(3));
493
+ expect(tips.checkpointed.block).toEqual(makeTip(3)); // Checkpointed also pruned back
494
+ expect(tips.proven.block).toEqual(makeTip(3));
495
+ // Propose new blocks 4-7 (different from original)
496
+ blockHashes.delete(4);
497
+ blockHashes.delete(5);
498
+ blockHashes.delete(6);
499
+ blockHashes.delete(7);
500
+ const newBlocks = await Promise.all(times(4, (i)=>makeBlock(i + 4)));
501
+ await tipsStore.handleBlockStreamEvent({
502
+ type: 'blocks-added',
503
+ blocks: newBlocks
504
+ });
505
+ // Verify the new blocks have different hashes than the original ones
506
+ expect(blockHashes.get(4)).not.toEqual(originalHash4);
507
+ expect(blockHashes.get(5)).not.toEqual(originalHash5);
508
+ expect(blockHashes.get(6)).not.toEqual(originalHash6);
509
+ expect(blockHashes.get(7)).not.toEqual(originalHash7);
510
+ tips = await tipsStore.getL2Tips();
511
+ expect(tips.proposed).toEqual(makeTip(7));
512
+ expect(tips.proven.block).toEqual(makeTip(3));
513
+ // Checkpoint all the new proposed blocks (4-7)
514
+ const checkpoint3 = await makeCheckpoint(3, newBlocks);
515
+ await tipsStore.handleBlockStreamEvent(await makeCheckpointedEvent(checkpoint3));
516
+ tips = await tipsStore.getL2Tips();
517
+ expect(tips.proposed).toEqual(makeTip(7));
518
+ expect(tips.checkpointed.block).toEqual(makeTip(7));
519
+ expect(tips.checkpointed.checkpoint.number).toEqual(CheckpointNumber(3));
520
+ expect(tips.proven.block).toEqual(makeTip(3)); // Proven hasn't moved yet
521
+ // Block hashes in the store should reflect the new blocks
522
+ expect(await tipsStore.getL2BlockHash(4)).toEqual(blockHashes.get(4));
523
+ expect(await tipsStore.getL2BlockHash(5)).toEqual(blockHashes.get(5));
524
+ expect(await tipsStore.getL2BlockHash(6)).toEqual(blockHashes.get(6));
525
+ expect(await tipsStore.getL2BlockHash(7)).toEqual(blockHashes.get(7));
526
+ // And should NOT equal the original hashes
527
+ expect(await tipsStore.getL2BlockHash(4)).not.toEqual(originalHash4);
528
+ expect(await tipsStore.getL2BlockHash(5)).not.toEqual(originalHash5);
529
+ expect(await tipsStore.getL2BlockHash(6)).not.toEqual(originalHash6);
530
+ expect(await tipsStore.getL2BlockHash(7)).not.toEqual(originalHash7);
89
531
  });
90
532
  // Regression test for #13142
91
533
  it('does not blow up when setting proven chain on an unseen block number', async ()=>{
92
534
  await tipsStore.handleBlockStreamEvent({
93
535
  type: 'blocks-added',
94
536
  blocks: [
95
- makeBlock(5)
537
+ await makeBlock(5)
96
538
  ]
97
539
  });
98
540
  await tipsStore.handleBlockStreamEvent({
@@ -100,6 +542,9 @@ export function testL2TipsStore(makeTipsStore) {
100
542
  block: makeBlockId(3)
101
543
  });
102
544
  const tips = await tipsStore.getL2Tips();
103
- expect(tips).toEqual(makeTips(5, 3, 0));
545
+ expect(tips.proposed).toEqual(makeTip(5));
546
+ expect(tips.proven.block).toEqual(makeTip(3));
547
+ // No checkpoint for block 3 since it wasn't checkpointed
548
+ expect(tips.proven.checkpoint.number).toEqual(CheckpointNumber.ZERO);
104
549
  });
105
550
  }
@@ -2,49 +2,49 @@ import { EpochNumber } from '@aztec/foundation/branded-types';
2
2
  import { EthAddress } from '@aztec/foundation/eth-address';
3
3
  import { type ZodFor } from '@aztec/foundation/schemas';
4
4
  import { BufferReader } from '@aztec/foundation/serialize';
5
- import { type L2BlockInfo } from './l2_block_info.js';
5
+ import { type CheckpointInfo } from '../checkpoint/checkpoint_info.js';
6
6
  import { CommitteeAttestation } from './proposal/committee_attestation.js';
7
- /** Subtype for invalid block validation results */
8
- export type ValidateBlockNegativeResult = {
7
+ /** Subtype for invalid checkpoint validation results */
8
+ export type ValidateCheckpointNegativeResult = {
9
9
  valid: false;
10
- /** Identifiers from the invalid block */
11
- block: L2BlockInfo;
12
- /** Committee members at the epoch this block was proposed */
10
+ /** Identifiers from the invalid checkpoint */
11
+ checkpoint: CheckpointInfo;
12
+ /** Committee members at the epoch this checkpoint was proposed */
13
13
  committee: EthAddress[];
14
- /** Epoch in which this block was proposed */
14
+ /** Epoch in which this checkpoint was proposed */
15
15
  epoch: EpochNumber;
16
16
  /** Proposer selection seed for the epoch */
17
17
  seed: bigint;
18
- /** List of committee members who signed this block proposal */
18
+ /** List of committee members who signed this checkpoint proposal */
19
19
  attestors: EthAddress[];
20
- /** Committee attestations for this block as they were posted to L1 */
20
+ /** Committee attestations for this checkpoint as they were posted to L1 */
21
21
  attestations: CommitteeAttestation[];
22
- /** Reason for the block being invalid: not enough attestations were posted */
22
+ /** Reason for the checkpoint being invalid: not enough attestations were posted */
23
23
  reason: 'insufficient-attestations';
24
24
  } | {
25
25
  valid: false;
26
- /** Identifiers from the invalid block */
27
- block: L2BlockInfo;
28
- /** Committee members at the epoch this block was proposed */
26
+ /** Identifiers from the invalid checkpoint */
27
+ checkpoint: CheckpointInfo;
28
+ /** Committee members at the epoch this checkpoint was proposed */
29
29
  committee: EthAddress[];
30
- /** Epoch in which this block was proposed */
30
+ /** Epoch in which this checkpoint was proposed */
31
31
  epoch: EpochNumber;
32
32
  /** Proposer selection seed for the epoch */
33
33
  seed: bigint;
34
- /** List of committee members who signed this block proposal */
34
+ /** List of committee members who signed this checkpoint proposal */
35
35
  attestors: EthAddress[];
36
- /** Committee attestations for this block as they were posted to L1 */
36
+ /** Committee attestations for this checkpoint as they were posted to L1 */
37
37
  attestations: CommitteeAttestation[];
38
- /** Reason for the block being invalid: an invalid attestation was posted */
38
+ /** Reason for the checkpoint being invalid: an invalid attestation was posted */
39
39
  reason: 'invalid-attestation';
40
40
  /** Index in the attestations array of the invalid attestation posted */
41
41
  invalidIndex: number;
42
42
  };
43
- /** Result type for validating a block attestations */
44
- export type ValidateBlockResult = {
43
+ /** Result type for validating checkpoint attestations */
44
+ export type ValidateCheckpointResult = {
45
45
  valid: true;
46
- } | ValidateBlockNegativeResult;
47
- export declare const ValidateBlockResultSchema: ZodFor<ValidateBlockResult>;
48
- export declare function serializeValidateBlockResult(result: ValidateBlockResult): Buffer;
49
- export declare function deserializeValidateBlockResult(bufferOrReader: Buffer | BufferReader): ValidateBlockResult;
50
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGVfYmxvY2tfcmVzdWx0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYmxvY2svdmFsaWRhdGVfYmxvY2tfcmVzdWx0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQXFCLE1BQU0saUNBQWlDLENBQUM7QUFDakYsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQzNELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBVyxNQUFNLDJCQUEyQixDQUFDO0FBQ2pFLE9BQU8sRUFBRSxZQUFZLEVBQXFCLE1BQU0sNkJBQTZCLENBQUM7QUFJOUUsT0FBTyxFQUFtQixLQUFLLFdBQVcsRUFBNEMsTUFBTSxvQkFBb0IsQ0FBQztBQUNqSCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQztBQUUzRSxtREFBbUQ7QUFDbkQsTUFBTSxNQUFNLDJCQUEyQixHQUNuQztJQUNFLEtBQUssRUFBRSxLQUFLLENBQUM7SUFDYix5Q0FBeUM7SUFDekMsS0FBSyxFQUFFLFdBQVcsQ0FBQztJQUNuQiw2REFBNkQ7SUFDN0QsU0FBUyxFQUFFLFVBQVUsRUFBRSxDQUFDO0lBQ3hCLDZDQUE2QztJQUM3QyxLQUFLLEVBQUUsV0FBVyxDQUFDO0lBQ25CLDRDQUE0QztJQUM1QyxJQUFJLEVBQUUsTUFBTSxDQUFDO0lBQ2IsK0RBQStEO0lBQy9ELFNBQVMsRUFBRSxVQUFVLEVBQUUsQ0FBQztJQUN4QixzRUFBc0U7SUFDdEUsWUFBWSxFQUFFLG9CQUFvQixFQUFFLENBQUM7SUFDckMsOEVBQThFO0lBQzlFLE1BQU0sRUFBRSwyQkFBMkIsQ0FBQztDQUNyQyxHQUNEO0lBQ0UsS0FBSyxFQUFFLEtBQUssQ0FBQztJQUNiLHlDQUF5QztJQUN6QyxLQUFLLEVBQUUsV0FBVyxDQUFDO0lBQ25CLDZEQUE2RDtJQUM3RCxTQUFTLEVBQUUsVUFBVSxFQUFFLENBQUM7SUFDeEIsNkNBQTZDO0lBQzdDLEtBQUssRUFBRSxXQUFXLENBQUM7SUFDbkIsNENBQTRDO0lBQzVDLElBQUksRUFBRSxNQUFNLENBQUM7SUFDYiwrREFBK0Q7SUFDL0QsU0FBUyxFQUFFLFVBQVUsRUFBRSxDQUFDO0lBQ3hCLHNFQUFzRTtJQUN0RSxZQUFZLEVBQUUsb0JBQW9CLEVBQUUsQ0FBQztJQUNyQyw0RUFBNEU7SUFDNUUsTUFBTSxFQUFFLHFCQUFxQixDQUFDO0lBQzlCLHdFQUF3RTtJQUN4RSxZQUFZLEVBQUUsTUFBTSxDQUFDO0NBQ3RCLENBQUM7QUFHTixzREFBc0Q7QUFDdEQsTUFBTSxNQUFNLG1CQUFtQixHQUFHO0lBQUUsS0FBSyxFQUFFLElBQUksQ0FBQTtDQUFFLEdBQUcsMkJBQTJCLENBQUM7QUFFaEYsZUFBTyxNQUFNLHlCQUF5QixFQUFFLE1BQU0sQ0FBQyxtQkFBbUIsQ0F1QmhFLENBQUM7QUFFSCx3QkFBZ0IsNEJBQTRCLENBQUMsTUFBTSxFQUFFLG1CQUFtQixHQUFHLE1BQU0sQ0FxQmhGO0FBRUQsd0JBQWdCLDhCQUE4QixDQUFDLGNBQWMsRUFBRSxNQUFNLEdBQUcsWUFBWSxHQUFHLG1CQUFtQixDQXNCekcifQ==
46
+ } | ValidateCheckpointNegativeResult;
47
+ export declare const ValidateCheckpointResultSchema: ZodFor<ValidateCheckpointResult>;
48
+ export declare function serializeValidateCheckpointResult(result: ValidateCheckpointResult): Buffer;
49
+ export declare function deserializeValidateCheckpointResult(bufferOrReader: Buffer | BufferReader): ValidateCheckpointResult;
50
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGVfYmxvY2tfcmVzdWx0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYmxvY2svdmFsaWRhdGVfYmxvY2tfcmVzdWx0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQXFCLE1BQU0saUNBQWlDLENBQUM7QUFDakYsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQzNELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBVyxNQUFNLDJCQUEyQixDQUFDO0FBQ2pFLE9BQU8sRUFBRSxZQUFZLEVBQXFCLE1BQU0sNkJBQTZCLENBQUM7QUFJOUUsT0FBTyxFQUNMLEtBQUssY0FBYyxFQUlwQixNQUFNLGtDQUFrQyxDQUFDO0FBQzFDLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBRTNFLHdEQUF3RDtBQUN4RCxNQUFNLE1BQU0sZ0NBQWdDLEdBQ3hDO0lBQ0UsS0FBSyxFQUFFLEtBQUssQ0FBQztJQUNiLDhDQUE4QztJQUM5QyxVQUFVLEVBQUUsY0FBYyxDQUFDO0lBQzNCLGtFQUFrRTtJQUNsRSxTQUFTLEVBQUUsVUFBVSxFQUFFLENBQUM7SUFDeEIsa0RBQWtEO0lBQ2xELEtBQUssRUFBRSxXQUFXLENBQUM7SUFDbkIsNENBQTRDO0lBQzVDLElBQUksRUFBRSxNQUFNLENBQUM7SUFDYixvRUFBb0U7SUFDcEUsU0FBUyxFQUFFLFVBQVUsRUFBRSxDQUFDO0lBQ3hCLDJFQUEyRTtJQUMzRSxZQUFZLEVBQUUsb0JBQW9CLEVBQUUsQ0FBQztJQUNyQyxtRkFBbUY7SUFDbkYsTUFBTSxFQUFFLDJCQUEyQixDQUFDO0NBQ3JDLEdBQ0Q7SUFDRSxLQUFLLEVBQUUsS0FBSyxDQUFDO0lBQ2IsOENBQThDO0lBQzlDLFVBQVUsRUFBRSxjQUFjLENBQUM7SUFDM0Isa0VBQWtFO0lBQ2xFLFNBQVMsRUFBRSxVQUFVLEVBQUUsQ0FBQztJQUN4QixrREFBa0Q7SUFDbEQsS0FBSyxFQUFFLFdBQVcsQ0FBQztJQUNuQiw0Q0FBNEM7SUFDNUMsSUFBSSxFQUFFLE1BQU0sQ0FBQztJQUNiLG9FQUFvRTtJQUNwRSxTQUFTLEVBQUUsVUFBVSxFQUFFLENBQUM7SUFDeEIsMkVBQTJFO0lBQzNFLFlBQVksRUFBRSxvQkFBb0IsRUFBRSxDQUFDO0lBQ3JDLGlGQUFpRjtJQUNqRixNQUFNLEVBQUUscUJBQXFCLENBQUM7SUFDOUIsd0VBQXdFO0lBQ3hFLFlBQVksRUFBRSxNQUFNLENBQUM7Q0FDdEIsQ0FBQztBQUVOLHlEQUF5RDtBQUN6RCxNQUFNLE1BQU0sd0JBQXdCLEdBQUc7SUFBRSxLQUFLLEVBQUUsSUFBSSxDQUFBO0NBQUUsR0FBRyxnQ0FBZ0MsQ0FBQztBQUUxRixlQUFPLE1BQU0sOEJBQThCLEVBQUUsTUFBTSxDQUFDLHdCQUF3QixDQXVCMUUsQ0FBQztBQUVILHdCQUFnQixpQ0FBaUMsQ0FBQyxNQUFNLEVBQUUsd0JBQXdCLEdBQUcsTUFBTSxDQXFCMUY7QUFFRCx3QkFBZ0IsbUNBQW1DLENBQUMsY0FBYyxFQUFFLE1BQU0sR0FBRyxZQUFZLEdBQUcsd0JBQXdCLENBc0JuSCJ9