Commit Graph

23 Commits

Author SHA1 Message Date
Felföldi Zsolt
100c0f47de
beacon/blsync: fixed blsync command line params (#29335) 2024-03-25 20:28:55 +01:00
Felix Lange
eda9cb7b36
beacon/light/api: improve handling of event stream setup failures (#29308)
The StartHeadListener method will only be called once. So it can't just make one attempt
to connect to the eventsource endpoint, it has to keep trying. Note that once the stream
is established, the eventsource implementation itself will keep retrying.
2024-03-25 20:27:50 +01:00
George Ma
38eb8b3e20
all: fix docstrings (#29311) 2024-03-22 20:29:12 +08:00
Felix Lange
bca6c40709
beacon/blsync: support for deneb fork (#29180)
This adds support for the Deneb beacon chain fork, and fork handling
in general, to the beacon chain light client implementation.

Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
2024-03-20 19:22:44 +01:00
bitcoin-lightning
6b3d4d068a
beacon/light/sync: fix typo in comment (#29256) 2024-03-19 14:05:06 +01:00
guangwu
ebf9e11af2
beacon/light/request: fix typos (#29216) 2024-03-11 11:17:16 +01:00
Felföldi Zsolt
aadcb88675
cmd/blsync, beacon/light: beacon chain light client (#28822)
Here we add a beacon chain light client for use by geth.

Geth can now be configured to run against a beacon chain API endpoint,
without pointing a CL to it. To set this up, use the `--beacon.api` flag. Information
provided by the beacon chain is verified, i.e. geth does not blindly trust the beacon
API endpoint in this mode. The root of trust are the beacon chain 'sync committees'.

The configured beacon API endpoint must provide light client data. At this time, only
Lodestar and Nimbus provide the necessary APIs.

There is also a standalone tool, cmd/blsync, which uses the beacon chain light client
to drive any EL implementation via its engine API.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-06 17:50:22 +01:00
lightclient
9e3e46671e
eth/catalyst,beacon/engine: implement GetClientVersionV1 (#28915) 2024-02-15 12:01:30 +01:00
lightclient
a8a87586c1
eth/catalyst: prefix payload id with version (#28246)
GetPayloadVX should only return payloads which match its version. GetPayloadV2 is a special snowflake that supports v1 and v2 payloads. This change uses a a version-specific prefix within in the payload id, basically a namespace for the version number.
2024-01-24 08:39:12 +01:00
Felföldi Zsolt
fff843cfaf
beacon/light: add CommitteeChain (#27766)
This change implements CommitteeChain which is a key component of the beacon light client. It is a passive data structure that can validate, hold and update a chain of beacon light sync committees and updates, starting from a checkpoint that proves the starting committee through a beacon block hash, header and corresponding state. Once synced to the current sync period, CommitteeChain can also validate signed beacon headers.
2023-12-08 13:38:00 +01:00
lightclient
f260a9edb9
beacon/engine: add shouldOverrideBuilder to payload envelope (#28029)
beacon/engine: add shouldOverrideBuilder to payload envelope
2023-09-04 09:26:13 -04:00
Martin Holst Swende
6aa88ccdd2
beacon/engine, eth/catalyst, miner: EIP-4788 CL/EL protocol updates (#27872)
This PR makes EIP-4788 work in the engine API and miner. It also fixes some bugs related to 
EIP-4844 block processing and mining. Changes in detail:

- Header.BeaconRoot has been renamed to ParentBeaconRoot.
- The engine API now implements forkchoiceUpdatedV3
- newPayloadV3 method has been updated with the parentBeaconBlockRoot parameter
- beacon root is now applied to new blocks in miner
- For EIP-4844, block creation now updates the blobGasUsed field of the header
2023-08-26 04:52:12 +02:00
lightclient
feb8f416ac
miner: add to build block with EIP-4844 blobs (#27875)
---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-08-23 23:16:14 +02:00
Martin Holst Swende
b8d38e76ef
core, params, beacon/engine: implement EIP 4788 BeaconRoot (#27849)
This change implements "EIP 4788 : Beacon block root in the EVM". It implements version-2 of EPI-4788, main difference being that the contract is an actual contract rather than a precompile, as in #27289.
2023-08-22 08:33:39 -04:00
Péter Szilágyi
57268f7e6c
all: rename dataGas to blobGas (#27789) 2023-07-27 16:53:28 +03:00
Felix Lange
e86ad52640
beacon/engine, eth/catalyst: EIP-4844 updates for the engine API (#27736)
This is a spin-out from the EIP-4844 devnet branch, containing just the Engine API modifications
and nothing else. The newPayloadV3 endpoint won't really work in this version, but we need the
data structures for testing so I'd like to get this in early.

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-07-18 09:44:16 +02:00
Felix Lange
944e1a0f90
beacon/types: auto-generate SyncCommittee marshaling methods (#27296) 2023-05-19 17:05:50 +03:00
Shude Li
6a6318b1d2
go.mod: usegopkg.in/yaml.v3 instead of github.com/go-yaml/yaml (#27295) 2023-05-17 23:35:30 +02:00
Felföldi Zsolt
c08dc59aad
beacon/types: add beacon chain data types (#27292)
* beacon/types: add beacon chain data types

* beacon/merkle: added comments

* go.mod: cleanups

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2023-05-17 17:39:33 +03:00
Marius van der Wijden
78429f7733
beacon/engine: don't omit empty withdrawals in ExecutionPayloadBodies (#26698)
This ensures the "withdrawals" field will always be present in responses
to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-03-07 16:30:04 +01:00
Roman Krasiuk
15e5e6176b
eth/catalyst: request too large error (#26722)
The method `GetPayloadBodiesByRangeV1` now returns "-38004: Too large request" error if the requested range is too large, according to spec

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-02-17 13:30:38 -05:00
Marius van der Wijden
6428663faf
eth/catalyst: send INVALID instead of INVALID_BLOCK_HASH (#26696)
This change will break one hive test, but pass another and it will be the better way going forward
2023-02-17 05:25:09 -05:00
Felföldi Zsolt
3a5aceed8f
beacon/engine: move core/beacon to beacon/engine (#26616)
This PR moves core/beacon to beacon/engine so that beacon-chain related code has its own top level package which also can house the the beacon lightclient-code.
2023-02-06 10:37:58 -05:00