@aztec/stdlib 3.0.0-nightly.20250917 → 3.0.0-nightly.20250918
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/avm/avm.d.ts +6 -0
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts +6 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +11 -6
- package/dest/avm/avm_proving_request.d.ts +7 -0
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/block/body.d.ts +4 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +16 -5
- package/dest/block/index.d.ts +1 -0
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -0
- package/dest/block/l2_block.d.ts +8 -5
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +14 -7
- package/dest/block/l2_block_code_to_purge.d.ts +3 -14
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.js +23 -13
- package/dest/block/l2_block_header.d.ts +100 -0
- package/dest/block/l2_block_header.d.ts.map +1 -0
- package/dest/block/l2_block_header.js +146 -0
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +1 -1
- package/dest/block/published_l2_block.d.ts +2 -2
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +1 -3
- package/dest/interfaces/block-builder.d.ts +1 -2
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/epoch-prover.d.ts +25 -8
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +170 -61
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +101 -39
- package/dest/interfaces/server_circuit_prover.d.ts +19 -16
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +3 -2
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +4 -4
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_context_inputs.d.ts +2 -2
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_context_inputs.js +4 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +1 -1
- package/dest/p2p/consensus_payload.d.ts +7 -6
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +7 -6
- package/dest/parity/root_parity_input.d.ts +1 -1
- package/dest/proofs/proof_data.d.ts +1 -1
- package/dest/proofs/proof_data.d.ts.map +1 -1
- package/dest/proofs/proof_data.js +2 -2
- package/dest/proofs/proving_request_type.d.ts +13 -8
- package/dest/proofs/proving_request_type.d.ts.map +1 -1
- package/dest/proofs/proving_request_type.js +13 -8
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts +1 -1
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/base_or_merge_rollup_public_inputs.js +1 -1
- package/dest/rollup/base_rollup_hints.d.ts +12 -3
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +11 -5
- package/dest/rollup/block_constant_data.d.ts +20 -6
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.js +15 -7
- package/dest/rollup/block_merge_rollup.d.ts +10 -9
- package/dest/rollup/block_merge_rollup.d.ts.map +1 -1
- package/dest/rollup/block_merge_rollup.js +14 -13
- package/dest/rollup/block_rollup_public_inputs.d.ts +124 -0
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -0
- package/dest/rollup/block_rollup_public_inputs.js +85 -0
- package/dest/rollup/block_root_rollup.d.ts +148 -184
- package/dest/rollup/block_root_rollup.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup.js +211 -260
- package/dest/rollup/checkpoint_constant_data.d.ts +54 -0
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -0
- package/dest/rollup/checkpoint_constant_data.js +55 -0
- package/dest/{tx/proposed_block_header.d.ts → rollup/checkpoint_header.d.ts} +11 -12
- package/dest/rollup/checkpoint_header.d.ts.map +1 -0
- package/dest/{tx/proposed_block_header.js → rollup/checkpoint_header.js} +9 -9
- package/dest/rollup/checkpoint_merge_rollup.d.ts +30 -0
- package/dest/rollup/checkpoint_merge_rollup.d.ts.map +1 -0
- package/dest/rollup/checkpoint_merge_rollup.js +37 -0
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +105 -0
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -0
- package/dest/rollup/checkpoint_rollup_public_inputs.js +105 -0
- package/dest/rollup/checkpoint_root_rollup.d.ts +117 -0
- package/dest/rollup/checkpoint_root_rollup.d.ts.map +1 -0
- package/dest/rollup/checkpoint_root_rollup.js +178 -0
- package/dest/rollup/epoch_constant_data.d.ts +19 -2
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/epoch_constant_data.js +20 -7
- package/dest/rollup/index.d.ts +8 -5
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +8 -5
- package/dest/rollup/rollup_proof_data.d.ts +10 -0
- package/dest/rollup/rollup_proof_data.d.ts.map +1 -0
- package/dest/rollup/rollup_proof_data.js +1 -0
- package/dest/rollup/root_rollup.d.ts +26 -23
- package/dest/rollup/root_rollup.d.ts.map +1 -1
- package/dest/rollup/root_rollup.js +28 -39
- package/dest/stats/stats.d.ts +1 -1
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +15 -40
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +70 -78
- package/dest/tests/mocks.d.ts +3 -2
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +3 -3
- package/dest/tx/block_header.d.ts +12 -13
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +16 -21
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +0 -1
- package/dest/tx/index.d.ts +0 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +0 -1
- package/dest/tx/private_execution_result.d.ts +2 -2
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +3 -3
- package/dest/tx/tx_constant_data.d.ts +4 -4
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_constant_data.js +6 -6
- package/dest/tx/tx_effect.d.ts +0 -3
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +2 -7
- package/package.json +8 -8
- package/src/avm/avm_circuit_public_inputs.ts +10 -0
- package/src/block/body.ts +23 -6
- package/src/block/index.ts +1 -0
- package/src/block/l2_block.ts +18 -8
- package/src/block/l2_block_code_to_purge.ts +30 -31
- package/src/block/l2_block_header.ts +232 -0
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +1 -1
- package/src/block/test/l2_tips_store_test_suite.ts +1 -2
- package/src/interfaces/block-builder.ts +1 -6
- package/src/interfaces/epoch-prover.ts +34 -10
- package/src/interfaces/proving-job.ts +166 -51
- package/src/interfaces/server_circuit_prover.ts +65 -29
- package/src/interfaces/validator.ts +3 -2
- package/src/kernel/private_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_context_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +1 -1
- package/src/p2p/consensus_payload.ts +8 -7
- package/src/proofs/proof_data.ts +1 -6
- package/src/proofs/proving_request_type.ts +8 -3
- package/src/rollup/base_or_merge_rollup_public_inputs.ts +1 -1
- package/src/rollup/base_rollup_hints.ts +9 -1
- package/src/rollup/block_constant_data.ts +13 -3
- package/src/rollup/block_merge_rollup.ts +13 -11
- package/src/rollup/block_rollup_public_inputs.ts +123 -0
- package/src/rollup/block_root_rollup.ts +209 -264
- package/src/rollup/checkpoint_constant_data.ts +84 -0
- package/src/{tx/proposed_block_header.ts → rollup/checkpoint_header.ts} +16 -17
- package/src/rollup/checkpoint_merge_rollup.ts +50 -0
- package/src/rollup/{block_root_or_block_merge_public_inputs.ts → checkpoint_rollup_public_inputs.ts} +26 -52
- package/src/rollup/checkpoint_root_rollup.ts +216 -0
- package/src/rollup/epoch_constant_data.ts +32 -8
- package/src/rollup/index.ts +8 -5
- package/src/rollup/rollup_proof_data.ts +12 -0
- package/src/rollup/root_rollup.ts +30 -41
- package/src/stats/stats.ts +8 -3
- package/src/tests/factories.ts +124 -135
- package/src/tests/mocks.ts +6 -13
- package/src/tx/block_header.ts +17 -32
- package/src/tx/global_variables.ts +0 -1
- package/src/tx/index.ts +0 -1
- package/src/tx/private_execution_result.ts +3 -3
- package/src/tx/tx_constant_data.ts +4 -4
- package/src/tx/tx_effect.ts +2 -7
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +0 -134
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +0 -1
- package/dest/rollup/block_root_or_block_merge_public_inputs.js +0 -125
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts +0 -51
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +0 -1
- package/dest/rollup/empty_block_root_rollup_inputs.js +0 -65
- package/dest/rollup/padding_block_root_rollup_inputs.d.ts +0 -20
- package/dest/rollup/padding_block_root_rollup_inputs.d.ts.map +0 -1
- package/dest/rollup/padding_block_root_rollup_inputs.js +0 -39
- package/dest/rollup/previous_rollup_block_data.d.ts +0 -47
- package/dest/rollup/previous_rollup_block_data.d.ts.map +0 -1
- package/dest/rollup/previous_rollup_block_data.js +0 -37
- package/dest/tx/proposed_block_header.d.ts.map +0 -1
- package/src/rollup/empty_block_root_rollup_inputs.ts +0 -80
- package/src/rollup/padding_block_root_rollup_inputs.ts +0 -47
- package/src/rollup/previous_rollup_block_data.ts +0 -48
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
4
|
-
import { EpochConstantData } from './epoch_constant_data.js';
|
|
5
|
-
/**
|
|
6
|
-
* Inputs of the padding block root rollup circuit.
|
|
7
|
-
*/ export class PaddingBlockRootRollupInputs {
|
|
8
|
-
constants;
|
|
9
|
-
constructor(constants){
|
|
10
|
-
this.constants = constants;
|
|
11
|
-
}
|
|
12
|
-
static from(fields) {
|
|
13
|
-
return new PaddingBlockRootRollupInputs(...PaddingBlockRootRollupInputs.getFields(fields));
|
|
14
|
-
}
|
|
15
|
-
static getFields(fields) {
|
|
16
|
-
return [
|
|
17
|
-
fields.constants
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
static fromBuffer(buffer) {
|
|
21
|
-
const reader = BufferReader.asReader(buffer);
|
|
22
|
-
return new PaddingBlockRootRollupInputs(reader.readObject(EpochConstantData));
|
|
23
|
-
}
|
|
24
|
-
toBuffer() {
|
|
25
|
-
return serializeToBuffer(...PaddingBlockRootRollupInputs.getFields(this));
|
|
26
|
-
}
|
|
27
|
-
static fromString(str) {
|
|
28
|
-
return PaddingBlockRootRollupInputs.fromBuffer(hexToBuffer(str));
|
|
29
|
-
}
|
|
30
|
-
toString() {
|
|
31
|
-
return bufferToHex(this.toBuffer());
|
|
32
|
-
}
|
|
33
|
-
/** Returns a buffer representation for JSON serialization. */ toJSON() {
|
|
34
|
-
return this.toBuffer();
|
|
35
|
-
}
|
|
36
|
-
static get schema() {
|
|
37
|
-
return bufferSchemaFor(PaddingBlockRootRollupInputs);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
-
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
|
-
import { RecursiveProof } from '../proofs/recursive_proof.js';
|
|
4
|
-
import { VkData } from '../vks/index.js';
|
|
5
|
-
import { BlockRootOrBlockMergePublicInputs } from './block_root_or_block_merge_public_inputs.js';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the data of a previous block merge or block root rollup circuit.
|
|
8
|
-
*/
|
|
9
|
-
export declare class PreviousRollupBlockData {
|
|
10
|
-
/**
|
|
11
|
-
* Public inputs to the block merge or block root rollup circuit.
|
|
12
|
-
*/
|
|
13
|
-
blockRootOrBlockMergePublicInputs: BlockRootOrBlockMergePublicInputs;
|
|
14
|
-
/**
|
|
15
|
-
* The proof of the block merge or block root rollup circuit.
|
|
16
|
-
*/
|
|
17
|
-
proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>;
|
|
18
|
-
/**
|
|
19
|
-
* The verification key and the witness of the vk in the vk tree.
|
|
20
|
-
*/
|
|
21
|
-
vkData: VkData;
|
|
22
|
-
constructor(
|
|
23
|
-
/**
|
|
24
|
-
* Public inputs to the block merge or block root rollup circuit.
|
|
25
|
-
*/
|
|
26
|
-
blockRootOrBlockMergePublicInputs: BlockRootOrBlockMergePublicInputs,
|
|
27
|
-
/**
|
|
28
|
-
* The proof of the block merge or block root rollup circuit.
|
|
29
|
-
*/
|
|
30
|
-
proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
31
|
-
/**
|
|
32
|
-
* The verification key and the witness of the vk in the vk tree.
|
|
33
|
-
*/
|
|
34
|
-
vkData: VkData);
|
|
35
|
-
/**
|
|
36
|
-
* Serializes previous rollup data to a buffer.
|
|
37
|
-
* @returns The buffer of the serialized previous rollup data.
|
|
38
|
-
*/
|
|
39
|
-
toBuffer(): Buffer;
|
|
40
|
-
/**
|
|
41
|
-
* Deserializes previous rollup data from a buffer.
|
|
42
|
-
* @param buffer - A buffer to deserialize from.
|
|
43
|
-
* @returns A new PreviousRollupData instance.
|
|
44
|
-
*/
|
|
45
|
-
static fromBuffer(buffer: Buffer | BufferReader): PreviousRollupBlockData;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=previous_rollup_block_data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"previous_rollup_block_data.d.ts","sourceRoot":"","sources":["../../src/rollup/previous_rollup_block_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yCAAyC,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC;AAEjG;;GAEG;AACH,qBAAa,uBAAuB;IAEhC;;OAEG;IACI,iCAAiC,EAAE,iCAAiC;IAC3E;;OAEG;IACI,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC;IAC9E;;OAEG;IACI,MAAM,EAAE,MAAM;;IAXrB;;OAEG;IACI,iCAAiC,EAAE,iCAAiC;IAC3E;;OAEG;IACI,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC;IAC9E;;OAEG;IACI,MAAM,EAAE,MAAM;IAGvB;;;OAGG;IACI,QAAQ,IAAI,MAAM;IAIzB;;;;OAIG;WACW,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,uBAAuB;CAQjF"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
import { RecursiveProof } from '../proofs/recursive_proof.js';
|
|
4
|
-
import { VkData } from '../vks/index.js';
|
|
5
|
-
import { BlockRootOrBlockMergePublicInputs } from './block_root_or_block_merge_public_inputs.js';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the data of a previous block merge or block root rollup circuit.
|
|
8
|
-
*/ export class PreviousRollupBlockData {
|
|
9
|
-
blockRootOrBlockMergePublicInputs;
|
|
10
|
-
proof;
|
|
11
|
-
vkData;
|
|
12
|
-
constructor(/**
|
|
13
|
-
* Public inputs to the block merge or block root rollup circuit.
|
|
14
|
-
*/ blockRootOrBlockMergePublicInputs, /**
|
|
15
|
-
* The proof of the block merge or block root rollup circuit.
|
|
16
|
-
*/ proof, /**
|
|
17
|
-
* The verification key and the witness of the vk in the vk tree.
|
|
18
|
-
*/ vkData){
|
|
19
|
-
this.blockRootOrBlockMergePublicInputs = blockRootOrBlockMergePublicInputs;
|
|
20
|
-
this.proof = proof;
|
|
21
|
-
this.vkData = vkData;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Serializes previous rollup data to a buffer.
|
|
25
|
-
* @returns The buffer of the serialized previous rollup data.
|
|
26
|
-
*/ toBuffer() {
|
|
27
|
-
return serializeToBuffer(this.blockRootOrBlockMergePublicInputs, this.proof, this.vkData);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Deserializes previous rollup data from a buffer.
|
|
31
|
-
* @param buffer - A buffer to deserialize from.
|
|
32
|
-
* @returns A new PreviousRollupData instance.
|
|
33
|
-
*/ static fromBuffer(buffer) {
|
|
34
|
-
const reader = BufferReader.asReader(buffer);
|
|
35
|
-
return new PreviousRollupBlockData(reader.readObject(BlockRootOrBlockMergePublicInputs), RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), reader.readObject(VkData));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proposed_block_header.d.ts","sourceRoot":"","sources":["../../src/tx/proposed_block_header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAuC,MAAM,6BAA6B,CAAC;AAEhG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,0CAA0C;AAC1C,qBAAa,mBAAmB;IAE5B,2DAA2D;IACpD,eAAe,EAAE,EAAE;IAC1B,0CAA0C;IACnC,iBAAiB,EAAE,iBAAiB;IAC3C,kCAAkC;IAC3B,UAAU,EAAE,EAAE;IACrB,iCAAiC;IAC1B,SAAS,EAAE,MAAM;IACxB,iCAAiC;IAC1B,QAAQ,EAAE,UAAU;IAC3B,+BAA+B;IACxB,YAAY,EAAE,YAAY;IACjC,wCAAwC;IACjC,OAAO,EAAE,OAAO;IACvB,wEAAwE;IACjE,aAAa,EAAE,EAAE;;IAfxB,2DAA2D;IACpD,eAAe,EAAE,EAAE;IAC1B,0CAA0C;IACnC,iBAAiB,EAAE,iBAAiB;IAC3C,kCAAkC;IAC3B,UAAU,EAAE,EAAE;IACrB,iCAAiC;IAC1B,SAAS,EAAE,MAAM;IACxB,iCAAiC;IAC1B,QAAQ,EAAE,UAAU;IAC3B,+BAA+B;IACxB,YAAY,EAAE,YAAY;IACjC,wCAAwC;IACjC,OAAO,EAAE,OAAO;IACvB,wEAAwE;IACjE,aAAa,EAAE,EAAE;IAG1B,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAa/C;IAED,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IAatD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IAIjD,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,mBAAmB;IAerE,QAAQ;IAcR,IAAI,IAAI,EAAE;IAIV,MAAM,CAAC,KAAK,CAAC,MAAM,GAAE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAM,GAAG,mBAAmB;IActF,MAAM,CAAC,MAAM,IAAI,mBAAmB;IAapC,OAAO,IAAI,OAAO;IAalB;;;OAGG;IACI,QAAQ;IAIf,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB;IAInD,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU;IAalC,MAAM,IAAI,UAAU;IAgBpB,SAAS;;;;;;;;;;;;;;;;;IAaT,CAAC,OAAO,CAAC,MAAM,CAAC;CAajB"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
4
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
5
|
-
|
|
6
|
-
import { BlockConstantData } from './block_constant_data.js';
|
|
7
|
-
import { BlockRootRollupData } from './block_root_rollup.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Represents inputs of the empty block root rollup circuit.
|
|
11
|
-
*/
|
|
12
|
-
export class EmptyBlockRootRollupInputs {
|
|
13
|
-
constructor(
|
|
14
|
-
public readonly data: BlockRootRollupData,
|
|
15
|
-
public readonly constants: BlockConstantData,
|
|
16
|
-
) {}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Serializes the inputs to a buffer.
|
|
20
|
-
* @returns - The inputs serialized to a buffer.
|
|
21
|
-
*/
|
|
22
|
-
toBuffer() {
|
|
23
|
-
return serializeToBuffer(...EmptyBlockRootRollupInputs.getFields(this));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Serializes the inputs to a hex string.
|
|
28
|
-
* @returns The instance serialized to a hex string.
|
|
29
|
-
*/
|
|
30
|
-
toString() {
|
|
31
|
-
return bufferToHex(this.toBuffer());
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Creates a new instance from fields.
|
|
36
|
-
* @param fields - Fields to create the instance from.
|
|
37
|
-
* @returns A new instance.
|
|
38
|
-
*/
|
|
39
|
-
static from(fields: FieldsOf<EmptyBlockRootRollupInputs>): EmptyBlockRootRollupInputs {
|
|
40
|
-
return new EmptyBlockRootRollupInputs(...EmptyBlockRootRollupInputs.getFields(fields));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Extracts fields from an instance.
|
|
45
|
-
* @param fields - Fields to create the instance from.
|
|
46
|
-
* @returns An array of fields.
|
|
47
|
-
*/
|
|
48
|
-
static getFields(fields: FieldsOf<EmptyBlockRootRollupInputs>) {
|
|
49
|
-
return [fields.data, fields.constants] as const;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Deserializes the inputs from a buffer.
|
|
54
|
-
* @param buffer - A buffer to deserialize from.
|
|
55
|
-
* @returns A new RootRollupInputs instance.
|
|
56
|
-
*/
|
|
57
|
-
static fromBuffer(buffer: Buffer | BufferReader): EmptyBlockRootRollupInputs {
|
|
58
|
-
const reader = BufferReader.asReader(buffer);
|
|
59
|
-
return new EmptyBlockRootRollupInputs(reader.readObject(BlockRootRollupData), reader.readObject(BlockConstantData));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Deserializes the inputs from a hex string.
|
|
64
|
-
* @param str - A hex string to deserialize from.
|
|
65
|
-
* @returns A new RootRollupInputs instance.
|
|
66
|
-
*/
|
|
67
|
-
static fromString(str: string) {
|
|
68
|
-
return EmptyBlockRootRollupInputs.fromBuffer(hexToBuffer(str));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** Returns a buffer representation for JSON serialization. */
|
|
72
|
-
toJSON() {
|
|
73
|
-
return this.toBuffer();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** Creates an instance from a buffer string. */
|
|
77
|
-
static get schema() {
|
|
78
|
-
return bufferSchemaFor(EmptyBlockRootRollupInputs);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
4
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
5
|
-
|
|
6
|
-
import { EpochConstantData } from './epoch_constant_data.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Inputs of the padding block root rollup circuit.
|
|
10
|
-
*/
|
|
11
|
-
export class PaddingBlockRootRollupInputs {
|
|
12
|
-
constructor(public readonly constants: EpochConstantData) {}
|
|
13
|
-
|
|
14
|
-
static from(fields: FieldsOf<PaddingBlockRootRollupInputs>): PaddingBlockRootRollupInputs {
|
|
15
|
-
return new PaddingBlockRootRollupInputs(...PaddingBlockRootRollupInputs.getFields(fields));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static getFields(fields: FieldsOf<PaddingBlockRootRollupInputs>) {
|
|
19
|
-
return [fields.constants] as const;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static fromBuffer(buffer: Buffer | BufferReader): PaddingBlockRootRollupInputs {
|
|
23
|
-
const reader = BufferReader.asReader(buffer);
|
|
24
|
-
return new PaddingBlockRootRollupInputs(reader.readObject(EpochConstantData));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
toBuffer() {
|
|
28
|
-
return serializeToBuffer(...PaddingBlockRootRollupInputs.getFields(this));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
static fromString(str: string) {
|
|
32
|
-
return PaddingBlockRootRollupInputs.fromBuffer(hexToBuffer(str));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
toString() {
|
|
36
|
-
return bufferToHex(this.toBuffer());
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** Returns a buffer representation for JSON serialization. */
|
|
40
|
-
toJSON() {
|
|
41
|
-
return this.toBuffer();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
static get schema() {
|
|
45
|
-
return bufferSchemaFor(PaddingBlockRootRollupInputs);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
|
|
4
|
-
import { RecursiveProof } from '../proofs/recursive_proof.js';
|
|
5
|
-
import { VkData } from '../vks/index.js';
|
|
6
|
-
import { BlockRootOrBlockMergePublicInputs } from './block_root_or_block_merge_public_inputs.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Represents the data of a previous block merge or block root rollup circuit.
|
|
10
|
-
*/
|
|
11
|
-
export class PreviousRollupBlockData {
|
|
12
|
-
constructor(
|
|
13
|
-
/**
|
|
14
|
-
* Public inputs to the block merge or block root rollup circuit.
|
|
15
|
-
*/
|
|
16
|
-
public blockRootOrBlockMergePublicInputs: BlockRootOrBlockMergePublicInputs,
|
|
17
|
-
/**
|
|
18
|
-
* The proof of the block merge or block root rollup circuit.
|
|
19
|
-
*/
|
|
20
|
-
public proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
|
|
21
|
-
/**
|
|
22
|
-
* The verification key and the witness of the vk in the vk tree.
|
|
23
|
-
*/
|
|
24
|
-
public vkData: VkData,
|
|
25
|
-
) {}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Serializes previous rollup data to a buffer.
|
|
29
|
-
* @returns The buffer of the serialized previous rollup data.
|
|
30
|
-
*/
|
|
31
|
-
public toBuffer(): Buffer {
|
|
32
|
-
return serializeToBuffer(this.blockRootOrBlockMergePublicInputs, this.proof, this.vkData);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Deserializes previous rollup data from a buffer.
|
|
37
|
-
* @param buffer - A buffer to deserialize from.
|
|
38
|
-
* @returns A new PreviousRollupData instance.
|
|
39
|
-
*/
|
|
40
|
-
public static fromBuffer(buffer: Buffer | BufferReader): PreviousRollupBlockData {
|
|
41
|
-
const reader = BufferReader.asReader(buffer);
|
|
42
|
-
return new PreviousRollupBlockData(
|
|
43
|
-
reader.readObject(BlockRootOrBlockMergePublicInputs),
|
|
44
|
-
RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
|
|
45
|
-
reader.readObject(VkData),
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
}
|