@aztec/constants 0.0.0-test.0 → 0.0.1-commit.001888fc
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/constants.d.ts +14 -2
- package/dest/constants.d.ts.map +1 -1
- package/dest/constants.gen.d.ts +450 -312
- package/dest/constants.gen.d.ts.map +1 -1
- package/dest/constants.gen.js +451 -313
- package/dest/constants.js +23 -1
- package/dest/scripts/constants.in.d.ts +1 -1
- package/dest/scripts/constants.in.js +316 -141
- package/package.json +24 -13
- package/src/constants.gen.ts +450 -318
- package/src/constants.ts +38 -1
package/src/constants.ts
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
|
+
import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
|
|
4
|
+
// Re-export L2 block number constants with proper BlockNumber type
|
|
5
|
+
// Note: The generated constants are plain numbers, but we provide typed versions here
|
|
6
|
+
import {
|
|
7
|
+
GENESIS_BLOCK_HEADER_HASH as GENESIS_BLOCK_HEADER_HASH_BIGINT,
|
|
8
|
+
INITIAL_CHECKPOINT_NUMBER as INITIAL_CHECKPOINT_NUM_RAW,
|
|
9
|
+
INITIAL_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW,
|
|
10
|
+
MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT,
|
|
11
|
+
MAX_PROCESSABLE_L2_GAS,
|
|
12
|
+
} from './constants.gen.js';
|
|
13
|
+
|
|
1
14
|
// Typescript-land-only constants
|
|
2
|
-
export const
|
|
15
|
+
export const SPONSORED_FPC_SALT = BigInt(0);
|
|
3
16
|
|
|
4
17
|
// Autogenerated constants loaded from noir-land
|
|
18
|
+
// eslint-disable-next-line import-x/export
|
|
5
19
|
export * from './constants.gen.js';
|
|
20
|
+
|
|
21
|
+
/** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */
|
|
22
|
+
// eslint-disable-next-line import-x/export
|
|
23
|
+
export const INITIAL_L2_BLOCK_NUM: BlockNumber = BlockNumber(INITIAL_L2_BLOCK_NUM_RAW);
|
|
24
|
+
|
|
25
|
+
/** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */
|
|
26
|
+
// eslint-disable-next-line import-x/export
|
|
27
|
+
export const INITIAL_CHECKPOINT_NUMBER: CheckpointNumber = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
|
|
28
|
+
|
|
29
|
+
/** The block header hash for the genesis block 0. */
|
|
30
|
+
// eslint-disable-next-line import-x/export
|
|
31
|
+
export const GENESIS_BLOCK_HEADER_HASH = new Fr(GENESIS_BLOCK_HEADER_HASH_BIGINT);
|
|
32
|
+
|
|
33
|
+
// Override the default gas limits set in noir-protocol-circuit constants with saner ones
|
|
34
|
+
// Note that these values are not used in noir-land and are only for use in TypeScript code, so we can set them to whatever we want.
|
|
35
|
+
// eslint-disable-next-line import-x/export
|
|
36
|
+
export const DEFAULT_L2_GAS_LIMIT = MAX_PROCESSABLE_L2_GAS;
|
|
37
|
+
// eslint-disable-next-line import-x/export
|
|
38
|
+
export const DEFAULT_TEARDOWN_L2_GAS_LIMIT = DEFAULT_L2_GAS_LIMIT / 8;
|
|
39
|
+
// eslint-disable-next-line import-x/export
|
|
40
|
+
export const DEFAULT_DA_GAS_LIMIT = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT / 4;
|
|
41
|
+
// eslint-disable-next-line import-x/export
|
|
42
|
+
export const DEFAULT_TEARDOWN_DA_GAS_LIMIT = DEFAULT_DA_GAS_LIMIT / 2;
|