@aztec/validator-client 0.77.0-testnet-ignition.26 → 0.77.0-testnet-ignition.28
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/package.json +7 -7
- package/dest/config.d.ts +0 -22
- package/dest/config.d.ts.map +0 -1
- package/dest/duties/validation_service.d.ts +0 -29
- package/dest/duties/validation_service.d.ts.map +0 -1
- package/dest/errors/index.d.ts +0 -2
- package/dest/errors/index.d.ts.map +0 -1
- package/dest/errors/validator.error.d.ts +0 -29
- package/dest/errors/validator.error.d.ts.map +0 -1
- package/dest/factory.d.ts +0 -13
- package/dest/factory.d.ts.map +0 -1
- package/dest/index.d.ts +0 -4
- package/dest/index.d.ts.map +0 -1
- package/dest/key_store/index.d.ts +0 -3
- package/dest/key_store/index.d.ts.map +0 -1
- package/dest/key_store/interface.d.ts +0 -25
- package/dest/key_store/interface.d.ts.map +0 -1
- package/dest/key_store/local_key_store.d.ts +0 -28
- package/dest/key_store/local_key_store.d.ts.map +0 -1
- package/dest/metrics.d.ts +0 -11
- package/dest/metrics.d.ts.map +0 -1
- package/dest/validator.d.ts +0 -81
- package/dest/validator.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/validator-client",
|
|
3
|
-
"version": "0.77.0-testnet-ignition.
|
|
3
|
+
"version": "0.77.0-testnet-ignition.28",
|
|
4
4
|
"main": "dest/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@aztec/epoch-cache": "0.77.0-testnet-ignition.
|
|
66
|
-
"@aztec/ethereum": "0.77.0-testnet-ignition.
|
|
67
|
-
"@aztec/foundation": "0.77.0-testnet-ignition.
|
|
68
|
-
"@aztec/p2p": "0.77.0-testnet-ignition.
|
|
69
|
-
"@aztec/stdlib": "0.77.0-testnet-ignition.
|
|
70
|
-
"@aztec/telemetry-client": "0.77.0-testnet-ignition.
|
|
65
|
+
"@aztec/epoch-cache": "0.77.0-testnet-ignition.28",
|
|
66
|
+
"@aztec/ethereum": "0.77.0-testnet-ignition.28",
|
|
67
|
+
"@aztec/foundation": "0.77.0-testnet-ignition.28",
|
|
68
|
+
"@aztec/p2p": "0.77.0-testnet-ignition.28",
|
|
69
|
+
"@aztec/stdlib": "0.77.0-testnet-ignition.28",
|
|
70
|
+
"@aztec/telemetry-client": "0.77.0-testnet-ignition.28",
|
|
71
71
|
"koa": "^2.14.2",
|
|
72
72
|
"koa-router": "^12.0.0",
|
|
73
73
|
"tslib": "^2.4.0",
|
package/dest/config.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type ConfigMappingsType } from '@aztec/foundation/config';
|
|
2
|
-
/**
|
|
3
|
-
* The Validator Configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface ValidatorClientConfig {
|
|
6
|
-
/** The private key of the validator participating in attestation duties */
|
|
7
|
-
validatorPrivateKey?: string;
|
|
8
|
-
/** Do not run the validator */
|
|
9
|
-
disableValidator: boolean;
|
|
10
|
-
/** Interval between polling for new attestations from peers */
|
|
11
|
-
attestationPollingIntervalMs: number;
|
|
12
|
-
/** Re-execute transactions before attesting */
|
|
13
|
-
validatorReexecute: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const validatorClientConfigMappings: ConfigMappingsType<ValidatorClientConfig>;
|
|
16
|
-
/**
|
|
17
|
-
* Returns the prover configuration from the environment variables.
|
|
18
|
-
* Note: If an environment variable is not set, the default value is used.
|
|
19
|
-
* @returns The validator configuration.
|
|
20
|
-
*/
|
|
21
|
-
export declare function getProverEnvVars(): ValidatorClientConfig;
|
|
22
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dest/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,+BAA+B;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAE1B,+DAA+D;IAC/D,4BAA4B,EAAE,MAAM,CAAC;IAErC,+CAA+C;IAC/C,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,6BAA6B,EAAE,kBAAkB,CAAC,qBAAqB,CAqBnF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,qBAAqB,CAExD"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { BlockAttestation, BlockProposal } from '@aztec/stdlib/p2p';
|
|
3
|
-
import type { BlockHeader, TxHash } from '@aztec/stdlib/tx';
|
|
4
|
-
import type { ValidatorKeyStore } from '../key_store/interface.js';
|
|
5
|
-
export declare class ValidationService {
|
|
6
|
-
private keyStore;
|
|
7
|
-
constructor(keyStore: ValidatorKeyStore);
|
|
8
|
-
/**
|
|
9
|
-
* Create a block proposal with the given header, archive, and transactions
|
|
10
|
-
*
|
|
11
|
-
* @param header - The block header
|
|
12
|
-
* @param archive - The archive of the current block
|
|
13
|
-
* @param txs - TxHash[] ordered list of transactions
|
|
14
|
-
*
|
|
15
|
-
* @returns A block proposal signing the above information (not the current implementation!!!)
|
|
16
|
-
*/
|
|
17
|
-
createBlockProposal(header: BlockHeader, archive: Fr, txs: TxHash[]): Promise<BlockProposal>;
|
|
18
|
-
/**
|
|
19
|
-
* Attest to the given block proposal constructed by the current sequencer
|
|
20
|
-
*
|
|
21
|
-
* NOTE: This is just a blind signing.
|
|
22
|
-
* We assume that the proposal is valid and DA guarantees have been checked previously.
|
|
23
|
-
*
|
|
24
|
-
* @param proposal - The proposal to attest to
|
|
25
|
-
* @returns attestation
|
|
26
|
-
*/
|
|
27
|
-
attestToProposal(proposal: BlockProposal): Promise<BlockAttestation>;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=validation_service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation_service.d.ts","sourceRoot":"","sources":["../../src/duties/validation_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAA8C,MAAM,mBAAmB,CAAC;AAChH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,iBAAiB;IAE/C;;;;;;;;OAQG;IACH,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAM5F;;;;;;;;OAQG;IACG,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAS3E"}
|
package/dest/errors/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { TxHash } from '@aztec/stdlib/tx';
|
|
2
|
-
export declare class ValidatorError extends Error {
|
|
3
|
-
constructor(message: string);
|
|
4
|
-
}
|
|
5
|
-
export declare class InvalidValidatorPrivateKeyError extends ValidatorError {
|
|
6
|
-
constructor();
|
|
7
|
-
}
|
|
8
|
-
export declare class AttestationTimeoutError extends ValidatorError {
|
|
9
|
-
constructor(numberOfRequiredAttestations: number, slot: bigint);
|
|
10
|
-
}
|
|
11
|
-
export declare class TransactionsNotAvailableError extends ValidatorError {
|
|
12
|
-
constructor(txHashes: TxHash[]);
|
|
13
|
-
}
|
|
14
|
-
export declare class FailedToReExecuteTransactionsError extends ValidatorError {
|
|
15
|
-
constructor(txHashes: TxHash[]);
|
|
16
|
-
}
|
|
17
|
-
export declare class ReExStateMismatchError extends ValidatorError {
|
|
18
|
-
constructor();
|
|
19
|
-
}
|
|
20
|
-
export declare class ReExFailedTxsError extends ValidatorError {
|
|
21
|
-
constructor(numFailedTxs: number);
|
|
22
|
-
}
|
|
23
|
-
export declare class ReExTimeoutError extends ValidatorError {
|
|
24
|
-
constructor();
|
|
25
|
-
}
|
|
26
|
-
export declare class BlockBuilderNotProvidedError extends ValidatorError {
|
|
27
|
-
constructor();
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=validator.error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator.error.d.ts","sourceRoot":"","sources":["../../src/errors/validator.error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,+BAAgC,SAAQ,cAAc;;CAIlE;AAED,qBAAa,uBAAwB,SAAQ,cAAc;gBAC7C,4BAA4B,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAG/D;AAED,qBAAa,6BAA8B,SAAQ,cAAc;gBACnD,QAAQ,EAAE,MAAM,EAAE;CAG/B;AAED,qBAAa,kCAAmC,SAAQ,cAAc;gBACxD,QAAQ,EAAE,MAAM,EAAE;CAG/B;AAED,qBAAa,sBAAuB,SAAQ,cAAc;;CAIzD;AAED,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,YAAY,EAAE,MAAM;CAGjC;AAED,qBAAa,gBAAiB,SAAQ,cAAc;;CAInD;AAED,qBAAa,4BAA6B,SAAQ,cAAc;;CAI/D"}
|
package/dest/factory.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
|
-
import type { DateProvider } from '@aztec/foundation/timer';
|
|
3
|
-
import type { P2P } from '@aztec/p2p';
|
|
4
|
-
import type { TelemetryClient } from '@aztec/telemetry-client';
|
|
5
|
-
import type { ValidatorClientConfig } from './config.js';
|
|
6
|
-
import { ValidatorClient } from './validator.js';
|
|
7
|
-
export declare function createValidatorClient(config: ValidatorClientConfig, deps: {
|
|
8
|
-
p2pClient: P2P;
|
|
9
|
-
telemetry: TelemetryClient;
|
|
10
|
-
dateProvider: DateProvider;
|
|
11
|
-
epochCache: EpochCache;
|
|
12
|
-
}): ValidatorClient | undefined;
|
|
13
|
-
//# sourceMappingURL=factory.d.ts.map
|
package/dest/factory.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE;IACJ,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,eAAe,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;CACxB,+BAUF"}
|
package/dest/index.d.ts
DELETED
package/dest/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/key_store/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
-
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
4
|
-
/** Key Store
|
|
5
|
-
*
|
|
6
|
-
* A keystore interface that can be replaced with a local keystore / remote signer service
|
|
7
|
-
*/
|
|
8
|
-
export interface ValidatorKeyStore {
|
|
9
|
-
/**
|
|
10
|
-
* Get the address of the signer
|
|
11
|
-
*
|
|
12
|
-
* @returns the address
|
|
13
|
-
*/
|
|
14
|
-
getAddress(): EthAddress;
|
|
15
|
-
sign(message: Buffer32): Promise<Signature>;
|
|
16
|
-
/**
|
|
17
|
-
* Flavor of sign message that followed EIP-712 eth signed message prefix
|
|
18
|
-
* Note: this is only required when we are using ecdsa signatures over secp256k1
|
|
19
|
-
*
|
|
20
|
-
* @param message - The message to sign.
|
|
21
|
-
* @returns The signature.
|
|
22
|
-
*/
|
|
23
|
-
signMessage(message: Buffer32): Promise<Signature>;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/key_store/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,UAAU,IAAI,UAAU,CAAC;IAEzB,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5C;;;;;;OAMG;IACH,WAAW,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACpD"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
-
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
4
|
-
import type { ValidatorKeyStore } from './interface.js';
|
|
5
|
-
/**
|
|
6
|
-
* Local Key Store
|
|
7
|
-
*
|
|
8
|
-
* An implementation of the Key store using an in memory private key.
|
|
9
|
-
*/
|
|
10
|
-
export declare class LocalKeyStore implements ValidatorKeyStore {
|
|
11
|
-
private signer;
|
|
12
|
-
constructor(privateKey: Buffer32);
|
|
13
|
-
/**
|
|
14
|
-
* Get the address of the signer
|
|
15
|
-
*
|
|
16
|
-
* @returns the address
|
|
17
|
-
*/
|
|
18
|
-
getAddress(): EthAddress;
|
|
19
|
-
/**
|
|
20
|
-
* Sign a message with the keystore private key
|
|
21
|
-
*
|
|
22
|
-
* @param messageBuffer - The message buffer to sign
|
|
23
|
-
* @return signature
|
|
24
|
-
*/
|
|
25
|
-
sign(digest: Buffer32): Promise<Signature>;
|
|
26
|
-
signMessage(message: Buffer32): Promise<Signature>;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=local_key_store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local_key_store.d.ts","sourceRoot":"","sources":["../../src/key_store/local_key_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;;GAIG;AACH,qBAAa,aAAc,YAAW,iBAAiB;IACrD,OAAO,CAAC,MAAM,CAAkB;gBAEpB,UAAU,EAAE,QAAQ;IAIhC;;;;OAIG;IACI,UAAU,IAAI,UAAU;IAI/B;;;;;OAKG;IACI,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IAM1C,WAAW,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;CAK1D"}
|
package/dest/metrics.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BlockProposal } from '@aztec/stdlib/p2p';
|
|
2
|
-
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
3
|
-
export declare class ValidatorMetrics {
|
|
4
|
-
private reExecutionTime;
|
|
5
|
-
private failedReexecutionCounter;
|
|
6
|
-
constructor(telemetryClient: TelemetryClient);
|
|
7
|
-
reExecutionTimer(): () => void;
|
|
8
|
-
recordReExecutionTime(time: number): void;
|
|
9
|
-
recordFailedReexecution(proposal: BlockProposal): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=metrics.d.ts.map
|
package/dest/metrics.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAIL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,wBAAwB,CAAgB;gBAEpC,eAAe,EAAE,eAAe;IAgBrC,gBAAgB,IAAI,MAAM,IAAI;IAQ9B,qBAAqB,CAAC,IAAI,EAAE,MAAM;IAI5B,uBAAuB,CAAC,QAAQ,EAAE,aAAa;CAO7D"}
|
package/dest/validator.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import { DateProvider, type Timer } from '@aztec/foundation/timer';
|
|
4
|
-
import type { P2P } from '@aztec/p2p';
|
|
5
|
-
import type { L2Block } from '@aztec/stdlib/block';
|
|
6
|
-
import type { BlockAttestation, BlockProposal } from '@aztec/stdlib/p2p';
|
|
7
|
-
import type { BlockHeader, GlobalVariables, Tx, TxHash } from '@aztec/stdlib/tx';
|
|
8
|
-
import { type TelemetryClient, WithTracer } from '@aztec/telemetry-client';
|
|
9
|
-
import type { ValidatorClientConfig } from './config.js';
|
|
10
|
-
import type { ValidatorKeyStore } from './key_store/interface.js';
|
|
11
|
-
/**
|
|
12
|
-
* Callback function for building a block
|
|
13
|
-
*
|
|
14
|
-
* We reuse the sequencer's block building functionality for re-execution
|
|
15
|
-
*/
|
|
16
|
-
type BlockBuilderCallback = (txs: Iterable<Tx> | AsyncIterableIterator<Tx>, globalVariables: GlobalVariables, opts?: {
|
|
17
|
-
validateOnly?: boolean;
|
|
18
|
-
}) => Promise<{
|
|
19
|
-
block: L2Block;
|
|
20
|
-
publicProcessorDuration: number;
|
|
21
|
-
numTxs: number;
|
|
22
|
-
numFailedTxs: number;
|
|
23
|
-
blockBuildingTimer: Timer;
|
|
24
|
-
}>;
|
|
25
|
-
export interface Validator {
|
|
26
|
-
start(): Promise<void>;
|
|
27
|
-
registerBlockProposalHandler(): void;
|
|
28
|
-
registerBlockBuilder(blockBuilder: BlockBuilderCallback): void;
|
|
29
|
-
createBlockProposal(header: BlockHeader, archive: Fr, txs: TxHash[]): Promise<BlockProposal | undefined>;
|
|
30
|
-
attestToProposal(proposal: BlockProposal): void;
|
|
31
|
-
broadcastBlockProposal(proposal: BlockProposal): void;
|
|
32
|
-
collectAttestations(proposal: BlockProposal, required: number, deadline: Date): Promise<BlockAttestation[]>;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Validator Client
|
|
36
|
-
*/
|
|
37
|
-
export declare class ValidatorClient extends WithTracer implements Validator {
|
|
38
|
-
private keyStore;
|
|
39
|
-
private epochCache;
|
|
40
|
-
private p2pClient;
|
|
41
|
-
private config;
|
|
42
|
-
private dateProvider;
|
|
43
|
-
private log;
|
|
44
|
-
private validationService;
|
|
45
|
-
private metrics;
|
|
46
|
-
private previousProposal?;
|
|
47
|
-
private blockBuilder?;
|
|
48
|
-
private epochCacheUpdateLoop;
|
|
49
|
-
private blockProposalValidator;
|
|
50
|
-
constructor(keyStore: ValidatorKeyStore, epochCache: EpochCache, p2pClient: P2P, config: ValidatorClientConfig, dateProvider?: DateProvider, telemetry?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
|
|
51
|
-
static new(config: ValidatorClientConfig, epochCache: EpochCache, p2pClient: P2P, dateProvider?: DateProvider, telemetry?: TelemetryClient): ValidatorClient;
|
|
52
|
-
start(): Promise<void>;
|
|
53
|
-
stop(): Promise<void>;
|
|
54
|
-
registerBlockProposalHandler(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Register a callback function for building a block
|
|
57
|
-
*
|
|
58
|
-
* We reuse the sequencer's block building functionality for re-execution
|
|
59
|
-
*/
|
|
60
|
-
registerBlockBuilder(blockBuilder: BlockBuilderCallback): void;
|
|
61
|
-
attestToProposal(proposal: BlockProposal): Promise<BlockAttestation | undefined>;
|
|
62
|
-
/**
|
|
63
|
-
* Re-execute the transactions in the proposal and check that the state updates match the header state
|
|
64
|
-
* @param proposal - The proposal to re-execute
|
|
65
|
-
*/
|
|
66
|
-
reExecuteTransactions(proposal: BlockProposal): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Ensure that all of the transactions in the proposal are available in the tx pool before attesting
|
|
69
|
-
*
|
|
70
|
-
* 1. Check if the local tx pool contains all of the transactions in the proposal
|
|
71
|
-
* 2. If any transactions are not in the local tx pool, request them from the network
|
|
72
|
-
* 3. If we cannot retrieve them from the network, throw an error
|
|
73
|
-
* @param proposal - The proposal to attest to
|
|
74
|
-
*/
|
|
75
|
-
ensureTransactionsAreAvailable(proposal: BlockProposal): Promise<void>;
|
|
76
|
-
createBlockProposal(header: BlockHeader, archive: Fr, txs: TxHash[]): Promise<BlockProposal | undefined>;
|
|
77
|
-
broadcastBlockProposal(proposal: BlockProposal): void;
|
|
78
|
-
collectAttestations(proposal: BlockProposal, required: number, deadline: Date): Promise<BlockAttestation[]>;
|
|
79
|
-
}
|
|
80
|
-
export {};
|
|
81
|
-
//# sourceMappingURL=validator.d.ts.map
|
package/dest/validator.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../src/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACjF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