@lodestar/beacon-node 1.41.0-rc.2 → 1.42.0-dev.4411584fd8
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/api/impl/beacon/state/utils.d.ts +2 -2
- package/lib/api/impl/beacon/state/utils.d.ts.map +1 -1
- package/lib/api/impl/beacon/state/utils.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +5 -1
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.d.ts +0 -1
- package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
- package/lib/chain/archiveStore/archiveStore.js +0 -9
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/interface.d.ts +4 -4
- package/lib/chain/archiveStore/interface.d.ts.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts +4 -4
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.d.ts.map +1 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js +4 -1
- package/lib/chain/archiveStore/strategies/frequencyStateArchiveStrategy.js.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.d.ts.map +1 -1
- package/lib/chain/archiveStore/utils/archiveBlocks.js +38 -0
- package/lib/chain/archiveStore/utils/archiveBlocks.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +11 -7
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js +1 -1
- package/lib/chain/blocks/verifyBlocksSignatures.js.map +1 -1
- package/lib/chain/chain.d.ts +3 -3
- package/lib/chain/chain.d.ts.map +1 -1
- package/lib/chain/chain.js +16 -7
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/interface.d.ts +2 -2
- package/lib/chain/interface.d.ts.map +1 -1
- package/lib/chain/opPools/utils.js +1 -1
- package/lib/chain/opPools/utils.js.map +1 -1
- package/lib/chain/prepareNextSlot.d.ts.map +1 -1
- package/lib/chain/prepareNextSlot.js +6 -2
- package/lib/chain/prepareNextSlot.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/regen/errors.d.ts +11 -1
- package/lib/chain/regen/errors.d.ts.map +1 -1
- package/lib/chain/regen/errors.js +2 -0
- package/lib/chain/regen/errors.js.map +1 -1
- package/lib/chain/regen/interface.d.ts +12 -6
- package/lib/chain/regen/interface.d.ts.map +1 -1
- package/lib/chain/regen/queued.d.ts +11 -6
- package/lib/chain/regen/queued.d.ts.map +1 -1
- package/lib/chain/regen/queued.js +40 -8
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/regen/regen.d.ts +5 -0
- package/lib/chain/regen/regen.d.ts.map +1 -1
- package/lib/chain/regen/regen.js +33 -6
- package/lib/chain/regen/regen.js.map +1 -1
- package/lib/chain/stateCache/datastore/db.d.ts +4 -5
- package/lib/chain/stateCache/datastore/db.d.ts.map +1 -1
- package/lib/chain/stateCache/datastore/db.js +32 -10
- package/lib/chain/stateCache/datastore/db.js.map +1 -1
- package/lib/chain/stateCache/datastore/file.d.ts +1 -1
- package/lib/chain/stateCache/datastore/file.d.ts.map +1 -1
- package/lib/chain/stateCache/datastore/file.js +5 -5
- package/lib/chain/stateCache/datastore/file.js.map +1 -1
- package/lib/chain/stateCache/datastore/types.d.ts +1 -1
- package/lib/chain/stateCache/datastore/types.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts +7 -4
- package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
- package/lib/chain/stateCache/fifoBlockStateCache.js +8 -3
- package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +33 -14
- package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
- package/lib/chain/stateCache/persistentCheckpointsCache.js +217 -119
- package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
- package/lib/chain/stateCache/types.d.ts +15 -8
- package/lib/chain/stateCache/types.d.ts.map +1 -1
- package/lib/chain/stateCache/types.js.map +1 -1
- package/lib/chain/validation/lightClientFinalityUpdate.js +1 -1
- package/lib/chain/validation/lightClientFinalityUpdate.js.map +1 -1
- package/lib/chain/validation/lightClientOptimisticUpdate.js +1 -1
- package/lib/chain/validation/lightClientOptimisticUpdate.js.map +1 -1
- package/lib/chain/validation/voluntaryExit.d.ts.map +1 -1
- package/lib/chain/validation/voluntaryExit.js +2 -2
- package/lib/chain/validation/voluntaryExit.js.map +1 -1
- package/lib/chain/validatorMonitor.js +1 -1
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/execution/engine/interface.d.ts +2 -2
- package/lib/network/network.js +2 -2
- package/lib/network/network.js.map +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.d.ts +1 -1
- package/lib/network/reqresp/ReqRespBeaconNode.js +1 -1
- package/lib/sync/backfill/backfill.d.ts +1 -1
- package/lib/sync/backfill/backfill.js +1 -1
- package/lib/sync/constants.d.ts +1 -1
- package/lib/sync/constants.js +1 -1
- package/package.json +15 -15
- package/src/api/impl/beacon/state/utils.ts +2 -2
- package/src/api/impl/validator/index.ts +7 -3
- package/src/chain/archiveStore/archiveStore.ts +0 -10
- package/src/chain/archiveStore/interface.ts +4 -4
- package/src/chain/archiveStore/strategies/frequencyStateArchiveStrategy.ts +8 -5
- package/src/chain/archiveStore/utils/archiveBlocks.ts +59 -1
- package/src/chain/blocks/importBlock.ts +11 -6
- package/src/chain/blocks/verifyBlocksSignatures.ts +1 -1
- package/src/chain/chain.ts +23 -12
- package/src/chain/interface.ts +2 -2
- package/src/chain/opPools/utils.ts +1 -1
- package/src/chain/prepareNextSlot.ts +6 -2
- package/src/chain/produceBlock/produceBlockBody.ts +1 -1
- package/src/chain/regen/errors.ts +6 -1
- package/src/chain/regen/interface.ts +12 -6
- package/src/chain/regen/queued.ts +48 -12
- package/src/chain/regen/regen.ts +37 -7
- package/src/chain/stateCache/datastore/db.ts +33 -10
- package/src/chain/stateCache/datastore/file.ts +6 -5
- package/src/chain/stateCache/datastore/types.ts +3 -2
- package/src/chain/stateCache/fifoBlockStateCache.ts +10 -4
- package/src/chain/stateCache/persistentCheckpointsCache.ts +248 -139
- package/src/chain/stateCache/types.ts +18 -8
- package/src/chain/validation/lightClientFinalityUpdate.ts +1 -1
- package/src/chain/validation/lightClientOptimisticUpdate.ts +1 -1
- package/src/chain/validation/voluntaryExit.ts +2 -1
- package/src/chain/validatorMonitor.ts +1 -1
- package/src/execution/engine/interface.ts +2 -2
- package/src/network/network.ts +2 -2
- package/src/network/reqresp/ReqRespBeaconNode.ts +1 -1
- package/src/sync/backfill/backfill.ts +1 -1
- package/src/sync/constants.ts +1 -1
- package/lib/chain/archiveStore/utils/archivePayloads.d.ts +0 -7
- package/lib/chain/archiveStore/utils/archivePayloads.d.ts.map +0 -1
- package/lib/chain/archiveStore/utils/archivePayloads.js +0 -10
- package/lib/chain/archiveStore/utils/archivePayloads.js.map +0 -1
- package/src/chain/archiveStore/utils/archivePayloads.ts +0 -15
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BeaconStateView,
|
|
2
3
|
VoluntaryExitValidity,
|
|
3
4
|
getVoluntaryExitSignatureSet,
|
|
4
5
|
getVoluntaryExitValidity,
|
|
@@ -59,7 +60,7 @@ async function validateVoluntaryExit(
|
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
const signatureSet = getVoluntaryExitSignatureSet(chain.config, state
|
|
63
|
+
const signatureSet = getVoluntaryExitSignatureSet(chain.config, new BeaconStateView(state), voluntaryExit);
|
|
63
64
|
if (!(await chain.bls.verifySignatureSets([signatureSet], {batchable: true, priority: prioritizeBls}))) {
|
|
64
65
|
throw new VoluntaryExitError(GossipAction.REJECT, {
|
|
65
66
|
code: VoluntaryExitErrorCode.INVALID_SIGNATURE,
|
|
@@ -889,7 +889,7 @@ function renderAttestationSummary(
|
|
|
889
889
|
summary: AttestationSummary | undefined,
|
|
890
890
|
flags: ParticipationFlags
|
|
891
891
|
): string {
|
|
892
|
-
// Reference https://github.com/ethereum/consensus-specs/blob/
|
|
892
|
+
// Reference https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/altair/beacon-chain.md#get_attestation_participation_flag_indices
|
|
893
893
|
//
|
|
894
894
|
// is_matching_source = data.source == justified_checkpoint
|
|
895
895
|
// is_matching_target = is_matching_source and data.target.root == get_block_root(state, data.target.epoch)
|
|
@@ -128,7 +128,7 @@ export interface IExecutionEngine {
|
|
|
128
128
|
* corresponding state, up to and including finalized_block_hash.
|
|
129
129
|
*
|
|
130
130
|
* The call of the notify_forkchoice_updated function maps on the POS_FORKCHOICE_UPDATED event defined in the EIP-3675.
|
|
131
|
-
* https://github.com/ethereum/consensus-specs/blob/
|
|
131
|
+
* https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/merge/fork-choice.md#notify_forkchoice_updated
|
|
132
132
|
*
|
|
133
133
|
* Should be called in response to fork-choice head and finalized events
|
|
134
134
|
*/
|
|
@@ -145,7 +145,7 @@ export interface IExecutionEngine {
|
|
|
145
145
|
* since the corresponding call to prepare_payload method.
|
|
146
146
|
*
|
|
147
147
|
* Required for block producing
|
|
148
|
-
* https://github.com/ethereum/consensus-specs/blob/
|
|
148
|
+
* https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/merge/validator.md#get_payload
|
|
149
149
|
*/
|
|
150
150
|
getPayload(
|
|
151
151
|
fork: ForkName,
|
package/src/network/network.ts
CHANGED
|
@@ -721,7 +721,7 @@ export class Network implements INetwork {
|
|
|
721
721
|
|
|
722
722
|
try {
|
|
723
723
|
// messages SHOULD be broadcast after SYNC_MESSAGE_DUE_BPS of slot has transpired
|
|
724
|
-
// https://github.com/ethereum/consensus-specs/blob/
|
|
724
|
+
// https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/altair/light-client/p2p-interface.md#sync-committee
|
|
725
725
|
await this.waitForSyncMessageCutoff(finalityUpdate.signatureSlot);
|
|
726
726
|
await this.publishLightClientFinalityUpdate(finalityUpdate);
|
|
727
727
|
} catch (e) {
|
|
@@ -738,7 +738,7 @@ export class Network implements INetwork {
|
|
|
738
738
|
|
|
739
739
|
try {
|
|
740
740
|
// messages SHOULD be broadcast after SYNC_MESSAGE_DUE_BPS of slot has transpired
|
|
741
|
-
// https://github.com/ethereum/consensus-specs/blob/
|
|
741
|
+
// https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/altair/light-client/p2p-interface.md#sync-committee
|
|
742
742
|
await this.waitForSyncMessageCutoff(optimisticUpdate.signatureSlot);
|
|
743
743
|
await this.publishLightClientOptimisticUpdate(optimisticUpdate);
|
|
744
744
|
} catch (e) {
|
|
@@ -58,7 +58,7 @@ export type ReqRespBeaconNodeOpts = ReqRespOpts & {disableLightClientServer?: bo
|
|
|
58
58
|
* Implementation of Ethereum Consensus p2p Req/Resp domain.
|
|
59
59
|
* For the spec that this code is based on, see:
|
|
60
60
|
* https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/p2p-interface.md#the-reqresp-domain
|
|
61
|
-
* https://github.com/ethereum/consensus-specs/blob/
|
|
61
|
+
* https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/altair/light-client/p2p-interface.md#the-reqresp-domain
|
|
62
62
|
*/
|
|
63
63
|
export class ReqRespBeaconNode extends ReqResp {
|
|
64
64
|
private readonly metadataController: MetadataController;
|
|
@@ -127,7 +127,7 @@ export class BackfillSync extends (EventEmitter as {new (): BackfillSyncEmitter}
|
|
|
127
127
|
private wsValidated = false;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* From https://github.com/ethereum/consensus-specs/blob/
|
|
130
|
+
* From https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/phase0/weak-subjectivity.md
|
|
131
131
|
*
|
|
132
132
|
*
|
|
133
133
|
* If
|
package/src/sync/constants.ts
CHANGED
|
@@ -59,7 +59,7 @@ export const BATCH_BUFFER_SIZE = Math.ceil(10 / EPOCHS_PER_BATCH);
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Maximum number of concurrent requests to perform with a SyncChain.
|
|
62
|
-
* This is according to the spec https://github.com/ethereum/consensus-specs/blob/
|
|
62
|
+
* This is according to the spec https://github.com/ethereum/consensus-specs/blob/v1.6.1/specs/phase0/p2p-interface.md
|
|
63
63
|
*/
|
|
64
64
|
export const MAX_CONCURRENT_REQUESTS = 2;
|
|
65
65
|
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CheckpointWithHex } from "@lodestar/fork-choice";
|
|
2
|
-
import { IBeaconChain } from "../../interface.js";
|
|
3
|
-
/**
|
|
4
|
-
* Archives execution payload envelopes from hot DB to archive DB after finalization.
|
|
5
|
-
*/
|
|
6
|
-
export declare function archiveExecutionPayloadEnvelopes(chain: IBeaconChain, _finalized: CheckpointWithHex): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=archivePayloads.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archivePayloads.d.ts","sourceRoot":"","sources":["../../../../src/chain/archiveStore/utils/archivePayloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,wBAAsB,gCAAgC,CACpD,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Archives execution payload envelopes from hot DB to archive DB after finalization.
|
|
3
|
-
*/
|
|
4
|
-
export async function archiveExecutionPayloadEnvelopes(chain, _finalized) {
|
|
5
|
-
const finalizedBlock = chain.forkChoice.getFinalizedBlock();
|
|
6
|
-
if (!finalizedBlock)
|
|
7
|
-
return;
|
|
8
|
-
// TODO GLOAS: Implement payload envelope archival after epbs fork choice changes are merged
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=archivePayloads.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archivePayloads.js","sourceRoot":"","sources":["../../../../src/chain/archiveStore/utils/archivePayloads.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,KAAmB,EACnB,UAA6B,EACd;IACf,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;IAC5D,IAAI,CAAC,cAAc;QAAE,OAAO;IAE5B,4FAA4F;AAFhE,CAG7B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {CheckpointWithHex} from "@lodestar/fork-choice";
|
|
2
|
-
import {IBeaconChain} from "../../interface.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Archives execution payload envelopes from hot DB to archive DB after finalization.
|
|
6
|
-
*/
|
|
7
|
-
export async function archiveExecutionPayloadEnvelopes(
|
|
8
|
-
chain: IBeaconChain,
|
|
9
|
-
_finalized: CheckpointWithHex
|
|
10
|
-
): Promise<void> {
|
|
11
|
-
const finalizedBlock = chain.forkChoice.getFinalizedBlock();
|
|
12
|
-
if (!finalizedBlock) return;
|
|
13
|
-
|
|
14
|
-
// TODO GLOAS: Implement payload envelope archival after epbs fork choice changes are merged
|
|
15
|
-
}
|