@aztec/stdlib 3.0.0-nightly.20250917 → 3.0.0-nightly.20250918

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 (184) hide show
  1. package/dest/avm/avm.d.ts +6 -0
  2. package/dest/avm/avm.d.ts.map +1 -1
  3. package/dest/avm/avm_circuit_public_inputs.d.ts +6 -1
  4. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  5. package/dest/avm/avm_circuit_public_inputs.js +11 -6
  6. package/dest/avm/avm_proving_request.d.ts +7 -0
  7. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  8. package/dest/block/body.d.ts +4 -1
  9. package/dest/block/body.d.ts.map +1 -1
  10. package/dest/block/body.js +16 -5
  11. package/dest/block/index.d.ts +1 -0
  12. package/dest/block/index.d.ts.map +1 -1
  13. package/dest/block/index.js +1 -0
  14. package/dest/block/l2_block.d.ts +8 -5
  15. package/dest/block/l2_block.d.ts.map +1 -1
  16. package/dest/block/l2_block.js +14 -7
  17. package/dest/block/l2_block_code_to_purge.d.ts +3 -14
  18. package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
  19. package/dest/block/l2_block_code_to_purge.js +23 -13
  20. package/dest/block/l2_block_header.d.ts +100 -0
  21. package/dest/block/l2_block_header.d.ts.map +1 -0
  22. package/dest/block/l2_block_header.js +146 -0
  23. package/dest/block/l2_block_stream/l2_tips_memory_store.js +1 -1
  24. package/dest/block/published_l2_block.d.ts +2 -2
  25. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  26. package/dest/block/test/l2_tips_store_test_suite.js +1 -3
  27. package/dest/interfaces/block-builder.d.ts +1 -2
  28. package/dest/interfaces/block-builder.d.ts.map +1 -1
  29. package/dest/interfaces/epoch-prover.d.ts +25 -8
  30. package/dest/interfaces/epoch-prover.d.ts.map +1 -1
  31. package/dest/interfaces/proving-job.d.ts +170 -61
  32. package/dest/interfaces/proving-job.d.ts.map +1 -1
  33. package/dest/interfaces/proving-job.js +101 -39
  34. package/dest/interfaces/server_circuit_prover.d.ts +19 -16
  35. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  36. package/dest/interfaces/validator.d.ts +3 -2
  37. package/dest/interfaces/validator.d.ts.map +1 -1
  38. package/dest/kernel/private_circuit_public_inputs.d.ts +4 -4
  39. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  40. package/dest/kernel/private_circuit_public_inputs.js +7 -7
  41. package/dest/kernel/private_context_inputs.d.ts +2 -2
  42. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  43. package/dest/kernel/private_context_inputs.js +4 -4
  44. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +1 -1
  45. package/dest/p2p/consensus_payload.d.ts +7 -6
  46. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  47. package/dest/p2p/consensus_payload.js +7 -6
  48. package/dest/parity/root_parity_input.d.ts +1 -1
  49. package/dest/proofs/proof_data.d.ts +1 -1
  50. package/dest/proofs/proof_data.d.ts.map +1 -1
  51. package/dest/proofs/proof_data.js +2 -2
  52. package/dest/proofs/proving_request_type.d.ts +13 -8
  53. package/dest/proofs/proving_request_type.d.ts.map +1 -1
  54. package/dest/proofs/proving_request_type.js +13 -8
  55. package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts +1 -1
  56. package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +1 -1
  57. package/dest/rollup/base_or_merge_rollup_public_inputs.js +1 -1
  58. package/dest/rollup/base_rollup_hints.d.ts +12 -3
  59. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  60. package/dest/rollup/base_rollup_hints.js +11 -5
  61. package/dest/rollup/block_constant_data.d.ts +20 -6
  62. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  63. package/dest/rollup/block_constant_data.js +15 -7
  64. package/dest/rollup/block_merge_rollup.d.ts +10 -9
  65. package/dest/rollup/block_merge_rollup.d.ts.map +1 -1
  66. package/dest/rollup/block_merge_rollup.js +14 -13
  67. package/dest/rollup/block_rollup_public_inputs.d.ts +124 -0
  68. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -0
  69. package/dest/rollup/block_rollup_public_inputs.js +85 -0
  70. package/dest/rollup/block_root_rollup.d.ts +148 -184
  71. package/dest/rollup/block_root_rollup.d.ts.map +1 -1
  72. package/dest/rollup/block_root_rollup.js +211 -260
  73. package/dest/rollup/checkpoint_constant_data.d.ts +54 -0
  74. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -0
  75. package/dest/rollup/checkpoint_constant_data.js +55 -0
  76. package/dest/{tx/proposed_block_header.d.ts → rollup/checkpoint_header.d.ts} +11 -12
  77. package/dest/rollup/checkpoint_header.d.ts.map +1 -0
  78. package/dest/{tx/proposed_block_header.js → rollup/checkpoint_header.js} +9 -9
  79. package/dest/rollup/checkpoint_merge_rollup.d.ts +30 -0
  80. package/dest/rollup/checkpoint_merge_rollup.d.ts.map +1 -0
  81. package/dest/rollup/checkpoint_merge_rollup.js +37 -0
  82. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +105 -0
  83. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -0
  84. package/dest/rollup/checkpoint_rollup_public_inputs.js +105 -0
  85. package/dest/rollup/checkpoint_root_rollup.d.ts +117 -0
  86. package/dest/rollup/checkpoint_root_rollup.d.ts.map +1 -0
  87. package/dest/rollup/checkpoint_root_rollup.js +178 -0
  88. package/dest/rollup/epoch_constant_data.d.ts +19 -2
  89. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  90. package/dest/rollup/epoch_constant_data.js +20 -7
  91. package/dest/rollup/index.d.ts +8 -5
  92. package/dest/rollup/index.d.ts.map +1 -1
  93. package/dest/rollup/index.js +8 -5
  94. package/dest/rollup/rollup_proof_data.d.ts +10 -0
  95. package/dest/rollup/rollup_proof_data.d.ts.map +1 -0
  96. package/dest/rollup/rollup_proof_data.js +1 -0
  97. package/dest/rollup/root_rollup.d.ts +26 -23
  98. package/dest/rollup/root_rollup.d.ts.map +1 -1
  99. package/dest/rollup/root_rollup.js +28 -39
  100. package/dest/stats/stats.d.ts +1 -1
  101. package/dest/stats/stats.d.ts.map +1 -1
  102. package/dest/tests/factories.d.ts +15 -40
  103. package/dest/tests/factories.d.ts.map +1 -1
  104. package/dest/tests/factories.js +70 -78
  105. package/dest/tests/mocks.d.ts +3 -2
  106. package/dest/tests/mocks.d.ts.map +1 -1
  107. package/dest/tests/mocks.js +3 -3
  108. package/dest/tx/block_header.d.ts +12 -13
  109. package/dest/tx/block_header.d.ts.map +1 -1
  110. package/dest/tx/block_header.js +16 -21
  111. package/dest/tx/global_variables.d.ts.map +1 -1
  112. package/dest/tx/global_variables.js +0 -1
  113. package/dest/tx/index.d.ts +0 -1
  114. package/dest/tx/index.d.ts.map +1 -1
  115. package/dest/tx/index.js +0 -1
  116. package/dest/tx/private_execution_result.d.ts +2 -2
  117. package/dest/tx/private_execution_result.d.ts.map +1 -1
  118. package/dest/tx/private_execution_result.js +3 -3
  119. package/dest/tx/tx_constant_data.d.ts +4 -4
  120. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  121. package/dest/tx/tx_constant_data.js +6 -6
  122. package/dest/tx/tx_effect.d.ts +0 -3
  123. package/dest/tx/tx_effect.d.ts.map +1 -1
  124. package/dest/tx/tx_effect.js +2 -7
  125. package/package.json +8 -8
  126. package/src/avm/avm_circuit_public_inputs.ts +10 -0
  127. package/src/block/body.ts +23 -6
  128. package/src/block/index.ts +1 -0
  129. package/src/block/l2_block.ts +18 -8
  130. package/src/block/l2_block_code_to_purge.ts +30 -31
  131. package/src/block/l2_block_header.ts +232 -0
  132. package/src/block/l2_block_stream/l2_tips_memory_store.ts +1 -1
  133. package/src/block/test/l2_tips_store_test_suite.ts +1 -2
  134. package/src/interfaces/block-builder.ts +1 -6
  135. package/src/interfaces/epoch-prover.ts +34 -10
  136. package/src/interfaces/proving-job.ts +166 -51
  137. package/src/interfaces/server_circuit_prover.ts +65 -29
  138. package/src/interfaces/validator.ts +3 -2
  139. package/src/kernel/private_circuit_public_inputs.ts +5 -5
  140. package/src/kernel/private_context_inputs.ts +2 -2
  141. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +1 -1
  142. package/src/p2p/consensus_payload.ts +8 -7
  143. package/src/proofs/proof_data.ts +1 -6
  144. package/src/proofs/proving_request_type.ts +8 -3
  145. package/src/rollup/base_or_merge_rollup_public_inputs.ts +1 -1
  146. package/src/rollup/base_rollup_hints.ts +9 -1
  147. package/src/rollup/block_constant_data.ts +13 -3
  148. package/src/rollup/block_merge_rollup.ts +13 -11
  149. package/src/rollup/block_rollup_public_inputs.ts +123 -0
  150. package/src/rollup/block_root_rollup.ts +209 -264
  151. package/src/rollup/checkpoint_constant_data.ts +84 -0
  152. package/src/{tx/proposed_block_header.ts → rollup/checkpoint_header.ts} +16 -17
  153. package/src/rollup/checkpoint_merge_rollup.ts +50 -0
  154. package/src/rollup/{block_root_or_block_merge_public_inputs.ts → checkpoint_rollup_public_inputs.ts} +26 -52
  155. package/src/rollup/checkpoint_root_rollup.ts +216 -0
  156. package/src/rollup/epoch_constant_data.ts +32 -8
  157. package/src/rollup/index.ts +8 -5
  158. package/src/rollup/rollup_proof_data.ts +12 -0
  159. package/src/rollup/root_rollup.ts +30 -41
  160. package/src/stats/stats.ts +8 -3
  161. package/src/tests/factories.ts +124 -135
  162. package/src/tests/mocks.ts +6 -13
  163. package/src/tx/block_header.ts +17 -32
  164. package/src/tx/global_variables.ts +0 -1
  165. package/src/tx/index.ts +0 -1
  166. package/src/tx/private_execution_result.ts +3 -3
  167. package/src/tx/tx_constant_data.ts +4 -4
  168. package/src/tx/tx_effect.ts +2 -7
  169. package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +0 -134
  170. package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +0 -1
  171. package/dest/rollup/block_root_or_block_merge_public_inputs.js +0 -125
  172. package/dest/rollup/empty_block_root_rollup_inputs.d.ts +0 -51
  173. package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +0 -1
  174. package/dest/rollup/empty_block_root_rollup_inputs.js +0 -65
  175. package/dest/rollup/padding_block_root_rollup_inputs.d.ts +0 -20
  176. package/dest/rollup/padding_block_root_rollup_inputs.d.ts.map +0 -1
  177. package/dest/rollup/padding_block_root_rollup_inputs.js +0 -39
  178. package/dest/rollup/previous_rollup_block_data.d.ts +0 -47
  179. package/dest/rollup/previous_rollup_block_data.d.ts.map +0 -1
  180. package/dest/rollup/previous_rollup_block_data.js +0 -37
  181. package/dest/tx/proposed_block_header.d.ts.map +0 -1
  182. package/src/rollup/empty_block_root_rollup_inputs.ts +0 -80
  183. package/src/rollup/padding_block_root_rollup_inputs.ts +0 -47
  184. package/src/rollup/previous_rollup_block_data.ts +0 -48
