@aztec/constants 4.0.4-rc.5 → 4.0.4-rc.6

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.
@@ -5,7 +5,11 @@ export * from './constants.gen.js';
5
5
  /** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */
6
6
  export declare const INITIAL_L2_BLOCK_NUM: BlockNumber;
7
7
  /** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */
8
- export declare const INITIAL_L2_CHECKPOINT_NUM: CheckpointNumber;
8
+ export declare const INITIAL_CHECKPOINT_NUMBER: CheckpointNumber;
9
9
  /** The block header hash for the genesis block 0. */
10
10
  export declare const GENESIS_BLOCK_HEADER_HASH: Fr;
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNoRixPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFXcEQsZUFBTyxNQUFNLGtCQUFrQixRQUFZLENBQUM7QUFJNUMsY0FBYyxvQkFBb0IsQ0FBQztBQUVuQyxnSEFBZ0g7QUFHaEgsZUFBTyxNQUFNLG9CQUFvQixFQUFFLFdBQW1ELENBQUM7QUFFdkYsK0hBQStIO0FBRy9ILGVBQU8sTUFBTSx5QkFBeUIsRUFBRSxnQkFBK0QsQ0FBQztBQUV4RyxxREFBcUQ7QUFHckQsZUFBTyxNQUFNLHlCQUF5QixJQUEyQyxDQUFDIn0=
11
+ export declare const DEFAULT_L2_GAS_LIMIT = 6540000;
12
+ export declare const DEFAULT_TEARDOWN_L2_GAS_LIMIT: number;
13
+ export declare const DEFAULT_DA_GAS_LIMIT: number;
14
+ export declare const DEFAULT_TEARDOWN_DA_GAS_LIMIT: number;
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNoRixPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFhcEQsZUFBTyxNQUFNLGtCQUFrQixRQUFZLENBQUM7QUFJNUMsY0FBYyxvQkFBb0IsQ0FBQztBQUVuQyxnSEFBZ0g7QUFFaEgsZUFBTyxNQUFNLG9CQUFvQixFQUFFLFdBQW1ELENBQUM7QUFFdkYsK0hBQStIO0FBRS9ILGVBQU8sTUFBTSx5QkFBeUIsRUFBRSxnQkFBK0QsQ0FBQztBQUV4RyxxREFBcUQ7QUFFckQsZUFBTyxNQUFNLHlCQUF5QixJQUEyQyxDQUFDO0FBS2xGLGVBQU8sTUFBTSxvQkFBb0IsVUFBeUIsQ0FBQztBQUUzRCxlQUFPLE1BQU0sNkJBQTZCLFFBQTJCLENBQUM7QUFFdEUsZUFBTyxNQUFNLG9CQUFvQixRQUE0QyxDQUFDO0FBRTlFLGVBQU8sTUFBTSw2QkFBNkIsUUFBMkIsQ0FBQyJ9
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAWpD,eAAO,MAAM,kBAAkB,QAAY,CAAC;AAI5C,cAAc,oBAAoB,CAAC;AAEnC,gHAAgH;AAGhH,eAAO,MAAM,oBAAoB,EAAE,WAAmD,CAAC;AAEvF,+HAA+H;AAG/H,eAAO,MAAM,yBAAyB,EAAE,gBAA+D,CAAC;AAExG,qDAAqD;AAGrD,eAAO,MAAM,yBAAyB,IAA2C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAapD,eAAO,MAAM,kBAAkB,QAAY,CAAC;AAI5C,cAAc,oBAAoB,CAAC;AAEnC,gHAAgH;AAEhH,eAAO,MAAM,oBAAoB,EAAE,WAAmD,CAAC;AAEvF,+HAA+H;AAE/H,eAAO,MAAM,yBAAyB,EAAE,gBAA+D,CAAC;AAExG,qDAAqD;AAErD,eAAO,MAAM,yBAAyB,IAA2C,CAAC;AAKlF,eAAO,MAAM,oBAAoB,UAAyB,CAAC;AAE3D,eAAO,MAAM,6BAA6B,QAA2B,CAAC;AAEtE,eAAO,MAAM,oBAAoB,QAA4C,CAAC;AAE9E,eAAO,MAAM,6BAA6B,QAA2B,CAAC"}
package/dest/constants.js CHANGED
@@ -2,17 +2,25 @@ import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
2
  import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  // Re-export L2 block number constants with proper BlockNumber type
4
4
  // Note: The generated constants are plain numbers, but we provide typed versions here
5
- import { GENESIS_BLOCK_HEADER_HASH as GENESIS_BLOCK_HEADER_HASH_BIGINT, INITIAL_CHECKPOINT_NUMBER as INITIAL_CHECKPOINT_NUM_RAW, INITIAL_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW } from './constants.gen.js';
5
+ import { GENESIS_BLOCK_HEADER_HASH as GENESIS_BLOCK_HEADER_HASH_BIGINT, INITIAL_CHECKPOINT_NUMBER as INITIAL_CHECKPOINT_NUM_RAW, INITIAL_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW, MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT, MAX_PROCESSABLE_L2_GAS } from './constants.gen.js';
6
6
  // Typescript-land-only constants
