@lodestar/state-transition 1.39.1 → 1.40.0-dev.193b2e2047
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/index.d.ts +1 -0
- package/lib/block/index.d.ts.map +1 -1
- package/lib/block/index.js +1 -0
- package/lib/block/index.js.map +1 -1
- 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/isValidIndexedPayloadAttestation.d.ts.map +1 -1
- package/lib/block/isValidIndexedPayloadAttestation.js +1 -1
- package/lib/block/isValidIndexedPayloadAttestation.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.d.ts.map +1 -1
- package/lib/block/processAttestationsAltair.js +2 -2
- 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/processConsolidationRequest.d.ts +1 -2
- package/lib/block/processConsolidationRequest.d.ts.map +1 -1
- package/lib/block/processConsolidationRequest.js +2 -2
- package/lib/block/processConsolidationRequest.js.map +1 -1
- package/lib/block/processDepositRequest.d.ts +8 -2
- package/lib/block/processDepositRequest.d.ts.map +1 -1
- package/lib/block/processDepositRequest.js +81 -8
- package/lib/block/processDepositRequest.js.map +1 -1
- package/lib/block/processExecutionPayloadBid.d.ts.map +1 -1
- package/lib/block/processExecutionPayloadBid.js +16 -29
- package/lib/block/processExecutionPayloadBid.js.map +1 -1
- package/lib/block/processExecutionPayloadEnvelope.d.ts.map +1 -1
- package/lib/block/processExecutionPayloadEnvelope.js +26 -25
- package/lib/block/processExecutionPayloadEnvelope.js.map +1 -1
- package/lib/block/processOperations.js +2 -2
- package/lib/block/processOperations.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 +8 -6
- package/lib/block/processProposerSlashing.js.map +1 -1
- package/lib/block/processSyncCommittee.d.ts +1 -2
- package/lib/block/processSyncCommittee.d.ts.map +1 -1
- package/lib/block/processSyncCommittee.js +5 -5
- package/lib/block/processSyncCommittee.js.map +1 -1
- package/lib/block/processVoluntaryExit.d.ts +1 -1
- package/lib/block/processVoluntaryExit.d.ts.map +1 -1
- package/lib/block/processVoluntaryExit.js +45 -3
- package/lib/block/processVoluntaryExit.js.map +1 -1
- package/lib/block/processWithdrawalRequest.js +1 -1
- package/lib/block/processWithdrawalRequest.js.map +1 -1
- package/lib/block/processWithdrawals.d.ts +1 -0
- package/lib/block/processWithdrawals.d.ts.map +1 -1
- package/lib/block/processWithdrawals.js +121 -66
- package/lib/block/processWithdrawals.js.map +1 -1
- package/lib/cache/epochCache.d.ts +8 -28
- package/lib/cache/epochCache.d.ts.map +1 -1
- package/lib/cache/epochCache.js +40 -180
- package/lib/cache/epochCache.js.map +1 -1
- package/lib/cache/epochTransitionCache.d.ts +5 -12
- package/lib/cache/epochTransitionCache.d.ts.map +1 -1
- package/lib/cache/epochTransitionCache.js +4 -14
- package/lib/cache/epochTransitionCache.js.map +1 -1
- package/lib/cache/stateCache.d.ts.map +1 -1
- package/lib/cache/stateCache.js +1 -2
- package/lib/cache/stateCache.js.map +1 -1
- package/lib/epoch/processBuilderPendingPayments.d.ts.map +1 -1
- package/lib/epoch/processBuilderPendingPayments.js +1 -4
- package/lib/epoch/processBuilderPendingPayments.js.map +1 -1
- package/lib/epoch/processProposerLookahead.d.ts.map +1 -1
- package/lib/epoch/processProposerLookahead.js +3 -6
- package/lib/epoch/processProposerLookahead.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/rewards/blockRewards.d.ts +2 -1
- package/lib/rewards/blockRewards.d.ts.map +1 -1
- package/lib/rewards/blockRewards.js +3 -2
- package/lib/rewards/blockRewards.js.map +1 -1
- package/lib/rewards/syncCommitteeRewards.d.ts.map +1 -1
- package/lib/rewards/syncCommitteeRewards.js +10 -11
- package/lib/rewards/syncCommitteeRewards.js.map +1 -1
- package/lib/signatureSets/attesterSlashings.d.ts +3 -4
- package/lib/signatureSets/attesterSlashings.d.ts.map +1 -1
- package/lib/signatureSets/attesterSlashings.js +6 -6
- package/lib/signatureSets/attesterSlashings.js.map +1 -1
- package/lib/signatureSets/blsToExecutionChange.d.ts +4 -5
- 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/executionPayloadBid.d.ts +4 -0
- package/lib/signatureSets/executionPayloadBid.d.ts.map +1 -0
- package/lib/signatureSets/executionPayloadBid.js +8 -0
- package/lib/signatureSets/executionPayloadBid.js.map +1 -0
- package/lib/signatureSets/executionPayloadEnvelope.d.ts +4 -0
- package/lib/signatureSets/executionPayloadEnvelope.d.ts.map +1 -0
- package/lib/signatureSets/executionPayloadEnvelope.js +8 -0
- package/lib/signatureSets/executionPayloadEnvelope.js.map +1 -0
- package/lib/signatureSets/index.d.ts +3 -2
- package/lib/signatureSets/index.d.ts.map +1 -1
- package/lib/signatureSets/index.js +10 -8
- package/lib/signatureSets/index.js.map +1 -1
- package/lib/signatureSets/indexedAttestation.d.ts +3 -4
- package/lib/signatureSets/indexedAttestation.d.ts.map +1 -1
- package/lib/signatureSets/indexedAttestation.js +6 -6
- package/lib/signatureSets/indexedAttestation.js.map +1 -1
- package/lib/signatureSets/indexedPayloadAttestation.d.ts +5 -4
- package/lib/signatureSets/indexedPayloadAttestation.d.ts.map +1 -1
- package/lib/signatureSets/indexedPayloadAttestation.js +3 -3
- package/lib/signatureSets/indexedPayloadAttestation.js.map +1 -1
- package/lib/signatureSets/proposer.d.ts +3 -3
- package/lib/signatureSets/proposer.d.ts.map +1 -1
- package/lib/signatureSets/proposer.js +12 -12
- package/lib/signatureSets/proposer.js.map +1 -1
- package/lib/signatureSets/proposerSlashings.d.ts +2 -3
- package/lib/signatureSets/proposerSlashings.d.ts.map +1 -1
- package/lib/signatureSets/proposerSlashings.js +6 -6
- package/lib/signatureSets/proposerSlashings.js.map +1 -1
- package/lib/signatureSets/randao.d.ts +1 -1
- package/lib/signatureSets/randao.d.ts.map +1 -1
- package/lib/signatureSets/randao.js +4 -4
- package/lib/signatureSets/randao.js.map +1 -1
- package/lib/signatureSets/voluntaryExits.d.ts +2 -2
- package/lib/signatureSets/voluntaryExits.d.ts.map +1 -1
- package/lib/signatureSets/voluntaryExits.js +6 -6
- package/lib/signatureSets/voluntaryExits.js.map +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/util/electra.d.ts.map +1 -1
- package/lib/util/electra.js +1 -2
- package/lib/util/electra.js.map +1 -1
- package/lib/util/epochShuffling.d.ts +1 -34
- package/lib/util/epochShuffling.d.ts.map +1 -1
- package/lib/util/epochShuffling.js +1 -1
- package/lib/util/epochShuffling.js.map +1 -1
- package/lib/util/gloas.d.ts +46 -5
- package/lib/util/gloas.d.ts.map +1 -1
- package/lib/util/gloas.js +91 -5
- package/lib/util/gloas.js.map +1 -1
- package/lib/util/index.d.ts +2 -2
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -2
- package/lib/util/index.js.map +1 -1
- package/lib/util/shuffling.d.ts +58 -0
- package/lib/util/shuffling.d.ts.map +1 -0
- package/lib/util/shuffling.js +175 -0
- package/lib/util/shuffling.js.map +1 -0
- package/lib/util/signatureSets.d.ts +38 -5
- package/lib/util/signatureSets.d.ts.map +1 -1
- package/lib/util/signatureSets.js +48 -6
- package/lib/util/signatureSets.js.map +1 -1
- package/lib/util/validator.d.ts +6 -1
- package/lib/util/validator.d.ts.map +1 -1
- package/lib/util/validator.js +26 -16
- package/lib/util/validator.js.map +1 -1
- package/package.json +7 -7
- package/src/block/index.ts +1 -0
- package/src/block/isValidIndexedAttestation.ts +18 -12
- package/src/block/isValidIndexedPayloadAttestation.ts +4 -1
- package/src/block/processAttestationPhase0.ts +2 -1
- package/src/block/processAttestationsAltair.ts +2 -8
- package/src/block/processAttesterSlashing.ts +16 -4
- package/src/block/processBlsToExecutionChange.ts +13 -14
- package/src/block/processConsolidationRequest.ts +2 -3
- package/src/block/processDepositRequest.ts +101 -8
- package/src/block/processExecutionPayloadBid.ts +20 -42
- package/src/block/processExecutionPayloadEnvelope.ts +34 -30
- package/src/block/processOperations.ts +2 -2
- package/src/block/processProposerSlashing.ts +22 -12
- package/src/block/processSyncCommittee.ts +3 -6
- package/src/block/processVoluntaryExit.ts +60 -5
- package/src/block/processWithdrawalRequest.ts +1 -1
- package/src/block/processWithdrawals.ts +168 -70
- package/src/cache/epochCache.ts +52 -214
- package/src/cache/epochTransitionCache.ts +9 -34
- package/src/cache/stateCache.ts +1 -2
- package/src/epoch/processBuilderPendingPayments.ts +1 -5
- package/src/epoch/processProposerLookahead.ts +3 -7
- package/src/index.ts +0 -2
- package/src/rewards/blockRewards.ts +6 -3
- package/src/rewards/syncCommitteeRewards.ts +10 -13
- package/src/signatureSets/attesterSlashings.ts +3 -7
- package/src/signatureSets/blsToExecutionChange.ts +5 -6
- package/src/signatureSets/executionPayloadBid.ts +14 -0
- package/src/signatureSets/executionPayloadEnvelope.ts +13 -0
- package/src/signatureSets/index.ts +8 -9
- package/src/signatureSets/indexedAttestation.ts +2 -7
- package/src/signatureSets/indexedPayloadAttestation.ts +9 -7
- package/src/signatureSets/proposer.ts +8 -12
- package/src/signatureSets/proposerSlashings.ts +4 -7
- package/src/signatureSets/randao.ts +4 -8
- package/src/signatureSets/voluntaryExits.ts +5 -10
- package/src/types.ts +1 -0
- package/src/util/electra.ts +1 -4
- package/src/util/epochShuffling.ts +2 -43
- package/src/util/gloas.ts +116 -10
- package/src/util/index.ts +2 -2
- package/src/util/shuffling.ts +234 -0
- package/src/util/signatureSets.ts +84 -8
- package/src/util/validator.ts +31 -16
- package/lib/util/calculateCommitteeAssignments.d.ts +0 -12
- package/lib/util/calculateCommitteeAssignments.d.ts.map +0 -1
- package/lib/util/calculateCommitteeAssignments.js +0 -26
- package/lib/util/calculateCommitteeAssignments.js.map +0 -1
- package/lib/util/shufflingDecisionRoot.d.ts +0 -20
- package/lib/util/shufflingDecisionRoot.d.ts.map +0 -1
- package/lib/util/shufflingDecisionRoot.js +0 -76
- package/lib/util/shufflingDecisionRoot.js.map +0 -1
- package/src/util/calculateCommitteeAssignments.ts +0 -43
- package/src/util/shufflingDecisionRoot.ts +0 -81
package/lib/util/gloas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gloas.js","sourceRoot":"","sources":["../../src/util/gloas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,qCAAqC,EACrC,mCAAmC,EACnC,yBAAyB,EACzB,2BAA2B,EAC3B,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAC,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAG9C,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"gloas.js","sourceRoot":"","sources":["../../src/util/gloas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/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IAAqB;IACxF,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,mBAAmB,GAAG,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3G,MAAM,kBAAkB,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;IAE/G,OAAO,mBAAmB,IAAI,kBAAkB,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,OAAO,eAAe,CAAC,KAAK,CAAC,yBAAyB,CAAC,SAAS,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;AAC3F,CAAC"}
|
package/lib/util/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./attesterStatus.js";
|
|
|
5
5
|
export * from "./balance.js";
|
|
6
6
|
export * from "./blindedBlock.js";
|
|
7
7
|
export * from "./blockRoot.js";
|
|
8
|
-
export * from "./calculateCommitteeAssignments.js";
|
|
9
8
|
export * from "./capella.js";
|
|
10
9
|
export * from "./computeAnchorCheckpoint.js";
|
|
11
10
|
export * from "./deposit.js";
|
|
@@ -16,11 +15,12 @@ export * from "./epochShuffling.js";
|
|
|
16
15
|
export * from "./execution.js";
|
|
17
16
|
export * from "./finality.js";
|
|
18
17
|
export * from "./genesis.js";
|
|
18
|
+
export * from "./gloas.js";
|
|
19
19
|
export * from "./interop.js";
|
|
20
20
|
export * from "./loadState/index.js";
|
|
21
21
|
export * from "./rootCache.js";
|
|
22
22
|
export * from "./seed.js";
|
|
23
|
-
export * from "./
|
|
23
|
+
export * from "./shuffling.js";
|
|
24
24
|
export * from "./signatureSets.js";
|
|
25
25
|
export * from "./signingRoot.js";
|
|
26
26
|
export * from "./slot.js";
|
package/lib/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
package/lib/util/index.js
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./attesterStatus.js";
|
|
|
5
5
|
export * from "./balance.js";
|
|
6
6
|
export * from "./blindedBlock.js";
|
|
7
7
|
export * from "./blockRoot.js";
|
|
8
|
-
export * from "./calculateCommitteeAssignments.js";
|
|
9
8
|
export * from "./capella.js";
|
|
10
9
|
export * from "./computeAnchorCheckpoint.js";
|
|
11
10
|
export * from "./deposit.js";
|
|
@@ -16,11 +15,12 @@ export * from "./epochShuffling.js";
|
|
|
16
15
|
export * from "./execution.js";
|
|
17
16
|
export * from "./finality.js";
|
|
18
17
|
export * from "./genesis.js";
|
|
18
|
+
export * from "./gloas.js";
|
|
19
19
|
export * from "./interop.js";
|
|
20
20
|
export * from "./loadState/index.js";
|
|
21
21
|
export * from "./rootCache.js";
|
|
22
22
|
export * from "./seed.js";
|
|
23
|
-
export * from "./
|
|
23
|
+
export * from "./shuffling.js";
|
|
24
24
|
export * from "./signatureSets.js";
|
|
25
25
|
export * from "./signingRoot.js";
|
|
26
26
|
export * from "./slot.js";
|
package/lib/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ForkName, ForkSeq } from "@lodestar/params";
|
|
2
|
+
import { Attestation, CommitteeIndex, Epoch, IndexedAttestation, Root, Slot, ValidatorIndex } from "@lodestar/types";
|
|
3
|
+
import { LodestarError } from "@lodestar/utils";
|
|
4
|
+
import { CachedBeaconStateAllForks } from "../cache/stateCache.js";
|
|
5
|
+
import { EpochShuffling } from "./epochShuffling.js";
|
|
6
|
+
/**
|
|
7
|
+
* Returns the block root which decided the proposer shuffling for the current epoch. This root
|
|
8
|
+
* can be used to key this proposer shuffling.
|
|
9
|
+
*
|
|
10
|
+
* Returns `null` on the one-off scenario where the genesis block decides its own shuffling.
|
|
11
|
+
* It should be set to the latest block applied to this `state` or the genesis block root.
|
|
12
|
+
*/
|
|
13
|
+
export declare function proposerShufflingDecisionRoot(fork: ForkName, state: CachedBeaconStateAllForks): Root | null;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the block root which decided the attester shuffling for the given `requestedEpoch`.
|
|
16
|
+
* This root can be used to key that attester shuffling.
|
|
17
|
+
*
|
|
18
|
+
* Returns `null` on the one-off scenario where the genesis block decides its own shuffling.
|
|
19
|
+
* It should be set to the latest block applied to this `state` or the genesis block root.
|
|
20
|
+
*/
|
|
21
|
+
export declare function attesterShufflingDecisionRoot(state: CachedBeaconStateAllForks, requestedEpoch: Epoch): Root | null;
|
|
22
|
+
export interface AttesterDuty {
|
|
23
|
+
validatorIndex: ValidatorIndex;
|
|
24
|
+
committeeIndex: CommitteeIndex;
|
|
25
|
+
committeeLength: number;
|
|
26
|
+
committeesAtSlot: number;
|
|
27
|
+
validatorCommitteeIndex: number;
|
|
28
|
+
slot: Slot;
|
|
29
|
+
}
|
|
30
|
+
export declare function calculateCommitteeAssignments(epochShuffling: EpochShuffling, requestedValidatorIndices: ValidatorIndex[]): Map<ValidatorIndex, AttesterDuty>;
|
|
31
|
+
/**
|
|
32
|
+
* Return the indexed attestation corresponding to ``attestation``.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getIndexedAttestation(epochShuffling: EpochShuffling, fork: ForkSeq, attestation: Attestation): IndexedAttestation;
|
|
35
|
+
/**
|
|
36
|
+
* Return indices of validators who attestested in `attestation`
|
|
37
|
+
*/
|
|
38
|
+
export declare function getAttestingIndices(epochShuffling: EpochShuffling, fork: ForkSeq, attestation: Attestation): number[];
|
|
39
|
+
/**
|
|
40
|
+
* Return the beacon committee at slot for index.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getBeaconCommittee(epochShuffling: EpochShuffling, slot: Slot, index: CommitteeIndex): Uint32Array;
|
|
43
|
+
/**
|
|
44
|
+
* Return a Uint32Array[] representing committees validator indices
|
|
45
|
+
*/
|
|
46
|
+
export declare function getBeaconCommittees(epochShuffling: EpochShuffling, slot: Slot, indices: CommitteeIndex[]): Uint32Array[];
|
|
47
|
+
export declare enum ShufflingErrorCode {
|
|
48
|
+
COMMITTEE_INDEX_OUT_OF_RANGE = "SHUFFLING_ERROR_COMMITTEE_INDEX_OUT_OF_RANGE"
|
|
49
|
+
}
|
|
50
|
+
type ShufflingErrorType = {
|
|
51
|
+
code: ShufflingErrorCode.COMMITTEE_INDEX_OUT_OF_RANGE;
|
|
52
|
+
index: number;
|
|
53
|
+
maxIndex: number;
|
|
54
|
+
};
|
|
55
|
+
export declare class ShufflingError extends LodestarError<ShufflingErrorType> {
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=shuffling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shuffling.d.ts","sourceRoot":"","sources":["../../src/util/shuffling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAkC,MAAM,kBAAkB,CAAC;AACpF,OAAO,EACL,WAAW,EACX,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,IAAI,EACJ,IAAI,EACJ,cAAc,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,yBAAyB,EAAC,MAAM,wBAAwB,CAAC;AAGjE,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,yBAAyB,GAAG,IAAI,GAAG,IAAI,CAM3G;AAaD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAMlH;AAsCD,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,cAAc,EAC9B,yBAAyB,EAAE,cAAc,EAAE,GAC1C,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAyBnC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,WAAW,GACvB,kBAAkB,CAWpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CA6BrH;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,GAAG,WAAW,CAEjH;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAc,EAAE,GACxB,WAAW,EAAE,CAoBf;AAED,oBAAY,kBAAkB;IAC5B,4BAA4B,iDAAiD;CAC9E;AAED,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,kBAAkB,CAAC,4BAA4B,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,cAAe,SAAQ,aAAa,CAAC,kBAAkB,CAAC;CAAG"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { ForkSeq, SLOTS_PER_EPOCH, isForkPostFulu } from "@lodestar/params";
|
|
2
|
+
import { LodestarError } from "@lodestar/utils";
|
|
3
|
+
import { getBlockRootAtSlot } from "./blockRoot.js";
|
|
4
|
+
import { computeStartSlotAtEpoch } from "./epoch.js";
|
|
5
|
+
/**
|
|
6
|
+
* Returns the block root which decided the proposer shuffling for the current epoch. This root
|
|
7
|
+
* can be used to key this proposer shuffling.
|
|
8
|
+
*
|
|
9
|
+
* Returns `null` on the one-off scenario where the genesis block decides its own shuffling.
|
|
10
|
+
* It should be set to the latest block applied to this `state` or the genesis block root.
|
|
11
|
+
*/
|
|
12
|
+
export function proposerShufflingDecisionRoot(fork, state) {
|
|
13
|
+
const decisionSlot = proposerShufflingDecisionSlot(fork, state);
|
|
14
|
+
if (state.slot === decisionSlot) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return getBlockRootAtSlot(state, decisionSlot);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns the slot at which the proposer shuffling was decided. The block root at this slot
|
|
21
|
+
* can be used to key the proposer shuffling for the current epoch.
|
|
22
|
+
*/
|
|
23
|
+
function proposerShufflingDecisionSlot(fork, state) {
|
|
24
|
+
// After fulu, the decision slot is in previous epoch due to deterministic proposer lookahead
|
|
25
|
+
const epoch = isForkPostFulu(fork) ? state.epochCtx.epoch - 1 : state.epochCtx.epoch;
|
|
26
|
+
const startSlot = computeStartSlotAtEpoch(epoch);
|
|
27
|
+
return Math.max(startSlot - 1, 0);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns the block root which decided the attester shuffling for the given `requestedEpoch`.
|
|
31
|
+
* This root can be used to key that attester shuffling.
|
|
32
|
+
*
|
|
33
|
+
* Returns `null` on the one-off scenario where the genesis block decides its own shuffling.
|
|
34
|
+
* It should be set to the latest block applied to this `state` or the genesis block root.
|
|
35
|
+
*/
|
|
36
|
+
export function attesterShufflingDecisionRoot(state, requestedEpoch) {
|
|
37
|
+
const decisionSlot = attesterShufflingDecisionSlot(state, requestedEpoch);
|
|
38
|
+
if (state.slot === decisionSlot) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return getBlockRootAtSlot(state, decisionSlot);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Returns the slot at which the proposer shuffling was decided. The block root at this slot
|
|
45
|
+
* can be used to key the proposer shuffling for the current epoch.
|
|
46
|
+
*/
|
|
47
|
+
function attesterShufflingDecisionSlot(state, requestedEpoch) {
|
|
48
|
+
const epoch = attesterShufflingDecisionEpoch(state, requestedEpoch);
|
|
49
|
+
const slot = computeStartSlotAtEpoch(epoch);
|
|
50
|
+
return Math.max(slot - 1, 0);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns the epoch at which the attester shuffling was decided.
|
|
54
|
+
*
|
|
55
|
+
* Spec ref: https://github.com/ethereum/beacon-APIs/blob/v2.1.0/apis/validator/duties/attester.yaml#L15
|
|
56
|
+
*
|
|
57
|
+
* Throws an error when:
|
|
58
|
+
* - `EpochTooLow` when `requestedEpoch` is more than 1 prior to `currentEpoch`.
|
|
59
|
+
* - `EpochTooHigh` when `requestedEpoch` is more than 1 after `currentEpoch`.
|
|
60
|
+
*/
|
|
61
|
+
function attesterShufflingDecisionEpoch(state, requestedEpoch) {
|
|
62
|
+
const currentEpoch = state.epochCtx.epoch;
|
|
63
|
+
// Next
|
|
64
|
+
if (requestedEpoch === currentEpoch + 1)
|
|
65
|
+
return currentEpoch;
|
|
66
|
+
// Current
|
|
67
|
+
if (requestedEpoch === currentEpoch)
|
|
68
|
+
return Math.max(currentEpoch - 1, 0);
|
|
69
|
+
// Previous
|
|
70
|
+
if (requestedEpoch === currentEpoch - 1)
|
|
71
|
+
return Math.max(currentEpoch - 2, 0);
|
|
72
|
+
if (requestedEpoch < currentEpoch) {
|
|
73
|
+
throw Error(`EpochTooLow: current ${currentEpoch} requested ${requestedEpoch}`);
|
|
74
|
+
}
|
|
75
|
+
throw Error(`EpochTooHigh: current ${currentEpoch} requested ${requestedEpoch}`);
|
|
76
|
+
}
|
|
77
|
+
export function calculateCommitteeAssignments(epochShuffling, requestedValidatorIndices) {
|
|
78
|
+
const requestedValidatorIndicesSet = new Set(requestedValidatorIndices);
|
|
79
|
+
const duties = new Map();
|
|
80
|
+
const epochCommittees = epochShuffling.committees;
|
|
81
|
+
for (let epochSlot = 0; epochSlot < SLOTS_PER_EPOCH; epochSlot++) {
|
|
82
|
+
const slotCommittees = epochCommittees[epochSlot];
|
|
83
|
+
for (let i = 0, committeesAtSlot = slotCommittees.length; i < committeesAtSlot; i++) {
|
|
84
|
+
for (let j = 0, committeeLength = slotCommittees[i].length; j < committeeLength; j++) {
|
|
85
|
+
const validatorIndex = slotCommittees[i][j];
|
|
86
|
+
if (requestedValidatorIndicesSet.has(validatorIndex)) {
|
|
87
|
+
duties.set(validatorIndex, {
|
|
88
|
+
validatorIndex,
|
|
89
|
+
committeeLength,
|
|
90
|
+
committeesAtSlot,
|
|
91
|
+
validatorCommitteeIndex: j,
|
|
92
|
+
committeeIndex: i,
|
|
93
|
+
slot: epochShuffling.epoch * SLOTS_PER_EPOCH + epochSlot,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return duties;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Return the indexed attestation corresponding to ``attestation``.
|
|
103
|
+
*/
|
|
104
|
+
export function getIndexedAttestation(epochShuffling, fork, attestation) {
|
|
105
|
+
const { data } = attestation;
|
|
106
|
+
const attestingIndices = getAttestingIndices(epochShuffling, fork, attestation);
|
|
107
|
+
// sort in-place
|
|
108
|
+
attestingIndices.sort((a, b) => a - b);
|
|
109
|
+
return {
|
|
110
|
+
attestingIndices: attestingIndices,
|
|
111
|
+
data: data,
|
|
112
|
+
signature: attestation.signature,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Return indices of validators who attestested in `attestation`
|
|
117
|
+
*/
|
|
118
|
+
export function getAttestingIndices(epochShuffling, fork, attestation) {
|
|
119
|
+
if (fork < ForkSeq.electra) {
|
|
120
|
+
const { aggregationBits, data } = attestation;
|
|
121
|
+
const validatorIndices = getBeaconCommittee(epochShuffling, data.slot, data.index);
|
|
122
|
+
return aggregationBits.intersectValues(validatorIndices);
|
|
123
|
+
}
|
|
124
|
+
const { aggregationBits, committeeBits, data } = attestation;
|
|
125
|
+
// There is a naming conflict on the term `committeeIndices`
|
|
126
|
+
// In Lodestar it usually means a list of validator indices of participants in a committee
|
|
127
|
+
// In the spec it means a list of committee indices according to committeeBits
|
|
128
|
+
// This `committeeIndices` refers to the latter
|
|
129
|
+
// TODO Electra: resolve the naming conflicts
|
|
130
|
+
const committeeIndices = committeeBits.getTrueBitIndexes();
|
|
131
|
+
const validatorsByCommittee = getBeaconCommittees(epochShuffling, data.slot, committeeIndices);
|
|
132
|
+
// Create a new Uint32Array to flatten `validatorsByCommittee`
|
|
133
|
+
const totalLength = validatorsByCommittee.reduce((acc, curr) => acc + curr.length, 0);
|
|
134
|
+
const committeeValidators = new Uint32Array(totalLength);
|
|
135
|
+
let offset = 0;
|
|
136
|
+
for (const committee of validatorsByCommittee) {
|
|
137
|
+
committeeValidators.set(committee, offset);
|
|
138
|
+
offset += committee.length;
|
|
139
|
+
}
|
|
140
|
+
return aggregationBits.intersectValues(committeeValidators);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Return the beacon committee at slot for index.
|
|
144
|
+
*/
|
|
145
|
+
export function getBeaconCommittee(epochShuffling, slot, index) {
|
|
146
|
+
return getBeaconCommittees(epochShuffling, slot, [index])[0];
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Return a Uint32Array[] representing committees validator indices
|
|
150
|
+
*/
|
|
151
|
+
export function getBeaconCommittees(epochShuffling, slot, indices) {
|
|
152
|
+
if (indices.length === 0) {
|
|
153
|
+
throw new Error("Attempt to get committees without providing CommitteeIndex");
|
|
154
|
+
}
|
|
155
|
+
const slotCommittees = epochShuffling.committees[slot % SLOTS_PER_EPOCH];
|
|
156
|
+
const committees = [];
|
|
157
|
+
for (const index of indices) {
|
|
158
|
+
if (index >= slotCommittees.length) {
|
|
159
|
+
throw new ShufflingError({
|
|
160
|
+
code: ShufflingErrorCode.COMMITTEE_INDEX_OUT_OF_RANGE,
|
|
161
|
+
index,
|
|
162
|
+
maxIndex: slotCommittees.length,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
committees.push(slotCommittees[index]);
|
|
166
|
+
}
|
|
167
|
+
return committees;
|
|
168
|
+
}
|
|
169
|
+
export var ShufflingErrorCode;
|
|
170
|
+
(function (ShufflingErrorCode) {
|
|
171
|
+
ShufflingErrorCode["COMMITTEE_INDEX_OUT_OF_RANGE"] = "SHUFFLING_ERROR_COMMITTEE_INDEX_OUT_OF_RANGE";
|
|
172
|
+
})(ShufflingErrorCode || (ShufflingErrorCode = {}));
|
|
173
|
+
export class ShufflingError extends LodestarError {
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=shuffling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shuffling.js","sourceRoot":"","sources":["../../src/util/shuffling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAE,eAAe,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAWpF,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAC;AAGnD;;;;;;GAMG;AACH,MAAM,UAAU,6BAA6B,CAAC,IAAc,EAAE,KAAgC;IAC5F,MAAM,YAAY,GAAG,6BAA6B,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChE,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,kBAAkB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,SAAS,6BAA6B,CAAC,IAAc,EAAE,KAAgC;IACrF,6FAA6F;IAC7F,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IACrF,MAAM,SAAS,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACjD,OAAO,IAAI,CAAC,G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mGAA6E,CAAA;AAC/E,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,QAE7B;AAQD,MAAM,OAAO,cAAe,SAAQ,aAAiC;CAAG"}
|
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
import { PublicKey } from "@chainsafe/blst";
|
|
2
2
|
import { Root } from "@lodestar/types";
|
|
3
|
+
import { Index2PubkeyCache } from "../cache/pubkeyCache.js";
|
|
3
4
|
export declare enum SignatureSetType {
|
|
4
5
|
single = "single",
|
|
5
|
-
aggregate = "aggregate"
|
|
6
|
+
aggregate = "aggregate",
|
|
7
|
+
/**
|
|
8
|
+
* Single signature with validator index instead of pubkey.
|
|
9
|
+
* Pubkey lookup is deferred to verification time.
|
|
10
|
+
*/
|
|
11
|
+
indexed = "indexed"
|
|
6
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Single signature with pubkey directly.
|
|
15
|
+
* Used when pubkey comes from the message itself (e.g. BLS to execution change).
|
|
16
|
+
*/
|
|
7
17
|
export type SingleSignatureSet = {
|
|
8
18
|
type: SignatureSetType.single;
|
|
9
19
|
pubkey: PublicKey;
|
|
10
20
|
signingRoot: Root;
|
|
11
21
|
signature: Uint8Array;
|
|
12
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Single signature with validator index.
|
|
25
|
+
* Pubkey is looked up at verification time.
|
|
26
|
+
*/
|
|
27
|
+
export type IndexedSignatureSet = {
|
|
28
|
+
type: SignatureSetType.indexed;
|
|
29
|
+
index: number;
|
|
30
|
+
signingRoot: Root;
|
|
31
|
+
signature: Uint8Array;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Aggregate signature with validator indices.
|
|
35
|
+
* Pubkeys are looked up and aggregated at verification time.
|
|
36
|
+
*/
|
|
13
37
|
export type AggregatedSignatureSet = {
|
|
14
38
|
type: SignatureSetType.aggregate;
|
|
15
|
-
|
|
39
|
+
indices: number[];
|
|
16
40
|
signingRoot: Root;
|
|
17
41
|
signature: Uint8Array;
|
|
18
42
|
};
|
|
19
|
-
export type ISignatureSet = SingleSignatureSet | AggregatedSignatureSet;
|
|
20
|
-
|
|
43
|
+
export type ISignatureSet = SingleSignatureSet | IndexedSignatureSet | AggregatedSignatureSet;
|
|
44
|
+
/**
|
|
45
|
+
* Get the pubkey for a signature set, performing aggregation if necessary.
|
|
46
|
+
* Requires index2pubkey cache for indexed and aggregate sets.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getSignatureSetPubkey(signatureSet: ISignatureSet, index2pubkey: Index2PubkeyCache): PublicKey;
|
|
49
|
+
export declare function verifySignatureSet(signatureSet: SingleSignatureSet, index2pubkey?: Index2PubkeyCache): boolean;
|
|
50
|
+
export declare function verifySignatureSet(signatureSet: IndexedSignatureSet, index2pubkey: Index2PubkeyCache): boolean;
|
|
51
|
+
export declare function verifySignatureSet(signatureSet: AggregatedSignatureSet, index2pubkey: Index2PubkeyCache): boolean;
|
|
52
|
+
export declare function verifySignatureSet(signatureSet: ISignatureSet, index2pubkey: Index2PubkeyCache): boolean;
|
|
21
53
|
export declare function createSingleSignatureSetFromComponents(pubkey: PublicKey, signingRoot: Root, signature: Uint8Array): SingleSignatureSet;
|
|
22
|
-
export declare function
|
|
54
|
+
export declare function createIndexedSignatureSetFromComponents(index: number, signingRoot: Root, signature: Uint8Array): IndexedSignatureSet;
|
|
55
|
+
export declare function createAggregateSignatureSetFromComponents(indices: number[], signingRoot: Root, signature: Uint8Array): AggregatedSignatureSet;
|
|
23
56
|
//# sourceMappingURL=signatureSets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signatureSets.d.ts","sourceRoot":"","sources":["../../src/util/signatureSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"signatureSets.d.ts","sourceRoot":"","sources":["../../src/util/signatureSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAA8D,MAAM,iBAAiB,CAAC;AACvG,OAAO,EAAC,IAAI,EA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,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC;AA6B1G,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,UAAU,GACpB,kBAAkB,CAOpB;AAED,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,UAAU,GACpB,mBAAmB,CAOrB;AAED,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,UAAU,GACpB,sBAAsB,CAOxB"}
|
|
@@ -1,17 +1,51 @@
|
|
|
1
|
-
import { Signature, fastAggregateVerify, verify } from "@chainsafe/blst";
|
|
1
|
+
import { Signature, aggregatePublicKeys, fastAggregateVerify, verify } from "@chainsafe/blst";
|
|
2
2
|
export var SignatureSetType;
|
|
3
3
|
(function (SignatureSetType) {
|
|
4
4
|
SignatureSetType["single"] = "single";
|
|
5
5
|
SignatureSetType["aggregate"] = "aggregate";
|
|
6
|
+
/**
|
|
7
|
+
* Single signature with validator index instead of pubkey.
|
|
8
|
+
* Pubkey lookup is deferred to verification time.
|
|
9
|
+
*/
|
|
10
|
+
SignatureSetType["indexed"] = "indexed";
|
|
6
11
|
})(SignatureSetType || (SignatureSetType = {}));
|
|
7
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Get the pubkey for a signature set, performing aggregation if necessary.
|
|
14
|
+
* Requires index2pubkey cache for indexed and aggregate sets.
|
|
15
|
+
*/
|
|
16
|
+
export function getSignatureSetPubkey(signatureSet, index2pubkey) {
|
|
17
|
+
switch (signatureSet.type) {
|
|
18
|
+
case SignatureSetType.single:
|
|
19
|
+
return signatureSet.pubkey;
|
|
20
|
+
case SignatureSetType.indexed:
|
|
21
|
+
return index2pubkey[signatureSet.index];
|
|
22
|
+
case SignatureSetType.aggregate: {
|
|
23
|
+
const pubkeys = signatureSet.indices.map((i) => index2pubkey[i]);
|
|
24
|
+
return aggregatePublicKeys(pubkeys);
|
|
25
|
+
}
|
|
26
|
+
default:
|
|
27
|
+
throw Error("Unknown signature set type");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export function verifySignatureSet(signatureSet, index2pubkey) {
|
|
8
31
|
// All signatures are not trusted and must be group checked (p2.subgroup_check)
|
|
9
32
|
const signature = Signature.fromBytes(signatureSet.signature, true);
|
|
10
33
|
switch (signatureSet.type) {
|
|
11
34
|
case SignatureSetType.single:
|
|
12
35
|
return verify(signatureSet.signingRoot, signatureSet.pubkey, signature);
|
|
13
|
-
case SignatureSetType.
|
|
14
|
-
|
|
36
|
+
case SignatureSetType.indexed: {
|
|
37
|
+
if (!index2pubkey) {
|
|
38
|
+
throw Error("index2pubkey required for indexed signature set");
|
|
39
|
+
}
|
|
40
|
+
return verify(signatureSet.signingRoot, index2pubkey[signatureSet.index], signature);
|
|
41
|
+
}
|
|
42
|
+
case SignatureSetType.aggregate: {
|
|
43
|
+
if (!index2pubkey) {
|
|
44
|
+
throw Error("index2pubkey required for aggregate signature set");
|
|
45
|
+
}
|
|
46
|
+
const pubkeys = signatureSet.indices.map((i) => index2pubkey[i]);
|
|
47
|
+
return fastAggregateVerify(signatureSet.signingRoot, pubkeys, signature);
|
|
48
|
+
}
|
|
15
49
|
default:
|
|
16
50
|
throw Error("Unknown signature set type");
|
|
17
51
|
}
|
|
@@ -24,10 +58,18 @@ export function createSingleSignatureSetFromComponents(pubkey, signingRoot, sign
|
|
|
24
58
|
signature,
|
|
25
59
|
};
|
|
26
60
|
}
|
|
27
|
-
export function
|
|
61
|
+
export function createIndexedSignatureSetFromComponents(index, signingRoot, signature) {
|
|
62
|
+
return {
|
|
63
|
+
type: SignatureSetType.indexed,
|
|
64
|
+
index,
|
|
65
|
+
signingRoot,
|
|
66
|
+
signature,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export function createAggregateSignatureSetFromComponents(indices, signingRoot, signature) {
|
|
28
70
|
return {
|
|
29
71
|
type: SignatureSetType.aggregate,
|
|
30
|
-
|
|
72
|
+
indices,
|
|
31
73
|
signingRoot,
|
|
32
74
|
signature,
|
|
33
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signatureSets.js","sourceRoot":"","sources":["../../src/util/signatureSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"signatureSets.js","sourceRoot":"","sources":["../../src/util/signatureSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAIvG,MAAM,CAAN,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;IACvB;;;OAGG;IACH,uCAAmB,CAAA;AACrB,CAAC,EARW,gBAAgB,KAAhB,gBAAgB,QAQ3B;AAqCD;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAA2B,EAAE,YAA+B;IAChG,QAAQ,YAAY,CAAC,IAAI,EAAE,CAAC;QAC1B,KAAK,gBAAgB,CAAC,MAAM;YAC1B,OAAO,YAAY,CAAC,MAAM,CAAC;QAE7B,KAAK,gBAAgB,CAAC,OAAO;YAC3B,OAAO,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAE1C,KAAK,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;YAChC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACjE,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QAED;YACE,MAAM,KAAK,CAAC,4BA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ACJ,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,KAAa,EACb,WAAiB,EACjB,SAAqB;IAErB,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,OAAO;QAC9B,KAAK;QACL,WAAW;QACX,SAAS;KACV,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yCAAyC,CACvD,OAAiB,EACjB,WAAiB,EACjB,SAAqB;IAErB,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,SAAS;QAChC,OAAO;QACP,WAAW;QACX,SAAS;KACV,CAAC;AACJ,CAAC"}
|
package/lib/util/validator.d.ts
CHANGED
|
@@ -26,5 +26,10 @@ export declare function getBalanceChurnLimitFromCache(epochCtx: EpochCache): num
|
|
|
26
26
|
export declare function getActivationExitChurnLimit(epochCtx: EpochCache): number;
|
|
27
27
|
export declare function getConsolidationChurnLimit(epochCtx: EpochCache): number;
|
|
28
28
|
export declare function getMaxEffectiveBalance(withdrawalCredentials: Uint8Array): number;
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Check if validator is partially withdrawable.
|
|
31
|
+
* https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/electra/beacon-chain.md#modified-is_partially_withdrawable_validator
|
|
32
|
+
*/
|
|
33
|
+
export declare function isPartiallyWithdrawableValidator(fork: ForkSeq, validator: phase0.Validator, balance: number): boolean;
|
|
34
|
+
export declare function getPendingBalanceToWithdraw(state: CachedBeaconStateElectra | CachedBeaconStateGloas, validatorIndex: ValidatorIndex): number;
|
|
30
35
|
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/util/validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAEL,OAAO,
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/util/validator.ts"],"names":[],"mappings":"AAAA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AgC,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAsBrH;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,wBAAwB,GAAG,sBAAsB,EACxD,cAAc,EAAE,cAAc,GAC7B,MAAM,CASR"}
|
package/lib/util/validator.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { EFFECTIVE_BALANCE_INCREMENT, ForkSeq, MAX_EFFECTIVE_BALANCE_ELECTRA, MIN_ACTIVATION_BALANCE, } from "@lodestar/params";
|
|
1
|
+
import { EFFECTIVE_BALANCE_INCREMENT, ForkSeq, MAX_EFFECTIVE_BALANCE, MAX_EFFECTIVE_BALANCE_ELECTRA, MIN_ACTIVATION_BALANCE, } from "@lodestar/params";
|
|
2
2
|
import { intDiv } from "@lodestar/utils";
|
|
3
|
-
import {
|
|
3
|
+
import { hasEth1WithdrawalCredential } from "./capella.js";
|
|
4
|
+
import { hasCompoundingWithdrawalCredential, hasExecutionWithdrawalCredential } from "./electra.js";
|
|
4
5
|
/**
|
|
5
6
|
* Check if [[validator]] is active
|
|
6
7
|
*/
|
|
@@ -61,26 +62,35 @@ export function getMaxEffectiveBalance(withdrawalCredentials) {
|
|
|
61
62
|
}
|
|
62
63
|
return MIN_ACTIVATION_BALANCE;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Check if validator is partially withdrawable.
|
|
67
|
+
* https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/electra/beacon-chain.md#modified-is_partially_withdrawable_validator
|
|
68
|
+
*/
|
|
69
|
+
export function isPartiallyWithdrawableValidator(fork, validator, balance) {
|
|
70
|
+
const isPostElectra = fork >= ForkSeq.electra;
|
|
71
|
+
// Check withdrawal credentials
|
|
72
|
+
const hasWithdrawableCredentials = isPostElectra
|
|
73
|
+
? hasExecutionWithdrawalCredential(validator.withdrawalCredentials)
|
|
74
|
+
: hasEth1WithdrawalCredential(validator.withdrawalCredentials);
|
|
75
|
+
if (!hasWithdrawableCredentials) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
// Get max effective balance based on fork
|
|
79
|
+
const maxEffectiveBalance = isPostElectra
|
|
80
|
+
? getMaxEffectiveBalance(validator.withdrawalCredentials)
|
|
81
|
+
: MAX_EFFECTIVE_BALANCE;
|
|
82
|
+
// Check if at max effective balance and has excess balance
|
|
83
|
+
const hasMaxEffectiveBalance = validator.effectiveBalance === maxEffectiveBalance;
|
|
84
|
+
const hasExcessBalance = balance > maxEffectiveBalance;
|
|
85
|
+
return hasMaxEffectiveBalance && hasExcessBalance;
|
|
86
|
+
}
|
|
87
|
+
export function getPendingBalanceToWithdraw(state, validatorIndex) {
|
|
65
88
|
let total = 0;
|
|
66
89
|
for (const item of state.pendingPartialWithdrawals.getAllReadonly()) {
|
|
67
90
|
if (item.validatorIndex === validatorIndex) {
|
|
68
91
|
total += Number(item.amount);
|
|
69
92
|
}
|
|
70
93
|
}
|
|
71
|
-
if (fork >= ForkSeq.gloas) {
|
|
72
|
-
const stateGloas = state;
|
|
73
|
-
for (const item of stateGloas.builderPendingWithdrawals.getAllReadonly()) {
|
|
74
|
-
if (item.builderIndex === validatorIndex) {
|
|
75
|
-
total += item.amount;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
for (const item of stateGloas.builderPendingPayments.getAllReadonly()) {
|
|
79
|
-
if (item.withdrawal.builderIndex === validatorIndex) {
|
|
80
|
-
total += item.withdrawal.amount;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
94
|
return total;
|
|
85
95
|
}
|
|
86
96
|
//# sourceMappingURL=validator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/util/validator.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,OAAO,EACP,6BAA6B,EAC7B,s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,KAAK,CAAC,yBAAyB,CAAC,cAAc,EAAE,EAAE,CAAC;QACpE,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,EAAE,CAAC;YAC3C,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,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.
|
|
14
|
+
"version": "1.40.0-dev.193b2e2047",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -62,14 +62,14 @@
|
|
|
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.
|
|
66
|
-
"@lodestar/params": "^1.
|
|
67
|
-
"@lodestar/types": "^1.
|
|
68
|
-
"@lodestar/utils": "^1.
|
|
65
|
+
"@lodestar/config": "^1.40.0-dev.193b2e2047",
|
|
66
|
+
"@lodestar/params": "^1.40.0-dev.193b2e2047",
|
|
67
|
+
"@lodestar/types": "^1.40.0-dev.193b2e2047",
|
|
68
|
+
"@lodestar/utils": "^1.40.0-dev.193b2e2047",
|
|
69
69
|
"bigint-buffer": "^1.1.5"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@lodestar/api": "^1.
|
|
72
|
+
"@lodestar/api": "^1.40.0-dev.193b2e2047"
|
|
73
73
|
},
|
|
74
74
|
"keywords": [
|
|
75
75
|
"ethereum",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"beacon",
|
|
78
78
|
"blockchain"
|
|
79
79
|
],
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "6df77fd926652de8fbbd235f81fe1a8b443ea2c3"
|
|
81
81
|
}
|
package/src/block/index.ts
CHANGED
|
@@ -38,6 +38,7 @@ export {
|
|
|
38
38
|
export * from "./externalData.js";
|
|
39
39
|
export * from "./initiateValidatorExit.js";
|
|
40
40
|
export * from "./isValidIndexedAttestation.js";
|
|
41
|
+
export * from "./processDepositRequest.js";
|
|
41
42
|
export * from "./processOperations.js";
|
|
42
43
|
|
|
43
44
|
export function processBlock(
|