@aztec/stdlib 0.81.0 → 0.82.0

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 (117) hide show
  1. package/dest/abi/abi.d.ts +5 -1
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +2 -1
  4. package/dest/auth_witness/auth_witness.d.ts +21 -0
  5. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  6. package/dest/auth_witness/auth_witness.js +29 -0
  7. package/dest/block/index.d.ts +0 -1
  8. package/dest/block/index.d.ts.map +1 -1
  9. package/dest/block/index.js +0 -1
  10. package/dest/block/l2_block_downloader/l2_block_stream.d.ts.map +1 -1
  11. package/dest/block/l2_block_downloader/l2_block_stream.js +0 -2
  12. package/dest/block/l2_block_source.d.ts +6 -0
  13. package/dest/block/l2_block_source.d.ts.map +1 -1
  14. package/dest/contract/interfaces/contract_data_source.d.ts +0 -5
  15. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  16. package/dest/database-version/version_manager.d.ts +5 -0
  17. package/dest/database-version/version_manager.d.ts.map +1 -1
  18. package/dest/database-version/version_manager.js +7 -0
  19. package/dest/interfaces/archiver.d.ts +1 -2
  20. package/dest/interfaces/archiver.d.ts.map +1 -1
  21. package/dest/interfaces/archiver.js +1 -3
  22. package/dest/interfaces/aztec-node-admin.d.ts +20 -0
  23. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -0
  24. package/dest/interfaces/aztec-node-admin.js +16 -0
  25. package/dest/interfaces/aztec-node.d.ts +8 -38
  26. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  27. package/dest/interfaces/aztec-node.js +4 -12
  28. package/dest/interfaces/client.d.ts +1 -0
  29. package/dest/interfaces/client.d.ts.map +1 -1
  30. package/dest/interfaces/client.js +1 -0
  31. package/dest/interfaces/private_kernel_prover.d.ts +2 -3
  32. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  33. package/dest/interfaces/prover-node.d.ts +1 -2
  34. package/dest/interfaces/prover-node.d.ts.map +1 -1
  35. package/dest/interfaces/prover-node.js +5 -4
  36. package/dest/interfaces/pxe.d.ts +21 -39
  37. package/dest/interfaces/pxe.d.ts.map +1 -1
  38. package/dest/interfaces/pxe.js +10 -9
  39. package/dest/kernel/index.d.ts +1 -1
  40. package/dest/kernel/index.d.ts.map +1 -1
  41. package/dest/kernel/index.js +1 -1
  42. package/dest/kernel/private_kernel_prover_output.d.ts +49 -0
  43. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -0
  44. package/dest/kernel/private_kernel_prover_output.js +8 -0
  45. package/dest/kernel/private_kernel_simulated_output.d.ts +3 -7
  46. package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
  47. package/dest/logs/log_with_tx_data.js +2 -2
  48. package/dest/noir/index.d.ts +5 -1
  49. package/dest/noir/index.d.ts.map +1 -1
  50. package/dest/proofs/client_ivc_proof.d.ts +1 -2
  51. package/dest/proofs/client_ivc_proof.d.ts.map +1 -1
  52. package/dest/proofs/client_ivc_proof.js +6 -9
  53. package/dest/rollup/tube_inputs.d.ts +7 -2
  54. package/dest/rollup/tube_inputs.d.ts.map +1 -1
  55. package/dest/rollup/tube_inputs.js +10 -4
  56. package/dest/trees/nullifier_membership_witness.d.ts +4 -0
  57. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  58. package/dest/trees/nullifier_membership_witness.js +10 -0
  59. package/dest/trees/public_data_witness.d.ts +5 -5
  60. package/dest/trees/public_data_witness.d.ts.map +1 -1
  61. package/dest/trees/public_data_witness.js +13 -0
  62. package/dest/tx/index.d.ts +2 -0
  63. package/dest/tx/index.d.ts.map +1 -1
  64. package/dest/tx/index.js +2 -0
  65. package/dest/tx/private_execution_result.d.ts +4 -0
  66. package/dest/tx/private_execution_result.d.ts.map +1 -1
  67. package/dest/tx/private_execution_result.js +5 -0
  68. package/dest/tx/profiled_tx.d.ts +9 -0
  69. package/dest/tx/profiled_tx.d.ts.map +1 -0
  70. package/dest/tx/profiled_tx.js +27 -0
  71. package/dest/tx/proven_tx.d.ts +33 -0
  72. package/dest/tx/proven_tx.d.ts.map +1 -0
  73. package/dest/tx/proven_tx.js +35 -0
  74. package/dest/tx/simulated_tx.d.ts +8 -44
  75. package/dest/tx/simulated_tx.d.ts.map +1 -1
  76. package/dest/tx/simulated_tx.js +17 -40
  77. package/dest/tx/tx_receipt.d.ts +1 -30
  78. package/dest/tx/tx_receipt.d.ts.map +1 -1
  79. package/dest/tx/tx_receipt.js +3 -13
  80. package/package.json +6 -7
  81. package/src/abi/abi.ts +7 -2
  82. package/src/auth_witness/auth_witness.ts +29 -0
  83. package/src/block/index.ts +0 -1
  84. package/src/block/l2_block_downloader/l2_block_stream.ts +0 -2
  85. package/src/block/l2_block_source.ts +7 -0
  86. package/src/contract/interfaces/contract_data_source.ts +0 -6
  87. package/src/database-version/version_manager.ts +10 -0
  88. package/src/interfaces/archiver.ts +2 -8
  89. package/src/interfaces/aztec-node-admin.ts +39 -0
  90. package/src/interfaces/aztec-node.ts +9 -71
  91. package/src/interfaces/client.ts +1 -0
  92. package/src/interfaces/private_kernel_prover.ts +2 -3
  93. package/src/interfaces/prover-node.ts +2 -4
  94. package/src/interfaces/pxe.ts +34 -56
  95. package/src/kernel/index.ts +1 -1
  96. package/src/kernel/private_kernel_prover_output.ts +44 -0
  97. package/src/kernel/private_kernel_simulated_output.ts +4 -13
  98. package/src/logs/log_with_tx_data.ts +2 -2
  99. package/src/noir/index.ts +6 -1
  100. package/src/proofs/client_ivc_proof.ts +5 -15
  101. package/src/rollup/tube_inputs.ts +8 -4
  102. package/src/trees/nullifier_membership_witness.ts +12 -0
  103. package/src/trees/public_data_witness.ts +15 -0
  104. package/src/tx/index.ts +2 -0
  105. package/src/tx/private_execution_result.ts +7 -0
  106. package/src/tx/profiled_tx.ts +27 -0
  107. package/src/tx/proven_tx.ts +58 -0
  108. package/src/tx/simulated_tx.ts +11 -63
  109. package/src/tx/tx_receipt.ts +0 -36
  110. package/dest/block/nullifier_with_block_source.d.ts +0 -6
  111. package/dest/block/nullifier_with_block_source.d.ts.map +0 -1
  112. package/dest/block/nullifier_with_block_source.js +0 -1
  113. package/dest/kernel/private_kernel_prover_profile_result.d.ts +0 -25
  114. package/dest/kernel/private_kernel_prover_profile_result.d.ts.map +0 -1
  115. package/dest/kernel/private_kernel_prover_profile_result.js +0 -7
  116. package/src/block/nullifier_with_block_source.ts +0 -7
  117. package/src/kernel/private_kernel_prover_profile_result.ts +0 -7
