@lodestar/state-transition 1.51.0-dev.2531f8fae8 → 1.51.0-dev.2aff7aaeb7

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.
Files changed (79) hide show
  1. package/lib/block/processDeposit.d.ts.map +1 -1
  2. package/lib/block/processDeposit.js +1 -1
  3. package/lib/block/processDeposit.js.map +1 -1
  4. package/lib/cache/epochCache.d.ts +2 -2
  5. package/lib/cache/epochCache.d.ts.map +1 -1
  6. package/lib/cache/epochCache.js +1 -1
  7. package/lib/cache/epochCache.js.map +1 -1
  8. package/lib/cache/syncCommitteeCache.d.ts +1 -1
  9. package/lib/cache/syncCommitteeCache.d.ts.map +1 -1
  10. package/lib/epoch/processSyncCommitteeUpdates.js +1 -1
  11. package/lib/epoch/processSyncCommitteeUpdates.js.map +1 -1
  12. package/lib/lightClient/spec/store.d.ts +1 -1
  13. package/lib/lightClient/spec/store.d.ts.map +1 -1
  14. package/lib/lightClient/spec/utils.d.ts.map +1 -1
  15. package/lib/lightClient/spec/utils.js +1 -1
  16. package/lib/lightClient/spec/utils.js.map +1 -1
  17. package/lib/lightClient/spec/validateLightClientUpdate.d.ts.map +1 -1
  18. package/lib/lightClient/spec/validateLightClientUpdate.js +1 -1
  19. package/lib/lightClient/spec/validateLightClientUpdate.js.map +1 -1
  20. package/lib/rewards/attestationsRewards.d.ts +1 -1
  21. package/lib/rewards/attestationsRewards.d.ts.map +1 -1
  22. package/lib/rewards/syncCommitteeRewards.d.ts +1 -1
  23. package/lib/rewards/syncCommitteeRewards.d.ts.map +1 -1
  24. package/lib/stateView/interface.d.ts +1 -1
  25. package/lib/stateView/interface.d.ts.map +1 -1
  26. package/lib/stateView/interface.js.map +1 -1
  27. package/lib/stateView/nativeBeaconStateView.d.ts +1 -1
  28. package/lib/stateView/nativeBeaconStateView.d.ts.map +1 -1
  29. package/lib/stateView/nativeBeaconStateView.js +3 -13
  30. package/lib/stateView/nativeBeaconStateView.js.map +1 -1
  31. package/lib/stateView/stateViewFactory.d.ts.map +1 -1
  32. package/lib/stateView/stateViewFactory.js +2 -2
  33. package/lib/stateView/stateViewFactory.js.map +1 -1
  34. package/lib/testUtils/interopPubkeyCache.js +1 -1
  35. package/lib/testUtils/interopPubkeyCache.js.map +1 -1
  36. package/lib/testUtils/state.d.ts.map +1 -1
  37. package/lib/testUtils/state.js +1 -1
  38. package/lib/testUtils/state.js.map +1 -1
  39. package/lib/testUtils/util.d.ts +1 -1
  40. package/lib/testUtils/util.d.ts.map +1 -1
  41. package/lib/testUtils/util.js +2 -2
  42. package/lib/testUtils/util.js.map +1 -1
  43. package/lib/util/epochShuffling.d.ts.map +1 -1
  44. package/lib/util/epochShuffling.js +1 -1
  45. package/lib/util/epochShuffling.js.map +1 -1
  46. package/lib/util/interop.d.ts +1 -1
  47. package/lib/util/interop.d.ts.map +1 -1
  48. package/lib/util/interop.js +1 -1
  49. package/lib/util/interop.js.map +1 -1
  50. package/lib/util/seed.js +1 -1
  51. package/lib/util/seed.js.map +1 -1
  52. package/lib/util/signatureSets.d.ts +1 -1
  53. package/lib/util/signatureSets.d.ts.map +1 -1
  54. package/lib/util/signatureSets.js +1 -1
  55. package/lib/util/signatureSets.js.map +1 -1
  56. package/lib/util/syncCommittee.d.ts.map +1 -1
  57. package/lib/util/syncCommittee.js +1 -1
  58. package/lib/util/syncCommittee.js.map +1 -1
  59. package/package.json +8 -8
  60. package/src/block/processDeposit.ts +2 -2
  61. package/src/cache/epochCache.ts +2 -2
  62. package/src/cache/syncCommitteeCache.ts +1 -1
  63. package/src/epoch/processSyncCommitteeUpdates.ts +1 -1
  64. package/src/lightClient/spec/store.ts +1 -1
  65. package/src/lightClient/spec/utils.ts +1 -1
  66. package/src/lightClient/spec/validateLightClientUpdate.ts +1 -1
  67. package/src/rewards/attestationsRewards.ts +1 -1
  68. package/src/rewards/syncCommitteeRewards.ts +1 -1
  69. package/src/stateView/interface.ts +0 -2
  70. package/src/stateView/nativeBeaconStateView.ts +3 -16
  71. package/src/stateView/stateViewFactory.ts +2 -2
  72. package/src/testUtils/interopPubkeyCache.ts +1 -1
  73. package/src/testUtils/state.ts +1 -1
  74. package/src/testUtils/util.ts +2 -2
  75. package/src/util/epochShuffling.ts +1 -1
  76. package/src/util/interop.ts +1 -1
  77. package/src/util/seed.ts +1 -1
  78. package/src/util/signatureSets.ts +1 -1
  79. package/src/util/syncCommittee.ts +1 -1
@@ -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 "@chainsafe/lodestar-z/blst";
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 {
4
4
  EFFECTIVE_BALANCE_INCREMENT,
5
5
  ForkName,
@@ -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
- _maxBuilderDeposits: number,
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
- // The native implementation has no pre-Gloas deposit cache to clear.
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 "@chainsafe/lodestar-z/pubkeys";
3
+ import {pubkeyCache} from "@lodestar/native/pubkeys";
4
4
  import {interopSecretKey} from "../util/interop.js";
5
5
  import {testCachePath} from "./cache.js";
6
6
 
@@ -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,
@@ -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,
@@ -1,5 +1,5 @@
1
- import {unshuffleList} from "@chainsafe/lodestar-z/shuffle";
2
1
  import {BeaconConfig} from "@lodestar/config";
2
+ import {unshuffleList} from "@lodestar/native/shuffle";
3
3
  import {
4
4
  DOMAIN_BEACON_ATTESTER,
5
5
  GENESIS_SLOT,
@@ -1,6 +1,6 @@
1
1
  import {toBufferBE} from "@vekexasia/bigint-buffer2";
2
2
  import {digest} from "@chainsafe/as-sha256";
3
- import {SecretKey} from "@chainsafe/lodestar-z/blst";
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 "@chainsafe/lodestar-z/shuffle";
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 "@chainsafe/lodestar-z/bls-verifier";
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 {
@@ -1,5 +1,5 @@
1
- import {aggregateSerializedPublicKeys} from "@chainsafe/lodestar-z/blst";
2
1
  import {ChainConfig} from "@lodestar/config";
2
+ import {aggregateSerializedPublicKeys} from "@lodestar/native/blst";
3
3
  import {
4
4
  BASE_REWARD_FACTOR,
5
5
  EFFECTIVE_BALANCE_INCREMENT,