@aztec/stdlib 3.0.0-nightly.20250925 → 3.0.0-nightly.20250926
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_accumulated_data.d.ts +1 -0
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +4 -0
- package/dest/avm/index.d.ts +0 -1
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +0 -1
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +18 -0
- package/dest/file-store/s3.d.ts +25 -0
- package/dest/file-store/s3.d.ts.map +1 -0
- package/dest/file-store/s3.js +187 -0
- package/dest/interfaces/aztec-node-admin.d.ts +6 -0
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/slasher.d.ts +4 -0
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +1 -0
- package/dest/interfaces/validator.d.ts +6 -1
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/rollup/avm_proof_data.d.ts +2 -12
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +0 -24
- package/dest/rollup/base_rollup_hints.d.ts +15 -16
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +24 -25
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +13 -13
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +20 -20
- package/dest/rollup/index.d.ts +1 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.js +2 -2
- package/dest/rollup/{state_diff_hints.d.ts → tree_snapshot_diff_hints.d.ts} +22 -38
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -0
- package/dest/rollup/tree_snapshot_diff_hints.js +75 -0
- package/dest/rollup/tx_rollup_public_inputs.d.ts +4 -4
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.js +7 -7
- package/dest/tests/factories.d.ts +4 -4
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +20 -25
- package/package.json +9 -8
- package/src/avm/avm_accumulated_data.ts +10 -0
- package/src/avm/index.ts +0 -1
- package/src/file-store/factory.ts +15 -0
- package/src/file-store/s3.ts +186 -0
- package/src/interfaces/slasher.ts +2 -0
- package/src/interfaces/validator.ts +5 -1
- package/src/rollup/avm_proof_data.ts +2 -31
- package/src/rollup/base_rollup_hints.ts +20 -21
- package/src/rollup/block_root_rollup_private_inputs.ts +14 -14
- package/src/rollup/index.ts +1 -1
- package/src/rollup/public_tx_base_rollup_private_inputs.ts +3 -2
- package/src/rollup/{state_diff_hints.ts → tree_snapshot_diff_hints.ts} +26 -41
- package/src/rollup/tx_rollup_public_inputs.ts +4 -4
- package/src/tests/factories.ts +25 -37
- package/dest/avm/public_data_hint.d.ts +0 -16
- package/dest/avm/public_data_hint.d.ts.map +0 -1
- package/dest/avm/public_data_hint.js +0 -27
- package/dest/rollup/state_diff_hints.d.ts.map +0 -1
- package/dest/rollup/state_diff_hints.js +0 -85
- package/src/avm/public_data_hint.ts +0 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base_rollup_hints.d.ts","sourceRoot":"","sources":["../../src/rollup/base_rollup_hints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA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OAAO,8BAA8B,CAAC;IACpG;;OAEG;IACI,QAAQ,EAAE,EAAE;IAGrB,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,qBAAqB;IAI3E,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC;IAUxD;;;OAGG;IACH,QAAQ;IAIR;;;OAGG;IACH,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,qBAAqB;IAWvE,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,MAAM,CAAC,KAAK;CASb"}
|
|
@@ -4,19 +4,18 @@ import { makeTuple } from '@aztec/foundation/array';
|
|
|
4
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
5
5
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
6
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
7
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
8
|
-
import { PublicDataHint } from '../avm/public_data_hint.js';
|
|
9
7
|
import { ContractClassLogFields } from '../logs/index.js';
|
|
10
|
-
import { AppendOnlyTreeSnapshot } from '../trees/
|
|
8
|
+
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
9
|
+
import { PublicDataTreeLeafPreimage } from '../trees/public_data_leaf.js';
|
|
11
10
|
import { PartialStateReference } from '../tx/partial_state_reference.js';
|
|
12
11
|
import { BlockConstantData } from './block_constant_data.js';
|
|
13
|
-
import {
|
|
12
|
+
import { TreeSnapshotDiffHints } from './tree_snapshot_diff_hints.js';
|
|
14
13
|
export class PrivateBaseRollupHints {
|
|
15
14
|
start;
|
|
16
15
|
startSpongeBlob;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
treeSnapshotDiffHints;
|
|
17
|
+
feePayerBalanceLeafPreimage;
|
|
18
|
+
anchorBlockArchiveSiblingPath;
|
|
20
19
|
contractClassLogsFields;
|
|
21
20
|
constants;
|
|
22
21
|
constructor(/**
|
|
@@ -25,20 +24,20 @@ export class PrivateBaseRollupHints {
|
|
|
25
24
|
* Sponge state to absorb blob inputs at the start of the rollup.
|
|
26
25
|
*/ startSpongeBlob, /**
|
|
27
26
|
* Hints used while proving state diff validity.
|
|
28
|
-
*/
|
|
29
|
-
* Public data
|
|
30
|
-
*/
|
|
27
|
+
*/ treeSnapshotDiffHints, /**
|
|
28
|
+
* Public data tree leaf preimage for accessing the balance of the fee payer.
|
|
29
|
+
*/ feePayerBalanceLeafPreimage, /**
|
|
31
30
|
* Membership witnesses of blocks referred by each of the 2 kernels.
|
|
32
|
-
*/
|
|
31
|
+
*/ anchorBlockArchiveSiblingPath, /**
|
|
33
32
|
* Preimages to the kernel's contractClassLogsHashes.
|
|
34
33
|
*/ contractClassLogsFields, /**
|
|
35
34
|
* Data which is not modified by the base rollup circuit.
|
|
36
35
|
*/ constants){
|
|
37
36
|
this.start = start;
|
|
38
37
|
this.startSpongeBlob = startSpongeBlob;
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
38
|
+
this.treeSnapshotDiffHints = treeSnapshotDiffHints;
|
|
39
|
+
this.feePayerBalanceLeafPreimage = feePayerBalanceLeafPreimage;
|
|
40
|
+
this.anchorBlockArchiveSiblingPath = anchorBlockArchiveSiblingPath;
|
|
42
41
|
this.contractClassLogsFields = contractClassLogsFields;
|
|
43
42
|
this.constants = constants;
|
|
44
43
|
}
|
|
@@ -49,9 +48,9 @@ export class PrivateBaseRollupHints {
|
|
|
49
48
|
return [
|
|
50
49
|
fields.start,
|
|
51
50
|
fields.startSpongeBlob,
|
|
52
|
-
fields.
|
|
53
|
-
fields.
|
|
54
|
-
fields.
|
|
51
|
+
fields.treeSnapshotDiffHints,
|
|
52
|
+
fields.feePayerBalanceLeafPreimage,
|
|
53
|
+
fields.anchorBlockArchiveSiblingPath,
|
|
55
54
|
fields.contractClassLogsFields,
|
|
56
55
|
fields.constants
|
|
57
56
|
];
|
|
@@ -70,19 +69,19 @@ export class PrivateBaseRollupHints {
|
|
|
70
69
|
}
|
|
71
70
|
static fromBuffer(buffer) {
|
|
72
71
|
const reader = BufferReader.asReader(buffer);
|
|
73
|
-
return new PrivateBaseRollupHints(reader.readObject(PartialStateReference), reader.readObject(SpongeBlob), reader.readObject(
|
|
72
|
+
return new PrivateBaseRollupHints(reader.readObject(PartialStateReference), reader.readObject(SpongeBlob), reader.readObject(TreeSnapshotDiffHints), reader.readObject(PublicDataTreeLeafPreimage), reader.readArray(ARCHIVE_HEIGHT, Fr), makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ()=>reader.readObject(ContractClassLogFields)), reader.readObject(BlockConstantData));
|
|
74
73
|
}
|
|
75
74
|
static fromString(str) {
|
|
76
75
|
return PrivateBaseRollupHints.fromBuffer(hexToBuffer(str));
|
|
77
76
|
}
|
|
78
77
|
static empty() {
|
|
79
|
-
return new PrivateBaseRollupHints(PartialStateReference.empty(), SpongeBlob.empty(),
|
|
78
|
+
return new PrivateBaseRollupHints(PartialStateReference.empty(), SpongeBlob.empty(), TreeSnapshotDiffHints.empty(), PublicDataTreeLeafPreimage.empty(), makeTuple(ARCHIVE_HEIGHT, Fr.zero), makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ContractClassLogFields.empty), BlockConstantData.empty());
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
export class PublicBaseRollupHints {
|
|
83
82
|
startSpongeBlob;
|
|
84
83
|
lastArchive;
|
|
85
|
-
|
|
84
|
+
anchorBlockArchiveSiblingPath;
|
|
86
85
|
contractClassLogsFields;
|
|
87
86
|
proverId;
|
|
88
87
|
constructor(/**
|
|
@@ -91,14 +90,14 @@ export class PublicBaseRollupHints {
|
|
|
91
90
|
* Archive tree snapshot at the very beginning of the block containing this base rollup.
|
|
92
91
|
*/ lastArchive, /**
|
|
93
92
|
* Membership witnesses of blocks referred by each of the 2 kernels.
|
|
94
|
-
*/
|
|
93
|
+
*/ anchorBlockArchiveSiblingPath, /**
|
|
95
94
|
* Preimages to the kernel's contractClassLogsHashes.
|
|
96
95
|
*/ contractClassLogsFields, /**
|
|
97
96
|
* Identifier of the prover.
|
|
98
97
|
*/ proverId){
|
|
99
98
|
this.startSpongeBlob = startSpongeBlob;
|
|
100
99
|
this.lastArchive = lastArchive;
|
|
101
|
-
this.
|
|
100
|
+
this.anchorBlockArchiveSiblingPath = anchorBlockArchiveSiblingPath;
|
|
102
101
|
this.contractClassLogsFields = contractClassLogsFields;
|
|
103
102
|
this.proverId = proverId;
|
|
104
103
|
}
|
|
@@ -109,7 +108,7 @@ export class PublicBaseRollupHints {
|
|
|
109
108
|
return [
|
|
110
109
|
fields.startSpongeBlob,
|
|
111
110
|
fields.lastArchive,
|
|
112
|
-
fields.
|
|
111
|
+
fields.anchorBlockArchiveSiblingPath,
|
|
113
112
|
fields.contractClassLogsFields,
|
|
114
113
|
fields.proverId
|
|
115
114
|
];
|
|
@@ -128,12 +127,12 @@ export class PublicBaseRollupHints {
|
|
|
128
127
|
}
|
|
129
128
|
static fromBuffer(buffer) {
|
|
130
129
|
const reader = BufferReader.asReader(buffer);
|
|
131
|
-
return new PublicBaseRollupHints(reader.readObject(SpongeBlob), reader.readObject(AppendOnlyTreeSnapshot),
|
|
130
|
+
return new PublicBaseRollupHints(reader.readObject(SpongeBlob), reader.readObject(AppendOnlyTreeSnapshot), reader.readArray(ARCHIVE_HEIGHT, Fr), makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ()=>reader.readObject(ContractClassLogFields)), reader.readObject(Fr));
|
|
132
131
|
}
|
|
133
132
|
static fromString(str) {
|
|
134
133
|
return PublicBaseRollupHints.fromBuffer(hexToBuffer(str));
|
|
135
134
|
}
|
|
136
135
|
static empty() {
|
|
137
|
-
return new PublicBaseRollupHints(SpongeBlob.empty(), AppendOnlyTreeSnapshot.empty(),
|
|
136
|
+
return new PublicBaseRollupHints(SpongeBlob.empty(), AppendOnlyTreeSnapshot.empty(), makeTuple(ARCHIVE_HEIGHT, Fr.zero), makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ContractClassLogFields.empty), Fr.ZERO);
|
|
138
137
|
}
|
|
139
138
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpongeBlob } from '@aztec/blob-lib/types';
|
|
2
|
-
import { ARCHIVE_HEIGHT,
|
|
2
|
+
import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH } from '@aztec/constants';
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
|
|
5
5
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
@@ -24,9 +24,9 @@ export declare class BlockRootFirstRollupPrivateInputs {
|
|
|
24
24
|
*/
|
|
25
25
|
previousL1ToL2: AppendOnlyTreeSnapshot;
|
|
26
26
|
/**
|
|
27
|
-
* Hint for inserting the new l1 to l2 message subtree into `previousL1ToL2`.
|
|
27
|
+
* Hint for inserting the new l1 to l2 message subtree root into `previousL1ToL2`.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>;
|
|
30
30
|
/**
|
|
31
31
|
* Hint for inserting the new block hash to the last archive.
|
|
32
32
|
*/
|
|
@@ -45,9 +45,9 @@ export declare class BlockRootFirstRollupPrivateInputs {
|
|
|
45
45
|
*/
|
|
46
46
|
previousL1ToL2: AppendOnlyTreeSnapshot,
|
|
47
47
|
/**
|
|
48
|
-
* Hint for inserting the new l1 to l2 message subtree into `previousL1ToL2`.
|
|
48
|
+
* Hint for inserting the new l1 to l2 message subtree root into `previousL1ToL2`.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>,
|
|
51
51
|
/**
|
|
52
52
|
* Hint for inserting the new block hash to the last archive.
|
|
53
53
|
*/
|
|
@@ -73,9 +73,9 @@ export declare class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
|
73
73
|
*/
|
|
74
74
|
previousL1ToL2: AppendOnlyTreeSnapshot;
|
|
75
75
|
/**
|
|
76
|
-
* Hint for inserting the new l1 to l2 message subtree.
|
|
76
|
+
* Hint for inserting the new l1 to l2 message subtree root.
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>;
|
|
79
79
|
/**
|
|
80
80
|
* Hint for inserting the new block hash to the last archive.
|
|
81
81
|
*/
|
|
@@ -94,9 +94,9 @@ export declare class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
|
94
94
|
*/
|
|
95
95
|
previousL1ToL2: AppendOnlyTreeSnapshot,
|
|
96
96
|
/**
|
|
97
|
-
* Hint for inserting the new l1 to l2 message subtree.
|
|
97
|
+
* Hint for inserting the new l1 to l2 message subtree root.
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>,
|
|
100
100
|
/**
|
|
101
101
|
* Hint for inserting the new block hash to the last archive.
|
|
102
102
|
*/
|
|
@@ -135,9 +135,9 @@ export declare class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
135
135
|
*/
|
|
136
136
|
timestamp: UInt64;
|
|
137
137
|
/**
|
|
138
|
-
* Hint for inserting the new l1 to l2 message subtree.
|
|
138
|
+
* Hint for inserting the new l1 to l2 message subtree root.
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>;
|
|
141
141
|
/**
|
|
142
142
|
* Hint for inserting the new block hash to the last archive.
|
|
143
143
|
*/
|
|
@@ -169,9 +169,9 @@ export declare class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
169
169
|
*/
|
|
170
170
|
timestamp: UInt64,
|
|
171
171
|
/**
|
|
172
|
-
* Hint for inserting the new l1 to l2 message subtree.
|
|
172
|
+
* Hint for inserting the new l1 to l2 message subtree root.
|
|
173
173
|
*/
|
|
174
|
-
|
|
174
|
+
newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>,
|
|
175
175
|
/**
|
|
176
176
|
* Hint for inserting the new block hash to the last archive.
|
|
177
177
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_root_rollup_private_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/block_root_rollup_private_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"block_root_rollup_private_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/block_root_rollup_private_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,6CAA6C,EAAE,MAAM,kBAAkB,CAAC;AACjG,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;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;A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,qBAAqB,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,cAAc,CAAC;IAGhE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,4BAA4B,CAAC;IAI1D,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,4BAA4B,CAAC;IAI/D,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAQ/C,MAAM;IAIN,MAAM,KAAK,MAAM,qEAEhB;CACF;AAED,qBAAa,oCAAoC;IAE7C;;OAEG;IACI,cAAc,EAAE,mBAAmB,CAAC,oBAAoB,CAAC;IAChE;;OAEG;IACI,qBAAqB,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,cAAc,CAAC;;IAP9D;;OAEG;IACI,cAAc,EAAE,mBAAmB,CAAC,oBAAoB,CAAC;IAChE;;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,5 +1,5 @@
|
|
|
1
1
|
import { SpongeBlob } from '@aztec/blob-lib/types';
|
|
2
|
-
import { ARCHIVE_HEIGHT,
|
|
2
|
+
import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH } from '@aztec/constants';
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
5
5
|
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
@@ -13,7 +13,7 @@ export class BlockRootFirstRollupPrivateInputs {
|
|
|
13
13
|
l1ToL2Roots;
|
|
14
14
|
previousRollups;
|
|
15
15
|
previousL1ToL2;
|
|
16
|
-
|
|
16
|
+
newL1ToL2MessageSubtreeRootSiblingPath;
|
|
17
17
|
newArchiveSiblingPath;
|
|
18
18
|
constructor(/**
|
|
19
19
|
* The original and converted roots of the L1 to L2 messages subtrees.
|
|
@@ -22,14 +22,14 @@ export class BlockRootFirstRollupPrivateInputs {
|
|
|
22
22
|
*/ previousRollups, /**
|
|
23
23
|
* The l1 to l2 message tree snapshot immediately before this block.
|
|
24
24
|
*/ previousL1ToL2, /**
|
|
25
|
-
* Hint for inserting the new l1 to l2 message subtree into `previousL1ToL2`.
|
|
26
|
-
*/
|
|
25
|
+
* Hint for inserting the new l1 to l2 message subtree root into `previousL1ToL2`.
|
|
26
|
+
*/ newL1ToL2MessageSubtreeRootSiblingPath, /**
|
|
27
27
|
* Hint for inserting the new block hash to the last archive.
|
|
28
28
|
*/ newArchiveSiblingPath){
|
|
29
29
|
this.l1ToL2Roots = l1ToL2Roots;
|
|
30
30
|
this.previousRollups = previousRollups;
|
|
31
31
|
this.previousL1ToL2 = previousL1ToL2;
|
|
32
|
-
this.
|
|
32
|
+
this.newL1ToL2MessageSubtreeRootSiblingPath = newL1ToL2MessageSubtreeRootSiblingPath;
|
|
33
33
|
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
34
34
|
}
|
|
35
35
|
static from(fields) {
|
|
@@ -40,7 +40,7 @@ export class BlockRootFirstRollupPrivateInputs {
|
|
|
40
40
|
fields.l1ToL2Roots,
|
|
41
41
|
fields.previousRollups,
|
|
42
42
|
fields.previousL1ToL2,
|
|
43
|
-
fields.
|
|
43
|
+
fields.newL1ToL2MessageSubtreeRootSiblingPath,
|
|
44
44
|
fields.newArchiveSiblingPath
|
|
45
45
|
];
|
|
46
46
|
}
|
|
@@ -52,7 +52,7 @@ export class BlockRootFirstRollupPrivateInputs {
|
|
|
52
52
|
return new BlockRootFirstRollupPrivateInputs(ProofData.fromBuffer(reader, ParityPublicInputs), [
|
|
53
53
|
ProofData.fromBuffer(reader, TxRollupPublicInputs),
|
|
54
54
|
ProofData.fromBuffer(reader, TxRollupPublicInputs)
|
|
55
|
-
], AppendOnlyTreeSnapshot.fromBuffer(reader), reader.readArray(
|
|
55
|
+
], AppendOnlyTreeSnapshot.fromBuffer(reader), reader.readArray(L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr), reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
56
56
|
}
|
|
57
57
|
toJSON() {
|
|
58
58
|
return this.toBuffer();
|
|
@@ -65,7 +65,7 @@ export class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
|
65
65
|
l1ToL2Roots;
|
|
66
66
|
previousRollup;
|
|
67
67
|
previousL1ToL2;
|
|
68
|
-
|
|
68
|
+
newL1ToL2MessageSubtreeRootSiblingPath;
|
|
69
69
|
newArchiveSiblingPath;
|
|
70
70
|
constructor(/**
|
|
71
71
|
* The original and converted roots of the L1 to L2 messages subtrees.
|
|
@@ -74,14 +74,14 @@ export class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
|
74
74
|
*/ previousRollup, /**
|
|
75
75
|
* The l1 to l2 message tree snapshot immediately before this block.
|
|
76
76
|
*/ previousL1ToL2, /**
|
|
77
|
-
* Hint for inserting the new l1 to l2 message subtree.
|
|
78
|
-
*/
|
|
77
|
+
* Hint for inserting the new l1 to l2 message subtree root.
|
|
78
|
+
*/ newL1ToL2MessageSubtreeRootSiblingPath, /**
|
|
79
79
|
* Hint for inserting the new block hash to the last archive.
|
|
80
80
|
*/ newArchiveSiblingPath){
|
|
81
81
|
this.l1ToL2Roots = l1ToL2Roots;
|
|
82
82
|
this.previousRollup = previousRollup;
|
|
83
83
|
this.previousL1ToL2 = previousL1ToL2;
|
|
84
|
-
this.
|
|
84
|
+
this.newL1ToL2MessageSubtreeRootSiblingPath = newL1ToL2MessageSubtreeRootSiblingPath;
|
|
85
85
|
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
86
86
|
}
|
|
87
87
|
static from(fields) {
|
|
@@ -92,7 +92,7 @@ export class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
|
92
92
|
fields.l1ToL2Roots,
|
|
93
93
|
fields.previousRollup,
|
|
94
94
|
fields.previousL1ToL2,
|
|
95
|
-
fields.
|
|
95
|
+
fields.newL1ToL2MessageSubtreeRootSiblingPath,
|
|
96
96
|
fields.newArchiveSiblingPath
|
|
97
97
|
];
|
|
98
98
|
}
|
|
@@ -101,7 +101,7 @@ export class BlockRootSingleTxFirstRollupPrivateInputs {
|
|
|
101
101
|
}
|
|
102
102
|
static fromBuffer(buffer) {
|
|
103
103
|
const reader = BufferReader.asReader(buffer);
|
|
104
|
-
return new BlockRootSingleTxFirstRollupPrivateInputs(ProofData.fromBuffer(reader, ParityPublicInputs), ProofData.fromBuffer(reader, TxRollupPublicInputs), AppendOnlyTreeSnapshot.fromBuffer(reader), reader.readArray(
|
|
104
|
+
return new BlockRootSingleTxFirstRollupPrivateInputs(ProofData.fromBuffer(reader, ParityPublicInputs), ProofData.fromBuffer(reader, TxRollupPublicInputs), AppendOnlyTreeSnapshot.fromBuffer(reader), reader.readArray(L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr), reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
105
105
|
}
|
|
106
106
|
toJSON() {
|
|
107
107
|
return this.toBuffer();
|
|
@@ -117,7 +117,7 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
117
117
|
constants;
|
|
118
118
|
startSpongeBlob;
|
|
119
119
|
timestamp;
|
|
120
|
-
|
|
120
|
+
newL1ToL2MessageSubtreeRootSiblingPath;
|
|
121
121
|
newArchiveSiblingPath;
|
|
122
122
|
constructor(/**
|
|
123
123
|
* The original and converted roots of the L1 to L2 messages subtrees.
|
|
@@ -133,8 +133,8 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
133
133
|
*/ startSpongeBlob, /**
|
|
134
134
|
* The timestamp of this block.
|
|
135
135
|
*/ timestamp, /**
|
|
136
|
-
* Hint for inserting the new l1 to l2 message subtree.
|
|
137
|
-
*/
|
|
136
|
+
* Hint for inserting the new l1 to l2 message subtree root.
|
|
137
|
+
*/ newL1ToL2MessageSubtreeRootSiblingPath, /**
|
|
138
138
|
* Hint for inserting the new block hash to the last archive.
|
|
139
139
|
*/ newArchiveSiblingPath){
|
|
140
140
|
this.l1ToL2Roots = l1ToL2Roots;
|
|
@@ -143,7 +143,7 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
143
143
|
this.constants = constants;
|
|
144
144
|
this.startSpongeBlob = startSpongeBlob;
|
|
145
145
|
this.timestamp = timestamp;
|
|
146
|
-
this.
|
|
146
|
+
this.newL1ToL2MessageSubtreeRootSiblingPath = newL1ToL2MessageSubtreeRootSiblingPath;
|
|
147
147
|
this.newArchiveSiblingPath = newArchiveSiblingPath;
|
|
148
148
|
}
|
|
149
149
|
static from(fields) {
|
|
@@ -157,7 +157,7 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
157
157
|
fields.constants,
|
|
158
158
|
fields.startSpongeBlob,
|
|
159
159
|
fields.timestamp,
|
|
160
|
-
fields.
|
|
160
|
+
fields.newL1ToL2MessageSubtreeRootSiblingPath,
|
|
161
161
|
fields.newArchiveSiblingPath
|
|
162
162
|
];
|
|
163
163
|
}
|
|
@@ -169,13 +169,13 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
169
169
|
this.constants,
|
|
170
170
|
this.startSpongeBlob,
|
|
171
171
|
bigintToUInt64BE(this.timestamp),
|
|
172
|
-
this.
|
|
172
|
+
this.newL1ToL2MessageSubtreeRootSiblingPath,
|
|
173
173
|
this.newArchiveSiblingPath
|
|
174
174
|
]);
|
|
175
175
|
}
|
|
176
176
|
static fromBuffer(buffer) {
|
|
177
177
|
const reader = BufferReader.asReader(buffer);
|
|
178
|
-
return new BlockRootEmptyTxFirstRollupPrivateInputs(ProofData.fromBuffer(reader, ParityPublicInputs), AppendOnlyTreeSnapshot.fromBuffer(reader), StateReference.fromBuffer(reader), CheckpointConstantData.fromBuffer(reader), SpongeBlob.fromBuffer(reader), reader.readUInt64(), reader.readArray(
|
|
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_ROOT_SIBLING_PATH_LENGTH, Fr), reader.readArray(ARCHIVE_HEIGHT, Fr));
|
|
179
179
|
}
|
|
180
180
|
toJSON() {
|
|
181
181
|
return this.toBuffer();
|
package/dest/rollup/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export * from './public_tx_base_rollup_private_inputs.js';
|
|
|
15
15
|
export * from './public_tube_private_inputs.js';
|
|
16
16
|
export * from './root_rollup_private_inputs.js';
|
|
17
17
|
export * from './root_rollup_public_inputs.js';
|
|
18
|
-
export * from './
|
|
18
|
+
export * from './tree_snapshot_diff_hints.js';
|
|
19
19
|
export * from './tx_merge_rollup_private_inputs.js';
|
|
20
20
|
export * from './tx_rollup_public_inputs.js';
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rollup/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rollup/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC"}
|
package/dest/rollup/index.js
CHANGED
|
@@ -15,6 +15,6 @@ export * from './public_tx_base_rollup_private_inputs.js';
|
|
|
15
15
|
export * from './public_tube_private_inputs.js';
|
|
16
16
|
export * from './root_rollup_private_inputs.js';
|
|
17
17
|
export * from './root_rollup_public_inputs.js';
|
|
18
|
-
export * from './
|
|
18
|
+
export * from './tree_snapshot_diff_hints.js';
|
|
19
19
|
export * from './tx_merge_rollup_private_inputs.js';
|
|
20
20
|
export * from './tx_rollup_public_inputs.js';
|
|
@@ -2,7 +2,7 @@ import { BufferReader } from '@aztec/foundation/serialize';
|
|
|
2
2
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
3
|
import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
|
|
4
4
|
import { type RollupHonkProofData } from '../proofs/proof_data.js';
|
|
5
|
-
import { AvmProofData } from './avm_proof_data.js';
|
|
5
|
+
import type { AvmProofData } from './avm_proof_data.js';
|
|
6
6
|
import { PublicBaseRollupHints } from './base_rollup_hints.js';
|
|
7
7
|
export declare class PublicTxBaseRollupPrivateInputs {
|
|
8
8
|
publicTubeProofData: RollupHonkProofData<PrivateToPublicKernelCircuitPublicInputs>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public_tx_base_rollup_private_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/public_tx_base_rollup_private_inputs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"public_tx_base_rollup_private_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/public_tx_base_rollup_private_inputs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAAE,wCAAwC,EAAE,MAAM,6DAA6D,CAAC;AACvH,OAAO,EAAa,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,qBAAa,+BAA+B;IAEjC,mBAAmB,EAAE,mBAAmB,CAAC,wCAAwC,CAAC;IAClF,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,qBAAqB;gBAF5B,mBAAmB,EAAE,mBAAmB,CAAC,wCAAwC,CAAC,EAClF,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,qBAAqB;IAGrC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,+BAA+B,CAAC,GAAG,+BAA+B;IAI/F,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,+BAA+B,CAAC;IAIlE,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,+BAA+B;IASjF,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,QAAQ;IAIR,uDAAuD;IACvD,MAAM;IAIN,yCAAyC;IACzC,MAAM,KAAK,MAAM,wEAEhB;CACF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
2
2
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
3
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
4
|
+
import { AvmCircuitPublicInputs } from '../avm/avm_circuit_public_inputs.js';
|
|
4
5
|
import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
|
|
5
6
|
import { ProofData } from '../proofs/proof_data.js';
|
|
6
|
-
import { AvmProofData } from './avm_proof_data.js';
|
|
7
7
|
import { PublicBaseRollupHints } from './base_rollup_hints.js';
|
|
8
8
|
export class PublicTxBaseRollupPrivateInputs {
|
|
9
9
|
publicTubeProofData;
|
|
@@ -26,7 +26,7 @@ export class PublicTxBaseRollupPrivateInputs {
|
|
|
26
26
|
}
|
|
27
27
|
static fromBuffer(buffer) {
|
|
28
28
|
const reader = BufferReader.asReader(buffer);
|
|
29
|
-
return new PublicTxBaseRollupPrivateInputs(ProofData.fromBuffer(reader, PrivateToPublicKernelCircuitPublicInputs),
|
|
29
|
+
return new PublicTxBaseRollupPrivateInputs(ProofData.fromBuffer(reader, PrivateToPublicKernelCircuitPublicInputs), ProofData.fromBuffer(reader, AvmCircuitPublicInputs), reader.readObject(PublicBaseRollupHints));
|
|
30
30
|
}
|
|
31
31
|
toBuffer() {
|
|
32
32
|
return serializeToBuffer(...PublicTxBaseRollupPrivateInputs.getFields(this));
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { MAX_NULLIFIERS_PER_TX,
|
|
1
|
+
import { MAX_NULLIFIERS_PER_TX, NOTE_HASH_SUBTREE_ROOT_SIBLING_PATH_LENGTH, NULLIFIER_SUBTREE_ROOT_SIBLING_PATH_LENGTH, NULLIFIER_TREE_HEIGHT, PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
|
|
4
4
|
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
5
5
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
6
|
-
import { NullifierLeafPreimage
|
|
6
|
+
import { NullifierLeafPreimage } from '../trees/index.js';
|
|
7
7
|
/**
|
|
8
8
|
* Hints used while proving state diff validity for the private base rollup.
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class TreeSnapshotDiffHints {
|
|
11
|
+
/**
|
|
12
|
+
* Sibling path "pointing to" where the new note hash subtree should be inserted into the note hash tree.
|
|
13
|
+
*/
|
|
14
|
+
noteHashSubtreeRootSiblingPath: Tuple<Fr, typeof NOTE_HASH_SUBTREE_ROOT_SIBLING_PATH_LENGTH>;
|
|
11
15
|
/**
|
|
12
16
|
* The nullifiers which need to be updated to perform the batch insertion of the new nullifiers.
|
|
13
17
|
* See `StandardIndexedTree.batchInsert` function for more details.
|
|
@@ -26,27 +30,19 @@ export declare class PrivateBaseStateDiffHints {
|
|
|
26
30
|
* The indexes of the sorted nullifiers to the original ones.
|
|
27
31
|
*/
|
|
28
32
|
sortedNullifierIndexes: Tuple<number, typeof MAX_NULLIFIERS_PER_TX>;
|
|
29
|
-
/**
|
|
30
|
-
* Sibling path "pointing to" where the new note hash subtree should be inserted into the note hash tree.
|
|
31
|
-
*/
|
|
32
|
-
noteHashSubtreeSiblingPath: Tuple<Fr, typeof NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH>;
|
|
33
33
|
/**
|
|
34
34
|
* Sibling path "pointing to" where the new nullifiers subtree should be inserted into the nullifier tree.
|
|
35
35
|
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Low leaf for the fee write in the public data tree.
|
|
39
|
-
*/
|
|
40
|
-
feeWriteLowLeafPreimage: PublicDataTreeLeafPreimage;
|
|
36
|
+
nullifierSubtreeRootSiblingPath: Tuple<Fr, typeof NULLIFIER_SUBTREE_ROOT_SIBLING_PATH_LENGTH>;
|
|
41
37
|
/**
|
|
42
|
-
* Membership witness for the
|
|
38
|
+
* Membership witness for the fee payer's balance leaf in the public data tree.
|
|
43
39
|
*/
|
|
44
|
-
|
|
40
|
+
feePayerBalanceMembershipWitness: MembershipWitness<typeof PUBLIC_DATA_TREE_HEIGHT>;
|
|
41
|
+
constructor(
|
|
45
42
|
/**
|
|
46
|
-
* Sibling path "pointing to" where the
|
|
43
|
+
* Sibling path "pointing to" where the new note hash subtree should be inserted into the note hash tree.
|
|
47
44
|
*/
|
|
48
|
-
|
|
49
|
-
constructor(
|
|
45
|
+
noteHashSubtreeRootSiblingPath: Tuple<Fr, typeof NOTE_HASH_SUBTREE_ROOT_SIBLING_PATH_LENGTH>,
|
|
50
46
|
/**
|
|
51
47
|
* The nullifiers which need to be updated to perform the batch insertion of the new nullifiers.
|
|
52
48
|
* See `StandardIndexedTree.batchInsert` function for more details.
|
|
@@ -65,28 +61,16 @@ export declare class PrivateBaseStateDiffHints {
|
|
|
65
61
|
* The indexes of the sorted nullifiers to the original ones.
|
|
66
62
|
*/
|
|
67
63
|
sortedNullifierIndexes: Tuple<number, typeof MAX_NULLIFIERS_PER_TX>,
|
|
68
|
-
/**
|
|
69
|
-
* Sibling path "pointing to" where the new note hash subtree should be inserted into the note hash tree.
|
|
70
|
-
*/
|
|
71
|
-
noteHashSubtreeSiblingPath: Tuple<Fr, typeof NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH>,
|
|
72
64
|
/**
|
|
73
65
|
* Sibling path "pointing to" where the new nullifiers subtree should be inserted into the nullifier tree.
|
|
74
66
|
*/
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Low leaf for the fee write in the public data tree.
|
|
78
|
-
*/
|
|
79
|
-
feeWriteLowLeafPreimage: PublicDataTreeLeafPreimage,
|
|
80
|
-
/**
|
|
81
|
-
* Membership witness for the low leaf for the fee write in the public data tree.
|
|
82
|
-
*/
|
|
83
|
-
feeWriteLowLeafMembershipWitness: MembershipWitness<typeof PUBLIC_DATA_TREE_HEIGHT>,
|
|
67
|
+
nullifierSubtreeRootSiblingPath: Tuple<Fr, typeof NULLIFIER_SUBTREE_ROOT_SIBLING_PATH_LENGTH>,
|
|
84
68
|
/**
|
|
85
|
-
*
|
|
69
|
+
* Membership witness for the fee payer's balance leaf in the public data tree.
|
|
86
70
|
*/
|
|
87
|
-
|
|
88
|
-
static from(fields: FieldsOf<
|
|
89
|
-
static getFields(fields: FieldsOf<
|
|
71
|
+
feePayerBalanceMembershipWitness: MembershipWitness<typeof PUBLIC_DATA_TREE_HEIGHT>);
|
|
72
|
+
static from(fields: FieldsOf<TreeSnapshotDiffHints>): TreeSnapshotDiffHints;
|
|
73
|
+
static getFields(fields: FieldsOf<TreeSnapshotDiffHints>): readonly [[Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr], [NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage, NullifierLeafPreimage], [MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>, MembershipWitness<40>], [Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr], [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number], [Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr, Fr], MembershipWitness<40>];
|
|
90
74
|
/**
|
|
91
75
|
* Serializes the state diff hints to a buffer.
|
|
92
76
|
* @returns A buffer of the serialized state diff hints.
|
|
@@ -95,9 +79,9 @@ export declare class PrivateBaseStateDiffHints {
|
|
|
95
79
|
/**
|
|
96
80
|
* Deserializes the state diff hints from a buffer.
|
|
97
81
|
* @param buffer - A buffer to deserialize from.
|
|
98
|
-
* @returns A new
|
|
82
|
+
* @returns A new TreeSnapshotDiffHints instance.
|
|
99
83
|
*/
|
|
100
|
-
static fromBuffer(buffer: Buffer | BufferReader):
|
|
101
|
-
static empty():
|
|
84
|
+
static fromBuffer(buffer: Buffer | BufferReader): TreeSnapshotDiffHints;
|
|
85
|
+
static empty(): TreeSnapshotDiffHints;
|
|
102
86
|
}
|
|
103
|
-
//# sourceMappingURL=
|
|
87
|
+
//# sourceMappingURL=tree_snapshot_diff_hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree_snapshot_diff_hints.d.ts","sourceRoot":"","sources":["../../src/rollup/tree_snapshot_diff_hints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,0CAA0C,EAC1C,0CAA0C,EAC1C,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAqB,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;GAEG;AACH,qBAAa,qBAAqB;IAE9B;;OAEG;IACI,8BAA8B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,0CAA0C,CAAC;IACnG;;;OAGG;IACI,6BAA6B,EAAE,KAAK,CAAC,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;IAChG;;;OAGG;IACI,uCAAuC,EAAE,KAAK,CACnD,iBAAiB,CAAC,OAAO,qBAAqB,CAAC,EAC/C,OAAO,qB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