@aztec/stdlib 3.0.0-nightly.20250916 → 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 (202) hide show
  1. package/dest/avm/avm.d.ts +78 -1
  2. package/dest/avm/avm.d.ts.map +1 -1
  3. package/dest/avm/avm.js +20 -2
  4. package/dest/avm/avm_circuit_public_inputs.d.ts +6 -1
  5. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  6. package/dest/avm/avm_circuit_public_inputs.js +11 -6
  7. package/dest/avm/avm_proving_request.d.ts +41 -0
  8. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  9. package/dest/block/body.d.ts +4 -1
  10. package/dest/block/body.d.ts.map +1 -1
  11. package/dest/block/body.js +16 -5
  12. package/dest/block/index.d.ts +1 -0
  13. package/dest/block/index.d.ts.map +1 -1
  14. package/dest/block/index.js +1 -0
  15. package/dest/block/l2_block.d.ts +8 -5
  16. package/dest/block/l2_block.d.ts.map +1 -1
  17. package/dest/block/l2_block.js +14 -7
  18. package/dest/block/l2_block_code_to_purge.d.ts +3 -14
  19. package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
  20. package/dest/block/l2_block_code_to_purge.js +23 -13
  21. package/dest/block/l2_block_header.d.ts +100 -0
  22. package/dest/block/l2_block_header.d.ts.map +1 -0
  23. package/dest/block/l2_block_header.js +146 -0
  24. package/dest/block/l2_block_stream/l2_tips_memory_store.js +1 -1
  25. package/dest/block/published_l2_block.d.ts +2 -2
  26. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  27. package/dest/block/test/l2_tips_store_test_suite.js +1 -3
  28. package/dest/interfaces/aztec-node.d.ts +5 -2
  29. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  30. package/dest/interfaces/aztec-node.js +1 -0
  31. package/dest/interfaces/block-builder.d.ts +1 -2
  32. package/dest/interfaces/block-builder.d.ts.map +1 -1
  33. package/dest/interfaces/epoch-prover.d.ts +25 -8
  34. package/dest/interfaces/epoch-prover.d.ts.map +1 -1
  35. package/dest/interfaces/proving-job.d.ts +204 -61
  36. package/dest/interfaces/proving-job.d.ts.map +1 -1
  37. package/dest/interfaces/proving-job.js +101 -39
  38. package/dest/interfaces/pxe.d.ts +8 -1
  39. package/dest/interfaces/pxe.d.ts.map +1 -1
  40. package/dest/interfaces/pxe.js +1 -0
  41. package/dest/interfaces/server_circuit_prover.d.ts +19 -16
  42. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  43. package/dest/interfaces/validator.d.ts +3 -2
  44. package/dest/interfaces/validator.d.ts.map +1 -1
  45. package/dest/kernel/private_circuit_public_inputs.d.ts +4 -4
  46. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  47. package/dest/kernel/private_circuit_public_inputs.js +7 -7
  48. package/dest/kernel/private_context_inputs.d.ts +2 -2
  49. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  50. package/dest/kernel/private_context_inputs.js +4 -4
  51. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +1 -1
  52. package/dest/messaging/inbox_leaf.d.ts +2 -0
  53. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  54. package/dest/messaging/inbox_leaf.js +3 -0
  55. package/dest/p2p/consensus_payload.d.ts +7 -6
  56. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  57. package/dest/p2p/consensus_payload.js +7 -6
  58. package/dest/parity/root_parity_input.d.ts +1 -1
  59. package/dest/proofs/proof_data.d.ts +1 -1
  60. package/dest/proofs/proof_data.d.ts.map +1 -1
  61. package/dest/proofs/proof_data.js +2 -2
  62. package/dest/proofs/proving_request_type.d.ts +13 -8
  63. package/dest/proofs/proving_request_type.d.ts.map +1 -1
  64. package/dest/proofs/proving_request_type.js +13 -8
  65. package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts +1 -1
  66. package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +1 -1
  67. package/dest/rollup/base_or_merge_rollup_public_inputs.js +1 -1
  68. package/dest/rollup/base_rollup_hints.d.ts +12 -3
  69. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  70. package/dest/rollup/base_rollup_hints.js +11 -5
  71. package/dest/rollup/block_constant_data.d.ts +20 -6
  72. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  73. package/dest/rollup/block_constant_data.js +15 -7
  74. package/dest/rollup/block_merge_rollup.d.ts +10 -9
  75. package/dest/rollup/block_merge_rollup.d.ts.map +1 -1
  76. package/dest/rollup/block_merge_rollup.js +14 -13
  77. package/dest/rollup/block_rollup_public_inputs.d.ts +124 -0
  78. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -0
  79. package/dest/rollup/block_rollup_public_inputs.js +85 -0
  80. package/dest/rollup/block_root_rollup.d.ts +148 -184
  81. package/dest/rollup/block_root_rollup.d.ts.map +1 -1
  82. package/dest/rollup/block_root_rollup.js +211 -260
  83. package/dest/rollup/checkpoint_constant_data.d.ts +54 -0
  84. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -0
  85. package/dest/rollup/checkpoint_constant_data.js +55 -0
  86. package/dest/{tx/proposed_block_header.d.ts → rollup/checkpoint_header.d.ts} +11 -12
  87. package/dest/rollup/checkpoint_header.d.ts.map +1 -0
  88. package/dest/{tx/proposed_block_header.js → rollup/checkpoint_header.js} +9 -9
  89. package/dest/rollup/checkpoint_merge_rollup.d.ts +30 -0
  90. package/dest/rollup/checkpoint_merge_rollup.d.ts.map +1 -0
  91. package/dest/rollup/checkpoint_merge_rollup.js +37 -0
  92. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +105 -0
  93. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -0
  94. package/dest/rollup/checkpoint_rollup_public_inputs.js +105 -0
  95. package/dest/rollup/checkpoint_root_rollup.d.ts +117 -0
  96. package/dest/rollup/checkpoint_root_rollup.d.ts.map +1 -0
  97. package/dest/rollup/checkpoint_root_rollup.js +178 -0
  98. package/dest/rollup/epoch_constant_data.d.ts +19 -2
  99. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  100. package/dest/rollup/epoch_constant_data.js +20 -7
  101. package/dest/rollup/index.d.ts +8 -5
  102. package/dest/rollup/index.d.ts.map +1 -1
  103. package/dest/rollup/index.js +8 -5
  104. package/dest/rollup/rollup_proof_data.d.ts +10 -0
  105. package/dest/rollup/rollup_proof_data.d.ts.map +1 -0
  106. package/dest/rollup/rollup_proof_data.js +1 -0
  107. package/dest/rollup/root_rollup.d.ts +26 -23
  108. package/dest/rollup/root_rollup.d.ts.map +1 -1
  109. package/dest/rollup/root_rollup.js +28 -39
  110. package/dest/stats/stats.d.ts +1 -1
  111. package/dest/stats/stats.d.ts.map +1 -1
  112. package/dest/tests/factories.d.ts +17 -41
  113. package/dest/tests/factories.d.ts.map +1 -1
  114. package/dest/tests/factories.js +76 -80
  115. package/dest/tests/mocks.d.ts +3 -2
  116. package/dest/tests/mocks.d.ts.map +1 -1
  117. package/dest/tests/mocks.js +3 -3
  118. package/dest/tx/block_header.d.ts +12 -13
  119. package/dest/tx/block_header.d.ts.map +1 -1
  120. package/dest/tx/block_header.js +16 -21
  121. package/dest/tx/global_variables.d.ts.map +1 -1
  122. package/dest/tx/global_variables.js +0 -1
  123. package/dest/tx/index.d.ts +0 -1
  124. package/dest/tx/index.d.ts.map +1 -1
  125. package/dest/tx/index.js +0 -1
  126. package/dest/tx/private_execution_result.d.ts +2 -2
  127. package/dest/tx/private_execution_result.d.ts.map +1 -1
  128. package/dest/tx/private_execution_result.js +3 -3
  129. package/dest/tx/tx_constant_data.d.ts +4 -4
  130. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  131. package/dest/tx/tx_constant_data.js +6 -6
  132. package/dest/tx/tx_effect.d.ts +0 -3
  133. package/dest/tx/tx_effect.d.ts.map +1 -1
  134. package/dest/tx/tx_effect.js +2 -7
  135. package/dest/zkpassport/index.d.ts +3 -3
  136. package/dest/zkpassport/index.d.ts.map +1 -1
  137. package/dest/zkpassport/index.js +7 -7
  138. package/package.json +8 -8
  139. package/src/avm/avm.ts +22 -0
  140. package/src/avm/avm_circuit_public_inputs.ts +10 -0
  141. package/src/block/body.ts +23 -6
  142. package/src/block/index.ts +1 -0
  143. package/src/block/l2_block.ts +18 -8
  144. package/src/block/l2_block_code_to_purge.ts +30 -31
  145. package/src/block/l2_block_header.ts +232 -0
  146. package/src/block/l2_block_stream/l2_tips_memory_store.ts +1 -1
  147. package/src/block/test/l2_tips_store_test_suite.ts +1 -2
  148. package/src/interfaces/aztec-node.ts +8 -2
  149. package/src/interfaces/block-builder.ts +1 -6
  150. package/src/interfaces/epoch-prover.ts +34 -10
  151. package/src/interfaces/proving-job.ts +166 -51
  152. package/src/interfaces/pxe.ts +10 -1
  153. package/src/interfaces/server_circuit_prover.ts +65 -29
  154. package/src/interfaces/validator.ts +3 -2
  155. package/src/kernel/private_circuit_public_inputs.ts +5 -5
  156. package/src/kernel/private_context_inputs.ts +2 -2
  157. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +1 -1
  158. package/src/messaging/inbox_leaf.ts +5 -0
  159. package/src/p2p/consensus_payload.ts +8 -7
  160. package/src/proofs/proof_data.ts +1 -6
  161. package/src/proofs/proving_request_type.ts +8 -3
  162. package/src/rollup/base_or_merge_rollup_public_inputs.ts +1 -1
  163. package/src/rollup/base_rollup_hints.ts +9 -1
  164. package/src/rollup/block_constant_data.ts +13 -3
  165. package/src/rollup/block_merge_rollup.ts +13 -11
  166. package/src/rollup/block_rollup_public_inputs.ts +123 -0
  167. package/src/rollup/block_root_rollup.ts +209 -264
  168. package/src/rollup/checkpoint_constant_data.ts +84 -0
  169. package/src/{tx/proposed_block_header.ts → rollup/checkpoint_header.ts} +16 -17
  170. package/src/rollup/checkpoint_merge_rollup.ts +50 -0
  171. package/src/rollup/{block_root_or_block_merge_public_inputs.ts → checkpoint_rollup_public_inputs.ts} +26 -52
  172. package/src/rollup/checkpoint_root_rollup.ts +216 -0
  173. package/src/rollup/epoch_constant_data.ts +32 -8
  174. package/src/rollup/index.ts +8 -5
  175. package/src/rollup/rollup_proof_data.ts +12 -0
  176. package/src/rollup/root_rollup.ts +30 -41
  177. package/src/stats/stats.ts +8 -3
  178. package/src/tests/factories.ts +139 -135
  179. package/src/tests/mocks.ts +6 -13
  180. package/src/tx/block_header.ts +17 -32
  181. package/src/tx/global_variables.ts +0 -1
  182. package/src/tx/index.ts +0 -1
  183. package/src/tx/private_execution_result.ts +3 -3
  184. package/src/tx/tx_constant_data.ts +4 -4
  185. package/src/tx/tx_effect.ts +2 -7
  186. package/src/zkpassport/index.ts +6 -6
  187. package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +0 -134
  188. package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +0 -1
  189. package/dest/rollup/block_root_or_block_merge_public_inputs.js +0 -125
  190. package/dest/rollup/empty_block_root_rollup_inputs.d.ts +0 -51
  191. package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +0 -1
  192. package/dest/rollup/empty_block_root_rollup_inputs.js +0 -65
  193. package/dest/rollup/padding_block_root_rollup_inputs.d.ts +0 -20
  194. package/dest/rollup/padding_block_root_rollup_inputs.d.ts.map +0 -1
  195. package/dest/rollup/padding_block_root_rollup_inputs.js +0 -39
  196. package/dest/rollup/previous_rollup_block_data.d.ts +0 -47
  197. package/dest/rollup/previous_rollup_block_data.d.ts.map +0 -1
  198. package/dest/rollup/previous_rollup_block_data.js +0 -37
  199. package/dest/tx/proposed_block_header.d.ts.map +0 -1
  200. package/src/rollup/empty_block_root_rollup_inputs.ts +0 -80
  201. package/src/rollup/padding_block_root_rollup_inputs.ts +0 -47
  202. package/src/rollup/previous_rollup_block_data.ts +0 -48
