@aztec/foundation 0.0.1-commit.0c875d939 → 0.0.1-commit.0dc957cde
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/branded-types/buffer32_hash.d.ts +24 -0
- package/dest/branded-types/buffer32_hash.d.ts.map +1 -0
- package/dest/branded-types/buffer32_hash.js +19 -0
- package/dest/branded-types/checkpoint_number.d.ts +4 -1
- package/dest/branded-types/checkpoint_number.d.ts.map +1 -1
- package/dest/branded-types/checkpoint_number.js +3 -0
- package/dest/branded-types/index.d.ts +2 -1
- package/dest/branded-types/index.d.ts.map +1 -1
- package/dest/branded-types/index.js +1 -0
- package/dest/branded-types/slot.d.ts +4 -1
- package/dest/branded-types/slot.d.ts.map +1 -1
- package/dest/branded-types/slot.js +3 -0
- package/dest/buffer/buffer16.d.ts +3 -1
- package/dest/buffer/buffer16.d.ts.map +1 -1
- package/dest/buffer/buffer32.d.ts +28 -61
- package/dest/buffer/buffer32.d.ts.map +1 -1
- package/dest/buffer/buffer32.js +26 -60
- 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 +3 -1
- package/dest/collection/array.d.ts.map +1 -1
- package/dest/collection/array.js +15 -0
- package/dest/collection/index.d.ts +2 -1
- package/dest/collection/index.d.ts.map +1 -1
- package/dest/collection/index.js +1 -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/config/env_var.d.ts +2 -2
- package/dest/config/env_var.d.ts.map +1 -1
- package/dest/config/index.d.ts +48 -30
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +35 -29
- package/dest/config/network_config.d.ts +19 -1
- 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 -0
- 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 +1 -10
- package/dest/crypto/bls/bn254_keystore.d.ts.map +1 -1
- package/dest/crypto/bls/bn254_keystore.js +0 -17
- package/dest/crypto/poseidon/index.d.ts +1 -1
- package/dest/crypto/poseidon/index.d.ts.map +1 -1
- package/dest/crypto/poseidon/index.js +40 -33
- 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/curves/bls12/field.d.ts +1 -1
- package/dest/curves/bls12/field.d.ts.map +1 -1
- package/dest/curves/bls12/field.js +0 -5
- package/dest/curves/bn254/field.d.ts +18 -16
- package/dest/curves/bn254/field.d.ts.map +1 -1
- package/dest/curves/bn254/field.js +23 -15
- package/dest/curves/grumpkin/point.d.ts +4 -4
- package/dest/curves/grumpkin/point.d.ts.map +1 -1
- package/dest/curves/grumpkin/point.js +7 -4
- package/dest/eth-address/index.d.ts +1 -1
- 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 +2 -1
- 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/jest/setup.js +24 -0
- 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 +1 -1
- 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 +5 -3
- 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/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/pino-logger.d.ts +1 -1
- package/dest/log/pino-logger.d.ts.map +1 -1
- package/dest/log/pino-logger.js +21 -2
- 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/retry/index.d.ts +12 -1
- package/dest/retry/index.d.ts.map +1 -1
- package/dest/retry/index.js +21 -0
- package/dest/schemas/api.d.ts +2 -2
- package/dest/schemas/api.d.ts.map +1 -1
- 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 +3 -1
- package/dest/timer/date.d.ts.map +1 -1
- package/dest/timer/date.js +4 -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 +2 -3
- package/dest/trees/balanced_merkle_tree_root.d.ts.map +1 -1
- package/dest/trees/balanced_merkle_tree_root.js +2 -3
- package/dest/trees/hasher.d.ts +3 -2
- package/dest/trees/hasher.d.ts.map +1 -1
- package/dest/trees/hasher.js +5 -5
- 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/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 +2 -2
- package/dest/trees/sibling_path.d.ts.map +1 -1
- package/dest/trees/sibling_path.js +1 -5
- package/dest/trees/unbalanced_merkle_tree_root.d.ts +2 -3
- package/dest/trees/unbalanced_merkle_tree_root.d.ts.map +1 -1
- package/dest/trees/unbalanced_merkle_tree_root.js +2 -3
- package/package.json +3 -2
- package/src/branded-types/buffer32_hash.ts +42 -0
- package/src/branded-types/checkpoint_number.ts +5 -0
- package/src/branded-types/index.ts +1 -0
- package/src/branded-types/slot.ts +5 -0
- package/src/buffer/buffer16.ts +3 -0
- package/src/buffer/buffer32.ts +36 -65
- package/src/buffer/index.ts +1 -0
- package/src/buffer/utils.ts +8 -0
- package/src/collection/array.ts +14 -0
- package/src/collection/index.ts +1 -0
- package/src/collection/lru_set.ts +115 -0
- package/src/config/env_var.ts +33 -11
- package/src/config/index.ts +110 -83
- package/src/config/network_config.ts +3 -0
- package/src/config/network_name.ts +4 -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 -34
- package/src/crypto/secp256k1-signer/utils.ts +32 -0
- package/src/curves/bls12/field.ts +0 -7
- package/src/curves/bn254/field.ts +31 -33
- package/src/curves/grumpkin/point.ts +6 -3
- 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/jest/setup.mjs +27 -0
- package/src/json-rpc/client/fetch.ts +4 -3
- package/src/json-rpc/client/safe_json_rpc_client.ts +2 -0
- package/src/json-rpc/client/undici.ts +5 -3
- package/src/json-rpc/server/api_key_auth.ts +63 -0
- package/src/json-rpc/server/index.ts +1 -0
- package/src/log/bigint-utils.ts +25 -0
- package/src/log/gcloud-logger-config.ts +5 -0
- package/src/log/pino-logger.ts +23 -2
- package/src/queue/batch_queue.ts +1 -0
- package/src/retry/index.ts +30 -0
- package/src/schemas/api.ts +4 -1
- package/src/sleep/index.ts +10 -1
- package/src/string/index.ts +1 -1
- package/src/timer/date.ts +6 -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_root.ts +2 -5
- package/src/trees/hasher.ts +6 -3
- package/src/trees/indexed_merkle_tree_calculator.ts +5 -1
- package/src/trees/merkle_tree_calculator.ts +4 -10
- package/src/trees/sibling_path.ts +1 -2
- package/src/trees/unbalanced_merkle_tree_root.ts +2 -5
- 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/src/crypto/serialize.ts +0 -85
- package/src/transport/dispatch/create_dispatch_fn.ts +0 -35
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { makeTuple } from '../array/array.js';
|
|
2
|
-
import { poseidon2Hash } from '../crypto/poseidon/index.js';
|
|
3
2
|
import { Fr } from '../curves/bn254/index.js';
|
|
4
3
|
import { schemas } from '../schemas/index.js';
|
|
5
4
|
import { assertLength, deserializeArrayFromVector, serializeArrayOfBufferableToVector } from '../serialize/index.js';
|
|
@@ -131,10 +130,7 @@ import { bufferToHex, hexToBuffer } from '../string/index.js';
|
|
|
131
130
|
return new SiblingPath(subtreePathSize, subtreeData);
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
|
-
/** Computes the expected root of a merkle tree given a leaf and its sibling path. */ export async function computeRootFromSiblingPath(leaf, siblingPath, index, hasher
|
|
135
|
-
left,
|
|
136
|
-
right
|
|
137
|
-
])).toBuffer()) {
|
|
133
|
+
/** Computes the expected root of a merkle tree given a leaf and its sibling path. */ export async function computeRootFromSiblingPath(leaf, siblingPath, index, hasher) {
|
|
138
134
|
let result = leaf;
|
|
139
135
|
for (const sibling of siblingPath){
|
|
140
136
|
result = index & 1 ? await hasher(sibling, result) : await hasher(result, sibling);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const computeUnbalancedShaRoot: (leaves: Buffer<ArrayBufferLike>[]) => Buffer<ArrayBufferLike>;
|
|
2
|
-
export declare const computeUnbalancedPoseidonRoot: (leaves: Buffer<ArrayBufferLike>[]) => Promise<Buffer<ArrayBufferLike>>;
|
|
3
2
|
export declare const computeWonkyShaRoot: (leaves: Buffer<ArrayBufferLike>[]) => Buffer<ArrayBufferLike>;
|
|
4
3
|
/**
|
|
5
4
|
* Computes the Merkle root of an unbalanced tree.
|
|
@@ -23,6 +22,6 @@ export declare const computeWonkyShaRoot: (leaves: Buffer<ArrayBufferLike>[]) =>
|
|
|
23
22
|
* (depth 1), the final tree has a depth of 5.
|
|
24
23
|
*/
|
|
25
24
|
export declare function computeUnbalancedMerkleTreeRoot(leaves: Buffer[], hasher?: (lhs: Uint8Array<ArrayBufferLike>, rhs: Uint8Array<ArrayBufferLike>) => Buffer<ArrayBuffer>, emptyRoot?: Buffer<ArrayBuffer>): Buffer;
|
|
26
|
-
export declare function computeUnbalancedMerkleTreeRootAsync(leaves: Buffer[], hasher
|
|
25
|
+
export declare function computeUnbalancedMerkleTreeRootAsync(leaves: Buffer[], hasher: (left: Uint8Array, right: Uint8Array) => Promise<Buffer<ArrayBuffer>>, emptyRoot?: Buffer<ArrayBuffer>): Promise<Buffer>;
|
|
27
26
|
export declare function computeWonkyMerkleTreeRoot(leaves: Buffer[], valueToCompress?: Buffer<ArrayBuffer>, emptyRoot?: Buffer<ArrayBuffer>, hasher?: (lhs: Uint8Array<ArrayBufferLike>, rhs: Uint8Array<ArrayBufferLike>) => Buffer<ArrayBuffer>): Buffer;
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5iYWxhbmNlZF9tZXJrbGVfdHJlZV9yb290LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHJlZXMvdW5iYWxhbmNlZF9tZXJrbGVfdHJlZV9yb290LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLGVBQU8sTUFBTSx3QkFBd0IsZ0VBQStFLENBQUM7QUFFckgsZUFBTyxNQUFNLG1CQUFtQixnRUFBMkQsQ0FBQztBQUU1Rjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUFDSCx3QkFBZ0IsK0JBQStCLENBQzdDLE1BQU0sRUFBRSxNQUFNLEVBQUUsRUFDaEIsTUFBTSw4RkFBZ0IsRUFDdEIsU0FBUyxzQkFBbUIsR0FDM0IsTUFBTSxDQTZCUjtBQUVELHdCQUFzQixvQ0FBb0MsQ0FDeEQsTUFBTSxFQUFFLE1BQU0sRUFBRSxFQUNoQixNQUFNLEVBQUUsQ0FBQyxJQUFJLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxVQUFVLEtBQUssT0FBTyxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsQ0FBQyxFQUM3RSxTQUFTLHNCQUFtQixHQUMzQixPQUFPLENBQUMsTUFBTSxDQUFDLENBNkJqQjtBQU1ELHdCQUFnQiwwQkFBMEIsQ0FDeEMsTUFBTSxFQUFFLE1BQU0sRUFBRSxFQUNoQixlQUFlLHNCQUFtQixFQUNsQyxTQUFTLHNCQUFtQixFQUM1QixNQUFNLDhGQUFnQixHQUNyQixNQUFNLENBR1IifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unbalanced_merkle_tree_root.d.ts","sourceRoot":"","sources":["../../src/trees/unbalanced_merkle_tree_root.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,gEAA+E,CAAC;AAErH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"unbalanced_merkle_tree_root.d.ts","sourceRoot":"","sources":["../../src/trees/unbalanced_merkle_tree_root.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,gEAA+E,CAAC;AAErH,eAAO,MAAM,mBAAmB,gEAA2D,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EAAE,EAChB,MAAM,8FAAgB,EACtB,SAAS,sBAAmB,GAC3B,MAAM,CA6BR;AAED,wBAAsB,oCAAoC,CACxD,MAAM,EAAE,MAAM,EAAE,EAChB,MAAM,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAC7E,SAAS,sBAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,CA6BjB;AAMD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,EAAE,EAChB,eAAe,sBAAmB,EAClC,SAAS,sBAAmB,EAC5B,MAAM,8FAAgB,GACrB,MAAM,CAGR"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { computeBalancedMerkleTreeRoot, computeBalancedMerkleTreeRootAsync } from './balanced_merkle_tree_root.js';
|
|
2
|
-
import {
|
|
2
|
+
import { shaMerkleHash } from './hasher.js';
|
|
3
3
|
import { UnbalancedMerkleTreeCalculator } from './unbalanced_merkle_tree_calculator.js';
|
|
4
4
|
export const computeUnbalancedShaRoot = (leaves)=>computeUnbalancedMerkleTreeRoot(leaves, shaMerkleHash);
|
|
5
|
-
export const computeUnbalancedPoseidonRoot = async (leaves)=>await computeUnbalancedMerkleTreeRootAsync(leaves, poseidonMerkleHash);
|
|
6
5
|
export const computeWonkyShaRoot = (leaves)=>computeWonkyMerkleTreeRoot(leaves);
|
|
7
6
|
/**
|
|
8
7
|
* Computes the Merkle root of an unbalanced tree.
|
|
@@ -49,7 +48,7 @@ export const computeWonkyShaRoot = (leaves)=>computeWonkyMerkleTreeRoot(leaves);
|
|
|
49
48
|
}
|
|
50
49
|
return root;
|
|
51
50
|
}
|
|
52
|
-
export async function computeUnbalancedMerkleTreeRootAsync(leaves, hasher
|
|
51
|
+
export async function computeUnbalancedMerkleTreeRootAsync(leaves, hasher, emptyRoot = Buffer.alloc(32)) {
|
|
53
52
|
if (!leaves.length) {
|
|
54
53
|
return emptyRoot;
|
|
55
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/foundation",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.0dc957cde",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dest/index.js",
|
|
6
6
|
"types": "./dest/index.d.ts",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"./eth-address": "./dest/eth-address/index.js",
|
|
62
62
|
"./eth-signature": "./dest/eth-signature/index.js",
|
|
63
63
|
"./queue": "./dest/queue/index.js",
|
|
64
|
+
"./fifo": "./dest/fifo/index.js",
|
|
64
65
|
"./fs": "./dest/fs/index.js",
|
|
65
66
|
"./buffer": "./dest/buffer/index.js",
|
|
66
67
|
"./json-rpc": "./dest/json-rpc/index.js",
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
"testEnvironment": "../../foundation/src/jest/env.mjs"
|
|
145
146
|
},
|
|
146
147
|
"dependencies": {
|
|
147
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
148
|
+
"@aztec/bb.js": "0.0.1-commit.0dc957cde",
|
|
148
149
|
"@koa/cors": "^5.0.0",
|
|
149
150
|
"@noble/curves": "=1.7.0",
|
|
150
151
|
"@noble/hashes": "^1.6.1",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { BaseBuffer32 } from '../buffer/buffer32.js';
|
|
2
|
+
import { Buffer32 } from '../buffer/buffer32.js';
|
|
3
|
+
import type { Branded } from './types.js';
|
|
4
|
+
|
|
5
|
+
/** A branded Buffer32 representing a block proposal hash, used for p2p deduplication. */
|
|
6
|
+
export type BlockProposalHash = Branded<BaseBuffer32, 'BlockProposalHash'>;
|
|
7
|
+
|
|
8
|
+
/** Creates a BlockProposalHash from a BaseBuffer32. */
|
|
9
|
+
export function BlockProposalHash(buf: BaseBuffer32): BlockProposalHash {
|
|
10
|
+
return buf as BlockProposalHash;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Creates a BlockProposalHash from a raw Buffer. */
|
|
14
|
+
BlockProposalHash.fromBuffer = function (buf: Buffer): BlockProposalHash {
|
|
15
|
+
return new Buffer32(buf) as unknown as BlockProposalHash;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** A branded Buffer32 representing a checkpoint proposal hash, used for p2p deduplication. */
|
|
19
|
+
export type CheckpointProposalHash = Branded<BaseBuffer32, 'CheckpointProposalHash'>;
|
|
20
|
+
|
|
21
|
+
/** Creates a CheckpointProposalHash from a BaseBuffer32. */
|
|
22
|
+
export function CheckpointProposalHash(buf: BaseBuffer32): CheckpointProposalHash {
|
|
23
|
+
return buf as CheckpointProposalHash;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Creates a CheckpointProposalHash from a raw Buffer. */
|
|
27
|
+
CheckpointProposalHash.fromBuffer = function (buf: Buffer): CheckpointProposalHash {
|
|
28
|
+
return new Buffer32(buf) as unknown as CheckpointProposalHash;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** A branded Buffer32 representing a checkpoint attestation hash, used for p2p deduplication. */
|
|
32
|
+
export type CheckpointAttestationHash = Branded<BaseBuffer32, 'CheckpointAttestationHash'>;
|
|
33
|
+
|
|
34
|
+
/** Creates a CheckpointAttestationHash from a BaseBuffer32. */
|
|
35
|
+
export function CheckpointAttestationHash(buf: BaseBuffer32): CheckpointAttestationHash {
|
|
36
|
+
return buf as CheckpointAttestationHash;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Creates a CheckpointAttestationHash from a raw Buffer. */
|
|
40
|
+
CheckpointAttestationHash.fromBuffer = function (buf: Buffer): CheckpointAttestationHash {
|
|
41
|
+
return new Buffer32(buf) as unknown as CheckpointAttestationHash;
|
|
42
|
+
};
|
|
@@ -85,6 +85,11 @@ CheckpointNumber.isValid = function (value: unknown): value is CheckpointNumber
|
|
|
85
85
|
return typeof value === 'number' && Number.isInteger(value) && value >= 0;
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
+
/** Increments a CheckpointNumber by a given value. */
|
|
89
|
+
CheckpointNumber.add = function (n: CheckpointNumber, increment: number): CheckpointNumber {
|
|
90
|
+
return CheckpointNumber(n + increment);
|
|
91
|
+
};
|
|
92
|
+
|
|
88
93
|
/** The zero checkpoint value. */
|
|
89
94
|
CheckpointNumber.ZERO = CheckpointNumber(0);
|
|
90
95
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { BlockNumber, BlockNumberSchema, BlockNumberPositiveSchema } from './block_number.js';
|
|
2
|
+
export { BlockProposalHash, CheckpointAttestationHash, CheckpointProposalHash } from './buffer32_hash.js';
|
|
2
3
|
export { CheckpointNumber, CheckpointNumberSchema, CheckpointNumberPositiveSchema } from './checkpoint_number.js';
|
|
3
4
|
export { EpochNumber, EpochNumberSchema } from './epoch.js';
|
|
4
5
|
export { IndexWithinCheckpoint, IndexWithinCheckpointSchema } from './index_within_checkpoint.js';
|
|
@@ -73,6 +73,11 @@ SlotNumber.isValid = function (value: unknown): value is SlotNumber {
|
|
|
73
73
|
return typeof value === 'number' && Number.isInteger(value) && value >= 0;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
+
/** Increments a SlotNumber by a given value. */
|
|
77
|
+
SlotNumber.add = function (sn: SlotNumber, increment: number): SlotNumber {
|
|
78
|
+
return SlotNumber(sn + increment);
|
|
79
|
+
};
|
|
80
|
+
|
|
76
81
|
/**
|
|
77
82
|
* The zero slot value.
|
|
78
83
|
*/
|
package/src/buffer/buffer16.ts
CHANGED
|
@@ -10,6 +10,9 @@ import { bufferToHex } from '../string/index.js';
|
|
|
10
10
|
* A class representing a 16 byte Buffer.
|
|
11
11
|
*/
|
|
12
12
|
export class Buffer16 {
|
|
13
|
+
/** Branding for nominal typing. */
|
|
14
|
+
declare private readonly _branding: 'Buffer16';
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* The size of the hash in bytes.
|
|
15
18
|
*/
|
package/src/buffer/buffer32.ts
CHANGED
|
@@ -7,69 +7,39 @@ import { inspect } from 'util';
|
|
|
7
7
|
import { bufferToHex } from '../string/index.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Abstract unbranded base class for 32-byte buffers.
|
|
11
|
+
* Extend this instead of Buffer32 when defining a branded subtype
|
|
12
|
+
* to avoid inheriting Buffer32's `_branding`.
|
|
11
13
|
*/
|
|
12
|
-
export class
|
|
13
|
-
/**
|
|
14
|
-
* The size of the hash in bytes.
|
|
15
|
-
*/
|
|
14
|
+
export abstract class BaseBuffer32 {
|
|
15
|
+
/** The size of the buffer in bytes. */
|
|
16
16
|
public static SIZE = 32;
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* Buffer32 with value zero.
|
|
20
|
-
*/
|
|
21
|
-
public static ZERO = new Buffer32(Buffer.alloc(Buffer32.SIZE));
|
|
22
|
-
|
|
23
18
|
constructor(
|
|
24
|
-
/**
|
|
25
|
-
* The buffer containing the hash.
|
|
26
|
-
*/
|
|
19
|
+
/** The buffer containing the data. */
|
|
27
20
|
public buffer: Buffer,
|
|
28
21
|
) {
|
|
29
|
-
if (buffer.length !==
|
|
30
|
-
throw new Error(`Expected buffer to have length ${
|
|
22
|
+
if (buffer.length !== BaseBuffer32.SIZE) {
|
|
23
|
+
throw new Error(`Expected buffer to have length ${BaseBuffer32.SIZE} but was ${buffer.length}`);
|
|
31
24
|
}
|
|
32
25
|
}
|
|
33
26
|
|
|
34
|
-
/**
|
|
35
|
-
* Returns the raw buffer of the hash.
|
|
36
|
-
* @returns The buffer containing the hash.
|
|
37
|
-
*/
|
|
27
|
+
/** Returns the raw buffer. */
|
|
38
28
|
public toBuffer() {
|
|
39
29
|
return this.buffer;
|
|
40
30
|
}
|
|
41
31
|
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
* @param buffer - The buffer to create from.
|
|
45
|
-
* @returns A new Buffer32 object.
|
|
46
|
-
*/
|
|
47
|
-
public static fromBuffer(buffer: Buffer | BufferReader) {
|
|
48
|
-
const reader = BufferReader.asReader(buffer);
|
|
49
|
-
return new Buffer32(reader.readBytes(Buffer32.SIZE));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Checks if this hash and another hash are equal.
|
|
54
|
-
* @param hash - A hash to compare with.
|
|
55
|
-
* @returns True if the hashes are equal, false otherwise.
|
|
56
|
-
*/
|
|
57
|
-
public equals(hash: Buffer32): boolean {
|
|
32
|
+
/** Checks if this and another buffer are equal. */
|
|
33
|
+
public equals(hash: BaseBuffer32): boolean {
|
|
58
34
|
return this.buffer.equals(hash.buffer);
|
|
59
35
|
}
|
|
60
36
|
|
|
61
|
-
/**
|
|
62
|
-
* Returns true if this hash is zero.
|
|
63
|
-
* @returns True if this hash is zero.
|
|
64
|
-
*/
|
|
37
|
+
/** Returns true if all bytes are zero. */
|
|
65
38
|
public isZero(): boolean {
|
|
66
39
|
return this.buffer.equals(Buffer.alloc(32, 0));
|
|
67
40
|
}
|
|
68
41
|
|
|
69
|
-
/**
|
|
70
|
-
* Convert this hash to a hex string.
|
|
71
|
-
* @returns The hex string.
|
|
72
|
-
*/
|
|
42
|
+
/** Convert to a hex string. */
|
|
73
43
|
public toString() {
|
|
74
44
|
return bufferToHex(this.buffer);
|
|
75
45
|
}
|
|
@@ -82,16 +52,27 @@ export class Buffer32 {
|
|
|
82
52
|
return this.toString();
|
|
83
53
|
}
|
|
84
54
|
|
|
85
|
-
/**
|
|
86
|
-
* Convert this hash to a big int.
|
|
87
|
-
* @returns The big int.
|
|
88
|
-
*/
|
|
55
|
+
/** Convert to a big int. */
|
|
89
56
|
public toBigInt() {
|
|
90
|
-
return deserializeBigInt(this.buffer, 0,
|
|
57
|
+
return deserializeBigInt(this.buffer, 0, BaseBuffer32.SIZE).elem;
|
|
91
58
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** A branded 32-byte buffer. */
|
|
62
|
+
export class Buffer32 extends BaseBuffer32 {
|
|
63
|
+
/** Branding for nominal typing. */
|
|
64
|
+
declare private readonly _branding: 'Buffer32';
|
|
65
|
+
|
|
66
|
+
/** Buffer32 with value zero. */
|
|
67
|
+
public static ZERO = new Buffer32(Buffer.alloc(Buffer32.SIZE));
|
|
68
|
+
|
|
69
|
+
/** Creates a Buffer32 from a buffer. */
|
|
70
|
+
public static fromBuffer(buffer: Buffer | BufferReader) {
|
|
71
|
+
const reader = BufferReader.asReader(buffer);
|
|
72
|
+
return new Buffer32(reader.readBytes(Buffer32.SIZE));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Creates a Buffer32 from a bigint. */
|
|
95
76
|
public static fromBigInt(hash: bigint) {
|
|
96
77
|
return new Buffer32(serializeBigInt(hash, Buffer32.SIZE));
|
|
97
78
|
}
|
|
@@ -101,8 +82,7 @@ export class Buffer32 {
|
|
|
101
82
|
}
|
|
102
83
|
|
|
103
84
|
/**
|
|
104
|
-
* Converts
|
|
105
|
-
* Verifies the input is 28 bytes.
|
|
85
|
+
* Converts from a buffer of 28 bytes.
|
|
106
86
|
* @param buffer - The 28 byte buffer to construct from.
|
|
107
87
|
* @returns A Buffer32 created from the input buffer with 4 bytes 0 padding at the front.
|
|
108
88
|
*/
|
|
@@ -114,9 +94,7 @@ export class Buffer32 {
|
|
|
114
94
|
return new Buffer32(padded);
|
|
115
95
|
}
|
|
116
96
|
|
|
117
|
-
/**
|
|
118
|
-
* Converts a string into a Buffer32 object.
|
|
119
|
-
*/
|
|
97
|
+
/** Converts a string into a Buffer32 object. */
|
|
120
98
|
public static fromString(str: string): Buffer32 {
|
|
121
99
|
if (str.startsWith('0x')) {
|
|
122
100
|
str = str.slice(2);
|
|
@@ -127,19 +105,12 @@ export class Buffer32 {
|
|
|
127
105
|
return new Buffer32(Buffer.from(str, 'hex'));
|
|
128
106
|
}
|
|
129
107
|
|
|
130
|
-
/**
|
|
131
|
-
* Converts a number into a Buffer32 object.
|
|
132
|
-
* @param num - The number to convert.
|
|
133
|
-
* @returns A new Buffer32 object.
|
|
134
|
-
*/
|
|
108
|
+
/** Converts a number into a Buffer32 object. */
|
|
135
109
|
public static fromNumber(num: number): Buffer32 {
|
|
136
110
|
return new Buffer32(serializeBigInt(BigInt(num), Buffer32.SIZE));
|
|
137
111
|
}
|
|
138
112
|
|
|
139
|
-
/**
|
|
140
|
-
* Generates a random Buffer32.
|
|
141
|
-
* @returns A new Buffer32 object.
|
|
142
|
-
*/
|
|
113
|
+
/** Generates a random Buffer32. */
|
|
143
114
|
public static random(): Buffer32 {
|
|
144
115
|
return new Buffer32(Buffer.from(randomBytes(Buffer32.SIZE)));
|
|
145
116
|
}
|
package/src/buffer/index.ts
CHANGED
package/src/collection/array.ts
CHANGED
|
@@ -315,3 +315,17 @@ export function partition<T>(items: T[], predicate: (item: T) => boolean): [T[],
|
|
|
315
315
|
}
|
|
316
316
|
return [pass, fail];
|
|
317
317
|
}
|
|
318
|
+
|
|
319
|
+
/** Partitions the given iterable into two arrays based on the predicate. */
|
|
320
|
+
export async function partitionAsync<T>(items: T[], predicate: (item: T) => Promise<boolean>): Promise<[T[], T[]]> {
|
|
321
|
+
const pass: T[] = [];
|
|
322
|
+
const fail: T[] = [];
|
|
323
|
+
for (const item of items) {
|
|
324
|
+
if (await predicate(item)) {
|
|
325
|
+
pass.push(item);
|
|
326
|
+
} else {
|
|
327
|
+
fail.push(item);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return [pass, fail];
|
|
331
|
+
}
|
package/src/collection/index.ts
CHANGED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/** Node in a doubly-linked list used by {@link LruSet}. */
|
|
2
|
+
type LruNode<T> = {
|
|
3
|
+
value: T;
|
|
4
|
+
prev: LruNode<T> | undefined;
|
|
5
|
+
next: LruNode<T> | undefined;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A bounded set with Least Recently Used (LRU) eviction.
|
|
10
|
+
* Both {@link has} and {@link add} count as an access and refresh the entry's
|
|
11
|
+
* recency, so items that are actively checked stay in the set longest.
|
|
12
|
+
*
|
|
13
|
+
* Uses a doubly-linked list for O(1) ordering and a Map for O(1) lookup.
|
|
14
|
+
* Head = least recent, tail = most recent.
|
|
15
|
+
*/
|
|
16
|
+
export class LruSet<T> {
|
|
17
|
+
/** Map from value to its linked-list node for O(1) lookup. */
|
|
18
|
+
private readonly map = new Map<T, LruNode<T>>();
|
|
19
|
+
private head: LruNode<T> | undefined;
|
|
20
|
+
private tail: LruNode<T> | undefined;
|
|
21
|
+
|
|
22
|
+
constructor(private readonly maxSize: number) {
|
|
23
|
+
if (maxSize < 1) {
|
|
24
|
+
throw new Error('LruSet maxSize must be at least 1');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Number of entries in the set. */
|
|
29
|
+
get size(): number {
|
|
30
|
+
return this.map.size;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Returns true if the item is in the set.
|
|
35
|
+
* Refreshes the item's recency so it becomes the most recently used.
|
|
36
|
+
*/
|
|
37
|
+
has(item: T): boolean {
|
|
38
|
+
const node = this.map.get(item);
|
|
39
|
+
if (!node) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
this.moveToTail(node);
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Adds an item to the set. If the item already exists, refreshes its recency.
|
|
48
|
+
* If the set is at capacity, evicts the least recently used item.
|
|
49
|
+
*/
|
|
50
|
+
add(item: T): void {
|
|
51
|
+
const existing = this.map.get(item);
|
|
52
|
+
if (existing) {
|
|
53
|
+
this.moveToTail(existing);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (this.map.size >= this.maxSize) {
|
|
58
|
+
this.evictHead();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const node: LruNode<T> = { value: item, prev: this.tail, next: undefined };
|
|
62
|
+
if (this.tail) {
|
|
63
|
+
this.tail.next = node;
|
|
64
|
+
} else {
|
|
65
|
+
this.head = node;
|
|
66
|
+
}
|
|
67
|
+
this.tail = node;
|
|
68
|
+
this.map.set(item, node);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Removes all entries from the set. */
|
|
72
|
+
clear(): void {
|
|
73
|
+
this.map.clear();
|
|
74
|
+
this.head = undefined;
|
|
75
|
+
this.tail = undefined;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Unlinks a node from its current position and relinks it at the tail. */
|
|
79
|
+
private moveToTail(node: LruNode<T>): void {
|
|
80
|
+
if (node === this.tail) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Unlink
|
|
85
|
+
if (node.prev) {
|
|
86
|
+
node.prev.next = node.next;
|
|
87
|
+
} else {
|
|
88
|
+
this.head = node.next;
|
|
89
|
+
}
|
|
90
|
+
if (node.next) {
|
|
91
|
+
node.next.prev = node.prev;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Relink at tail
|
|
95
|
+
node.prev = this.tail;
|
|
96
|
+
node.next = undefined;
|
|
97
|
+
if (this.tail) {
|
|
98
|
+
this.tail.next = node;
|
|
99
|
+
}
|
|
100
|
+
this.tail = node;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Evicts the head (least recently used) node. */
|
|
104
|
+
private evictHead(): void {
|
|
105
|
+
const oldHead = this.head!;
|
|
106
|
+
this.map.delete(oldHead.value);
|
|
107
|
+
|
|
108
|
+
this.head = oldHead.next;
|
|
109
|
+
if (this.head) {
|
|
110
|
+
this.head.prev = undefined;
|
|
111
|
+
} else {
|
|
112
|
+
this.tail = undefined;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
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
8
|
| 'ARCHIVER_MAX_LOGS'
|
|
10
9
|
| 'ARCHIVER_POLLING_INTERVAL_MS'
|
|
10
|
+
| 'ARCHIVER_SKIP_HISTORICAL_LOGS_CHECK'
|
|
11
11
|
| 'ARCHIVER_URL'
|
|
12
12
|
| 'ARCHIVER_VIEM_POLLING_INTERVAL_MS'
|
|
13
13
|
| 'ARCHIVER_BATCH_SIZE'
|
|
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,8 @@ 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'
|
|
23
29
|
| 'BOOTSTRAP_NODES'
|
|
24
30
|
| 'BLOB_ARCHIVE_API_URL'
|
|
25
31
|
| 'BLOB_FILE_STORE_URLS'
|
|
@@ -59,6 +65,7 @@ export type EnvVar =
|
|
|
59
65
|
| 'BLOB_SINK_MAP_SIZE_KB'
|
|
60
66
|
| 'P2P_STORE_MAP_SIZE_KB'
|
|
61
67
|
| 'PROVER_BROKER_STORE_MAP_SIZE_KB'
|
|
68
|
+
| 'SIGNING_PROTECTION_MAP_SIZE_KB'
|
|
62
69
|
| 'WS_DB_MAP_SIZE_KB'
|
|
63
70
|
| 'ARCHIVE_TREE_MAP_SIZE_KB'
|
|
64
71
|
| 'NULLIFIER_TREE_MAP_SIZE_KB'
|
|
@@ -67,6 +74,7 @@ export type EnvVar =
|
|
|
67
74
|
| 'PUBLIC_DATA_TREE_MAP_SIZE_KB'
|
|
68
75
|
| 'DEBUG'
|
|
69
76
|
| 'DEBUG_P2P_DISABLE_COLOCATION_PENALTY'
|
|
77
|
+
| 'ENABLE_PROVER_NODE'
|
|
70
78
|
| 'ETHEREUM_HOSTS'
|
|
71
79
|
| 'ETHEREUM_DEBUG_HOSTS'
|
|
72
80
|
| 'ETHEREUM_ALLOW_NO_DEBUG_HOSTS'
|
|
@@ -76,8 +84,10 @@ export type EnvVar =
|
|
|
76
84
|
| 'KEY_STORE_DIRECTORY'
|
|
77
85
|
| 'L1_CHAIN_ID'
|
|
78
86
|
| 'L1_CONSENSUS_HOST_URLS'
|
|
87
|
+
| 'ETHEREUM_HTTP_TIMEOUT_MS'
|
|
79
88
|
| 'L1_CONSENSUS_HOST_API_KEYS'
|
|
80
89
|
| 'L1_CONSENSUS_HOST_API_KEY_HEADERS'
|
|
90
|
+
| 'L1_TX_FAILED_STORE'
|
|
81
91
|
| 'LOG_JSON'
|
|
82
92
|
| 'LOG_MULTILINE'
|
|
83
93
|
| 'LOG_NO_COLOR_PER_ACTOR'
|
|
@@ -85,7 +95,6 @@ export type EnvVar =
|
|
|
85
95
|
| 'MNEMONIC'
|
|
86
96
|
| 'NETWORK'
|
|
87
97
|
| 'NETWORK_CONFIG_LOCATION'
|
|
88
|
-
| 'NO_PXE'
|
|
89
98
|
| 'USE_GCLOUD_LOGGING'
|
|
90
99
|
| 'OTEL_EXPORTER_OTLP_METRICS_ENDPOINT'
|
|
91
100
|
| 'OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'
|
|
@@ -124,6 +133,7 @@ export type EnvVar =
|
|
|
124
133
|
| 'P2P_L2_QUEUE_SIZE'
|
|
125
134
|
| 'P2P_MAX_PEERS'
|
|
126
135
|
| 'P2P_PEER_CHECK_INTERVAL_MS'
|
|
136
|
+
| 'P2P_PEER_FAILED_BAN_TIME_MS'
|
|
127
137
|
| 'P2P_PEER_PENALTY_VALUES'
|
|
128
138
|
| 'P2P_QUERY_FOR_IP'
|
|
129
139
|
| 'P2P_REQRESP_INDIVIDUAL_REQUEST_TIMEOUT_MS'
|
|
@@ -144,10 +154,10 @@ export type EnvVar =
|
|
|
144
154
|
| 'P2P_PREFERRED_PEERS'
|
|
145
155
|
| 'P2P_MAX_PENDING_TX_COUNT'
|
|
146
156
|
| 'P2P_SEEN_MSG_CACHE_SIZE'
|
|
147
|
-
| 'P2P_DROP_TX'
|
|
148
157
|
| 'P2P_DROP_TX_CHANCE'
|
|
149
158
|
| 'P2P_TX_POOL_DELETE_TXS_AFTER_REORG'
|
|
150
159
|
| 'P2P_MIN_TX_POOL_AGE_MS'
|
|
160
|
+
| 'P2P_RPC_PRICE_BUMP_PERCENTAGE'
|
|
151
161
|
| 'DEBUG_P2P_INSTRUMENT_MESSAGES'
|
|
152
162
|
| 'PEER_ID_PRIVATE_KEY'
|
|
153
163
|
| 'PEER_ID_PRIVATE_KEY_PATH'
|
|
@@ -163,6 +173,7 @@ export type EnvVar =
|
|
|
163
173
|
| 'PROVER_BROKER_MAX_EPOCHS_TO_KEEP_RESULTS_FOR'
|
|
164
174
|
| 'PROVER_BROKER_DEBUG_REPLAY_ENABLED'
|
|
165
175
|
| 'PROVER_CANCEL_JOBS_ON_STOP'
|
|
176
|
+
| 'PROVER_ENQUEUE_CONCURRENCY'
|
|
166
177
|
| 'PROVER_COORDINATION_NODE_URLS'
|
|
167
178
|
| 'PROVER_PROOF_STORE'
|
|
168
179
|
| 'PROVER_FAILED_PROOF_STORE'
|
|
@@ -196,27 +207,33 @@ export type EnvVar =
|
|
|
196
207
|
| 'SENTINEL_ENABLED'
|
|
197
208
|
| 'SENTINEL_HISTORY_LENGTH_IN_EPOCHS'
|
|
198
209
|
| 'SENTINEL_HISTORIC_PROVEN_PERFORMANCE_LENGTH_IN_EPOCHS'
|
|
199
|
-
| '
|
|
210
|
+
| 'SEQ_ENABLE_PROPOSER_PIPELINING'
|
|
200
211
|
| 'SEQ_MAX_TX_PER_BLOCK'
|
|
212
|
+
| 'SEQ_MAX_TX_PER_CHECKPOINT'
|
|
201
213
|
| 'SEQ_MIN_TX_PER_BLOCK'
|
|
202
214
|
| 'SEQ_PUBLISH_TXS_WITH_PROPOSALS'
|
|
203
215
|
| 'SEQ_MAX_DA_BLOCK_GAS'
|
|
204
216
|
| 'SEQ_MAX_L2_BLOCK_GAS'
|
|
217
|
+
| 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER'
|
|
218
|
+
| 'SEQ_REDISTRIBUTE_CHECKPOINT_BUDGET'
|
|
205
219
|
| 'SEQ_PUBLISHER_PRIVATE_KEY'
|
|
206
220
|
| 'SEQ_PUBLISHER_PRIVATE_KEYS'
|
|
207
221
|
| 'SEQ_PUBLISHER_ADDRESSES'
|
|
208
222
|
| 'SEQ_PUBLISHER_ALLOW_INVALID_STATES'
|
|
209
223
|
| 'SEQ_PUBLISHER_FORWARDER_ADDRESS'
|
|
224
|
+
| 'PUBLISHER_FUNDING_THRESHOLD'
|
|
225
|
+
| 'PUBLISHER_FUNDING_AMOUNT'
|
|
210
226
|
| 'SEQ_POLLING_INTERVAL_MS'
|
|
211
227
|
| 'SEQ_ENFORCE_TIME_TABLE'
|
|
212
228
|
| 'SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT'
|
|
213
229
|
| 'SEQ_ATTESTATION_PROPAGATION_TIME'
|
|
214
230
|
| 'SEQ_BLOCK_DURATION_MS'
|
|
231
|
+
| 'SEQ_LAST_BLOCK_DURATION_MS'
|
|
232
|
+
| 'SEQ_EXPECTED_BLOCK_PROPOSALS_PER_SLOT'
|
|
215
233
|
| 'SEQ_BUILD_CHECKPOINT_IF_EMPTY'
|
|
216
234
|
| 'SEQ_SECONDS_BEFORE_INVALIDATING_BLOCK_AS_COMMITTEE_MEMBER'
|
|
217
235
|
| 'SEQ_SECONDS_BEFORE_INVALIDATING_BLOCK_AS_NON_COMMITTEE_MEMBER'
|
|
218
|
-
| '
|
|
219
|
-
| 'SLASH_MAX_PENALTY_PERCENTAGE'
|
|
236
|
+
| 'SEQ_SKIP_CHECKPOINT_PUBLISH_PERCENT'
|
|
220
237
|
| 'SLASH_VALIDATORS_ALWAYS'
|
|
221
238
|
| 'SLASH_VALIDATORS_NEVER'
|
|
222
239
|
| 'SLASH_PRUNE_PENALTY'
|
|
@@ -241,6 +258,7 @@ export type EnvVar =
|
|
|
241
258
|
| 'TELEMETRY'
|
|
242
259
|
| 'TEST_ACCOUNTS'
|
|
243
260
|
| 'SPONSORED_FPC'
|
|
261
|
+
| 'PREFUND_ADDRESSES'
|
|
244
262
|
| 'TX_COLLECTION_FAST_NODES_TIMEOUT_BEFORE_REQ_RESP_MS'
|
|
245
263
|
| 'TX_COLLECTION_SLOW_NODES_INTERVAL_MS'
|
|
246
264
|
| 'TX_COLLECTION_SLOW_REQ_RESP_INTERVAL_MS'
|
|
@@ -270,15 +288,19 @@ export type EnvVar =
|
|
|
270
288
|
| 'TRANSACTIONS_DISABLED'
|
|
271
289
|
| 'VALIDATOR_ATTESTATIONS_POLLING_INTERVAL_MS'
|
|
272
290
|
| 'VALIDATOR_DISABLED'
|
|
291
|
+
| 'VALIDATOR_MAX_DA_BLOCK_GAS'
|
|
292
|
+
| 'VALIDATOR_MAX_L2_BLOCK_GAS'
|
|
293
|
+
| 'VALIDATOR_MAX_TX_PER_BLOCK'
|
|
294
|
+
| 'VALIDATOR_MAX_TX_PER_CHECKPOINT'
|
|
273
295
|
| 'VALIDATOR_PRIVATE_KEYS'
|
|
274
296
|
| 'VALIDATOR_PRIVATE_KEY'
|
|
275
|
-
| 'VALIDATOR_REEXECUTE'
|
|
276
297
|
| 'VALIDATOR_ADDRESSES'
|
|
277
298
|
| 'ROLLUP_VERSION'
|
|
278
299
|
| 'WS_BLOCK_CHECK_INTERVAL_MS'
|
|
279
300
|
| 'WS_BLOCK_REQUEST_BATCH_SIZE'
|
|
280
301
|
| 'L1_READER_VIEM_POLLING_INTERVAL_MS'
|
|
281
302
|
| 'WS_DATA_DIRECTORY'
|
|
303
|
+
| 'WS_NUM_HISTORIC_CHECKPOINTS'
|
|
282
304
|
| 'WS_NUM_HISTORIC_BLOCKS'
|
|
283
305
|
| 'ETHEREUM_SLOT_DURATION'
|
|
284
306
|
| 'AZTEC_SLOT_DURATION'
|
|
@@ -304,7 +326,7 @@ export type EnvVar =
|
|
|
304
326
|
| 'AZTEC_SLASH_AMOUNT_SMALL'
|
|
305
327
|
| 'AZTEC_SLASH_AMOUNT_MEDIUM'
|
|
306
328
|
| 'AZTEC_SLASH_AMOUNT_LARGE'
|
|
307
|
-
| '
|
|
329
|
+
| 'AZTEC_SLASHER_ENABLED'
|
|
308
330
|
| 'AZTEC_GOVERNANCE_PROPOSER_QUORUM'
|
|
309
331
|
| 'AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE'
|
|
310
332
|
| 'AZTEC_GOVERNANCE_VOTING_DURATION'
|
|
@@ -333,12 +355,12 @@ export type EnvVar =
|
|
|
333
355
|
| 'K8S_POD_NAME'
|
|
334
356
|
| 'K8S_POD_UID'
|
|
335
357
|
| 'K8S_NAMESPACE_NAME'
|
|
336
|
-
| '
|
|
337
|
-
| 'AUTO_UPDATE'
|
|
338
|
-
| 'AUTO_UPDATE_URL'
|
|
358
|
+
| 'ENABLE_VERSION_CHECK'
|
|
339
359
|
| 'WEB3_SIGNER_URL'
|
|
340
360
|
| 'SKIP_ARCHIVER_INITIAL_SYNC'
|
|
341
361
|
| 'BLOB_ALLOW_EMPTY_SOURCES'
|
|
362
|
+
| 'BLOB_PREFER_FILESTORES'
|
|
363
|
+
| 'BLOB_FILE_STORE_TIMEOUT_MS'
|
|
342
364
|
| 'FISHERMAN_MODE'
|
|
343
365
|
| 'MAX_ALLOWED_ETH_CLIENT_DRIFT_SECONDS'
|
|
344
366
|
| 'LEGACY_BLS_CLI'
|