@aztec/stdlib 0.0.1-commit.54489865 → 0.0.1-commit.592b9384
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/database-version/database_version.d.ts +58 -0
- package/dest/database-version/database_version.d.ts.map +1 -0
- package/dest/database-version/database_version.js +69 -0
- package/dest/database-version/version_manager.d.ts +2 -50
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +1 -66
- package/dest/interfaces/aztec-node-admin.d.ts +2 -2
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +3 -1
- package/dest/interfaces/aztec-node.d.ts +29 -50
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +2 -6
- package/dest/interfaces/block-builder.d.ts +8 -3
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +7 -0
- package/dest/interfaces/validator.d.ts +27 -1
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/keys/derivation.d.ts +3 -3
- package/dest/keys/derivation.js +8 -8
- package/dest/keys/key_types.d.ts +1 -1
- package/dest/keys/utils.d.ts +1 -1
- package/dest/keys/utils.d.ts.map +1 -1
- package/dest/keys/utils.js +7 -3
- package/dest/l1-contracts/slash_factory.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +1 -0
- package/dest/stats/stats.d.ts +1 -3
- package/dest/stats/stats.d.ts.map +1 -1
- package/package.json +11 -10
- package/src/database-version/database_version.ts +87 -0
- package/src/database-version/version_manager.ts +1 -77
- package/src/interfaces/aztec-node-admin.ts +3 -2
- package/src/interfaces/aztec-node.ts +35 -86
- package/src/interfaces/block-builder.ts +10 -2
- package/src/keys/derivation.ts +8 -8
- package/src/keys/key_types.ts +1 -1
- package/src/keys/utils.ts +7 -3
- package/src/l1-contracts/slash_factory.ts +1 -0
- package/src/stats/stats.ts +0 -2
- package/dest/database-version/index.d.ts +0 -2
- package/dest/database-version/index.d.ts.map +0 -1
- package/dest/database-version/index.js +0 -1
- package/src/database-version/index.ts +0 -1
|
@@ -52,7 +52,8 @@ export interface AztecNodeAdmin {
|
|
|
52
52
|
getSlashOffenses(round: bigint | 'all' | 'current'): Promise<Offense[]>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
// L1 contracts are not mutable via admin updates.
|
|
56
|
+
export type AztecNodeAdminConfig = Omit<ValidatorClientFullConfig, 'l1Contracts'> &
|
|
56
57
|
SequencerConfig &
|
|
57
58
|
ProverConfig &
|
|
58
59
|
SlasherConfig &
|
|
@@ -65,7 +66,7 @@ export type AztecNodeAdminConfig = ValidatorClientFullConfig &
|
|
|
65
66
|
|
|
66
67
|
export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConfigSchema)
|
|
67
68
|
.merge(SlasherConfigSchema)
|
|
68
|
-
.merge(ValidatorClientFullConfigSchema)
|
|
69
|
+
.merge(ValidatorClientFullConfigSchema.omit({ l1Contracts: true }))
|
|
69
70
|
.merge(
|
|
70
71
|
ArchiverSpecificConfigSchema.pick({
|
|
71
72
|
archiverPollingIntervalMS: true,
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ARCHIVE_HEIGHT,
|
|
3
|
-
L1_TO_L2_MSG_TREE_HEIGHT,
|
|
4
|
-
NOTE_HASH_TREE_HEIGHT,
|
|
5
|
-
NULLIFIER_TREE_HEIGHT,
|
|
6
|
-
PUBLIC_DATA_TREE_HEIGHT,
|
|
7
|
-
} from '@aztec/constants';
|
|
1
|
+
import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
|
|
8
2
|
import { type L1ContractAddresses, L1ContractAddressesSchema } from '@aztec/ethereum/l1-contract-addresses';
|
|
9
3
|
import {
|
|
10
4
|
BlockNumber,
|
|
@@ -93,63 +87,31 @@ export interface AztecNode
|
|
|
93
87
|
/**
|
|
94
88
|
* Find the indexes of the given leaves in the given tree along with a block metadata pointing to the block in which
|
|
95
89
|
* the leaves were inserted.
|
|
96
|
-
* @param
|
|
90
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
97
91
|
* @param treeId - The tree to search in.
|
|
98
92
|
* @param leafValues - The values to search for.
|
|
99
93
|
* @returns The indices of leaves and the block metadata of a block in which the leaves were inserted.
|
|
100
94
|
*/
|
|
101
95
|
findLeavesIndexes(
|
|
102
|
-
|
|
96
|
+
referenceBlock: BlockParameter,
|
|
103
97
|
treeId: MerkleTreeId,
|
|
104
98
|
leafValues: Fr[],
|
|
105
99
|
): Promise<(DataInBlock<bigint> | undefined)[]>;
|
|
106
100
|
|
|
107
|
-
/**
|
|
108
|
-
* Returns a sibling path for the given index in the nullifier tree.
|
|
109
|
-
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
110
|
-
* @param leafIndex - The index of the leaf for which the sibling path is required.
|
|
111
|
-
* @returns The sibling path for the leaf index.
|
|
112
|
-
*/
|
|
113
|
-
getNullifierSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Returns a sibling path for the given index in the note hash tree.
|
|
117
|
-
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
118
|
-
* @param leafIndex - The index of the leaf for which the sibling path is required.
|
|
119
|
-
* @returns The sibling path for the leaf index.
|
|
120
|
-
*/
|
|
121
|
-
getNoteHashSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Returns a sibling path for a leaf in the committed historic blocks tree.
|
|
125
|
-
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
126
|
-
* @param leafIndex - Index of the leaf in the tree.
|
|
127
|
-
* @returns The sibling path.
|
|
128
|
-
*/
|
|
129
|
-
getArchiveSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof ARCHIVE_HEIGHT>>;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Returns a sibling path for a leaf in the committed public data tree.
|
|
133
|
-
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
134
|
-
* @param leafIndex - Index of the leaf in the tree.
|
|
135
|
-
* @returns The sibling path.
|
|
136
|
-
*/
|
|
137
|
-
getPublicDataSiblingPath(
|
|
138
|
-
block: BlockParameter,
|
|
139
|
-
leafIndex: bigint,
|
|
140
|
-
): Promise<SiblingPath<typeof PUBLIC_DATA_TREE_HEIGHT>>;
|
|
141
|
-
|
|
142
101
|
/**
|
|
143
102
|
* Returns a nullifier membership witness for a given nullifier at a given block.
|
|
144
|
-
* @param
|
|
103
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
145
104
|
* @param nullifier - Nullifier we try to find witness for.
|
|
146
105
|
* @returns The nullifier membership witness (if found).
|
|
147
106
|
*/
|
|
148
|
-
getNullifierMembershipWitness(
|
|
107
|
+
getNullifierMembershipWitness(
|
|
108
|
+
referenceBlock: BlockParameter,
|
|
109
|
+
nullifier: Fr,
|
|
110
|
+
): Promise<NullifierMembershipWitness | undefined>;
|
|
149
111
|
|
|
150
112
|
/**
|
|
151
113
|
* Returns a low nullifier membership witness for a given nullifier at a given block.
|
|
152
|
-
* @param
|
|
114
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
153
115
|
* @param nullifier - Nullifier we try to find the low nullifier witness for.
|
|
154
116
|
* @returns The low nullifier membership witness (if found).
|
|
155
117
|
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
@@ -157,49 +119,56 @@ export interface AztecNode
|
|
|
157
119
|
* we are trying to prove non-inclusion for.
|
|
158
120
|
*/
|
|
159
121
|
getLowNullifierMembershipWitness(
|
|
160
|
-
|
|
122
|
+
referenceBlock: BlockParameter,
|
|
161
123
|
nullifier: Fr,
|
|
162
124
|
): Promise<NullifierMembershipWitness | undefined>;
|
|
163
125
|
|
|
164
126
|
/**
|
|
165
127
|
* Returns a public data tree witness for a given leaf slot at a given block.
|
|
166
|
-
* @param
|
|
128
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
167
129
|
* @param leafSlot - The leaf slot we try to find the witness for.
|
|
168
130
|
* @returns The public data witness (if found).
|
|
169
131
|
* @remarks The witness can be used to compute the current value of the public data tree leaf. If the low leaf preimage corresponds to an
|
|
170
132
|
* "in range" slot, means that the slot doesn't exist and the value is 0. If the low leaf preimage corresponds to the exact slot, the current value
|
|
171
133
|
* is contained in the leaf preimage.
|
|
172
134
|
*/
|
|
173
|
-
getPublicDataWitness(
|
|
135
|
+
getPublicDataWitness(referenceBlock: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
174
136
|
|
|
175
137
|
/**
|
|
176
|
-
* Returns a membership witness for a given
|
|
177
|
-
*
|
|
178
|
-
*
|
|
138
|
+
* Returns a membership witness for a given block hash in the archive tree.
|
|
139
|
+
*
|
|
140
|
+
* Block hashes are the leaves of the archive tree. Each time a new block is added to the chain,
|
|
141
|
+
* its block hash is appended as a new leaf to the archive tree. This method finds the membership
|
|
142
|
+
* witness (leaf index and sibling path) for a given block hash, which can be used to prove that
|
|
143
|
+
* a specific block exists in the chain's history.
|
|
144
|
+
*
|
|
145
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data
|
|
146
|
+
* (which contains the root of the archive tree in which we are searching for the block hash).
|
|
147
|
+
* @param blockHash - The block hash to find in the archive tree.
|
|
179
148
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
149
|
+
getBlockHashMembershipWitness(
|
|
150
|
+
referenceBlock: BlockParameter,
|
|
151
|
+
blockHash: BlockHash,
|
|
183
152
|
): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
|
|
184
153
|
|
|
185
154
|
/**
|
|
186
155
|
* Returns a membership witness for a given note hash at a given block.
|
|
187
|
-
* @param
|
|
156
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
188
157
|
* @param noteHash - The note hash we try to find the witness for.
|
|
189
158
|
*/
|
|
190
159
|
getNoteHashMembershipWitness(
|
|
191
|
-
|
|
160
|
+
referenceBlock: BlockParameter,
|
|
192
161
|
noteHash: Fr,
|
|
193
162
|
): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
|
|
194
163
|
|
|
195
164
|
/**
|
|
196
165
|
* Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.
|
|
197
|
-
* @param
|
|
166
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
198
167
|
* @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
|
|
199
168
|
* @returns A tuple of the index and the sibling path of the L1ToL2Message (undefined if not found).
|
|
200
169
|
*/
|
|
201
170
|
getL1ToL2MessageMembershipWitness(
|
|
202
|
-
|
|
171
|
+
referenceBlock: BlockParameter,
|
|
203
172
|
l1ToL2Message: Fr,
|
|
204
173
|
): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
|
|
205
174
|
|
|
@@ -224,10 +193,10 @@ export interface AztecNode
|
|
|
224
193
|
|
|
225
194
|
/**
|
|
226
195
|
* Get a block specified by its block number or 'latest'.
|
|
227
|
-
* @param
|
|
196
|
+
* @param blockParameter - The block parameter (block number, block hash, or 'latest').
|
|
228
197
|
* @returns The requested block.
|
|
229
198
|
*/
|
|
230
|
-
getBlock(
|
|
199
|
+
getBlock(blockParameter: BlockParameter): Promise<L2Block | undefined>;
|
|
231
200
|
|
|
232
201
|
/**
|
|
233
202
|
* Get a block specified by its hash.
|
|
@@ -433,12 +402,12 @@ export interface AztecNode
|
|
|
433
402
|
* @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
|
|
434
403
|
* Aztec's version of `eth_getStorageAt`.
|
|
435
404
|
*
|
|
436
|
-
* @param
|
|
405
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
437
406
|
* @param contract - Address of the contract to query.
|
|
438
407
|
* @param slot - Slot to query.
|
|
439
408
|
* @returns Storage value at the given contract slot.
|
|
440
409
|
*/
|
|
441
|
-
getPublicStorageAt(
|
|
410
|
+
getPublicStorageAt(referenceBlock: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
|
|
442
411
|
|
|
443
412
|
/**
|
|
444
413
|
* Returns the block header for a given block number, block hash, or 'latest'.
|
|
@@ -518,26 +487,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
518
487
|
.args(BlockParameterSchema, z.nativeEnum(MerkleTreeId), z.array(schemas.Fr).max(MAX_RPC_LEN))
|
|
519
488
|
.returns(z.array(optional(dataInBlockSchemaFor(schemas.BigInt)))),
|
|
520
489
|
|
|
521
|
-
getNullifierSiblingPath: z
|
|
522
|
-
.function()
|
|
523
|
-
.args(BlockParameterSchema, schemas.BigInt)
|
|
524
|
-
.returns(SiblingPath.schemaFor(NULLIFIER_TREE_HEIGHT)),
|
|
525
|
-
|
|
526
|
-
getNoteHashSiblingPath: z
|
|
527
|
-
.function()
|
|
528
|
-
.args(BlockParameterSchema, schemas.BigInt)
|
|
529
|
-
.returns(SiblingPath.schemaFor(NOTE_HASH_TREE_HEIGHT)),
|
|
530
|
-
|
|
531
|
-
getArchiveSiblingPath: z
|
|
532
|
-
.function()
|
|
533
|
-
.args(BlockParameterSchema, schemas.BigInt)
|
|
534
|
-
.returns(SiblingPath.schemaFor(ARCHIVE_HEIGHT)),
|
|
535
|
-
|
|
536
|
-
getPublicDataSiblingPath: z
|
|
537
|
-
.function()
|
|
538
|
-
.args(BlockParameterSchema, schemas.BigInt)
|
|
539
|
-
.returns(SiblingPath.schemaFor(PUBLIC_DATA_TREE_HEIGHT)),
|
|
540
|
-
|
|
541
490
|
getNullifierMembershipWitness: z
|
|
542
491
|
.function()
|
|
543
492
|
.args(BlockParameterSchema, schemas.Fr)
|
|
@@ -553,9 +502,9 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
553
502
|
.args(BlockParameterSchema, schemas.Fr)
|
|
554
503
|
.returns(PublicDataWitness.schema.optional()),
|
|
555
504
|
|
|
556
|
-
|
|
505
|
+
getBlockHashMembershipWitness: z
|
|
557
506
|
.function()
|
|
558
|
-
.args(BlockParameterSchema,
|
|
507
|
+
.args(BlockParameterSchema, BlockHash.schema)
|
|
559
508
|
.returns(MembershipWitness.schemaFor(ARCHIVE_HEIGHT).optional()),
|
|
560
509
|
|
|
561
510
|
getNoteHashMembershipWitness: z
|
|
@@ -62,8 +62,16 @@ export const FullNodeBlockBuilderConfigKeys: (keyof FullNodeBlockBuilderConfig)[
|
|
|
62
62
|
'fakeThrowAfterProcessingTxCount',
|
|
63
63
|
] as const;
|
|
64
64
|
|
|
65
|
+
/** Thrown when no valid transactions are available to include in a block after processing, and this is not the first block in a checkpoint. */
|
|
66
|
+
export class NoValidTxsError extends Error {
|
|
67
|
+
constructor(public readonly failedTxs: FailedTx[]) {
|
|
68
|
+
super('No valid transactions to include in block');
|
|
69
|
+
this.name = 'NoValidTxsError';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
65
73
|
/** Result of building a block within a checkpoint. */
|
|
66
|
-
export
|
|
74
|
+
export type BuildBlockInCheckpointResult = {
|
|
67
75
|
block: L2Block;
|
|
68
76
|
publicGas: Gas;
|
|
69
77
|
publicProcessorDuration: number;
|
|
@@ -71,7 +79,7 @@ export interface BuildBlockInCheckpointResult {
|
|
|
71
79
|
failedTxs: FailedTx[];
|
|
72
80
|
usedTxs: Tx[];
|
|
73
81
|
usedTxBlobFields: number;
|
|
74
|
-
}
|
|
82
|
+
};
|
|
75
83
|
|
|
76
84
|
/** Interface for building blocks within a checkpoint context. */
|
|
77
85
|
export interface ICheckpointBlockBuilder {
|
package/src/keys/derivation.ts
CHANGED
|
@@ -10,8 +10,8 @@ import type { KeyPrefix } from './key_types.js';
|
|
|
10
10
|
import { PublicKeys } from './public_keys.js';
|
|
11
11
|
import { getKeyGenerator } from './utils.js';
|
|
12
12
|
|
|
13
|
-
export function
|
|
14
|
-
return computeAppSecretKey(
|
|
13
|
+
export function computeAppNullifierHidingKey(masterNullifierHidingKey: GrumpkinScalar, app: AztecAddress): Promise<Fr> {
|
|
14
|
+
return computeAppSecretKey(masterNullifierHidingKey, app, 'n'); // 'n' is the key prefix for nullifier hiding key
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export function computeAppSecretKey(skM: GrumpkinScalar, app: AztecAddress, keyPrefix: KeyPrefix): Promise<Fr> {
|
|
@@ -26,8 +26,8 @@ export async function computeOvskApp(ovsk: GrumpkinScalar, app: AztecAddress): P
|
|
|
26
26
|
return GrumpkinScalar.fromBuffer(ovskAppFr.toBuffer());
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export function
|
|
30
|
-
return sha512ToGrumpkinScalar([secretKey, GeneratorIndex.
|
|
29
|
+
export function deriveMasterNullifierHidingKey(secretKey: Fr): GrumpkinScalar {
|
|
30
|
+
return sha512ToGrumpkinScalar([secretKey, GeneratorIndex.NHK_M]);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export function deriveMasterIncomingViewingSecretKey(secretKey: Fr): GrumpkinScalar {
|
|
@@ -93,15 +93,15 @@ export function derivePublicKeyFromSecretKey(secretKey: Fq) {
|
|
|
93
93
|
* @returns The derived keys.
|
|
94
94
|
*/
|
|
95
95
|
export async function deriveKeys(secretKey: Fr) {
|
|
96
|
-
// First we derive master secret keys - we use sha512 here because this derivation will never take place
|
|
96
|
+
// First we derive master secret/hiding keys - we use sha512 here because this derivation will never take place
|
|
97
97
|
// in a circuit
|
|
98
|
-
const
|
|
98
|
+
const masterNullifierHidingKey = deriveMasterNullifierHidingKey(secretKey);
|
|
99
99
|
const masterIncomingViewingSecretKey = deriveMasterIncomingViewingSecretKey(secretKey);
|
|
100
100
|
const masterOutgoingViewingSecretKey = deriveMasterOutgoingViewingSecretKey(secretKey);
|
|
101
101
|
const masterTaggingSecretKey = sha512ToGrumpkinScalar([secretKey, GeneratorIndex.TSK_M]);
|
|
102
102
|
|
|
103
103
|
// Then we derive master public keys
|
|
104
|
-
const masterNullifierPublicKey = await derivePublicKeyFromSecretKey(
|
|
104
|
+
const masterNullifierPublicKey = await derivePublicKeyFromSecretKey(masterNullifierHidingKey);
|
|
105
105
|
const masterIncomingViewingPublicKey = await derivePublicKeyFromSecretKey(masterIncomingViewingSecretKey);
|
|
106
106
|
const masterOutgoingViewingPublicKey = await derivePublicKeyFromSecretKey(masterOutgoingViewingSecretKey);
|
|
107
107
|
const masterTaggingPublicKey = await derivePublicKeyFromSecretKey(masterTaggingSecretKey);
|
|
@@ -115,7 +115,7 @@ export async function deriveKeys(secretKey: Fr) {
|
|
|
115
115
|
);
|
|
116
116
|
|
|
117
117
|
return {
|
|
118
|
-
|
|
118
|
+
masterNullifierHidingKey,
|
|
119
119
|
masterIncomingViewingSecretKey,
|
|
120
120
|
masterOutgoingViewingSecretKey,
|
|
121
121
|
masterTaggingSecretKey,
|
package/src/keys/key_types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GeneratorIndex } from '@aztec/constants';
|
|
2
2
|
|
|
3
|
-
export type KeyGenerator = GeneratorIndex.
|
|
3
|
+
export type KeyGenerator = GeneratorIndex.NHK_M | GeneratorIndex.IVSK_M | GeneratorIndex.OVSK_M | GeneratorIndex.TSK_M;
|
|
4
4
|
export type KeyPrefix = 'n' | 'iv' | 'ov' | 't';
|
|
5
5
|
export const KEY_PREFIXES: KeyPrefix[] = ['n', 'iv', 'ov', 't'];
|
package/src/keys/utils.ts
CHANGED
|
@@ -3,7 +3,11 @@ import { GeneratorIndex } from '@aztec/constants';
|
|
|
3
3
|
import type { KeyGenerator, KeyPrefix } from './key_types.js';
|
|
4
4
|
|
|
5
5
|
export function getKeyGenerator(prefix: KeyPrefix): KeyGenerator {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const map: Record<KeyPrefix, KeyGenerator> = {
|
|
7
|
+
n: GeneratorIndex.NHK_M,
|
|
8
|
+
iv: GeneratorIndex.IVSK_M,
|
|
9
|
+
ov: GeneratorIndex.OVSK_M,
|
|
10
|
+
t: GeneratorIndex.TSK_M,
|
|
11
|
+
};
|
|
12
|
+
return map[prefix];
|
|
9
13
|
}
|
package/src/stats/stats.ts
CHANGED
|
@@ -202,8 +202,6 @@ export type L2BlockBuiltStats = {
|
|
|
202
202
|
duration: number;
|
|
203
203
|
/** Time for processing public txs in ms. */
|
|
204
204
|
publicProcessDuration: number;
|
|
205
|
-
/** Time for running rollup circuits in ms. */
|
|
206
|
-
rollupCircuitsDuration: number;
|
|
207
205
|
} & L2BlockStats;
|
|
208
206
|
|
|
209
207
|
/** Stats for an L2 block processed by the world state synchronizer. */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './version_manager.js';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kYXRhYmFzZS12ZXJzaW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsc0JBQXNCLENBQUMifQ==
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-version/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './version_manager.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './version_manager.js';
|