@@ -0,0 +1,55 @@
1
+ import { EthAddress } from '@aztec/foundation/eth-address';
2
+ import { Fr } from '@aztec/foundation/fields';
3
+ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
+ import { AztecAddress } from '../aztec-address/index.js';
5
+ import { GasFees } from '../gas/gas_fees.js';
6
+ /**
7
+ * Constants that are the same for the entire checkpoint.
8
+ */ export class CheckpointConstantData {
9
+ chainId;
10
+ version;
11
+ vkTreeRoot;
12
+ protocolContractTreeRoot;
13
+ proverId;
14
+ slotNumber;
15
+ coinbase;
16
+ feeRecipient;
17
+ gasFees;
18
+ constructor(/** ChainId of the rollup. */ chainId, /** Version of the rollup. */ version, /** Root of the verification key tree. */ vkTreeRoot, /** Root of the protocol contract tree. */ protocolContractTreeRoot, /** Identifier of the prover. */ proverId, /** Slot number of the checkpoint. */ slotNumber, /** Coinbase address of the rollup. */ coinbase, /** Address to receive fees. */ feeRecipient, /** Global gas fees for this checkpoint. */ gasFees){
19
+ this.chainId = chainId;
20
+ this.version = version;
21
+ this.vkTreeRoot = vkTreeRoot;
22
+ this.protocolContractTreeRoot = protocolContractTreeRoot;
23
+ this.proverId = proverId;
24
+ this.slotNumber = slotNumber;
25
+ this.coinbase = coinbase;
26
+ this.feeRecipient = feeRecipient;
27
+ this.gasFees = gasFees;
28
+ }
29
+ static from(fields) {
30
+ return new CheckpointConstantData(...CheckpointConstantData.getFields(fields));
31
+ }
32
+ static getFields(fields) {
33
+ return [
34
+ fields.chainId,
35
+ fields.version,
36
+ fields.vkTreeRoot,
37
+ fields.protocolContractTreeRoot,
38
+ fields.proverId,
39
+ fields.slotNumber,
40
+ fields.coinbase,
41
+ fields.feeRecipient,
42
+ fields.gasFees
43
+ ];
44
+ }
45
+ static empty() {
46
+ return new CheckpointConstantData(Fr.ZERO, Fr.ZERO, Fr.ZERO, Fr.ZERO, Fr.ZERO, Fr.ZERO, EthAddress.ZERO, AztecAddress.ZERO, GasFees.empty());
47
+ }
48
+ toBuffer() {
49
+ return serializeToBuffer(...CheckpointConstantData.getFields(this));
50
+ }
51
+ static fromBuffer(buffer) {
52
+ const reader = BufferReader.asReader(buffer);
53
+ return new CheckpointConstantData(Fr.fromBuffer(reader), Fr.fromBuffer(reader), Fr.fromBuffer(reader), Fr.fromBuffer(reader), Fr.fromBuffer(reader), Fr.fromBuffer(reader), reader.readObject(EthAddress), reader.readObject(AztecAddress), reader.readObject(GasFees));
54
+ }
55
+ }
@@ -7,10 +7,9 @@ import type { FieldsOf } from '@aztec/foundation/types';
7
7
  import { inspect } from 'util';
