Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@chainsafe/lodestar-params
Advanced tools
This package is part of ChainSafe's Lodestar project
Lodestar defines all constants and presets defined in the Ethereum Consensus spec. This can be used in conjunction with other Lodestar libraries to interact with the Ethereum consensus.
npm install @chainsafe/lodestar-params
The Lodestar params package contains several items used in all downstream Lodestar libraries:
Many downstream components are namespaced on fork names, or otherwise rely on knowing the fork names ahead of time. The Lodestar params package exports an enum ForkName
the enumerates all known fork names.
import {ForkName} from "@chainsafe/lodestar-params";
// dummy data
let forkName = "phase0";
switch (forkName) {
case ForkName.phase0:
case ForkName.altair:
case ForkName.bellatrix:
default:
}
All constants defined in the spec are exported verbatim.
import {GENESIS_SLOT} from "@chainsafe/lodestar-params";
Presets are "constants"-ish defined in the spec that can only be configured at build-time. These are meant to be treated as constants, and indeed are treated as constants by all downstream Lodestar libraries. The default preset is mainnet
. The only other preset defined is minimal
, used only in testing environments.
The active preset is exported under the ACTIVE_PRESET
named export.
import {ACTIVE_PRESET, SLOTS_PER_EPOCH} from "@chainsafe/lodestar-params";
The preset may be set in one of two ways:
LODESTAR_PRESET
environment variablesetActivePreset(preset: Preset)
functionImportant Notes:
minimal
preset is NOT compatible with the mainnet
preset.setActivePreset
may be dangerous, and only should be run once before loading any other libraries. All downstream Lodestar libraries expect the active preset to never change.Apache-2.0 ChainSafe Systems
FAQs
Chain parameters required for lodestar
The npm package @chainsafe/lodestar-params receives a total of 561 weekly downloads. As such, @chainsafe/lodestar-params popularity was classified as not popular.
We found that @chainsafe/lodestar-params demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.