@@ -3,7 +3,6 @@ import { bufferSchemaFor } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
 
5
5
  const CLIENT_IVC_PROOF_LENGTH = 172052;
6
- const CLIENT_IVC_VK_LENGTH = 2730;
7
6
 
8
7
  /**
9
8
  * TODO(https://github.com/AztecProtocol/aztec-packages/issues/7370) refactor this to
@@ -15,7 +14,6 @@ export class ClientIvcProof {
15
14
  // TODO(https://github.com/AztecProtocol/aztec-packages/issues/7370): Need to precompute private kernel tail VK so we can verify this immediately in the tx pool
16
15
  // which parts of these are needed to quickly verify that we have a correct IVC proof
17
16
  public clientIvcProofBuffer: Buffer,
18
- public clientIvcVkBuffer: Buffer,
19
17
  ) {}
20
18
 
21
19
  public isEmpty() {
@@ -23,18 +21,15 @@ export class ClientIvcProof {
23
21
  }
24
22
 
25
23
  static empty() {
26
- return new ClientIvcProof(Buffer.from(''), Buffer.from(''));
24
+ return new ClientIvcProof(Buffer.from(''));
27
25
  }
28
26
 
29
27
  static fake(fill = Math.floor(Math.random() * 255)) {
30
- return new ClientIvcProof(Buffer.alloc(1, fill), Buffer.alloc(1, fill));
28
+ return new ClientIvcProof(Buffer.alloc(1, fill));
31
29
  }
32
30
 
33
31
  static random() {
34
- return new ClientIvcProof(
35
- Buffer.from(randomBytes(CLIENT_IVC_PROOF_LENGTH)),
36
- Buffer.from(randomBytes(CLIENT_IVC_VK_LENGTH)),
37
- );
32
+ return new ClientIvcProof(Buffer.from(randomBytes(CLIENT_IVC_PROOF_LENGTH)));
38
33
  }
39
34
 
40
35
  static get schema() {
@@ -47,15 +42,10 @@ export class ClientIvcProof {
47
42
 
48
43
  static fromBuffer(buffer: Buffer | BufferReader): ClientIvcProof {
49
44
  const reader = BufferReader.asReader(buffer);
50
- return new ClientIvcProof(reader.readBuffer(), reader.readBuffer());
45
+ return new ClientIvcProof(reader.readBuffer());
51
46
  }
52
47
 
53
48
  public toBuffer() {
54
- return serializeToBuffer(
55
- this.clientIvcProofBuffer.length,
56
- this.clientIvcProofBuffer,
57
- this.clientIvcVkBuffer.length,
58
- this.clientIvcVkBuffer,
59
- );
49
+ return serializeToBuffer(this.clientIvcProofBuffer.length, this.clientIvcProofBuffer);
60
50
  }
61
51
  }
@@ -5,15 +5,19 @@ import type { FieldsOf } from '@aztec/foundation/types';
5
5
 
6
6
  import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
7
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
+ */
8
12
  export class TubeInputs {
9
- constructor(public clientIVCData: ClientIvcProof) {}
13
+ constructor(public usePublicTailVk: boolean, public clientIVCData: ClientIvcProof) {}
10
14
 
11
15
  static from(fields: FieldsOf<TubeInputs>): TubeInputs {
12
16
  return new TubeInputs(...TubeInputs.getFields(fields));
13
17
  }
14
18
 
15
19
  static getFields(fields: FieldsOf<TubeInputs>) {
16
- return [fields.clientIVCData] as const;
20
+ return [fields.usePublicTailVk, fields.clientIVCData] as const;
17
21
  }
18
22
 
19
23
  /**
@@ -39,7 +43,7 @@ export class TubeInputs {
39
43
  */
40
44
  static fromBuffer(buffer: Buffer | BufferReader): TubeInputs {
41
45
  const reader = BufferReader.asReader(buffer);
42
- return new TubeInputs(reader.readObject(ClientIvcProof));
46
+ return new TubeInputs(reader.readBoolean(), reader.readObject(ClientIvcProof));
43
47
  }
44
48
 
45
49
  isEmpty(): boolean {
@@ -55,7 +59,7 @@ export class TubeInputs {
55
59
  }
56
60
 
57
61
  static empty() {
58
- return new TubeInputs(ClientIvcProof.empty());
62
+ return new TubeInputs(false, ClientIvcProof.empty());
59
63
  }
60
64
 
61
65
  /** Returns a hex representation for JSON serialization. */
@@ -56,4 +56,16 @@ export class NullifierMembershipWitness {
56
56
  public toFields(): Fr[] {
57
57
  return [new Fr(this.index), ...this.leafPreimage.toFields(), ...this.siblingPath.toFields()];
58
58
  }
59
+
60
+ /**
61
+ * Returns a representation of the nullifier membership witness as expected by intrinsic Noir deserialization.
62
+ */
63
+ public toNoirRepresentation(): (string | string[])[] {
64
+ // TODO(#12874): remove the stupid as string conversion by modifying ForeignCallOutput type in acvm.js
65
+ return [
66
+ new Fr(this.index).toString() as string,
67
+ ...(this.leafPreimage.toFields().map(fr => fr.toString()) as string[]),
68
+ this.siblingPath.toFields().map(fr => fr.toString()) as string[],
69
+ ];
70
+ }
59
71
  }
@@ -58,6 +58,21 @@ export class PublicDataWitness {
58
58
  ];
59
59
  }
60
60
 
61
+ /**
62
+ * Returns a representation of the public data witness as expected by intrinsic Noir deserialization.
63
+ */
64
+ public toNoirRepresentation(): (string | string[])[] {
65
+ // TODO(#12874): remove the stupid as string conversion by modifying ForeignCallOutput type in acvm.js
66
+ return [
67
+ new Fr(this.index).toString() as string,
68
+ new Fr(this.leafPreimage.slot).toString() as string,
69
+ new Fr(this.leafPreimage.value).toString() as string,
70
+ new Fr(this.leafPreimage.nextSlot).toString() as string,
71
+ new Fr(this.leafPreimage.nextIndex).toString() as string,
72
+ this.siblingPath.toFields().map(fr => fr.toString()) as string[],
73
+ ];
74
+ }
75
+
61
76
  toBuffer(): Buffer {
62
77
  return serializeToBuffer([this.index, this.leafPreimage, this.siblingPath]);
63
78
  }
package/src/tx/index.ts CHANGED
@@ -16,6 +16,8 @@ export * from './tx_hash.js';
16
16
  export * from './tx_receipt.js';
17
17
  export * from './tx.js';
18
18
  export * from './processed_tx.js';
19
+ export * from './proven_tx.js';
20
+ export * from './profiled_tx.js';
19
21
  export * from './simulated_tx.js';
20
22
  export * from './tx_effect.js';
21
23
  export * from './public_simulation_output.js';
@@ -115,6 +115,13 @@ export class PrivateExecutionResult {
115
115
  static async random(nested = 1): Promise<PrivateExecutionResult> {
116
116
  return new PrivateExecutionResult(await PrivateCallExecutionResult.random(nested), Fr.random());
117
117
  }
118
+
119
+ /**
120
+ * The block number that this execution was simulated with.
121
+ */
122
+ getSimulationBlockNumber(): number {
123
+ return this.entrypoint.publicInputs.historicalHeader.globalVariables.blockNumber.toNumber();
124
+ }
118
125
  }
119
126
 
120
127
  /**
@@ -0,0 +1,27 @@
1
+ import type { ZodFor } from '@aztec/foundation/schemas';
2
+
3
+ import { z } from 'zod';
4
+
5
+ import { type PrivateExecutionStep, PrivateExecutionStepSchema } from '../kernel/private_kernel_prover_output.js';
6
+
7
+ export class TxProfileResult {
8
+ constructor(public executionSteps: PrivateExecutionStep[]) {}
9
+
10
+ static get schema(): ZodFor<TxProfileResult> {
11
+ return z
12
+ .object({
13
+ executionSteps: z.array(PrivateExecutionStepSchema),
14
+ })
15
+ .transform(({ executionSteps }) => new TxProfileResult(executionSteps));
16
+ }
17
+
18
+ static random(): TxProfileResult {
19
+ return new TxProfileResult([
20
+ {
21
+ functionName: 'random',
22
+ bytecode: Buffer.from('random'),
23
+ witness: new Map([[1, 'random']]),
24
+ },
25
+ ]);
26
+ }
27
+ }
@@ -0,0 +1,58 @@
1
+ import type { FieldsOf } from '@aztec/foundation/types';
2
+
3
+ import { z } from 'zod';
4
+
5
+ import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
6
+ import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
7
+ import {
8
+ PrivateExecutionResult,
9
+ collectEnqueuedPublicFunctionCalls,
10
+ collectPublicTeardownFunctionCall,
11
+ collectSortedContractClassLogs,
12
+ } from './private_execution_result.js';
13
+ import { Tx } from './tx.js';
14
+
15
+ export class TxProvingResult {
16
+ constructor(
17
+ public privateExecutionResult: PrivateExecutionResult,
18
+ public publicInputs: PrivateKernelTailCircuitPublicInputs,
19
+ public clientIvcProof: ClientIvcProof,
20
+ ) {}
21
+
22
+ toTx(): Tx {
23
+ const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
24
+ const enqueuedPublicFunctions = collectEnqueuedPublicFunctionCalls(this.privateExecutionResult);
25
+ const teardownPublicFunction = collectPublicTeardownFunctionCall(this.privateExecutionResult);
26
+
27
+ const tx = new Tx(
28
+ this.publicInputs,
29
+ this.clientIvcProof,
30
+ contractClassLogs,
31
+ enqueuedPublicFunctions,
32
+ teardownPublicFunction,
33
+ );
34
+ return tx;
35
+ }
36
+
37
+ static get schema() {
38
+ return z
39
+ .object({
40
+ privateExecutionResult: PrivateExecutionResult.schema,
41
+ publicInputs: PrivateKernelTailCircuitPublicInputs.schema,
42
+ clientIvcProof: ClientIvcProof.schema,
43
+ })
44
+ .transform(TxProvingResult.from);
45
+ }
46
+
47
+ static from(fields: FieldsOf<TxProvingResult>) {
48
+ return new TxProvingResult(fields.privateExecutionResult, fields.publicInputs, fields.clientIvcProof);
49
+ }
50
+
51
+ static async random() {
52
+ return new TxProvingResult(
53
+ await PrivateExecutionResult.random(),
54
+ PrivateKernelTailCircuitPublicInputs.empty(),
55
+ ClientIvcProof.empty(),
56
+ );
57
+ }
58
+ }
@@ -5,10 +5,6 @@ import { z } from 'zod';
5
5
 
6
6
  import { Gas } from '../gas/gas.js';
7
7
  import type { GasUsed } from '../gas/gas_used.js';
8
- import {
9
- type PrivateKernelProverProfileResult,
10
- PrivateKernelProverProfileResultSchema,
11
- } from '../kernel/private_kernel_prover_profile_result.js';
12
8
  import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
13
9
  import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
14
10
  import {
@@ -47,15 +43,12 @@ export class PrivateSimulationResult {
47
43
  }
48
44
  }
49
45
 
50
- export class TxSimulationResult extends PrivateSimulationResult {
46
+ export class TxSimulationResult {
51
47
  constructor(
52
- privateExecutionResult: PrivateExecutionResult,
53
- publicInputs: PrivateKernelTailCircuitPublicInputs,
48
+ public privateExecutionResult: PrivateExecutionResult,
49
+ public publicInputs: PrivateKernelTailCircuitPublicInputs,
54
50
  public publicOutput?: PublicSimulationOutput,
55
- public profileResult?: PrivateKernelProverProfileResult,
56
- ) {
57
- super(privateExecutionResult, publicInputs);
58
- }
51
+ ) {}
59
52
 
60
53
  get gasUsed(): GasUsed {
61
54
  return (
@@ -74,34 +67,22 @@ export class TxSimulationResult extends PrivateSimulationResult {
74
67
  privateExecutionResult: PrivateExecutionResult.schema,
75
68
  publicInputs: PrivateKernelTailCircuitPublicInputs.schema,
76
69
  publicOutput: PublicSimulationOutput.schema.optional(),
77
- profileResult: PrivateKernelProverProfileResultSchema.optional(),
78
70
  })
79
71
  .transform(TxSimulationResult.from);
80
72
  }
81
73
 
82
74
  static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed'>) {
83
- return new TxSimulationResult(
84
- fields.privateExecutionResult,
85
- fields.publicInputs,
86
- fields.publicOutput,
87
- fields.profileResult,
88
- );
89
- }
90
-
91
- getPublicReturnValues() {
92
- return this.publicOutput ? this.publicOutput.publicReturnValues : [];
75
+ return new TxSimulationResult(fields.privateExecutionResult, fields.publicInputs, fields.publicOutput);
93
76
  }
94
77
 
95
78
  static fromPrivateSimulationResultAndPublicOutput(
96
79
  privateSimulationResult: PrivateSimulationResult,
97
80
  publicOutput?: PublicSimulationOutput,
98
- profileResult?: PrivateKernelProverProfileResult,
99
81
  ) {
100
82
  return new TxSimulationResult(
101
83
  privateSimulationResult.privateExecutionResult,
102
84
  privateSimulationResult.publicInputs,
103
85
  publicOutput,
104
- profileResult,
105
86
  );
106
87
  }
107
88
 
@@ -112,50 +93,17 @@ export class TxSimulationResult extends PrivateSimulationResult {
112
93
  await PublicSimulationOutput.random(),
113
94
  );
114
95
  }
115
- }
116
-
117
- export class TxProvingResult {
118
- constructor(
119
- public privateExecutionResult: PrivateExecutionResult,
120
- public publicInputs: PrivateKernelTailCircuitPublicInputs,
121
- public clientIvcProof: ClientIvcProof,
122
- ) {}
123
96
 
124
- toTx(): Tx {
125
- const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
126
- const enqueuedPublicFunctions = collectEnqueuedPublicFunctionCalls(this.privateExecutionResult);
127
- const teardownPublicFunction = collectPublicTeardownFunctionCall(this.privateExecutionResult);
128
-
129
- const tx = new Tx(
130
- this.publicInputs,
131
- this.clientIvcProof,
132
- contractClassLogs,
133
- enqueuedPublicFunctions,
134
- teardownPublicFunction,
135
- );
136
- return tx;
137
- }
138
-
139
- static get schema() {
140
- return z
141
- .object({
142
- privateExecutionResult: PrivateExecutionResult.schema,
143
- publicInputs: PrivateKernelTailCircuitPublicInputs.schema,
144
- clientIvcProof: ClientIvcProof.schema,
145
- })
146
- .transform(TxProvingResult.from);
97
+ getPrivateReturnValues() {
98
+ return new PrivateSimulationResult(this.privateExecutionResult, this.publicInputs).getPrivateReturnValues();
147
99
  }
148
100
 
149
- static from(fields: FieldsOf<TxProvingResult>) {
150
- return new TxProvingResult(fields.privateExecutionResult, fields.publicInputs, fields.clientIvcProof);
101
+ toSimulatedTx(): Tx {
102
+ return new PrivateSimulationResult(this.privateExecutionResult, this.publicInputs).toSimulatedTx();
151
103
  }
152
104
 
153
- static async random() {
154
- return new TxProvingResult(
155
- await PrivateExecutionResult.random(),
156
- PrivateKernelTailCircuitPublicInputs.empty(),
157
- ClientIvcProof.empty(),
158
- );
105
+ getPublicReturnValues() {
106
+ return this.publicOutput ? this.publicOutput.publicReturnValues : [];
159
107
  }
160
108
  }
161
109
 
@@ -1,9 +1,7 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
1
  import type { FieldsOf } from '@aztec/foundation/types';
3
2
 
4
3
  import { z } from 'zod';
5
4
 
6
- import { PublicDataWrite } from '../avm/public_data_write.js';
7
5
  import { RevertCode } from '../avm/revert_code.js';
8
6
  import { L2BlockHash } from '../block/block_hash.js';
9
7
  import { type ZodFor, schemas } from '../schemas/schemas.js';
@@ -41,8 +39,6 @@ export class TxReceipt {
41
39
  public blockHash?: L2BlockHash,
42
40
  /** The block number in which the transaction was included. */
43
41
  public blockNumber?: number,
44
- /** Information useful for testing/debugging, set when test flag is set to true in `waitOpts`. */
45
- public debugInfo?: DebugInfo,
46
42
  ) {}
