**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
**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**
Use latest `module` and `moduleResolution` for TS.
**Description**
- To use [subpath
imports](https://nodejs.org/api/packages.html#subpath-imports) in the PR
#8320 we need to update the module solution strategy for TS.
- That requires to change the `module` for the TS as well.
- Earlier tried to stay with `node18` or `node20`, but the `ts-node`
does not work with that.
- Maintaining different tsconfig for ts-node is more of hassle on wrong
run.
- So decided to stick with `nodenext` strategy for `moduleResolution`
**Steps to test or reproduce**
Run all tests
---------
Co-authored-by: Cayman <caymannava@gmail.com>
**Motivation**
Gnosis analysis shows that there is a lot of time spent on main thread
for running aggregateWithRandomness on main thread. Now that libp2p@v2
is more stable and so are some of the other conditions that triggered
our revert last time, looking to check this again to see what the
metrics look like for running not on main thread.
---------
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**
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
**Motivation**
Keep the tooling updated.
**Description**
- Enable different useable new rules.
**Steps to test or reproduce**
Run all tests.
## Please review commit by commit
For reviewers please review commit by commit.
<img width="426" alt="image"
src="https://github.com/user-attachments/assets/e6ad3082-d311-4e11-896a-99abf715ca8a"
/>
**Motivation**
Check the types for test files
**Description**
- Add `test` folder for the `tsconfig.json` files
**Steps to test or reproduce**
- Run all tests
**Motivation**
Update vitest and browser engine.
**Description**
- Move root level shared configs to `configs` directory
- Update to vitest 3.x
- Migrate from `webdriverio` to `playwright` which is more stable and
recommended by Vitest.
**NOTE**
Reverted the `playwright` upgrade. See the comments.
d2a7af0308/configs/vitest.config.base.browser.ts (L41-L43)
**Steps to test or reproduce**
Run all tests
**Motivation**
Keep the deps updated.
**Description**
Use latest features provided by Typescript. See the comments below.
**Steps to test or reproduce**
- Run all tests
* chore: add temp-deps blst
* chore: update packages to point to temp-deps
* chore: remove temp-deps
* chore: use 2.1.0 portable version of blst-ts
* chore: fix formatting
* Replace eslint with biomejs
* Update the inclusion of word
* Fix the formatting
* Update the lint task to do all checks
* Update biome rules from eslint config
* Replace eslint with biomejs
* Update the inclusion of word
* Fix the formatting
* Update the lint task to do all checks
* Update biome rules from eslint config
* Fix all lint issues
* Fix formatting
* Add extension recomendation for vscode
* Enable recommended rules
* Enable rule noUselessSwitchCase
* Enable rule noUselessConstructor
* Fix the types
* Fix unit tests
* Enforce import extensions
* Update the cli command
* Enforce useConsistentMemberAccessibility
* Update rules
* Fix rules
* Upgrade biomejs to latest version
* Update the rules
* Update and format the config file
* Fix types break during merge
* Fix unused check
* Add comment for explicit-return-type
* Remove eslint file
* Add _e objects for empty catch blocks
* Update formatter config
* Fix formatting