@aztec/validator-client 2.0.3-rc.19 → 2.0.3-rc.20
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/duties/validation_service.d.ts +3 -0
- package/dest/duties/validation_service.d.ts.map +1 -1
- package/dest/duties/validation_service.js +8 -0
- package/dest/validator.d.ts +4 -2
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +3 -0
- package/package.json +11 -11
- package/src/duties/validation_service.ts +16 -1
- package/src/validator.ts +9 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
2
3
|
import type { Fr } from '@aztec/foundation/fields';
|
|
4
|
+
import type { CommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
|
|
3
5
|
import { BlockAttestation, BlockProposal, type BlockProposalOptions } from '@aztec/stdlib/p2p';
|
|
4
6
|
import type { ProposedBlockHeader, StateReference, Tx } from '@aztec/stdlib/tx';
|
|
5
7
|
import type { ValidatorKeyStore } from '../key_store/interface.js';
|
|
@@ -28,5 +30,6 @@ export declare class ValidationService {
|
|
|
28
30
|
* @returns attestations
|
|
29
31
|
*/
|
|
30
32
|
attestToProposal(proposal: BlockProposal, attestors: EthAddress[]): Promise<BlockAttestation[]>;
|
|
33
|
+
signAttestationsAndSigners(attestationsAndSigners: CommitteeAttestationsAndSigners, proposer: EthAddress | undefined): Promise<Signature>;
|
|
31
34
|
}
|
|
32
35
|
//# sourceMappingURL=validation_service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation_service.d.ts","sourceRoot":"","sources":["../../src/duties/validation_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"validation_service.d.ts","sourceRoot":"","sources":["../../src/duties/validation_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,KAAK,oBAAoB,EAG1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,iBAAiB;IAE/C;;;;;;;;;OASG;IACG,mBAAmB,CACvB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,EAAE,EACX,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,EAAE,EAAE,EACT,uBAAuB,EAAE,UAAU,GAAG,SAAS,EAC/C,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,CAAC;IAqBzB;;;;;;;;;OASG;IACG,gBAAgB,CAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAW/F,0BAA0B,CAC9B,sBAAsB,EAAE,+BAA+B,EACvD,QAAQ,EAAE,UAAU,GAAG,SAAS,GAC/B,OAAO,CAAC,SAAS,CAAC;CAUtB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
2
|
import { keccak256 } from '@aztec/foundation/crypto';
|
|
3
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
3
4
|
import { BlockAttestation, BlockProposal, ConsensusPayload, SignatureDomainSeparator } from '@aztec/stdlib/p2p';
|
|
4
5
|
export class ValidationService {
|
|
5
6
|
keyStore;
|
|
@@ -43,4 +44,11 @@ export class ValidationService {
|
|
|
43
44
|
//await this.keyStore.signMessage(buf);
|
|
44
45
|
return signatures.map((sig)=>new BlockAttestation(proposal.blockNumber, proposal.payload, sig));
|
|
45
46
|
}
|
|
47
|
+
async signAttestationsAndSigners(attestationsAndSigners, proposer) {
|
|
48
|
+
if (proposer === undefined) {
|
|
49
|
+
return Signature.empty();
|
|
50
|
+
}
|
|
51
|
+
const buf = Buffer32.fromBuffer(keccak256(attestationsAndSigners.getPayloadToSign(SignatureDomainSeparator.attestationsAndSigners)));
|
|
52
|
+
return await this.keyStore.signMessageWithAddress(proposer, buf);
|
|
53
|
+
}
|
|
46
54
|
}
|
package/dest/validator.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
3
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
5
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
5
6
|
import type { KeystoreManager } from '@aztec/node-keystore';
|
|
6
7
|
import type { P2P, PeerId, TxProvider } from '@aztec/p2p';
|
|
7
8
|
import { type SlasherConfig, type Watcher, type WatcherEmitter } from '@aztec/slasher';
|
|
8
9
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
9
|
-
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
10
|
+
import type { CommitteeAttestationsAndSigners, L2BlockSource } from '@aztec/stdlib/block';
|
|
10
11
|
import type { IFullNodeBlockBuilder, Validator, ValidatorClientFullConfig } from '@aztec/stdlib/interfaces/server';
|
|
11
12
|
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
12
13
|
import type { BlockAttestation, BlockProposal, BlockProposalOptions } from '@aztec/stdlib/p2p';
|
|
@@ -43,7 +44,7 @@ export declare class ValidatorClient extends ValidatorClient_base implements Val
|
|
|
43
44
|
getValidatorAddresses(): EthAddress[];
|
|
44
45
|
getBlockProposalHandler(): BlockProposalHandler;
|
|
45
46
|
reExecuteTransactions(proposal: BlockProposal, txs: any[], l1ToL2Messages: Fr[]): Promise<any>;
|
|
46
|
-
signWithAddress(addr: EthAddress, msg: TypedDataDefinition): Promise<
|
|
47
|
+
signWithAddress(addr: EthAddress, msg: TypedDataDefinition): Promise<Signature>;
|
|
47
48
|
getCoinbaseForAttestor(attestor: EthAddress): EthAddress;
|
|
48
49
|
getFeeRecipientForAttestor(attestor: EthAddress): AztecAddress;
|
|
49
50
|
getConfig(): ValidatorClientFullConfig;
|
|
@@ -56,6 +57,7 @@ export declare class ValidatorClient extends ValidatorClient_base implements Val
|
|
|
56
57
|
private slashInvalidBlock;
|
|
57
58
|
createBlockProposal(blockNumber: number, header: ProposedBlockHeader, archive: Fr, stateReference: StateReference, txs: Tx[], proposerAddress: EthAddress | undefined, options: BlockProposalOptions): Promise<BlockProposal | undefined>;
|
|
58
59
|
broadcastBlockProposal(proposal: BlockProposal): Promise<void>;
|
|
60
|
+
signAttestationsAndSigners(attestationsAndSigners: CommitteeAttestationsAndSigners, proposer: EthAddress | undefined): Promise<Signature>;
|
|
59
61
|
collectOwnAttestations(proposal: BlockProposal): Promise<BlockAttestation[]>;
|
|
60
62
|
collectAttestations(proposal: BlockProposal, required: number, deadline: Date): Promise<BlockAttestation[]>;
|
|
61
63
|
private createBlockAttestationsFromProposal;
|
package/dest/validator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../src/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,O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,UAAU,GAAG,SAAS,EACvC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAmB/B,sBAAsB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D,0BAA0B,CAC9B,sBAAsB,EAAE,+BAA+B,EACvD,QAAQ,EAAE,UAAU,GAAG,SAAS,GAC/B,OAAO,CAAC,SAAS,CAAC;IAIf,sBAAsB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAO5E,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;YA+CnG,mCAAmC;YASnC,iBAAiB;CAsBhC"}
|
package/dest/validator.js
CHANGED
|
@@ -224,6 +224,9 @@ const SLASHABLE_BLOCK_PROPOSAL_VALIDATION_RESULT = [
|
|
|
224
224
|
async broadcastBlockProposal(proposal) {
|
|
225
225
|
await this.p2pClient.broadcastProposal(proposal);
|
|
226
226
|
}
|
|
227
|
+
async signAttestationsAndSigners(attestationsAndSigners, proposer) {
|
|
228
|
+
return await this.validationService.signAttestationsAndSigners(attestationsAndSigners, proposer);
|
|
229
|
+
}
|
|
227
230
|
async collectOwnAttestations(proposal) {
|
|
228
231
|
const slot = proposal.payload.header.slotNumber.toBigInt();
|
|
229
232
|
const inCommittee = await this.epochCache.filterInCommittee(slot, this.getValidatorAddresses());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/validator-client",
|
|
3
|
-
"version": "2.0.3-rc.
|
|
3
|
+
"version": "2.0.3-rc.20",
|
|
4
4
|
"main": "dest/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aztec/constants": "2.0.3-rc.
|
|
68
|
-
"@aztec/epoch-cache": "2.0.3-rc.
|
|
69
|
-
"@aztec/ethereum": "2.0.3-rc.
|
|
70
|
-
"@aztec/foundation": "2.0.3-rc.
|
|
71
|
-
"@aztec/node-keystore": "2.0.3-rc.
|
|
72
|
-
"@aztec/p2p": "2.0.3-rc.
|
|
73
|
-
"@aztec/prover-client": "2.0.3-rc.
|
|
74
|
-
"@aztec/slasher": "2.0.3-rc.
|
|
75
|
-
"@aztec/stdlib": "2.0.3-rc.
|
|
76
|
-
"@aztec/telemetry-client": "2.0.3-rc.
|
|
67
|
+
"@aztec/constants": "2.0.3-rc.20",
|
|
68
|
+
"@aztec/epoch-cache": "2.0.3-rc.20",
|
|
69
|
+
"@aztec/ethereum": "2.0.3-rc.20",
|
|
70
|
+
"@aztec/foundation": "2.0.3-rc.20",
|
|
71
|
+
"@aztec/node-keystore": "2.0.3-rc.20",
|
|
72
|
+
"@aztec/p2p": "2.0.3-rc.20",
|
|
73
|
+
"@aztec/prover-client": "2.0.3-rc.20",
|
|
74
|
+
"@aztec/slasher": "2.0.3-rc.20",
|
|
75
|
+
"@aztec/stdlib": "2.0.3-rc.20",
|
|
76
|
+
"@aztec/telemetry-client": "2.0.3-rc.20",
|
|
77
77
|
"koa": "^2.16.1",
|
|
78
78
|
"koa-router": "^12.0.0",
|
|
79
79
|
"tslib": "^2.4.0",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
2
|
import { keccak256 } from '@aztec/foundation/crypto';
|
|
3
3
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
-
import
|
|
4
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
5
5
|
import type { Fr } from '@aztec/foundation/fields';
|
|
6
|
+
import type { CommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
|
|
6
7
|
import {
|
|
7
8
|
BlockAttestation,
|
|
8
9
|
BlockProposal,
|
|
@@ -76,4 +77,18 @@ export class ValidationService {
|
|
|
76
77
|
//await this.keyStore.signMessage(buf);
|
|
77
78
|
return signatures.map(sig => new BlockAttestation(proposal.blockNumber, proposal.payload, sig));
|
|
78
79
|
}
|
|
80
|
+
|
|
81
|
+
async signAttestationsAndSigners(
|
|
82
|
+
attestationsAndSigners: CommitteeAttestationsAndSigners,
|
|
83
|
+
proposer: EthAddress | undefined,
|
|
84
|
+
): Promise<Signature> {
|
|
85
|
+
if (proposer === undefined) {
|
|
86
|
+
return Signature.empty();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const buf = Buffer32.fromBuffer(
|
|
90
|
+
keccak256(attestationsAndSigners.getPayloadToSign(SignatureDomainSeparator.attestationsAndSigners)),
|
|
91
|
+
);
|
|
92
|
+
return await this.keyStore.signMessageWithAddress(proposer, buf);
|
|
93
|
+
}
|
|
79
94
|
}
|
package/src/validator.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
3
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
5
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
6
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
@@ -16,7 +17,7 @@ import {
|
|
|
16
17
|
type WatcherEmitter,
|
|
17
18
|
} from '@aztec/slasher';
|
|
18
19
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
19
|
-
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
20
|
+
import type { CommitteeAttestationsAndSigners, L2BlockSource } from '@aztec/stdlib/block';
|
|
20
21
|
import type { IFullNodeBlockBuilder, Validator, ValidatorClientFullConfig } from '@aztec/stdlib/interfaces/server';
|
|
21
22
|
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
22
23
|
import type { BlockAttestation, BlockProposal, BlockProposalOptions } from '@aztec/stdlib/p2p';
|
|
@@ -362,6 +363,13 @@ export class ValidatorClient extends (EventEmitter as new () => WatcherEmitter)
|
|
|
362
363
|
await this.p2pClient.broadcastProposal(proposal);
|
|
363
364
|
}
|
|
364
365
|
|
|
366
|
+
async signAttestationsAndSigners(
|
|
367
|
+
attestationsAndSigners: CommitteeAttestationsAndSigners,
|
|
368
|
+
proposer: EthAddress | undefined,
|
|
369
|
+
): Promise<Signature> {
|
|
370
|
+
return await this.validationService.signAttestationsAndSigners(attestationsAndSigners, proposer);
|
|
371
|
+
}
|
|
372
|
+
|
|
365
373
|
async collectOwnAttestations(proposal: BlockProposal): Promise<BlockAttestation[]> {
|
|
366
374
|
const slot = proposal.payload.header.slotNumber.toBigInt();
|
|
367
375
|
const inCommittee = await this.epochCache.filterInCommittee(slot, this.getValidatorAddresses());
|