8
8
  import { AztecAddress } from '../aztec-address/index.js';
9
9
  import { GasFees } from '../gas/index.js';
10
+ import { ContentCommitment } from '../tx/content_commitment.js';
10
11
  import type { UInt64 } from '../types/shared.js';
11
- import { ContentCommitment } from './content_commitment.js';
12
- /** The proposed values of an L2 block. */
13
- export declare class ProposedBlockHeader {
12
+ export declare class CheckpointHeader {
14
13
  /** Root of the archive tree before this block is added. */
15
14
  lastArchiveRoot: Fr;
16
15
  /** Content commitment of the L2 block. */
@@ -44,22 +43,22 @@ export declare class ProposedBlockHeader {
44
43
  gasFees: GasFees,
45
44
  /** Total mana used in the block, computed by the root rollup circuit */
46
45
  totalManaUsed: Fr);
47
- static get schema(): ZodFor<ProposedBlockHeader>;
48
- static getFields(fields: FieldsOf<ProposedBlockHeader>): readonly [Fr, ContentCommitment, Fr, bigint, EthAddress, AztecAddress, GasFees, Fr];
49
- static from(fields: FieldsOf<ProposedBlockHeader>): ProposedBlockHeader;
50
- static fromBuffer(buffer: Buffer | BufferReader): ProposedBlockHeader;
46
+ static get schema(): ZodFor<CheckpointHeader>;
47
+ static getFields(fields: FieldsOf<CheckpointHeader>): readonly [Fr, ContentCommitment, Fr, bigint, EthAddress, AztecAddress, GasFees, Fr];
48
+ static from(fields: FieldsOf<CheckpointHeader>): CheckpointHeader;
49
+ static fromBuffer(buffer: Buffer | BufferReader): CheckpointHeader;
51
50
  toBuffer(): Buffer<ArrayBufferLike>;
52
51
  hash(): Fr;
53
- static empty(fields?: Partial<FieldsOf<ProposedBlockHeader>>): ProposedBlockHeader;
54
- static random(): ProposedBlockHeader;
52
+ static empty(fields?: Partial<FieldsOf<CheckpointHeader>>): CheckpointHeader;
53
+ static random(): CheckpointHeader;
55
54
  isEmpty(): boolean;
56
55
  /**
57
56
  * Serializes this instance into a string.
58
57
  * @returns Encoded string.
59
58
  */
60
59
  toString(): `0x${string}`;
61
- static fromString(str: string): ProposedBlockHeader;
62
- static fromViem(header: ViemHeader): ProposedBlockHeader;
60
+ static fromString(str: string): CheckpointHeader;
61
+ static fromViem(header: ViemHeader): CheckpointHeader;
63
62
  toViem(): ViemHeader;
64
63
  toInspect(): {
65
64
  lastArchive: `0x${string}`;
@@ -80,4 +79,4 @@ export declare class ProposedBlockHeader {
80
79
  };
81
80
  [inspect.custom](): string;
82
81
  }
83
- //# sourceMappingURL=proposed_block_header.d.ts.map
82
+ //# sourceMappingURL=checkpoint_header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkpoint_header.d.ts","sourceRoot":"","sources":["../../src/rollup/checkpoint_header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAuC,MAAM,6BAA6B,CAAC;AAEhG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qBAAa,gBAAgB;IAEzB,2DAA2D;IACpD,eAAe,EAAE,EAAE;IAC1B,0CAA0C;IACnC,iBAAiB,EAAE,iBAAiB;IAC3C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ajB"}
@@ -8,8 +8,8 @@ import { z } from 'zod';
8
8
  import { AztecAddress } from '../aztec-address/index.js';
9
9
  import { GasFees } from '../gas/index.js';
10
10
  import { schemas } from '../schemas/index.js';
11
- import { ContentCommitment } from './content_commitment.js';
12
- /** The proposed values of an L2 block. */ export class ProposedBlockHeader {
11
+ import { ContentCommitment } from '../tx/content_commitment.js';
12
+ export class CheckpointHeader {
13
13
  lastArchiveRoot;
14
14
  contentCommitment;
15
15
  slotNumber;
@@ -38,7 +38,7 @@ import { ContentCommitment } from './content_commitment.js';
38
38
  feeRecipient: schemas.AztecAddress,
39
39
  gasFees: GasFees.schema,
40
40
  totalManaUsed: schemas.Fr
41
- }).transform(ProposedBlockHeader.from);
41
+ }).transform(CheckpointHeader.from);
42
42
  }
