@aztec/stdlib 3.0.0-nightly.20251026 → 3.0.0-nightly.20251031

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 (138) hide show
  1. package/dest/block/body.d.ts.map +1 -1
  2. package/dest/block/body.js +2 -6
  3. package/dest/block/l2_block.d.ts +11 -0
  4. package/dest/block/l2_block.d.ts.map +1 -1
  5. package/dest/block/l2_block.js +15 -1
  6. package/dest/block/l2_block_source.d.ts +5 -5
  7. package/dest/block/l2_block_source.d.ts.map +1 -1
  8. package/dest/checkpoint/checkpoint_body.d.ts +4 -0
  9. package/dest/checkpoint/checkpoint_body.d.ts.map +1 -0
  10. package/dest/checkpoint/checkpoint_body.js +9 -0
  11. package/dest/checkpoint/index.d.ts +2 -0
  12. package/dest/checkpoint/index.d.ts.map +1 -0
  13. package/dest/checkpoint/index.js +1 -0
  14. package/dest/interfaces/archiver.js +3 -3
  15. package/dest/interfaces/epoch-prover.d.ts +3 -3
  16. package/dest/interfaces/epoch-prover.d.ts.map +1 -1
  17. package/dest/interfaces/private_kernel_prover.d.ts +2 -2
  18. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  19. package/dest/interfaces/proving-job.d.ts +15 -15
  20. package/dest/interfaces/proving-job.d.ts.map +1 -1
  21. package/dest/interfaces/proving-job.js +8 -8
  22. package/dest/interfaces/server_circuit_prover.d.ts +3 -3
  23. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  24. package/dest/kernel/private_kernel_data.js +2 -2
  25. package/dest/kernel/private_kernel_prover_output.d.ts +4 -4
  26. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  27. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +1 -0
  28. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  29. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +3 -0
  30. package/dest/keys/derivation.d.ts.map +1 -1
  31. package/dest/keys/derivation.js +2 -3
  32. package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -1
  33. package/dest/logs/directional_app_tagging_secret.js +1 -2
  34. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  35. package/dest/logs/shared_secret_derivation.js +2 -4
  36. package/dest/p2p/gossipable.d.ts +4 -12
  37. package/dest/p2p/gossipable.d.ts.map +1 -1
  38. package/dest/p2p/gossipable.js +4 -7
  39. package/dest/p2p/topic_type.d.ts +4 -8
  40. package/dest/p2p/topic_type.d.ts.map +1 -1
  41. package/dest/p2p/topic_type.js +14 -8
  42. package/dest/proofs/chonk_proof.d.ts +28 -0
  43. package/dest/proofs/chonk_proof.d.ts.map +1 -0
  44. package/dest/proofs/chonk_proof.js +101 -0
  45. package/dest/proofs/index.d.ts +1 -1
  46. package/dest/proofs/index.d.ts.map +1 -1
  47. package/dest/proofs/index.js +1 -1
  48. package/dest/proofs/proof_data.d.ts +2 -2
  49. package/dest/proofs/proof_data.d.ts.map +1 -1
  50. package/dest/proofs/proving_request_type.d.ts +1 -1
  51. package/dest/proofs/proving_request_type.d.ts.map +1 -1
  52. package/dest/proofs/proving_request_type.js +1 -1
  53. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +1 -1
  54. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  55. package/dest/rollup/checkpoint_rollup_public_inputs.js +1 -1
  56. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +2 -2
  57. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  58. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +1 -1
  59. package/dest/rollup/index.d.ts +2 -2
  60. package/dest/rollup/index.d.ts.map +1 -1
  61. package/dest/rollup/index.js +2 -2
  62. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +4 -4
  63. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
  64. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +21 -0
  65. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -0
  66. package/dest/rollup/{public_tube_private_inputs.js → public_chonk_verifier_private_inputs.js} +7 -6
  67. package/dest/rollup/{public_tube_public_inputs.d.ts → public_chonk_verifier_public_inputs.d.ts} +7 -7
  68. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -0
  69. package/dest/rollup/{public_tube_public_inputs.js → public_chonk_verifier_public_inputs.js} +7 -6
  70. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +4 -4
  71. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  72. package/dest/rollup/public_tx_base_rollup_private_inputs.js +6 -6
  73. package/dest/rollup/root_rollup_public_inputs.d.ts +1 -1
  74. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  75. package/dest/rollup/root_rollup_public_inputs.js +1 -1
  76. package/dest/stats/stats.d.ts +3 -3
  77. package/dest/stats/stats.d.ts.map +1 -1
  78. package/dest/tests/factories.d.ts +3 -3
  79. package/dest/tests/factories.d.ts.map +1 -1
  80. package/dest/tests/factories.js +15 -15
  81. package/dest/tests/mocks.d.ts +3 -3
  82. package/dest/tests/mocks.d.ts.map +1 -1
  83. package/dest/tests/mocks.js +3 -3
  84. package/dest/tx/processed_tx.d.ts +2 -3
  85. package/dest/tx/processed_tx.d.ts.map +1 -1
  86. package/dest/tx/processed_tx.js +2 -7
  87. package/dest/tx/proven_tx.d.ts +7 -7
  88. package/dest/tx/proven_tx.d.ts.map +1 -1
  89. package/dest/tx/proven_tx.js +8 -8
  90. package/dest/tx/simulated_tx.js +2 -2
  91. package/dest/tx/tx.d.ts +3 -3
  92. package/dest/tx/tx.d.ts.map +1 -1
  93. package/dest/tx/tx.js +13 -13
  94. package/package.json +9 -8
  95. package/src/block/body.ts +3 -12
  96. package/src/block/l2_block.ts +15 -0
  97. package/src/block/l2_block_source.ts +5 -5
  98. package/src/checkpoint/checkpoint_body.ts +10 -0
  99. package/src/checkpoint/index.ts +1 -0
  100. package/src/interfaces/archiver.ts +3 -3
  101. package/src/interfaces/epoch-prover.ts +3 -3
  102. package/src/interfaces/private_kernel_prover.ts +2 -2
  103. package/src/interfaces/proving-job.ts +13 -10
  104. package/src/interfaces/server_circuit_prover.ts +7 -5
  105. package/src/kernel/private_kernel_data.ts +2 -2
  106. package/src/kernel/private_kernel_prover_output.ts +4 -4
  107. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +6 -0
  108. package/src/keys/derivation.ts +2 -3
  109. package/src/logs/directional_app_tagging_secret.ts +1 -2
  110. package/src/logs/shared_secret_derivation.ts +2 -4
  111. package/src/p2p/gossipable.ts +4 -12
  112. package/src/p2p/topic_type.ts +15 -8
  113. package/src/proofs/chonk_proof.ts +118 -0
  114. package/src/proofs/index.ts +1 -1
  115. package/src/proofs/proof_data.ts +2 -2
  116. package/src/proofs/proving_request_type.ts +1 -1
  117. package/src/rollup/checkpoint_rollup_public_inputs.ts +1 -1
  118. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +1 -1
  119. package/src/rollup/index.ts +2 -2
  120. package/src/rollup/private_tx_base_rollup_private_inputs.ts +2 -2
  121. package/src/rollup/{public_tube_private_inputs.ts → public_chonk_verifier_private_inputs.ts} +11 -10
  122. package/src/rollup/{public_tube_public_inputs.ts → public_chonk_verifier_public_inputs.ts} +9 -8
  123. package/src/rollup/public_tx_base_rollup_private_inputs.ts +4 -4
  124. package/src/rollup/root_rollup_public_inputs.ts +1 -1
  125. package/src/stats/stats.ts +3 -3
  126. package/src/tests/factories.ts +21 -21
  127. package/src/tests/mocks.ts +4 -4
  128. package/src/tx/processed_tx.ts +4 -10
  129. package/src/tx/proven_tx.ts +6 -6
  130. package/src/tx/simulated_tx.ts +2 -2
  131. package/src/tx/tx.ts +11 -11
  132. package/dest/proofs/client_ivc_proof.d.ts +0 -15
  133. package/dest/proofs/client_ivc_proof.d.ts.map +0 -1
  134. package/dest/proofs/client_ivc_proof.js +0 -48
  135. package/dest/rollup/public_tube_private_inputs.d.ts +0 -21
  136. package/dest/rollup/public_tube_private_inputs.d.ts.map +0 -1
  137. package/dest/rollup/public_tube_public_inputs.d.ts.map +0 -1
  138. package/src/proofs/client_ivc_proof.ts +0 -57
