**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
**Motivation**
Replace deprecated Holesky network support with Hoodi testnet
configuration. Hoodi is a new Ethereum testnet that will serve as a
replacement testnet, and this change updates Lodestar to support the new
network configuration.
**Description**
This PR removes Holesky network configuration and replaces all
references with Hoodi testnet support. Changes include:
- Removed `packages/cli/src/networks/holesky.ts` network file
- Removed `packages/config/src/chainConfig/networks/holesky.ts` chain
config
- Updated all network references from "holesky" to "hoodi" across CLI,
config, and test files
- Added Hoodi network configuration with proper chain parameters,
genesis data, and bootnodes
- Updated default environment configuration
- Updated unit tests to reflect the network change
<!-- Link to issues: https://github.com/ChainSafe/lodestar/issues/8595
-->
Closes #https://github.com/ChainSafe/lodestar/pull/8615
**AI Assistance Disclosure**
- [ ] External Contributors: I have read the [contributor
guidelines](https://github.com/ChainSafe/lodestar/blob/unstable/CONTRIBUTING.md#ai-assistance-notice)
and disclosed my usage of AI below.
<!-- Insert any AI assistance disclosure here -->
-PR content was developed using Cursor for code updates and
explanations; I reviewed and verified all changes manually.
**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
This avoids an issue we had previously where configs that extend mainnet
preset would inherit wrong parameters. This just ensures this cannot
happen in case we those will be forked after mainnet.
similar to https://github.com/ChainSafe/lodestar/pull/7401
Follow up on https://github.com/ChainSafe/lodestar/pull/8091 to clean up
remaining usage of `SECONDS_PER_SLOT`.
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
**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>
**Motivation**
This PR schedules Fulu fork and BPO1 and BPO2 on remaining testnets
Sepolia and Hoodi.
**Description**
Updates network configs for Fulu fork
Includes BPO1 and BPO2 configs
For both Sepolia and Hoodi
As defined in Sepolia: https://github.com/eth-clients/sepolia/pull/111
As defined in Hoodi: https://github.com/eth-clients/hoodi/pull/21
Wait for confirmation of these remaining testnets configs before
merging.
The `getMaxRequestBlobSidecars` helper is only relevant for deneb and
electra and we no longer will have to update the conditional. It
shouldn't be part of config object as it will be legacy code once fulu
is activated.
**Motivation**
Make the code transition for compatibility with the Bun.
**Description**
- The dependency `cpu-features` is not compatible with the `Bun`
- Removed the direct dependency
- Upgrade the `@chainsafe/persistent-merkle-tree` and `@chainsafe/ssz`
so the hasher detection is done implicitly.
- Latest commit for
[hahstree](e86a8b136a)
has the support for fallback, which is not used in the
`@chainsafe/persistent-merkle-tree`
**Steps to test or reproduce**
Run all tests
This removes `NODE_CUSTODY_REQUIREMENT` config value as it doesn't seem
to be part of the spec. It seems like the purpose of this config right
now is to be able to pass down supernode requirements (ie. setting
requirement to 128) and potentially allow to override the custody
requirement for testing but this is a misuse how config should be
handled.
As discussed with @matthewkeil we don't need to manually set node
custody requirement or disable validator custody anymore and rather just
rely on `--supernode` flag to custody all groups or dynamic validator
custody.
**Motivation**
- https://github.com/ethereum/consensus-specs/pull/4354
**Description**
- add concept of fork boundaries (`ForkBoundary`) which include both
normal hard-forks (phase0, altair, etc.) and Blob Parameter Only (BPO)
forks and are used to un-/subscribe to gossip topics and compute the
fork digest primarily for domain separation on the p2p layer
- mix in blob parameters (`BlobParameters`) when computing fork digest
(`computeForkDigest`) post-fulu
- update ENR fork id (`ENRForkID`) to consider fork boundaries (next
fork digest (`nfd`) will be updated in
https://github.com/ChainSafe/lodestar/pull/8023)
- cache pre-computed fork digests by epoch instead of fork name in
genesis config cache
---------
Co-authored-by: NC <17676176+ensi321@users.noreply.github.com>
**Motivation**
We are no longer backporting the blob schedule to deneb/electra which
means once we reach fulu we will default to
`MAX_BLOBS_PER_BLOCK_ELECTRA` if there is no blob schedule entry for the
fulu fork epoch which is very likely as we wanna bump blobs a bit later,
hence the comment that default / fallback is only used during testing is
no longer true.
**Description**
Remove stale comment about default max blobs limit
**Motivation**
The PR to backport blob schedule to deneb/electra
(https://github.com/ethereum/consensus-specs/pull/4313) has been closed
and the entries for deneb/electra have been removed from CL spec as well
since https://github.com/ethereum/consensus-specs/pull/4341.
**Description**
- Remove blob schedule entries for deneb/electra
- Update `getMaxBlobsPerBlock` to default to electra limit
- Only return `BLOB_SCHEDULE` from `GET /eth/v1/config/spec` api if fulu
is scheduled
**Motivation**
Follow up to https://github.com/ChainSafe/lodestar/pull/7729, we need to
handle blob schedule separately from generic string comparison of
values, otherwise what we compare are shallow stringified arrays. It
does not validate the object properties and on length mismatch we just
get the following error
```
✖ Error: Local and remote configs are different
BLOB_SCHEDULE different value: [object object] != [object object],[object object]
```
**Description**
Add special handling for blob schedule when asserting equal params
- deserialize and sort blob schedules
- compare length of local and remote blob schedule
- then check each entry by comparing `EPOCH` and `MAX_BLOBS_PER_BLOCK`
**Motivation**
Follow up to https://github.com/ChainSafe/lodestar/pull/7729, we need to
configure blob schedule for each network. This will become relevant once
we fully backport blob schedule to deneb and electra.
**Description**
Add blob schedule to each network config
**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**
This can cause interop issues if Lodestar is used with other clients
(https://github.com/ChainSafe/lodestar/issues/7764). It's not an actual
problem otherwise anymore. This value was never correct but the problem
was not that we didn't update it correctly but rather Gnosis team
decided to change this value on the fly while the hard fork (Deneb) was
already live on the network but due to the fact that blob count is
limited by EL as well this was never an issue and won't be now because
we use `MAX_BLOBS_PER_BLOCK_ELECTRA` but in theory this could have
caused a consensus split if clients use different values (which they
did).
**Description**
Update gnosis `MAX_BLOBS_PER_BLOCK` to [match upstream
config](d447a94bbe/mainnet/config.yaml (L140))
Closes https://github.com/ChainSafe/lodestar/issues/7765
**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