Commit Graph

121 Commits

Author SHA1 Message Date
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
a
a2673c62c5
[caplin/sentinel] config reorganizations (#8844) 2023-11-28 22:45:58 -06:00
Giulio rebuffo
b72b5b95c5
working debug/state/ for early states (#8767)
Added jsonification to beacon state
2023-11-18 03:08:19 +01:00
a
436493350e
Sentinel refactor (#8296)
1. changes sentinel to use an http-like interface

2. moves hexutil, crypto/blake2b, metrics packages to erigon-lib
2023-10-22 01:17:18 +02:00
Giulio rebuffo
343479988c
Caplin <-> MDBX (#8470) 2023-10-18 23:10:53 +02:00
Giulio rebuffo
9e42b705ce
Caplin: under the hood block downloading (#8459) 2023-10-16 15:35:26 +02:00
Giulio rebuffo
cfc2bcf707
Proper use of Dirs in Caplin (#8458) 2023-10-13 15:22:48 +02:00
Alex Sharov
6d9a4f4d94
rpcdaemon: must not create db - because doesn't know right parameters (#8445) 2023-10-12 14:11:46 +07:00
Giulio rebuffo
10746eb376
Added BLS_TO_EXECUTION_CHANGES pool (#8332)
Adds BLS_TO_EXECUTION_CHANGES
2023-10-01 17:16:55 +02:00
Giulio rebuffo
72ba18bd36
Beacon: Added basic operations pool (#8309)
Added operation pools for beacon chain. operations are the equivalent of
txs for eth2

Added operation pools for:

* Attester Slashings
* Proposer Slashings
* VoluntaryExits
* BLSExecutionToChange
* Postponed to later: Attestations (or maybe not)
2023-09-29 23:42:07 +02:00
Jason Yellick
5654ba07c9
Upgrade libp2p (enables go 1.21 support) (#8288)
Closes #8078 

This change is primarily intended to support go 1.21, but as a
side-effect requires updating libp2p, which in turn triggers an update
of golang.org/x/exp which creates quite a bit of (simple) churn in the
slice sorting.

This change introduces a new `cmp.Compare` function which can be used to
return an integer satisfying the compare interface for slice sorting.

In order to continue to support mplex for libp2p, the change references
github.com/libp2p/go-libp2p-mplex instead. Please see the PR at
https://github.com/libp2p/go-libp2p/pull/2498 for the official usptream
comment that indicates official support for mplex being moved to this
location.

Co-authored-by: Jason Yellick <jason@enya.ai>
2023-09-29 22:11:13 +02:00
Giulio rebuffo
c1961eff2b
Added the option to directly write blocks on io.Writer. (#8215) 2023-09-17 13:15:06 +02:00
Alex Sharov
3cea1b9b9e
torrent: add --webseeds cli arg (#8176) 2023-09-12 12:18:47 +07:00
Mark Holt
8ea0096d56
moved metrics sub packages types to metrics (#8119)
This is a non functional change which consolidates the various packages
under metrics into the top level package now that the dead code is
removed.

It is a precursor to the removal of Victoria metrics after which all
erigon metrics code will be contained in this single package.
2023-09-03 08:09:27 +07:00
Giulio rebuffo
93cdbae2e5
Caplin<->Erigon: Added Range methods (#8087) 2023-08-29 02:37:30 +02:00
Giulio rebuffo
bd81e15981
Caplin: Implemented SQL beacon indexer (#8043) 2023-08-22 01:24:26 +02:00
Alex Sharov
863a706858
caplin: use tmpdir inside datadir (#8041) 2023-08-20 15:26:34 +02:00
Giulio rebuffo
38db2ed2e7
[Caplin Phase 2]: Initial working implementation (#8033)
caplin just using execution.proto
2023-08-18 15:43:22 +02:00
Giulio rebuffo
c8db11f150
Sentinel: improvements to block download (#8023) 2023-08-16 17:02:30 +02:00
a
521f0df55b
Historical block downloader (#8016) 2023-08-16 04:32:40 +02:00
Giulio rebuffo
de5706dbc6
Direct sentinel instead of over the network sentinel (#8006) 2023-08-12 01:54:45 +02:00
Giulio rebuffo
7c0d6e15bb
Added gnosis fields and removed body gap. (#7993) 2023-08-11 23:07:36 +02:00
Giulio rebuffo
e3a59ed902
Better caplin logging and logic (#7992) 2023-08-10 22:34:58 +02:00
a
db5b348673
Caplin block persistence (#7941)
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-08-09 01:21:19 +02:00
a
3ab373787e
[caplin] extracting beacon state interface (#7910)
we need to extract this interface from the struct. 

i need to also break down the interface more, to better show what parts
the caching is used, move some functions from the cache state to the
underlying.


don't merge
2023-07-20 00:20:33 +02:00
a
19bc41198e
[caplin] conn gater (#7900)
conn gater


so this is what prysm did to address the issue
https://github.com/prysmaticlabs/prysm/pull/8648/files
2023-07-16 08:31:06 +02:00
Andrew Ashikhmin
af504f675a
Use EIP-4844 constants from erigon-lib (#7874)
Small refactoring after
https://github.com/ledgerwatch/erigon-lib/pull/1037
2023-07-11 17:53:00 +02:00
Enrique Jose Avila Asapche
bff1e0e901
[Caplin] Added json rpc cl (#7836)
Allows for Caplin to be used with other ELs from aside of Erigon

---------

Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-07-08 16:42:30 +02:00
a
9fd19338f5
reduce log level (#7835)
some people are getting confused by this log. 

it is not really an error anyways.
2023-07-02 22:37:35 +01:00
Giulio rebuffo
4f812efbc8
Better version of libp2p where losing peers bug fixed (#7726)
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
2023-06-14 13:14:52 +02:00
Enrique Jose Avila Asapche
e380ee4bdd
[Caplin] added configurations for beacon api (#7699)
Now you can configure:

Read timeout (default: 5s)
Write timeout  (default: 5s)
On/off (default: ON)
Port (default:5555)
Address (default:localhost)
Protocol (default: tcp)

#7684
2023-06-11 19:34:33 +02:00
Enrique Jose Avila Asapche
1cb1c303d4
added a listener for beacon api and added get genesis (#7659)
Added two new flags beacon.api.port and beacon.api.addr

Now we can listen for beacon api and get beacon genesis

---------

Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-06-08 09:43:27 +02:00
Giulio rebuffo
e45ed7d139
Added record mode for Caplin (#7660) 2023-06-05 01:52:55 +02:00
a
3c2b99e19c
[caplin] incremental improvements to p2p layer (#7582)
we update observability in the p2p layer for handlers, and also properly
encode error codes, close streams.

---------

Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-05-28 07:54:04 +07:00
Alex Sharov
ead45694ff
torrent-related goroutine leack (#7545)
can't merge - because `torrent` lib dropped go1.19 support
2023-05-26 17:12:47 +07:00
ledgerwatch
b0117a7c30
[devnet] separate logging - p2p (#7547)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-19 18:41:53 +01:00
a
761524a986
eth2 shuffle (#7522)
moves eth2shuffle package to erigon.
2023-05-18 01:06:25 +02:00
Giulio rebuffo
6f758fd0b9
added chiado and gnosis support to caplin (#7523) 2023-05-16 00:47:20 +02:00
Giulio rebuffo
4cbbe65f31
Resp/Req support for Deneb (#7519) 2023-05-15 20:07:27 +02:00
a
cda14447ad
[caplin] pkg refactor (#7507)
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-05-13 23:44:07 +02:00
a
fd6acd4b31
[Caplin] beginnings of instrumentation (#7486)
this pr is ready for review, but it is waiting on this PR 

https://github.com/VictoriaMetrics/metrics/pull/45

so that we do not need to use a replace directive.
2023-05-11 18:38:56 +02:00
Roberto Bayardo
8356f3a320
use ssz from updated erigon-lib (#7490)
ssz/clonable interfaces have been moved to erigon-lib so they can be
shared with the txpool code there
2023-05-11 12:54:20 +01:00
Giulio rebuffo
5b7643c57b
Added dencun networking (#7453) 2023-05-07 01:37:53 +02:00
Giulio rebuffo
9d443dd052
Caplin: fixed dereferencing (#7447) 2023-05-05 13:16:50 +02:00
Giulio rebuffo
43b09a7f55
Refactor of ssz interface (#7439)
Also added a better way to copy and the hasher
2023-05-05 11:19:24 +02:00
a
30430d585a
begin refactor of beacon state (#7433)
this first major move separates the transient beacon state cache from
the underlying tree.

leaf updates are enforced in the setters, which should make programming
easier.

all exported methods of the raw.BeaconState should be safe to call
(without disrupting internal state)

changes many functions to consume *raw.BeaconState in perparation for
interface


beyond refactor it also:

adds a pool for the leaves of the validator ssz hash 

adds a pool for the snappy writers
  
removed the parallel hash experiment (high memory use)
2023-05-04 15:18:42 +02:00
Giulio rebuffo
80d06bc385
Caplin: Fixed sentinel deadlock (#7419) 2023-05-01 23:32:00 +02:00
Giulio rebuffo
250a0a4a65
Caplin: Remotion of bad peers giving us bad blocks (#7411) 2023-04-29 21:32:33 +02:00
Alex Sharov
ded8283df7
erigon backup: v0 of sub-command (#7396) 2023-04-27 10:42:12 +07:00
Giulio rebuffo
01ce968361
Fixed networking issue in Caplin (#7388) 2023-04-26 14:33:21 +01:00