47
43
 
48
44
  static empty() {
@@ -58,7 +54,6 @@ export class TxReceipt {
58
54
  blockHash: L2BlockHash.schema.optional(),
59
55
  blockNumber: z.number().int().nonnegative().optional(),
60
56
  transactionFee: schemas.BigInt.optional(),
61
- debugInfo: DebugInfoSchema.optional(),
62
57
  })
63
58
  .transform(TxReceipt.from);
64
59
  }
@@ -71,7 +66,6 @@ export class TxReceipt {
71
66
  fields.transactionFee,
72
67
  fields.blockHash,
73
68
  fields.blockNumber,
74
- fields.debugInfo,
75
69
  );
76
70
  }
77
71
 
@@ -89,33 +83,3 @@ export class TxReceipt {
89
83
  }
90
84
  }
91
85
  }
92
-
93
- /**
94
- * Information useful for debugging/testing purposes included in the receipt when the debug flag is set to true
95
- * in `WaitOpts`.
96
- */
97
- interface DebugInfo {
98
- /**
99
- * New note hashes created by the transaction.
100
- */
101
- noteHashes: Fr[];
102
- /**
103
- * New nullifiers created by the transaction.
104
- */
105
- nullifiers: Fr[];
106
- /**
107
- * New public data writes created by the transaction.
108
- */
109
- publicDataWrites: PublicDataWrite[];
110
- /**
111
- * New L2 to L1 messages created by the transaction.
112
- */
113
- l2ToL1Msgs: Fr[];
114
- }
115
-
116
- const DebugInfoSchema = z.object({
117
- noteHashes: z.array(schemas.Fr),
118
- nullifiers: z.array(schemas.Fr),
119
- publicDataWrites: z.array(PublicDataWrite.schema),
120
- l2ToL1Msgs: z.array(schemas.Fr),
121
- });
@@ -1,6 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import type { InBlock } from './in_block.js';
3
- export interface NullifierWithBlockSource {
4
- findNullifiersIndexesWithBlock(blockNumber: number, nullifiers: Fr[]): Promise<(InBlock<bigint> | undefined)[]>;
5
- }
6
- //# sourceMappingURL=nullifier_with_block_source.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nullifier_with_block_source.d.ts","sourceRoot":"","sources":["../../src/block/nullifier_with_block_source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,wBAAwB;IACvC,8BAA8B,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;CACjH"}
@@ -1 +0,0 @@
1
- export { };
@@ -1,25 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const PrivateKernelProverProfileResultSchema: z.ZodObject<{
3
- gateCounts: z.ZodArray<z.ZodObject<{
4
- circuitName: z.ZodString;
5
- gateCount: z.ZodNumber;
6
- }, "strip", z.ZodTypeAny, {
7
- circuitName: string;
8
- gateCount: number;
9
- }, {
10
- circuitName: string;
11
- gateCount: number;
12
- }>, "many">;
13
- }, "strip", z.ZodTypeAny, {
14
- gateCounts: {
15
- circuitName: string;
16
- gateCount: number;
17
- }[];
18
- }, {
19
- gateCounts: {
20
- circuitName: string;
21
- gateCount: number;
22
- }[];
23
- }>;
24
- export type PrivateKernelProverProfileResult = z.infer<typeof PrivateKernelProverProfileResultSchema>;
25
- //# sourceMappingURL=private_kernel_prover_profile_result.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"private_kernel_prover_profile_result.d.ts","sourceRoot":"","sources":["../../src/kernel/private_kernel_prover_profile_result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;EAEjD,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { z } from 'zod';
2
- export const PrivateKernelProverProfileResultSchema = z.object({
3
- gateCounts: z.array(z.object({
4
- circuitName: z.string(),
5
- gateCount: z.number()
6
- }))
7
- });
@@ -1,7 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
-
3
- import type { InBlock } from './in_block.js';
4
-
5
- export interface NullifierWithBlockSource {
6
- findNullifiersIndexesWithBlock(blockNumber: number, nullifiers: Fr[]): Promise<(InBlock<bigint> | undefined)[]>;
7
- }
@@ -1,7 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- export const PrivateKernelProverProfileResultSchema = z.object({
4
- gateCounts: z.array(z.object({ circuitName: z.string(), gateCount: z.number() })),
5
- });
6
-
7
- export type PrivateKernelProverProfileResult = z.infer<typeof PrivateKernelProverProfileResultSchema>;