UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

80 lines 5.09 kB
export { Bucket }; // Buckets are separate database namespaces var Bucket; (function (Bucket) { // beacon chain // finalized states Bucket[Bucket["allForks_stateArchive"] = 0] = "allForks_stateArchive"; // unfinalized blocks Bucket[Bucket["allForks_block"] = 1] = "allForks_block"; // finalized blocks Bucket[Bucket["allForks_blockArchive"] = 2] = "allForks_blockArchive"; // finalized block additional indices Bucket[Bucket["index_blockArchiveParentRootIndex"] = 3] = "index_blockArchiveParentRootIndex"; Bucket[Bucket["index_blockArchiveRootIndex"] = 4] = "index_blockArchiveRootIndex"; // known bad block // index_invalidBlock = 5, // DEPRECATED on v0.25.0 // finalized chain Bucket[Bucket["index_mainChain"] = 6] = "index_mainChain"; // justified, finalized state and block hashes Bucket[Bucket["index_chainInfo"] = 7] = "index_chainInfo"; /** @deprecated Eth1 deposit tracking is not required since electra, only kept around to delete data from existing databases */ Bucket[Bucket["phase0_eth1Data"] = 8] = "phase0_eth1Data"; /** @deprecated Eth1 deposit tracking is not required since electra, only kept around to delete data from existing databases */ Bucket[Bucket["index_depositDataRoot"] = 9] = "index_depositDataRoot"; // op pool // phase0_attestation = 10, // DEPRECATED on v0.25.0 // phase0_aggregateAndProof = 11, // Root -> AggregateAndProof, DEPRECATED on v.27.0 /** @deprecated Eth1 deposit tracking is not required since electra, only kept around to delete data from existing databases */ Bucket[Bucket["phase0_depositData"] = 12] = "phase0_depositData"; Bucket[Bucket["phase0_exit"] = 13] = "phase0_exit"; Bucket[Bucket["phase0_proposerSlashing"] = 14] = "phase0_proposerSlashing"; Bucket[Bucket["allForks_attesterSlashing"] = 15] = "allForks_attesterSlashing"; Bucket[Bucket["capella_blsToExecutionChange"] = 16] = "capella_blsToExecutionChange"; // checkpoint states Bucket[Bucket["allForks_checkpointState"] = 17] = "allForks_checkpointState"; // allForks_pendingBlock = 25, // Root -> SignedBeaconBlock // DEPRECATED on v0.30.0 /** @deprecated Eth1 deposit tracking is not required since electra, only kept around to delete data from existing databases */ Bucket[Bucket["phase0_depositEvent"] = 19] = "phase0_depositEvent"; Bucket[Bucket["index_stateArchiveRootIndex"] = 26] = "index_stateArchiveRootIndex"; Bucket[Bucket["deneb_blobSidecars"] = 27] = "deneb_blobSidecars"; Bucket[Bucket["deneb_blobSidecarsArchive"] = 28] = "deneb_blobSidecarsArchive"; /** @deprecated Genesis from eth1 is no longer supported, only kept around to delete data from existing databases */ Bucket[Bucket["phase0_preGenesisState"] = 30] = "phase0_preGenesisState"; /** @deprecated Genesis from eth1 is no longer supported, only kept around to delete data from existing databases */ Bucket[Bucket["phase0_preGenesisStateLastProcessedBlock"] = 31] = "phase0_preGenesisStateLastProcessedBlock"; // Lightclient server // altair_bestUpdatePerCommitteePeriod = 30, // DEPRECATED on v0.32.0 // altair_latestFinalizedUpdate = 31, // DEPRECATED on v0.32.0 // altair_latestNonFinalizedUpdate = 32, // DEPRECATED on v0.32.0 // altair_lightclientFinalizedCheckpoint = 33, // DEPRECATED on v0.32.0 // altair_lightClientInitProof = 34, // DEPRECATED on v0.32.0 // altair_lightClientSyncCommitteeProof = 35, // DEPRECATED on v0.32.0 // index_lightClientInitProof = 36, // DEPRECATED on v0.32.0 Bucket[Bucket["backfilled_ranges"] = 42] = "backfilled_ranges"; // Buckets to support LightClient server v2 Bucket[Bucket["lightClient_syncCommitteeWitness"] = 51] = "lightClient_syncCommitteeWitness"; Bucket[Bucket["lightClient_syncCommittee"] = 52] = "lightClient_syncCommittee"; // TODO: May be redundant to block stores Bucket[Bucket["lightClient_checkpointHeader"] = 53] = "lightClient_checkpointHeader"; // 54 was for bestPartialLightClientUpdate, allocate a fresh one // lightClient_bestLightClientUpdate = 55, // SyncPeriod -> LightClientUpdate // DEPRECATED on v1.5.0 Bucket[Bucket["lightClient_bestLightClientUpdate"] = 56] = "lightClient_bestLightClientUpdate"; Bucket[Bucket["allForks_dataColumnSidecars"] = 57] = "allForks_dataColumnSidecars"; Bucket[Bucket["allForks_dataColumnSidecarsArchive"] = 58] = "allForks_dataColumnSidecarsArchive"; Bucket[Bucket["gloas_executionPayloadEnvelope"] = 59] = "gloas_executionPayloadEnvelope"; Bucket[Bucket["gloas_executionPayloadEnvelopeArchive"] = 60] = "gloas_executionPayloadEnvelopeArchive"; })(Bucket || (Bucket = {})); export function getBucketNameByValue(enumValue) { const keys = Object.keys(Bucket).filter((x) => { if (Number.isNaN(parseInt(x))) { return Bucket[x] === enumValue; } return false; }); if (keys.length > 0) { return keys[0]; } throw new Error("Missing bucket for value " + enumValue); } //# sourceMappingURL=buckets.js.map