7
7
  export const SPONSORED_FPC_SALT = BigInt(0);
8
8
  // Autogenerated constants loaded from noir-land
9
9
  // eslint-disable-next-line import-x/export
10
10
  export * from './constants.gen.js';
11
- /** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */ // Shadow the export from constants.gen above
12
- // eslint-disable-next-line import-x/export
11
+ /** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */ // eslint-disable-next-line import-x/export
13
12
  export const INITIAL_L2_BLOCK_NUM = BlockNumber(INITIAL_L2_BLOCK_NUM_RAW);
14
- /** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */ // Shadow the export from constants.gen above
15
- export const INITIAL_L2_CHECKPOINT_NUM = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
16
- /** The block header hash for the genesis block 0. */ // Shadow the export from constants.gen above
17
- // eslint-disable-next-line import-x/export
13
+ /** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */ // eslint-disable-next-line import-x/export
14
+ export const INITIAL_CHECKPOINT_NUMBER = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
15
+ /** The block header hash for the genesis block 0. */ // eslint-disable-next-line import-x/export
18
16
  export const GENESIS_BLOCK_HEADER_HASH = new Fr(GENESIS_BLOCK_HEADER_HASH_BIGINT);
17
+ // Override the default gas limits set in noir-protocol-circuit constants with saner ones
18
+ // 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.
19
+ // eslint-disable-next-line import-x/export
20
+ export const DEFAULT_L2_GAS_LIMIT = MAX_PROCESSABLE_L2_GAS;
21
+ // eslint-disable-next-line import-x/export
22
+ export const DEFAULT_TEARDOWN_L2_GAS_LIMIT = DEFAULT_L2_GAS_LIMIT / 8;
23
+ // eslint-disable-next-line import-x/export
24
+ export const DEFAULT_DA_GAS_LIMIT = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT / 4;
25
+ // eslint-disable-next-line import-x/export
26
+ export const DEFAULT_TEARDOWN_DA_GAS_LIMIT = DEFAULT_DA_GAS_LIMIT / 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/constants",
3
- "version": "4.0.4-rc.5",
3
+ "version": "4.0.4-rc.6",
4
4
  "type": "module",
5
5
  "inherits": [
6
6
  "../package.common.json"
@@ -23,7 +23,7 @@
23
23
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
24
24
  },
25
25
  "dependencies": {
26
- "@aztec/foundation": "4.0.4-rc.5",
26
+ "@aztec/foundation": "4.0.4-rc.6",
27
27
  "tslib": "^2.4.0"
28
28
  },
29
29
  "devDependencies": {
package/src/constants.ts CHANGED
@@ -7,6 +7,8 @@ import {
7
7
  GENESIS_BLOCK_HEADER_HASH as GENESIS_BLOCK_HEADER_HASH_BIGINT,
8
8
  INITIAL_CHECKPOINT_NUMBER as INITIAL_CHECKPOINT_NUM_RAW,
9
9
  INITIAL_L2_BLOCK_NUM as INITIAL_L2_BLOCK_NUM_RAW,
10
+ MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT,
11
+ MAX_PROCESSABLE_L2_GAS,
10
12
  } from './constants.gen.js';
11
13
 
12
14
  // Typescript-land-only constants
@@ -17,16 +19,24 @@ export const SPONSORED_FPC_SALT = BigInt(0);
17
19
  export * from './constants.gen.js';
18
20
 
19
21
  /** The initial L2 block number (typed as BlockNumber). This is the first block number in the Aztec L2 chain. */
20
- // Shadow the export from constants.gen above
21
22
  // eslint-disable-next-line import-x/export
22
23
  export const INITIAL_L2_BLOCK_NUM: BlockNumber = BlockNumber(INITIAL_L2_BLOCK_NUM_RAW);
23
24
 
24
25
  /** The initial L2 checkpoint number (typed as CheckpointNumber). This is the first checkpoint number in the Aztec L2 chain. */
25
- // Shadow the export from constants.gen above
26
-
27
- export const INITIAL_L2_CHECKPOINT_NUM: CheckpointNumber = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
26
+ // eslint-disable-next-line import-x/export
27
+ export const INITIAL_CHECKPOINT_NUMBER: CheckpointNumber = CheckpointNumber(INITIAL_CHECKPOINT_NUM_RAW);
28
28
 
29
29
  /** The block header hash for the genesis block 0. */
30
- // Shadow the export from constants.gen above
31
30
  // eslint-disable-next-line import-x/export
32
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;