**Motiviation**
All networks have completed the merge transition and most execution
clients no longer support pre-merge so it's not even possible anymore to
run a network from a genesis before bellatrix, unless you keep it to
phase0/altair only, which still works after this PR is merged.
This code is effectively tech debt, no longer exercised and just gets in
the way when doing refactors.
**Description**
Removes all code related to performing the merge transition. Running the
node pre-merge (CL only mode) is still possible and syncing still works.
Also removed a few CLI flags we added for the merge specifically, those
shouldn't be used anymore. Spec constants like
`TERMINAL_TOTAL_DIFFICULTY` are kept for spec compliance and ssz types
(like `PowBlock`) as well. I had to disable a few spec tests related to
handling the merge block since those code paths are removed.
Closes https://github.com/ChainSafe/lodestar/issues/8661
Implement epbs state transition function.
Passes all operations, epoch_transition and rewards spec tests on v1.6.1
Part of #8439
---------
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
**Motivation**
Make the types exports consistent for all packages.
All modern runtimes support [conditional
exports](https://nodejs.org/api/packages.html#conditional-exports) and
there are caveats when we have both conditional exports and normal
exports present in a package.json. This PR tend to make all exports
follow same consistent and modern pattern.
**Description**
- We were using subpath exports for some packages and module exports for
other
- Keep all the types export consistent as subpath exports.
- Remove "types" and "exports` directive from package.json
- Remove `typesVersions`, this is useful only if we have different
version of types for different versions of Typescript. Or having
different types files for different file paths.
**Steps to test or reproduce**
- Run all CI
**Motivation**
Add `src` directory to package sources along with the `lib` files to
have working source map.
**Description**
- Add `src` to the files.
**Steps to test or reproduce**
- Run all tests
**Motivation**
- #7280
**Description**
- Add `"bun"` export to all packages that points to the _typescript
source_ rather than the transpiled javascript
- Allows for bun to use typescript directly
**Motivation**
Enable the organize import back which was disabled in #7982 to isolate
the changes for import ordering
**Description**
- Update the organize import config
- Fix all linting errors
**Steps to test or reproduce**
- Run all tests
---------
Co-authored-by: Cayman <caymannava@gmail.com>
This is the first implementation of EIP-7917.
We will want to have a plan deprecate proposer caches in `EpochCache`
since Fulu beacon state will carry those information. This will be
addressed in a later PR.
Pending spec release for spec test
Spec PR ethereum/consensus-specs#4190
---------
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
**Motivation**
This PR is to update specification references for new Beacon APIs
(v3.1.0) and Consensus specs (v2.5.0) released post-Electra.
**Description**
Closes https://github.com/ChainSafe/lodestar/issues/7463
Follow up to https://github.com/ChainSafe/lodestar/pull/7610 with a few
restructuring suggestions, see comments below for detailed changes,
revives constants tests we are no longer running in CI and makes each
package executable separately again, ie. `cd packages/<package-name>`
into `yarn test:unit` works for all packages again.
One major change is that unit tests default should be written with
`mainnet` preset in mind as I noticed that makes a lot more sense for a
bunch of existing tests, eg. we have tests that depend on external
fixtures, like api spec tests for events and those are not compatible
with `minimal` preset. Also there doesn't seem to be much downside in
most cases for unit tests to use `mainnet` preset as it does not run
through all the epoch, like for example a e2e or sim test does. So
overall, it allows us to use mainnet fixtures / more "real world" data
which seems better with little to no downside.
Time comparison running unit tests on `unstable` vs. this branch
**unstable**

**nflaig/restructure-tests**

There is just a difference of 2 seconds (might be a fluke) in a 6 minute
run, this seems acceptable to me considering the benefits of using
`mainnet` preset noted above.
**Motivation**
Remove any unused or inactive codebase.
**Description**
Remove all unused eslint directives as we are using `biome` now.
**Steps to test or reproduce**
Run lint rules and all tests
**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>
**Motivation**
implement the same pruning logic used for blob sidecars for data column
sidecars
**Description**
update archiveBlocks to delete data column sidecar data the the node has
stored longer than the minimum required epochs
add config field MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS
**Motivation**
Vitest workspaces is feature to mimic the package manager workspaces for
the tests only.
It provides following benefits:
1. Minimize the need the bunch of config files at every package root
2. Consolidate vitest configuration in project groups
3. Use consistent test configuration for all projects in the monorepo
4. Providing consistent test environment for all packages
5. Speed up visual interaction with tests in the IDEs (e.g. Visual
Studio Code)
**Description**
- Remove all unnecessary config files
- Update package json scripts to use `--project` flag
Closes#7603
Now we have following test directories.
| Directory | Description | CurrentPreset | Old Preset |
|---|---|---|---|
| test/unit | Unit tests | minimal | Default export from `params`
package |
| test/unit-mainnet | Unit tests | mainnet | mainnet |
| test/e2e | End-to-End Tests | minimal | Default export from `params`
package |
| test/e2e-mainnet | End-to-End Tests | mainnet | Never existed before,
mixed up pattern in different packages |
| test/spec | Spec tests | minimal | Default export from `params`
package, but common perception among team was that it's running with
`minimal` |
| test/spec-mainnet` | Spec tests | mainnet | Never existed as
directory, but mixed up among packages |
| test/browser | Symlink to `unit` for packages which supports browsers
| minimal | Default export from `params` package |
| test/types | Types test | minimal | Default export from `params`
package |
**Steps to test or reproduce**
Run all tests