@lodestar/state-transition 1.51.0-dev.4671dbfa39 → 1.51.0-dev.4a8c0994a0
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/processDeposit.d.ts.map +1 -1
- package/lib/block/processDeposit.js +1 -1
- package/lib/block/processDeposit.js.map +1 -1
- package/lib/cache/epochCache.d.ts +2 -2
- package/lib/cache/epochCache.d.ts.map +1 -1
- package/lib/cache/epochCache.js +1 -1
- package/lib/cache/epochCache.js.map +1 -1
- package/lib/cache/syncCommitteeCache.d.ts +1 -1
- package/lib/cache/syncCommitteeCache.d.ts.map +1 -1
- package/lib/epoch/processSyncCommitteeUpdates.js +1 -1
- package/lib/epoch/processSyncCommitteeUpdates.js.map +1 -1
- package/lib/lightClient/spec/store.d.ts +1 -1
- package/lib/lightClient/spec/store.d.ts.map +1 -1
- package/lib/lightClient/spec/utils.d.ts.map +1 -1
- package/lib/lightClient/spec/utils.js +1 -1
- package/lib/lightClient/spec/utils.js.map +1 -1
- package/lib/lightClient/spec/validateLightClientUpdate.d.ts.map +1 -1
- package/lib/lightClient/spec/validateLightClientUpdate.js +1 -1
- package/lib/lightClient/spec/validateLightClientUpdate.js.map +1 -1
- package/lib/rewards/attestationsRewards.d.ts +1 -1
- package/lib/rewards/attestationsRewards.d.ts.map +1 -1
- package/lib/rewards/syncCommitteeRewards.d.ts +1 -1
- package/lib/rewards/syncCommitteeRewards.d.ts.map +1 -1
- package/lib/stateView/interface.d.ts +1 -1
- package/lib/stateView/interface.d.ts.map +1 -1
- package/lib/stateView/interface.js.map +1 -1
- package/lib/stateView/nativeBeaconStateView.d.ts +1 -1
- package/lib/stateView/nativeBeaconStateView.d.ts.map +1 -1
- package/lib/stateView/nativeBeaconStateView.js +3 -13
- package/lib/stateView/nativeBeaconStateView.js.map +1 -1
- package/lib/stateView/stateViewFactory.d.ts.map +1 -1
- package/lib/stateView/stateViewFactory.js +2 -2
- package/lib/stateView/stateViewFactory.js.map +1 -1
- package/lib/testUtils/interopPubkeyCache.js +1 -1
- package/lib/testUtils/interopPubkeyCache.js.map +1 -1
- package/lib/testUtils/state.d.ts.map +1 -1
- package/lib/testUtils/state.js +1 -1
- package/lib/testUtils/state.js.map +1 -1
- package/lib/testUtils/util.d.ts +1 -1
- package/lib/testUtils/util.d.ts.map +1 -1
- package/lib/testUtils/util.js +2 -2
- package/lib/testUtils/util.js.map +1 -1
- 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/genesis.d.ts.map +1 -1
- package/lib/util/genesis.js +8 -1
- package/lib/util/genesis.js.map +1 -1
- package/lib/util/interop.d.ts +1 -1
- package/lib/util/interop.d.ts.map +1 -1
- package/lib/util/interop.js +1 -1
- package/lib/util/interop.js.map +1 -1
- package/lib/util/seed.js +1 -1
- package/lib/util/seed.js.map +1 -1
- package/lib/util/signatureSets.d.ts +1 -1
- package/lib/util/signatureSets.d.ts.map +1 -1
- package/lib/util/signatureSets.js +1 -1
- package/lib/util/signatureSets.js.map +1 -1
- package/lib/util/syncCommittee.d.ts.map +1 -1
- package/lib/util/syncCommittee.js +1 -1
- package/lib/util/syncCommittee.js.map +1 -1
- package/package.json +8 -8
- package/src/block/processDeposit.ts +2 -2
- package/src/cache/epochCache.ts +2 -2
- package/src/cache/syncCommitteeCache.ts +1 -1
- package/src/epoch/processSyncCommitteeUpdates.ts +1 -1
- package/src/lightClient/spec/store.ts +1 -1
- package/src/lightClient/spec/utils.ts +1 -1
- package/src/lightClient/spec/validateLightClientUpdate.ts +1 -1
- package/src/rewards/attestationsRewards.ts +1 -1
- package/src/rewards/syncCommitteeRewards.ts +1 -1
- package/src/stateView/interface.ts +0 -2
- package/src/stateView/nativeBeaconStateView.ts +3 -16
- package/src/stateView/stateViewFactory.ts +2 -2
- package/src/testUtils/interopPubkeyCache.ts +1 -1
- package/src/testUtils/state.ts +1 -1
- package/src/testUtils/util.ts +2 -2
- package/src/util/epochShuffling.ts +1 -1
- package/src/util/genesis.ts +9 -1
- package/src/util/interop.ts +1 -1
- package/src/util/seed.ts +1 -1
- package/src/util/signatureSets.ts +1 -1
- package/src/util/syncCommittee.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncCommittee.d.ts","sourceRoot":"","sources":["../../src/util/syncCommittee.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"syncCommittee.d.ts","sourceRoot":"","sources":["../../src/util/syncCommittee.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAGL,OAAO,EAMR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,0BAA0B,EAAC,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,mBAAmB,EAC1B,sBAAsB,EAAE,WAAW,EACnC,0BAA0B,EAAE,0BAA0B,GACrD;IAAC,OAAO,EAAE,WAAW,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC,aAAa,CAAA;CAAC,CAgB7D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,KAAK,EACZ,4BAA4B,EAAE,MAAM,GACnC,MAAM,CAOR;AAED;;;IAGI;AACJ,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,KAAK,EACZ,2BAA2B,EAAE,MAAM,GAClC,MAAM,CASR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aggregateSerializedPublicKeys } from "@
|
|
1
|
+
import { aggregateSerializedPublicKeys } from "@lodestar/native/blst";
|
|
2
2
|
import { BASE_REWARD_FACTOR, EFFECTIVE_BALANCE_INCREMENT, GENESIS_EPOCH, SLOTS_PER_EPOCH, SYNC_COMMITTEE_SIZE, SYNC_REWARD_WEIGHT, WEIGHT_DENOMINATOR, } from "@lodestar/params";
|
|
3
3
|
import { bigIntSqrt } from "@lodestar/utils";
|
|
4
4
|
import { getNextSyncCommitteeIndices } from "./seed.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncCommittee.js","sourceRoot":"","sources":["../../src/util/syncCommittee.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"syncCommittee.js","sourceRoot":"","sources":["../../src/util/syncCommittee.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AACpE,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAE3B,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAAC,2BAA2B,EAAC,MAAM,WAAW,CAAC;AACtD,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,KAA0B,EAC1B,sBAAmC,EACnC,0BAAsD;IAEtD,MAAM,OAAO,GAAG,2BAA2B,CAAC,IAAI,EAAE,KAAK,EAAE,sBAAsB,EAAE,0BAA0B,CAAC,CAAC;IAE7G,iFAAiF;IACjF,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO;QACL,OAAO;QACP,aAAa,EAAE;YACb,OAAO;YACP,eAAe,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE;SAClE;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAmB,EACnB,KAAY,EACZ,4BAAoC;IAEpC,MAAM,sBAAsB,GAAG,6BAA6B,CAAC,MAAM,EAAE,KAAK,EAAE,4BAA4B,CAAC,CAAC;IAC1G,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,4BAA4B,CAAC;IAC/E,MAAM,qBAAqB,GAAG,IAAI,CAAC,KAAK,CACtC,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,GAAG,kBAAkB,CAAC,GAAG,eAAe,CAC3F,CAAC;IACF,OAAO,IAAI,CAAC,KAAK,CAAC,qBAAqB,GAAG,mBAAmB,CAAC,CAAC;AACjE,CAAC;AAED;;;IAGI;AACJ,MAAM,UAAU,6BAA6B,CAC3C,MAAmB,EACnB,KAAY,EACZ,2BAAmC;IAEnC,uDAAuD;IACvD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAC1B,CAAC,2BAA2B,GAAG,kBAAkB,GAAG,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC1F,wBAAwB,CAAC,MAAM,EAAE,aAAa,CAAC,CAClD,CAAC;IACF,OAAO,IAAI,CAAC,KAAK,CACf,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,2BAA2B,CAAC,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAC1G,CAAC;AACJ,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.51.0-dev.
|
|
14
|
+
"version": "1.51.0-dev.4a8c0994a0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
"types": "lib/index.d.ts",
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@chainsafe/as-sha256": "^1.2.5",
|
|
69
|
-
"@chainsafe/lodestar-z": "catalog:",
|
|
70
69
|
"@chainsafe/persistent-merkle-tree": "^1.3.1",
|
|
71
70
|
"@chainsafe/ssz": "^1.9.0",
|
|
72
|
-
"@lodestar/config": "^1.51.0-dev.
|
|
73
|
-
"@lodestar/
|
|
74
|
-
"@lodestar/
|
|
75
|
-
"@lodestar/
|
|
71
|
+
"@lodestar/config": "^1.51.0-dev.4a8c0994a0",
|
|
72
|
+
"@lodestar/native": "^1.51.0-dev.4a8c0994a0",
|
|
73
|
+
"@lodestar/params": "^1.51.0-dev.4a8c0994a0",
|
|
74
|
+
"@lodestar/types": "^1.51.0-dev.4a8c0994a0",
|
|
75
|
+
"@lodestar/utils": "^1.51.0-dev.4a8c0994a0",
|
|
76
76
|
"@vekexasia/bigint-buffer2": "^1.1.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@lodestar/test-utils": "^1.51.0-dev.
|
|
79
|
+
"@lodestar/test-utils": "^1.51.0-dev.4a8c0994a0"
|
|
80
80
|
},
|
|
81
81
|
"keywords": [
|
|
82
82
|
"ethereum",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"beacon",
|
|
85
85
|
"blockchain"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "df12681979ae95b739d52db0a3c586255cbac8fb"
|
|
88
88
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {BeaconConfig} from "@lodestar/config";
|
|
1
2
|
import {
|
|
2
3
|
BLS_VERIFIER_MAX_BATCH_SIZE,
|
|
3
4
|
BLS_VERIFIER_SET_TYPE,
|
|
4
5
|
type BlsSignatureSet,
|
|
5
6
|
verifySignatureSets,
|
|
6
|
-
} from "@
|
|
7
|
-
import {BeaconConfig} from "@lodestar/config";
|
|
7
|
+
} from "@lodestar/native/bls-verifier";
|
|
8
8
|
import {
|
|
9
9
|
DEPOSIT_CONTRACT_TREE_DEPTH,
|
|
10
10
|
DOMAIN_DEPOSIT,
|
package/src/cache/epochCache.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {PublicKey} from "@chainsafe/lodestar-z/blst";
|
|
2
|
-
import {type PubkeyCache, pubkeyCache as defaultPubkeyCache} from "@chainsafe/lodestar-z/pubkeys";
|
|
3
1
|
import {BeaconConfig, ChainConfig, createBeaconConfig} from "@lodestar/config";
|
|
2
|
+
import {PublicKey} from "@lodestar/native/blst";
|
|
3
|
+
import {type PubkeyCache, pubkeyCache as defaultPubkeyCache} from "@lodestar/native/pubkeys";
|
|
4
4
|
import {
|
|
5
5
|
ATTESTATION_SUBNET_COUNT,
|
|
6
6
|
DOMAIN_BEACON_PROPOSER,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {type PubkeyCache} from "@chainsafe/lodestar-z/pubkeys";
|
|
2
1
|
import {CompositeViewDU} from "@chainsafe/ssz";
|
|
2
|
+
import {type PubkeyCache} from "@lodestar/native/pubkeys";
|
|
3
3
|
import {ValidatorIndex, ssz} from "@lodestar/types";
|
|
4
4
|
import {toPubkeyHex} from "@lodestar/utils";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {aggregateSerializedPublicKeys} from "@
|
|
1
|
+
import {aggregateSerializedPublicKeys} from "@lodestar/native/blst";
|
|
2
2
|
import {EPOCHS_PER_SYNC_COMMITTEE_PERIOD, ForkSeq} from "@lodestar/params";
|
|
3
3
|
import {ssz} from "@lodestar/types";
|
|
4
4
|
import {CachedBeaconStateAltair} from "../types.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {PublicKey} from "@chainsafe/lodestar-z/blst";
|
|
2
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
|
+
import type {PublicKey} from "@lodestar/native/blst";
|
|
3
3
|
import {LightClientBootstrap, LightClientHeader, LightClientUpdate, SyncPeriod} from "@lodestar/types";
|
|
4
4
|
import {computeSyncPeriodAtSlot} from "../../util/epoch.js";
|
|
5
5
|
import type {LightClientUpdateSummary} from "./isBetterUpdate.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {PublicKey} from "@chainsafe/lodestar-z/blst";
|
|
2
1
|
import {Tree} from "@chainsafe/persistent-merkle-tree";
|
|
3
2
|
import {BitArray} from "@chainsafe/ssz";
|
|
4
3
|
import {ChainForkConfig} from "@lodestar/config";
|
|
4
|
+
import {PublicKey} from "@lodestar/native/blst";
|
|
5
5
|
import {
|
|
6
6
|
BLOCK_BODY_EXECUTION_PAYLOAD_GINDEX,
|
|
7
7
|
CURRENT_SYNC_COMMITTEE_GINDEX,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {PublicKey, Signature, fastAggregateVerify} from "@chainsafe/lodestar-z/blst";
|
|
2
1
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
|
+
import {PublicKey, Signature, fastAggregateVerify} from "@lodestar/native/blst";
|
|
3
3
|
import {DOMAIN_SYNC_COMMITTEE, GENESIS_SLOT, MIN_SYNC_COMMITTEE_PARTICIPANTS} from "@lodestar/params";
|
|
4
4
|
import {LightClientUpdate, Root, ssz} from "@lodestar/types";
|
|
5
5
|
import type {ILightClientStore, SyncCommitteeFast} from "./store.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {type PubkeyCache} from "@chainsafe/lodestar-z/pubkeys";
|
|
2
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
|
+
import {type PubkeyCache} from "@lodestar/native/pubkeys";
|
|
3
3
|
import {ForkName, SYNC_COMMITTEE_SIZE} from "@lodestar/params";
|
|
4
4
|
import {BeaconBlock, ValidatorIndex, altair, rewards} from "@lodestar/types";
|
|
5
5
|
import {toPubkeyHex} from "@lodestar/utils";
|
|
@@ -348,8 +348,6 @@ export type IBeaconStateViewNative = Omit<
|
|
|
348
348
|
| "pendingConsolidations"
|
|
349
349
|
| "pendingDeposits"
|
|
350
350
|
| "pendingPartialWithdrawals"
|
|
351
|
-
| "preVerifyBuilderDepositsPreGloas"
|
|
352
|
-
| "clearPreGloasBuilderDepositCache"
|
|
353
351
|
| "processSlots"
|
|
354
352
|
| "proposerLookahead"
|
|
355
353
|
| "stateTransition"
|
|
@@ -908,25 +908,12 @@ export class NativeBeaconStateView implements IBeaconStateViewLatestFork {
|
|
|
908
908
|
return this.cachedProposerLookahead;
|
|
909
909
|
}
|
|
910
910
|
|
|
911
|
-
preVerifyBuilderDepositsPreGloas(
|
|
912
|
-
|
|
913
|
-
_maxDurationMs: number
|
|
914
|
-
): PreVerifyBuilderDepositsResult {
|
|
915
|
-
// The native fork upgrade verifies directly; it does not maintain a warm-up cache.
|
|
916
|
-
return {
|
|
917
|
-
validBuilderSignaturesCount: 0,
|
|
918
|
-
invalidBuilderSignaturesCount: 0,
|
|
919
|
-
validValidatorSignaturesCount: 0,
|
|
920
|
-
invalidValidatorSignaturesCount: 0,
|
|
921
|
-
scannedPendingDeposits: 0,
|
|
922
|
-
totalCachedDeposits: 0,
|
|
923
|
-
totalBuilderPubkeys: 0,
|
|
924
|
-
pendingDepositsCount: this.pendingDepositsCount,
|
|
925
|
-
};
|
|
911
|
+
preVerifyBuilderDepositsPreGloas(maxBuilderDeposits: number, maxDurationMs: number): PreVerifyBuilderDepositsResult {
|
|
912
|
+
return this.binding.preVerifyBuilderDepositsPreGloas(maxBuilderDeposits, maxDurationMs);
|
|
926
913
|
}
|
|
927
914
|
|
|
928
915
|
clearPreGloasBuilderDepositCache(): void {
|
|
929
|
-
|
|
916
|
+
this.binding.clearPreGloasBuilderDepositCache();
|
|
930
917
|
}
|
|
931
918
|
|
|
932
919
|
// ─── gloas ───────────────────────────────────────────────────────────────
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindings from "@chainsafe/lodestar-z";
|
|
2
|
-
import {pubkeyCache} from "@chainsafe/lodestar-z/pubkeys";
|
|
3
1
|
import {BeaconConfig} from "@lodestar/config";
|
|
2
|
+
import bindings from "@lodestar/native";
|
|
3
|
+
import {pubkeyCache} from "@lodestar/native/pubkeys";
|
|
4
4
|
import {createCachedBeaconState} from "../cache/stateCache.js";
|
|
5
5
|
import {getStateSlotFromBytes, getStateTypeFromBytes} from "../util/sszBytes.js";
|
|
6
6
|
import {BeaconStateView} from "./beaconStateView.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import {pubkeyCache} from "@
|
|
3
|
+
import {pubkeyCache} from "@lodestar/native/pubkeys";
|
|
4
4
|
import {interopSecretKey} from "../util/interop.js";
|
|
5
5
|
import {testCachePath} from "./cache.js";
|
|
6
6
|
|
package/src/testUtils/state.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {pubkeyCache} from "@chainsafe/lodestar-z/pubkeys";
|
|
2
1
|
import {ChainForkConfig, createBeaconConfig} from "@lodestar/config";
|
|
3
2
|
import {config, config as minimalConfig} from "@lodestar/config/default";
|
|
3
|
+
import {pubkeyCache} from "@lodestar/native/pubkeys";
|
|
4
4
|
import {
|
|
5
5
|
EPOCHS_PER_HISTORICAL_VECTOR,
|
|
6
6
|
EPOCHS_PER_SLASHINGS_VECTOR,
|
package/src/testUtils/util.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {PublicKey, SecretKey} from "@chainsafe/lodestar-z/blst";
|
|
2
|
-
import {pubkeyCache} from "@chainsafe/lodestar-z/pubkeys";
|
|
3
1
|
import {BitArray, fromHexString} from "@chainsafe/ssz";
|
|
4
2
|
import {BeaconConfig, createBeaconConfig, createChainForkConfig} from "@lodestar/config";
|
|
5
3
|
import {config} from "@lodestar/config/default";
|
|
4
|
+
import {PublicKey, SecretKey} from "@lodestar/native/blst";
|
|
5
|
+
import {pubkeyCache} from "@lodestar/native/pubkeys";
|
|
6
6
|
import {
|
|
7
7
|
BUILDER_WITHDRAWAL_PREFIX,
|
|
8
8
|
DOMAIN_DEPOSIT,
|
package/src/util/genesis.ts
CHANGED
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
GENESIS_EPOCH,
|
|
9
9
|
GENESIS_SLOT,
|
|
10
10
|
MAX_EFFECTIVE_BALANCE,
|
|
11
|
+
MIN_SEED_LOOKAHEAD,
|
|
11
12
|
UNSET_DEPOSIT_REQUESTS_START_INDEX,
|
|
12
13
|
} from "@lodestar/params";
|
|
13
|
-
import {Bytes32, Root, TimeSeconds, phase0, ssz} from "@lodestar/types";
|
|
14
|
+
import {Bytes32, Root, TimeSeconds, ValidatorIndex, phase0, ssz} from "@lodestar/types";
|
|
14
15
|
import {applyDeposit, processDeposit} from "../block/processDeposit.js";
|
|
15
16
|
import {EpochCacheImmutableData} from "../cache/epochCache.js";
|
|
16
17
|
import {createCachedBeaconState} from "../cache/stateCache.js";
|
|
@@ -26,6 +27,7 @@ import {
|
|
|
26
27
|
import {newFilledArray} from "./array.js";
|
|
27
28
|
import {getTemporaryBlockHeader} from "./blockRoot.js";
|
|
28
29
|
import {computeEpochAtSlot} from "./epoch.js";
|
|
30
|
+
import {computeProposerIndices} from "./seed.js";
|
|
29
31
|
import {getNextSyncCommittee} from "./syncCommittee.js";
|
|
30
32
|
import {getActiveValidatorIndices, getMaxEffectiveBalance} from "./validator.js";
|
|
31
33
|
|
|
@@ -352,6 +354,12 @@ export function initializeBeaconStateFromEth1(
|
|
|
352
354
|
// Fulu retires the legacy bridge after the genesis deposits.
|
|
353
355
|
stateFulu.depositRequestsStartIndex = BigInt(stateFulu.eth1DepositIndex);
|
|
354
356
|
}
|
|
357
|
+
const proposerLookahead: ValidatorIndex[] = [];
|
|
358
|
+
for (let epoch = GENESIS_EPOCH; epoch <= GENESIS_EPOCH + MIN_SEED_LOOKAHEAD; epoch++) {
|
|
359
|
+
const activeIndices = getActiveValidatorIndices(state, epoch);
|
|
360
|
+
proposerLookahead.push(...computeProposerIndices(fork, state, {activeIndices}, epoch));
|
|
361
|
+
}
|
|
362
|
+
stateFulu.proposerLookahead = ssz.fulu.ProposerLookahead.toViewDU(proposerLookahead);
|
|
355
363
|
}
|
|
356
364
|
|
|
357
365
|
if (fork >= ForkSeq.gloas) {
|
package/src/util/interop.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {toBufferBE} from "@vekexasia/bigint-buffer2";
|
|
2
2
|
import {digest} from "@chainsafe/as-sha256";
|
|
3
|
-
import {SecretKey} from "@
|
|
3
|
+
import {SecretKey} from "@lodestar/native/blst";
|
|
4
4
|
import {bytesToBigInt, intToBytes} from "@lodestar/utils";
|
|
5
5
|
|
|
6
6
|
let curveOrder: bigint;
|
package/src/util/seed.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
computePtcIndicesForEpoch,
|
|
4
4
|
computeProposerIndex as nativeComputeProposerIndex,
|
|
5
5
|
computeSyncCommitteeIndices as nativeComputeSyncCommitteeIndices,
|
|
6
|
-
} from "@
|
|
6
|
+
} from "@lodestar/native/shuffle";
|
|
7
7
|
import {
|
|
8
8
|
DOMAIN_BEACON_PROPOSER,
|
|
9
9
|
DOMAIN_PTC_ATTESTER,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {BLS_VERIFIER_SET_TYPE, type BlsSignatureSet, verifySignatureSets} from "@
|
|
1
|
+
import {BLS_VERIFIER_SET_TYPE, type BlsSignatureSet, verifySignatureSets} from "@lodestar/native/bls-verifier";
|
|
2
2
|
import {Root} from "@lodestar/types";
|
|
3
3
|
|
|
4
4
|
export enum SignatureSetType {
|