43
43
  static getFields(fields) {
44
44
  return [
@@ -53,11 +53,11 @@ import { ContentCommitment } from './content_commitment.js';
53
53
  ];
54
54
  }
55
55
  static from(fields) {
56
- return new ProposedBlockHeader(...ProposedBlockHeader.getFields(fields));
56
+ return new CheckpointHeader(...CheckpointHeader.getFields(fields));
57
57
  }
58
58
  static fromBuffer(buffer) {
59
59
  const reader = BufferReader.asReader(buffer);
60
- return new ProposedBlockHeader(reader.readObject(Fr), reader.readObject(ContentCommitment), Fr.fromBuffer(reader), reader.readUInt64(), reader.readObject(EthAddress), reader.readObject(AztecAddress), reader.readObject(GasFees), reader.readObject(Fr));
60
+ return new CheckpointHeader(reader.readObject(Fr), reader.readObject(ContentCommitment), Fr.fromBuffer(reader), reader.readUInt64(), reader.readObject(EthAddress), reader.readObject(AztecAddress), reader.readObject(GasFees), reader.readObject(Fr));
61
61
  }
62
62
  toBuffer() {
63
63
  // Note: The order here must match the order in the ProposedHeaderLib solidity library.
@@ -78,7 +78,7 @@ import { ContentCommitment } from './content_commitment.js';
78
78
  ]);
79
79
  }
