Commit graph

83 commits

Author SHA1 Message Date
Barnabas Busa
1f3041824f eth/catalyst: add Engine API stubs for Amsterdam fork
Add Engine API method stubs for the Amsterdam fork (Gloas on CL side):
- engine_newPayloadV5 for Amsterdam payloads
- engine_getPayloadV6 for Amsterdam payloads
- engine_newPayloadWithWitnessV5 for witness generation
- engine_executeStatelessPayloadV5 for stateless execution
- Update engine_forkchoiceUpdatedV3 to accept Amsterdam payloads
- Add PayloadV4 constant for ExecutionPayloadV4

This is a minimal implementation with method stubs only - no blockAccessList
(EIP-7928) integration yet.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 14:00:09 +01:00
Fibonacci747
d9aaab13d3
beacon/light/sync: clear reqFinalityEpoch on server unregistration (#33483)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
HeadSync kept reqFinalityEpoch entries for servers after receiving
EvUnregistered, while other per-server maps were cleared. This left
stale request.Server keys reachable from HeadSync, which can lead to a
slow memory leak in setups that dynamically register and unregister
servers.

The fix adds deletion of the reqFinalityEpoch entry in the
EvUnregistered handler. This aligns HeadSync with the cleanup pattern
used by other sync modules and keeps the finality request bookkeeping
strictly limited to currently registered servers.
2025-12-30 18:27:11 +01:00
Guillaume Ballet
3f641dba87
trie, go.mod: remove all references to go-verkle and go-ipa (#33461)
In order to reduce the amount of code that is embedded into the keeper
binary, I am removing all the verkle code that uses go-verkle and
go-ipa. This will be followed by further PRs that are more like stubs to
replace code when the keeper build is detected.

I'm keeping the binary tree of course. This means that you will still
see `isVerkle` variables all over the codebase, but they will be renamed
when code is touched (i.e. this is not an invitation for 30+ AI slop
PRs).

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-12-30 20:44:04 +08:00
Felix Lange
657c99f116
beacon/types: update for fulu (#33349)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Should fix decoding JSON blocks in the Fulu fork. This diff was missing
from https://github.com/ethereum/go-ethereum/pull/33349.
2025-12-03 23:17:19 +01:00
Justin
6452b7ad05
beacon/light: optimize database key assembling (#33292)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-27 10:35:22 +08:00
Klimov Sergei
c55a12197e
beacon/config: ignore nil values in config file (#33065)
YAML supports leaving out the value, so we should handle this condition
in our limited parser.
2025-11-26 16:19:33 +01:00
Klimov Sergei
3e48e0779c
beacon/config: add ELECTRA, FULU to knownForks (#32674) 2025-11-26 16:15:28 +01:00
Felföldi Zsolt
62334a9d46
beacon: update beacon light client for fusaka (#33272)
This PR adds the "FULU" beacon chain config entries for all networks and
fixes the select statements that choose the appropriate engine API call
versions (no new version there but the "default" was always the first
version; now it's the latest version so no need to change unless there
is actually a new version).
New beacon checkpoints are also added for mainnet, sepolia and hoodi
(not for holesky because it's not finalizing at the moment).
Note that though unrelated to fusaka, the log indexer checkpoints are
also updated for mainnet (not for the other testnets, mainly because I
only have mainnet synced here on my travel SSD; this should be fine
though because the index is also reverse generated for a year by default
so it does not really affect the indexing time)

Links for the new checkpoints:

https://beaconcha.in/slot/13108192
https://light-sepolia.beaconcha.in/slot/9032384
https://hoodi.beaconcha.in/slot/1825728
2025-11-26 11:07:56 +01:00
Guillaume Ballet
739f6f46a2
.github: add 32-bit CI targets (#32911)
Some checks are pending
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
This adds two new CI targets. One is for building all supported keeper
executables, the other is for running unit tests on 32-bit Linux.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-10-28 13:56:44 +01:00
Felföldi Zsolt
b08b629818
beacon/blsync: test validated finality (#32633)
This PR improves `TestBlockSync` so that it also tests the finality
update validation.

Note: to this date four long and complex (at least partly AI generated)
PRs arrived that did something related to testing finality but honestly
we do not need a bloated "comprehensive" test to test a trivial feature
because maintaining these tests can also be a pain over the long term.
This PR adds some sufficient sanity checks to detect if finality ever
gets broken by a future change.
2025-09-19 14:07:10 +02:00
Klimov Sergei
b9e2eb5944
beacon/config: fix LoadForks with non-string values (#32609)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Fixes a crash when loading the beacon chain config if new fields like
`BLOB_SCHEDULE: []` are present.
Previously, the config loader assumed all values were strings, causing
errors such as:

```
Fatal: Could not load beacon chain config '/network-configs/config.yaml': failed to parse beacon chain config file: yaml: unmarshal errors:
line 242: cannot unmarshal !!seq into string
```

This PR updates the parsing logic to handle non-string values correctly
and adds explicit validation for fork fields.
2025-09-19 01:30:00 +02:00
rjl493456442
2a82964727
eth/catalyst, beacon/engine: enable BPO and Osaka on stateless APIs (#32636)
Addresses https://github.com/ethereum/go-ethereum/issues/32630

This pull request enables the stateless engine APIs for Osaka and the
following BPOs. Apart from that, a few more descriptions have been added
in the engine APIs, making it easier to follow the spec change.
2025-09-19 00:16:01 +02:00
Zach Brown
2a795c14f4
all: fix problematic function name in comment (#32513)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Fix problematic function name in comment.
Do my best to correct them all with a script to avoid spamming PRs.
2025-08-29 08:54:23 +08:00
cui
2e3971aed1
beacon/merkle: use reflect.TypeFor (#32322) 2025-08-07 14:36:20 +02:00
Felföldi Zsolt
5ebd8032b9
beacon/params, core/filtermaps: update checkpoints (#32336)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This PR updates checkpoints for blsync and filtermaps.
2025-08-04 09:19:33 +08:00
rjl493456442
0dacfef8ac
all: define constructor for BlobSidecar (#32213)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
The main purpose of this change is to enforce the version setting when
constructing the blobSidecar, avoiding creating sidecar with wrong/default 
version tag.
2025-07-17 11:19:20 +08:00
Marius van der Wijden
c7e6c08e54
eth/catalyst: implement getBlobsV2 (#31791)
Implements `engine_getBlobsV2` which is needed for PeerDAS.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-06-09 11:34:24 +02:00
Felix Lange
3e356d69ef
beacon/blsync: fix requests encoding in engine_newPayloadV4 (#31775)
This fixes an issue where blocks containing CL requests triggered an
error in the engine API. The encoding of requests used base64 instead of
hex.
2025-05-07 18:53:45 +08:00
rjl493456442
0ac4a84a1f
beacon/engine: omit empty witness in payload response (#31739)
Fixes https://github.com/ethereum/go-ethereum/issues/31737
2025-04-29 13:21:18 +02:00
Felföldi Zsolt
b62756d1a3
beacon/params: add mainnet electra config (#31706)
This PR adds the electra beacon chain configuration for mainnet.
2025-04-24 21:40:12 +02:00
Felföldi Zsolt
5a7bbb423f
beacon/params, core/filtermaps: update checkpoints (#31674)
This PR updates checkpoints for blsync and filtermaps.
2025-04-20 12:54:40 +02:00
Felföldi Zsolt
9f83e9e673
beacon/blsync: add checkpoint import/export file feature (#31469)
This PR adds a new `--beacon.checkpoint.file` config flag to geth and
blsync which specifies a checkpoint import/export file. If a file with
an existing checkpoint is specified, it is used for initialization
instead of the hardcoded one (except when `--beacon.checkpoint` is also
specified simultaneously). Whenever the client encounters a new valid
finality update with a suitable finalized beacon block root at an epoch
boundary, it saves the block root in hex format to the checkpoint file.
2025-04-03 16:04:11 +02:00
Felföldi Zsolt
28238b6b7e
beacon/params: new checkpoints (#31470)
This PR updates beacon checkpoints. The checkpoints are now stored as
embedded hex files, in the same format that
https://github.com/ethereum/go-ethereum/pull/31469 uses.
2025-03-24 12:27:40 +01:00
Marius van der Wijden
668118bfe1
params: add hoodi testnet definition (#31406)
Adds support for the new hoodi testnet. Hoodi is meant for stakers to test
their setup. For more info please refer to https://hoodi.ethpandaops.io/.
2025-03-18 12:07:49 +01:00
Felix Lange
e442c4d50c
beacon/types, beacon/blsync: update for electra (#31243)
This updates the blsync base types for the Electra fork. I've been
testing, and it doesn't seem to make blsync fully work on Electra. But
I'd still like to get this in to make some progress.

---------

Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
2025-03-11 17:17:47 +01:00
Felix Lange
5d97db8d03
all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
Felix Lange
db8eed860d
all: exclude empty outputs in requests commitment (#30670)
Implements changes from these spec PRs:

- https://github.com/ethereum/EIPs/pull/8989
- https://github.com/ethereum/execution-apis/pull/599
2024-11-28 11:48:50 +01:00
Felföldi Zsolt
7cbce8ed58
beacon/blsync: remove cli dependencies (#30720)
This PR moves chain config related code (config file processing, fork
logic, network defaults) from `beacon/types` and `beacon/blsync` into
`beacon/params` while the command line flag logic of the chain config is
moved into `cmd/utils`, thereby removing the cli dependencies from
package `beacon` and its sub-packages.
2024-11-08 15:21:00 +01:00
zhiqiangxu
87465e98f9
beacon/light: remove unused CommitteeChain.signerThreshold (#30484)
This field is a duplicate of UpdateScore.SignerCount and never referenced.
2024-10-30 15:22:10 +01:00
Felföldi Zsolt
6c6bf6fe64
beacon/blsync: add holesky config and update checkpoints (#30671)
This PR adds the beacon chain config for the holesky testnet. It also
updates beacon checkpoints for Mainnet and Sepolia.
2024-10-25 13:20:18 +02:00
Péter Szilágyi
afea3bd49c
beacon/engine, core/txpool, eth/catalyst: add engine_getBlobsV1 API (#30537) 2024-10-17 19:27:35 +03:00
Roman Krasiuk
4c4219e405
beacon/engine: omit null witness field from payload envelope (#30597)
## Description

Omit null `witness` field from payload envelope.

## Motivation

Currently, JSON encoded payload types always include `"witness": null`,
which, I believe, is not intentional.
2024-10-15 11:51:20 +03:00
Felix Lange
add5709cb5
beacon/engine: strip type byte in requests (#30576)
This change brings geth into compliance with the current engine API
specification for the Prague fork. I have moved the assignment of
ExecutionPayloadEnvelope.Requests into BlockToExecutableData to ensure
there is a single place where the type is removed.

While doing so, I noticed that handling of requests in the miner was not
quite correct for the empty payload. It would return `nil` requests for
the empty payload even for blocks after the Prague fork. To fix this, I
have added the emptyRequests field in miner.Payload.
2024-10-14 21:43:35 +02:00
Felix Lange
2936b41514
all: implement flat deposit requests encoding (#30425)
This implements recent changes to EIP-7685, EIP-6110, and
execution-apis.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Shude Li <islishude@gmail.com>
2024-10-09 12:24:58 +02:00
zhiqiangxu
84a80216c6
beacon/light: optimize lock usage in HeadTracker (#30485)
minimizes the time when the lock is held
2024-10-02 16:00:36 +02:00
Péter Szilágyi
9326a118c7
beacon, core, eth, miner: integrate witnesses into production Geth (#30069)
This PR integrates witness-enabled block production, witness-creating
payload execution and stateless cross-validation into the `engine` API.
The purpose of the PR is to enable the following use-cases (for API
details, please see next section):

- Cross validating locally created blocks:
- Call `forkchoiceUpdatedWithWitness` instead of `forkchoiceUpdated` to
trigger witness creation too.
- Call `getPayload` as before to retrieve the new block and also the
above created witness.
- Call `executeStatelessPayload` against another client to
cross-validate the block.

- Cross validating locally processed blocks:
- Call `newPayloadWithWitness` instead of `newPayload` to trigger
witness creation too.
- Call `executeStatelessPayload` against another client to
cross-validate the block.

- Block production for stateless clients (local or MEV builders):
- Call `forkchoiceUpdatedWithWitness` instead of `forkchoiceUpdated` to
trigger witness creation too.
- Call `getPayload` as before to retrieve the new block and also the
above created witness.
- Propagate witnesses across the consensus libp2p network for stateless
Ethereum.

- Stateless validator validation:
- Call `executeStatelessPayload` with the propagated witness to
statelessly validate the block.

*Note, the various `WithWitness` methods could also *just be* an
additional boolean flag on the base methods, but this PR wanted to keep
the methods separate until a final consensus is reached on how to
integrate in production.*

---

The following `engine` API types are introduced:

```go
// StatelessPayloadStatusV1 is the result of a stateless payload execution.
type StatelessPayloadStatusV1 struct {
	Status          string      `json:"status"`
	StateRoot       common.Hash `json:"stateRoot"`
	ReceiptsRoot    common.Hash `json:"receiptsRoot"`
	ValidationError *string     `json:"validationError"`
}
```

- Add `forkchoiceUpdatedWithWitnessV1,2,3` with same params and returns
as `forkchoiceUpdatedV1,2,3`, but triggering a stateless witness
building if block production is requested.
- Extend `getPayloadV2,3` to return `executionPayloadEnvelope` with an
additional `witness` field of type `bytes` iff created via
`forkchoiceUpdatedWithWitnessV2,3`.
- Add `newPayloadWithWitnessV1,2,3,4` with same params and returns as
`newPayloadV1,2,3,4`, but triggering a stateless witness creation during
payload execution to allow cross validating it.
- Extend `payloadStatusV1` with a `witness` field of type `bytes` if
returned by `newPayloadWithWitnessV1,2,3,4`.
- Add `executeStatelessPayloadV1,2,3,4` with same base params as
`newPayloadV1,2,3,4` and one more additional param (`witness`) of type
`bytes`. The method returns `statelessPayloadStatusV1`, which mirrors
`payloadStatusV1` but replaces `latestValidHash` with `stateRoot` and
`receiptRoot`.
2024-09-20 16:43:42 +03:00
Felföldi Zsolt
a01e9742d9
beacon/light/api: fixed blsync update query (#30421)
This PR fixes what https://github.com/ethereum/go-ethereum/pull/30306/
broke. Escaping the `?` in the event sub query was fixed in that PR but
it was still escaped in the `updates` request. This PR adds a URL params
argument to `httpGet` and fixes `updates` query formatting.
2024-09-12 16:08:29 +02:00
lightclient
c70b0a9138
beacon/engine/types: remove PayloadV4 (#30415)
h/t @MariusVanDerWijden for finding and fixing this on devnet 3.

I made the mistake of thinking `PayloadVersion` was correlated with the
`GetPayloadVX` method, but it actually tracks which version of
`PayloadAttributes` were passed to `forkchoiceUpdated`. So far, Prague
does not necessitate a new version of fcu, so there is no need for
`PayloadV4`.

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-09-10 21:52:20 +03:00
lightclient
dfd33c7792
all: implement EIP-6110, execution layer triggered deposits (#29431)
This PR implements EIP-6110: Supply validator deposits on chain. It also sketches
out the base for Prague in the engine API types.
2024-09-04 14:33:51 +02:00
Guillaume Ballet
e9467eec1c
consensus/beacon, core/types: add verkle witness builder (#30129)
This PR adds the bulk verkle witness+proof production at the end of block
production. It reads all data from the tree in one swoop and produces
a verkle proof.

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-08-29 14:50:27 +02:00
Gealber Morales
eaf4285f0a
beacon/light/sync: basic tests for rangeLock (#30269)
adds simple tests for lock and firstUnlocked method from rangeLock
type

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2024-08-23 12:31:24 +02:00
Karl Bartel
c12a1c9bcf
beacon/blsync: better error information in test (#30336)
this change reports the error instead of ignoring it
2024-08-23 12:29:02 +02:00
stevemilk
3c37db7989
all: clean up goerli flag and config (#30289)
Co-authored-by: lightclient <lightclient@protonmail.com>
2024-08-20 15:59:48 +02:00
Sina M
43640f12d8
beacon/light: handle endpoint URL more gracefully (#30306)
blsync was failing if the light endpoint it was provided ended with a
`/`. This change should handle the joining more gracefully.
2024-08-16 14:39:57 +02:00
Artyom Aminov
32a1e0643c
beacon/engine, consensus/beacon: use params.MaximumExtraDataSize instead of hard-coded value (#29721)
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: lightclient <lightclient@protonmail.com>
2024-08-10 12:44:31 +02:00
yukionfire
4dfc75deef
beacon/types, cmd/devp2p, p2p/enr: clean up uses of fmt.Errorf (#30182) 2024-07-25 00:32:58 +02:00
Felföldi Zsolt
86150af2e5
beacon/light: fix shutdown issues (#29946)
* beacon/light/request: add server test for event after unsubscribe

* beacon/light/api: fixed double stream.Close()

* beacon/light/request: add checks for nil event callback function

* beacon/light/request: unlock server mutex while unsubscribing from parent
2024-06-12 16:38:19 +02:00
Felix Lange
1e97148249
all: fix inconsistent receiver name and add lint rule for it (#29974)
* .golangci.yml: enable check for consistent receiver name

* beacon/light/sync: fix receiver name

* core/txpool/blobpool: fix receiver name

* core/types: fix receiver name

* internal/ethapi: use consistent receiver name 'api' for handler object

* signer/core/apitypes: fix receiver name

* signer/core: use consistent receiver name 'api' for handler object

* log: fix receiver name
2024-06-12 10:45:42 +03:00
maskpp
b36c73813c
beacon/engine: prealloc capacity for map and slice (#29903)
* prealloc capacity for map and slice

* revert unnecessary change
2024-06-03 15:38:08 +03:00
trillo
caafa93598
all: improve some error strings (#29842) 2024-05-28 13:44:40 +02:00