Remove all prod eth1 related code (#7133)

N/A


  After the electra fork which includes EIP 6110, the beacon node no longer needs the eth1 bridging mechanism to include new deposits as they are provided by the EL as a `deposit_request`. So after electra + a transition period where the finalized bridge deposits pre-fork are included through the old mechanism, we no longer need the elaborate machinery we had to get deposit contract data from the execution layer.

Since holesky has already forked to electra and completed the transition period, this PR basically checks to see if removing all the eth1 related logic leads to any surprises.
This commit is contained in:
Pawan Dhananjay
2025-06-22 20:00:07 -07:00
committed by GitHub
parent d50924677a
commit 11bcccb353
59 changed files with 158 additions and 7834 deletions

View File

@@ -353,126 +353,6 @@ See [Validator Inclusion APIs](./api_validator_inclusion.md).
See [Validator Inclusion APIs](./api_validator_inclusion.md).
## `/lighthouse/eth1/syncing`
Returns information regarding execution layer, as it is required for use in
consensus layer
### Fields
- `head_block_number`, `head_block_timestamp`: the block number and timestamp
from the very head of the execution chain. Useful for understanding the immediate
health of the execution node that the beacon node is connected to.
- `latest_cached_block_number` & `latest_cached_block_timestamp`: the block
number and timestamp of the latest block we have in our block cache.
- For correct execution client voting this timestamp should be later than the
`voting_target_timestamp`.
- `voting_target_timestamp`: The latest timestamp allowed for an execution layer block in this voting period.
- `eth1_node_sync_status_percentage` (float): An estimate of how far the head of the
execution node is from the head of the execution chain.
- `100.0` indicates a fully synced execution node.
- `0.0` indicates an execution node that has not verified any blocks past the
genesis block.
- `lighthouse_is_cached_and_ready`: Is set to `true` if the caches in the
beacon node are ready for block production.
- This value might be set to
`false` whilst `eth1_node_sync_status_percentage == 100.0` if the beacon
node is still building its internal cache.
- This value might be set to `true` whilst
`eth1_node_sync_status_percentage < 100.0` since the cache only cares
about blocks a certain distance behind the head.
### Example
```bash
curl -X GET "http://localhost:5052/lighthouse/eth1/syncing" -H "accept: application/json" | jq
```
```json
{
"data": {
"head_block_number": 3611806,
"head_block_timestamp": 1603249317,
"latest_cached_block_number": 3610758,
"latest_cached_block_timestamp": 1603233597,
"voting_target_timestamp": 1603228632,
"eth1_node_sync_status_percentage": 100,
"lighthouse_is_cached_and_ready": true
}
}
```
## `/lighthouse/eth1/block_cache`
Returns a list of all the execution layer blocks in the execution client voting cache.
### Example
```bash
curl -X GET "http://localhost:5052/lighthouse/eth1/block_cache" -H "accept: application/json" | jq
```
```json
{
"data": [
{
"hash": "0x3a17f4b7ae4ee57ef793c49ebc9c06ff85207a5e15a1d0bd37b68c5ef5710d7f",
"timestamp": 1603173338,
"number": 3606741,
"deposit_root": "0xd24920d936e8fb9b67e93fd126ce1d9e14058b6d82dcf7d35aea46879fae6dee",
"deposit_count": 88911
},
{
"hash": "0x78852954ea4904e5f81038f175b2adefbede74fbb2338212964405443431c1e7",
"timestamp": 1603173353,
"number": 3606742,
"deposit_root": "0xd24920d936e8fb9b67e93fd126ce1d9e14058b6d82dcf7d35aea46879fae6dee",
"deposit_count": 88911
}
]
}
```
## `/lighthouse/eth1/deposit_cache`
Returns a list of all cached logs from the deposit contract.
### Example
```bash
curl -X GET "http://localhost:5052/lighthouse/eth1/deposit_cache" -H "accept: application/json" | jq
```
```json
{
"data": [
{
"deposit_data": {
"pubkey": "0xae9e6a550ac71490cdf134533b1688fcbdb16f113d7190eacf4f2e9ca6e013d5bd08c37cb2bde9bbdec8ffb8edbd495b",
"withdrawal_credentials": "0x0062a90ebe71c4c01c4e057d7d13b944d9705f524ebfa24290c22477ab0517e4",
"amount": "32000000000",
"signature": "0xa87a4874d276982c471e981a113f8af74a31ffa7d18898a02df2419de2a7f02084065784aa2f743d9ddf80952986ea0b012190cd866f1f2d9c633a7a33c2725d0b181906d413c82e2c18323154a2f7c7ae6f72686782ed9e423070daa00db05b"
},
"block_number": 3086571,
"index": 0,
"signature_is_valid": false
},
{
"deposit_data": {
"pubkey": "0xb1d0ec8f907e023ea7b8cb1236be8a74d02ba3f13aba162da4a68e9ffa2e395134658d150ef884bcfaeecdf35c286496",
"withdrawal_credentials": "0x00a6aa2a632a6c4847cf87ef96d789058eb65bfaa4cc4e0ebc39237421c22e54",
"amount": "32000000000",
"signature": "0x8d0f8ec11935010202d6dde9ab437f8d835b9cfd5052c001be5af9304f650ada90c5363022e1f9ef2392dd222cfe55b40dfd52578468d2b2092588d4ad3745775ea4d8199216f3f90e57c9435c501946c030f7bfc8dbd715a55effa6674fd5a4"
},
"block_number": 3086579,
"index": 1,
"signature_is_valid": false
}
]
}
```
## `/lighthouse/liveness`
POST request that checks if any of the given validators have attested in the given epoch. Returns a list

View File

@@ -122,15 +122,6 @@ Options:
The number of epochs to wait between running the migration of data
from the hot DB to the cold DB. Less frequent runs can be useful for
minimizing disk writes [default: 1]
--eth1-blocks-per-log-query <BLOCKS>
Specifies the number of blocks that a deposit log query should span.
This will reduce the size of responses from the Eth1 endpoint.
[default: 1000]
--eth1-cache-follow-distance <BLOCKS>
Specifies the distance between the Eth1 chain head and the last block
which should be imported into the cache. Setting this value lower can
help compensate for irregular Proof-of-Work block times, but setting
it too low can make the node vulnerable to re-orgs.
--execution-endpoint <EXECUTION-ENDPOINT>
Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC
connection. Uses the same endpoint to populate the deposit cache.
@@ -454,10 +445,6 @@ Flags:
resource contention which degrades staking performance. Stakers should
generally choose to avoid this flag since backfill sync is not
required for staking.
--disable-deposit-contract-sync
Explicitly disables syncing of deposit logs from the execution node.
This overrides any previous option that depends on it. Useful if you
intend to run a non-validating beacon node.
--disable-enr-auto-update
Discovery automatically updates the nodes local ENR with an external
IP address and port as seen by other peers on the network. This
@@ -499,8 +486,6 @@ Flags:
--enable-private-discovery
Lighthouse by default does not discover private IP addresses. Set this
flag to enable connection attempts to local addresses.
--eth1-purge-cache
Purges the eth1 block and deposit caches
--genesis-backfill
Attempts to download blocks all the way back to genesis when
checkpoint syncing.