80
80
  static empty(fields = {}) {
81
- return ProposedBlockHeader.from({
81
+ return CheckpointHeader.from({
82
82
  lastArchiveRoot: Fr.ZERO,
83
83
  contentCommitment: ContentCommitment.empty(),
84
84
  slotNumber: Fr.ZERO,
@@ -91,7 +91,7 @@ import { ContentCommitment } from './content_commitment.js';
91
91
  });
92
92
  }
93
93
  static random() {
94
- return new ProposedBlockHeader(Fr.random(), ContentCommitment.random(), new Fr(BigInt(Math.floor(Math.random() * 1000) + 1)), BigInt(Math.floor(Date.now() / 1000)), EthAddress.random(), new AztecAddress(Fr.random()), GasFees.random(), new Fr(BigInt(Math.floor(Math.random() * 1000000))));
94
+ return new CheckpointHeader(Fr.random(), ContentCommitment.random(), new Fr(BigInt(Math.floor(Math.random() * 1000) + 1)), BigInt(Math.floor(Date.now() / 1000)), EthAddress.random(), new AztecAddress(Fr.random()), GasFees.random(), new Fr(BigInt(Math.floor(Math.random() * 1000000))));
95
95
  }
96
96
  isEmpty() {
97
97
  return this.lastArchiveRoot.isZero() && this.contentCommitment.isEmpty() && this.slotNumber.isZero() && this.timestamp === 0n && this.coinbase.isZero() && this.feeRecipient.isZero() && this.gasFees.isEmpty() && this.totalManaUsed.isZero();
@@ -103,10 +103,10 @@ import { ContentCommitment } from './content_commitment.js';
103
103
  return bufferToHex(this.toBuffer());
104
104
  }
105
105
  static fromString(str) {
106
- return ProposedBlockHeader.fromBuffer(hexToBuffer(str));
106
+ return CheckpointHeader.fromBuffer(hexToBuffer(str));
107
107
  }
108
108
  static fromViem(header) {
109
- return new ProposedBlockHeader(Fr.fromString(header.lastArchiveRoot), ContentCommitment.fromViem(header.contentCommitment), new Fr(header.slotNumber), header.timestamp, new EthAddress(hexToBuffer(header.coinbase)), new AztecAddress(hexToBuffer(header.feeRecipient)), new GasFees(header.gasFees.feePerDaGas, header.gasFees.feePerL2Gas), new Fr(header.totalManaUsed));
109
+ return new CheckpointHeader(Fr.fromString(header.lastArchiveRoot), ContentCommitment.fromViem(header.contentCommitment), new Fr(header.slotNumber), header.timestamp, new EthAddress(hexToBuffer(header.coinbase)), new AztecAddress(hexToBuffer(header.feeRecipient)), new GasFees(header.gasFees.feePerDaGas, header.gasFees.feePerL2Gas), new Fr(header.totalManaUsed));
110
110
  }
111
111
  toViem() {
112
112
  return {
@@ -0,0 +1,30 @@
1
+ import { BufferReader } from '@aztec/foundation/serialize';
2
+ import { CheckpointRollupPublicInputs } from './checkpoint_rollup_public_inputs.js';
3
+ import type { RollupProofData } from './rollup_proof_data.js';
4
+ /**
5
+ * Represents inputs of the checkpoint merge rollup circuit.
6
+ */
7
+ export declare class CheckpointMergeRollupPrivateInputs {
8
+ /**
9
+ * Previous rollup data from the 2 checkpoint root or merge rollup circuits that preceded this checkpoint merge rollup circuit.
10
+ */
11
+ previousRollups: [
12
+ RollupProofData<CheckpointRollupPublicInputs>,
13
+ RollupProofData<CheckpointRollupPublicInputs>
14
+ ];
15
+ constructor(
16
+ /**
17
+ * Previous rollup data from the 2 checkpoint root or merge rollup circuits that preceded this checkpoint merge rollup circuit.
18
+ */
19
+ previousRollups: [
20
+ RollupProofData<CheckpointRollupPublicInputs>,
21
+ RollupProofData<CheckpointRollupPublicInputs>
22
+ ]);
23
+ toBuffer(): Buffer<ArrayBufferLike>;
24
+ static fromBuffer(buffer: Buffer | BufferReader): CheckpointMergeRollupPrivateInputs;
25
+ toString(): `0x${string}`;
26
+ static fromString(str: string): CheckpointMergeRollupPrivateInputs;
27
+ toJSON(): Buffer<ArrayBufferLike>;
28
+ static get schema(): import("zod").ZodType<CheckpointMergeRollupPrivateInputs, any, string>;
29
+ }
30
+ //# sourceMappingURL=checkpoint_merge_rollup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkpoint_merge_rollup.d.ts","sourceRoot":"","sources":["../../src/rollup/checkpoint_merge_rollup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAI9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,qBAAa,kCAAkC;IAE3C;;OAEG;IACI,eAAe,EAAE;QACtB,eAAe,CAAC,4BAA4B,CAAC;QAC7C,eAAe,CAAC,4BAA4B,CAAC;KAC9C;;IAND;;OAEG;IACI,eAAe,EAAE;QACtB,eAAe,CAAC,4BAA4B,CAAC;QAC7C,eAAe,CAAC,4BAA4B,CAAC;KAC9C;IAGH,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAQ/C,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,MAAM;IAIN,MAAM,KAAK,MAAM,2EAEhB;CACF"}
@@ -0,0 +1,37 @@
1
+ import { bufferSchemaFor } from '@aztec/foundation/schemas';
2
+ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
+ import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
4
+ import { ProofData } from '../proofs/proof_data.js';
5
+ import { CheckpointRollupPublicInputs } from './checkpoint_rollup_public_inputs.js';
6
+ /**
7
+ * Represents inputs of the checkpoint merge rollup circuit.
8
+ */ export class CheckpointMergeRollupPrivateInputs {
9
+ previousRollups;
10
+ constructor(/**
11
+ * Previous rollup data from the 2 checkpoint root or merge rollup circuits that preceded this checkpoint merge rollup circuit.
12
+ */ previousRollups){
13
+ this.previousRollups = previousRollups;
14
+ }
15
+ toBuffer() {
16
+ return serializeToBuffer(this.previousRollups);
17
+ }
18
+ static fromBuffer(buffer) {
19
+ const reader = BufferReader.asReader(buffer);
20
+ return new CheckpointMergeRollupPrivateInputs([
21
+ ProofData.fromBuffer(reader, CheckpointRollupPublicInputs),
22
+ ProofData.fromBuffer(reader, CheckpointRollupPublicInputs)
23
+ ]);
24
+ }
25
+ toString() {
26
+ return bufferToHex(this.toBuffer());
27
+ }
28
+ static fromString(str) {
29
+ return CheckpointMergeRollupPrivateInputs.fromBuffer(hexToBuffer(str));
30
+ }
31
+ toJSON() {
32
+ return this.toBuffer();
33
+ }
34
+ static get schema() {
35
+ return bufferSchemaFor(CheckpointMergeRollupPrivateInputs);
36
+ }
37
+ }
@@ -0,0 +1,105 @@
1
+ import { BlobAccumulatorPublicInputs, FinalBlobBatchingChallenges } from '@aztec/blob-lib';
2
+ import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
3
+ import { EthAddress } from '@aztec/foundation/eth-address';
4
+ import { Fr } from '@aztec/foundation/fields';
5
+ import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
6
+ import type { FieldsOf } from '@aztec/foundation/types';
7
+ import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
8
+ import { EpochConstantData } from './epoch_constant_data.js';
9
+ /**
10
+ * Output of the checkpoint root and checkpoint merge rollup circuits.
11
+ */
12
+ export declare class CheckpointRollupPublicInputs {
13
+ /**
14
+ * Constants for the entire epoch.
15
+ */
16
+ constants: EpochConstantData;
17
+ /**
18
+ * Archive tree immediately before this checkpoint range.
19
+ */
20
+ previousArchive: AppendOnlyTreeSnapshot;
21
+ /**
22
+ * Archive tree after adding this checkpoint range.
23
+ */
24
+ newArchive: AppendOnlyTreeSnapshot;
25
+ /**
26
+ * The hashes of the headers of the constituent checkpoints.
27
+ */
28
+ checkpointHeaderHashes: Tuple<Fr, typeof AZTEC_MAX_EPOCH_DURATION>;
29
+ /**
30
+ * The summed transaction fees and recipients of the constituent checkpoints.
31
+ */
32
+ fees: Tuple<FeeRecipient, typeof AZTEC_MAX_EPOCH_DURATION>;
33
+ /**
34
+ * Accumulated opening proofs for all blobs before this checkpoint range.
35
+ */
36
+ startBlobAccumulator: BlobAccumulatorPublicInputs;
37
+ /**
38
+ * Accumulated opening proofs for all blobs after applying this checkpoint range.
39
+ */
40
+ endBlobAccumulator: BlobAccumulatorPublicInputs;
41
+ /**
42
+ * Final values z and gamma, shared across the epoch.
43
+ */
44
+ finalBlobChallenges: FinalBlobBatchingChallenges;
45
+ constructor(
46
+ /**
47
+ * Constants for the entire epoch.
48
+ */
49
+ constants: EpochConstantData,
50
+ /**
51
+ * Archive tree immediately before this checkpoint range.
52
+ */
53
+ previousArchive: AppendOnlyTreeSnapshot,
54
+ /**
55
+ * Archive tree after adding this checkpoint range.
56
+ */
57
+ newArchive: AppendOnlyTreeSnapshot,
58
+ /**
59
+ * The hashes of the headers of the constituent checkpoints.
60
+ */
61
+ checkpointHeaderHashes: Tuple<Fr, typeof AZTEC_MAX_EPOCH_DURATION>,
62
+ /**
63
+ * The summed transaction fees and recipients of the constituent checkpoints.
64
+ */
65
+ fees: Tuple<FeeRecipient, typeof AZTEC_MAX_EPOCH_DURATION>,
66
+ /**
67
+ * Accumulated opening proofs for all blobs before this checkpoint range.
68
+ */
69
+ startBlobAccumulator: BlobAccumulatorPublicInputs,
70
+ /**
71
+ * Accumulated opening proofs for all blobs after applying this checkpoint range.
72
+ */
73
+ endBlobAccumulator: BlobAccumulatorPublicInputs,
74
+ /**
75
+ * Final values z and gamma, shared across the epoch.
76
+ */
77
+ finalBlobChallenges: FinalBlobBatchingChallenges);
78
+ static fromBuffer(buffer: Buffer | BufferReader): CheckpointRollupPublicInputs;
79
+ toBuffer(): Buffer<ArrayBufferLike>;
80
+ toString(): `0x${string}`;
81
+ static fromString(str: string): CheckpointRollupPublicInputs;
82
+ /** Returns a buffer representation for JSON serialization. */
83
+ toJSON(): Buffer<ArrayBufferLike>;
84
+ /** Creates an instance from a hex string. */
85
+ static get schema(): import("zod").ZodType<CheckpointRollupPublicInputs, any, string>;
86
+ }
87
+ export declare class FeeRecipient {
88
+ recipient: EthAddress;
89
+ value: Fr;
90
+ constructor(recipient: EthAddress, value: Fr);
91
+ static fromBuffer(buffer: Buffer | BufferReader): FeeRecipient;
92
+ toBuffer(): Buffer<ArrayBufferLike>;
93
+ static getFields(fields: FieldsOf<FeeRecipient>): readonly [EthAddress, Fr];
94
+ toFields(): Fr[];
95
+ isEmpty(): boolean;
96
+ toFriendlyJSON(): {
97
+ recipient?: undefined;
98
+ value?: undefined;
99
+ } | {
100
+ recipient: `0x${string}`;
101
+ value: `0x${string}`;
102
+ };
103
+ static random(): FeeRecipient;
104
+ }
105
+ //# sourceMappingURL=checkpoint_rollup_public_inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkpoint_rollup_public_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/checkpoint_rollup_public_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAwC,MAAM,6BAA6B,CAAC;AAE7G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,4BAA4B;IAErC;;OAEG;IACI,SAAS,EAAE,iBAAiB;IACnC;;OAEG;IACI,eAAe,EAAE,sBAAsB;IAC9C;;OAEG;IACI,UAAU,EAAE,sBAAsB;IACzC;;OAEG;IACI,sBAAsB,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,wBAAwB,CAAC;IACzE;;OAEG;IACI,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,OAAO,wBAAwB,CAAC;IACjE;;OAEG;IACI,oBAAoB,EAAE,2BAA2B;IACxD;;OAEG;IACI,kBAAkB,EAAE,2BAA2B;IACtD;;OAEG;IACI,mBAAmB,EAAE,2BAA2B;;IA/BvD;;OAEG;IACI,SAAS,EAAE,iBAAiB;IACnC;;OAEG;IACI,eAAe,EAAE,sBAAsB;IAC9C;;OAEG;IACI,UAAU,EAAE,sBAAsB;IACzC;;OAEG;IACI,sBAAsB,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,wBAAwB,CAAC;IACzE;;OAEG;IACI,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,OAAO,wBAAwB,CAAC;IACjE;;OAEG;IACI,oBAAoB,EAAE,2BAA2B;IACxD;;OAEG;IACI,kBAAkB,EAAE,2BAA2B;IACtD;;OAEG;IACI,mBAAmB,EAAE,2BAA2B;IAGzD,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAc/C,QAAQ;IAaR,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,8DAA8D;IAC9D,MAAM;IAIN,6CAA6C;IAC7C,MAAM,KAAK,MAAM,qEAEhB;CACF;AAED,qBAAa,YAAY;IAEd,SAAS,EAAE,UAAU;IACrB,KAAK,EAAE,EAAE;gBADT,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,EAAE;IAGlB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY;IAK9D,QAAQ;IAIR,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC;IAI/C,QAAQ;IAIR,OAAO;IAIP,cAAc;;;;;;;IAOd,MAAM,CAAC,MAAM;CAGd"}
@@ -0,0 +1,105 @@
1
+ import { BlobAccumulatorPublicInputs, FinalBlobBatchingChallenges } from '@aztec/blob-lib';
2
+ import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
3
+ import { EthAddress } from '@aztec/foundation/eth-address';
4
+ import { Fr } from '@aztec/foundation/fields';
5
+ import { bufferSchemaFor } from '@aztec/foundation/schemas';
6
+ import { BufferReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
7
+ import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
8
+ import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
9
+ import { EpochConstantData } from './epoch_constant_data.js';
10
+ /**
11
+ * Output of the checkpoint root and checkpoint merge rollup circuits.
12
+ */ export class CheckpointRollupPublicInputs {
13
+ constants;
14
+ previousArchive;
15
+ newArchive;
16
+ checkpointHeaderHashes;
17
+ fees;
18
+ startBlobAccumulator;
19
+ endBlobAccumulator;
20
+ finalBlobChallenges;
21
+ constructor(/**
22
+ * Constants for the entire epoch.
23
+ */ constants, /**
24
+ * Archive tree immediately before this checkpoint range.
25
+ */ previousArchive, /**
26
+ * Archive tree after adding this checkpoint range.
27
+ */ newArchive, /**
28
+ * The hashes of the headers of the constituent checkpoints.
29
+ */ checkpointHeaderHashes, /**
30
+ * The summed transaction fees and recipients of the constituent checkpoints.
31
+ */ fees, /**
32
+ * Accumulated opening proofs for all blobs before this checkpoint range.
33
+ */ startBlobAccumulator, /**
34
+ * Accumulated opening proofs for all blobs after applying this checkpoint range.
35
+ */ endBlobAccumulator, /**
36
+ * Final values z and gamma, shared across the epoch.
37
+ */ finalBlobChallenges){
38
+ this.constants = constants;
39
+ this.previousArchive = previousArchive;
40
+ this.newArchive = newArchive;
41
+ this.checkpointHeaderHashes = checkpointHeaderHashes;
42
+ this.fees = fees;
43
+ this.startBlobAccumulator = startBlobAccumulator;
44
+ this.endBlobAccumulator = endBlobAccumulator;
45
+ this.finalBlobChallenges = finalBlobChallenges;
46
+ }
47
+ static fromBuffer(buffer) {
48
+ const reader = BufferReader.asReader(buffer);
49
+ return new CheckpointRollupPublicInputs(reader.readObject(EpochConstantData), reader.readObject(AppendOnlyTreeSnapshot), reader.readObject(AppendOnlyTreeSnapshot), reader.readArray(AZTEC_MAX_EPOCH_DURATION, Fr), reader.readArray(AZTEC_MAX_EPOCH_DURATION, FeeRecipient), reader.readObject(BlobAccumulatorPublicInputs), reader.readObject(BlobAccumulatorPublicInputs), reader.readObject(FinalBlobBatchingChallenges));
50
+ }
51
+ toBuffer() {
52
+ return serializeToBuffer(this.constants, this.previousArchive, this.newArchive, this.checkpointHeaderHashes, this.fees, this.startBlobAccumulator, this.endBlobAccumulator, this.finalBlobChallenges);
53
+ }
54
+ toString() {
55
+ return bufferToHex(this.toBuffer());
56
+ }
57
+ static fromString(str) {
58
+ return CheckpointRollupPublicInputs.fromBuffer(hexToBuffer(str));
59
+ }
60
+ /** Returns a buffer representation for JSON serialization. */ toJSON() {
61
+ return this.toBuffer();
62
+ }
63
+ /** Creates an instance from a hex string. */ static get schema() {
64
+ return bufferSchemaFor(CheckpointRollupPublicInputs);
65
+ }
66
+ }
67
+ export class FeeRecipient {
68
+ recipient;
69
+ value;
70
+ constructor(recipient, value){
71
+ this.recipient = recipient;
72
+ this.value = value;
73
+ }
74
+ static fromBuffer(buffer) {
75
+ const reader = BufferReader.asReader(buffer);
76
+ return new FeeRecipient(reader.readObject(EthAddress), Fr.fromBuffer(reader));
77
+ }
78
+ toBuffer() {
79
+ return serializeToBuffer(this.recipient, this.value);
80
+ }
81
+ static getFields(fields) {
82
+ return [
83
+ fields.recipient,
84
+ fields.value
85
+ ];
86
+ }
87
+ toFields() {
88
+ return serializeToFields(...FeeRecipient.getFields(this));
89
+ }
90
+ isEmpty() {
91
+ return this.value.isZero() && this.recipient.isZero();
92
+ }
93
+ toFriendlyJSON() {
94
+ if (this.isEmpty()) {
95
+ return {};
96
+ }
97
+ return {
98
+ recipient: this.recipient.toString(),
99
+ value: this.value.toString()
100
+ };
101
+ }
102
+ static random() {
103
+ return new FeeRecipient(EthAddress.random(), Fr.random());
104
+ }
105
+ }
@@ -0,0 +1,117 @@
1
+ import { BlobAccumulatorPublicInputs, FinalBlobBatchingChallenges } from '@aztec/blob-lib';
2
+ import { ARCHIVE_HEIGHT, BLOBS_PER_BLOCK } from '@aztec/constants';
3
+ import { BLS12Point, Fr } from '@aztec/foundation/fields';
4
+ import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
5
+ import type { FieldsOf } from '@aztec/foundation/types';
6
+ import { BlockHeader } from '../tx/block_header.js';
7
+ import { BlockRollupPublicInputs } from './block_rollup_public_inputs.js';
8
+ import type { RollupProofData } from './rollup_proof_data.js';
9
+ export declare class CheckpointRootRollupHints {
10
+ /**
11
+ * The header of the previous block before this checkpoint.
12
+ */
13
+ previousBlockHeader: BlockHeader;
14
+ /**
15
+ * Hint for checking the hash of previous_block_header is the last leaf of the previous archive.
16
+ */
17
+ previousArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>;
18
+ /**
19
+ * The current blob accumulation state across the epoch.
20
+ */
21
+ startBlobAccumulator: BlobAccumulatorPublicInputs;
22
+ /**
23
+ * Finalized challenges z and gamma for performing blob batching. Shared value across the epoch.
24
+ */
25
+ finalBlobChallenges: FinalBlobBatchingChallenges;
26
+ /**
27
+ * Flat list of all tx effects which will be added to the blob.
28
+ * Below line gives error 'Type instantiation is excessively deep and possibly infinite. ts(2589)'
29
+ * Tuple<Fr, FIELDS_PER_BLOB * BLOBS_PER_BLOCK>
30
+ */
31
+ blobFields: Fr[];
32
+ /**
33
+ * KZG commitments representing the blob (precomputed in ts, injected to use inside circuit).
34
+ */
35
+ blobCommitments: Tuple<BLS12Point, typeof BLOBS_PER_BLOCK>;
36
+ /**
37
+ * The hash of eth blob hashes for this block
38
+ * See yarn-project/foundation/src/blob/index.ts or body.ts for calculation
39
+ */
40
+ blobsHash: Fr;
41
+ constructor(
42
+ /**
43
+ * The header of the previous block before this checkpoint.
44
+ */
45
+ previousBlockHeader: BlockHeader,
46
+ /**
47
+ * Hint for checking the hash of previous_block_header is the last leaf of the previous archive.
48
+ */
49
+ previousArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
50
+ /**
51
+ * The current blob accumulation state across the epoch.
52
+ */
53
+ startBlobAccumulator: BlobAccumulatorPublicInputs,
54
+ /**
55
+ * Finalized challenges z and gamma for performing blob batching. Shared value across the epoch.
56
+ */
57
+ finalBlobChallenges: FinalBlobBatchingChallenges,
58
+ /**
59
+ * Flat list of all tx effects which will be added to the blob.
60
+ * Below line gives error 'Type instantiation is excessively deep and possibly infinite. ts(2589)'
61
+ * Tuple<Fr, FIELDS_PER_BLOB * BLOBS_PER_BLOCK>
62
+ */
63
+ blobFields: Fr[],
64
+ /**
65
+ * KZG commitments representing the blob (precomputed in ts, injected to use inside circuit).
66
+ */
67
+ blobCommitments: Tuple<BLS12Point, typeof BLOBS_PER_BLOCK>,
68
+ /**
69
+ * The hash of eth blob hashes for this block
70
+ * See yarn-project/foundation/src/blob/index.ts or body.ts for calculation
71
+ */
72
+ blobsHash: Fr);
73
+ static from(fields: FieldsOf<CheckpointRootRollupHints>): CheckpointRootRollupHints;
74
+ static getFields(fields: FieldsOf<CheckpointRootRollupHints>): readonly [BlockHeader, [Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr], BlobAccumulatorPublicInputs, FinalBlobBatchingChallenges, Fr[], [BLS12Point, BLS12Point, BLS12Point], Fr];
75
+ toBuffer(): Buffer<ArrayBufferLike>;
76
+ static fromBuffer(buffer: Buffer | BufferReader): CheckpointRootRollupHints;
77
+ toString(): `0x${string}`;
78
+ static fromString(str: string): CheckpointRootRollupHints;
79
+ toJSON(): Buffer<ArrayBufferLike>;
80
+ static get schema(): import("zod").ZodType<CheckpointRootRollupHints, any, string>;
81
+ }
82
+ export declare class CheckpointRootRollupPrivateInputs {
83
+ previousRollups: [RollupProofData<BlockRollupPublicInputs>, RollupProofData<BlockRollupPublicInputs>];
84
+ hints: CheckpointRootRollupHints;
85
+ constructor(previousRollups: [RollupProofData<BlockRollupPublicInputs>, RollupProofData<BlockRollupPublicInputs>], hints: CheckpointRootRollupHints);
86
+ static from(fields: FieldsOf<CheckpointRootRollupPrivateInputs>): CheckpointRootRollupPrivateInputs;
87
+ static getFields(fields: FieldsOf<CheckpointRootRollupPrivateInputs>): readonly [[RollupProofData<BlockRollupPublicInputs>, RollupProofData<BlockRollupPublicInputs>], CheckpointRootRollupHints];
88
+ toBuffer(): Buffer<ArrayBufferLike>;
89
+ static fromBuffer(buffer: Buffer | BufferReader): CheckpointRootRollupPrivateInputs;
90
+ toString(): `0x${string}`;
91
+ static fromString(str: string): CheckpointRootRollupPrivateInputs;
92
+ toJSON(): Buffer<ArrayBufferLike>;
93
+ static get schema(): import("zod").ZodType<CheckpointRootRollupPrivateInputs, any, string>;
94
+ }
95
+ export declare class CheckpointRootSingleBlockRollupPrivateInputs {
96
+ previousRollup: RollupProofData<BlockRollupPublicInputs>;
97
+ hints: CheckpointRootRollupHints;
98
+ constructor(previousRollup: RollupProofData<BlockRollupPublicInputs>, hints: CheckpointRootRollupHints);
99
+ static from(fields: FieldsOf<CheckpointRootSingleBlockRollupPrivateInputs>): CheckpointRootSingleBlockRollupPrivateInputs;
100
+ static getFields(fields: FieldsOf<CheckpointRootSingleBlockRollupPrivateInputs>): readonly [RollupProofData<BlockRollupPublicInputs>, CheckpointRootRollupHints];
101
+ toBuffer(): Buffer<ArrayBufferLike>;
102
+ static fromBuffer(buffer: Buffer | BufferReader): CheckpointRootSingleBlockRollupPrivateInputs;
103
+ toString(): `0x${string}`;
104
+ static fromString(str: string): CheckpointRootSingleBlockRollupPrivateInputs;
105
+ toJSON(): Buffer<ArrayBufferLike>;
106
+ static get schema(): import("zod").ZodType<CheckpointRootSingleBlockRollupPrivateInputs, any, string>;
107
+ }
108
+ export declare class CheckpointPaddingRollupPrivateInputs {
109
+ constructor();
110
+ toBuffer(): Buffer<ArrayBuffer>;
111
+ static fromBuffer(_buffer: Buffer | BufferReader): CheckpointPaddingRollupPrivateInputs;
112
+ toString(): `0x${string}`;
113
+ static fromString(_str: string): CheckpointPaddingRollupPrivateInputs;
114
+ toJSON(): Buffer<ArrayBuffer>;
115
+ static get schema(): import("zod").ZodType<CheckpointPaddingRollupPrivateInputs, any, string>;
116
+ }
117
+ //# sourceMappingURL=checkpoint_root_rollup.d.ts.map
@@ -0,0 +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