@aztec/stdlib 3.0.0-nightly.20250916 → 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 +78 -1
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +20 -2
- 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 +41 -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/aztec-node.d.ts +5 -2
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +1 -0
- 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 +204 -61
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +101 -39
- package/dest/interfaces/pxe.d.ts +8 -1
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +1 -0
- 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/messaging/inbox_leaf.d.ts +2 -0
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/inbox_leaf.js +3 -0
- 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 +17 -41
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +76 -80
- 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/dest/zkpassport/index.d.ts +3 -3
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +7 -7
- package/package.json +8 -8
- package/src/avm/avm.ts +22 -0
- 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/aztec-node.ts +8 -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/pxe.ts +10 -1
- 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/messaging/inbox_leaf.ts +5 -0
- 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 +139 -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/src/zkpassport/index.ts +6 -6
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_root_rollup.d.ts","sourceRoot":"","sources":["../../src/rollup/block_root_rollup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"block_root_rollup.d.ts","sourceRoot":"","sources":["../../src/rollup/block_root_rollup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,wCAAwC,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAuC,MAAM,6BAA6B,CAAC;AAC5G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,o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B;CACF;AAED,qBAAa,oCAAoC;IAE7C;;OAEG;IACI,cAAc,EAAE,eAAe,CAAC,6BAA6B,CAAC;IACrE;;OAEG;IACI,qBAAqB,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,cAAc,CAAC;;IAP9D;;OAEG;IACI,cAAc,EAAE,eAAe,CAAC,6BAA6B,CAAC;IACrE;;OAEG;IACI,qBAAqB,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,cAAc,CAAC;IAGhE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,oCAAoC,CAAC;IAIlE,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,oCAAoC,CAAC;IAIvE,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAQ/C,MAAM;IAIN,MAAM,KAAK,MAAM,6EAEhB;CACF"}
|
|
@@ -1,306 +1,257 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ARCHIVE_HEIGHT,
|
|
3
|
-
import {
|
|
1
|
+
import { SpongeBlob } from '@aztec/blob-lib/types';
|
|
2
|
+
import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH } from '@aztec/constants';
|
|
3
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
5
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
5
|
+
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
|
+
import { ParityPublicInputs } from '../parity/parity_public_inputs.js';
|
|
7
|
+
import { ProofData } from '../proofs/proof_data.js';
|
|
8
|
+
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
9
|
+
import { StateReference } from '../tx/state_reference.js';
|
|
10
|
+
import { BaseOrMergeRollupPublicInputs } from './base_or_merge_rollup_public_inputs.js';
|
|
11
|
+
import { CheckpointConstantData } from './checkpoint_constant_data.js';
|
|
12
|
+
export class BlockRootFirstRollupPrivateInputs {
|
|
11
13
|
l1ToL2Roots;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
previousRollups;
|
|
15
|
+
previousL1ToL2;
|
|
16
|
+
newL1ToL2MessageSubtreeSiblingPath;
|
|
14
17
|
newArchiveSiblingPath;
|
|
15
|
-
previousBlockHeader;
|
|
16
|
-
startBlobAccumulator;
|
|
17
|
-
finalBlobChallenges;
|
|
18
|
-
proverId;
|
|
19
18
|
constructor(/**
|
|
20
19
|
* The original and converted roots of the L1 to L2 messages subtrees.
|
|
21
20
|
*/ l1ToL2Roots, /**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
21
|
+
* The previous rollup proof data from base or merge rollup circuits.
|
|
22
|
+
*/ previousRollups, /**
|
|
23
|
+
* The l1 to l2 message tree snapshot immediately before this block.
|
|
24
|
+
*/ previousL1ToL2, /**
|
|
25
|
+
* Hint for inserting the new l1 to l2 message subtree into `previousL1ToL2`.
|
|
26
|
+
*/ newL1ToL2MessageSubtreeSiblingPath, /**
|
|
26
27
|
* Hint for inserting the new block hash to the last archive.
|
|
27
|
-
*/ newArchiveSiblingPath
|
|
28
|
-
* The header of the previous block.
|
|
29
|
-
*/ previousBlockHeader, /**
|
|
30
|
-
* The current blob accumulation state across the epoch.
|
|
31
|
-
*/ startBlobAccumulator, /**
|
|
32
|
-
* Finalized challenges z and gamma for performing blob batching. Shared value across the epoch.
|
|
33
|
-
*/ finalBlobChallenges, /**
|
|
34
|
-
* Identifier of the prover.
|
|
35
|
-
*/ proverId){
|
|
28
|
+
*/ newArchiveSiblingPath){
|
|
36
29
|
this.l1ToL2Roots = l1ToL2Roots;
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
30
|
+
this.previousRollups = previousRollups;
|
|
31
|
+
this.previousL1ToL2 = previousL1ToL2;
|
|
32
|
+
this.newL1ToL2MessageSubtreeSiblingPath = newL1ToL2MessageSubtreeSiblingPath;
|
|
39
33
|
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Serializes the inputs to a buffer.
|
|
47
|
-
* @returns - The inputs serialized to a buffer.
|
|
48
|
-
*/ toBuffer() {
|
|
49
|
-
return serializeToBuffer(...BlockRootRollupData.getFields(this));
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Serializes the inputs to a hex string.
|
|
53
|
-
* @returns The instance serialized to a hex string.
|
|
54
|
-
*/ toString() {
|
|
55
|
-
return bufferToHex(this.toBuffer());
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Creates a new instance from fields.
|
|
59
|
-
* @param fields - Fields to create the instance from.
|
|
60
|
-
* @returns A new RootRollupInputs instance.
|
|
61
|
-
*/ static from(fields) {
|
|
62
|
-
return new BlockRootRollupData(...BlockRootRollupData.getFields(fields));
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Extracts fields from an instance.
|
|
66
|
-
* @param fields - Fields to create the instance from.
|
|
67
|
-
* @returns An array of fields.
|
|
68
|
-
*/ static getFields(fields) {
|
|
34
|
+
}
|
|
35
|
+
static from(fields) {
|
|
36
|
+
return new BlockRootFirstRollupPrivateInputs(...BlockRootFirstRollupPrivateInputs.getFields(fields));
|
|
37
|
+
}
|
|
38
|
+
static getFields(fields) {
|
|
69
39
|
return [
|
|
70
40
|
fields.l1ToL2Roots,
|
|
71
|
-
fields.
|
|
72
|
-
fields.
|
|
73
|
-
fields.
|
|
74
|
-
fields.
|
|
75
|
-
fields.startBlobAccumulator,
|
|
76
|
-
fields.finalBlobChallenges,
|
|
77
|
-
fields.proverId
|
|
41
|
+
fields.previousRollups,
|
|
42
|
+
fields.previousL1ToL2,
|
|
43
|
+
fields.newL1ToL2MessageSubtreeSiblingPath,
|
|
44
|
+
fields.newArchiveSiblingPath
|
|
78
45
|
];
|
|
79
46
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*/ static fromBuffer(buffer) {
|
|
47
|
+
toBuffer() {
|
|
48
|
+
return serializeToBuffer(...BlockRootFirstRollupPrivateInputs.getFields(this));
|
|
49
|
+
}
|
|
50
|
+
static fromBuffer(buffer) {
|
|
85
51
|
const reader = BufferReader.asReader(buffer);
|
|
86
|
-
return new
|
|
52
|
+
return new BlockRootFirstRollupPrivateInputs(ProofData.fromBuffer(reader, ParityPublicInputs), [
|
|
53
|
+
ProofData.fromBuffer(reader, BaseOrMergeRollupPublicInputs),
|
|
54
|
+
ProofData.fromBuffer(reader, BaseOrMergeRollupPublicInputs)
|
|
55
|
+
], AppendOnlyTreeSnapshot.fromBuffer(reader), reader.readArray(L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, Fr), reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
56
|
+
}
|
|
57
|
+
toJSON() {
|
|
58
|
+
return this.toBuffer();
|
|
59
|
+
}
|
|
60
|
+
static get schema() {
|
|
61
|
+
return bufferSchemaFor(BlockRootFirstRollupPrivateInputs);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
65
|
+
l1ToL2Roots;
|
|
66
|
+
previousRollup;
|
|
67
|
+
previousL1ToL2;
|
|
68
|
+
newL1ToL2MessageSubtreeSiblingPath;
|
|
69
|
+
newArchiveSiblingPath;
|
|
70
|
+
constructor(/**
|
|
71
|
+
* The original and converted roots of the L1 to L2 messages subtrees.
|
|
72
|
+
*/ l1ToL2Roots, /**
|
|
73
|
+
* The previous rollup proof data from base or merge rollup circuits.
|
|
74
|
+
*/ previousRollup, /**
|
|
75
|
+
* The l1 to l2 message tree snapshot immediately before this block.
|
|
76
|
+
*/ previousL1ToL2, /**
|
|
77
|
+
* Hint for inserting the new l1 to l2 message subtree.
|
|
78
|
+
*/ newL1ToL2MessageSubtreeSiblingPath, /**
|
|
79
|
+
* Hint for inserting the new block hash to the last archive.
|
|
80
|
+
*/ newArchiveSiblingPath){
|
|
81
|
+
this.l1ToL2Roots = l1ToL2Roots;
|
|
82
|
+
this.previousRollup = previousRollup;
|
|
83
|
+
this.previousL1ToL2 = previousL1ToL2;
|
|
84
|
+
this.newL1ToL2MessageSubtreeSiblingPath = newL1ToL2MessageSubtreeSiblingPath;
|
|
85
|
+
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
87
86
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
* @param str - A hex string to deserialize from.
|
|
91
|
-
* @returns A new RootRollupInputs instance.
|
|
92
|
-
*/ static fromString(str) {
|
|
93
|
-
return BlockRootRollupData.fromBuffer(hexToBuffer(str));
|
|
87
|
+
static from(fields) {
|
|
88
|
+
return new BlockRootSingleTxFirstRollupPrivateInputs(...BlockRootSingleTxFirstRollupPrivateInputs.getFields(fields));
|
|
94
89
|
}
|
|
95
|
-
|
|
90
|
+
static getFields(fields) {
|
|
91
|
+
return [
|
|
92
|
+
fields.l1ToL2Roots,
|
|
93
|
+
fields.previousRollup,
|
|
94
|
+
fields.previousL1ToL2,
|
|
95
|
+
fields.newL1ToL2MessageSubtreeSiblingPath,
|
|
96
|
+
fields.newArchiveSiblingPath
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
toBuffer() {
|
|
100
|
+
return serializeToBuffer(...BlockRootSingleTxFirstRollupPrivateInputs.getFields(this));
|
|
101
|
+
}
|
|
102
|
+
static fromBuffer(buffer) {
|
|
103
|
+
const reader = BufferReader.asReader(buffer);
|
|
104
|
+
return new BlockRootSingleTxFirstRollupPrivateInputs(ProofData.fromBuffer(reader, ParityPublicInputs), ProofData.fromBuffer(reader, BaseOrMergeRollupPublicInputs), AppendOnlyTreeSnapshot.fromBuffer(reader), reader.readArray(L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, Fr), reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
105
|
+
}
|
|
106
|
+
toJSON() {
|
|
96
107
|
return this.toBuffer();
|
|
97
108
|
}
|
|
98
|
-
|
|
99
|
-
return bufferSchemaFor(
|
|
109
|
+
static get schema() {
|
|
110
|
+
return bufferSchemaFor(BlockRootSingleTxFirstRollupPrivateInputs);
|
|
100
111
|
}
|
|
101
112
|
}
|
|
102
|
-
export class
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
114
|
+
l1ToL2Roots;
|
|
115
|
+
previousArchive;
|
|
116
|
+
previousState;
|
|
117
|
+
constants;
|
|
118
|
+
startSpongeBlob;
|
|
119
|
+
timestamp;
|
|
120
|
+
newL1ToL2MessageSubtreeSiblingPath;
|
|
121
|
+
newArchiveSiblingPath;
|
|
106
122
|
constructor(/**
|
|
107
|
-
*
|
|
108
|
-
|
|
109
|
-
*
|
|
110
|
-
*/
|
|
111
|
-
*
|
|
112
|
-
*/
|
|
113
|
-
* The
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return new BlockRootRollupBlobData(...BlockRootRollupBlobData.getFields(fields));
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Extracts fields from an instance.
|
|
141
|
-
* @param fields - Fields to create the instance from.
|
|
142
|
-
* @returns An array of fields.
|
|
143
|
-
*/ static getFields(fields) {
|
|
123
|
+
* The original and converted roots of the L1 to L2 messages subtrees.
|
|
124
|
+
*/ l1ToL2Roots, /**
|
|
125
|
+
* The archive after applying the previous block.
|
|
126
|
+
*/ previousArchive, /**
|
|
127
|
+
* The state reference of the previous block.
|
|
128
|
+
*/ previousState, /**
|
|
129
|
+
* The constants of the checkpoint.
|
|
130
|
+
*/ constants, /**
|
|
131
|
+
* The start sponge blob of this block. No data has been absorbed into it yet, since it's the first block. But the
|
|
132
|
+
* number of expected fields must be set to the total number of fields in the entire checkpoint.
|
|
133
|
+
*/ startSpongeBlob, /**
|
|
134
|
+
* The timestamp of this block.
|
|
135
|
+
*/ timestamp, /**
|
|
136
|
+
* Hint for inserting the new l1 to l2 message subtree.
|
|
137
|
+
*/ newL1ToL2MessageSubtreeSiblingPath, /**
|
|
138
|
+
* Hint for inserting the new block hash to the last archive.
|
|
139
|
+
*/ newArchiveSiblingPath){
|
|
140
|
+
this.l1ToL2Roots = l1ToL2Roots;
|
|
141
|
+
this.previousArchive = previousArchive;
|
|
142
|
+
this.previousState = previousState;
|
|
143
|
+
this.constants = constants;
|
|
144
|
+
this.startSpongeBlob = startSpongeBlob;
|
|
145
|
+
this.timestamp = timestamp;
|
|
146
|
+
this.newL1ToL2MessageSubtreeSiblingPath = newL1ToL2MessageSubtreeSiblingPath;
|
|
147
|
+
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
148
|
+
}
|
|
149
|
+
static from(fields) {
|
|
150
|
+
return new BlockRootEmptyTxFirstRollupPrivateInputs(...BlockRootEmptyTxFirstRollupPrivateInputs.getFields(fields));
|
|
151
|
+
}
|
|
152
|
+
static getFields(fields) {
|
|
144
153
|
return [
|
|
145
|
-
fields.
|
|
146
|
-
fields.
|
|
147
|
-
fields.
|
|
154
|
+
fields.l1ToL2Roots,
|
|
155
|
+
fields.previousArchive,
|
|
156
|
+
fields.previousState,
|
|
157
|
+
fields.constants,
|
|
158
|
+
fields.startSpongeBlob,
|
|
159
|
+
fields.timestamp,
|
|
160
|
+
fields.newL1ToL2MessageSubtreeSiblingPath,
|
|
161
|
+
fields.newArchiveSiblingPath
|
|
148
162
|
];
|
|
149
163
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
164
|
+
toBuffer() {
|
|
165
|
+
return serializeToBuffer([
|
|
166
|
+
this.l1ToL2Roots,
|
|
167
|
+
this.previousArchive,
|
|
168
|
+
this.previousState,
|
|
169
|
+
this.constants,
|
|
170
|
+
this.startSpongeBlob,
|
|
171
|
+
bigintToUInt64BE(this.timestamp),
|
|
172
|
+
this.newL1ToL2MessageSubtreeSiblingPath,
|
|
173
|
+
this.newArchiveSiblingPath
|
|
174
|
+
]);
|
|
175
|
+
}
|
|
176
|
+
static fromBuffer(buffer) {
|
|
155
177
|
const reader = BufferReader.asReader(buffer);
|
|
156
|
-
return new
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
length: FIELDS_PER_BLOB * BLOBS_PER_BLOCK
|
|
160
|
-
}, ()=>Fr.fromBuffer(reader)), reader.readArray(BLOBS_PER_BLOCK, BLS12Point), Fr.fromBuffer(reader));
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Deserializes the inputs from a hex string.
|
|
164
|
-
* @param str - A hex string to deserialize from.
|
|
165
|
-
* @returns A new RootRollupInputs instance.
|
|
166
|
-
*/ static fromString(str) {
|
|
167
|
-
return BlockRootRollupBlobData.fromBuffer(hexToBuffer(str));
|
|
168
|
-
}
|
|
169
|
-
/** Returns a buffer representation for JSON serialization. */ toJSON() {
|
|
178
|
+
return new BlockRootEmptyTxFirstRollupPrivateInputs(ProofData.fromBuffer(reader, ParityPublicInputs), AppendOnlyTreeSnapshot.fromBuffer(reader), StateReference.fromBuffer(reader), CheckpointConstantData.fromBuffer(reader), SpongeBlob.fromBuffer(reader), reader.readUInt64(), reader.readArray(L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, Fr), reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
179
|
+
}
|
|
180
|
+
toJSON() {
|
|
170
181
|
return this.toBuffer();
|
|
171
182
|
}
|
|
172
|
-
|
|
173
|
-
return bufferSchemaFor(
|
|
183
|
+
static get schema() {
|
|
184
|
+
return bufferSchemaFor(BlockRootEmptyTxFirstRollupPrivateInputs);
|
|
174
185
|
}
|
|
175
186
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
previousRollupData;
|
|
180
|
-
data;
|
|
181
|
-
blobData;
|
|
187
|
+
export class BlockRootRollupPrivateInputs {
|
|
188
|
+
previousRollups;
|
|
189
|
+
newArchiveSiblingPath;
|
|
182
190
|
constructor(/**
|
|
183
|
-
* The previous rollup data from
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
this.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Serializes the inputs to a hex string.
|
|
197
|
-
* @returns The instance serialized to a hex string.
|
|
198
|
-
*/ toString() {
|
|
199
|
-
return bufferToHex(this.toBuffer());
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Creates a new instance from fields.
|
|
203
|
-
* @param fields - Fields to create the instance from.
|
|
204
|
-
* @returns A new RootRollupInputs instance.
|
|
205
|
-
*/ static from(fields) {
|
|
206
|
-
return new BlockRootRollupInputs(...BlockRootRollupInputs.getFields(fields));
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Extracts fields from an instance.
|
|
210
|
-
* @param fields - Fields to create the instance from.
|
|
211
|
-
* @returns An array of fields.
|
|
212
|
-
*/ static getFields(fields) {
|
|
191
|
+
* The previous rollup proof data from base or merge rollup circuits.
|
|
192
|
+
*/ previousRollups, /**
|
|
193
|
+
* Hint for inserting the new block hash to the last archive.
|
|
194
|
+
*/ newArchiveSiblingPath){
|
|
195
|
+
this.previousRollups = previousRollups;
|
|
196
|
+
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
197
|
+
}
|
|
198
|
+
static from(fields) {
|
|
199
|
+
return new BlockRootRollupPrivateInputs(...BlockRootRollupPrivateInputs.getFields(fields));
|
|
200
|
+
}
|
|
201
|
+
static getFields(fields) {
|
|
213
202
|
return [
|
|
214
|
-
fields.
|
|
215
|
-
fields.
|
|
216
|
-
fields.blobData
|
|
203
|
+
fields.previousRollups,
|
|
204
|
+
fields.newArchiveSiblingPath
|
|
217
205
|
];
|
|
218
206
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
*/ static fromBuffer(buffer) {
|
|
207
|
+
toBuffer() {
|
|
208
|
+
return serializeToBuffer(...BlockRootRollupPrivateInputs.getFields(this));
|
|
209
|
+
}
|
|
210
|
+
static fromBuffer(buffer) {
|
|
224
211
|
const reader = BufferReader.asReader(buffer);
|
|
225
|
-
return new
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
], reader.
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
* Deserializes the inputs from a hex string.
|
|
232
|
-
* @param str - A hex string to deserialize from.
|
|
233
|
-
* @returns A new RootRollupInputs instance.
|
|
234
|
-
*/ static fromString(str) {
|
|
235
|
-
return BlockRootRollupInputs.fromBuffer(hexToBuffer(str));
|
|
236
|
-
}
|
|
237
|
-
/** Returns a buffer representation for JSON serialization. */ toJSON() {
|
|
212
|
+
return new BlockRootRollupPrivateInputs([
|
|
213
|
+
ProofData.fromBuffer(reader, BaseOrMergeRollupPublicInputs),
|
|
214
|
+
ProofData.fromBuffer(reader, BaseOrMergeRollupPublicInputs)
|
|
215
|
+
], reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
216
|
+
}
|
|
217
|
+
toJSON() {
|
|
238
218
|
return this.toBuffer();
|
|
239
219
|
}
|
|
240
|
-
|
|
241
|
-
return bufferSchemaFor(
|
|
220
|
+
static get schema() {
|
|
221
|
+
return bufferSchemaFor(BlockRootRollupPrivateInputs);
|
|
242
222
|
}
|
|
243
223
|
}
|
|
244
|
-
export class
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Serializes the inputs to a hex string.
|
|
261
|
-
* @returns The instance serialized to a hex string.
|
|
262
|
-
*/ toString() {
|
|
263
|
-
return bufferToHex(this.toBuffer());
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Creates a new instance from fields.
|
|
267
|
-
* @param fields - Fields to create the instance from.
|
|
268
|
-
* @returns A new RootRollupInputs instance.
|
|
269
|
-
*/ static from(fields) {
|
|
270
|
-
return new SingleTxBlockRootRollupInputs(...SingleTxBlockRootRollupInputs.getFields(fields));
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Extracts fields from an instance.
|
|
274
|
-
* @param fields - Fields to create the instance from.
|
|
275
|
-
* @returns An array of fields.
|
|
276
|
-
*/ static getFields(fields) {
|
|
224
|
+
export class BlockRootSingleTxRollupPrivateInputs {
|
|
225
|
+
previousRollup;
|
|
226
|
+
newArchiveSiblingPath;
|
|
227
|
+
constructor(/**
|
|
228
|
+
* The previous rollup proof data from base or merge rollup circuits.
|
|
229
|
+
*/ previousRollup, /**
|
|
230
|
+
* Hint for inserting the new block hash to the last archive.
|
|
231
|
+
*/ newArchiveSiblingPath){
|
|
232
|
+
this.previousRollup = previousRollup;
|
|
233
|
+
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
234
|
+
}
|
|
235
|
+
static from(fields) {
|
|
236
|
+
return new BlockRootSingleTxRollupPrivateInputs(...BlockRootSingleTxRollupPrivateInputs.getFields(fields));
|
|
237
|
+
}
|
|
238
|
+
static getFields(fields) {
|
|
277
239
|
return [
|
|
278
|
-
fields.
|
|
279
|
-
fields.
|
|
280
|
-
fields.blobData
|
|
240
|
+
fields.previousRollup,
|
|
241
|
+
fields.newArchiveSiblingPath
|
|
281
242
|
];
|
|
282
243
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
*/ static fromBuffer(buffer) {
|
|
244
|
+
toBuffer() {
|
|
245
|
+
return serializeToBuffer(...BlockRootSingleTxRollupPrivateInputs.getFields(this));
|
|
246
|
+
}
|
|
247
|
+
static fromBuffer(buffer) {
|
|
288
248
|
const reader = BufferReader.asReader(buffer);
|
|
289
|
-
return new
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Deserializes the inputs from a hex string.
|
|
295
|
-
* @param str - A hex string to deserialize from.
|
|
296
|
-
* @returns A new RootRollupInputs instance.
|
|
297
|
-
*/ static fromString(str) {
|
|
298
|
-
return SingleTxBlockRootRollupInputs.fromBuffer(hexToBuffer(str));
|
|
299
|
-
}
|
|
300
|
-
/** Returns a buffer representation for JSON serialization. */ toJSON() {
|
|
249
|
+
return new BlockRootSingleTxRollupPrivateInputs(ProofData.fromBuffer(reader, BaseOrMergeRollupPublicInputs), reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
250
|
+
}
|
|
251
|
+
toJSON() {
|
|
301
252
|
return this.toBuffer();
|
|
302
253
|
}
|
|
303
|
-
|
|
304
|
-
return bufferSchemaFor(
|
|
254
|
+
static get schema() {
|
|
255
|
+
return bufferSchemaFor(BlockRootSingleTxRollupPrivateInputs);
|
|
305
256
|
}
|
|
306
257
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
4
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
5
|
+
import { AztecAddress } from '../aztec-address/index.js';
|
|
6
|
+
import { GasFees } from '../gas/gas_fees.js';
|
|
7
|
+
/**
|
|
8
|
+
* Constants that are the same for the entire checkpoint.
|
|
9
|
+
*/
|
|
10
|
+
export declare class CheckpointConstantData {
|
|
11
|
+
/** ChainId of the rollup. */
|
|
12
|
+
chainId: Fr;
|
|
13
|
+
/** Version of the rollup. */
|
|
14
|
+
version: Fr;
|
|
15
|
+
/** Root of the verification key tree. */
|
|
16
|
+
vkTreeRoot: Fr;
|
|
17
|
+
/** Root of the protocol contract tree. */
|
|
18
|
+
protocolContractTreeRoot: Fr;
|
|
19
|
+
/** Identifier of the prover. */
|
|
20
|
+
proverId: Fr;
|
|
21
|
+
/** Slot number of the checkpoint. */
|
|
22
|
+
slotNumber: Fr;
|
|
23
|
+
/** Coinbase address of the rollup. */
|
|
24
|
+
coinbase: EthAddress;
|
|
25
|
+
/** Address to receive fees. */
|
|
26
|
+
feeRecipient: AztecAddress;
|
|
27
|
+
/** Global gas fees for this checkpoint. */
|
|
28
|
+
gasFees: GasFees;
|
|
29
|
+
constructor(
|
|
30
|
+
/** ChainId of the rollup. */
|
|
31
|
+
chainId: Fr,
|
|
32
|
+
/** Version of the rollup. */
|
|
33
|
+
version: Fr,
|
|
34
|
+
/** Root of the verification key tree. */
|
|
35
|
+
vkTreeRoot: Fr,
|
|
36
|
+
/** Root of the protocol contract tree. */
|
|
37
|
+
protocolContractTreeRoot: Fr,
|
|
38
|
+
/** Identifier of the prover. */
|
|
39
|
+
proverId: Fr,
|
|
40
|
+
/** Slot number of the checkpoint. */
|
|
41
|
+
slotNumber: Fr,
|
|
42
|
+
/** Coinbase address of the rollup. */
|
|
43
|
+
coinbase: EthAddress,
|
|
44
|
+
/** Address to receive fees. */
|
|
45
|
+
feeRecipient: AztecAddress,
|
|
46
|
+
/** Global gas fees for this checkpoint. */
|
|
47
|
+
gasFees: GasFees);
|
|
48
|
+
static from(fields: FieldsOf<CheckpointConstantData>): CheckpointConstantData;
|
|
49
|
+
static getFields(fields: FieldsOf<CheckpointConstantData>): readonly [Fr, Fr, Fr, Fr, Fr, Fr, EthAddress, AztecAddress, GasFees];
|
|
50
|
+
static empty(): CheckpointConstantData;
|
|
51
|
+
toBuffer(): Buffer<ArrayBufferLike>;
|
|
52
|
+
static fromBuffer(buffer: Buffer | BufferReader): CheckpointConstantData;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=checkpoint_constant_data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint_constant_data.d.ts","sourceRoot":"","sources":["../../src/rollup/checkpoint_constant_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C;;GAEG;AACH,qBAAa,sBAAsB;IAE/B,6BAA6B;IACtB,OAAO,EAAE,EAAE;IAClB,6BAA6B;IACtB,OAAO,EAAE,EAAE;IAClB,yCAAyC;IAClC,UAAU,EAAE,EAAE;IACrB,0CAA0C;IACnC,wBAAwB,EAAE,EAAE;IACnC,gCAAgC;IACzB,QAAQ,EAAE,EAAE;IACnB,qCAAqC;IAC9B,UAAU,EAAE,EAAE;IACrB,sCAAsC;IAC/B,QAAQ,EAAE,UAAU;IAC3B,+BAA+B;IACxB,YAAY,EAAE,YAAY;IACjC,2CAA2C;IACpC,OAAO,EAAE,OAAO;;IAjBvB,6BAA6B;IACtB,OAAO,EAAE,EAAE;IAClB,6BAA6B;IACtB,OAAO,EAAE,EAAE;IAClB,yCAAyC;IAClC,UAAU,EAAE,EAAE;IACrB,0CAA0C;IACnC,wBAAwB,EAAE,EAAE;IACnC,gCAAg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