@lodestar/state-transition 1.39.0-dev.86298a43e6 → 1.39.0-dev.90493ebb47
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/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/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/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/proposer.d.ts +3 -4
- package/lib/signatureSets/proposer.d.ts.map +1 -1
- package/lib/signatureSets/proposer.js +5 -6
- package/lib/signatureSets/proposer.js.map +1 -1
- package/package.json +14 -11
- package/src/block/isValidIndexedAttestation.ts +17 -12
- package/src/block/processAttestationPhase0.ts +2 -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/processWithdrawals.ts +230 -135
- package/src/signatureSets/blsToExecutionChange.ts +2 -3
- package/src/signatureSets/proposer.ts +6 -7
|
@@ -2,7 +2,6 @@ import {BeaconConfig} from "@lodestar/config";
|
|
|
2
2
|
import {DOMAIN_BEACON_PROPOSER} from "@lodestar/params";
|
|
3
3
|
import {SignedBeaconBlock, SignedBlindedBeaconBlock, Slot, isBlindedBeaconBlock, phase0, ssz} from "@lodestar/types";
|
|
4
4
|
import {Index2PubkeyCache} from "../cache/pubkeyCache.js";
|
|
5
|
-
import {CachedBeaconStateAllForks} from "../types.js";
|
|
6
5
|
import {computeSigningRoot} from "../util/index.js";
|
|
7
6
|
import {ISignatureSet, SignatureSetType, verifySignatureSet} from "../util/signatureSets.js";
|
|
8
7
|
|
|
@@ -38,28 +37,28 @@ export function getBlockProposerSignatureSet(
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
export function getBlockHeaderProposerSignatureSetByParentStateSlot(
|
|
40
|
+
config: BeaconConfig,
|
|
41
41
|
index2pubkey: Index2PubkeyCache,
|
|
42
|
-
|
|
42
|
+
parentStateSlot: Slot,
|
|
43
43
|
signedBlockHeader: phase0.SignedBeaconBlockHeader
|
|
44
44
|
) {
|
|
45
|
-
return getBlockHeaderProposerSignatureSet(
|
|
45
|
+
return getBlockHeaderProposerSignatureSet(config, index2pubkey, signedBlockHeader, parentStateSlot);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export function getBlockHeaderProposerSignatureSetByHeaderSlot(
|
|
49
|
+
config: BeaconConfig,
|
|
49
50
|
index2pubkey: Index2PubkeyCache,
|
|
50
|
-
headState: CachedBeaconStateAllForks,
|
|
51
51
|
signedBlockHeader: phase0.SignedBeaconBlockHeader
|
|
52
52
|
) {
|
|
53
|
-
return getBlockHeaderProposerSignatureSet(
|
|
53
|
+
return getBlockHeaderProposerSignatureSet(config, index2pubkey, signedBlockHeader, signedBlockHeader.message.slot);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
function getBlockHeaderProposerSignatureSet(
|
|
57
|
+
config: BeaconConfig,
|
|
57
58
|
index2pubkey: Index2PubkeyCache,
|
|
58
|
-
state: CachedBeaconStateAllForks,
|
|
59
59
|
signedBlockHeader: phase0.SignedBeaconBlockHeader,
|
|
60
60
|
domainSlot: Slot
|
|
61
61
|
): ISignatureSet {
|
|
62
|
-
const {config} = state;
|
|
63
62
|
const domain = config.getDomain(domainSlot, DOMAIN_BEACON_PROPOSER, signedBlockHeader.message.slot);
|
|
64
63
|
|
|
65
64
|
return {
|