@@ -4,7 +4,7 @@ import { ContractArtifactSchema } from '../abi/abi.js';
4
4
  import { ContractInstanceWithAddressSchema } from '../contract/interfaces/contract_instance.js';
5
5
  import { Gas } from '../gas/gas.js';
6
6
  import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
7
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
7
+ import { ChonkProof } from '../proofs/chonk_proof.js';
8
8
  import { PrivateExecutionResult, collectSortedContractClassLogs } from './private_execution_result.js';
9
9
  import { SimulationStatsSchema } from './profiling.js';
10
10
  import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simulation_output.js';
@@ -42,7 +42,7 @@ export class PrivateSimulationResult {
42
42
  const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
43
43
  return await Tx.create({
44
44
  data: this.publicInputs,
45
- clientIvcProof: ClientIvcProof.empty(),
45
+ chonkProof: ChonkProof.empty(),
46
46
  contractClassLogFields: contractClassLogs,
47
47
  publicFunctionCalldata: this.privateExecutionResult.publicFunctionCalldata
48
48
  });
package/dest/tx/tx.d.ts CHANGED
@@ -10,7 +10,7 @@ import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_t
10
10
  import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
11
11
  import { Gossipable } from '../p2p/gossipable.js';
12
12
  import { TopicType } from '../p2p/topic_type.js';
13
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
13
+ import { ChonkProof } from '../proofs/chonk_proof.js';
14
14
  import type { TxStats } from '../stats/stats.js';
15
15
  import { HashedValues } from './hashed_values.js';
16
16
  import { PublicCallRequestWithCalldata } from './public_call_request_with_calldata.js';
@@ -29,7 +29,7 @@ export declare class Tx extends Gossipable {
29
29
  /**
30
30
  * Proof from the private kernel circuit.
31
31
  */
32
- readonly clientIvcProof: ClientIvcProof;
32
+ readonly chonkProof: ChonkProof;
33
33
  /**
34
34
  * Contract class log fields emitted from the tx.
35
35
  * Their order should match the order of the log hashes returned from `this.data.getNonEmptyContractClassLogsHashes`.
@@ -52,7 +52,7 @@ export declare class Tx extends Gossipable {
52
52
  /**
53
53
  * Proof from the private kernel circuit.
54
54
  */
55
- clientIvcProof: ClientIvcProof,
55
+ chonkProof: ChonkProof,
56
56
  /**
57
57
  * Contract class log fields emitted from the tx.
58
58
  * Their order should match the order of the log hashes returned from `this.data.getNonEmptyContractClassLogsHashes`.
@@ -1 +1 @@
1
- {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../src/tx/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAyD,MAAM,6BAA6B,CAAC;AAClH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,OA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;IACnC,QAAQ,IAAI,OAAO;IAmBnB,OAAO;IASP;;;OAGG;IACH,gCAAgC;IAShC;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE;IAUxB;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,GAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAO,GAAG,EAAE;IAUjF,oGAAoG;IACvF,aAAa;CAW3B;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,KAAK,CAAC,EAAE,CAAC;IACpC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,OAAO;IAWlD,QAAQ,IAAI,MAAM;CAG1B"}
package/dest/tx/tx.js CHANGED
@@ -7,7 +7,7 @@ import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_t
7
7
  import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
8
8
  import { Gossipable } from '../p2p/gossipable.js';
9
9
  import { TopicType } from '../p2p/topic_type.js';
10
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
10
+ import { ChonkProof } from '../proofs/chonk_proof.js';
11
11
  import { HashedValues } from './hashed_values.js';
12
12
  import { PublicCallRequestWithCalldata } from './public_call_request_with_calldata.js';
13
13
  import { TxHash } from './tx_hash.js';
@@ -16,7 +16,7 @@ import { TxHash } from './tx_hash.js';
16
16
  */ export class Tx extends Gossipable {
17
17
  txHash;
18
18
  data;
19
- clientIvcProof;
19
+ chonkProof;
20
20
  contractClassLogFields;
21
21
  publicFunctionCalldata;
22
22
  static p2pTopic = TopicType.tx;
@@ -25,14 +25,14 @@ import { TxHash } from './tx_hash.js';
25
25
  * Output of the private kernel circuit for this tx.
26
26
  */ data, /**
27
27
  * Proof from the private kernel circuit.
28
- */ clientIvcProof, /**
28
+ */ chonkProof, /**
29
29
  * Contract class log fields emitted from the tx.
30
30
  * Their order should match the order of the log hashes returned from `this.data.getNonEmptyContractClassLogsHashes`.
31
31
  * It's checked in data_validator.ts
32
32
  */ contractClassLogFields, /**
33
33
  * An array of calldata for the enqueued public function calls and the teardown function call.
34
34
  */ publicFunctionCalldata){
35
- super(), this.txHash = txHash, this.data = data, this.clientIvcProof = clientIvcProof, this.contractClassLogFields = contractClassLogFields, this.publicFunctionCalldata = publicFunctionCalldata;
35
+ super(), this.txHash = txHash, this.data = data, this.chonkProof = chonkProof, this.contractClassLogFields = contractClassLogFields, this.publicFunctionCalldata = publicFunctionCalldata;
36
36
  }
37
37
  // Gossipable method
38
38
  generateP2PMessageIdentifier() {
@@ -77,7 +77,7 @@ import { TxHash } from './tx_hash.js';
77
77
  * @returns An instance of Tx.
78
78
  */ static fromBuffer(buffer) {
79
79
  const reader = BufferReader.asReader(buffer);
80
- return new Tx(reader.readObject(TxHash), reader.readObject(PrivateKernelTailCircuitPublicInputs), reader.readObject(ClientIvcProof), reader.readVectorUint8Prefix(ContractClassLogFields), reader.readVectorUint8Prefix(HashedValues));
80
+ return new Tx(reader.readObject(TxHash), reader.readObject(PrivateKernelTailCircuitPublicInputs), reader.readObject(ChonkProof), reader.readVectorUint8Prefix(ContractClassLogFields), reader.readVectorUint8Prefix(HashedValues));
81
81
  }
82
82
  /**
83
83
  * Serializes the Tx object into a Buffer.
@@ -86,7 +86,7 @@ import { TxHash } from './tx_hash.js';
86
86
  return serializeToBuffer([
87
87
  this.txHash,
88
88
  this.data,
89
- this.clientIvcProof,
89
+ this.chonkProof,
90
90
  serializeArrayOfBufferableToVector(this.contractClassLogFields, 1),
91
91
  serializeArrayOfBufferableToVector(this.publicFunctionCalldata, 1)
92
92
  ]);
@@ -94,7 +94,7 @@ import { TxHash } from './tx_hash.js';
94
94
  static get schema() {
95
95
  return z.object({
96
96
  data: PrivateKernelTailCircuitPublicInputs.schema,
97
- clientIvcProof: ClientIvcProof.schema,
97
+ chonkProof: ChonkProof.schema,
98
98
  contractClassLogFields: z.array(ContractClassLogFields.schema),
99
99
  publicFunctionCalldata: z.array(HashedValues.schema)
100
100
  }).transform(Tx.create);
@@ -111,7 +111,7 @@ import { TxHash } from './tx_hash.js';
111
111
  });
112
112
  }
113
113
  static from(fields) {
114
- return new Tx(fields.txHash, fields.data, fields.clientIvcProof, fields.contractClassLogFields, fields.publicFunctionCalldata);
114
+ return new Tx(fields.txHash, fields.data, fields.chonkProof, fields.contractClassLogFields, fields.publicFunctionCalldata);
115
115
  }
116
116
  /**
117
117
  * Validates that the tx hash matches the computed hash from the tx data.
@@ -172,14 +172,14 @@ import { TxHash } from './tx_hash.js';
172
172
  privateLogCount: this.data.getNonEmptyPrivateLogs().length,
173
173
  classPublishedCount: this.data.getNonEmptyContractClassLogsHashes().length,
174
174
  contractClassLogSize: this.data.getEmittedContractClassLogsLength(),
175
- proofSize: this.clientIvcProof.proof.length,
175
+ proofSize: this.chonkProof.fields.length,
176
176
  size: this.toBuffer().length,
177
177
  feePaymentMethod: // needsSetup? then we pay through a fee payment contract
178
178
  this.data.forPublic?.needsSetup ? 'fpc' : 'fee_juice'
179
179
  };
180
180
  }
181
181
  getSize() {
182
- return this.data.getSize() + this.clientIvcProof.proof.length * Fr.SIZE_IN_BYTES + arraySerializedSizeOfNonEmpty(this.contractClassLogFields) + this.publicFunctionCalldata.reduce((accum, cd)=>accum + cd.getSize(), 0);
182
+ return this.data.getSize() + this.chonkProof.fields.length * Fr.SIZE_IN_BYTES + arraySerializedSizeOfNonEmpty(this.contractClassLogFields) + this.publicFunctionCalldata.reduce((accum, cd)=>accum + cd.getSize(), 0);
183
183
  }
184
184
  /**
185
185
  * Estimates the tx size based on its private effects. Note that the actual size of the tx
@@ -193,10 +193,10 @@ import { TxHash } from './tx_hash.js';
193
193
  * @returns The cloned transaction.
194
194
  */ static clone(tx) {
195
195
  const publicInputs = PrivateKernelTailCircuitPublicInputs.fromBuffer(tx.data.toBuffer());
196
- const clientIvcProof = ClientIvcProof.fromBuffer(tx.clientIvcProof.toBuffer());
196
+ const chonkProof = ChonkProof.fromBuffer(tx.chonkProof.toBuffer());
197
197
  const contractClassLogFields = tx.contractClassLogFields.map((p)=>p.clone());
198
198
  const publicFunctionCalldata = tx.publicFunctionCalldata.map((cd)=>HashedValues.fromBuffer(cd.toBuffer()));
199
- const clonedTx = new Tx(tx.txHash, publicInputs, clientIvcProof, contractClassLogFields, publicFunctionCalldata);
199
+ const clonedTx = new Tx(tx.txHash, publicInputs, chonkProof, contractClassLogFields, publicFunctionCalldata);
200
200
  return clonedTx;
201
201
  }
202
202
  /**
@@ -207,7 +207,7 @@ import { TxHash } from './tx_hash.js';
207
207
  return Tx.from({
208
208
  txHash: (typeof args.txHash === 'string' ? TxHash.fromString(args.txHash) : args.txHash) ?? TxHash.random(),
209
209
  data: PrivateKernelTailCircuitPublicInputs.emptyWithNullifier(),
210
- clientIvcProof: args.randomProof ? ClientIvcProof.random() : ClientIvcProof.empty(),
210
+ chonkProof: args.randomProof ? ChonkProof.random() : ChonkProof.empty(),
211
211
  contractClassLogFields: [
212
212
  ContractClassLogFields.random()
213
213
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/stdlib",
3
- "version": "3.0.0-nightly.20251026",
3
+ "version": "3.0.0-nightly.20251031",
4
4
  "type": "module",
5
5
  "inherits": [
6
6
  "../package.common.json",
@@ -39,6 +39,7 @@
39
39
  "./auth-witness": "./dest/auth_witness/index.js",
40
40
  "./block": "./dest/block/index.js",
41
41
  "./block/test": "./dest/block/test/index.js",
42
+ "./checkpoint": "./dest/checkpoint/index.js",
42
43
  "./versioning": "./dest/versioning/index.js",
43
44
  "./interfaces/client": "./dest/interfaces/client.js",
44
45
  "./interfaces/server": "./dest/interfaces/server.js",
@@ -71,13 +72,13 @@
71
72
  },
72
73
  "dependencies": {
73
74
  "@aws-sdk/client-s3": "^3.892.0",
74
- "@aztec/bb.js": "3.0.0-nightly.20251026",
75
- "@aztec/blob-lib": "3.0.0-nightly.20251026",
76
- "@aztec/constants": "3.0.0-nightly.20251026",
77
- "@aztec/ethereum": "3.0.0-nightly.20251026",
78
- "@aztec/foundation": "3.0.0-nightly.20251026",
79
- "@aztec/l1-artifacts": "3.0.0-nightly.20251026",
80
- "@aztec/noir-noirc_abi": "3.0.0-nightly.20251026",
75
+ "@aztec/bb.js": "3.0.0-nightly.20251031",
76
+ "@aztec/blob-lib": "3.0.0-nightly.20251031",
77
+ "@aztec/constants": "3.0.0-nightly.20251031",
78
+ "@aztec/ethereum": "3.0.0-nightly.20251031",
79
+ "@aztec/foundation": "3.0.0-nightly.20251031",
80
+ "@aztec/l1-artifacts": "3.0.0-nightly.20251031",
81
+ "@aztec/noir-noirc_abi": "3.0.0-nightly.20251031",
81
82
  "@google-cloud/storage": "^7.15.0",
82
83
  "axios": "^1.12.0",
83
84
  "json-stringify-deterministic": "1.0.12",
package/src/block/body.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { createBlockEndMarker, getNumTxsFromBlockEndMarker, isBlockEndMarker } from '@aztec/blob-lib/encoding';
2
- import { BLOBS_PER_BLOCK, FIELDS_PER_BLOB } from '@aztec/constants';
3
2
  import { timesParallel } from '@aztec/foundation/collection';
4
3
  import { Fr } from '@aztec/foundation/fields';
5
4
  import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
@@ -57,17 +56,7 @@ export class Body {
57
56
  * Returns a flat packed array of fields of all tx effects - used for blobs.
58
57
  */
59
58
  toBlobFields() {
60
- const flattened = getBlockBlobFields(this.txEffects);
61
-
62
- if (flattened.length > BLOBS_PER_BLOCK * FIELDS_PER_BLOB) {
63
- throw new Error(
64
- `Attempted to overfill block's blobs with ${flattened.length} elements. The maximum is ${
65
- BLOBS_PER_BLOCK * FIELDS_PER_BLOB
66
- }`,
67
- );
68
- }
69
-
70
- return flattened;
59
+ return getBlockBlobFields(this.txEffects);
71
60
  }
72
61
 
73
62
  /**
@@ -80,6 +69,8 @@ export class Body {
80
69
  txEffects.push(TxEffect.fromBlobFields(reader));
81
70
  }
82
71
 
72
+ // If the fields are from a proven block, or are constructed by calling `toBlobFields`, the following errors should never throw.
73
+
83
74
  if (!isBlockEndMarker(fields[fields.length - 1])) {
84
75
  throw new Error('Block end marker not found');
85
76
  }
@@ -4,6 +4,7 @@ import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
4
4
 
5
5
  import { z } from 'zod';
6
6
 
7
+ import { getCheckpointBlobFields } from '../checkpoint/checkpoint_body.js';
7
8
  import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
8
9
  import type { BlockHeader } from '../tx/block_header.js';
9
10
  import { Body } from './body.js';
@@ -131,6 +132,11 @@ export class L2Block {
131
132
  return this.blockHash;
132
133
  }
133
134
 
135
+ /**
136
+ * @deprecated
137
+ * This only works when there's one block per checkpoint.
138
+ * TODO(#17027): Remove this method from L2Block and create a dedicated Checkpoint class.
139
+ */
134
140
  public getCheckpointHeader() {
135
141
  return this.header.toCheckpointHeader();
136
142
  }
@@ -140,6 +146,15 @@ export class L2Block {
140
146
  return this.header.toBlockHeader();
141
147
  }
142
148
 
149
+ /**
150
+ * @deprecated
151
+ * This only works when there's one block per checkpoint.
152
+ * TODO(#17027): Remove this method from L2Block and create a dedicated Checkpoint class.
153
+ */
154
+ public getCheckpointBlobFields() {
155
+ return getCheckpointBlobFields([this.body.txEffects]);
156
+ }
157
+
143
158
  /**
144
159
  * Returns stats used for logging.
145
160
  * @returns Stats on tx count, number, and log size and count.
@@ -110,14 +110,14 @@ export interface L2BlockSource {
110
110
  getSettledTxReceipt(txHash: TxHash): Promise<TxReceipt | undefined>;
111
111
 
112
112
  /**
113
- * Returns the current L2 slot number based on the current L1 timestamp.
113
+ * Returns the current L2 slot number based on the currently synced L1 timestamp.
114
114
  */
115
- getL2SlotNumber(): Promise<bigint>;
115
+ getL2SlotNumber(): Promise<bigint | undefined>;
116
116
 
117
117
  /**
118
- * Returns the current L2 epoch number based on the current L1 timestamp.
118
+ * Returns the current L2 epoch number based on the currently synced L1 timestamp.
119
119
  */
120
- getL2EpochNumber(): Promise<bigint>;
120
+ getL2EpochNumber(): Promise<bigint | undefined>;
121
121
 
122
122
  /**
123
123
  * Returns all blocks for a given epoch.
@@ -153,7 +153,7 @@ export interface L2BlockSource {
153
153
  getGenesisValues(): Promise<{ genesisArchiveRoot: Fr }>;
154
154
 
155
155
  /** Latest synced L1 timestamp. */
156
- getL1Timestamp(): Promise<bigint>;
156
+ getL1Timestamp(): Promise<bigint | undefined>;
157
157
 
158
158
  /**
159
159
  * Returns whether the latest block in the pending chain on L1 is invalid (ie its attestations are incorrect).
@@ -0,0 +1,10 @@
1
+ import { Fr } from '@aztec/foundation/fields';
2
+
3
+ import { getBlockBlobFields } from '../block/body.js';
4
+ import type { TxEffect } from '../tx/tx_effect.js';
5
+
6
+ export function getCheckpointBlobFields(txEffectsInBlocks: TxEffect[][]) {
7
+ const blockBlobFields = txEffectsInBlocks.map(blockTxEffects => getBlockBlobFields(blockTxEffects)).flat();
8
+ const totalNumBlobFields = blockBlobFields.length + 1; // +1 for the prefix indicating the number of total blob fields in a checkpoint.
9
+ return [new Fr(totalNumBlobFields)].concat(blockBlobFields);
10
+ }
@@ -0,0 +1 @@
1
+ export * from './checkpoint_body.js';
@@ -89,8 +89,8 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
89
89
  getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
90
90
  getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
91
91
  getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
92
- getL2SlotNumber: z.function().args().returns(schemas.BigInt),
93
- getL2EpochNumber: z.function().args().returns(schemas.BigInt),
92
+ getL2SlotNumber: z.function().args().returns(schemas.BigInt.optional()),
93
+ getL2EpochNumber: z.function().args().returns(schemas.BigInt.optional()),
94
94
  getBlocksForEpoch: z.function().args(schemas.BigInt).returns(z.array(L2Block.schema)),
95
95
  getBlockHeadersForEpoch: z.function().args(schemas.BigInt).returns(z.array(BlockHeader.schema)),
96
96
  isEpochComplete: z.function().args(schemas.BigInt).returns(z.boolean()),
@@ -118,7 +118,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
118
118
  .function()
119
119
  .args()
120
120
  .returns(z.object({ genesisArchiveRoot: schemas.Fr })),
121
- getL1Timestamp: z.function().args().returns(schemas.BigInt),
121
+ getL1Timestamp: z.function().args().returns(schemas.BigInt.optional()),
122
122
  syncImmediate: z.function().args().returns(z.void()),
123
123
  isPendingChainInvalid: z.function().args().returns(z.boolean()),
124
124
  getPendingChainValidationStatus: z.function().args().returns(ValidateBlockResultSchema),
@@ -51,10 +51,10 @@ export interface EpochProver extends Omit<IBlockFactory, 'setBlockCompleted' | '
51
51
  startNewBlock(blockNumber: number, timestamp: UInt64, totalNumTxs: number): Promise<void>;
52
52
 
53
53
  /**
54
- * Kickstarts tube circuits for the specified txs. These will be used during epoch proving.
55
- * Note that if the tube circuits are not started this way, they will be started nontheless after processing.
54
+ * Kickstarts chonk verifier circuits for the specified txs. These will be used during epoch proving.
55
+ * Note that if the chonk verifier circuits are not started this way, they will be started nonetheless after processing.
56
56
  */
57
- startTubeCircuits(txs: Tx[]): Promise<void>;
57
+ startChonkVerifierCircuits(txs: Tx[]): Promise<void>;
58
58
 
59
59
  /** Returns the block. */
60
60
  setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<BlockHeader>;
@@ -10,7 +10,7 @@ import type {
10
10
  PrivateKernelTailCircuitPrivateInputs,
11
11
  PrivateKernelTailCircuitPublicInputs,
12
12
  } from '../kernel/index.js';
13
- import type { ClientIvcProof } from '../proofs/client_ivc_proof.js';
13
+ import type { ChonkProofWithPublicInputs } from '../proofs/chonk_proof.js';
14
14
 
15
15
  /**
16
16
  * PrivateKernelProver provides functionality to simulate and validate circuits, and retrieve
@@ -110,7 +110,7 @@ export interface PrivateKernelProver {
110
110
  * @param acirs The program bytecode.
111
111
  * @param witnessStack The witnessses for each program bytecode.
112
112
  */
113
- createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProof>;
113
+ createChonkProof(executionSteps: PrivateExecutionStep[]): Promise<ChonkProofWithPublicInputs>;
114
114
 
115
115
  /**
116
116
  * Compute the gate count for a given circuit.
@@ -32,8 +32,8 @@ import {
32
32
  CheckpointRootSingleBlockRollupPrivateInputs,
33
33
  } from '../rollup/checkpoint_root_rollup_private_inputs.js';
34
34
  import { PrivateTxBaseRollupPrivateInputs } from '../rollup/private_tx_base_rollup_private_inputs.js';
35
- import { PublicTubePrivateInputs } from '../rollup/public_tube_private_inputs.js';
36
- import { PublicTubePublicInputs } from '../rollup/public_tube_public_inputs.js';
35
+ import { PublicChonkVerifierPrivateInputs } from '../rollup/public_chonk_verifier_private_inputs.js';
36
+ import { PublicChonkVerifierPublicInputs } from '../rollup/public_chonk_verifier_public_inputs.js';
37
37
  import { PublicTxBaseRollupPrivateInputs } from '../rollup/public_tx_base_rollup_private_inputs.js';
38
38
  import { RootRollupPrivateInputs } from '../rollup/root_rollup_private_inputs.js';
39
39
  import { RootRollupPublicInputs } from '../rollup/root_rollup_public_inputs.js';
@@ -91,7 +91,10 @@ export const ProvingJobInputs = z.discriminatedUnion('type', [
91
91
  AvmProvingRequestSchema,
92
92
  z.object({ type: z.literal(ProvingRequestType.PARITY_BASE), inputs: ParityBasePrivateInputs.schema }),
93
93
  z.object({ type: z.literal(ProvingRequestType.PARITY_ROOT), inputs: ParityRootPrivateInputs.schema }),
94
- z.object({ type: z.literal(ProvingRequestType.PUBLIC_TUBE), inputs: PublicTubePrivateInputs.schema }),
94
+ z.object({
95
+ type: z.literal(ProvingRequestType.PUBLIC_CHONK_VERIFIER),
96
+ inputs: PublicChonkVerifierPrivateInputs.schema,
97
+ }),
95
98
  z.object({
96
99
  type: z.literal(ProvingRequestType.PRIVATE_TX_BASE_ROLLUP),
97
100
  inputs: PrivateTxBaseRollupPrivateInputs.schema,
@@ -142,8 +145,8 @@ export function getProvingJobInputClassFor(type: ProvingRequestType) {
142
145
  switch (type) {
143
146
  case ProvingRequestType.PUBLIC_VM:
144
147
  return AvmCircuitInputs;
145
- case ProvingRequestType.PUBLIC_TUBE:
146
- return PublicTubePrivateInputs;
148
+ case ProvingRequestType.PUBLIC_CHONK_VERIFIER:
149
+ return PublicChonkVerifierPrivateInputs;
147
150
  case ProvingRequestType.PRIVATE_TX_BASE_ROLLUP:
148
151
  return PrivateTxBaseRollupPrivateInputs;
149
152
  case ProvingRequestType.PUBLIC_TX_BASE_ROLLUP:
@@ -187,7 +190,7 @@ export type ProvingJobInputs = z.infer<typeof ProvingJobInputs>;
187
190
 
188
191
  export type ProvingJobInputsMap = {
189
192
  [ProvingRequestType.PUBLIC_VM]: AvmCircuitInputs;
190
- [ProvingRequestType.PUBLIC_TUBE]: PublicTubePrivateInputs;
193
+ [ProvingRequestType.PUBLIC_CHONK_VERIFIER]: PublicChonkVerifierPrivateInputs;
191
194
  [ProvingRequestType.PRIVATE_TX_BASE_ROLLUP]: PrivateTxBaseRollupPrivateInputs;
192
195
  [ProvingRequestType.PUBLIC_TX_BASE_ROLLUP]: PublicTxBaseRollupPrivateInputs;
193
196
  [ProvingRequestType.TX_MERGE_ROLLUP]: TxMergeRollupPrivateInputs;
@@ -212,9 +215,9 @@ export const ProvingJobResult = z.discriminatedUnion('type', [
212
215
  result: schemaForRecursiveProofAndVerificationKey(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED),
213
216
  }),
214
217
  z.object({
215
- type: z.literal(ProvingRequestType.PUBLIC_TUBE),
218
+ type: z.literal(ProvingRequestType.PUBLIC_CHONK_VERIFIER),
216
219
  result: schemaForPublicInputsAndRecursiveProof(
217
- PublicTubePublicInputs.schema,
220
+ PublicChonkVerifierPublicInputs.schema,
218
221
  NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
219
222
  ),
220
223
  }),
@@ -325,8 +328,8 @@ export const ProvingJobResult = z.discriminatedUnion('type', [
325
328
  export type ProvingJobResult = z.infer<typeof ProvingJobResult>;
326
329
  export type ProvingJobResultsMap = {
327
330
  [ProvingRequestType.PUBLIC_VM]: ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
328
- [ProvingRequestType.PUBLIC_TUBE]: PublicInputsAndRecursiveProof<
329
- PublicTubePublicInputs,
331
+ [ProvingRequestType.PUBLIC_CHONK_VERIFIER]: PublicInputsAndRecursiveProof<
332
+ PublicChonkVerifierPublicInputs,
330
333
  typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
331
334
  >;
332
335
  [ProvingRequestType.PRIVATE_TX_BASE_ROLLUP]: PublicInputsAndRecursiveProof<
@@ -26,8 +26,8 @@ import type {
26
26
  CheckpointRootSingleBlockRollupPrivateInputs,
27
27
  } from '../rollup/checkpoint_root_rollup_private_inputs.js';
28
28
  import type { PrivateTxBaseRollupPrivateInputs } from '../rollup/private_tx_base_rollup_private_inputs.js';
29
- import type { PublicTubePrivateInputs } from '../rollup/public_tube_private_inputs.js';
30
- import type { PublicTubePublicInputs } from '../rollup/public_tube_public_inputs.js';
29
+ import type { PublicChonkVerifierPrivateInputs } from '../rollup/public_chonk_verifier_private_inputs.js';
30
+ import type { PublicChonkVerifierPublicInputs } from '../rollup/public_chonk_verifier_public_inputs.js';
31
31
  import type { PublicTxBaseRollupPrivateInputs } from '../rollup/public_tx_base_rollup_private_inputs.js';
32
32
  import type { RootRollupPrivateInputs } from '../rollup/root_rollup_private_inputs.js';
33
33
  import type { RootRollupPublicInputs } from '../rollup/root_rollup_public_inputs.js';
@@ -60,11 +60,13 @@ export interface ServerCircuitProver {
60
60
  epochNumber?: number,
61
61
  ): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>>;
62
62
 
63
- getPublicTubeProof(
64
- inputs: PublicTubePrivateInputs,
63
+ getPublicChonkVerifierProof(
64
+ inputs: PublicChonkVerifierPrivateInputs,
65
65
  signal?: AbortSignal,
66
66
  epochNumber?: number,
67
- ): Promise<PublicInputsAndRecursiveProof<PublicTubePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
67
+ ): Promise<
68
+ PublicInputsAndRecursiveProof<PublicChonkVerifierPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
69
+ >;
68
70
 
69
71
  /**
70
72
  * Creates a proof for the given input.
@@ -7,8 +7,8 @@ import { PrivateKernelCircuitPublicInputs } from './private_kernel_circuit_publi
7
7
  * Data of the previous kernel iteration in the chain of kernels.
8
8
  */
9
9
  export class PrivateKernelData {
10
- // NOTE: as of move to honk and client IVC, previous private kernels no longer come with their proof
11
- // as we do client IVC not recursive verification. We need to ensure the public inputs here is properly constrained, TODO(https://github.com/AztecProtocol/barretenberg/issues/1048)
10
+ // NOTE: as of move to honk and chonk, previous private kernels no longer come with their proof
11
+ // as we do chonk not recursive verification. We need to ensure the public inputs here is properly constrained, TODO(https://github.com/AztecProtocol/barretenberg/issues/1048)
12
12
  constructor(
13
13
  /**
14
14
  * Public inputs of the previous kernel.
@@ -5,7 +5,7 @@ import { serializeWitness } from '@aztec/noir-noirc_abi';
5
5
  import { Encoder } from 'msgpackr';
6
6
  import { z } from 'zod';
7
7
 
8
- import type { ClientIvcProof } from '../proofs/client_ivc_proof.js';
8
+ import type { ChonkProof } from '../proofs/chonk_proof.js';
9
9
  import type { PrivateKernelCircuitPublicInputs } from './private_kernel_circuit_public_inputs.js';
10
10
  import type { PrivateKernelTailCircuitPublicInputs } from './private_kernel_tail_circuit_public_inputs.js';
11
11
 
@@ -45,10 +45,10 @@ export interface PrivateKernelExecutionProofOutput<
45
45
  /** The public inputs used by the proof generation process. */
46
46
  publicInputs: PublicInputsType;
47
47
  /** The private IVC proof optimized for user devices. It will be consumed by an Aztec prover,
48
- * which recursively verifies it through the "private tx base" or the "public tube" circuit.*/
49
- clientIvcProof: ClientIvcProof;
48
+ * which recursively verifies it through the "private tx base" or the "public chonk verifier" circuit.*/
49
+ chonkProof: ChonkProof;
50
50
  /**
51
- * The trace the clientIvcProof corresponds to.
51
+ * The trace the chonkProof corresponds to.
52
52
  * A trace of app circuits interleaved with private kernel circuits.
53
53
  * If simulate is ran with profiling mode, also includes gate counts.
54
54
  */
@@ -184,6 +184,12 @@ export class PrivateKernelTailCircuitPublicInputs {
184
184
  );
185
185
  }
186
186
 
187
+ publicInputs(): PrivateToPublicKernelCircuitPublicInputs | PrivateToRollupKernelCircuitPublicInputs {
188
+ return this.forPublic
189
+ ? this.toPrivateToPublicKernelCircuitPublicInputs()
190
+ : this.toPrivateToRollupKernelCircuitPublicInputs();
191
+ }
192
+
187
193
  numberOfPublicCallRequests() {
188
194
  return (
189
195
  this.numberOfNonRevertiblePublicCallRequests() +
@@ -50,7 +50,7 @@ export async function computeAddress(publicKeys: PublicKeys, partialAddress: Fr)
50
50
  // 2. addressPoint = (preaddress * G) + ivpk_m
51
51
  // 3. address = addressPoint.x
52
52
  const preaddress = await computePreaddress(await publicKeys.hash(), partialAddress);
53
- const address = await new Grumpkin().add(
53
+ const address = await Grumpkin.add(
54
54
  await derivePublicKeyFromSecretKey(new Fq(preaddress.toBigInt())),
55
55
  publicKeys.masterIncomingViewingPublicKey,
56
56
  );
@@ -81,8 +81,7 @@ export async function computeAddressSecret(preaddress: Fr, ivsk: Fq) {
81
81
  }
82
82
 
83
83
  export function derivePublicKeyFromSecretKey(secretKey: Fq) {
84
- const curve = new Grumpkin();
85
- return curve.mul(curve.generator(), secretKey);
84
+ return Grumpkin.mul(Grumpkin.generator, secretKey);
86
85
  }
87
86
 
88
87
  /**
@@ -63,14 +63,13 @@ async function computeSharedTaggingSecret(
63
63
  const knownPreaddress = await computePreaddress(await localAddress.publicKeys.hash(), localAddress.partialAddress);
64
64
  // TODO: #8970 - Computation of address point from x coordinate might fail
65
65
  const externalAddressPoint = await externalAddress.toAddressPoint();
66
- const curve = new Grumpkin();
67
66
  // Given A (local complete address) -> B (external address) and h == preaddress
68
67
  // Compute shared secret as S = (h_A + local_ivsk_A) * Addr_Point_B
69
68
 
70
69
  // Beware! h_a + local_ivsk_a (also known as the address secret) can lead to an address point with a negative
71
70
  // y-coordinate, since there's two possible candidates computeAddressSecret takes care of selecting the one that
72
71
  // leads to a positive y-coordinate, which is the only valid address point
73
- return curve.mul(externalAddressPoint, await computeAddressSecret(knownPreaddress, localIvsk));
72
+ return Grumpkin.mul(externalAddressPoint, await computeAddressSecret(knownPreaddress, localIvsk));
74
73
  }
75
74
 
76
75
  export const DirectionalAppTaggingSecretSchema = z.object({
@@ -16,13 +16,11 @@ import type { PublicKey } from '../keys/public_key.js';
16
16
  * TODO(#12656): This function is kept around because of the utilityGetSharedSecret oracle. Nuke this once returning
17
17
  * the app-siloed secret.
18
18
  */
19
- export async function deriveEcdhSharedSecret(secretKey: GrumpkinScalar, publicKey: PublicKey): Promise<Point> {
19
+ export function deriveEcdhSharedSecret(secretKey: GrumpkinScalar, publicKey: PublicKey): Promise<Point> {
20
20
  if (publicKey.isZero()) {
21
21
  throw new Error(
22
22
  `Attempting to derive a shared secret with a zero public key. You have probably passed a zero public key in your Noir code somewhere thinking that the note won't be broadcast... but it was.`,
23
23
  );
24
24
  }
25
- const curve = new Grumpkin();
26
- const sharedSecret = await curve.mul(publicKey, secretKey);
27
- return sharedSecret;
25
+ return Grumpkin.mul(publicKey, secretKey);
28
26
  }
@@ -28,15 +28,12 @@ export class P2PMessage {
28
28
  */
29
29
  export abstract class Gossipable {
30
30
  private cachedId: Buffer32 | undefined;
31
- /** p2p Topic
32
- *
33
- * - The p2p topic identifier, this determines how the message is handled
34
- */
31
+ /** The p2p topic identifier, this determines how the message is handled */
35
32
  static p2pTopic: TopicType;
36
33
 
37
- /** p2p Message Identifier
38
- *
39
- * - A digest of the message information, this key is used for deduplication
34
+ /**
35
+ * A digest of the message information **used for logging only**.
36
+ * The identifier used for deduplication is `getMsgIdFn` as defined in `encoding.ts` which is a hash over topic and data.
40
37
  */
41
38
  async p2pMessageIdentifier(): Promise<Buffer32> {
42
39
  if (this.cachedId) {
@@ -48,10 +45,6 @@ export abstract class Gossipable {
48
45
 
49
46
  abstract generateP2PMessageIdentifier(): Promise<Buffer32>;
50
47
 
51
- /** To Buffer
52
- *
53
- * - Serialization method
54
- */
55
48
  abstract toBuffer(): Buffer;
56
49
 
57
50
  toMessage(): Buffer {
@@ -60,7 +53,6 @@ export abstract class Gossipable {
60
53
 
61
54
  /**
62
55
  * Get the size of the gossipable object.
63
- *
64
56
  * This is used for metrics recording.
65
57
  */
66
58
  abstract getSize(): number;