Commit Graph

309 Commits

Author SHA1 Message Date
Andrew Ashikhmin
4abc6cd119
Schedule Dencun for Sepolia & Holešky (#9255)
See https://github.com/ethereum/EIPs/pull/8051 &
https://github.com/ethereum/execution-specs/pull/860
2024-01-18 09:27:03 +01:00
Andrew Ashikhmin
8f6fe88b29
Update TestGoerliForkDigest after Dencun (#9251)
Current fork digest for Görli has changed after the [Dencun
upgrade](https://blog.ethereum.org/2024/01/10/goerli-dencun-announcement)
on 17 Jan.
2024-01-17 11:50:13 +01:00
Giulio rebuffo
e1a1c0c049
Caplin: Fixed goroutine hell (#9246) 2024-01-17 10:06:18 +01:00
Giulio rebuffo
f03d2665ff
Added merkle proof and fixed bad handling of new validators (#9233) 2024-01-15 15:01:33 +01:00
a
8d4d4d802c
refac some (#9185) 2024-01-14 23:22:34 -06:00
Giulio rebuffo
7b58dab998
Added LightClient Containers (#9222) 2024-01-13 01:12:02 +01:00
Bayram Guvanjov
a191296f05
Deneb integration to Caplin (#9093)
Pr is ready to review and merge. 

This PR includes implementing and integrating Ethereum Deneb's hard work
with the Caplin Ethereum client.

Changes:

- Full compatibility with Deneb Ethereum hard fork
- Added new EIPs introduced in Deneb. (`EIP-4788`, `EIP-4844`,
`EIP-7044`, `EIP-7045`, `EIP-7514`)
- Tests integration

---------

Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2024-01-12 14:20:26 +01:00
Alex Sharov
574ec8089d
caplin state_antiqate: reduce worst case ram limit (#9217) 2024-01-12 14:19:24 +01:00
Giulio rebuffo
8315033a92
Added more checks on state reconstruction + made history reconstruction resumable. (#9211)
Co-authored-by: Bayram Guvanjov <bayramguwanjow@gmail.com>
2024-01-11 20:05:54 +01:00
Alex Sharov
1ee439e6ac
mdbx: dplimit - support cgroups/gomelimit, avoid using SetOptions after env.Open() (#9189) 2024-01-11 08:06:35 +07:00
Giulio rebuffo
284aa1dd0c
Added EthV1AggregateAndProofs API (#9192)
Added publishing of aggregates and proofs
2024-01-10 17:15:58 +01:00
Andrew Ashikhmin
09ec1f160c
Fix DenebForkEpoch for Chiado (#9188)
In PR #9184 I confused slot with epoch. Refer to
https://github.com/gnosischain/configs/pull/26.
2024-01-10 16:13:15 +01:00
Andrew Ashikhmin
8db023bea6
Schedule Dencun for Chiado (#9184) 2024-01-09 20:57:02 +01:00
Alex Sharov
b25d8cc873
disable TestGetValidatorsBalances: oom on CI (#9131)
https://github.com/ledgerwatch/erigon/issues/9130
2024-01-09 08:25:27 +07:00
Giulio rebuffo
b2fa618f74
Caplin: Fixed crash in OnAttestation (#9159)
* Added handling of AggregateAndProof
2024-01-08 17:13:25 +01:00
Giulio rebuffo
fe9bc35e1e
Added GetEth1V1BuilderStatesExpectedWithdrawals (#9152) 2024-01-08 09:42:47 +01:00
a
235af8a321
glob filter (#9148) 2024-01-07 12:03:17 -06:00
Giulio rebuffo
e958d3584d
Added Heads method to Beacon API (#9135) 2024-01-06 21:49:23 +01:00
a
9cd5f5837f
data (#9126) 2024-01-04 10:56:14 -06:00
Alex Sharov
82822ee602
erigon snapshots integrity: add check for body.BaseTxnID (#9121) 2024-01-04 14:19:37 +07:00
Giulio rebuffo
18baf81b78
Caplin: Fixed Invalid reading for historical states (#9124) 2024-01-03 23:26:56 +01:00
Andrew Ashikhmin
391b267552
Schedule Dencun for Görli (#9116)
See https://github.com/ethereum/EIPs/pull/8051 &
https://github.com/ethereum/execution-specs/pull/860
2024-01-03 15:49:10 +01:00
Giulio rebuffo
3d10cee49b
Make Caplin work with Otterscan (#9115)
* Fixed mispelling in json fields
* Added CORS
2024-01-02 23:29:00 +01:00
Giulio rebuffo
415b17ca85
Updated erigon-snapshots (#9111) 2024-01-02 09:23:16 +07:00
Giulio rebuffo
13da868591
Added RANDAO Api (#9108) 2024-01-01 22:18:11 +01:00
a
bab123c07a
more endpoints (#9109) 2024-01-01 21:11:31 +01:00
Giulio rebuffo
580c55517f
Make caplin snapshots downloadable (only sepolia) (#9105) 2023-12-31 13:22:41 +01:00
Mark Holt
19bc328a07
Added db loggers to all db callers and fixed flag settings (#9099)
Mdbx now takes a logger - but this has not been pushed to all callers -
meaning it had an invalid logger

This fixes the log propagation.

It also fixed a start-up issue for http.enabled and txpool.disable
created by a previous merge
2023-12-31 17:10:08 +07:00
Giulio rebuffo
46ecf030f5
Added GET /eth/v1/beacon/rewards/blocks/{block_id} and POST /eth/v1/beacon/rewards/sync_committee/{block_id} (#9102)
* Changed slightly archive format (again)
* Added all of the remaining rewards endpoints
2023-12-30 20:51:28 +01:00
a
78bb3cdca8
[caplin] topic strings (#9000) 2023-12-30 16:55:01 +01:00
a
510d62ab8a
[caplin] sse handler placeholder (#9082) 2023-12-30 15:49:45 +01:00
Giulio rebuffo
698ee60339
Beacon API: Added attestation rewards endpoint. (#9091) 2023-12-28 13:07:53 +01:00
Mark Holt
79ed8cad35
E2 snapshot uploading (#9056)
This change introduces additional processes to manage snapshot uploading
for E2 snapshots:

## erigon snapshots upload

The `snapshots uploader` command starts a version of erigon customized
for uploading snapshot files to
a remote location.  

It breaks the stage execution process after the senders stage and then
uses the snapshot stage to send
uploaded headers, bodies and (in the case of polygon) bor spans and
events to snapshot files. Because
this process avoids execution in run signifigantly faster than a
standard erigon configuration.

The uploader uses rclone to send seedable (100K or 500K blocks) to a
remote storage location specified
in the rclone config file.

The **uploader** is configured to minimize disk usage by doing the
following:

* It removes snapshots once they are loaded
* It aggressively prunes the database once entities are transferred to
snapshots

in addition to this it has the following performance related features:

* maximizes the workers allocated to snapshot processing to improve
throughput
* Can be started from scratch by downloading the latest snapshots from
the remote location to seed processing

## snapshots command

Is a stand alone command for managing remote snapshots it has the
following sub commands

* **cmp** - compare snapshots
* **copy** - copy snapshots
* **verify** - verify snapshots
* **manifest** - manage the manifest file in the root of remote snapshot
locations
* **torrent** - manage snapshot torrent files
2023-12-27 22:05:09 +00:00
Giulio rebuffo
cdb4731ae8
Added Validators endpoint to Beacon API (#9080)
* Added /validators retrieval to beacon api
* fixed race in sentinel
* fixed possible UB in gossip management
2023-12-26 00:34:38 +01:00
Alex Sharov
ab4a00ffb9
disable TestSentinelStatusRequest (failing on WIN CI) (#9076) 2023-12-25 09:19:17 +07:00
Giulio rebuffo
eaf0348bd0
[Grindmas] Added tests to Beacon API, also fixed stuff. (#9074)
* Testing Beacon API
* Fixed sentinel code (a little bit)
* Fixed sentinel tests
* Added historical state support
* Fixed state-related endpoints (i was drunk when writing them)
2023-12-25 02:34:13 +01:00
Alex Sharov
4186213f22
disable TestSentinelGossipAverage (#9070) 2023-12-24 06:32:14 +00:00
Giulio rebuffo
be4036e132
Added tests to sentinel (FINALLY!) (#9066) 2023-12-24 03:54:50 +01:00
Giulio rebuffo
a4d7b6d33f
Switched Caplin snapshot format to ZSTD blinded blocks (#9058)
* Chunked format -> blinded
* LZ4 -> ZSTD
* Implemented parent block root support for history download
* Rationale: Allows to optimize GC collection easily on state
reconstruction and it allows to read fast attestations in historical
states reader
2023-12-23 15:56:35 +01:00
Bayram Guvanjov
a2f375c0b1
Add blocksByRange & blocksByRoot P2P rpc handlers (#8885)
This PR is ready to review. 

PR introduces `blocksByRange` and `blocksByRoot` P2P RPC methods
- `blocksByRange` - allows peers to request a range of blocks
- `blocksByRoot` - enables block requests using their root hashes(list
format)

Reference:
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#beaconblocksbyrange
2023-12-23 14:32:00 +01:00
Giulio rebuffo
0e18866ed9
Added fill-up with pre-existing API (#9042) 2023-12-21 17:49:40 +01:00
Alex Sharov
7107cfed0f
snaps: stop merge to 500K and enjoy immutability (#9034) 2023-12-21 08:04:46 +07:00
Giulio rebuffo
a0b9d60265
Update Consensus Specification tests (#9024) 2023-12-19 09:42:11 +01:00
Giulio rebuffo
a366629f8a
Cleanuped up request handling (#9007)
* Some requests may lead to undefined behaviour this will make sure to
call .Close once
2023-12-18 13:54:27 +01:00
Giulio rebuffo
ffc26b0f00
Added GET SyncCommittees (#9003) 2023-12-18 13:54:15 +01:00
Giulio rebuffo
6a1bb1dff1
Added Blinded blocks type and Beacon endpoints (#9002)
* Added blinded block for internal uses
* Added blinded block to the Beacon API
2023-12-17 00:22:47 +01:00
a
f934ecbd6a
Fix beacon api handler (#8999) 2023-12-16 19:12:40 +01:00
Giulio rebuffo
eeb471d800
Added Finality_Checkpoints endpoint (#8979) 2023-12-15 02:27:27 +01:00
Giulio rebuffo
4e83ef0ef5
Optimized beacon state retrieval (#8963)
* Reconstruct previous epoch without looking at DB: no hindrance to
performance -> removed 15GB
* Store inactivity scores and slashings in MDBX and do not store diffs
for them(they are tiny 700/400 bytes)
* Reduced dumps from every 2048 to 1024 -> Added 5 GB (maybe we should
down it to 768)
* Parallel processing of shuffled sets, 2x performance boost in reading
participation.
* Store balances diffs in a Btree diff matter, see:
https://github.com/ledgerwatch/erigon-documents/blob/master/caplin/design/data-model.md#uint64listuint64vector
2023-12-13 15:23:27 +01:00
Alex Sharov
d41d523050
Downloader: add ProhibitNewDownloads() (#8939)
"whitelisting" mechanism (list of files - stored in DB) - which
protecting us from downloading new files after upgrade/downgrade was
broken. And seems it became over-complicated with time.
I replacing it by 1 persistent flag inside downloader:
"prohibit_new_downloads.lock"
Erigon will turn downloader into this mode after
downloading/verification of first snapshots.


```
//Corner cases:
	// - Erigon generated file X with hash H1. User upgraded Erigon. New version has preverified file X with hash H2. Must ignore H2 (don't send to Downloader)
	// - Erigon "download once": means restart/upgrade/downgrade must not download files (and will be fast)
	// - After "download once" - Erigon will produce and seed new files
```

------
`downloader --seedbox` is never "prohibit new downloads"
2023-12-12 16:05:56 +07:00