@aztec/stdlib 3.0.0-nightly.20250908 → 3.0.0-nightly.20250910
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.
- package/dest/block/proposal/attestations_and_signers.d.ts +48 -0
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -0
- package/dest/block/proposal/attestations_and_signers.js +99 -0
- package/dest/block/proposal/index.d.ts +1 -0
- package/dest/block/proposal/index.d.ts.map +1 -1
- package/dest/block/proposal/index.js +1 -0
- package/dest/interfaces/block-builder.d.ts +5 -6
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +24 -24
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +15 -15
- package/dest/interfaces/server_circuit_prover.d.ts +4 -8
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +3 -0
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.d.ts +1 -1
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +2 -0
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -0
- package/dest/noir/index.d.ts +9 -0
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/p2p/signature_utils.d.ts +2 -1
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +1 -0
- package/dest/proofs/client_ivc_proof.d.ts +5 -8
- package/dest/proofs/client_ivc_proof.d.ts.map +1 -1
- package/dest/proofs/client_ivc_proof.js +27 -20
- package/dest/proofs/index.d.ts +1 -0
- package/dest/proofs/index.d.ts.map +1 -1
- package/dest/proofs/index.js +1 -0
- package/dest/proofs/proof_data.d.ts +20 -0
- package/dest/proofs/proof_data.d.ts.map +1 -0
- package/dest/proofs/proof_data.js +22 -0
- package/dest/proofs/proving_request_type.d.ts +12 -13
- package/dest/proofs/proving_request_type.d.ts.map +1 -1
- package/dest/proofs/proving_request_type.js +12 -12
- package/dest/rollup/index.d.ts +1 -3
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -3
- package/dest/rollup/private_base_rollup_inputs.d.ts +5 -5
- package/dest/rollup/private_base_rollup_inputs.d.ts.map +1 -1
- package/dest/rollup/private_base_rollup_inputs.js +7 -9
- package/dest/rollup/public_base_rollup_inputs.d.ts +5 -5
- package/dest/rollup/public_base_rollup_inputs.d.ts.map +1 -1
- package/dest/rollup/public_base_rollup_inputs.js +7 -9
- package/dest/rollup/public_tube_private_inputs.d.ts +19 -0
- package/dest/rollup/public_tube_private_inputs.d.ts.map +1 -0
- package/dest/rollup/public_tube_private_inputs.js +38 -0
- package/dest/stats/stats.d.ts +1 -1
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +4 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +9 -15
- package/dest/tests/mocks.d.ts +2 -0
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +5 -1
- package/dest/tx/tx.d.ts +0 -2
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +2 -3
- package/package.json +8 -8
- package/src/block/proposal/attestations_and_signers.ts +121 -0
- package/src/block/proposal/index.ts +1 -0
- package/src/interfaces/block-builder.ts +9 -6
- package/src/interfaces/proving-job.ts +19 -14
- package/src/interfaces/server_circuit_prover.ts +13 -13
- package/src/interfaces/validator.ts +7 -0
- package/src/kernel/private_kernel_prover_output.ts +1 -1
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +9 -0
- package/src/noir/index.ts +9 -0
- package/src/p2p/signature_utils.ts +1 -0
- package/src/proofs/client_ivc_proof.ts +26 -20
- package/src/proofs/index.ts +1 -0
- package/src/proofs/proof_data.ts +39 -0
- package/src/proofs/proving_request_type.ts +1 -3
- package/src/rollup/index.ts +1 -3
- package/src/rollup/private_base_rollup_inputs.ts +8 -8
- package/src/rollup/public_base_rollup_inputs.ts +5 -8
- package/src/rollup/public_tube_private_inputs.ts +46 -0
- package/src/stats/stats.ts +2 -2
- package/src/tests/factories.ts +20 -23
- package/src/tests/mocks.ts +13 -1
- package/src/tx/tx.ts +2 -3
- package/dest/rollup/private_tube_data.d.ts +0 -15
- package/dest/rollup/private_tube_data.d.ts.map +0 -1
- package/dest/rollup/private_tube_data.js +0 -25
- package/dest/rollup/public_tube_data.d.ts +0 -15
- package/dest/rollup/public_tube_data.d.ts.map +0 -1
- package/dest/rollup/public_tube_data.js +0 -25
- package/dest/rollup/tube_inputs.d.ts +0 -43
- package/dest/rollup/tube_inputs.d.ts.map +0 -1
- package/dest/rollup/tube_inputs.js +0 -63
- package/src/rollup/private_tube_data.ts +0 -35
- package/src/rollup/public_tube_data.ts +0 -35
- package/src/rollup/tube_inputs.ts +0 -77
|
@@ -3,10 +3,10 @@ import type {
|
|
|
3
3
|
NESTED_RECURSIVE_PROOF_LENGTH,
|
|
4
4
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
5
5
|
RECURSIVE_PROOF_LENGTH,
|
|
6
|
-
TUBE_PROOF_LENGTH,
|
|
7
6
|
} from '@aztec/constants';
|
|
8
7
|
|
|
9
8
|
import type { AvmCircuitInputs } from '../avm/avm.js';
|
|
9
|
+
import type { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
|
|
10
10
|
import type { BaseParityInputs } from '../parity/base_parity_inputs.js';
|
|
11
11
|
import type { ParityPublicInputs } from '../parity/parity_public_inputs.js';
|
|
12
12
|
import type { RootParityInputs } from '../parity/root_parity_inputs.js';
|
|
@@ -15,12 +15,11 @@ import type { BlockMergeRollupInputs } from '../rollup/block_merge_rollup.js';
|
|
|
15
15
|
import type { BlockRootOrBlockMergePublicInputs } from '../rollup/block_root_or_block_merge_public_inputs.js';
|
|
16
16
|
import type { BlockRootRollupInputs, SingleTxBlockRootRollupInputs } from '../rollup/block_root_rollup.js';
|
|
17
17
|
import type { EmptyBlockRootRollupInputs } from '../rollup/empty_block_root_rollup_inputs.js';
|
|
18
|
-
import type { PaddingBlockRootRollupInputs } from '../rollup/index.js';
|
|
18
|
+
import type { PaddingBlockRootRollupInputs, PublicTubePrivateInputs } from '../rollup/index.js';
|
|
19
19
|
import type { MergeRollupInputs } from '../rollup/merge_rollup.js';
|
|
20
20
|
import type { PrivateBaseRollupInputs } from '../rollup/private_base_rollup_inputs.js';
|
|
21
21
|
import type { PublicBaseRollupInputs } from '../rollup/public_base_rollup_inputs.js';
|
|
22
22
|
import type { RootRollupInputs, RootRollupPublicInputs } from '../rollup/root_rollup.js';
|
|
23
|
-
import type { TubeInputs } from '../rollup/tube_inputs.js';
|
|
24
23
|
import type { Tx } from '../tx/tx.js';
|
|
25
24
|
import type { ProofAndVerificationKey, PublicInputsAndRecursiveProof } from './proving-job.js';
|
|
26
25
|
|
|
@@ -48,6 +47,17 @@ export interface ServerCircuitProver {
|
|
|
48
47
|
epochNumber?: number,
|
|
49
48
|
): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>>;
|
|
50
49
|
|
|
50
|
+
getPublicTubeProof(
|
|
51
|
+
inputs: PublicTubePrivateInputs,
|
|
52
|
+
signal?: AbortSignal,
|
|
53
|
+
epochNumber?: number,
|
|
54
|
+
): Promise<
|
|
55
|
+
PublicInputsAndRecursiveProof<
|
|
56
|
+
PrivateToPublicKernelCircuitPublicInputs,
|
|
57
|
+
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
58
|
+
>
|
|
59
|
+
>;
|
|
60
|
+
|
|
51
61
|
/**
|
|
52
62
|
* Creates a proof for the given input.
|
|
53
63
|
* @param input - Input to the circuit.
|
|
@@ -68,16 +78,6 @@ export interface ServerCircuitProver {
|
|
|
68
78
|
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
69
79
|
>;
|
|
70
80
|
|
|
71
|
-
/**
|
|
72
|
-
* Get a recursively verified client IVC proof (making it a compatible honk proof for the rest of the rollup).
|
|
73
|
-
* @param input - Input to the circuit.
|
|
74
|
-
*/
|
|
75
|
-
getTubeProof(
|
|
76
|
-
tubeInput: TubeInputs,
|
|
77
|
-
signal?: AbortSignal,
|
|
78
|
-
epochNumber?: number,
|
|
79
|
-
): Promise<ProofAndVerificationKey<typeof TUBE_PROOF_LENGTH>>;
|
|
80
|
-
|
|
81
81
|
/**
|
|
82
82
|
* Creates a proof for the given input.
|
|
83
83
|
* @param input - Input to the circuit.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SecretValue } from '@aztec/foundation/config';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
3
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
5
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
5
6
|
import type { SequencerConfig, SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
@@ -9,6 +10,8 @@ import type { ProposedBlockHeader, StateReference, Tx } from '@aztec/stdlib/tx';
|
|
|
9
10
|
import type { PeerId } from '@libp2p/interface';
|
|
10
11
|
import { z } from 'zod';
|
|
11
12
|
|
|
13
|
+
import type { CommitteeAttestationsAndSigners } from '../block/index.js';
|
|
14
|
+
|
|
12
15
|
/**
|
|
13
16
|
* Validator client configuration
|
|
14
17
|
*/
|
|
@@ -67,4 +70,8 @@ export interface Validator {
|
|
|
67
70
|
|
|
68
71
|
broadcastBlockProposal(proposal: BlockProposal): Promise<void>;
|
|
69
72
|
collectAttestations(proposal: BlockProposal, required: number, deadline: Date): Promise<BlockAttestation[]>;
|
|
73
|
+
signAttestationsAndSigners(
|
|
74
|
+
attestationsAndSigners: CommitteeAttestationsAndSigners,
|
|
75
|
+
proposer: EthAddress,
|
|
76
|
+
): Promise<Signature>;
|
|
70
77
|
}
|
|
@@ -45,7 +45,7 @@ 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 "tube" circuit.*/
|
|
48
|
+
* which recursively verifies it through the "private tx base" or the "public tube" circuit.*/
|
|
49
49
|
clientIvcProof: ClientIvcProof;
|
|
50
50
|
/**
|
|
51
51
|
* The trace the clientIvcProof corresponds to.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GeneratorIndex, PRIVATE_TO_PUBLIC_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH } from '@aztec/constants';
|
|
2
2
|
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto';
|
|
3
3
|
import type { Fr } from '@aztec/foundation/fields';
|
|
4
|
+
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
4
5
|
import { BufferReader, bigintToUInt64BE, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
|
|
5
6
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
6
7
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
@@ -93,4 +94,12 @@ export class PrivateToPublicKernelCircuitPublicInputs {
|
|
|
93
94
|
hash() {
|
|
94
95
|
return poseidon2HashWithSeparator(this.toFields(), GeneratorIndex.PUBLIC_TX_HASH);
|
|
95
96
|
}
|
|
97
|
+
|
|
98
|
+
toJSON() {
|
|
99
|
+
return this.toBuffer();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static get schema() {
|
|
103
|
+
return bufferSchemaFor(PrivateToPublicKernelCircuitPublicInputs);
|
|
104
|
+
}
|
|
96
105
|
}
|
package/src/noir/index.ts
CHANGED
|
@@ -87,6 +87,15 @@ export interface NoirCompiledCircuit {
|
|
|
87
87
|
abi: NoirFunctionAbi;
|
|
88
88
|
/** The bytecode of the circuit in base64. */
|
|
89
89
|
bytecode: string;
|
|
90
|
+
/** The verification key of the circuit. */
|
|
91
|
+
verificationKey: {
|
|
92
|
+
/** hex-encoded binary */
|
|
93
|
+
bytes: string;
|
|
94
|
+
/** list of hex-encoded fields */
|
|
95
|
+
fields: string[];
|
|
96
|
+
/** The hex-encoded hash. */
|
|
97
|
+
hash: string;
|
|
98
|
+
};
|
|
90
99
|
/** The debug information, compressed and base64 encoded. */
|
|
91
100
|
debug_symbols: string;
|
|
92
101
|
/** The map of file ID to the source code and path of the file. */
|
|
@@ -1,35 +1,33 @@
|
|
|
1
|
+
import { CIVC_PROOF_LENGTH } from '@aztec/constants';
|
|
1
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
2
4
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
3
5
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
6
|
|
|
5
|
-
const CLIENT_IVC_PROOF_LENGTH = 172052;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* TODO(https://github.com/AztecProtocol/aztec-packages/issues/7370) refactor this to
|
|
9
|
-
* eventually we read all these VKs from the data tree instead of passing them
|
|
10
|
-
*/
|
|
11
7
|
export class ClientIvcProof {
|
|
12
8
|
constructor(
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
public clientIvcProofBuffer: Buffer,
|
|
9
|
+
// The proof fields with public inputs.
|
|
10
|
+
// For recursive verification, the public inputs (at the front of the array) must be removed.
|
|
11
|
+
public proof: Fr[],
|
|
17
12
|
) {}
|
|
18
13
|
|
|
19
14
|
public isEmpty() {
|
|
20
|
-
return this.
|
|
15
|
+
return this.proof.length === 0;
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
static empty() {
|
|
24
|
-
return new ClientIvcProof(
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
static fake(fill = Math.floor(Math.random() * 255)) {
|
|
28
|
-
return new ClientIvcProof(Buffer.alloc(1, fill));
|
|
19
|
+
return new ClientIvcProof([]);
|
|
29
20
|
}
|
|
30
21
|
|
|
31
|
-
static random() {
|
|
32
|
-
|
|
22
|
+
static random(proofSize = CIVC_PROOF_LENGTH) {
|
|
23
|
+
// NB: Not using Fr.random here because it slows down some tests that require a large number of txs significantly.
|
|
24
|
+
const reducedFrSize = Fr.SIZE_IN_BYTES - 1;
|
|
25
|
+
const randomFields = randomBytes(proofSize * reducedFrSize);
|
|
26
|
+
const proof = Array.from(
|
|
27
|
+
{ length: proofSize },
|
|
28
|
+
(_, i) => new Fr(randomFields.subarray(i * reducedFrSize, (i + 1) * reducedFrSize)),
|
|
29
|
+
);
|
|
30
|
+
return new ClientIvcProof(proof);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
static get schema() {
|
|
@@ -42,10 +40,18 @@ export class ClientIvcProof {
|
|
|
42
40
|
|
|
43
41
|
static fromBuffer(buffer: Buffer | BufferReader): ClientIvcProof {
|
|
44
42
|
const reader = BufferReader.asReader(buffer);
|
|
45
|
-
|
|
43
|
+
const proofLength = reader.readNumber();
|
|
44
|
+
const proof = reader.readArray(proofLength, Fr);
|
|
45
|
+
return new ClientIvcProof(proof);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
public toBuffer() {
|
|
49
|
-
return serializeToBuffer(this.
|
|
49
|
+
return serializeToBuffer(this.proof.length, this.proof);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Called when constructing a ClientIvcProof from proving results.
|
|
53
|
+
static fromBufferArray(fields: Uint8Array[]): ClientIvcProof {
|
|
54
|
+
const proof = fields.map(field => Fr.fromBuffer(Buffer.from(field)));
|
|
55
|
+
return new ClientIvcProof(proof);
|
|
50
56
|
}
|
|
51
57
|
}
|
package/src/proofs/index.ts
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { CIVC_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
+
import { BufferReader, type Bufferable, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
+
|
|
4
|
+
import { RecursiveProof } from '../proofs/recursive_proof.js';
|
|
5
|
+
import { VkData } from '../vks/index.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Represents the data of a recursive proof.
|
|
9
|
+
*/
|
|
10
|
+
export class ProofData<T extends Bufferable, PROOF_LENGTH extends number> {
|
|
11
|
+
constructor(
|
|
12
|
+
public publicInputs: T,
|
|
13
|
+
public proof: RecursiveProof<PROOF_LENGTH>,
|
|
14
|
+
public vkData: VkData,
|
|
15
|
+
) {}
|
|
16
|
+
|
|
17
|
+
public toBuffer(): Buffer {
|
|
18
|
+
return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public static fromBuffer<T extends Bufferable, PROOF_LENGTH extends number>(
|
|
22
|
+
buffer: Buffer | BufferReader,
|
|
23
|
+
publicInputs: {
|
|
24
|
+
fromBuffer: (reader: BufferReader) => T;
|
|
25
|
+
},
|
|
26
|
+
proofLength?: PROOF_LENGTH,
|
|
27
|
+
): ProofData<T, PROOF_LENGTH> {
|
|
28
|
+
const reader = BufferReader.asReader(buffer);
|
|
29
|
+
return new ProofData(
|
|
30
|
+
reader.readObject(publicInputs),
|
|
31
|
+
RecursiveProof.fromBuffer(reader, proofLength),
|
|
32
|
+
reader.readObject(VkData),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type CivcProofData<T extends Bufferable> = ProofData<T, typeof CIVC_PROOF_LENGTH>;
|
|
38
|
+
|
|
39
|
+
export type RollupHonkProofData<T extends Bufferable> = ProofData<T, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export enum ProvingRequestType {
|
|
2
2
|
PUBLIC_VM,
|
|
3
|
-
|
|
3
|
+
PUBLIC_TUBE,
|
|
4
4
|
PRIVATE_BASE_ROLLUP,
|
|
5
5
|
PUBLIC_BASE_ROLLUP,
|
|
6
6
|
MERGE_ROLLUP,
|
|
@@ -13,6 +13,4 @@ export enum ProvingRequestType {
|
|
|
13
13
|
|
|
14
14
|
BASE_PARITY,
|
|
15
15
|
ROOT_PARITY,
|
|
16
|
-
/** Recursive Client IVC verification to connect private to public or rollup */
|
|
17
|
-
TUBE_PROOF,
|
|
18
16
|
}
|
package/src/rollup/index.ts
CHANGED
|
@@ -12,9 +12,7 @@ export * from './padding_block_root_rollup_inputs.js';
|
|
|
12
12
|
export * from './previous_rollup_block_data.js';
|
|
13
13
|
export * from './previous_rollup_data.js';
|
|
14
14
|
export * from './private_base_rollup_inputs.js';
|
|
15
|
-
export * from './private_tube_data.js';
|
|
16
15
|
export * from './public_base_rollup_inputs.js';
|
|
17
|
-
export * from './
|
|
16
|
+
export * from './public_tube_private_inputs.js';
|
|
18
17
|
export * from './root_rollup.js';
|
|
19
18
|
export * from './state_diff_hints.js';
|
|
20
|
-
export * from './tube_inputs.js';
|
|
@@ -3,12 +3,13 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
|
3
3
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
4
4
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
5
5
|
|
|
6
|
+
import { PrivateToRollupKernelCircuitPublicInputs } from '../kernel/private_to_rollup_kernel_circuit_public_inputs.js';
|
|
7
|
+
import { type CivcProofData, ProofData } from '../proofs/proof_data.js';
|
|
6
8
|
import { PrivateBaseRollupHints } from './base_rollup_hints.js';
|
|
7
|
-
import { PrivateTubeData } from './private_tube_data.js';
|
|
8
9
|
|
|
9
10
|
export class PrivateBaseRollupInputs {
|
|
10
11
|
constructor(
|
|
11
|
-
public
|
|
12
|
+
public hidingKernelProofData: CivcProofData<PrivateToRollupKernelCircuitPublicInputs>,
|
|
12
13
|
public hints: PrivateBaseRollupHints,
|
|
13
14
|
) {}
|
|
14
15
|
|
|
@@ -17,12 +18,15 @@ export class PrivateBaseRollupInputs {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
static getFields(fields: FieldsOf<PrivateBaseRollupInputs>) {
|
|
20
|
-
return [fields.
|
|
21
|
+
return [fields.hidingKernelProofData, fields.hints] as const;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
static fromBuffer(buffer: Buffer | BufferReader): PrivateBaseRollupInputs {
|
|
24
25
|
const reader = BufferReader.asReader(buffer);
|
|
25
|
-
return new PrivateBaseRollupInputs(
|
|
26
|
+
return new PrivateBaseRollupInputs(
|
|
27
|
+
ProofData.fromBuffer(reader, PrivateToRollupKernelCircuitPublicInputs),
|
|
28
|
+
reader.readObject(PrivateBaseRollupHints),
|
|
29
|
+
);
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
toBuffer() {
|
|
@@ -37,10 +41,6 @@ export class PrivateBaseRollupInputs {
|
|
|
37
41
|
return bufferToHex(this.toBuffer());
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
static empty() {
|
|
41
|
-
return new PrivateBaseRollupInputs(PrivateTubeData.empty(), PrivateBaseRollupHints.empty());
|
|
42
|
-
}
|
|
43
|
-
|
|
44
44
|
/** Returns a buffer representation for JSON serialization. */
|
|
45
45
|
toJSON() {
|
|
46
46
|
return this.toBuffer();
|
|
@@ -3,13 +3,14 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
|
3
3
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
4
4
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
5
5
|
|
|
6
|
+
import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
|
|
7
|
+
import { ProofData, type RollupHonkProofData } from '../proofs/proof_data.js';
|
|
6
8
|
import { AvmProofData } from './avm_proof_data.js';
|
|
7
9
|
import { PublicBaseRollupHints } from './base_rollup_hints.js';
|
|
8
|
-
import { PublicTubeData } from './public_tube_data.js';
|
|
9
10
|
|
|
10
11
|
export class PublicBaseRollupInputs {
|
|
11
12
|
constructor(
|
|
12
|
-
public
|
|
13
|
+
public publicTubeProofData: RollupHonkProofData<PrivateToPublicKernelCircuitPublicInputs>,
|
|
13
14
|
public avmProofData: AvmProofData,
|
|
14
15
|
public hints: PublicBaseRollupHints,
|
|
15
16
|
) {}
|
|
@@ -19,13 +20,13 @@ export class PublicBaseRollupInputs {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
static getFields(fields: FieldsOf<PublicBaseRollupInputs>) {
|
|
22
|
-
return [fields.
|
|
23
|
+
return [fields.publicTubeProofData, fields.avmProofData, fields.hints] as const;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
static fromBuffer(buffer: Buffer | BufferReader): PublicBaseRollupInputs {
|
|
26
27
|
const reader = BufferReader.asReader(buffer);
|
|
27
28
|
return new PublicBaseRollupInputs(
|
|
28
|
-
|
|
29
|
+
ProofData.fromBuffer(reader, PrivateToPublicKernelCircuitPublicInputs),
|
|
29
30
|
reader.readObject(AvmProofData),
|
|
30
31
|
reader.readObject(PublicBaseRollupHints),
|
|
31
32
|
);
|
|
@@ -43,10 +44,6 @@ export class PublicBaseRollupInputs {
|
|
|
43
44
|
return bufferToHex(this.toBuffer());
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
static empty() {
|
|
47
|
-
return new PublicBaseRollupInputs(PublicTubeData.empty(), AvmProofData.empty(), PublicBaseRollupHints.empty());
|
|
48
|
-
}
|
|
49
|
-
|
|
50
47
|
/** Returns a representation for JSON serialization. */
|
|
51
48
|
toJSON() {
|
|
52
49
|
return this.toBuffer();
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
|
|
7
|
+
import { type CivcProofData, ProofData } from '../proofs/proof_data.js';
|
|
8
|
+
|
|
9
|
+
export class PublicTubePrivateInputs {
|
|
10
|
+
constructor(public hidingKernelProofData: CivcProofData<PrivateToPublicKernelCircuitPublicInputs>) {}
|
|
11
|
+
|
|
12
|
+
static from(fields: FieldsOf<PublicTubePrivateInputs>) {
|
|
13
|
+
return new PublicTubePrivateInputs(...PublicTubePrivateInputs.getFields(fields));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static getFields(fields: FieldsOf<PublicTubePrivateInputs>) {
|
|
17
|
+
return [fields.hidingKernelProofData] as const;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
21
|
+
const reader = BufferReader.asReader(buffer);
|
|
22
|
+
return new PublicTubePrivateInputs(ProofData.fromBuffer(reader, PrivateToPublicKernelCircuitPublicInputs));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
toBuffer() {
|
|
26
|
+
return serializeToBuffer(...PublicTubePrivateInputs.getFields(this));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static fromString(str: string) {
|
|
30
|
+
return PublicTubePrivateInputs.fromBuffer(hexToBuffer(str));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
toString() {
|
|
34
|
+
return bufferToHex(this.toBuffer());
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Returns a representation for JSON serialization. */
|
|
38
|
+
toJSON() {
|
|
39
|
+
return this.toBuffer();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Creates an instance from a string. */
|
|
43
|
+
static get schema() {
|
|
44
|
+
return bufferSchemaFor(PublicTubePrivateInputs);
|
|
45
|
+
}
|
|
46
|
+
}
|
package/src/stats/stats.ts
CHANGED
|
@@ -88,6 +88,7 @@ export type ClientCircuitName =
|
|
|
88
88
|
export type ServerCircuitName =
|
|
89
89
|
| 'base-parity'
|
|
90
90
|
| 'root-parity'
|
|
91
|
+
| 'public-tube'
|
|
91
92
|
| 'private-base-rollup'
|
|
92
93
|
| 'public-base-rollup'
|
|
93
94
|
| 'merge-rollup'
|
|
@@ -97,8 +98,7 @@ export type ServerCircuitName =
|
|
|
97
98
|
| 'padding-block-root-rollup'
|
|
98
99
|
| 'block-merge-rollup'
|
|
99
100
|
| 'root-rollup'
|
|
100
|
-
| 'avm-circuit'
|
|
101
|
-
| 'tube-circuit';
|
|
101
|
+
| 'avm-circuit';
|
|
102
102
|
|
|
103
103
|
export type CircuitName = ClientCircuitName | ServerCircuitName;
|
|
104
104
|
|
package/src/tests/factories.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
|
|
6
6
|
AZTEC_MAX_EPOCH_DURATION,
|
|
7
7
|
BLOBS_PER_BLOCK,
|
|
8
|
+
CIVC_PROOF_LENGTH,
|
|
8
9
|
CONTRACT_CLASS_LOG_SIZE_IN_FIELDS,
|
|
9
10
|
FIELDS_PER_BLOB,
|
|
10
11
|
FIXED_DA_GAS,
|
|
@@ -41,7 +42,7 @@ import {
|
|
|
41
42
|
PUBLIC_DATA_TREE_HEIGHT,
|
|
42
43
|
PUBLIC_LOG_SIZE_IN_FIELDS,
|
|
43
44
|
RECURSIVE_PROOF_LENGTH,
|
|
44
|
-
|
|
45
|
+
RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
45
46
|
VK_TREE_HEIGHT,
|
|
46
47
|
} from '@aztec/constants';
|
|
47
48
|
import { type FieldsOf, makeHalfFullTuple, makeTuple } from '@aztec/foundation/array';
|
|
@@ -131,6 +132,7 @@ import { ParityPublicInputs } from '../parity/parity_public_inputs.js';
|
|
|
131
132
|
import { RootParityInput } from '../parity/root_parity_input.js';
|
|
132
133
|
import { RootParityInputs } from '../parity/root_parity_inputs.js';
|
|
133
134
|
import { Proof } from '../proofs/proof.js';
|
|
135
|
+
import { ProofData } from '../proofs/proof_data.js';
|
|
134
136
|
import { ProvingRequestType } from '../proofs/proving_request_type.js';
|
|
135
137
|
import { makeRecursiveProof } from '../proofs/recursive_proof.js';
|
|
136
138
|
import { AvmProofData } from '../rollup/avm_proof_data.js';
|
|
@@ -151,9 +153,7 @@ import { MergeRollupInputs } from '../rollup/merge_rollup.js';
|
|
|
151
153
|
import { PreviousRollupBlockData } from '../rollup/previous_rollup_block_data.js';
|
|
152
154
|
import { PreviousRollupData } from '../rollup/previous_rollup_data.js';
|
|
153
155
|
import { PrivateBaseRollupInputs } from '../rollup/private_base_rollup_inputs.js';
|
|
154
|
-
import { PrivateTubeData } from '../rollup/private_tube_data.js';
|
|
155
156
|
import { PublicBaseRollupInputs } from '../rollup/public_base_rollup_inputs.js';
|
|
156
|
-
import { PublicTubeData } from '../rollup/public_tube_data.js';
|
|
157
157
|
import { RootRollupInputs, RootRollupPublicInputs } from '../rollup/root_rollup.js';
|
|
158
158
|
import { PrivateBaseStateDiffHints } from '../rollup/state_diff_hints.js';
|
|
159
159
|
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
@@ -412,7 +412,7 @@ export function makePrivateKernelTailCircuitPublicInputs(
|
|
|
412
412
|
);
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
function makePrivateToPublicKernelCircuitPublicInputs(seed = 1) {
|
|
415
|
+
export function makePrivateToPublicKernelCircuitPublicInputs(seed = 1) {
|
|
416
416
|
return new PrivateToPublicKernelCircuitPublicInputs(
|
|
417
417
|
makeTxConstantData(seed),
|
|
418
418
|
makePrivateToPublicAccumulatedData(seed + 0x200),
|
|
@@ -1083,10 +1083,14 @@ function makeVkData(seed = 1) {
|
|
|
1083
1083
|
return new VkData(VerificationKeyData.makeFakeHonk(), seed, makeTuple(VK_TREE_HEIGHT, fr, seed + 0x100));
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
|
-
function
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1086
|
+
export function makeProofData<T extends Bufferable, PROOF_LENGTH extends number>(
|
|
1087
|
+
seed = 0,
|
|
1088
|
+
makePublicInputs: (seed: number) => T,
|
|
1089
|
+
proofSize: PROOF_LENGTH = NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH as PROOF_LENGTH,
|
|
1090
|
+
) {
|
|
1091
|
+
return new ProofData(
|
|
1092
|
+
makePublicInputs(seed),
|
|
1093
|
+
makeRecursiveProof<PROOF_LENGTH>(proofSize, seed + 0x100),
|
|
1090
1094
|
makeVkData(seed + 0x200),
|
|
1091
1095
|
);
|
|
1092
1096
|
}
|
|
@@ -1131,23 +1135,12 @@ function makePublicBaseRollupHints(seed = 1) {
|
|
|
1131
1135
|
}
|
|
1132
1136
|
|
|
1133
1137
|
export function makePrivateBaseRollupInputs(seed = 0) {
|
|
1134
|
-
const tubeData = makePrivateTubeData(seed);
|
|
1135
|
-
const hints = makePrivateBaseRollupHints(seed + 0x100);
|
|
1136
|
-
|
|
1137
1138
|
return PrivateBaseRollupInputs.from({
|
|
1138
|
-
|
|
1139
|
-
hints,
|
|
1139
|
+
hidingKernelProofData: makeProofData(seed, makePrivateToRollupKernelCircuitPublicInputs, CIVC_PROOF_LENGTH),
|
|
1140
|
+
hints: makePrivateBaseRollupHints(seed + 0x100),
|
|
1140
1141
|
});
|
|
1141
1142
|
}
|
|
1142
1143
|
|
|
1143
|
-
function makePublicTubeData(seed = 1) {
|
|
1144
|
-
return new PublicTubeData(
|
|
1145
|
-
makePrivateToPublicKernelCircuitPublicInputs(seed),
|
|
1146
|
-
makeRecursiveProof<typeof TUBE_PROOF_LENGTH>(TUBE_PROOF_LENGTH, seed + 0x100),
|
|
1147
|
-
makeVkData(seed + 0x200),
|
|
1148
|
-
);
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
1144
|
function makeAvmProofData(seed = 1) {
|
|
1152
1145
|
return new AvmProofData(
|
|
1153
1146
|
makeAvmCircuitPublicInputs(seed),
|
|
@@ -1157,12 +1150,16 @@ function makeAvmProofData(seed = 1) {
|
|
|
1157
1150
|
}
|
|
1158
1151
|
|
|
1159
1152
|
export function makePublicBaseRollupInputs(seed = 0) {
|
|
1160
|
-
const
|
|
1153
|
+
const publicTubeProofData = makeProofData(
|
|
1154
|
+
seed,
|
|
1155
|
+
makePrivateToPublicKernelCircuitPublicInputs,
|
|
1156
|
+
RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
1157
|
+
);
|
|
1161
1158
|
const avmProofData = makeAvmProofData(seed + 0x100);
|
|
1162
1159
|
const hints = makePublicBaseRollupHints(seed + 0x200);
|
|
1163
1160
|
|
|
1164
1161
|
return PublicBaseRollupInputs.from({
|
|
1165
|
-
|
|
1162
|
+
publicTubeProofData,
|
|
1166
1163
|
avmProofData,
|
|
1167
1164
|
hints,
|
|
1168
1165
|
});
|
package/src/tests/mocks.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { ContractArtifact } from '../abi/abi.js';
|
|
|
8
8
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
9
9
|
import { CommitteeAttestation } from '../block/index.js';
|
|
10
10
|
import { L2Block } from '../block/l2_block.js';
|
|
11
|
+
import type { CommitteeAttestationsAndSigners } from '../block/proposal/attestations_and_signers.js';
|
|
11
12
|
import type { PublishedL2Block } from '../block/published_l2_block.js';
|
|
12
13
|
import { computeContractAddressFromInstance } from '../contract/contract_address.js';
|
|
13
14
|
import { getContractClassFromArtifact } from '../contract/contract_class.js';
|
|
@@ -88,7 +89,7 @@ export const mockTx = async (
|
|
|
88
89
|
hasPublicTeardownCallRequest = false,
|
|
89
90
|
publicCalldataSize = 2,
|
|
90
91
|
feePayer,
|
|
91
|
-
clientIvcProof = ClientIvcProof.
|
|
92
|
+
clientIvcProof = ClientIvcProof.random(),
|
|
92
93
|
maxPriorityFeesPerGas,
|
|
93
94
|
chainId = Fr.ZERO,
|
|
94
95
|
version = Fr.ZERO,
|
|
@@ -273,6 +274,17 @@ const makeAndSignConsensusPayload = (
|
|
|
273
274
|
return { blockNumber: header.globalVariables.blockNumber, payload, signature };
|
|
274
275
|
};
|
|
275
276
|
|
|
277
|
+
export const makeAndSignCommitteeAttestationsAndSigners = (
|
|
278
|
+
attestationsAndSigners: CommitteeAttestationsAndSigners,
|
|
279
|
+
signer: Secp256k1Signer = Secp256k1Signer.random(),
|
|
280
|
+
) => {
|
|
281
|
+
const hash = getHashedSignaturePayloadEthSignedMessage(
|
|
282
|
+
attestationsAndSigners,
|
|
283
|
+
SignatureDomainSeparator.attestationsAndSigners,
|
|
284
|
+
);
|
|
285
|
+
return signer.sign(hash);
|
|
286
|
+
};
|
|
287
|
+
|
|
276
288
|
export const makeBlockProposal = (options?: MakeConsensusPayloadOptions): BlockProposal => {
|
|
277
289
|
const { blockNumber, payload, signature } = makeAndSignConsensusPayload(
|
|
278
290
|
SignatureDomainSeparator.blockProposal,
|
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.
|
|
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.
|
|
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
|
);
|
|
@@ -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
|
-
}
|