@lodestar/state-transition 1.39.0-dev.84b481ddb5 → 1.39.0-dev.87ff5db949
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/lib/block/isValidIndexedAttestation.d.ts +4 -5
- package/lib/block/isValidIndexedAttestation.d.ts.map +1 -1
- package/lib/block/isValidIndexedAttestation.js +9 -10
- package/lib/block/isValidIndexedAttestation.js.map +1 -1
- package/lib/block/processAttestationPhase0.d.ts.map +1 -1
- package/lib/block/processAttestationPhase0.js +1 -1
- package/lib/block/processAttestationPhase0.js.map +1 -1
- package/lib/block/processAttestationsAltair.js +1 -1
- package/lib/block/processAttestationsAltair.js.map +1 -1
- package/lib/block/processAttesterSlashing.d.ts +3 -2
- package/lib/block/processAttesterSlashing.d.ts.map +1 -1
- package/lib/block/processAttesterSlashing.js +3 -3
- package/lib/block/processAttesterSlashing.js.map +1 -1
- package/lib/block/processBlsToExecutionChange.d.ts +3 -1
- package/lib/block/processBlsToExecutionChange.d.ts.map +1 -1
- package/lib/block/processBlsToExecutionChange.js +7 -11
- package/lib/block/processBlsToExecutionChange.js.map +1 -1
- package/lib/block/processProposerSlashing.d.ts +5 -2
- package/lib/block/processProposerSlashing.d.ts.map +1 -1
- package/lib/block/processProposerSlashing.js +7 -5
- package/lib/block/processProposerSlashing.js.map +1 -1
- package/lib/block/processRandao.js +2 -2
- package/lib/block/processRandao.js.map +1 -1
- package/lib/block/processSyncCommittee.d.ts +2 -1
- package/lib/block/processSyncCommittee.d.ts.map +1 -1
- package/lib/block/processSyncCommittee.js +6 -4
- package/lib/block/processSyncCommittee.js.map +1 -1
- package/lib/block/processVoluntaryExit.js +1 -1
- package/lib/block/processVoluntaryExit.js.map +1 -1
- package/lib/block/processWithdrawals.d.ts +3 -3
- package/lib/block/processWithdrawals.d.ts.map +1 -1
- package/lib/block/processWithdrawals.js +152 -105
- package/lib/block/processWithdrawals.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/rewards/attestationsRewards.d.ts +6 -0
- package/lib/rewards/attestationsRewards.d.ts.map +1 -0
- package/lib/rewards/attestationsRewards.js +113 -0
- package/lib/rewards/attestationsRewards.js.map +1 -0
- package/lib/rewards/blockRewards.d.ts +13 -0
- package/lib/rewards/blockRewards.d.ts.map +1 -0
- package/lib/rewards/blockRewards.js +95 -0
- package/lib/rewards/blockRewards.js.map +1 -0
- package/lib/rewards/index.d.ts +4 -0
- package/lib/rewards/index.d.ts.map +1 -0
- package/lib/rewards/index.js +4 -0
- package/lib/rewards/index.js.map +1 -0
- package/lib/rewards/syncCommitteeRewards.d.ts +6 -0
- package/lib/rewards/syncCommitteeRewards.d.ts.map +1 -0
- package/lib/rewards/syncCommitteeRewards.js +36 -0
- package/lib/rewards/syncCommitteeRewards.js.map +1 -0
- package/lib/signatureSets/attesterSlashings.d.ts +4 -5
- package/lib/signatureSets/attesterSlashings.d.ts.map +1 -1
- package/lib/signatureSets/attesterSlashings.js +10 -7
- package/lib/signatureSets/attesterSlashings.js.map +1 -1
- package/lib/signatureSets/blsToExecutionChange.d.ts +1 -2
- package/lib/signatureSets/blsToExecutionChange.d.ts.map +1 -1
- package/lib/signatureSets/blsToExecutionChange.js +2 -2
- package/lib/signatureSets/blsToExecutionChange.js.map +1 -1
- package/lib/signatureSets/index.d.ts +2 -2
- package/lib/signatureSets/index.d.ts.map +1 -1
- package/lib/signatureSets/index.js +10 -10
- package/lib/signatureSets/index.js.map +1 -1
- package/lib/signatureSets/indexedAttestation.d.ts +5 -6
- package/lib/signatureSets/indexedAttestation.d.ts.map +1 -1
- package/lib/signatureSets/indexedAttestation.js +12 -9
- package/lib/signatureSets/indexedAttestation.js.map +1 -1
- package/lib/signatureSets/proposer.d.ts +5 -6
- package/lib/signatureSets/proposer.d.ts.map +1 -1
- package/lib/signatureSets/proposer.js +12 -10
- package/lib/signatureSets/proposer.js.map +1 -1
- package/lib/signatureSets/proposerSlashings.d.ts +3 -4
- package/lib/signatureSets/proposerSlashings.d.ts.map +1 -1
- package/lib/signatureSets/proposerSlashings.js +7 -4
- package/lib/signatureSets/proposerSlashings.js.map +1 -1
- package/lib/signatureSets/randao.d.ts +2 -3
- package/lib/signatureSets/randao.d.ts.map +1 -1
- package/lib/signatureSets/randao.js +6 -4
- package/lib/signatureSets/randao.js.map +1 -1
- package/lib/signatureSets/voluntaryExits.d.ts +4 -5
- package/lib/signatureSets/voluntaryExits.d.ts.map +1 -1
- package/lib/signatureSets/voluntaryExits.js +10 -7
- package/lib/signatureSets/voluntaryExits.js.map +1 -1
- package/lib/stateTransition.d.ts.map +1 -1
- package/lib/stateTransition.js +1 -2
- package/lib/stateTransition.js.map +1 -1
- package/package.json +14 -11
- package/src/block/isValidIndexedAttestation.ts +19 -12
- package/src/block/processAttestationPhase0.ts +2 -1
- package/src/block/processAttestationsAltair.ts +1 -1
- package/src/block/processAttesterSlashing.ts +16 -4
- package/src/block/processBlsToExecutionChange.ts +13 -14
- package/src/block/processProposerSlashing.ts +21 -11
- package/src/block/processRandao.ts +2 -2
- package/src/block/processSyncCommittee.ts +7 -4
- package/src/block/processVoluntaryExit.ts +1 -1
- package/src/block/processWithdrawals.ts +230 -135
- package/src/index.ts +2 -2
- package/src/rewards/attestationsRewards.ts +200 -0
- package/src/rewards/blockRewards.ts +147 -0
- package/src/rewards/index.ts +3 -0
- package/src/rewards/syncCommitteeRewards.ts +59 -0
- package/src/signatureSets/attesterSlashings.ts +10 -9
- package/src/signatureSets/blsToExecutionChange.ts +2 -3
- package/src/signatureSets/index.ts +11 -11
- package/src/signatureSets/indexedAttestation.ts +12 -11
- package/src/signatureSets/proposer.ts +11 -11
- package/src/signatureSets/proposerSlashings.ts +7 -6
- package/src/signatureSets/randao.ts +4 -5
- package/src/signatureSets/voluntaryExits.ts +10 -9
- package/src/stateTransition.ts +1 -4
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { BeaconConfig } from "@lodestar/config";
|
|
2
2
|
import { BeaconBlock } from "@lodestar/types";
|
|
3
3
|
import { Index2PubkeyCache } from "../cache/pubkeyCache.js";
|
|
4
|
-
import { CachedBeaconStateAllForks } from "../types.js";
|
|
5
4
|
import { ISignatureSet } from "../util/index.js";
|
|
6
|
-
export declare function verifyRandaoSignature(config: BeaconConfig, index2pubkey: Index2PubkeyCache,
|
|
5
|
+
export declare function verifyRandaoSignature(config: BeaconConfig, index2pubkey: Index2PubkeyCache, block: BeaconBlock): boolean;
|
|
7
6
|
/**
|
|
8
7
|
* Extract signatures to allow validating all block signatures at once
|
|
9
8
|
*/
|
|
10
|
-
export declare function getRandaoRevealSignatureSet(config: BeaconConfig, index2pubkey: Index2PubkeyCache,
|
|
9
|
+
export declare function getRandaoRevealSignatureSet(config: BeaconConfig, index2pubkey: Index2PubkeyCache, block: BeaconBlock): ISignatureSet;
|
|
11
10
|
//# sourceMappingURL=randao.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"randao.d.ts","sourceRoot":"","sources":["../../src/signatureSets/randao.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAM,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"randao.d.ts","sourceRoot":"","sources":["../../src/signatureSets/randao.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAM,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,aAAa,EAKd,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,iBAAiB,EAC/B,KAAK,EAAE,WAAW,GACjB,OAAO,CAET;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,iBAAiB,EAC/B,KAAK,EAAE,WAAW,GACjB,aAAa,CAaf"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { DOMAIN_RANDAO } from "@lodestar/params";
|
|
2
2
|
import { ssz } from "@lodestar/types";
|
|
3
3
|
import { SignatureSetType, computeEpochAtSlot, computeSigningRoot, verifySignatureSet, } from "../util/index.js";
|
|
4
|
-
export function verifyRandaoSignature(config, index2pubkey,
|
|
5
|
-
return verifySignatureSet(getRandaoRevealSignatureSet(config, index2pubkey,
|
|
4
|
+
export function verifyRandaoSignature(config, index2pubkey, block) {
|
|
5
|
+
return verifySignatureSet(getRandaoRevealSignatureSet(config, index2pubkey, block));
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Extract signatures to allow validating all block signatures at once
|
|
9
9
|
*/
|
|
10
|
-
export function getRandaoRevealSignatureSet(config, index2pubkey,
|
|
10
|
+
export function getRandaoRevealSignatureSet(config, index2pubkey, block) {
|
|
11
11
|
// should not get epoch from epochCtx
|
|
12
12
|
const epoch = computeEpochAtSlot(block.slot);
|
|
13
|
-
|
|
13
|
+
// the getDomain() api requires the state slot as 1st param, however it's the same to block.slot in state-transition
|
|
14
|
+
// and the same epoch when we verify blocks in batch in beacon-node. So we can safely use block.slot here.
|
|
15
|
+
const domain = config.getDomain(block.slot, DOMAIN_RANDAO, block.slot);
|
|
14
16
|
return {
|
|
15
17
|
type: SignatureSetType.single,
|
|
16
18
|
pubkey: index2pubkey[block.proposerIndex],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"randao.js","sourceRoot":"","sources":["../../src/signatureSets/randao.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAc,GAAG,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"randao.js","sourceRoot":"","sources":["../../src/signatureSets/randao.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAc,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAEL,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,UAAU,qBAAqB,CACnC,MAAoB,EACpB,YAA+B,EAC/B,KAAkB;IAElB,OAAO,kBAAkB,CAAC,2BAA2B,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;AACtF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,MAAoB,EACpB,YAA+B,EAC/B,KAAkB;IAElB,qCAAqC;IACrC,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7C,oHAAoH;IACpH,0GAA0G;IAC1G,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAEvE,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,MAAM;QAC7B,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC;QACzC,WAAW,EAAE,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;QACzD,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY;KACnC,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { BeaconConfig } from "@lodestar/config";
|
|
2
|
-
import { SignedBeaconBlock, phase0 } from "@lodestar/types";
|
|
2
|
+
import { SignedBeaconBlock, Slot, phase0 } from "@lodestar/types";
|
|
3
3
|
import { Index2PubkeyCache } from "../cache/pubkeyCache.js";
|
|
4
|
-
import { CachedBeaconStateAllForks } from "../types.js";
|
|
5
4
|
import { ISignatureSet } from "../util/index.js";
|
|
6
|
-
export declare function verifyVoluntaryExitSignature(config: BeaconConfig, index2pubkey: Index2PubkeyCache,
|
|
5
|
+
export declare function verifyVoluntaryExitSignature(config: BeaconConfig, index2pubkey: Index2PubkeyCache, stateSlot: Slot, signedVoluntaryExit: phase0.SignedVoluntaryExit): boolean;
|
|
7
6
|
/**
|
|
8
7
|
* Extract signatures to allow validating all block signatures at once
|
|
9
8
|
*/
|
|
10
|
-
export declare function getVoluntaryExitSignatureSet(config: BeaconConfig, index2pubkey: Index2PubkeyCache,
|
|
11
|
-
export declare function getVoluntaryExitsSignatureSets(config: BeaconConfig, index2pubkey: Index2PubkeyCache,
|
|
9
|
+
export declare function getVoluntaryExitSignatureSet(config: BeaconConfig, index2pubkey: Index2PubkeyCache, stateSlot: Slot, signedVoluntaryExit: phase0.SignedVoluntaryExit): ISignatureSet;
|
|
10
|
+
export declare function getVoluntaryExitsSignatureSets(config: BeaconConfig, index2pubkey: Index2PubkeyCache, signedBlock: SignedBeaconBlock): ISignatureSet[];
|
|
12
11
|
//# sourceMappingURL=voluntaryExits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voluntaryExits.d.ts","sourceRoot":"","sources":["../../src/signatureSets/voluntaryExits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAE,MAAM,EAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"voluntaryExits.d.ts","sourceRoot":"","sources":["../../src/signatureSets/voluntaryExits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAM,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,aAAa,EAKd,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,IAAI,EACf,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,GAC9C,OAAO,CAET;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,IAAI,EACf,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,GAC9C,aAAa,CAUf;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,iBAAiB,EAC/B,WAAW,EAAE,iBAAiB,GAC7B,aAAa,EAAE,CAOjB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ssz } from "@lodestar/types";
|
|
2
2
|
import { SignatureSetType, computeSigningRoot, computeStartSlotAtEpoch, verifySignatureSet, } from "../util/index.js";
|
|
3
|
-
export function verifyVoluntaryExitSignature(config, index2pubkey,
|
|
4
|
-
return verifySignatureSet(getVoluntaryExitSignatureSet(config, index2pubkey,
|
|
3
|
+
export function verifyVoluntaryExitSignature(config, index2pubkey, stateSlot, signedVoluntaryExit) {
|
|
4
|
+
return verifySignatureSet(getVoluntaryExitSignatureSet(config, index2pubkey, stateSlot, signedVoluntaryExit));
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Extract signatures to allow validating all block signatures at once
|
|
8
8
|
*/
|
|
9
|
-
export function getVoluntaryExitSignatureSet(config, index2pubkey,
|
|
10
|
-
const
|
|
11
|
-
const domain = config.getDomainForVoluntaryExit(
|
|
9
|
+
export function getVoluntaryExitSignatureSet(config, index2pubkey, stateSlot, signedVoluntaryExit) {
|
|
10
|
+
const messageSlot = computeStartSlotAtEpoch(signedVoluntaryExit.message.epoch);
|
|
11
|
+
const domain = config.getDomainForVoluntaryExit(stateSlot, messageSlot);
|
|
12
12
|
return {
|
|
13
13
|
type: SignatureSetType.single,
|
|
14
14
|
pubkey: index2pubkey[signedVoluntaryExit.message.validatorIndex],
|
|
@@ -16,7 +16,10 @@ export function getVoluntaryExitSignatureSet(config, index2pubkey, state, signed
|
|
|
16
16
|
signature: signedVoluntaryExit.signature,
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
export function getVoluntaryExitsSignatureSets(config, index2pubkey,
|
|
20
|
-
|
|
19
|
+
export function getVoluntaryExitsSignatureSets(config, index2pubkey, signedBlock) {
|
|
20
|
+
// the getDomain() api requires the state slot as 1st param, however it's the same to block.slot in state-transition
|
|
21
|
+
// and the same epoch when we verify blocks in batch in beacon-node. So we can safely use block.slot here.
|
|
22
|
+
const blockSlot = signedBlock.message.slot;
|
|
23
|
+
return signedBlock.message.body.voluntaryExits.map((voluntaryExit) => getVoluntaryExitSignatureSet(config, index2pubkey, blockSlot, voluntaryExit));
|
|
21
24
|
}
|
|
22
25
|
//# sourceMappingURL=voluntaryExits.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voluntaryExits.js","sourceRoot":"","sources":["../../src/signatureSets/voluntaryExits.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"voluntaryExits.js","sourceRoot":"","sources":["../../src/signatureSets/voluntaryExits.ts"],"names":[],"mappings":"AACA,OAAO,EAAkC,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAEL,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,UAAU,4BAA4B,CAC1C,MAAoB,EACpB,YAA+B,EAC/B,SAAe,EACf,mBAA+C;IAE/C,OAAO,kBAAkB,CAAC,4BAA4B,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC;A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pC,eAAe,sBAAsB;IACrC,gBAAgB,uBAAuB;IACvC,UAAU,gBAAgB;IAC1B,mBAAmB,2BAA2B;CAC/C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,yBAAyB,EAChC,WAAW,EAAE,iBAAiB,GAAG,wBAAwB,EACzD,OAAO,GAAE,mBAIR,EACD,EAAC,OAAO,EAAE,gBAAgB,EAAC,GAAE,sBAA2B,GACvD,yBAAyB,CA8D3B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,yBAAyB,EAChC,IAAI,EAAE,IAAI,EACV,wBAAwB,CAAC,EAAE,wBAAwB,GAAG;IAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAC,EACnF,EAAC,OAAO,EAAE,gBAAgB,EAAC,GAAE,sBAA2B,GACvD,yBAAyB,CAiB3B"}
|
package/lib/stateTransition.js
CHANGED
|
@@ -52,8 +52,7 @@ export function stateTransition(state, signedBlock, options = {
|
|
|
52
52
|
// Includes state upgrades
|
|
53
53
|
postState = processSlotsWithTransientCache(postState, blockSlot, options, { metrics, validatorMonitor });
|
|
54
54
|
// Verify proposer signature only
|
|
55
|
-
if (verifyProposer &&
|
|
56
|
-
!verifyProposerSignature(postState.config, postState.epochCtx.index2pubkey, postState, signedBlock)) {
|
|
55
|
+
if (verifyProposer && !verifyProposerSignature(postState.config, postState.epochCtx.index2pubkey, signedBlock)) {
|
|
57
56
|
throw new Error("Invalid block signature");
|
|
58
57
|
}
|
|
59
58
|
// Process block
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stateTransition.js","sourceRoot":"","sources":["../src/stateTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA2D,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAoB,sBAAsB,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AG,OAAO,EAAE,yBAAyB,CAAC,UAAU,EAAE,CAAC;gBAC9D,SAAS,CAAC,MAAM,EAAE,CAAC;gBACnB,KAAK,EAAE,EAAE,CAAC;YACZ,CAAC;YAED,oIAAoI;YACpI,oBAAoB,EAAE,EAAE,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
13
13
|
},
|
|
14
|
-
"version": "1.39.0-dev.
|
|
14
|
+
"version": "1.39.0-dev.87ff5db949",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"scripts": {
|
|
44
44
|
"clean": "rm -rf lib && rm -f *.tsbuildinfo",
|
|
45
45
|
"build": "tsc -p tsconfig.build.json",
|
|
46
|
-
"build:watch": "
|
|
47
|
-
"build:release": "
|
|
46
|
+
"build:watch": "pnpm run build --watch",
|
|
47
|
+
"build:release": "pnpm clean && pnpm build",
|
|
48
48
|
"check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"",
|
|
49
49
|
"check-types": "tsc",
|
|
50
50
|
"lint": "biome check src/ test/",
|
|
51
|
-
"lint:fix": "
|
|
52
|
-
"test": "
|
|
51
|
+
"lint:fix": "pnpm run lint --write",
|
|
52
|
+
"test": "pnpm test:unit",
|
|
53
53
|
"test:unit": "vitest run --project unit --project unit-minimal",
|
|
54
|
-
"check-readme": "
|
|
54
|
+
"check-readme": "pnpm exec ts-node ../../scripts/check_readme.ts"
|
|
55
55
|
},
|
|
56
56
|
"types": "lib/index.d.ts",
|
|
57
57
|
"dependencies": {
|
|
@@ -62,17 +62,20 @@
|
|
|
62
62
|
"@chainsafe/pubkey-index-map": "^3.0.0",
|
|
63
63
|
"@chainsafe/ssz": "^1.2.2",
|
|
64
64
|
"@chainsafe/swap-or-not-shuffle": "^1.2.1",
|
|
65
|
-
"@lodestar/config": "1.39.0-dev.
|
|
66
|
-
"@lodestar/params": "1.39.0-dev.
|
|
67
|
-
"@lodestar/types": "1.39.0-dev.
|
|
68
|
-
"@lodestar/utils": "1.39.0-dev.
|
|
65
|
+
"@lodestar/config": "^1.39.0-dev.87ff5db949",
|
|
66
|
+
"@lodestar/params": "^1.39.0-dev.87ff5db949",
|
|
67
|
+
"@lodestar/types": "^1.39.0-dev.87ff5db949",
|
|
68
|
+
"@lodestar/utils": "^1.39.0-dev.87ff5db949",
|
|
69
69
|
"bigint-buffer": "^1.1.5"
|
|
70
70
|
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@lodestar/api": "^1.39.0-dev.87ff5db949"
|
|
73
|
+
},
|
|
71
74
|
"keywords": [
|
|
72
75
|
"ethereum",
|
|
73
76
|
"eth-consensus",
|
|
74
77
|
"beacon",
|
|
75
78
|
"blockchain"
|
|
76
79
|
],
|
|
77
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "f326c1ff8d1b2b9f8c2437901f49d94ef23559fb"
|
|
78
81
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
2
|
import {ForkSeq, MAX_COMMITTEES_PER_SLOT, MAX_VALIDATORS_PER_COMMITTEE} from "@lodestar/params";
|
|
3
|
-
import {IndexedAttestation, IndexedAttestationBigint} from "@lodestar/types";
|
|
3
|
+
import {IndexedAttestation, IndexedAttestationBigint, Slot} from "@lodestar/types";
|
|
4
4
|
import {Index2PubkeyCache} from "../cache/pubkeyCache.js";
|
|
5
5
|
import {getIndexedAttestationBigintSignatureSet, getIndexedAttestationSignatureSet} from "../signatureSets/index.js";
|
|
6
|
-
import {CachedBeaconStateAllForks} from "../types.js";
|
|
7
6
|
import {verifySignatureSet} from "../util/index.js";
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -12,16 +11,17 @@ import {verifySignatureSet} from "../util/index.js";
|
|
|
12
11
|
export function isValidIndexedAttestation(
|
|
13
12
|
config: BeaconConfig,
|
|
14
13
|
index2pubkey: Index2PubkeyCache,
|
|
15
|
-
|
|
14
|
+
stateSlot: Slot,
|
|
15
|
+
validatorsLen: number,
|
|
16
16
|
indexedAttestation: IndexedAttestation,
|
|
17
17
|
verifySignature: boolean
|
|
18
18
|
): boolean {
|
|
19
|
-
if (!isValidIndexedAttestationIndices(
|
|
19
|
+
if (!isValidIndexedAttestationIndices(config, stateSlot, validatorsLen, indexedAttestation.attestingIndices)) {
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if (verifySignature) {
|
|
24
|
-
return verifySignatureSet(getIndexedAttestationSignatureSet(config, index2pubkey,
|
|
24
|
+
return verifySignatureSet(getIndexedAttestationSignatureSet(config, index2pubkey, stateSlot, indexedAttestation));
|
|
25
25
|
}
|
|
26
26
|
return true;
|
|
27
27
|
}
|
|
@@ -29,16 +29,19 @@ export function isValidIndexedAttestation(
|
|
|
29
29
|
export function isValidIndexedAttestationBigint(
|
|
30
30
|
config: BeaconConfig,
|
|
31
31
|
index2pubkey: Index2PubkeyCache,
|
|
32
|
-
|
|
32
|
+
stateSlot: Slot,
|
|
33
|
+
validatorsLen: number,
|
|
33
34
|
indexedAttestation: IndexedAttestationBigint,
|
|
34
35
|
verifySignature: boolean
|
|
35
36
|
): boolean {
|
|
36
|
-
if (!isValidIndexedAttestationIndices(
|
|
37
|
+
if (!isValidIndexedAttestationIndices(config, stateSlot, validatorsLen, indexedAttestation.attestingIndices)) {
|
|
37
38
|
return false;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
if (verifySignature) {
|
|
41
|
-
return verifySignatureSet(
|
|
42
|
+
return verifySignatureSet(
|
|
43
|
+
getIndexedAttestationBigintSignatureSet(config, index2pubkey, stateSlot, indexedAttestation)
|
|
44
|
+
);
|
|
42
45
|
}
|
|
43
46
|
return true;
|
|
44
47
|
}
|
|
@@ -46,10 +49,15 @@ export function isValidIndexedAttestationBigint(
|
|
|
46
49
|
/**
|
|
47
50
|
* Check if `indexedAttestation` has sorted and unique indices and a valid aggregate signature.
|
|
48
51
|
*/
|
|
49
|
-
export function isValidIndexedAttestationIndices(
|
|
52
|
+
export function isValidIndexedAttestationIndices(
|
|
53
|
+
config: BeaconConfig,
|
|
54
|
+
stateSlot: Slot,
|
|
55
|
+
validatorsLen: number,
|
|
56
|
+
indices: number[]
|
|
57
|
+
): boolean {
|
|
50
58
|
// verify max number of indices
|
|
51
59
|
const maxIndices =
|
|
52
|
-
|
|
60
|
+
config.getForkSeq(stateSlot) >= ForkSeq.electra
|
|
53
61
|
? MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT
|
|
54
62
|
: MAX_VALIDATORS_PER_COMMITTEE;
|
|
55
63
|
if (!(indices.length > 0 && indices.length <= maxIndices)) {
|
|
@@ -66,9 +74,8 @@ export function isValidIndexedAttestationIndices(state: CachedBeaconStateAllFork
|
|
|
66
74
|
}
|
|
67
75
|
|
|
68
76
|
// check if indices are out of bounds, by checking the highest index (since it is sorted)
|
|
69
|
-
// TODO - SLOW CODE - Does this .length check the tree and is expensive?
|
|
70
77
|
const lastIndex = indices.at(-1);
|
|
71
|
-
if (lastIndex && lastIndex >=
|
|
78
|
+
if (lastIndex && lastIndex >= validatorsLen) {
|
|
72
79
|
return false;
|
|
73
80
|
}
|
|
74
81
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {BeaconConfig} from "@lodestar/config";
|
|
1
2
|
import {ForkSeq} from "@lodestar/params";
|
|
2
|
-
import {AttesterSlashing} from "@lodestar/types";
|
|
3
|
+
import {AttesterSlashing, Slot} from "@lodestar/types";
|
|
3
4
|
import {Index2PubkeyCache} from "../cache/pubkeyCache.js";
|
|
4
5
|
import {CachedBeaconStateAllForks} from "../types.js";
|
|
5
6
|
import {getAttesterSlashableIndices, isSlashableAttestationData, isSlashableValidator} from "../util/index.js";
|
|
@@ -19,7 +20,14 @@ export function processAttesterSlashing(
|
|
|
19
20
|
verifySignatures = true
|
|
20
21
|
): void {
|
|
21
22
|
const {epochCtx} = state;
|
|
22
|
-
assertValidAttesterSlashing(
|
|
23
|
+
assertValidAttesterSlashing(
|
|
24
|
+
state.config,
|
|
25
|
+
epochCtx.index2pubkey,
|
|
26
|
+
state.slot,
|
|
27
|
+
state.validators.length,
|
|
28
|
+
attesterSlashing,
|
|
29
|
+
verifySignatures
|
|
30
|
+
);
|
|
23
31
|
|
|
24
32
|
const intersectingIndices = getAttesterSlashableIndices(attesterSlashing);
|
|
25
33
|
|
|
@@ -39,8 +47,10 @@ export function processAttesterSlashing(
|
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
export function assertValidAttesterSlashing(
|
|
50
|
+
config: BeaconConfig,
|
|
42
51
|
index2pubkey: Index2PubkeyCache,
|
|
43
|
-
|
|
52
|
+
stateSlot: Slot,
|
|
53
|
+
validatorsLen: number,
|
|
44
54
|
attesterSlashing: AttesterSlashing,
|
|
45
55
|
verifySignatures = true
|
|
46
56
|
): void {
|
|
@@ -55,7 +65,9 @@ export function assertValidAttesterSlashing(
|
|
|
55
65
|
// be higher than the clock and the slashing would still be valid. Same applies to attestation data index, which
|
|
56
66
|
// can be any arbitrary value. Must use bigint variants to hash correctly to all possible values
|
|
57
67
|
for (const [i, attestation] of [attestation1, attestation2].entries()) {
|
|
58
|
-
if (
|
|
68
|
+
if (
|
|
69
|
+
!isValidIndexedAttestationBigint(config, index2pubkey, stateSlot, validatorsLen, attestation, verifySignatures)
|
|
70
|
+
) {
|
|
59
71
|
throw new Error(`AttesterSlashing attestation${i} is invalid`);
|
|
60
72
|
}
|
|
61
73
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {digest} from "@chainsafe/as-sha256";
|
|
2
2
|
import {byteArrayEquals} from "@chainsafe/ssz";
|
|
3
|
+
import {BeaconConfig} from "@lodestar/config";
|
|
3
4
|
import {BLS_WITHDRAWAL_PREFIX, ETH1_ADDRESS_WITHDRAWAL_PREFIX} from "@lodestar/params";
|
|
4
5
|
import {capella} from "@lodestar/types";
|
|
6
|
+
import {Validator} from "@lodestar/types/phase0";
|
|
5
7
|
import {toHex} from "@lodestar/utils";
|
|
6
8
|
import {verifyBlsToExecutionChangeSignature} from "../signatureSets/index.js";
|
|
7
9
|
import {CachedBeaconStateCapella} from "../types.js";
|
|
@@ -12,12 +14,18 @@ export function processBlsToExecutionChange(
|
|
|
12
14
|
): void {
|
|
13
15
|
const addressChange = signedBlsToExecutionChange.message;
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
if (addressChange.validatorIndex >= state.validators.length) {
|
|
18
|
+
throw Error(
|
|
19
|
+
`withdrawalValidatorIndex ${addressChange.validatorIndex} >= state.validators len ${state.validators.length}`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const validator = state.validators.get(addressChange.validatorIndex);
|
|
24
|
+
const validation = isValidBlsToExecutionChange(state.config, validator, signedBlsToExecutionChange, true);
|
|
16
25
|
if (!validation.valid) {
|
|
17
26
|
throw validation.error;
|
|
18
27
|
}
|
|
19
28
|
|
|
20
|
-
const validator = state.validators.get(addressChange.validatorIndex);
|
|
21
29
|
const newWithdrawalCredentials = new Uint8Array(32);
|
|
22
30
|
newWithdrawalCredentials[0] = ETH1_ADDRESS_WITHDRAWAL_PREFIX;
|
|
23
31
|
newWithdrawalCredentials.set(addressChange.toExecutionAddress, 12);
|
|
@@ -27,22 +35,13 @@ export function processBlsToExecutionChange(
|
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
export function isValidBlsToExecutionChange(
|
|
30
|
-
|
|
38
|
+
config: BeaconConfig,
|
|
39
|
+
validator: Validator,
|
|
31
40
|
signedBLSToExecutionChange: capella.SignedBLSToExecutionChange,
|
|
32
41
|
verifySignature = true
|
|
33
42
|
): {valid: true} | {valid: false; error: Error} {
|
|
34
43
|
const addressChange = signedBLSToExecutionChange.message;
|
|
35
44
|
|
|
36
|
-
if (addressChange.validatorIndex >= state.validators.length) {
|
|
37
|
-
return {
|
|
38
|
-
valid: false,
|
|
39
|
-
error: Error(
|
|
40
|
-
`withdrawalValidatorIndex ${addressChange.validatorIndex} > state.validators len ${state.validators.length}`
|
|
41
|
-
),
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const validator = state.validators.getReadonly(addressChange.validatorIndex);
|
|
46
45
|
const {withdrawalCredentials} = validator;
|
|
47
46
|
if (withdrawalCredentials[0] !== BLS_WITHDRAWAL_PREFIX) {
|
|
48
47
|
return {
|
|
@@ -65,7 +64,7 @@ export function isValidBlsToExecutionChange(
|
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
if (verifySignature && !verifyBlsToExecutionChangeSignature(
|
|
67
|
+
if (verifySignature && !verifyBlsToExecutionChangeSignature(config, signedBLSToExecutionChange)) {
|
|
69
68
|
return {
|
|
70
69
|
valid: false,
|
|
71
70
|
error: Error(
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import {BeaconConfig} from "@lodestar/config";
|
|
1
2
|
import {ForkSeq, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
2
|
-
import {phase0, ssz} from "@lodestar/types";
|
|
3
|
+
import {Slot, phase0, ssz} from "@lodestar/types";
|
|
4
|
+
import {Validator} from "@lodestar/types/phase0";
|
|
5
|
+
import {Index2PubkeyCache} from "../cache/pubkeyCache.js";
|
|
3
6
|
import {getProposerSlashingSignatureSets} from "../signatureSets/index.js";
|
|
4
7
|
import {CachedBeaconStateAllForks, CachedBeaconStateGloas} from "../types.js";
|
|
5
8
|
import {computeEpochAtSlot, isSlashableValidator} from "../util/index.js";
|
|
@@ -18,7 +21,15 @@ export function processProposerSlashing(
|
|
|
18
21
|
proposerSlashing: phase0.ProposerSlashing,
|
|
19
22
|
verifySignatures = true
|
|
20
23
|
): void {
|
|
21
|
-
|
|
24
|
+
const proposer = state.validators.getReadonly(proposerSlashing.signedHeader1.message.proposerIndex);
|
|
25
|
+
assertValidProposerSlashing(
|
|
26
|
+
state.config,
|
|
27
|
+
state.epochCtx.index2pubkey,
|
|
28
|
+
state.slot,
|
|
29
|
+
proposerSlashing,
|
|
30
|
+
proposer,
|
|
31
|
+
verifySignatures
|
|
32
|
+
);
|
|
22
33
|
|
|
23
34
|
if (fork >= ForkSeq.gloas) {
|
|
24
35
|
const slot = Number(proposerSlashing.signedHeader1.message.slot);
|
|
@@ -45,8 +56,11 @@ export function processProposerSlashing(
|
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
export function assertValidProposerSlashing(
|
|
48
|
-
|
|
59
|
+
config: BeaconConfig,
|
|
60
|
+
index2pubkey: Index2PubkeyCache,
|
|
61
|
+
stateSlot: Slot,
|
|
49
62
|
proposerSlashing: phase0.ProposerSlashing,
|
|
63
|
+
proposer: Validator,
|
|
50
64
|
verifySignatures = true
|
|
51
65
|
): void {
|
|
52
66
|
const header1 = proposerSlashing.signedHeader1.message;
|
|
@@ -70,19 +84,15 @@ export function assertValidProposerSlashing(
|
|
|
70
84
|
}
|
|
71
85
|
|
|
72
86
|
// verify the proposer is slashable
|
|
73
|
-
|
|
74
|
-
|
|
87
|
+
// ideally we would get the proposer from state.validators using proposerIndex but that requires access to state
|
|
88
|
+
// instead of that we pass in the proposer directly from the consumer side
|
|
89
|
+
if (!isSlashableValidator(proposer, computeEpochAtSlot(stateSlot))) {
|
|
75
90
|
throw new Error("ProposerSlashing proposer is not slashable");
|
|
76
91
|
}
|
|
77
92
|
|
|
78
93
|
// verify signatures
|
|
79
94
|
if (verifySignatures) {
|
|
80
|
-
const signatureSets = getProposerSlashingSignatureSets(
|
|
81
|
-
state.config,
|
|
82
|
-
state.epochCtx.index2pubkey,
|
|
83
|
-
state,
|
|
84
|
-
proposerSlashing
|
|
85
|
-
);
|
|
95
|
+
const signatureSets = getProposerSlashingSignatureSets(config, index2pubkey, stateSlot, proposerSlashing);
|
|
86
96
|
for (let i = 0; i < signatureSets.length; i++) {
|
|
87
97
|
if (!verifySignatureSet(signatureSets[i])) {
|
|
88
98
|
throw new Error(`ProposerSlashing header${i + 1} signature invalid`);
|
|
@@ -12,12 +12,12 @@ import {getRandaoMix} from "../util/index.js";
|
|
|
12
12
|
* PERF: Fixed work independent of block contents.
|
|
13
13
|
*/
|
|
14
14
|
export function processRandao(state: CachedBeaconStateAllForks, block: BeaconBlock, verifySignature = true): void {
|
|
15
|
-
const {epochCtx} = state;
|
|
15
|
+
const {epochCtx, config} = state;
|
|
16
16
|
const epoch = epochCtx.epoch;
|
|
17
17
|
const randaoReveal = block.body.randaoReveal;
|
|
18
18
|
|
|
19
19
|
// verify RANDAO reveal
|
|
20
|
-
if (verifySignature && !verifyRandaoSignature(
|
|
20
|
+
if (verifySignature && !verifyRandaoSignature(config, epochCtx.index2pubkey, block)) {
|
|
21
21
|
throw new Error("RANDAO reveal is an invalid signature");
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -3,6 +3,7 @@ import {BeaconConfig} from "@lodestar/config";
|
|
|
3
3
|
import {DOMAIN_SYNC_COMMITTEE, SYNC_COMMITTEE_SIZE} from "@lodestar/params";
|
|
4
4
|
import {altair, ssz} from "@lodestar/types";
|
|
5
5
|
import {Index2PubkeyCache} from "../cache/pubkeyCache.js";
|
|
6
|
+
import {SyncCommitteeCache} from "../cache/syncCommitteeCache.js";
|
|
6
7
|
import {G2_POINT_AT_INFINITY} from "../constants/index.js";
|
|
7
8
|
import {CachedBeaconStateAllForks} from "../types.js";
|
|
8
9
|
import {
|
|
@@ -28,7 +29,7 @@ export function processSyncAggregate(
|
|
|
28
29
|
const signatureSet = getSyncCommitteeSignatureSet(
|
|
29
30
|
state.config,
|
|
30
31
|
state.epochCtx.index2pubkey,
|
|
31
|
-
state,
|
|
32
|
+
state.epochCtx.currentSyncCommitteeIndexed,
|
|
32
33
|
block,
|
|
33
34
|
participantIndices
|
|
34
35
|
);
|
|
@@ -73,7 +74,7 @@ export function processSyncAggregate(
|
|
|
73
74
|
export function getSyncCommitteeSignatureSet(
|
|
74
75
|
config: BeaconConfig,
|
|
75
76
|
index2pubkey: Index2PubkeyCache,
|
|
76
|
-
|
|
77
|
+
currentSyncCommitteeIndexed: SyncCommitteeCache,
|
|
77
78
|
block: altair.BeaconBlock,
|
|
78
79
|
/** Optional parameter to prevent computing it twice */
|
|
79
80
|
participantIndices?: number[]
|
|
@@ -101,7 +102,7 @@ export function getSyncCommitteeSignatureSet(
|
|
|
101
102
|
const rootSigned = block.parentRoot;
|
|
102
103
|
|
|
103
104
|
if (!participantIndices) {
|
|
104
|
-
const committeeIndices =
|
|
105
|
+
const committeeIndices = currentSyncCommitteeIndexed.validatorIndices;
|
|
105
106
|
participantIndices = syncAggregate.syncCommitteeBits.intersectValues(committeeIndices);
|
|
106
107
|
}
|
|
107
108
|
|
|
@@ -115,7 +116,9 @@ export function getSyncCommitteeSignatureSet(
|
|
|
115
116
|
throw Error("Empty sync committee signature is not infinity");
|
|
116
117
|
}
|
|
117
118
|
|
|
118
|
-
|
|
119
|
+
// the getDomain() api requires the state slot as 1st param, however it's the same to block.slot in state-transition
|
|
120
|
+
// and the same epoch when we verify blocks in batch in beacon-node. So we can safely use block.slot here.
|
|
121
|
+
const domain = config.getDomain(block.slot, DOMAIN_SYNC_COMMITTEE, previousSlot);
|
|
119
122
|
|
|
120
123
|
return {
|
|
121
124
|
type: SignatureSetType.aggregate,
|
|
@@ -76,7 +76,7 @@ export function getVoluntaryExitValidity(
|
|
|
76
76
|
|
|
77
77
|
if (
|
|
78
78
|
verifySignature &&
|
|
79
|
-
!verifyVoluntaryExitSignature(state.config, epochCtx.index2pubkey, state, signedVoluntaryExit)
|
|
79
|
+
!verifyVoluntaryExitSignature(state.config, epochCtx.index2pubkey, state.slot, signedVoluntaryExit)
|
|
80
80
|
) {
|
|
81
81
|
return VoluntaryExitValidity.invalidSignature;
|
|
82
82
|
}
|