@aztec/stdlib 3.0.0-nightly.20250908 → 3.0.0-nightly.20250911

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 (157) hide show
  1. package/dest/block/index.d.ts +2 -0
  2. package/dest/block/index.d.ts.map +1 -1
  3. package/dest/block/index.js +2 -0
  4. package/dest/block/l2_block.d.ts +2 -8
  5. package/dest/block/l2_block.d.ts.map +1 -1
  6. package/dest/block/l2_block.js +5 -3
  7. package/dest/block/l2_block_info.d.ts +41 -0
  8. package/dest/block/l2_block_info.d.ts.map +1 -0
  9. package/dest/block/l2_block_info.js +40 -0
  10. package/dest/block/l2_block_source.d.ts +1 -428
  11. package/dest/block/l2_block_source.d.ts.map +1 -1
  12. package/dest/block/l2_block_source.js +0 -28
  13. package/dest/block/proposal/attestations_and_signers.d.ts +48 -0
  14. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -0
  15. package/dest/block/proposal/attestations_and_signers.js +99 -0
  16. package/dest/block/proposal/index.d.ts +1 -0
  17. package/dest/block/proposal/index.d.ts.map +1 -1
  18. package/dest/block/proposal/index.js +1 -0
  19. package/dest/block/published_l2_block.d.ts +25 -1
  20. package/dest/block/published_l2_block.d.ts.map +1 -1
  21. package/dest/block/published_l2_block.js +20 -1
  22. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  23. package/dest/block/test/l2_tips_store_test_suite.js +2 -1
  24. package/dest/block/validate_block_result.d.ts +222 -0
  25. package/dest/block/validate_block_result.d.ts.map +1 -0
  26. package/dest/block/validate_block_result.js +83 -0
  27. package/dest/interfaces/archiver.d.ts.map +1 -1
  28. package/dest/interfaces/archiver.js +2 -1
  29. package/dest/interfaces/block-builder.d.ts +5 -6
  30. package/dest/interfaces/block-builder.d.ts.map +1 -1
  31. package/dest/interfaces/proving-job.d.ts +24 -24
  32. package/dest/interfaces/proving-job.d.ts.map +1 -1
  33. package/dest/interfaces/proving-job.js +15 -15
  34. package/dest/interfaces/server_circuit_prover.d.ts +4 -8
  35. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  36. package/dest/interfaces/validator.d.ts +3 -0
  37. package/dest/interfaces/validator.d.ts.map +1 -1
  38. package/dest/kernel/private_kernel_prover_output.d.ts +1 -1
  39. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  40. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +2 -0
  41. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  42. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -0
  43. package/dest/noir/index.d.ts +9 -0
  44. package/dest/noir/index.d.ts.map +1 -1
  45. package/dest/p2p/block_attestation.d.ts +1 -0
  46. package/dest/p2p/block_attestation.d.ts.map +1 -1
  47. package/dest/p2p/block_attestation.js +3 -0
  48. package/dest/p2p/block_proposal.d.ts +2 -2
  49. package/dest/p2p/block_proposal.d.ts.map +1 -1
  50. package/dest/p2p/block_proposal.js +3 -1
  51. package/dest/p2p/consensus_payload.d.ts +1 -0
  52. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  53. package/dest/p2p/consensus_payload.js +6 -4
  54. package/dest/p2p/signature_utils.d.ts +2 -1
  55. package/dest/p2p/signature_utils.d.ts.map +1 -1
  56. package/dest/p2p/signature_utils.js +1 -0
  57. package/dest/proofs/client_ivc_proof.d.ts +5 -8
  58. package/dest/proofs/client_ivc_proof.d.ts.map +1 -1
  59. package/dest/proofs/client_ivc_proof.js +27 -20
  60. package/dest/proofs/index.d.ts +1 -0
  61. package/dest/proofs/index.d.ts.map +1 -1
  62. package/dest/proofs/index.js +1 -0
  63. package/dest/proofs/proof_data.d.ts +20 -0
  64. package/dest/proofs/proof_data.d.ts.map +1 -0
  65. package/dest/proofs/proof_data.js +22 -0
  66. package/dest/proofs/proving_request_type.d.ts +12 -13
  67. package/dest/proofs/proving_request_type.d.ts.map +1 -1
  68. package/dest/proofs/proving_request_type.js +12 -12
  69. package/dest/rollup/index.d.ts +1 -3
  70. package/dest/rollup/index.d.ts.map +1 -1
  71. package/dest/rollup/index.js +1 -3
  72. package/dest/rollup/private_base_rollup_inputs.d.ts +5 -5
  73. package/dest/rollup/private_base_rollup_inputs.d.ts.map +1 -1
  74. package/dest/rollup/private_base_rollup_inputs.js +7 -9
  75. package/dest/rollup/public_base_rollup_inputs.d.ts +5 -5
  76. package/dest/rollup/public_base_rollup_inputs.d.ts.map +1 -1
  77. package/dest/rollup/public_base_rollup_inputs.js +7 -9
  78. package/dest/rollup/public_tube_private_inputs.d.ts +19 -0
  79. package/dest/rollup/public_tube_private_inputs.d.ts.map +1 -0
  80. package/dest/rollup/public_tube_private_inputs.js +38 -0
  81. package/dest/stats/stats.d.ts +1 -1
  82. package/dest/stats/stats.d.ts.map +1 -1
  83. package/dest/tests/factories.d.ts +4 -1
  84. package/dest/tests/factories.d.ts.map +1 -1
  85. package/dest/tests/factories.js +9 -15
  86. package/dest/tests/mocks.d.ts +3 -1
  87. package/dest/tests/mocks.d.ts.map +1 -1
  88. package/dest/tests/mocks.js +10 -9
  89. package/dest/tx/content_commitment.d.ts +1 -0
  90. package/dest/tx/content_commitment.d.ts.map +1 -1
  91. package/dest/tx/content_commitment.js +3 -0
  92. package/dest/tx/partial_state_reference.d.ts +1 -0
  93. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  94. package/dest/tx/partial_state_reference.js +3 -0
  95. package/dest/tx/proposed_block_header.d.ts +1 -0
  96. package/dest/tx/proposed_block_header.d.ts.map +1 -1
  97. package/dest/tx/proposed_block_header.js +3 -0
  98. package/dest/tx/state_reference.d.ts +1 -0
  99. package/dest/tx/state_reference.d.ts.map +1 -1
  100. package/dest/tx/state_reference.js +3 -0
  101. package/dest/tx/tx.d.ts +0 -2
  102. package/dest/tx/tx.d.ts.map +1 -1
  103. package/dest/tx/tx.js +2 -3
  104. package/dest/update-checker/update-checker.d.ts +1 -1
  105. package/dest/update-checker/update-checker.d.ts.map +1 -1
  106. package/dest/update-checker/update-checker.js +1 -1
  107. package/package.json +8 -8
  108. package/src/block/index.ts +2 -0
  109. package/src/block/l2_block.ts +6 -11
  110. package/src/block/l2_block_info.ts +63 -0
  111. package/src/block/l2_block_source.ts +1 -51
  112. package/src/block/proposal/attestations_and_signers.ts +121 -0
  113. package/src/block/proposal/index.ts +1 -0
  114. package/src/block/published_l2_block.ts +38 -5
  115. package/src/block/test/l2_tips_store_test_suite.ts +7 -6
  116. package/src/block/validate_block_result.ts +122 -0
  117. package/src/interfaces/archiver.ts +2 -1
  118. package/src/interfaces/block-builder.ts +9 -6
  119. package/src/interfaces/proving-job.ts +19 -14
  120. package/src/interfaces/server_circuit_prover.ts +13 -13
  121. package/src/interfaces/validator.ts +7 -0
  122. package/src/kernel/private_kernel_prover_output.ts +1 -1
  123. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +9 -0
  124. package/src/noir/index.ts +9 -0
  125. package/src/p2p/block_attestation.ts +4 -0
  126. package/src/p2p/block_proposal.ts +5 -3
  127. package/src/p2p/consensus_payload.ts +7 -4
  128. package/src/p2p/signature_utils.ts +1 -0
  129. package/src/proofs/client_ivc_proof.ts +26 -20
  130. package/src/proofs/index.ts +1 -0
  131. package/src/proofs/proof_data.ts +39 -0
  132. package/src/proofs/proving_request_type.ts +1 -3
  133. package/src/rollup/index.ts +1 -3
  134. package/src/rollup/private_base_rollup_inputs.ts +8 -8
  135. package/src/rollup/public_base_rollup_inputs.ts +5 -8
  136. package/src/rollup/public_tube_private_inputs.ts +46 -0
  137. package/src/stats/stats.ts +2 -2
  138. package/src/tests/factories.ts +20 -23
  139. package/src/tests/mocks.ts +18 -6
  140. package/src/tx/content_commitment.ts +4 -0
  141. package/src/tx/partial_state_reference.ts +8 -0
  142. package/src/tx/proposed_block_header.ts +13 -0
  143. package/src/tx/state_reference.ts +4 -0
  144. package/src/tx/tx.ts +2 -3
  145. package/src/update-checker/update-checker.ts +1 -1
  146. package/dest/rollup/private_tube_data.d.ts +0 -15
  147. package/dest/rollup/private_tube_data.d.ts.map +0 -1
  148. package/dest/rollup/private_tube_data.js +0 -25
  149. package/dest/rollup/public_tube_data.d.ts +0 -15
  150. package/dest/rollup/public_tube_data.d.ts.map +0 -1
  151. package/dest/rollup/public_tube_data.js +0 -25
  152. package/dest/rollup/tube_inputs.d.ts +0 -43
  153. package/dest/rollup/tube_inputs.d.ts.map +0 -1
  154. package/dest/rollup/tube_inputs.js +0 -63
  155. package/src/rollup/private_tube_data.ts +0 -35
  156. package/src/rollup/public_tube_data.ts +0 -35
  157. package/src/rollup/tube_inputs.ts +0 -77