@@ -7,21 +7,22 @@ import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
7
7
  import { inspect } from 'util';
8
8
  import { z } from 'zod';
9
9
  import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
10
- import { ContentCommitment } from './content_commitment.js';
11
10
  import { GlobalVariables } from './global_variables.js';
12
- import { ProposedBlockHeader } from './proposed_block_header.js';
13
11
  import { StateReference } from './state_reference.js';
14
12
  /** A header of an L2 block. */ export class BlockHeader {
15
13
  lastArchive;
16
- contentCommitment;
17
14
  state;
15
+ spongeBlobHash;
18
16
  globalVariables;
19
17
  totalFees;
20
18
  totalManaUsed;
21
- constructor(/** Snapshot of archive before the block is applied. */ lastArchive, /** Hash of the body of an L2 block. */ contentCommitment, /** State reference. */ state, /** Global variables of an L2 block. */ globalVariables, /** Total fees in the block, computed by the root rollup circuit */ totalFees, /** Total mana used in the block, computed by the root rollup circuit */ totalManaUsed){
19
+ constructor(/** Snapshot of archive before the block is applied. */ lastArchive, /** State reference. */ state, /**
20
+ * Hash of the sponge blob after the tx effects of this block has been applied.
21
+ * May contain tx effects from the previous blocks in the same checkpoint.
22
+ */ spongeBlobHash, /** Global variables of an L2 block. */ globalVariables, /** Total fees in the block, computed by the root rollup circuit */ totalFees, /** Total mana used in the block, computed by the root rollup circuit */ totalManaUsed){
22
23
  this.lastArchive = lastArchive;
23
- this.contentCommitment = contentCommitment;
24
24
  this.state = state;
25
+ this.spongeBlobHash = spongeBlobHash;
25
26
  this.globalVariables = globalVariables;
26
27
  this.totalFees = totalFees;
27
28
  this.totalManaUsed = totalManaUsed;
@@ -29,19 +30,18 @@ import { StateReference } from './state_reference.js';
29
30
  static get schema() {
30
31
  return z.object({
31
32
  lastArchive: AppendOnlyTreeSnapshot.schema,
32
- contentCommitment: ContentCommitment.schema,
33
33
  state: StateReference.schema,
34
+ spongeBlobHash: schemas.Fr,
34
35
  globalVariables: GlobalVariables.schema,
35
36
  totalFees: schemas.Fr,
36
37
  totalManaUsed: schemas.Fr
37
38
  }).transform(BlockHeader.from);
38
39
  }
39
40
  static getFields(fields) {
40
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
41
41
  return [
42
42
  fields.lastArchive,
43
- fields.contentCommitment,
44
43
  fields.state,
44
+ fields.spongeBlobHash,
45
45
  fields.globalVariables,
46
46
  fields.totalFees,
47
47
  fields.totalManaUsed
@@ -57,7 +57,7 @@ import { StateReference } from './state_reference.js';
57
57
  return this.globalVariables.blockNumber;
58
58
  }
59
59
  getSize() {
60
- return this.lastArchive.getSize() + this.contentCommitment.getSize() + this.state.getSize() + this.globalVariables.getSize() + this.totalFees.size + this.totalManaUsed.size;
60
+ return this.lastArchive.getSize() + this.state.getSize() + this.spongeBlobHash.size + this.globalVariables.getSize() + this.totalFees.size + this.totalManaUsed.size;
61
61
  }
62
62
  toBuffer() {
63
63
  return serializeToBuffer(...BlockHeader.getFields(this));
@@ -74,17 +74,17 @@ import { StateReference } from './state_reference.js';
74
74
  }
75
75
  static fromBuffer(buffer) {
76
76
  const reader = BufferReader.asReader(buffer);
77
- return new BlockHeader(reader.readObject(AppendOnlyTreeSnapshot), reader.readObject(ContentCommitment), reader.readObject(StateReference), reader.readObject(GlobalVariables), reader.readObject(Fr), reader.readObject(Fr));
77
+ return new BlockHeader(reader.readObject(AppendOnlyTreeSnapshot), reader.readObject(StateReference), reader.readObject(Fr), reader.readObject(GlobalVariables), reader.readObject(Fr), reader.readObject(Fr));
78
78
  }
79
79
  static fromFields(fields) {
80
80
  const reader = FieldReader.asReader(fields);
81
- return new BlockHeader(AppendOnlyTreeSnapshot.fromFields(reader), ContentCommitment.fromFields(reader), StateReference.fromFields(reader), GlobalVariables.fromFields(reader), reader.readField(), reader.readField());
81
+ return new BlockHeader(AppendOnlyTreeSnapshot.fromFields(reader), StateReference.fromFields(reader), reader.readField(), GlobalVariables.fromFields(reader), reader.readField(), reader.readField());
82
82
  }
83
83
  static empty(fields = {}) {
84
84
  return BlockHeader.from({
85
85
  lastArchive: AppendOnlyTreeSnapshot.empty(),
86
- contentCommitment: ContentCommitment.empty(),
87
86
  state: StateReference.empty(),
87
+ spongeBlobHash: Fr.ZERO,
88
88
  globalVariables: GlobalVariables.empty(),
89
89
  totalFees: Fr.ZERO,
90
90
  totalManaUsed: Fr.ZERO,
@@ -92,7 +92,7 @@ import { StateReference } from './state_reference.js';
92
92
  });
93
93
  }
94
94
  isEmpty() {
95
- return this.lastArchive.isEmpty() && this.contentCommitment.isEmpty() && this.state.isEmpty() && this.globalVariables.isEmpty() && this.totalFees.isZero() && this.totalManaUsed.isZero();
95
+ return this.lastArchive.isEmpty() && this.state.isEmpty() && this.spongeBlobHash.isZero() && this.globalVariables.isEmpty() && this.totalFees.isZero() && this.totalManaUsed.isZero();
96
96
  }
97
97
  /**
98
98
  * Serializes this instance into a string.
@@ -106,14 +106,11 @@ import { StateReference } from './state_reference.js';
106
106
  hash() {
107
107
  return poseidon2HashWithSeparator(this.toFields(), GeneratorIndex.BLOCK_HASH);
108
108
  }
109
- toPropose() {
110
- return new ProposedBlockHeader(this.lastArchive.root, this.contentCommitment, this.globalVariables.slotNumber, this.globalVariables.timestamp, this.globalVariables.coinbase, this.globalVariables.feeRecipient, this.globalVariables.gasFees, this.totalManaUsed);
111
- }
112
109
  toInspect() {
113
110
  return {
114
111
  lastArchive: this.lastArchive.root.toString(),
115
- contentCommitment: this.contentCommitment.toInspect(),
116
112
  state: this.state.toInspect(),
113
+ spongeBlobHash: this.spongeBlobHash.toBigInt(),
117
114
  globalVariables: this.globalVariables.toInspect(),
118
115
  totalFees: this.totalFees.toBigInt(),
119
116
  totalManaUsed: this.totalManaUsed.toBigInt()
@@ -122,19 +119,17 @@ import { StateReference } from './state_reference.js';
122
119
  [inspect.custom]() {
123
120
  return `Header {
124
121
  lastArchive: ${inspect(this.lastArchive)},
125
- contentCommitment.blobsHash: ${inspect(this.contentCommitment.blobsHash)},
126
- contentCommitment.inHash: ${inspect(this.contentCommitment.inHash)},
127
- contentCommitment.outHash: ${inspect(this.contentCommitment.outHash)},
128
122
  state.l1ToL2MessageTree: ${inspect(this.state.l1ToL2MessageTree)},
129
123
  state.noteHashTree: ${inspect(this.state.partial.noteHashTree)},
130
124
  state.nullifierTree: ${inspect(this.state.partial.nullifierTree)},
131
125
  state.publicDataTree: ${inspect(this.state.partial.publicDataTree)},
126
+ spongeBlobHash: ${this.spongeBlobHash},
132
127
  globalVariables: ${inspect(this.globalVariables)},
133
128
  totalFees: ${this.totalFees},
134
129
  totalManaUsed: ${this.totalManaUsed},
135
130
  }`;
136
131
  }
137
132
  equals(other) {
138
- return this.contentCommitment.equals(other.contentCommitment) && this.state.equals(other.state) && this.globalVariables.equals(other.globalVariables) && this.totalFees.equals(other.totalFees) && this.totalManaUsed.equals(other.totalManaUsed) && this.lastArchive.equals(other.lastArchive);
133
+ return this.lastArchive.equals(other.lastArchive) && this.state.equals(other.state) && this.spongeBlobHash.equals(other.spongeBlobHash) && this.globalVariables.equals(other.globalVariables) && this.totalFees.equals(other.totalFees) && this.totalManaUsed.equals(other.totalManaUsed);
139
134
  }
140
135
  }
@@ -1 +1 @@
1
- {"version":3,"file":"global_variables.d.ts","sourceRoot":"","sources":["../../src/tx/global_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QAAQ;IAUR;;;OAGG;IACH,cAAc;;;;;;;IAUd,KAAK,IAAI,eAAe;IAIxB,OAAO,IAAI,OAAO;IAalB,SAAS;;;;;;;;;;;IAcT,CAAC,OAAO,CAAC,MAAM,CAAC;IAIT,MAAM,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO;CAYpC"}
@@ -69,7 +69,6 @@ import { schemas } from '../schemas/index.js';
69
69
  return new GlobalVariables(reader.readField(), reader.readField(), reader.readU32(), reader.readField(), reader.readField().toBigInt(), EthAddress.fromField(reader.readField()), AztecAddress.fromField(reader.readField()), GasFees.fromFields(reader));
70
70
  }
71
71
  static getFields(fields) {
72
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
73
72
  return [
74
73
  fields.chainId,
75
74
  fields.version,
@@ -10,7 +10,6 @@ export * from './tx_constant_data.js';
10
10
  export * from './tx_context.js';
11
11
  export * from './tx_request.js';
12
12
  export * from './private_execution_result.js';
13
- export * from './proposed_block_header.js';
14
13
  export * from './public_call_request_with_calldata.js';
15
14
  export * from './tx_hash.js';
16
15
  export * from './tx_receipt.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tx/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAA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C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
package/dest/tx/index.js CHANGED
@@ -10,7 +10,6 @@ export * from './tx_constant_data.js';
10
10
  export * from './tx_context.js';
11
11
  export * from './tx_request.js';
12
12
  export * from './private_execution_result.js';
13
- export * from './proposed_block_header.js';
14
13
  export * from './public_call_request_with_calldata.js';
15
14
  export * from './tx_hash.js';
16
15
  export * from './tx_receipt.js';
@@ -94,9 +94,9 @@ export declare class PrivateExecutionResult {
94
94
  static from(fields: FieldsOf<PrivateExecutionResult>): PrivateExecutionResult;
95
95
  static random(nested?: number): Promise<PrivateExecutionResult>;
96
96
  /**
97
- * The block number that this execution was simulated with.
97
+ * The anchor block number that this execution was simulated with.
98
98
  */
99
- getSimulationBlockNumber(): UInt32;
99
+ getSimulationAnchorBlockNumber(): UInt32;
100
100
  }
101
101
  /**
102
102
  * The result of executing a call to a private function.
@@ -1 +1 @@
1
- {"version":3,"file":"private_execution_result.d.ts","sourceRoot":"","sources":["../../src/tx/private_execution_result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,E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kC,CAAC,UAAU,EAAE,sBAAsB,uBAWpF;AAWD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAI3G;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,sBAAsB,GAAG,cAAc,EAAE,CAW3F;AAED,wBAAgB,sCAAsC,CAAC,UAAU,EAAE,sBAAsB,GAAG,MAAM,CAQjG;AAED,wBAAgB,aAAa,CAAC,CAAC,EAC7B,cAAc,EAAE,0BAA0B,EAAE,EAC5C,qBAAqB,EAAE,CAAC,SAAS,EAAE,0BAA0B,KAAK,CAAC,EAAE,GACpE,CAAC,EAAE,CAQL;AAED,qBAAa,6BAA6B;IACrB,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAA;KAAE;gBAA1E,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAA;KAAE;CAC9F"}
@@ -80,9 +80,9 @@ export class PrivateExecutionResult {
80
80
  ]);
81
81
  }
82
82
  /**
83
- * The block number that this execution was simulated with.
84
- */ getSimulationBlockNumber() {
85
- return this.entrypoint.publicInputs.historicalHeader.globalVariables.blockNumber;
83
+ * The anchor block number that this execution was simulated with.
84
+ */ getSimulationAnchorBlockNumber() {
85
+ return this.entrypoint.publicInputs.anchorBlockHeader.globalVariables.blockNumber;
86
86
  }
87
87
  }
88
88
  /**
@@ -8,12 +8,12 @@ import { TxContext } from './tx_context.js';
8
8
  */
9
9
  export declare class TxConstantData {
10
10
  /** Header of a block whose state is used during execution (not the block the transaction is included in). */
11
- historicalHeader: BlockHeader;
11
+ anchorBlockHeader: BlockHeader;
12
12
  /**
13
13
  * Context of the transaction.
14
14
  *
15
15
  * Note: `chainId` and `version` in txContext are not redundant to the values in
16
- * self.historical_header.global_variables because they can be different in case of a protocol upgrade. In such
16
+ * self.anchor_block_header.global_variables because they can be different in case of a protocol upgrade. In such
17
17
  * a situation we could be using header from a block before the upgrade took place but be using the updated
18
18
  * protocol to execute and prove the transaction.
19
19
  */
@@ -28,12 +28,12 @@ export declare class TxConstantData {
28
28
  protocolContractTreeRoot: Fr;
29
29
  constructor(
30
30
  /** Header of a block whose state is used during execution (not the block the transaction is included in). */
31
- historicalHeader: BlockHeader,
31
+ anchorBlockHeader: BlockHeader,
32
32
  /**
33
33
  * Context of the transaction.
34
34
  *
35
35
  * Note: `chainId` and `version` in txContext are not redundant to the values in
36
- * self.historical_header.global_variables because they can be different in case of a protocol upgrade. In such
36
+ * self.anchor_block_header.global_variables because they can be different in case of a protocol upgrade. In such
37
37
  * a situation we could be using header from a block before the upgrade took place but be using the updated
38
38
  * protocol to execute and prove the transaction.
39
39
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tx_constant_data.d.ts","sourceRoot":"","sources":["../../src/tx/tx_constant_data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAwC,MAAM,6BAA6B,CAAC;AAC9G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;GAEG;AACH,qBAAa,cAAc;IAEvB,6GAA6G;IACtG,gBAAgB,EAAE,WAAW;IACpC;;;;;;;OAOG;IACI,SAAS,EAAE,SAAS;IAC3B;;OAEG;IACI,UAAU,EAAE,EAAE;IACrB;;OAEG;IACI,wBAAwB,EAAE,EAAE;;IAlBnC,6GAA6G;IACtG,gBAAgB,EAA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B,EAAE,EAAE;IAGrC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,cAAc,CAAC;IAI5C,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,cAAc,CAAC;IAIjD,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,cAAc;IAU7D,QAAQ,IAAI,EAAE,EAAE;IAUhB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,cAAc;IAUhE,QAAQ;IAIR,MAAM,CAAC,KAAK;IAIZ,OAAO;IASP,KAAK,IAAI,cAAc;CAGxB"}
@@ -6,15 +6,15 @@ import { TxContext } from './tx_context.js';
6
6
  /**
7
7
  * Data that is constant/not modified by neither of the kernels.
8
8
  */ export class TxConstantData {
9
- historicalHeader;
9
+ anchorBlockHeader;
10
10
  txContext;
11
11
  vkTreeRoot;
12
12
  protocolContractTreeRoot;
13
- constructor(/** Header of a block whose state is used during execution (not the block the transaction is included in). */ historicalHeader, /**
13
+ constructor(/** Header of a block whose state is used during execution (not the block the transaction is included in). */ anchorBlockHeader, /**
14
14
  * Context of the transaction.
15
15
  *
16
16
  * Note: `chainId` and `version` in txContext are not redundant to the values in
17
- * self.historical_header.global_variables because they can be different in case of a protocol upgrade. In such
17
+ * self.anchor_block_header.global_variables because they can be different in case of a protocol upgrade. In such
18
18
  * a situation we could be using header from a block before the upgrade took place but be using the updated
19
19
  * protocol to execute and prove the transaction.
20
20
  */ txContext, /**
@@ -22,7 +22,7 @@ import { TxContext } from './tx_context.js';
22
22
  */ vkTreeRoot, /**
23
23
  * Root of the tree for the protocol contracts.
24
24
  */ protocolContractTreeRoot){
25
- this.historicalHeader = historicalHeader;
25
+ this.anchorBlockHeader = anchorBlockHeader;
26
26
  this.txContext = txContext;
27
27
  this.vkTreeRoot = vkTreeRoot;
28
28
  this.protocolContractTreeRoot = protocolContractTreeRoot;
@@ -32,7 +32,7 @@ import { TxContext } from './tx_context.js';
32
32
  }
33
33
  static getFields(fields) {
34
34
  return [
35
- fields.historicalHeader,
35
+ fields.anchorBlockHeader,
36
36
  fields.txContext,
37
37
  fields.vkTreeRoot,
38
38
  fields.protocolContractTreeRoot
@@ -60,7 +60,7 @@ import { TxContext } from './tx_context.js';
60
60
  return new TxConstantData(BlockHeader.empty(), TxContext.empty(), Fr.ZERO, Fr.ZERO);
61
61
  }
62
62
  getSize() {
63
- return this.historicalHeader.getSize() + this.txContext.getSize() + this.vkTreeRoot.size + this.protocolContractTreeRoot.size;
63
+ return this.anchorBlockHeader.getSize() + this.txContext.getSize() + this.vkTreeRoot.size + this.protocolContractTreeRoot.size;
64
64
  }
65
65
  clone() {
66
66
  return TxConstantData.fromBuffer(this.toBuffer());
@@ -9,9 +9,6 @@ import { ContractClassLog } from '../logs/contract_class_log.js';
9
9
  import { PrivateLog } from '../logs/private_log.js';
10
10
  import { PublicLog } from '../logs/public_log.js';
11
11
  import { TxHash } from './tx_hash.js';
12
- export declare const TX_START_PREFIX = 8392562855083340404n;
13
- export declare const TX_START_PREFIX_BYTES_LENGTH: number;
14
- export declare const TX_EFFECT_PREFIX_BYTE_LENGTH: number;
15
12
  export declare class TxEffect {
16
13
  /**
17
14
  * Whether the transaction reverted during public app logic.
@@ -1 +1 @@
1
- {"version":3,"file":"tx_effect.d.ts","sourceRoot":"","sources":["../../src/tx/tx_effect.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,QAAQ,EAA6B,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,WAAW,EAGZ,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D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9B"}
@@ -1,4 +1,5 @@
1
- import { CONTRACT_CLASS_LOGS_PREFIX, L2_L1_MSGS_PREFIX, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, NOTES_PREFIX, NULLIFIERS_PREFIX, PRIVATE_LOGS_PREFIX, PUBLIC_DATA_UPDATE_REQUESTS_PREFIX, PUBLIC_LOGS_PREFIX, REVERT_CODE_PREFIX, TX_FEE_PREFIX } from '@aztec/constants';
1
+ import { TX_EFFECT_PREFIX_BYTE_LENGTH, TX_START_PREFIX_BYTES_LENGTH } from '@aztec/blob-lib/encoding';
2
+ import { CONTRACT_CLASS_LOGS_PREFIX, L2_L1_MSGS_PREFIX, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, NOTES_PREFIX, NULLIFIERS_PREFIX, PRIVATE_LOGS_PREFIX, PUBLIC_DATA_UPDATE_REQUESTS_PREFIX, PUBLIC_LOGS_PREFIX, REVERT_CODE_PREFIX, TX_FEE_PREFIX, TX_START_PREFIX } from '@aztec/constants';
2
3
  import { makeTuple, makeTupleAsync } from '@aztec/foundation/array';
3
4
  import { toBufferBE } from '@aztec/foundation/bigint-buffer';
4
5
  import { Fr } from '@aztec/foundation/fields';
@@ -14,12 +15,6 @@ import { ContractClassLog } from '../logs/contract_class_log.js';
14
15
  import { PrivateLog } from '../logs/private_log.js';
15
16
  import { PublicLog } from '../logs/public_log.js';
16
17
  import { TxHash } from './tx_hash.js';
17
- // This will appear as 0x74785f7374617274 in logs
18
- export const TX_START_PREFIX = 8392562855083340404n;
19
- // These are helper constants to decode tx effects from blob encoded fields
20
- export const TX_START_PREFIX_BYTES_LENGTH = TX_START_PREFIX.toString(16).length / 2;
21
- // 7 bytes for: | 0 | txlen[0] | txlen[1] | 0 | REVERT_CODE_PREFIX | 0 | revertCode |
22
- export const TX_EFFECT_PREFIX_BYTE_LENGTH = TX_START_PREFIX_BYTES_LENGTH + 7;
23
18
  export class TxEffect {
24
19
  revertCode;
25
20
  txHash;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/stdlib",
3
- "version": "3.0.0-nightly.20250917",
3
+ "version": "3.0.0-nightly.20250918",
4
4
  "type": "module",
5
5
  "inherits": [
6
6
  "../package.common.json",
@@ -69,13 +69,13 @@
69
69
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
70
70
  },
71
71
  "dependencies": {
72
- "@aztec/bb.js": "3.0.0-nightly.20250917",
73
- "@aztec/blob-lib": "3.0.0-nightly.20250917",
74
- "@aztec/constants": "3.0.0-nightly.20250917",
75
- "@aztec/ethereum": "3.0.0-nightly.20250917",
76
- "@aztec/foundation": "3.0.0-nightly.20250917",
77
- "@aztec/l1-artifacts": "3.0.0-nightly.20250917",
78
- "@aztec/noir-noirc_abi": "3.0.0-nightly.20250917",
72
+ "@aztec/bb.js": "3.0.0-nightly.20250918",
73
+ "@aztec/blob-lib": "3.0.0-nightly.20250918",
74
+ "@aztec/constants": "3.0.0-nightly.20250918",
75
+ "@aztec/ethereum": "3.0.0-nightly.20250918",
76
+ "@aztec/foundation": "3.0.0-nightly.20250918",
77
+ "@aztec/l1-artifacts": "3.0.0-nightly.20250918",
78
+ "@aztec/noir-noirc_abi": "3.0.0-nightly.20250918",
79
79
  "@google-cloud/storage": "^7.15.0",
80
80
  "axios": "^1.9.0",
81
81
  "json-stringify-deterministic": "1.0.12",
@@ -27,6 +27,7 @@ export class AvmCircuitPublicInputs {
27
27
  ///////////////////////////////////
28
28
  // Inputs.
29
29
  public globalVariables: GlobalVariables,
30
+ public protocolContractTreeRoot: Fr,
30
31
  public startTreeSnapshots: TreeSnapshots,
31
32
  public startGasUsed: Gas,
32
33
  public gasSettings: GasSettings,
@@ -54,6 +55,7 @@ export class AvmCircuitPublicInputs {
54
55
  return z
55
56
  .object({
56
57
  globalVariables: GlobalVariables.schema,
58
+ protocolContractTreeRoot: schemas.Fr,
57
59
  startTreeSnapshots: TreeSnapshots.schema,
58
60
  startGasUsed: Gas.schema,
59
61
  gasSettings: GasSettings.schema,
@@ -77,6 +79,7 @@ export class AvmCircuitPublicInputs {
77
79
  .transform(
78
80
  ({
79
81
  globalVariables,
82
+ protocolContractTreeRoot,
80
83
  startTreeSnapshots,
81
84
  startGasUsed,
82
85
  gasSettings,
@@ -99,6 +102,7 @@ export class AvmCircuitPublicInputs {
99
102
  }) =>
100
103
  new AvmCircuitPublicInputs(
101
104
  globalVariables,
105
+ protocolContractTreeRoot,
102
106
  startTreeSnapshots,
103
107
  startGasUsed,
104
108
  gasSettings,
@@ -126,6 +130,7 @@ export class AvmCircuitPublicInputs {
126
130
  const reader = BufferReader.asReader(buffer);
127
131
  return new AvmCircuitPublicInputs(
128
132
  reader.readObject(GlobalVariables),
133
+ reader.readObject(Fr),
129
134
  reader.readObject(TreeSnapshots),
130
135
  reader.readObject(Gas),
131
136
  reader.readObject(GasSettings),
@@ -151,6 +156,7 @@ export class AvmCircuitPublicInputs {
151
156
  toBuffer() {
152
157
  return serializeToBuffer(
153
158
  this.globalVariables,
159
+ this.protocolContractTreeRoot,
154
160
  this.startTreeSnapshots,
155
161
  this.startGasUsed,
156
162
  this.gasSettings,
@@ -185,6 +191,7 @@ export class AvmCircuitPublicInputs {
185
191
  const reader = FieldReader.asReader(fields);
186
192
  return new AvmCircuitPublicInputs(
187
193
  GlobalVariables.fromFields(reader),
194
+ reader.readField(),
188
195
  TreeSnapshots.fromFields(reader),
189
196
  Gas.fromFields(reader),
190
197
  GasSettings.fromFields(reader),
@@ -210,6 +217,7 @@ export class AvmCircuitPublicInputs {
210
217
  toFields() {
211
218
  return [
212
219
  ...this.globalVariables.toFields(),
220
+ this.protocolContractTreeRoot,
213
221
  ...this.startTreeSnapshots.toFields(),
214
222
  ...this.startGasUsed.toFields(),
215
223
  ...this.gasSettings.toFields(),
@@ -235,6 +243,7 @@ export class AvmCircuitPublicInputs {
235
243
  static empty() {
236
244
  return new AvmCircuitPublicInputs(
237
245
  GlobalVariables.empty(),
246
+ Fr.zero(),
238
247
  TreeSnapshots.empty(),
239
248
  Gas.empty(),
240
249
  GasSettings.empty(),
@@ -264,6 +273,7 @@ export class AvmCircuitPublicInputs {
264
273
  [inspect.custom]() {
265
274
  return `AvmCircuitPublicInputs {
266
275
  globalVariables: ${inspect(this.globalVariables)},
276
+ protocolContractTreeRoot: ${inspect(this.protocolContractTreeRoot)},
267
277
  startTreeSnapshots: ${inspect(this.startTreeSnapshots)},
268
278
  startGasUsed: ${inspect(this.startGasUsed)},
269
279
  gasSettings: ${inspect(this.gasSettings)},
package/src/block/body.ts CHANGED
@@ -1,6 +1,7 @@
1
+ import { createBlockEndMarker, getNumTxsFromBlockEndMarker, isBlockEndMarker } from '@aztec/blob-lib/encoding';
1
2
  import { BLOBS_PER_BLOCK, FIELDS_PER_BLOB } from '@aztec/constants';
2
3
  import { timesParallel } from '@aztec/foundation/collection';
3
- import type { Fr } from '@aztec/foundation/fields';
4
+ import { Fr } from '@aztec/foundation/fields';
4
5
  import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
6
 
6
7
  import { inspect } from 'util';
@@ -9,6 +10,14 @@ import { z } from 'zod';
9
10
  import type { ZodFor } from '../schemas/index.js';
10
11
  import { TxEffect } from '../tx/tx_effect.js';
11
12
 
13
+ export { createBlockEndMarker };
14
+
15
+ export function getBlockBlobFields(txEffects: TxEffect[]) {
16
+ const blobFields = txEffects.flatMap(txEffect => txEffect.toBlobFields());
17
+ blobFields.push(createBlockEndMarker(txEffects.length));
18
+ return blobFields;
19
+ }
20
+
12
21
  export class Body {
13
22
  constructor(public txEffects: TxEffect[]) {
14
23
  txEffects.forEach(txEffect => {
@@ -54,10 +63,8 @@ export class Body {
54
63
  * Returns a flat packed array of fields of all tx effects - used for blobs.
55
64
  */
56
65
  toBlobFields() {
57
- let flattened: Fr[] = [];
58
- this.txEffects.forEach((effect: TxEffect) => {
59
- flattened = flattened.concat(effect.toBlobFields());
60
- });
66
+ const flattened = getBlockBlobFields(this.txEffects);
67
+
61
68
  if (flattened.length > BLOBS_PER_BLOCK * FIELDS_PER_BLOB) {
62
69
  throw new Error(
63
70
  `Attempted to overfill block's blobs with ${flattened.length} elements. The maximum is ${
@@ -74,10 +81,20 @@ export class Body {
74
81
  */
75
82
  static fromBlobFields(fields: Fr[]) {
76
83
  const txEffects: TxEffect[] = [];
77
- const reader = new FieldReader(fields);
84
+ const reader = new FieldReader(fields.slice(0, -1));
78
85
  while (!reader.isFinished()) {
79
86
  txEffects.push(TxEffect.fromBlobFields(reader));
80
87
  }
88
+
89
+ if (!isBlockEndMarker(fields[fields.length - 1])) {
90
+ throw new Error('Block end marker not found');
91
+ }
92
+
93
+ const numTxs = getNumTxsFromBlockEndMarker(fields[fields.length - 1]);
94
+ if (numTxs !== txEffects.length) {
95
+ throw new Error(`Expected ${numTxs} txs, but got ${txEffects.length}`);
96
+ }
97
+
81
98
  return new this(txEffects);
82
99
  }
83
100
 
@@ -1,4 +1,5 @@
1
1
  export * from './l2_block.js';
2
+ export * from './l2_block_header.js';
2
3
  export * from './l2_block_stream/index.js';
3
4
  export * from './in_block.js';
4
5
  export * from './body.js';
@@ -5,9 +5,10 @@ import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
5
5
  import { z } from 'zod';
6
6
 
7
7
  import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
8
- import { BlockHeader } from '../tx/block_header.js';
8
+ import type { BlockHeader } from '../tx/block_header.js';
9
9
  import { Body } from './body.js';
10
- import { makeAppendOnlyTreeSnapshot, makeHeader } from './l2_block_code_to_purge.js';
10
+ import { makeAppendOnlyTreeSnapshot, makeL2BlockHeader } from './l2_block_code_to_purge.js';
11
+ import { L2BlockHeader } from './l2_block_header.js';
11
12
  import type { L2BlockInfo } from './l2_block_info.js';
12
13
 
13
14
  /**
@@ -18,7 +19,7 @@ export class L2Block {
18
19
  /** Snapshot of archive tree after the block is applied. */
19
20
  public archive: AppendOnlyTreeSnapshot,
20
21
  /** L2 block header. */
21
- public header: BlockHeader,
22
+ public header: L2BlockHeader,
22
23
  /** L2 block body. */
23
24
  public body: Body,
24
25
  private blockHash: Fr | undefined = undefined,
@@ -28,7 +29,7 @@ export class L2Block {
28
29
  return z
29
30
  .object({
30
31
  archive: AppendOnlyTreeSnapshot.schema,
31
- header: BlockHeader.schema,
32
+ header: L2BlockHeader.schema,
32
33
  body: Body.schema,
33
34
  })
34
35
  .transform(({ archive, header, body }) => new L2Block(archive, header, body));
@@ -40,7 +41,7 @@ export class L2Block {
40
41
  */
41
42
  static fromBuffer(buf: Buffer | BufferReader) {
42
43
  const reader = BufferReader.asReader(buf);
43
- const header = reader.readObject(BlockHeader);
44
+ const header = reader.readObject(L2BlockHeader);
44
45
  const archive = reader.readObject(AppendOnlyTreeSnapshot);
45
46
  const body = reader.readObject(Body);
46
47
 
@@ -94,7 +95,7 @@ export class L2Block {
94
95
 
95
96
  return new L2Block(
96
97
  makeAppendOnlyTreeSnapshot(l2BlockNum + 1),
97
- makeHeader(0, l2BlockNum, slotNumber ?? l2BlockNum, inHash),
98
+ makeL2BlockHeader(0, l2BlockNum, slotNumber ?? l2BlockNum, {}, inHash),
98
99
  body,
99
100
  );
100
101
  }
@@ -104,7 +105,7 @@ export class L2Block {
104
105
  * @returns The L2 block.
105
106
  */
106
107
  static empty(): L2Block {
107
- return new L2Block(AppendOnlyTreeSnapshot.empty(), BlockHeader.empty(), Body.empty());
108
+ return new L2Block(AppendOnlyTreeSnapshot.empty(), L2BlockHeader.empty(), Body.empty());
108
109
  }
109
110
 
110
111
  get number(): number {
@@ -125,11 +126,20 @@ export class L2Block {
125
126
  */
126
127
  public async hash(): Promise<Fr> {
127
128
  if (this.blockHash === undefined) {
128
- this.blockHash = await this.header.hash();
129
+ this.blockHash = await this.getBlockHeader().hash();
129
130
  }
130
131
  return this.blockHash;
131
132
  }
132
133
 
134
+ public getCheckpointHeader() {
135
+ return this.header.toCheckpointHeader();
136
+ }
137
+
138
+ // Temporary helper to get the actual block header.
139
+ public getBlockHeader(): BlockHeader {
140
+ return this.header.toBlockHeader();
141
+ }
142
+
133
143
  /**
134
144
  * Returns stats used for logging.
135
145
  * @returns Stats on tx count, number, and log size and count.