Commit Graph

20764 Commits

Author SHA1 Message Date
Mark Holt
15ff41876c
Change retire progress log level to debug (#9153)
This moved the log level of retire progress messaging to debug, to avoid
log nose on qa and test runs
2024-01-08 07:10:45 +07: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
milen
98cc1ee808
stagedsync: implement bor span for chain reader and fix loggers (#9146)
While working on fixing the bor mining loop I stumbled across an error
in `ChainReader.BorSpan` - not implemented panic. Also hit a few other
panics due to missed logger in `ChainReaderImpl` struct initialisations.
This PR fixes both.
2024-01-05 14:20:21 +00:00
battlmonstr
ebe16d8360
bor: BorConfig setup fix (#9145)
A crash on startup happens on --chain=mumbai , because I've confused
chainConfig.Bor (from type chain.Config) and config.Bor (from type
ethconfig.Config) in the setup code.

ethconfig.Config.Bor property contained bogus values, and was used only
to check its type in CreateConsensusEngine(). Its value was never read
(before PR #9117).

This change removes the property to avoid confusion and fix the crash.

Devnet network.BorStateSyncDelay was implemented using
ethconfig.Config.Bor, but it wasn't taking any effect. It should be
fixed separately in a different way.
2024-01-05 20:03:19 +07:00
Andrew Ashikhmin
3eeb57218f
params: begin 2.57 release cycle (#9144) 2024-01-05 13:03:36 +01:00
a
9cd5f5837f
data (#9126) 2024-01-04 10:56:14 -06:00
battlmonstr
b57cbdcff7
polygon/sync: canonical chain builder (#9117) 2024-01-04 10:44:57 +01: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
milen
b94ca6dc1c
devnet: fix ws port clash for state-sync scenario (#9125)
Getting an error in one of the bor nodes in devnet when trying to run
the "state-sync" scenario:
```
[EROR] [01-03|16:55:44.179] cli.StartRpcServer error                 err="could not start separate Websocket RPC api at port 8546: listen tcp 127.0.0.1:8546: bind: address already in use"
```

This happens for scenarios with more than 1 node.

Digging further this regressions has happened due to this change:
https://github.com/ledgerwatch/erigon/pull/8909

This PR fixes this by updating the devnet `NodeArgs` struct to set the
corresponding `--ws.port` `arg` tag which now exists.
2024-01-03 18:58:52 +00: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
umba
a645ef62a7
Update README.md (#9112)
Hi, I made three suggestions for this section:

- "devenet" should be "devnet" (typo).

- "are currently build" should be "are currently built" (grammatical
error).

- "sptep" should be "step" (typo).

Thanks.
2024-01-03 19:01:40 +07:00
ddl
a2274f36e5
chore(cmd/evm):fix link jump in cmd/evm/README.md (#9114)
fix the relative path in cmd/evm/README.md


![image](https://github.com/ledgerwatch/erigon/assets/24953789/058b0486-f8cf-4fa3-ad53-e01b5ea6f0c3)
2024-01-03 18:59:45 +07:00
Dmytro
777f5dcd61
added collection for log prefix (#9118) 2024-01-03 08:13:56 +07: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
a959387aae
Make caplin sync snapshots (all of them) (#9106) 2024-01-01 08:18:56 +07: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
milen
b562eff482
heimdall: better error logging for clerk/event-record/list nil response (#9103)
Users reported this error
```
[bor.heimdall] an error while trying fetching path=clerk/event-record/list attempt=5 error="unexpected end of JSON input"
```

Which may happen if:

1. Heimdall is behind and not sync-ed - for more info check
https://github.com/maticnetwork/heimdall/pull/993
2. Or the header time erigon is sending is far into the future

The logs in this PR will help us see which of the 2 is the culprit but
most likely it is 1. We will investigate further 2. if it ever happens.

Changes:
1. Improves logging upon heimdall client retries - prints out the full
url that failed.
2. Fixes a bug where the body was incorrectly checked if it is empty -
`len(body) == 0` vs `body == nil`
3. Unit test for the bug regression
4. Adds a log to indicate to users to check their heimdall process if
they run into this scenario since that may be the culprit


Example output with new logs
<img width="1465" alt="Screenshot 2023-12-29 at 20 16 57"
src="https://github.com/ledgerwatch/erigon/assets/94537774/1ebfde68-aa93-41d6-889a-27bef5414f25">
2023-12-30 11:23:25 +00:00
milen
fc9dae1783
heimdall: add max retries to heimdall client (#9098)
Corresponds to the client fix in this PR description -
https://github.com/ledgerwatch/erigon/pull/9096#issue-2058506765
2023-12-28 17:57:44 +00:00
milen
f8cc27aebd
heimdall: use span id as naming (#9097)
follow up on naming as suggested here
https://github.com/ledgerwatch/erigon/pull/9096#pullrequestreview-1798218317
2023-12-28 17:49:31 +00:00
milen
1f237c0aaf
borheimdall: only fetch next span when in last sprint of current span (#9096)
Heimdall prepares the next span a number of sprints before the current
span ends. Currently we always fetch the next span regardless of which
sprint we are in during the current span. This causes a liveness issue
due to how the Heimdall client works (it infinitely retries until it
fetches a span - this issue will be fixed in a separate PR). This PR
fixes this by matching what bor does - it fetches the next span only in
the last sprint of the current span.

Changes:

- Adds a unit test for the above
- Adds a new function BlockInLastSprintOfSpan
- Some code reorg and cleanup - moves the span num related functions
from the bor package to the span sub package for better logical grouping
2023-12-28 15:52:49 +00:00
milen
67704871c0
borheimdall: add tests for validator set and selected proposers validation (#9089)
Adds unit tests for:
- Bor Heimdall Stage - `checkHeaderExtraData`
- at end of each sprint verifies that the validators in the header extra
data matches the selected proposers from the heimdall span
   - 1 test for selected proposers length mismatch
   - 1 test for selected proposers bytes mismatch
- BorHeimdall Stage - `persistValidatorSets`
- verifies that each header is created by a validator in the validator
set
   - in such situation we set the unwind point
2023-12-28 14:00:09 +00:00
ledgerwatch
ab27531fa7
Introduce new public buckets for the snapshots (#9094)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-12-28 12:39:25 +00:00
Giulio rebuffo
698ee60339
Beacon API: Added attestation rewards endpoint. (#9091) 2023-12-28 13:07:53 +01:00
Delweng
398bcb50a0
rpc: implement txpool_contentFrom (#9057)
implement the `txpool_contentFrom` rpc, used to retrieve the specified
address's tx contents.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-12-28 14:15:16 +07: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
Mark Holt
df0699a12b
Added sentry simulator implementation (#9087)
This adds a simulator object with implements the SentryServer api but
takes objects from a pre-existing snapshot file.

If the snapshot is not available locally it will download and index the
.seg file for the header range being asked for.

It is created as follows: 

```go
sim, err := simulator.NewSentry(ctx, "mumbai", dataDir, 1, logger)
```

Where the arguments are:

* ctx - a callable context where cancel will close the simulator torrent
and file connections (it also has a Close method)
* chain - the name of the chain to take the snapshots from
* datadir - a directory potentially containing snapshot .seg files. If
not files exist in this directory they will be downloaded
 *  num peers - the number of peers the simulator should create
 *  logger - the loger to log actions to

It can be attached to a client as follows:

```go
simClient := direct.NewSentryClientDirect(66, sim)
```

At the moment only very basic functionality is implemented:

* get headers will return headers by range or hash (hash assumes a
pre-downloaded .seg as it needs an index
* the header replay semantics need to be confirmed
* eth 65 and 66(+) messaging is supported
* For details see: `simulator_test.go

More advanced peer behavior (e.g. header rewriting) can be added
Bodies/Transactions handling can be added
2023-12-27 14:56:57 +00:00
Alex Sharov
a48db431cb
return deleted caplin-v2 webseed (#9083) 2023-12-26 18:55:17 +07: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
Andrew Ashikhmin
9f9e3644ed
Update Polygon storage requirements (#9014)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-12-25 20:22:13 +07:00
Alex Sharov
0d31444eea
bor mainnet 51m (#9073) 2023-12-25 11:24:14 +07:00
Alex Sharov
bc50bd50a4
make 500K files also seedable (because they actually are) (#9077) 2023-12-25 10:07:31 +07: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
2944abbd19
fix typo in snap webseed server names (#9072) 2023-12-24 16:37:13 +07:00
Alex Sharov
e08003f1f7
block retire: merge all possible files (even bor) even if nothing to retire (#9068)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-12-24 07:32:52 +00:00
Alex Sharov
77d32ccdc6
"downloader manifest": cmd to produce manifest.txt (#9067)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-12-24 07:32:21 +00:00
Alex Sharov
4186213f22
disable TestSentinelGossipAverage (#9070) 2023-12-24 06:32:14 +00:00
lupin012
88a8aa6799
rpcademon: eth_createAccessList: fix in retrieve nonce (#9064) 2023-12-24 04:41:04 +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
lupin012
6a83a91145
Add create access list test (#9062) 2023-12-23 21:38:47 +07:00