Commit Graph

90 Commits

Author SHA1 Message Date
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
Alex Sharov
e1f549ff01
cli: use SplitAndTrim instead of strgings.Split(",") (#7369) 2023-04-23 10:54:55 +07:00
Giulio rebuffo
515aedda7b
Added Caplin Phase 1 (#7290)
* Introduces full beacon validation
* Removes light client
* NOTE: slow on purpose, I want everything to be BLS verified for now.
2023-04-17 18:06:50 +00:00
Giulio rebuffo
c1cf58ef93
Added forkchoice rule (#7281)
Added fork choice rule to Erigon-CL
2023-04-08 01:01:10 +00:00
Alex Sharov
6339a3c9d1
remove lru package alias (#7251) 2023-04-04 04:02:23 +00:00
Giulio rebuffo
2f482b8789
Fork-choice graph oriented implementation (#7212) 2023-03-29 16:16:45 +00:00
Giulio rebuffo
ab3a1d2ce5
Remove propagation of lightclient updates (#7192) 2023-03-27 22:42:40 +00:00
Giulio rebuffo
540af96ef7
removed --el.enabled (#7187) 2023-03-27 10:12:31 +00:00
Giulio rebuffo
97e17678ca
fixed fork consensus spec test (#7143) 2023-03-20 15:25:52 +00:00
Giulio rebuffo
6005bdd8b2
removed stream handler (#7142) 2023-03-19 23:15:34 +00:00
Giulio rebuffo
fb00d714b5
added tests for ssz_static in consensus tests and fixed beacon blocks encoding (#7141) 2023-03-19 22:47:27 +00:00
Giulio rebuffo
b129a9415e
Update go deps (#7138) 2023-03-19 20:13:53 +00:00
Giulio rebuffo
fc10aef874
removed database functionality from lightclient (#7135) 2023-03-18 20:27:37 +00:00
Giulio rebuffo
35a0ba571d
Banning peers sending bad gossip (#7134) 2023-03-18 19:45:53 +00:00
Giulio rebuffo
77a8cf9d5b
refactored sentinel gossip and only connect to nimbus now (#7127) 2023-03-17 21:51:19 +00:00
Giulio rebuffo
36828fbb08
Added tool for processing for all mainnet beacon blocks (#7095) 2023-03-17 12:37:51 +00:00
Giulio rebuffo
dbf1225cb2
Added partial SSZ library (#7083)
Implements SSZ encode/decoding and hashtreeroot for simple list-lacking
data structures. does not account offset case.
2023-03-12 14:41:53 +00:00
Giulio rebuffo
d6ba1b65c8
Added removeStreamHandler again (#6996) 2023-03-02 14:22:03 +00:00
Alex Sharov
d6d142c4b0
switch sentinel to lru/v2 generic cache (#6990) 2023-03-01 08:00:46 +00:00
Giulio rebuffo
f97550c48f
Fixed capella startup for LC (#6989) 2023-02-28 21:17:10 +00:00
Roberto Bayardo
f01e3d1717
handle nil update return values without panic (#6941)
Saw this when trying to sync goerli today:


```
INFO[02-23|11:10:20.611] [2/15 Headers] Waiting for Consensus Layer...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x14a58dd]

goroutine 11484998 [running]:
github.com/ledgerwatch/erigon/cl/cltypes.(*LightClientOptimisticUpdate).EncodingSizeSSZ(0x0)
        github.com/ledgerwatch/erigon/cl/cltypes/lightclient.go:620 +0x1d
github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/communication/ssz_snappy.EncodeAndWrite({0x77f6a74bc058?, 0xc03912b100?}, {0x2c2f628, 0x0}, {0xc022ad9f
5c, 0x1, 0x1})
        github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/communication/ssz_snappy/encoding.go:34 +0xae
github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/handlers.(*ConsensusHandlers).lightClientOptimisticUpdateHandler(0xc021f0d500, {0x2c57c28, 0xc03912b100
})
        github.com/ledgerwatch/erigon/cmd/sentinel/sentinel/handlers/lightclient.go:82 +0x19d
github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).SetStreamHandler.func1({0xc085e0fa90, 0x42}, {0x77f6a74bbfe8?, 0xc03912b100})
        github.com/libp2p/go-libp2p@v0.25.1/p2p/host/basic/basic_host.go:580 +0x76
created by github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).newStreamHandler
        github.com/libp2p/go-libp2p@v0.25.1/p2p/host/basic/basic_host.go:421 +0x74f

```
2023-02-27 10:00:49 +00:00
Giulio rebuffo
4525db6a9c
Fixed lightclient regression (#6946) 2023-02-24 15:11:50 +00:00
Giulio rebuffo
3c069f7cbd
added static peers flag (#6884) 2023-02-15 17:56:10 +00:00
Alex Sharov
999899d66d
e3: read files list from db (#6833) 2023-02-13 05:17:01 +00:00
Alex Sharov
d5bb42453a
Update lib-p2p to support golang 1.20 (#6848) 2023-02-12 11:23:33 +00:00
ledgerwatch
ee83447fa1
CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829)
… startup

---------

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-02-11 20:44:51 +00:00
Giulio rebuffo
f7e58a7964
added separable lightclient (#6800)
How to run:
Erigon flags needed: --private.api.addr <ADDR> --externalcl
Lightclient flags needed: --private.api.addr <ADDR>
2023-02-08 00:06:07 +01:00
Giulio rebuffo
c92b858888
Cleaned up and optimized proposer index retriaval. (#6799) 2023-02-07 20:14:04 +01:00
Alex Sharov
4cae1b94e9
switch sentinel to native go errors (#6782) 2023-02-06 10:15:52 +07:00
Giulio rebuffo
ee4c8ed3bd
Added working slot processing. (#6779) 2023-02-05 21:53:59 +01:00
Alex Sharov
aaec53857f
e3: last reader to close/remove merged files (marked as canDelete) inside tx.Rollback() (#6738) 2023-02-01 15:44:13 +07:00
Giulio rebuffo
72fa9b7f26
implemented gossip service hard fork transition (#6692) 2023-01-25 00:01:30 +01:00