package/src/tx/tx.ts CHANGED
@@ -38,7 +38,6 @@ export class Tx extends Gossipable {
38
38
  public readonly data: PrivateKernelTailCircuitPublicInputs,
39
39
  /**
40
40
  * Proof from the private kernel circuit.
41
- * TODO(#7368): This client IVC object currently contains various VKs that will eventually be more like static data.
42
41
  */
43
42
  public readonly clientIvcProof: ClientIvcProof,
44
43
  /**
@@ -238,7 +237,7 @@ export class Tx extends Gossipable {
238
237
  classPublishedCount: this.data.getNonEmptyContractClassLogsHashes().length,
239
238
  contractClassLogSize: this.data.getEmittedContractClassLogsLength(),
240
239
 
241
- proofSize: this.clientIvcProof.clientIvcProofBuffer.length,
240
+ proofSize: this.clientIvcProof.proof.length,
242
241
  size: this.toBuffer().length,
243
242
 
244
243
  feePaymentMethod:
@@ -250,7 +249,7 @@ export class Tx extends Gossipable {
250
249
  getSize() {
251
250
  return (
252
251
  this.data.getSize() +
253
- this.clientIvcProof.clientIvcProofBuffer.length +
252
+ this.clientIvcProof.proof.length * Fr.SIZE_IN_BYTES +
254
253
  arraySerializedSizeOfNonEmpty(this.contractClassLogFields) +
255
254
  this.publicFunctionCalldata.reduce((accum, cd) => accum + cd.getSize(), 0)
256
255
  );
@@ -43,7 +43,7 @@ export class UpdateChecker extends EventEmitter<EventMap> {
43
43
  private rollupVersion: bigint,
44
44
  private fetch: typeof globalThis.fetch,
45
45
  private getLatestRollupVersion: () => Promise<bigint>,
46
- private checkIntervalMs = 60_000, // every minute
46
+ private checkIntervalMs = 10 * 60_000, // every 10 mins
47
47
  private log = createLogger('foundation:update-check'),
48
48
  ) {
49
49
  super();
@@ -1,15 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader } from '@aztec/foundation/serialize';
3
- import { PrivateToRollupKernelCircuitPublicInputs } from '../kernel/private_to_rollup_kernel_circuit_public_inputs.js';
4
- import { RecursiveProof } from '../proofs/recursive_proof.js';
5
- import { VkData } from '../vks/index.js';
6
- export declare class PrivateTubeData {
7
- publicInputs: PrivateToRollupKernelCircuitPublicInputs;
8
- proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>;
9
- vkData: VkData;
10
- constructor(publicInputs: PrivateToRollupKernelCircuitPublicInputs, proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>, vkData: VkData);
11
- static empty(): PrivateTubeData;
12
- static fromBuffer(buffer: Buffer | BufferReader): PrivateTubeData;
13
- toBuffer(): Buffer<ArrayBufferLike>;
14
- }
15
- //# sourceMappingURL=private_tube_data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"private_tube_data.d.ts","sourceRoot":"","sources":["../../src/rollup/private_tube_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yCAAyC,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,wCAAwC,EAAE,MAAM,6DAA6D,CAAC;AACvH,OAAO,EAAE,cAAc,EAA2B,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,eAAe;IAEjB,YAAY,EAAE,wCAAwC;IACtD,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC;IACvE,MAAM,EAAE,MAAM;gBAFd,YAAY,EAAE,wCAAwC,EACtD,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC,EACvE,MAAM,EAAE,MAAM;IAGvB,MAAM,CAAC,KAAK;IAQZ,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAS/C,QAAQ;CAGT"}
@@ -1,25 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
- import { PrivateToRollupKernelCircuitPublicInputs } from '../kernel/private_to_rollup_kernel_circuit_public_inputs.js';
4
- import { RecursiveProof, makeEmptyRecursiveProof } from '../proofs/recursive_proof.js';
5
- import { VkData } from '../vks/index.js';
6
- export class PrivateTubeData {
7
- publicInputs;
8
- proof;
9
- vkData;
10
- constructor(publicInputs, proof, vkData){
11
- this.publicInputs = publicInputs;
12
- this.proof = proof;
13
- this.vkData = vkData;
14
- }
15
- static empty() {
16
- return new PrivateTubeData(PrivateToRollupKernelCircuitPublicInputs.empty(), makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), VkData.empty());
17
- }
18
- static fromBuffer(buffer) {
19
- const reader = BufferReader.asReader(buffer);
20
- return new PrivateTubeData(reader.readObject(PrivateToRollupKernelCircuitPublicInputs), RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), reader.readObject(VkData));
21
- }
22
- toBuffer() {
23
- return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
24
- }
25
- }
@@ -1,15 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader } from '@aztec/foundation/serialize';
3
- import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
4
- import { RecursiveProof } from '../proofs/recursive_proof.js';
5
- import { VkData } from '../vks/index.js';
6
- export declare class PublicTubeData {
7
- publicInputs: PrivateToPublicKernelCircuitPublicInputs;
8
- proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>;
9
- vkData: VkData;
10
- constructor(publicInputs: PrivateToPublicKernelCircuitPublicInputs, proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>, vkData: VkData);
11
- static empty(): PublicTubeData;
12
- static fromBuffer(buffer: Buffer | BufferReader): PublicTubeData;
13
- toBuffer(): Buffer<ArrayBufferLike>;
14
- }
15
- //# sourceMappingURL=public_tube_data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_tube_data.d.ts","sourceRoot":"","sources":["../../src/rollup/public_tube_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yCAAyC,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,wCAAwC,EAAE,MAAM,6DAA6D,CAAC;AACvH,OAAO,EAAE,cAAc,EAA2B,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,cAAc;IAEhB,YAAY,EAAE,wCAAwC;IACtD,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC;IACvE,MAAM,EAAE,MAAM;gBAFd,YAAY,EAAE,wCAAwC,EACtD,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC,EACvE,MAAM,EAAE,MAAM;IAGvB,MAAM,CAAC,KAAK;IAQZ,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAS/C,QAAQ;CAGT"}
@@ -1,25 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
- import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
4
- import { RecursiveProof, makeEmptyRecursiveProof } from '../proofs/recursive_proof.js';
5
- import { VkData } from '../vks/index.js';
6
- export class PublicTubeData {
7
- publicInputs;
8
- proof;
9
- vkData;
10
- constructor(publicInputs, proof, vkData){
11
- this.publicInputs = publicInputs;
12
- this.proof = proof;
13
- this.vkData = vkData;
14
- }
15
- static empty() {
16
- return new PublicTubeData(PrivateToPublicKernelCircuitPublicInputs.empty(), makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), VkData.empty());
17
- }
18
- static fromBuffer(buffer) {
19
- const reader = BufferReader.asReader(buffer);
20
- return new PublicTubeData(reader.readObject(PrivateToPublicKernelCircuitPublicInputs), RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), reader.readObject(VkData));
21
- }
22
- toBuffer() {
23
- return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
24
- }
25
- }
@@ -1,43 +0,0 @@
1
- import { BufferReader } from '@aztec/foundation/serialize';
2
- import type { FieldsOf } from '@aztec/foundation/types';
3
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
4
- /**
5
- * Inputs for the tube circuit, which turns a client IVC proof folding stack into an ultrahonk proof.
6
- * 'usePublicTailVk' signifies if we should prove this with the public or private kernel tail client IVC VKs.
7
- */
8
- export declare class TubeInputs {
9
- usePublicTailVk: boolean;
10
- clientIVCData: ClientIvcProof;
11
- constructor(usePublicTailVk: boolean, clientIVCData: ClientIvcProof);
12
- static from(fields: FieldsOf<TubeInputs>): TubeInputs;
13
- static getFields(fields: FieldsOf<TubeInputs>): readonly [boolean, ClientIvcProof];
14
- /**
15
- * Serializes the inputs to a buffer.
16
- * @returns The inputs serialized to a buffer.
17
- */
18
- toBuffer(): Buffer<ArrayBufferLike>;
19
- /**
20
- * Serializes the inputs to a hex string.
21
- * @returns The instance serialized to a hex string.
22
- */
23
- toString(): `0x${string}`;
24
- /**
25
- * Deserializes the inputs from a buffer.
26
- * @param buffer - The buffer to deserialize from.
27
- * @returns A new TubeInputs instance.
28
- */
29
- static fromBuffer(buffer: Buffer | BufferReader): TubeInputs;
30
- isEmpty(): boolean;
31
- /**
32
- * Deserializes the inputs from a hex string.
33
- * @param str - A hex string to deserialize from.
34
- * @returns A new TubeInputs instance.
35
- */
36
- static fromString(str: string): TubeInputs;
37
- static empty(): TubeInputs;
38
- /** Returns a hex representation for JSON serialization. */
39
- toJSON(): Buffer<ArrayBufferLike>;
40
- /** Creates an instance from a hex string. */
41
- static get schema(): import("zod").ZodType<TubeInputs, any, string>;
42
- }
43
- //# sourceMappingURL=tube_inputs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tube_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/tube_inputs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D;;;GAGG;AACH,qBAAa,UAAU;IAEZ,eAAe,EAAE,OAAO;IACxB,aAAa,EAAE,cAAc;gBAD7B,eAAe,EAAE,OAAO,EACxB,aAAa,EAAE,cAAc;IAGtC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,UAAU;IAIrD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC;IAI7C;;;OAGG;IACH,QAAQ;IAIR;;;OAGG;IACH,QAAQ;IAIR;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU;IAK5D,OAAO,IAAI,OAAO;IAGlB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,MAAM,CAAC,KAAK;IAIZ,2DAA2D;IAC3D,MAAM;IAIN,6CAA6C;IAC7C,MAAM,KAAK,MAAM,mDAEhB;CACF"}
@@ -1,63 +0,0 @@
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 { ClientIvcProof } from '../proofs/client_ivc_proof.js';
5
- /**
6
- * Inputs for the tube circuit, which turns a client IVC proof folding stack into an ultrahonk proof.
7
- * 'usePublicTailVk' signifies if we should prove this with the public or private kernel tail client IVC VKs.
8
- */ export class TubeInputs {
9
- usePublicTailVk;
10
- clientIVCData;
11
- constructor(usePublicTailVk, clientIVCData){
12
- this.usePublicTailVk = usePublicTailVk;
13
- this.clientIVCData = clientIVCData;
14
- }
15
- static from(fields) {
16
- return new TubeInputs(...TubeInputs.getFields(fields));
17
- }
18
- static getFields(fields) {
19
- return [
20
- fields.usePublicTailVk,
21
- fields.clientIVCData
22
- ];
23
- }
24
- /**
25
- * Serializes the inputs to a buffer.
26
- * @returns The inputs serialized to a buffer.
27
- */ toBuffer() {
28
- return serializeToBuffer(...TubeInputs.getFields(this));
29
- }
30
- /**
31
- * Serializes the inputs to a hex string.
32
- * @returns The instance serialized to a hex string.
33
- */ toString() {
34
- return bufferToHex(this.toBuffer());
35
- }
36
- /**
37
- * Deserializes the inputs from a buffer.
38
- * @param buffer - The buffer to deserialize from.
39
- * @returns A new TubeInputs instance.
40
- */ static fromBuffer(buffer) {
41
- const reader = BufferReader.asReader(buffer);
42
- return new TubeInputs(reader.readBoolean(), reader.readObject(ClientIvcProof));
43
- }
44
- isEmpty() {
45
- return this.clientIVCData.isEmpty();
46
- }
47
- /**
48
- * Deserializes the inputs from a hex string.
49
- * @param str - A hex string to deserialize from.
50
- * @returns A new TubeInputs instance.
51
- */ static fromString(str) {
52
- return TubeInputs.fromBuffer(hexToBuffer(str));
53
- }
54
- static empty() {
55
- return new TubeInputs(false, ClientIvcProof.empty());
56
- }
57
- /** Returns a hex representation for JSON serialization. */ toJSON() {
58
- return this.toBuffer();
59
- }
60
- /** Creates an instance from a hex string. */ static get schema() {
61
- return bufferSchemaFor(TubeInputs);
62
- }
63
- }
@@ -1,35 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
-
4
- import { PrivateToRollupKernelCircuitPublicInputs } from '../kernel/private_to_rollup_kernel_circuit_public_inputs.js';
5
- import { RecursiveProof, makeEmptyRecursiveProof } from '../proofs/recursive_proof.js';
6
- import { VkData } from '../vks/index.js';
7
-
8
- export class PrivateTubeData {
9
- constructor(
10
- public publicInputs: PrivateToRollupKernelCircuitPublicInputs,
11
- public proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
12
- public vkData: VkData,
13
- ) {}
14
-
15
- static empty() {
16
- return new PrivateTubeData(
17
- PrivateToRollupKernelCircuitPublicInputs.empty(),
18
- makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
19
- VkData.empty(),
20
- );
21
- }
22
-
23
- static fromBuffer(buffer: Buffer | BufferReader) {
24
- const reader = BufferReader.asReader(buffer);
25
- return new PrivateTubeData(
26
- reader.readObject(PrivateToRollupKernelCircuitPublicInputs),
27
- RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
28
- reader.readObject(VkData),
29
- );
30
- }
31
-
32
- toBuffer() {
33
- return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
34
- }
35
- }
@@ -1,35 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
-
4
- import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
5
- import { RecursiveProof, makeEmptyRecursiveProof } from '../proofs/recursive_proof.js';
6
- import { VkData } from '../vks/index.js';
7
-
8
- export class PublicTubeData {
9
- constructor(
10
- public publicInputs: PrivateToPublicKernelCircuitPublicInputs,
11
- public proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
12
- public vkData: VkData,
13
- ) {}
14
-
15
- static empty() {
16
- return new PublicTubeData(
17
- PrivateToPublicKernelCircuitPublicInputs.empty(),
18
- makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
19
- VkData.empty(),
20
- );
21
- }
22
-
23
- static fromBuffer(buffer: Buffer | BufferReader) {
24
- const reader = BufferReader.asReader(buffer);
25
- return new PublicTubeData(
26
- reader.readObject(PrivateToPublicKernelCircuitPublicInputs),
27
- RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
28
- reader.readObject(VkData),
29
- );
30
- }
31
-
32
- toBuffer() {
33
- return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
34
- }
35
- }
@@ -1,77 +0,0 @@
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 type { FieldsOf } from '@aztec/foundation/types';
5
-
6
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
7
-
8
- /**
9
- * Inputs for the tube circuit, which turns a client IVC proof folding stack into an ultrahonk proof.
10
- * 'usePublicTailVk' signifies if we should prove this with the public or private kernel tail client IVC VKs.
11
- */
12
- export class TubeInputs {
13
- constructor(
14
- public usePublicTailVk: boolean,
15
- public clientIVCData: ClientIvcProof,
16
- ) {}
17
-
18
- static from(fields: FieldsOf<TubeInputs>): TubeInputs {
19
- return new TubeInputs(...TubeInputs.getFields(fields));
20
- }
21
-
22
- static getFields(fields: FieldsOf<TubeInputs>) {
23
- return [fields.usePublicTailVk, fields.clientIVCData] as const;
24
- }
25
-
26
- /**
27
- * Serializes the inputs to a buffer.
28
- * @returns The inputs serialized to a buffer.
29
- */
30
- toBuffer() {
31
- return serializeToBuffer(...TubeInputs.getFields(this));
32
- }
33
-
34
- /**
35
- * Serializes the inputs to a hex string.
36
- * @returns The instance serialized to a hex string.
37
- */
38
- toString() {
39
- return bufferToHex(this.toBuffer());
40
- }
41
-
42
- /**
43
- * Deserializes the inputs from a buffer.
44
- * @param buffer - The buffer to deserialize from.
45
- * @returns A new TubeInputs instance.
46
- */
47
- static fromBuffer(buffer: Buffer | BufferReader): TubeInputs {
48
- const reader = BufferReader.asReader(buffer);
49
- return new TubeInputs(reader.readBoolean(), reader.readObject(ClientIvcProof));
50
- }
51
-
52
- isEmpty(): boolean {
53
- return this.clientIVCData.isEmpty();
54
- }
55
- /**
56
- * Deserializes the inputs from a hex string.
57
- * @param str - A hex string to deserialize from.
58
- * @returns A new TubeInputs instance.
59
- */
60
- static fromString(str: string) {
61
- return TubeInputs.fromBuffer(hexToBuffer(str));
62
- }
63
-
64
- static empty() {
65
- return new TubeInputs(false, ClientIvcProof.empty());
66
- }
67
-
68
- /** Returns a hex representation for JSON serialization. */
69
- toJSON() {
70
- return this.toBuffer();
71
- }
72
-
73
- /** Creates an instance from a hex string. */
74
- static get schema() {
75
- return bufferSchemaFor(TubeInputs);
76
- }
77
- }