@aztec/validator-client 0.0.0-test.1 → 0.0.1-commit.b655e406
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/block_proposal_handler.d.ts +52 -0
- package/dest/block_proposal_handler.d.ts.map +1 -0
- package/dest/block_proposal_handler.js +286 -0
- package/dest/config.d.ts +2 -13
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +31 -7
- package/dest/duties/validation_service.d.ts +16 -8
- package/dest/duties/validation_service.d.ts.map +1 -1
- package/dest/duties/validation_service.js +35 -11
- package/dest/factory.d.ts +21 -4
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +13 -6
- package/dest/index.d.ts +3 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +3 -1
- package/dest/key_store/index.d.ts +2 -0
- package/dest/key_store/index.d.ts.map +1 -1
- package/dest/key_store/index.js +2 -0
- package/dest/key_store/interface.d.ts +54 -5
- package/dest/key_store/interface.d.ts.map +1 -1
- package/dest/key_store/interface.js +3 -3
- package/dest/key_store/local_key_store.d.ts +40 -10
- package/dest/key_store/local_key_store.d.ts.map +1 -1
- package/dest/key_store/local_key_store.js +63 -16
- package/dest/key_store/node_keystore_adapter.d.ts +138 -0
- package/dest/key_store/node_keystore_adapter.d.ts.map +1 -0
- package/dest/key_store/node_keystore_adapter.js +316 -0
- package/dest/key_store/web3signer_key_store.d.ts +67 -0
- package/dest/key_store/web3signer_key_store.d.ts.map +1 -0
- package/dest/key_store/web3signer_key_store.js +152 -0
- package/dest/metrics.d.ts +11 -4
- package/dest/metrics.d.ts.map +1 -1
- package/dest/metrics.js +52 -15
- package/dest/validator.d.ts +48 -61
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +262 -165
- package/package.json +25 -19
- package/src/block_proposal_handler.ts +343 -0
- package/src/config.ts +42 -22
- package/src/duties/validation_service.ts +69 -14
- package/src/factory.ts +56 -11
- package/src/index.ts +3 -1
- package/src/key_store/index.ts +2 -0
- package/src/key_store/interface.ts +61 -5
- package/src/key_store/local_key_store.ts +67 -17
- package/src/key_store/node_keystore_adapter.ts +375 -0
- package/src/key_store/web3signer_key_store.ts +192 -0
- package/src/metrics.ts +68 -17
- package/src/validator.ts +381 -233
- package/dest/errors/index.d.ts +0 -2
- package/dest/errors/index.d.ts.map +0 -1
- package/dest/errors/index.js +0 -1
- package/dest/errors/validator.error.d.ts +0 -29
- package/dest/errors/validator.error.d.ts.map +0 -1
- package/dest/errors/validator.error.js +0 -45
- package/src/errors/index.ts +0 -1
- package/src/errors/validator.error.ts +0 -55
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"}
|
package/dest/errors/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './validator.error.js';
|
|
@@ -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"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export class ValidatorError extends Error {
|
|
2
|
-
constructor(message){
|
|
3
|
-
super(`Validator Error: ${message}`);
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
export class InvalidValidatorPrivateKeyError extends ValidatorError {
|
|
7
|
-
constructor(){
|
|
8
|
-
super('Invalid validator private key provided');
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export class AttestationTimeoutError extends ValidatorError {
|
|
12
|
-
constructor(numberOfRequiredAttestations, slot){
|
|
13
|
-
super(`Timeout waiting for ${numberOfRequiredAttestations} attestations for slot, ${slot}`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export class TransactionsNotAvailableError extends ValidatorError {
|
|
17
|
-
constructor(txHashes){
|
|
18
|
-
super(`Transactions not available: ${txHashes.join(', ')}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export class FailedToReExecuteTransactionsError extends ValidatorError {
|
|
22
|
-
constructor(txHashes){
|
|
23
|
-
super(`Failed to re-execute transactions: ${txHashes.join(', ')}`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export class ReExStateMismatchError extends ValidatorError {
|
|
27
|
-
constructor(){
|
|
28
|
-
super('Re-execution state mismatch');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export class ReExFailedTxsError extends ValidatorError {
|
|
32
|
-
constructor(numFailedTxs){
|
|
33
|
-
super(`Re-execution failed to process ${numFailedTxs} txs`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export class ReExTimeoutError extends ValidatorError {
|
|
37
|
-
constructor(){
|
|
38
|
-
super('Re-execution timed out or failed to process all txs in the proposal');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export class BlockBuilderNotProvidedError extends ValidatorError {
|
|
42
|
-
constructor(){
|
|
43
|
-
super('Block builder not provided');
|
|
44
|
-
}
|
|
45
|
-
}
|
package/src/errors/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './validator.error.js';
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { TxHash } from '@aztec/stdlib/tx';
|
|
2
|
-
|
|
3
|
-
export class ValidatorError extends Error {
|
|
4
|
-
constructor(message: string) {
|
|
5
|
-
super(`Validator Error: ${message}`);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export class InvalidValidatorPrivateKeyError extends ValidatorError {
|
|
10
|
-
constructor() {
|
|
11
|
-
super('Invalid validator private key provided');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class AttestationTimeoutError extends ValidatorError {
|
|
16
|
-
constructor(numberOfRequiredAttestations: number, slot: bigint) {
|
|
17
|
-
super(`Timeout waiting for ${numberOfRequiredAttestations} attestations for slot, ${slot}`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class TransactionsNotAvailableError extends ValidatorError {
|
|
22
|
-
constructor(txHashes: TxHash[]) {
|
|
23
|
-
super(`Transactions not available: ${txHashes.join(', ')}`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export class FailedToReExecuteTransactionsError extends ValidatorError {
|
|
28
|
-
constructor(txHashes: TxHash[]) {
|
|
29
|
-
super(`Failed to re-execute transactions: ${txHashes.join(', ')}`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export class ReExStateMismatchError extends ValidatorError {
|
|
34
|
-
constructor() {
|
|
35
|
-
super('Re-execution state mismatch');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export class ReExFailedTxsError extends ValidatorError {
|
|
40
|
-
constructor(numFailedTxs: number) {
|
|
41
|
-
super(`Re-execution failed to process ${numFailedTxs} txs`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export class ReExTimeoutError extends ValidatorError {
|
|
46
|
-
constructor() {
|
|
47
|
-
super('Re-execution timed out or failed to process all txs in the proposal');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export class BlockBuilderNotProvidedError extends ValidatorError {
|
|
52
|
-
constructor() {
|
|
53
|
-
super('Block builder not provided');
|
|
54
|
-
}
|
|
55
|
-
}
|