**Motivation**
Uses cell proofs from EL `getPayloadsV5` to offload cell proof
construction
Refer to [EIP-7594
spec](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7594.md#networking)
for more on requiring blob transaction senders to compute cell proofs.
[Pending spec
changes](cad4194e3f/src/engine/osaka.md (engine_getpayloadv5))
define updates for `getPayloadsV5` in the execution engine API
**Description**
* add engine_getPayloadV5 to engine API
* avoid computing cell proofs in computeDataColumnSidecars
* rename CELLS_PER_BLOB to CELLS_PER_EXT_BLOB to match spec
* update sszTypes for Fulu BlockContents, SignedBlockContents
Closes #7669
**Other notes**
* implement blobsBundle validation
I've added a validation function for validating `BlobsBundleV2` by
computing cells and batch verifying the cell proofs, but don't currently
call this function. We could validate this data on receiving responses
from the EL or when producing the block body, but we might consider data
from the EL trustworthy and skip costly verification.
---------
Co-authored-by: Matthew Keil <github@mail.matthewkeil.com>
Co-authored-by: matthewkeil <me@matthewkeil.com>
lodestar-params
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.
Installation
npm install @lodestar/params
Usage
The Lodestar params package contains several items used in all downstream Lodestar libraries:
- Fork names
- Constants
- Presets
Fork names
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 "@lodestar/params";
// dummy data
let forkName = "phase0";
switch (forkName) {
case ForkName.phase0:
case ForkName.altair:
case ForkName.bellatrix:
default:
}
Constants
All constants defined in the spec are exported verbatim.
import {GENESIS_SLOT} from "@lodestar/params";
Presets
Presets are defined in the spec as "constantish" and 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 "@lodestar/params";
The preset may be set in one of two ways:
- by setting the
LODESTAR_PRESETenvironment variable - by executing the
setActivePreset(preset: Preset)function
Important Notes:
- Interacting with and understanding the active preset is only necessary in very limited testing environments, like for ephemeral testnets
- The
minimalpreset is NOT compatible with themainnetpreset. - using
setActivePresetmay be dangerous, and only should be run once before loading any other libraries. All downstream Lodestar libraries expect the active preset to never change. - Preset values can be overridden by executing
setActivePreset(presetName: PresetName, overrides?: Partial<BeaconPreset>)and supplying values to override. - The Lodestar CLI exposes
setActivePresetthrough--presetFileflag which allows to override the active preset with custom values from file.
License
Apache-2.0 ChainSafe Systems