@aztec/foundation 0.0.1-commit.96bb3f7 → 0.0.1-commit.993d240
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/array/sorted_array.d.ts +6 -1
- package/dest/array/sorted_array.d.ts.map +1 -1
- package/dest/array/sorted_array.js +18 -15
- package/dest/bigint-buffer/index.d.ts +1 -1
- package/dest/bigint-buffer/index.d.ts.map +1 -1
- package/dest/bigint-buffer/index.js +6 -1
- package/dest/branded-types/block_number.d.ts +6 -3
- package/dest/branded-types/block_number.d.ts.map +1 -1
- package/dest/branded-types/block_number.js +18 -4
- package/dest/branded-types/buffer32_hash.d.ts +27 -0
- package/dest/branded-types/buffer32_hash.d.ts.map +1 -0
- package/dest/branded-types/buffer32_hash.js +12 -0
- package/dest/branded-types/checkpoint_number.d.ts +9 -3
- package/dest/branded-types/checkpoint_number.d.ts.map +1 -1
- package/dest/branded-types/checkpoint_number.js +11 -0
- package/dest/branded-types/epoch.d.ts +2 -2
- package/dest/branded-types/epoch.d.ts.map +1 -1
- package/dest/branded-types/index.d.ts +3 -1
- package/dest/branded-types/index.d.ts.map +1 -1
- package/dest/branded-types/index.js +2 -0
- package/dest/branded-types/index_within_checkpoint.d.ts +42 -0
- package/dest/branded-types/index_within_checkpoint.d.ts.map +1 -0
- package/dest/branded-types/index_within_checkpoint.js +59 -0
- package/dest/branded-types/slot.d.ts +5 -2
- package/dest/branded-types/slot.d.ts.map +1 -1
- package/dest/branded-types/slot.js +3 -0
- package/dest/buffer/buffer16.d.ts +6 -1
- package/dest/buffer/buffer16.d.ts.map +1 -1
- package/dest/buffer/buffer32.d.ts +28 -58
- package/dest/buffer/buffer32.d.ts.map +1 -1
- package/dest/buffer/buffer32.js +29 -63
- package/dest/buffer/index.d.ts +2 -1
- package/dest/buffer/index.d.ts.map +1 -1
- package/dest/buffer/index.js +1 -0
- package/dest/buffer/utils.d.ts +3 -0
- package/dest/buffer/utils.d.ts.map +1 -0
- package/dest/buffer/utils.js +7 -0
- package/dest/collection/array.d.ts +22 -1
- package/dest/collection/array.d.ts.map +1 -1
- package/dest/collection/array.js +84 -0
- package/dest/collection/index.d.ts +3 -1
- package/dest/collection/index.d.ts.map +1 -1
- package/dest/collection/index.js +2 -0
- package/dest/collection/lru_map.d.ts +41 -0
- package/dest/collection/lru_map.d.ts.map +1 -0
- package/dest/collection/lru_map.js +119 -0
- package/dest/collection/lru_set.d.ts +35 -0
- package/dest/collection/lru_set.d.ts.map +1 -0
- package/dest/collection/lru_set.js +95 -0
- package/dest/committable/committable.js +1 -1
- package/dest/config/env_var.d.ts +2 -2
- package/dest/config/env_var.d.ts.map +1 -1
- package/dest/config/index.d.ts +50 -29
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +57 -43
- package/dest/config/network_config.d.ts +15 -41
- package/dest/config/network_config.d.ts.map +1 -1
- package/dest/config/network_config.js +4 -1
- package/dest/config/network_name.d.ts +2 -2
- package/dest/config/network_name.d.ts.map +1 -1
- package/dest/config/network_name.js +2 -2
- package/dest/config/secret_value.d.ts +2 -2
- package/dest/config/secret_value.d.ts.map +1 -1
- package/dest/crypto/aes128/index.d.ts +2 -1
- package/dest/crypto/aes128/index.d.ts.map +1 -1
- package/dest/crypto/aes128/index.js +11 -2
- package/dest/crypto/bls/bn254_keystore.d.ts +9 -176
- package/dest/crypto/bls/bn254_keystore.d.ts.map +1 -1
- package/dest/crypto/bls/bn254_keystore.js +0 -17
- package/dest/crypto/ecdsa/signature.d.ts +10 -1
- package/dest/crypto/ecdsa/signature.d.ts.map +1 -1
- package/dest/crypto/poseidon/index.d.ts +1 -2
- package/dest/crypto/poseidon/index.d.ts.map +1 -1
- package/dest/crypto/poseidon/index.js +40 -42
- package/dest/crypto/random/randomness_singleton.d.ts +4 -3
- package/dest/crypto/random/randomness_singleton.d.ts.map +1 -1
- package/dest/crypto/random/randomness_singleton.js +4 -4
- package/dest/crypto/schnorr/index.d.ts +8 -7
- package/dest/crypto/schnorr/index.d.ts.map +1 -1
- package/dest/crypto/schnorr/index.js +6 -6
- package/dest/crypto/schnorr/signature.d.ts +9 -29
- package/dest/crypto/schnorr/signature.d.ts.map +1 -1
- package/dest/crypto/schnorr/signature.js +20 -36
- package/dest/crypto/secp256k1-signer/utils.d.ts +12 -1
- package/dest/crypto/secp256k1-signer/utils.d.ts.map +1 -1
- package/dest/crypto/secp256k1-signer/utils.js +26 -0
- package/dest/crypto/sync/poseidon/index.d.ts +1 -2
- package/dest/crypto/sync/poseidon/index.d.ts.map +1 -1
- package/dest/crypto/sync/poseidon/index.js +0 -8
- package/dest/curves/bls12/field.d.ts +3 -3
- package/dest/curves/bls12/field.d.ts.map +1 -1
- package/dest/curves/bls12/field.js +0 -5
- package/dest/curves/bls12/point.d.ts +11 -2
- package/dest/curves/bls12/point.d.ts.map +1 -1
- package/dest/curves/bn254/field.d.ts +24 -19
- package/dest/curves/bn254/field.d.ts.map +1 -1
- package/dest/curves/bn254/field.js +28 -19
- package/dest/curves/grumpkin/point.d.ts +21 -26
- package/dest/curves/grumpkin/point.d.ts.map +1 -1
- package/dest/curves/grumpkin/point.js +29 -43
- package/dest/error/index.d.ts +4 -4
- package/dest/error/index.d.ts.map +1 -1
- package/dest/eth-address/index.d.ts +2 -2
- package/dest/eth-address/index.d.ts.map +1 -1
- package/dest/eth-address/index.js +0 -3
- package/dest/eth-signature/eth_signature.d.ts +6 -2
- package/dest/eth-signature/eth_signature.d.ts.map +1 -1
- package/dest/eth-signature/eth_signature.js +7 -2
- package/dest/fifo/fifo_frame_reader.d.ts +41 -0
- package/dest/fifo/fifo_frame_reader.d.ts.map +1 -0
- package/dest/fifo/fifo_frame_reader.js +74 -0
- package/dest/fifo/index.d.ts +2 -0
- package/dest/fifo/index.d.ts.map +1 -0
- package/dest/fifo/index.js +1 -0
- package/dest/fifo_set/fifo_set.d.ts +15 -0
- package/dest/fifo_set/fifo_set.d.ts.map +1 -0
- package/dest/fifo_set/fifo_set.js +39 -0
- package/dest/fifo_set/index.d.ts +2 -0
- package/dest/fifo_set/index.d.ts.map +1 -0
- package/dest/fifo_set/index.js +1 -0
- package/dest/jest/setup.js +28 -1
- package/dest/json-rpc/client/fetch.d.ts +1 -1
- package/dest/json-rpc/client/fetch.d.ts.map +1 -1
- package/dest/json-rpc/client/fetch.js +4 -3
- package/dest/json-rpc/client/safe_json_rpc_client.d.ts +2 -1
- package/dest/json-rpc/client/safe_json_rpc_client.d.ts.map +1 -1
- package/dest/json-rpc/client/safe_json_rpc_client.js +3 -3
- package/dest/json-rpc/client/undici.d.ts +1 -1
- package/dest/json-rpc/client/undici.d.ts.map +1 -1
- package/dest/json-rpc/client/undici.js +23 -4
- package/dest/json-rpc/fixtures/class_a.d.ts +3 -3
- package/dest/json-rpc/fixtures/class_a.d.ts.map +1 -1
- package/dest/json-rpc/fixtures/class_b.d.ts +3 -3
- package/dest/json-rpc/fixtures/class_b.d.ts.map +1 -1
- package/dest/json-rpc/fixtures/test_state.d.ts +4 -8
- package/dest/json-rpc/fixtures/test_state.d.ts.map +1 -1
- package/dest/json-rpc/fixtures/test_state.js +57 -17
- package/dest/json-rpc/server/api_key_auth.d.ts +19 -0
- package/dest/json-rpc/server/api_key_auth.d.ts.map +1 -0
- package/dest/json-rpc/server/api_key_auth.js +57 -0
- package/dest/json-rpc/server/index.d.ts +2 -1
- package/dest/json-rpc/server/index.d.ts.map +1 -1
- package/dest/json-rpc/server/index.js +1 -0
- package/dest/json-rpc/server/safe_json_rpc_server.d.ts +8 -3
- package/dest/json-rpc/server/safe_json_rpc_server.d.ts.map +1 -1
- package/dest/json-rpc/server/safe_json_rpc_server.js +28 -14
- package/dest/log/bigint-utils.d.ts +5 -0
- package/dest/log/bigint-utils.d.ts.map +1 -0
- package/dest/log/bigint-utils.js +21 -0
- package/dest/log/gcloud-logger-config.d.ts +1 -1
- package/dest/log/gcloud-logger-config.d.ts.map +1 -1
- package/dest/log/gcloud-logger-config.js +3 -0
- package/dest/log/libp2p_logger.d.ts +5 -2
- package/dest/log/libp2p_logger.d.ts.map +1 -1
- package/dest/log/libp2p_logger.js +14 -4
- package/dest/log/log-filters.d.ts +17 -4
- package/dest/log/log-filters.d.ts.map +1 -1
- package/dest/log/log-filters.js +26 -12
- package/dest/log/pino-logger-server.d.ts +9 -0
- package/dest/log/pino-logger-server.d.ts.map +1 -0
- package/dest/log/pino-logger-server.js +18 -0
- package/dest/log/pino-logger.d.ts +37 -8
- package/dest/log/pino-logger.d.ts.map +1 -1
- package/dest/log/pino-logger.js +137 -29
- package/dest/noir/noir_package_config.d.ts +19 -104
- package/dest/noir/noir_package_config.d.ts.map +1 -1
- package/dest/noir/noir_package_config.js +1 -1
- package/dest/queue/base_memory_queue.d.ts +2 -2
- package/dest/queue/base_memory_queue.d.ts.map +1 -1
- package/dest/queue/batch_queue.d.ts +1 -1
- package/dest/queue/batch_queue.d.ts.map +1 -1
- package/dest/queue/batch_queue.js +1 -0
- package/dest/queue/semaphore.d.ts +5 -1
- package/dest/queue/semaphore.d.ts.map +1 -1
- package/dest/retry/index.d.ts +22 -1
- package/dest/retry/index.d.ts.map +1 -1
- package/dest/retry/index.js +32 -0
- package/dest/schemas/api.d.ts +12 -10
- package/dest/schemas/api.d.ts.map +1 -1
- package/dest/schemas/api.js +7 -1
- package/dest/schemas/parse.d.ts +4 -4
- package/dest/schemas/parse.d.ts.map +1 -1
- package/dest/schemas/parse.js +6 -5
- package/dest/schemas/schemas.d.ts +15 -15
- package/dest/schemas/types.d.ts +3 -3
- package/dest/schemas/types.d.ts.map +1 -1
- package/dest/schemas/utils.d.ts +7 -11
- package/dest/schemas/utils.d.ts.map +1 -1
- package/dest/schemas/utils.js +2 -18
- package/dest/serialize/buffer_reader.d.ts +14 -4
- package/dest/serialize/buffer_reader.d.ts.map +1 -1
- package/dest/serialize/buffer_reader.js +26 -4
- package/dest/serialize/buffer_sink.d.ts +134 -0
- package/dest/serialize/buffer_sink.d.ts.map +1 -0
- package/dest/serialize/buffer_sink.js +297 -0
- package/dest/serialize/index.d.ts +2 -1
- package/dest/serialize/index.d.ts.map +1 -1
- package/dest/serialize/index.js +1 -0
- package/dest/serialize/serialize.d.ts +19 -1
- package/dest/serialize/serialize.d.ts.map +1 -1
- package/dest/serialize/serialize.js +31 -0
- package/dest/sleep/index.d.ts +2 -1
- package/dest/sleep/index.d.ts.map +1 -1
- package/dest/sleep/index.js +10 -1
- package/dest/string/index.js +1 -1
- package/dest/timer/date.d.ts +25 -1
- package/dest/timer/date.d.ts.map +1 -1
- package/dest/timer/date.js +33 -0
- package/dest/timer/index.d.ts +2 -2
- package/dest/timer/index.d.ts.map +1 -1
- package/dest/timer/index.js +1 -1
- package/dest/timer/timeout.d.ts +3 -1
- package/dest/timer/timeout.d.ts.map +1 -1
- package/dest/timer/timeout.js +26 -0
- package/dest/transport/dispatch/create_dispatch_proxy.d.ts +11 -2
- package/dest/transport/dispatch/create_dispatch_proxy.d.ts.map +1 -1
- package/dest/transport/index.d.ts +1 -2
- package/dest/transport/index.d.ts.map +1 -1
- package/dest/transport/index.js +0 -1
- package/dest/transport/transport_client.js +2 -2
- package/dest/trees/balanced_merkle_tree_root.d.ts +16 -0
- package/dest/trees/balanced_merkle_tree_root.d.ts.map +1 -0
- package/dest/trees/{balanced_merkle_tree.js → balanced_merkle_tree_root.js} +3 -19
- package/dest/trees/hasher.d.ts +4 -1
- package/dest/trees/hasher.d.ts.map +1 -1
- package/dest/trees/hasher.js +10 -5
- package/dest/trees/index.d.ts +4 -4
- package/dest/trees/index.d.ts.map +1 -1
- package/dest/trees/index.js +3 -3
- package/dest/trees/indexed_merkle_tree_calculator.d.ts +1 -1
- package/dest/trees/indexed_merkle_tree_calculator.d.ts.map +1 -1
- package/dest/trees/indexed_merkle_tree_calculator.js +5 -1
- package/dest/trees/membership_witness.d.ts +12 -2
- package/dest/trees/membership_witness.d.ts.map +1 -1
- package/dest/trees/membership_witness.js +9 -0
- package/dest/trees/merkle_tree_calculator.d.ts +4 -2
- package/dest/trees/merkle_tree_calculator.d.ts.map +1 -1
- package/dest/trees/merkle_tree_calculator.js +1 -5
- package/dest/trees/sibling_path.d.ts +6 -4
- package/dest/trees/sibling_path.d.ts.map +1 -1
- package/dest/trees/sibling_path.js +10 -8
- package/dest/trees/unbalanced_merkle_tree_calculator.d.ts +2 -2
- package/dest/trees/unbalanced_merkle_tree_calculator.d.ts.map +1 -1
- package/dest/trees/unbalanced_merkle_tree_calculator.js +1 -1
- package/dest/trees/{unbalanced_merkle_tree.d.ts → unbalanced_merkle_tree_root.d.ts} +4 -9
- package/dest/trees/unbalanced_merkle_tree_root.d.ts.map +1 -0
- package/dest/trees/{unbalanced_merkle_tree.js → unbalanced_merkle_tree_root.js} +9 -54
- package/dest/trees/unbalanced_tree_store.d.ts +5 -1
- package/dest/trees/unbalanced_tree_store.d.ts.map +1 -1
- package/dest/trees/unbalanced_tree_store.js +49 -1
- package/dest/types/index.d.ts +12 -2
- package/dest/types/index.d.ts.map +1 -1
- package/dest/types/index.js +3 -0
- package/package.json +29 -6
- package/src/array/sorted_array.ts +22 -17
- package/src/bigint-buffer/index.ts +6 -1
- package/src/branded-types/block_number.ts +25 -2
- package/src/branded-types/buffer32_hash.ts +38 -0
- package/src/branded-types/checkpoint_number.ts +16 -1
- package/src/branded-types/epoch.ts +1 -1
- package/src/branded-types/index.ts +2 -0
- package/src/branded-types/index_within_checkpoint.ts +88 -0
- package/src/branded-types/slot.ts +6 -1
- package/src/buffer/buffer16.ts +3 -0
- package/src/buffer/buffer32.ts +39 -68
- package/src/buffer/index.ts +1 -0
- package/src/buffer/utils.ts +8 -0
- package/src/collection/array.ts +86 -0
- package/src/collection/index.ts +2 -0
- package/src/collection/lru_map.ts +143 -0
- package/src/collection/lru_set.ts +115 -0
- package/src/committable/committable.ts +1 -1
- package/src/config/env_var.ts +84 -28
- package/src/config/index.ts +132 -95
- package/src/config/network_config.ts +3 -0
- package/src/config/network_name.ts +4 -4
- package/src/config/secret_value.ts +1 -1
- package/src/crypto/aes128/index.ts +11 -2
- package/src/crypto/bls/bn254_keystore.ts +0 -23
- package/src/crypto/poseidon/index.ts +42 -44
- package/src/crypto/random/randomness_singleton.ts +9 -5
- package/src/crypto/schnorr/index.ts +9 -8
- package/src/crypto/schnorr/signature.ts +17 -46
- package/src/crypto/secp256k1-signer/utils.ts +32 -0
- package/src/crypto/sync/poseidon/index.ts +0 -9
- package/src/curves/bls12/field.ts +0 -7
- package/src/curves/bn254/field.ts +41 -36
- package/src/curves/grumpkin/point.ts +23 -40
- package/src/eth-address/index.ts +0 -4
- package/src/eth-signature/eth_signature.ts +7 -1
- package/src/fifo/fifo_frame_reader.ts +98 -0
- package/src/fifo/index.ts +1 -0
- package/src/fifo_set/fifo_set.ts +52 -0
- package/src/fifo_set/index.ts +1 -0
- package/src/jest/setup.mjs +31 -1
- package/src/json-rpc/client/fetch.ts +4 -3
- package/src/json-rpc/client/safe_json_rpc_client.ts +4 -2
- package/src/json-rpc/client/undici.ts +23 -3
- package/src/json-rpc/fixtures/test_state.ts +10 -10
- package/src/json-rpc/server/api_key_auth.ts +63 -0
- package/src/json-rpc/server/index.ts +1 -0
- package/src/json-rpc/server/safe_json_rpc_server.ts +32 -14
- package/src/log/bigint-utils.ts +25 -0
- package/src/log/gcloud-logger-config.ts +5 -0
- package/src/log/libp2p_logger.ts +12 -5
- package/src/log/log-filters.ts +29 -11
- package/src/log/pino-logger-server.ts +25 -0
- package/src/log/pino-logger.ts +160 -39
- package/src/noir/noir_package_config.ts +32 -20
- package/src/queue/base_memory_queue.ts +1 -1
- package/src/queue/batch_queue.ts +1 -0
- package/src/queue/semaphore.ts +5 -0
- package/src/retry/index.ts +48 -0
- package/src/schemas/api.ts +25 -25
- package/src/schemas/parse.ts +9 -6
- package/src/schemas/schemas.ts +4 -4
- package/src/schemas/types.ts +2 -2
- package/src/schemas/utils.ts +4 -38
- package/src/serialize/buffer_reader.ts +36 -9
- package/src/serialize/buffer_sink.ts +350 -0
- package/src/serialize/index.ts +1 -0
- package/src/serialize/serialize.ts +32 -0
- package/src/sleep/index.ts +10 -1
- package/src/string/index.ts +1 -1
- package/src/timer/date.ts +48 -0
- package/src/timer/index.ts +1 -1
- package/src/timer/timeout.ts +31 -0
- package/src/transport/dispatch/create_dispatch_proxy.ts +11 -1
- package/src/transport/index.ts +0 -1
- package/src/transport/transport_client.ts +2 -2
- package/src/trees/{balanced_merkle_tree.ts → balanced_merkle_tree_root.ts} +3 -22
- package/src/trees/hasher.ts +12 -0
- package/src/trees/index.ts +3 -3
- package/src/trees/indexed_merkle_tree_calculator.ts +5 -1
- package/src/trees/membership_witness.ts +8 -0
- package/src/trees/merkle_tree_calculator.ts +4 -10
- package/src/trees/sibling_path.ts +11 -6
- package/src/trees/unbalanced_merkle_tree_calculator.ts +1 -2
- package/src/trees/{unbalanced_merkle_tree.ts → unbalanced_merkle_tree_root.ts} +9 -70
- package/src/trees/unbalanced_tree_store.ts +57 -2
- package/src/types/index.ts +20 -1
- package/dest/crypto/serialize.d.ts +0 -51
- package/dest/crypto/serialize.d.ts.map +0 -1
- package/dest/crypto/serialize.js +0 -68
- package/dest/transport/dispatch/create_dispatch_fn.d.ts +0 -25
- package/dest/transport/dispatch/create_dispatch_fn.d.ts.map +0 -1
- package/dest/transport/dispatch/create_dispatch_fn.js +0 -17
- package/dest/trees/balanced_merkle_tree.d.ts +0 -22
- package/dest/trees/balanced_merkle_tree.d.ts.map +0 -1
- package/dest/trees/unbalanced_merkle_tree.d.ts.map +0 -1
- package/src/crypto/serialize.ts +0 -85
- package/src/transport/dispatch/create_dispatch_fn.ts +0 -35
package/src/config/env_var.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
export type EnvVar =
|
|
2
2
|
| 'REGISTRY_CONTRACT_ADDRESS'
|
|
3
3
|
| 'FEE_ASSET_HANDLER_CONTRACT_ADDRESS'
|
|
4
|
-
| 'SLASH_FACTORY_CONTRACT_ADDRESS'
|
|
5
4
|
| 'ACVM_BINARY_PATH'
|
|
6
5
|
| 'ACVM_WORKING_DIRECTORY'
|
|
7
6
|
| 'API_KEY'
|
|
8
7
|
| 'API_PREFIX'
|
|
9
|
-
| 'ARCHIVER_MAX_LOGS'
|
|
10
8
|
| 'ARCHIVER_POLLING_INTERVAL_MS'
|
|
9
|
+
| 'ARCHIVER_SKIP_HISTORICAL_LOGS_CHECK'
|
|
11
10
|
| 'ARCHIVER_URL'
|
|
12
11
|
| 'ARCHIVER_VIEM_POLLING_INTERVAL_MS'
|
|
13
12
|
| 'ARCHIVER_BATCH_SIZE'
|
|
13
|
+
| 'ARCHIVER_ORPHAN_PROPOSED_BLOCK_PRUNE_GRACE_SECONDS'
|
|
14
14
|
| 'AZTEC_ADMIN_PORT'
|
|
15
|
+
| 'AZTEC_NODE_DEBUG'
|
|
16
|
+
| 'AZTEC_ADMIN_API_KEY_HASH'
|
|
17
|
+
| 'AZTEC_DISABLE_ADMIN_API_KEY'
|
|
18
|
+
| 'AZTEC_RESET_ADMIN_API_KEY'
|
|
15
19
|
| 'AZTEC_NODE_ADMIN_URL'
|
|
16
20
|
| 'AZTEC_NODE_URL'
|
|
17
21
|
| 'AZTEC_PORT'
|
|
@@ -20,6 +24,9 @@ export type EnvVar =
|
|
|
20
24
|
| 'BB_WORKING_DIRECTORY'
|
|
21
25
|
| 'BB_NUM_IVC_VERIFIERS'
|
|
22
26
|
| 'BB_IVC_CONCURRENCY'
|
|
27
|
+
| 'BB_CHONK_VERIFY_MAX_BATCH'
|
|
28
|
+
| 'BB_CHONK_VERIFY_BATCH_CONCURRENCY'
|
|
29
|
+
| 'BB_DEBUG_OUTPUT_DIR'
|
|
23
30
|
| 'BOOTSTRAP_NODES'
|
|
24
31
|
| 'BLOB_ARCHIVE_API_URL'
|
|
25
32
|
| 'BLOB_FILE_STORE_URLS'
|
|
@@ -47,7 +54,10 @@ export type EnvVar =
|
|
|
47
54
|
| 'BOT_TX_MINED_WAIT_SECONDS'
|
|
48
55
|
| 'BOT_MAX_CONSECUTIVE_ERRORS'
|
|
49
56
|
| 'BOT_STOP_WHEN_UNHEALTHY'
|
|
50
|
-
| '
|
|
57
|
+
| 'BOT_MODE'
|
|
58
|
+
| 'BOT_L2_TO_L1_MESSAGES_PER_TX'
|
|
59
|
+
| 'BOT_L1_TO_L2_SEED_COUNT'
|
|
60
|
+
| 'BOT_L1_TO_L2_SEED_INTERVAL'
|
|
51
61
|
| 'COINBASE'
|
|
52
62
|
| 'CRS_PATH'
|
|
53
63
|
| 'DATA_DIRECTORY'
|
|
@@ -56,6 +66,7 @@ export type EnvVar =
|
|
|
56
66
|
| 'BLOB_SINK_MAP_SIZE_KB'
|
|
57
67
|
| 'P2P_STORE_MAP_SIZE_KB'
|
|
58
68
|
| 'PROVER_BROKER_STORE_MAP_SIZE_KB'
|
|
69
|
+
| 'SIGNING_PROTECTION_MAP_SIZE_KB'
|
|
59
70
|
| 'WS_DB_MAP_SIZE_KB'
|
|
60
71
|
| 'ARCHIVE_TREE_MAP_SIZE_KB'
|
|
61
72
|
| 'NULLIFIER_TREE_MAP_SIZE_KB'
|
|
@@ -64,6 +75,8 @@ export type EnvVar =
|
|
|
64
75
|
| 'PUBLIC_DATA_TREE_MAP_SIZE_KB'
|
|
65
76
|
| 'DEBUG'
|
|
66
77
|
| 'DEBUG_P2P_DISABLE_COLOCATION_PENALTY'
|
|
78
|
+
| 'ENABLE_PROVER_NODE'
|
|
79
|
+
| 'USE_AUTOMINE_SEQUENCER'
|
|
67
80
|
| 'ETHEREUM_HOSTS'
|
|
68
81
|
| 'ETHEREUM_DEBUG_HOSTS'
|
|
69
82
|
| 'ETHEREUM_ALLOW_NO_DEBUG_HOSTS'
|
|
@@ -73,28 +86,37 @@ export type EnvVar =
|
|
|
73
86
|
| 'KEY_STORE_DIRECTORY'
|
|
74
87
|
| 'L1_CHAIN_ID'
|
|
75
88
|
| 'L1_CONSENSUS_HOST_URLS'
|
|
89
|
+
| 'ETHEREUM_HTTP_TIMEOUT_MS'
|
|
76
90
|
| 'L1_CONSENSUS_HOST_API_KEYS'
|
|
77
91
|
| 'L1_CONSENSUS_HOST_API_KEY_HEADERS'
|
|
92
|
+
| 'L1_TX_FAILED_STORE'
|
|
78
93
|
| 'LOG_JSON'
|
|
79
94
|
| 'LOG_MULTILINE'
|
|
95
|
+
| 'LOG_NO_COLOR_PER_ACTOR'
|
|
80
96
|
| 'LOG_LEVEL'
|
|
81
97
|
| 'MNEMONIC'
|
|
82
98
|
| 'NETWORK'
|
|
83
99
|
| 'NETWORK_CONFIG_LOCATION'
|
|
84
|
-
| 'NO_PXE'
|
|
85
100
|
| 'USE_GCLOUD_LOGGING'
|
|
86
101
|
| 'OTEL_EXPORTER_OTLP_METRICS_ENDPOINT'
|
|
87
102
|
| 'OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'
|
|
88
103
|
| 'OTEL_EXPORTER_OTLP_LOGS_ENDPOINT'
|
|
89
104
|
| 'OTEL_COLLECT_INTERVAL_MS'
|
|
105
|
+
| 'OTEL_BSP_MAX_QUEUE_SIZE'
|
|
90
106
|
| 'OTEL_EXCLUDE_METRICS'
|
|
91
107
|
| 'OTEL_INCLUDE_METRICS'
|
|
108
|
+
| 'OTEL_MIN_TRACE_DURATION_MS'
|
|
92
109
|
| 'OTEL_EXPORT_TIMEOUT_MS'
|
|
93
110
|
| 'PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT'
|
|
94
111
|
| 'PUBLIC_OTEL_INCLUDE_METRICS'
|
|
95
112
|
| 'PUBLIC_OTEL_COLLECT_FROM'
|
|
96
113
|
| 'PUBLIC_OTEL_OPT_OUT'
|
|
114
|
+
| 'P2P_BATCH_TX_REQUESTER_SMART_PARALLEL_WORKER_COUNT'
|
|
115
|
+
| 'P2P_BATCH_TX_REQUESTER_DUMB_PARALLEL_WORKER_COUNT'
|
|
116
|
+
| 'P2P_BATCH_TX_REQUESTER_TX_BATCH_SIZE'
|
|
117
|
+
| 'P2P_BATCH_TX_REQUESTER_BAD_PEER_THRESHOLD'
|
|
97
118
|
| 'P2P_BLOCK_CHECK_INTERVAL_MS'
|
|
119
|
+
| 'P2P_SLOT_CHECK_INTERVAL_MS'
|
|
98
120
|
| 'P2P_BLOCK_REQUEST_BATCH_SIZE'
|
|
99
121
|
| 'P2P_BOOTSTRAP_NODE_ENR_VERSION_CHECK'
|
|
100
122
|
| 'P2P_BOOTSTRAP_NODES_AS_FULL_PEERS'
|
|
@@ -115,8 +137,10 @@ export type EnvVar =
|
|
|
115
137
|
| 'P2P_L2_QUEUE_SIZE'
|
|
116
138
|
| 'P2P_MAX_PEERS'
|
|
117
139
|
| 'P2P_PEER_CHECK_INTERVAL_MS'
|
|
140
|
+
| 'P2P_PEER_FAILED_BAN_TIME_MS'
|
|
118
141
|
| 'P2P_PEER_PENALTY_VALUES'
|
|
119
142
|
| 'P2P_QUERY_FOR_IP'
|
|
143
|
+
| 'P2P_PUBLIC_IP_SERVICES'
|
|
120
144
|
| 'P2P_REQRESP_INDIVIDUAL_REQUEST_TIMEOUT_MS'
|
|
121
145
|
| 'P2P_REQRESP_DIAL_TIMEOUT_MS'
|
|
122
146
|
| 'P2P_REQRESP_OVERALL_REQUEST_TIMEOUT_MS'
|
|
@@ -135,9 +159,12 @@ export type EnvVar =
|
|
|
135
159
|
| 'P2P_PREFERRED_PEERS'
|
|
136
160
|
| 'P2P_MAX_PENDING_TX_COUNT'
|
|
137
161
|
| 'P2P_SEEN_MSG_CACHE_SIZE'
|
|
138
|
-
| 'P2P_DROP_TX'
|
|
139
162
|
| 'P2P_DROP_TX_CHANCE'
|
|
140
163
|
| 'P2P_TX_POOL_DELETE_TXS_AFTER_REORG'
|
|
164
|
+
| 'P2P_MIN_TX_POOL_AGE_MS'
|
|
165
|
+
| 'P2P_MISSING_TX_COLLECTION_DEADLINE_SLOTS'
|
|
166
|
+
| 'P2P_RPC_PRICE_BUMP_PERCENTAGE'
|
|
167
|
+
| 'P2P_TX_VALIDATION_CACHE_SIZE'
|
|
141
168
|
| 'DEBUG_P2P_INSTRUMENT_MESSAGES'
|
|
142
169
|
| 'PEER_ID_PRIVATE_KEY'
|
|
143
170
|
| 'PEER_ID_PRIVATE_KEY_PATH'
|
|
@@ -151,7 +178,11 @@ export type EnvVar =
|
|
|
151
178
|
| 'PROVER_BROKER_BATCH_INTERVAL_MS'
|
|
152
179
|
| 'PROVER_BROKER_BATCH_SIZE'
|
|
153
180
|
| 'PROVER_BROKER_MAX_EPOCHS_TO_KEEP_RESULTS_FOR'
|
|
181
|
+
| 'PROVER_BROKER_DEBUG_REPLAY_ENABLED'
|
|
182
|
+
| 'PROVER_CANCEL_JOBS_ON_STOP'
|
|
183
|
+
| 'PROVER_ENQUEUE_CONCURRENCY'
|
|
154
184
|
| 'PROVER_COORDINATION_NODE_URLS'
|
|
185
|
+
| 'PROVER_PROOF_STORE'
|
|
155
186
|
| 'PROVER_FAILED_PROOF_STORE'
|
|
156
187
|
| 'PROVER_NODE_FAILED_EPOCH_STORE'
|
|
157
188
|
| 'PROVER_NODE_DISABLE_PROOF_PUBLISH'
|
|
@@ -173,47 +204,60 @@ export type EnvVar =
|
|
|
173
204
|
| 'PROVER_TEST_DELAY_MS'
|
|
174
205
|
| 'PROVER_TEST_DELAY_TYPE'
|
|
175
206
|
| 'PROVER_TEST_VERIFICATION_DELAY_MS'
|
|
207
|
+
| 'PXE_AUTO_SYNC'
|
|
176
208
|
| 'PXE_L2_BLOCK_BATCH_SIZE'
|
|
177
209
|
| 'PXE_PROVER_ENABLED'
|
|
210
|
+
| 'PXE_SYNC_CHAIN_TIP'
|
|
178
211
|
| 'RPC_MAX_BATCH_SIZE'
|
|
179
212
|
| 'RPC_MAX_BODY_SIZE'
|
|
180
213
|
| 'RPC_SIMULATE_PUBLIC_MAX_GAS_LIMIT'
|
|
181
214
|
| 'RPC_SIMULATE_PUBLIC_MAX_DEBUG_LOG_MEMORY_READS'
|
|
182
215
|
| 'SENTINEL_ENABLED'
|
|
183
216
|
| 'SENTINEL_HISTORY_LENGTH_IN_EPOCHS'
|
|
184
|
-
| '
|
|
185
|
-
| '
|
|
217
|
+
| 'SENTINEL_HISTORIC_EPOCH_PERFORMANCE_LENGTH_IN_EPOCHS'
|
|
218
|
+
| 'SENTINEL_EPOCH_END_BUFFER_SLOTS'
|
|
219
|
+
| 'SEQ_ENABLE_PROPOSER_PIPELINING'
|
|
186
220
|
| 'SEQ_MAX_TX_PER_BLOCK'
|
|
221
|
+
| 'SEQ_MAX_TX_PER_CHECKPOINT'
|
|
187
222
|
| 'SEQ_MIN_TX_PER_BLOCK'
|
|
188
223
|
| 'SEQ_PUBLISH_TXS_WITH_PROPOSALS'
|
|
189
224
|
| 'SEQ_MAX_DA_BLOCK_GAS'
|
|
190
225
|
| 'SEQ_MAX_L2_BLOCK_GAS'
|
|
226
|
+
| 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER'
|
|
227
|
+
| 'SEQ_REDISTRIBUTE_CHECKPOINT_BUDGET'
|
|
191
228
|
| 'SEQ_PUBLISHER_PRIVATE_KEY'
|
|
192
229
|
| 'SEQ_PUBLISHER_PRIVATE_KEYS'
|
|
193
230
|
| 'SEQ_PUBLISHER_ADDRESSES'
|
|
194
231
|
| 'SEQ_PUBLISHER_ALLOW_INVALID_STATES'
|
|
195
232
|
| 'SEQ_PUBLISHER_FORWARDER_ADDRESS'
|
|
233
|
+
| 'PUBLISHER_FUNDING_THRESHOLD'
|
|
234
|
+
| 'PUBLISHER_FUNDING_AMOUNT'
|
|
196
235
|
| 'SEQ_POLLING_INTERVAL_MS'
|
|
197
236
|
| 'SEQ_ENFORCE_TIME_TABLE'
|
|
198
237
|
| 'SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT'
|
|
199
238
|
| 'SEQ_ATTESTATION_PROPAGATION_TIME'
|
|
200
239
|
| 'SEQ_BLOCK_DURATION_MS'
|
|
240
|
+
| 'SEQ_LAST_BLOCK_DURATION_MS'
|
|
241
|
+
| 'SEQ_EXPECTED_BLOCK_PROPOSALS_PER_SLOT'
|
|
201
242
|
| 'SEQ_BUILD_CHECKPOINT_IF_EMPTY'
|
|
202
243
|
| 'SEQ_SECONDS_BEFORE_INVALIDATING_BLOCK_AS_COMMITTEE_MEMBER'
|
|
203
244
|
| 'SEQ_SECONDS_BEFORE_INVALIDATING_BLOCK_AS_NON_COMMITTEE_MEMBER'
|
|
204
|
-
| '
|
|
205
|
-
| 'SLASH_MAX_PENALTY_PERCENTAGE'
|
|
245
|
+
| 'SEQ_SKIP_CHECKPOINT_PUBLISH_PERCENT'
|
|
206
246
|
| 'SLASH_VALIDATORS_ALWAYS'
|
|
207
247
|
| 'SLASH_VALIDATORS_NEVER'
|
|
208
|
-
| 'SLASH_PRUNE_PENALTY'
|
|
209
248
|
| 'SLASH_DATA_WITHHOLDING_PENALTY'
|
|
249
|
+
| 'SLASH_DATA_WITHHOLDING_TOLERANCE_SLOTS'
|
|
210
250
|
| 'SLASH_INACTIVITY_PENALTY'
|
|
211
251
|
| 'SLASH_INACTIVITY_TARGET_PERCENTAGE'
|
|
212
252
|
| 'SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD'
|
|
213
253
|
| 'SLASH_INVALID_BLOCK_PENALTY'
|
|
254
|
+
| 'SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY'
|
|
255
|
+
| 'SLASH_DUPLICATE_PROPOSAL_PENALTY'
|
|
256
|
+
| 'SLASH_DUPLICATE_ATTESTATION_PENALTY'
|
|
214
257
|
| 'SLASH_OVERRIDE_PAYLOAD'
|
|
215
258
|
| 'SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY'
|
|
216
|
-
| '
|
|
259
|
+
| 'SLASH_PROPOSE_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONS_PENALTY'
|
|
260
|
+
| 'SLASH_ATTEST_INVALID_CHECKPOINT_PROPOSAL_PENALTY'
|
|
217
261
|
| 'SLASH_UNKNOWN_PENALTY'
|
|
218
262
|
| 'SLASH_GRACE_PERIOD_L2_SLOTS'
|
|
219
263
|
| 'SLASH_OFFENSE_EXPIRATION_ROUNDS'
|
|
@@ -225,31 +269,40 @@ export type EnvVar =
|
|
|
225
269
|
| 'TELEMETRY'
|
|
226
270
|
| 'TEST_ACCOUNTS'
|
|
227
271
|
| 'SPONSORED_FPC'
|
|
272
|
+
| 'PREFUND_ADDRESSES'
|
|
228
273
|
| 'TX_COLLECTION_FAST_NODES_TIMEOUT_BEFORE_REQ_RESP_MS'
|
|
229
|
-
| 'TX_COLLECTION_SLOW_NODES_INTERVAL_MS'
|
|
230
|
-
| 'TX_COLLECTION_SLOW_REQ_RESP_INTERVAL_MS'
|
|
231
|
-
| 'TX_COLLECTION_SLOW_REQ_RESP_TIMEOUT_MS'
|
|
232
|
-
| 'TX_COLLECTION_RECONCILE_INTERVAL_MS'
|
|
233
|
-
| 'TX_COLLECTION_DISABLE_SLOW_DURING_FAST_REQUESTS'
|
|
234
274
|
| 'TX_COLLECTION_FAST_NODE_INTERVAL_MS'
|
|
235
275
|
| 'TX_COLLECTION_FAST_MAX_PARALLEL_REQUESTS_PER_NODE'
|
|
236
276
|
| 'TX_COLLECTION_NODE_RPC_MAX_BATCH_SIZE'
|
|
237
277
|
| 'TX_COLLECTION_NODE_RPC_URLS'
|
|
278
|
+
| 'TX_COLLECTION_MISSING_TXS_COLLECTOR_TYPE'
|
|
279
|
+
| 'TX_COLLECTION_FILE_STORE_URLS'
|
|
280
|
+
| 'TX_COLLECTION_FILE_STORE_FAST_DELAY_MS'
|
|
281
|
+
| 'TX_COLLECTION_FILE_STORE_FAST_WORKER_COUNT'
|
|
282
|
+
| 'TX_COLLECTION_FILE_STORE_FAST_BACKOFF_BASE_MS'
|
|
283
|
+
| 'TX_COLLECTION_FILE_STORE_FAST_BACKOFF_MAX_MS'
|
|
284
|
+
| 'TX_FILE_STORE_URL'
|
|
285
|
+
| 'TX_FILE_STORE_UPLOAD_CONCURRENCY'
|
|
286
|
+
| 'TX_FILE_STORE_MAX_QUEUE_SIZE'
|
|
287
|
+
| 'TX_FILE_STORE_ENABLED'
|
|
238
288
|
| 'TX_PUBLIC_SETUP_ALLOWLIST'
|
|
239
289
|
| 'TXE_PORT'
|
|
240
290
|
| 'TRANSACTIONS_DISABLED'
|
|
241
291
|
| 'VALIDATOR_ATTESTATIONS_POLLING_INTERVAL_MS'
|
|
242
292
|
| 'VALIDATOR_DISABLED'
|
|
293
|
+
| 'VALIDATOR_MAX_DA_BLOCK_GAS'
|
|
294
|
+
| 'VALIDATOR_MAX_L2_BLOCK_GAS'
|
|
295
|
+
| 'VALIDATOR_MAX_TX_PER_BLOCK'
|
|
296
|
+
| 'VALIDATOR_MAX_TX_PER_CHECKPOINT'
|
|
243
297
|
| 'VALIDATOR_PRIVATE_KEYS'
|
|
244
298
|
| 'VALIDATOR_PRIVATE_KEY'
|
|
245
|
-
| 'VALIDATOR_REEXECUTE'
|
|
246
299
|
| 'VALIDATOR_ADDRESSES'
|
|
247
300
|
| 'ROLLUP_VERSION'
|
|
248
301
|
| 'WS_BLOCK_CHECK_INTERVAL_MS'
|
|
249
|
-
| 'WS_PROVEN_BLOCKS_ONLY'
|
|
250
302
|
| 'WS_BLOCK_REQUEST_BATCH_SIZE'
|
|
251
303
|
| 'L1_READER_VIEM_POLLING_INTERVAL_MS'
|
|
252
304
|
| 'WS_DATA_DIRECTORY'
|
|
305
|
+
| 'WS_NUM_HISTORIC_CHECKPOINTS'
|
|
253
306
|
| 'WS_NUM_HISTORIC_BLOCKS'
|
|
254
307
|
| 'ETHEREUM_SLOT_DURATION'
|
|
255
308
|
| 'AZTEC_SLOT_DURATION'
|
|
@@ -264,6 +317,7 @@ export type EnvVar =
|
|
|
264
317
|
| 'AZTEC_LOCAL_EJECTION_THRESHOLD'
|
|
265
318
|
| 'AZTEC_MANA_TARGET'
|
|
266
319
|
| 'AZTEC_PROVING_COST_PER_MANA'
|
|
320
|
+
| 'AZTEC_INITIAL_ETH_PER_FEE_ASSET'
|
|
267
321
|
| 'AZTEC_SLASHING_QUORUM'
|
|
268
322
|
| 'AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS'
|
|
269
323
|
| 'AZTEC_SLASHING_LIFETIME_IN_ROUNDS'
|
|
@@ -274,9 +328,10 @@ export type EnvVar =
|
|
|
274
328
|
| 'AZTEC_SLASH_AMOUNT_SMALL'
|
|
275
329
|
| 'AZTEC_SLASH_AMOUNT_MEDIUM'
|
|
276
330
|
| 'AZTEC_SLASH_AMOUNT_LARGE'
|
|
277
|
-
| '
|
|
331
|
+
| 'AZTEC_SLASHER_ENABLED'
|
|
278
332
|
| 'AZTEC_GOVERNANCE_PROPOSER_QUORUM'
|
|
279
333
|
| 'AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE'
|
|
334
|
+
| 'AZTEC_GOVERNANCE_VOTING_DURATION'
|
|
280
335
|
| 'AZTEC_EXIT_DELAY_SECONDS'
|
|
281
336
|
| 'L1_GAS_LIMIT_BUFFER_PERCENTAGE'
|
|
282
337
|
| 'L1_GAS_PRICE_MAX'
|
|
@@ -302,22 +357,23 @@ export type EnvVar =
|
|
|
302
357
|
| 'K8S_POD_NAME'
|
|
303
358
|
| 'K8S_POD_UID'
|
|
304
359
|
| 'K8S_NAMESPACE_NAME'
|
|
305
|
-
| '
|
|
306
|
-
| 'ALWAYS_REEXECUTE_BLOCK_PROPOSALS'
|
|
307
|
-
| 'AUTO_UPDATE'
|
|
308
|
-
| 'AUTO_UPDATE_URL'
|
|
360
|
+
| 'ENABLE_VERSION_CHECK'
|
|
309
361
|
| 'WEB3_SIGNER_URL'
|
|
310
362
|
| 'SKIP_ARCHIVER_INITIAL_SYNC'
|
|
311
363
|
| 'BLOB_ALLOW_EMPTY_SOURCES'
|
|
364
|
+
| 'BLOB_PREFER_FILESTORES'
|
|
365
|
+
| 'BLOB_FILE_STORE_TIMEOUT_MS'
|
|
312
366
|
| 'FISHERMAN_MODE'
|
|
313
367
|
| 'MAX_ALLOWED_ETH_CLIENT_DRIFT_SECONDS'
|
|
368
|
+
| 'MAX_BLOCKS_PER_CHECKPOINT'
|
|
314
369
|
| 'LEGACY_BLS_CLI'
|
|
315
370
|
| 'DEBUG_FORCE_TX_PROOF_VERIFICATION'
|
|
316
|
-
| '
|
|
317
|
-
| '
|
|
318
|
-
| '
|
|
319
|
-
| '
|
|
320
|
-
| '
|
|
371
|
+
| 'VALIDATOR_HA_SIGNING_ENABLED'
|
|
372
|
+
| 'VALIDATOR_HA_NODE_ID'
|
|
373
|
+
| 'VALIDATOR_HA_POLLING_INTERVAL_MS'
|
|
374
|
+
| 'VALIDATOR_HA_SIGNING_TIMEOUT_MS'
|
|
375
|
+
| 'VALIDATOR_HA_MAX_STUCK_DUTIES_AGE_MS'
|
|
376
|
+
| 'VALIDATOR_HA_OLD_DUTIES_MAX_AGE_H'
|
|
321
377
|
| 'VALIDATOR_HA_DATABASE_URL'
|
|
322
378
|
| 'VALIDATOR_HA_RUN_MIGRATIONS'
|
|
323
379
|
| 'VALIDATOR_HA_POOL_MAX'
|
package/src/config/index.ts
CHANGED
|
@@ -10,14 +10,14 @@ export type { EnvVar, NetworkNames };
|
|
|
10
10
|
export type { NetworkConfig, NetworkConfigMap } from './network_config.js';
|
|
11
11
|
export { NetworkConfigMapSchema, NetworkConfigSchema } from './network_config.js';
|
|
12
12
|
|
|
13
|
-
export interface ConfigMapping {
|
|
13
|
+
export interface ConfigMapping<T> {
|
|
14
14
|
env?: EnvVar;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/** Parse an env-var string into `T`. Throws on invalid input. */
|
|
16
|
+
parseEnv?: (val: string) => T;
|
|
17
|
+
defaultValue?: T;
|
|
17
18
|
printDefault?: (val: any) => string;
|
|
18
19
|
description: string;
|
|
19
20
|
isBoolean?: boolean;
|
|
20
|
-
nested?: Record<string, ConfigMapping>;
|
|
21
21
|
fallback?: EnvVar[];
|
|
22
22
|
/**
|
|
23
23
|
* List of deprecated env vars that are still supported but will log a warning.
|
|
@@ -30,7 +30,9 @@ export function isBooleanConfigValue<T>(obj: T, key: keyof T): boolean {
|
|
|
30
30
|
return typeof obj[key] === 'boolean';
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export type ConfigMappingsType<T> =
|
|
33
|
+
export type ConfigMappingsType<T> = {
|
|
34
|
+
[K in keyof T]-?: ConfigMapping<Required<T>[K]>;
|
|
35
|
+
};
|
|
34
36
|
|
|
35
37
|
/**
|
|
36
38
|
* Shared utility function to get a value from environment variables with fallback support.
|
|
@@ -66,8 +68,8 @@ export function getValueFromEnvWithFallback<T>(
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
// Parse the value if needed
|
|
70
|
-
if (value !== undefined) {
|
|
71
|
+
// Parse the value if needed. Empty strings are treated as "not set".
|
|
72
|
+
if (value !== undefined && value !== '') {
|
|
71
73
|
return parseFunc ? parseFunc(value) : (value as unknown as T);
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -79,22 +81,20 @@ export function getConfigFromMappings<T>(configMappings: ConfigMappingsType<T>):
|
|
|
79
81
|
const config = {} as T;
|
|
80
82
|
|
|
81
83
|
for (const key in configMappings) {
|
|
82
|
-
const { env, parseEnv, defaultValue,
|
|
83
|
-
|
|
84
|
-
(config as any)[key] = getConfigFromMappings(nested);
|
|
85
|
-
} else {
|
|
86
|
-
// Use the shared utility function
|
|
84
|
+
const { env, parseEnv, defaultValue, fallback, deprecatedFallback } = configMappings[key];
|
|
85
|
+
try {
|
|
87
86
|
(config as any)[key] = getValueFromEnvWithFallback(env, parseEnv, defaultValue, fallback);
|
|
87
|
+
} catch (e: any) {
|
|
88
|
+
throw new Error(`Failed to parse config '${key}' (env: ${env ?? 'none'}): ${e.message}`);
|
|
89
|
+
}
|
|
88
90
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
userLog(warningMessage, { deprecatedEnvVar: deprecatedEnv, newEnvVar: env });
|
|
97
|
-
}
|
|
91
|
+
if (deprecatedFallback?.length) {
|
|
92
|
+
const userLog = createConsoleLogger('[DEPRECATED]');
|
|
93
|
+
for (const { env: deprecatedEnv, message } of deprecatedFallback) {
|
|
94
|
+
if (process.env[deprecatedEnv]) {
|
|
95
|
+
const warningMessage =
|
|
96
|
+
message ?? `Environment variable ${deprecatedEnv} is deprecated. Please use ${env} instead.`;
|
|
97
|
+
userLog(warningMessage, { deprecatedEnvVar: deprecatedEnv, newEnvVar: env });
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -123,7 +123,7 @@ export function omitConfigMappings<T, K extends keyof T>(
|
|
|
123
123
|
* @param defaultVal - The default numerical value to use if the environment variable is not set or is invalid
|
|
124
124
|
* @returns Object with parseEnv and default values for a numerical config value
|
|
125
125
|
*/
|
|
126
|
-
export function numberConfigHelper(defaultVal: number): Pick<ConfigMapping
|
|
126
|
+
export function numberConfigHelper(defaultVal: number): Pick<ConfigMapping<number>, 'parseEnv' | 'defaultValue'> {
|
|
127
127
|
return {
|
|
128
128
|
parseEnv: (val: string) => safeParseNumber(val, defaultVal),
|
|
129
129
|
defaultValue: defaultVal,
|
|
@@ -138,7 +138,7 @@ export function numberConfigHelper(defaultVal: number): Pick<ConfigMapping, 'par
|
|
|
138
138
|
export function floatConfigHelper(
|
|
139
139
|
defaultVal: number,
|
|
140
140
|
validationFn?: (val: number) => void,
|
|
141
|
-
): Pick<ConfigMapping
|
|
141
|
+
): Pick<ConfigMapping<number>, 'parseEnv' | 'defaultValue'> {
|
|
142
142
|
return {
|
|
143
143
|
parseEnv: (val: string): number => {
|
|
144
144
|
const parsed = safeParseFloat(val, defaultVal);
|
|
@@ -149,16 +149,49 @@ export function floatConfigHelper(
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Parses an environment variable to a 0-1 percentage value
|
|
154
|
+
*/
|
|
155
|
+
export function percentageConfigHelper(defaultVal: number): Pick<ConfigMapping<number>, 'parseEnv' | 'defaultValue'> {
|
|
156
|
+
return {
|
|
157
|
+
parseEnv: (val: string): number => {
|
|
158
|
+
const parsed = safeParseFloat(val, defaultVal);
|
|
159
|
+
if (parsed < 0 || parsed > 1) {
|
|
160
|
+
throw new TypeError(`Invalid percentage value: ${parsed} should be between 0 and 1`);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return parsed;
|
|
164
|
+
},
|
|
165
|
+
defaultValue: defaultVal,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
152
169
|
/**
|
|
153
170
|
* Generates parseEnv and default values for a numerical config value.
|
|
154
171
|
* @param defaultVal - The default numerical value to use if the environment variable is not set or is invalid
|
|
155
172
|
* @returns Object with parseEnv and default values for a numerical config value
|
|
156
173
|
*/
|
|
157
|
-
export function bigintConfigHelper(defaultVal
|
|
174
|
+
export function bigintConfigHelper(defaultVal: bigint): Pick<ConfigMapping<bigint>, 'parseEnv' | 'defaultValue'>;
|
|
175
|
+
export function bigintConfigHelper(): Pick<ConfigMapping<bigint | undefined>, 'parseEnv' | 'defaultValue'>;
|
|
176
|
+
export function bigintConfigHelper(
|
|
177
|
+
defaultVal?: bigint,
|
|
178
|
+
): Pick<ConfigMapping<bigint | undefined>, 'parseEnv' | 'defaultValue'> {
|
|
158
179
|
return {
|
|
159
180
|
parseEnv: (val: string) => {
|
|
160
|
-
|
|
161
|
-
|
|
181
|
+
// Handle scientific notation (e.g. "1e+23", "2E23") which BigInt() doesn't accept directly.
|
|
182
|
+
// We parse it losslessly using bigint arithmetic instead of going through float64.
|
|
183
|
+
if (/[eE]/.test(val)) {
|
|
184
|
+
const match = val.match(/^(-?\d+(?:\.(\d+))?)[eE]([+-]?\d+)$/);
|
|
185
|
+
if (!match) {
|
|
186
|
+
throw new Error(`Cannot convert '${val}' to a BigInt`);
|
|
187
|
+
}
|
|
188
|
+
const digits = match[1].replace('.', '');
|
|
189
|
+
const decimalPlaces = match[2]?.length ?? 0;
|
|
190
|
+
const exponent = parseInt(match[3], 10) - decimalPlaces;
|
|
191
|
+
if (exponent < 0) {
|
|
192
|
+
throw new Error(`Cannot convert '${val}' to a BigInt: result is not an integer`);
|
|
193
|
+
}
|
|
194
|
+
return BigInt(digits) * 10n ** BigInt(exponent);
|
|
162
195
|
}
|
|
163
196
|
return BigInt(val);
|
|
164
197
|
},
|
|
@@ -168,32 +201,37 @@ export function bigintConfigHelper(defaultVal?: bigint): Pick<ConfigMapping, 'pa
|
|
|
168
201
|
|
|
169
202
|
/**
|
|
170
203
|
* Generates parseEnv for an optional numerical config value.
|
|
204
|
+
* Empty strings are already handled by getValueFromEnvWithFallback.
|
|
171
205
|
*/
|
|
172
|
-
export function optionalNumberConfigHelper(): Pick<ConfigMapping
|
|
206
|
+
export function optionalNumberConfigHelper(): Pick<ConfigMapping<number>, 'parseEnv'> {
|
|
173
207
|
return {
|
|
174
|
-
parseEnv: (val: string
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
208
|
+
parseEnv: (val: string) => {
|
|
209
|
+
const parsedValue = parseInt(val);
|
|
210
|
+
if (!Number.isSafeInteger(parsedValue)) {
|
|
211
|
+
throw new Error(`Invalid number: ${val}`);
|
|
178
212
|
}
|
|
179
|
-
return
|
|
213
|
+
return parsedValue;
|
|
180
214
|
},
|
|
181
215
|
};
|
|
182
216
|
}
|
|
183
217
|
|
|
184
218
|
/** Generates parseEnv for an enum-like config value. */
|
|
219
|
+
export function enumConfigHelper<T extends string>(
|
|
220
|
+
values: T[],
|
|
221
|
+
defaultValue: NoInfer<T>,
|
|
222
|
+
): Pick<ConfigMapping<T>, 'parseEnv' | 'defaultValue'>;
|
|
223
|
+
export function enumConfigHelper<T extends string>(
|
|
224
|
+
values: T[],
|
|
225
|
+
): Pick<ConfigMapping<T | undefined>, 'parseEnv' | 'defaultValue'>;
|
|
185
226
|
export function enumConfigHelper<T extends string>(
|
|
186
227
|
values: T[],
|
|
187
228
|
defaultValue?: NoInfer<T>,
|
|
188
|
-
): Pick<ConfigMapping
|
|
229
|
+
): Pick<ConfigMapping<T | undefined>, 'parseEnv' | 'defaultValue'> {
|
|
189
230
|
return {
|
|
190
231
|
parseEnv: (val: string) => {
|
|
191
|
-
const sanitizedVal =
|
|
192
|
-
if (values.
|
|
193
|
-
return
|
|
194
|
-
}
|
|
195
|
-
if (!val && defaultValue) {
|
|
196
|
-
return defaultValue;
|
|
232
|
+
const sanitizedVal = val.trim().toLowerCase();
|
|
233
|
+
if (values.some(v => v.toLowerCase() === sanitizedVal)) {
|
|
234
|
+
return values.find(v => v.toLowerCase() === sanitizedVal)!;
|
|
197
235
|
}
|
|
198
236
|
throw new Error(`Invalid config value '${val}' (must be one of ${values.join(', ')})`);
|
|
199
237
|
},
|
|
@@ -208,7 +246,9 @@ export function enumConfigHelper<T extends string>(
|
|
|
208
246
|
*/
|
|
209
247
|
export function booleanConfigHelper(
|
|
210
248
|
defaultVal = false,
|
|
211
|
-
): Required<
|
|
249
|
+
): Required<
|
|
250
|
+
Pick<ConfigMapping<boolean>, 'parseEnv' | 'defaultValue' | 'isBoolean'> & { parseVal: (val: string) => boolean }
|
|
251
|
+
> {
|
|
212
252
|
const parse = (val: string | boolean) => (typeof val === 'boolean' ? val : parseBooleanEnv(val));
|
|
213
253
|
return {
|
|
214
254
|
parseEnv: parse,
|
|
@@ -218,91 +258,88 @@ export function booleanConfigHelper(
|
|
|
218
258
|
};
|
|
219
259
|
}
|
|
220
260
|
|
|
221
|
-
export function secretValueConfigHelper<T>(parse: (val: string | undefined) => T):
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
261
|
+
export function secretValueConfigHelper<T>(parse: (val: string | undefined) => T): Pick<
|
|
262
|
+
ConfigMapping<SecretValue<T>>,
|
|
263
|
+
'parseEnv' | 'defaultValue'
|
|
264
|
+
> & {
|
|
265
|
+
parseVal: (val: string) => SecretValue<T>;
|
|
266
|
+
} {
|
|
226
267
|
const wrap = (val: string) => new SecretValue(parse(val));
|
|
227
268
|
return {
|
|
228
269
|
parseEnv: wrap,
|
|
229
270
|
parseVal: wrap,
|
|
230
271
|
defaultValue: new SecretValue(parse(undefined)),
|
|
231
|
-
isBoolean: true,
|
|
232
272
|
};
|
|
233
273
|
}
|
|
234
274
|
|
|
235
275
|
export { parseBooleanEnv } from './parse-env.js';
|
|
236
276
|
|
|
237
|
-
export function secretStringConfigHelper():
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
export function secretStringConfigHelper(defaultValue: string):
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
export function secretStringConfigHelper(defaultValue?: string):
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
277
|
+
export function secretStringConfigHelper(): {
|
|
278
|
+
parseEnv: (val: string) => SecretValue<string>;
|
|
279
|
+
parseVal: (val: string) => SecretValue<string>;
|
|
280
|
+
defaultValue: undefined;
|
|
281
|
+
};
|
|
282
|
+
export function secretStringConfigHelper(defaultValue: string): {
|
|
283
|
+
parseEnv: (val: string) => SecretValue<string>;
|
|
284
|
+
parseVal: (val: string) => SecretValue<string>;
|
|
285
|
+
defaultValue: SecretValue<string>;
|
|
286
|
+
};
|
|
287
|
+
export function secretStringConfigHelper(defaultValue?: string): {
|
|
288
|
+
parseEnv: (val: string) => SecretValue<string>;
|
|
289
|
+
parseVal: (val: string) => SecretValue<string>;
|
|
290
|
+
defaultValue: SecretValue<string> | undefined;
|
|
291
|
+
} {
|
|
252
292
|
const parse = (val: string) => new SecretValue(val);
|
|
253
293
|
return {
|
|
254
294
|
parseEnv: parse,
|
|
255
295
|
parseVal: parse,
|
|
256
296
|
defaultValue: defaultValue !== undefined ? new SecretValue(defaultValue) : undefined,
|
|
257
|
-
isBoolean: true,
|
|
258
297
|
};
|
|
259
298
|
}
|
|
260
299
|
|
|
261
|
-
export function secretFrConfigHelper():
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
export function secretFrConfigHelper(defaultValue: Fr):
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
export function secretFrConfigHelper(defaultValue?: Fr):
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
300
|
+
export function secretFrConfigHelper(): {
|
|
301
|
+
parseEnv: (val: string) => SecretValue<Fr>;
|
|
302
|
+
parseVal: (val: string) => SecretValue<Fr>;
|
|
303
|
+
defaultValue: undefined;
|
|
304
|
+
};
|
|
305
|
+
export function secretFrConfigHelper(defaultValue: Fr): {
|
|
306
|
+
parseEnv: (val: string) => SecretValue<Fr>;
|
|
307
|
+
parseVal: (val: string) => SecretValue<Fr>;
|
|
308
|
+
defaultValue: SecretValue<Fr>;
|
|
309
|
+
};
|
|
310
|
+
export function secretFrConfigHelper(defaultValue?: Fr): {
|
|
311
|
+
parseEnv: (val: string) => SecretValue<Fr>;
|
|
312
|
+
parseVal: (val: string) => SecretValue<Fr>;
|
|
313
|
+
defaultValue: SecretValue<Fr> | undefined;
|
|
314
|
+
} {
|
|
276
315
|
const parse = (val: string) => new SecretValue(Fr.fromHexString(val));
|
|
277
316
|
return {
|
|
278
317
|
parseEnv: parse,
|
|
279
318
|
parseVal: parse,
|
|
280
319
|
defaultValue: defaultValue !== undefined ? new SecretValue(defaultValue) : undefined,
|
|
281
|
-
isBoolean: true,
|
|
282
320
|
};
|
|
283
321
|
}
|
|
284
322
|
|
|
285
|
-
export function secretFqConfigHelper(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
export function secretFqConfigHelper():
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
export function secretFqConfigHelper(defaultValue?: Fq):
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
323
|
+
export function secretFqConfigHelper(): {
|
|
324
|
+
parseEnv: (val: string) => SecretValue<Fq>;
|
|
325
|
+
parseVal: (val: string) => SecretValue<Fq>;
|
|
326
|
+
defaultValue: undefined;
|
|
327
|
+
};
|
|
328
|
+
export function secretFqConfigHelper(defaultValue: Fq): {
|
|
329
|
+
parseEnv: (val: string) => SecretValue<Fq>;
|
|
330
|
+
parseVal: (val: string) => SecretValue<Fq>;
|
|
331
|
+
defaultValue: SecretValue<Fq>;
|
|
332
|
+
};
|
|
333
|
+
export function secretFqConfigHelper(defaultValue?: Fq): {
|
|
334
|
+
parseEnv: (val: string) => SecretValue<Fq>;
|
|
335
|
+
parseVal: (val: string) => SecretValue<Fq>;
|
|
336
|
+
defaultValue: SecretValue<Fq> | undefined;
|
|
337
|
+
} {
|
|
300
338
|
const parse = (val: string) => new SecretValue(Fq.fromHexString(val));
|
|
301
339
|
return {
|
|
302
340
|
parseEnv: parse,
|
|
303
341
|
parseVal: parse,
|
|
304
|
-
defaultValue:
|
|
305
|
-
isBoolean: true,
|
|
342
|
+
defaultValue: defaultValue !== undefined ? new SecretValue(defaultValue) : undefined,
|
|
306
343
|
};
|
|
307
344
|
}
|
|
308
345
|
|
|
@@ -5,10 +5,13 @@ export const NetworkConfigSchema = z
|
|
|
5
5
|
bootnodes: z.array(z.string()),
|
|
6
6
|
snapshots: z.array(z.string()),
|
|
7
7
|
blobFileStoreUrls: z.array(z.string()).optional(),
|
|
8
|
+
txCollectionFileStoreUrls: z.array(z.string()).optional(),
|
|
8
9
|
registryAddress: z.string(),
|
|
9
10
|
feeAssetHandlerAddress: z.string().optional(),
|
|
10
11
|
l1ChainId: z.number(),
|
|
11
12
|
blockDurationMs: z.number().positive().optional(),
|
|
13
|
+
txPublicSetupAllowListExtend: z.string().optional(),
|
|
14
|
+
nodeVersion: z.string().optional(),
|
|
12
15
|
})
|
|
13
16
|
.passthrough(); // Allow additional unknown fields to pass through
|
|
14
17
|
|