**Motivation**
- #7280
**Description**
- Bun _does_ support imports, I was mistaken to say it didn't. The issue
I ran into was that the referenced file did not exist!
- Use the typescript directly
**Motivation**
Ensure that all spec tests are running for peerDas and fulu scopes.
Rename merkle.test.ts -> merkleProof.test.ts so it matches the other
file namings
---------
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
**Motivation**
- starting from fulu, we need to track number of peers per data column
subnet
**Description**
- track it in gossipsub
- also track peers and topics by fork boundary, not fork name
- will need to render this on the main Grafana dashboard after this PR
---------
Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
**Motivation**
- #7280
**Description**
- combined with #8448, `surpressTranspileTS: true` is needed for workers
to use typescript source directly without transpiling it (and
incorrectly loading it via a commonjs loader)
- avoid worker `resourceLimits` - Bun doesn't implement it, it throws if
you use it
- use `datastore-fs` instead of `datastore-level` for backing our libp2p
database -- Note this is changed unilaterally (affecting current nodejs
usage)
- use assemblyscript chacha20-poly1305 - bun doesn't support the native
crypto implementation
**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**
- reflect the in-progress PeerDAS dashboard to our source code
**Description**
- PeerDAS dashboard was updated but we did not track it in our source
code, need to sync it now and review/revise later
Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
**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.
**Motivation**
Use best of the linting capabilities to avoid any error slipped through.
**Description**
- Enable few promise based rules
- Restrict few imports from private paths
**Steps to test or reproduce**
- Run all tests
---------
Co-authored-by: Cayman <caymannava@gmail.com>
**Motivation**
Make sure the Lodestar starts running in Bun runtime.
**Description**
- Add subpath imports supported in Bun and NodeJS.
-
**Steps to test or reproduce**
Run all tests
**Note**
The CLI finally starts to run, next go with command by command to see
what's breaking, starting the `beacon` cmd.
```
bun run --bun bin/lodestar.js --help
🌟 Lodestar: TypeScript Implementation of the Ethereum Consensus Beacon Chain.
* Version: v1.33.0/nh/bun-wrappers/07d2010
* by ChainSafe Systems, 2018-2025
Commands:
beacon Run a beacon chain node
validator Run one or multiple validator clients
lightclient Run lightclient
dev Quickly bootstrap a beacon node and multiple validators. Use for
development and testing
bootnode Run a discv5 bootnode. This will NOT perform any beacon node func
tions, rather, it will run a discv5 service that allows nodes on
the network to discover one another.
Options:
--dataDir Lodestar root data directory[string]
--network Name of the Ethereum Consensus chain
network to join
[string] [choices: "mainnet", "gnosis", "sepolia", "holesky", "hoodi", "chiado
", "ephemery", "dev"] [default: mainnet]
--paramsFile Network configuration file [string]
--rcConfig RC file to supplement command line a
rgs, accepted formats: .yml, .yaml,
.json [string]
--supernode Subscribe to and custody all data co
lumn sidecar subnets [boolean]
--terminal-total-difficulty-override Terminal PoW block TTD override
[string]
--terminal-block-hash-override Terminal PoW block hash override
[string]
--terminal-block-hash-epoch-override Terminal PoW block hash override act
ivation epoch [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
📖 For more information, check the CLI reference:
* https://chainsafe.github.io/lodestar/reference/cli✍️ Give feedback and report issues on GitHub:
* https://github.com/ChainSafe/lodestar
```
**Motivation**
- we want to know more insight of ColumnReconstructionTracker
**Description**
- add logs to ColumnReconstructionTracker
- fix metrics of ColumnReconstructionTracker: centralize to 1 place and
make it better to render on Grafana
- remove unused error
Closes#8402
---------
Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
Co-authored-by: Cayman <caymannava@gmail.com>
The rate limiter currently only counts the number of blocks requested
but our quota is based on `MAX_REQUEST_DATA_COLUMN_SIDECARS`. We need to
account for the number of columns requested as otherwise we are
undercharging by a factor of up to 128.
**Motivation**
- got a case where all columns came timely while block came very late
and we did not trigger `incompleteBlockInput` event
**Description**
- trigger `incompleteBlockInput` in that case
Closes#8405
Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
**Motivation**
- we want to know the result of getBlobsV2 and how it helps our block
import
**Description**
- add logs and metrics to GetBlobsTracker
Closes#8401
---------
Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
**Motivation**
- when validating a gossip block and got a `PARENT_UNKNOWN` error, we
should emit `unknownParent` event instead of `incompleteBlockInput`
event
**Description**
- do that in gosssip handler
- add `ChainEvent.incompleteBlockInput` test to unknownBlockSync e2e
test
Closes#8415Closes#8417
Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
Noticed the type isn't correct as
[ExecutionPayloadV3](9a7b40cc08/src/engine/cancun.md (L41-L61))
doesn't contain `parentBeaconBlockRoot` as it's passed as part of
payload attributes.
## Summary
This PR implements the refactoring suggested in #7974 to make
`commonBlockBodyPromise` a required parameter when calling
`produceBlock` and `produceBlindedBlock` methods.
## Changes
- Made `commonBlockBodyPromise` required in the chain interface
(`IBeaconChain`)
- Updated chain implementation to reflect the required parameter
- Removed the TODO comment and optional parameter from
`produceBlockBody` function
- Removed fallback calls to `produceCommonBlockBody.call()` within
`produceBlockBody`
- Updated tests to provide the required `commonBlockBodyPromise`
parameter
## Rationale
As discussed in the original issue, making `commonBlockBodyPromise`
required ensures that the promise is always provided by callers,
eliminating the need for fallback logic inside `produceBlockBody`. This
simplifies the code and makes the dependency explicit.
## Testing
- ✅ All TypeScript type checks pass (`yarn check-types`)
- ✅ Linting passes (`yarn lint`)
- ✅ Updated affected tests to work with the new required parameter
Resolves#7974🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
**Motivation**
We are currently not following the spec
[here](cd92a897ac/specs/deneb/p2p-interface.md (L274-L281))
> When clients use the local execution layer to retrieve blobs, they
MUST behave
as if the corresponding `blob_sidecar` had been received via gossip. In
particular they MUST:
> - Publish the corresponding `blob_sidecar` on the
`blob_sidecar_{subnet_id}`
subnet.
> - Update gossip rule related data structures (i.e. update the
anti-equivocation
cache).
Publishing blocks we receive from execution engine can help with blob
propagation and as a added benefit could avoid some network traffic due
to `IDONTWANT`.
**Description**
Publish blobs we retrieve from execution engine to gossip.
**Note:** this excludes blobs we already received via gossip either
before calling `engine_getBlobsV1` or after receiving the response.
Overall it's a low percentage of blobs as shown below but it depends on
connectivity of the node and geolocation.
<img width="940" height="290" alt="image"
src="https://github.com/user-attachments/assets/8316d834-ad74-472e-ab5a-fb0f5a7d35c6"
/>
**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**
To further increase the number of IPv6 nodes on the network it would
help if we use dual-stack by default.
**Description**
Use dual-stack by default
- if no `listenAddress` is specified then enable IPv4 and IPv6
- if only `listenAddress` is configured then only enable IPv4
- if only `listenAddress6` is configured then only enable IPv6
- if both `listenAddress` and `listenAddress6` are configured enable
both
Information about other clients can be found here https://ipv6eth.info/
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**
Upgrade typescript to latest version.
**Description**
- Upgrade typescript to latest version.
- Need this version upgrade to be used in #8320 to allow `module:
node20>`
**Steps to test or reproduce**
Run all tests
**Motivation**
Looks like we accidentally got rid of `logger.verbose` and now just have
a unused expression instead of actually logging it. It's a bit sad that
biomejs doesn't catch this and I didn't find a rule similar to
`no-unused-expressions` in eslint.
**Description**
Restore data column sidecars prune log
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
**Motivation**
We currently print proposer boost reorg related logs `Strong block
detected ...` during sync but it's not relevant there as
`shouldOverrideForkChoiceUpdate` will never return true if `block.slot <
currentSlot`.
There is also an edge we currently don't handle since we only run
proposer reorg checks if block is received through gossip but in theory
(although unlikely in practice) we can also receive the block via
req/resp (close to 0% on mainnet).
**Description**
- only run proposer boost reorg check if `block.slot >= currentSlot`
- do not emit logs if no checks are run, eg. during sync there is no
reason to emit logs
- remove `isGossipBlock` flag to also check if receive block via
req/resp, this also means we run the checks if receive block from api
meaning we a previous proposer, we could additional check if we are
previous proposer cache if we wanna handle that case explicitly
**Motivation**
After resolving issues with the ipv6 dual stack port bug in v1.34.1, it
was noted that we should make it clear our default p2p port for both
IPv4 and IPv6 is now the same at port `9000`.
**Description**
When we introduced IPv6 support in #5758 , we used to default the port
of `9090`. When supporting dual stack option on the same port via #8190
, we should make it clear in documentation this is now by default also
on port `9000`.
**Motivation**
Keep the dependencies safe from all vulnerabilities.
**Description**
- Fix a `critical` level vulnerability.
https://github.com/advisories/GHSA-fc9h-whq2-v747
It's not critical for our beacon node or validator implementation but
used in `@lodestar/prover` package.
**Steps to test or reproduce**
Run all tests
**Motivation**
Users reported in the v1.34.0 release that changes in the release
created an issue when ipv6 and ipv4 ports were the same:
```
✖ Error: Timeout: Did not receive an init message from worker after 300000ms. Make sure the worker calls expose().
```
**Description**
This PR bumps discv5 from 11.0.3 to 11.0.4 which includes the fix to
binding ipv4 and ipv6 on the same port in dual stack mode.
See: https://github.com/ChainSafe/discv5/pull/318
**Motivation**
Users reported in the v1.34.0 release that changes in the release
created an issue when ipv6 and ipv4 ports were the same:
```
✖ Error: Timeout: Did not receive an init message from worker after 300000ms. Make sure the worker calls expose().
```
**Description**
This PR bumps discv5 from 11.0.3 to 11.0.4 which includes the fix to
binding ipv4 and ipv6 on the same port in dual stack mode.
See: https://github.com/ChainSafe/discv5/pull/318
**Motivation**
- we want to know more details about the epoch transition time
**Description**
- revise metric bucket:
- 0.01, 0.05, 0.1 is unrealistic even with state-transition-z
- add more realistic buckets: 2, 2.5
- sync that with
`lodestar_precompute_next_epoch_transition_duration_seconds`
- also log epoch transition duration
Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
**Motivation**
Restores previous behavior before
https://github.com/ChainSafe/lodestar/pull/8251, if there is a block
that has no blobs we shouldn't throw an error and instead just return no
data columns. Only throw an error if there should be data columns in db
(by checking if block has kzg commitments) but we don't have them.
**Description**
Only query data columns from db if block has at least one
`blobKzgCommitments`
**Motivation**
Don't spam the logs with uninformative errors
**Description**
Update logs if block not found while handling unavailable data columns
- move log from `error` to `verbose` as it's network related log and to
avoid spam
- make log actually useful by adding context like slot and block root
Closes https://github.com/ChainSafe/lodestar/issues/8333
**Motivation**
Fix bucket boundary for the min the key for data column sidecars.
**Description**
- Fix the bucket boundary issue for data column side cars.
**Steps to test or reproduce**
Run all tests
**Note**
Level db have a builtin feature to define boundary for buckets called
`sublevel`, I didn't realize earlier we are not using that, instead we
have our own higher level logic for min/max key for the buckets. So
didn't provided that second condition to limit to bucket boundary.
---------
Co-authored-by: twoeths <10568965+twoeths@users.noreply.github.com>
Co-authored-by: Nico Flaig <nflaig@protonmail.com>