Commit Graph

54 Commits

Author SHA1 Message Date
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
Giulio rebuffo
f44b22f066
Shangai Compatible embedded CL lightclient (#6688)
* LightClientHeader: Capella
* Added versions to lightclient
* TODO: Capella->Bellatrix transition
2023-01-24 17:36:02 +01:00
Giulio rebuffo
635fe0cb21
Added custom chain flags to embedded consensus lightclient (#6674) 2023-01-24 00:03:48 +01:00
Giulio rebuffo
20a4ae4ffb
added support for Capella beacon blocks (#6665) 2023-01-22 23:39:23 +01:00
Giulio rebuffo
f1dd51ccb3
Added Historical Summary and FromBlsToExecution (#6658)
Added Capella specific Data types.
2023-01-22 11:48:17 +01:00
Giulio rebuffo
0eebd61ab8
separation of state: a continuation (#6647) 2023-01-21 22:33:50 +01:00
Alex Sharov
b71725ecb3
e3: reverse/limited iterators, stream tooling (#6637) 2023-01-20 18:08:20 +07:00
Giulio rebuffo
3f07c66928
Fast gossip routine for Sentinel. (#6614)
removed bunch of ugly repetitive routines.
2023-01-18 14:30:39 +01:00
Giulio rebuffo
df89a76304
fixed concurenncy panics for gossip service (#6607) 2023-01-17 19:41:22 +00:00
Giulio rebuffo
4e53a12c53
Flexible Blocks and States for easy hard forking (#6566)
Preparation for Shangai Beacon Blocks/Beacon State
2023-01-17 02:22:05 +01:00
Giulio rebuffo
77d946ba3e
[First PR] Removing FastSSZ and use more efficient hashing with gohashtree (#6520) 2023-01-07 12:25:28 +01:00
Giulio rebuffo
f6c25de4d2
Added EL <-> CL integration (#6483) 2023-01-04 03:02:24 +01:00
Giulio rebuffo
d2bda25b29
Added Beacon RPC as a wrapper for Sentinel (#6424) 2022-12-23 22:31:08 +01:00
Giulio rebuffo
f655e337d1
Added signed block abstraction (Phase0 & Altair & Bellatrix block support) (#6422) 2022-12-23 18:39:44 +01:00
Giulio rebuffo
5fd3536ef0
Erigon-cl database schema (#6399) 2022-12-22 19:59:24 +01:00
Giulio rebuffo
173d11c43c
removed retry logic from Erigon-CL (#6389) 2022-12-20 22:11:08 +01:00
Giulio rebuffo
bae56ff119
Backfilling is now smooth and does not get stuck (#6374) 2022-12-19 22:40:34 +01:00
Giulio rebuffo
ed2c79d2ca
fixed backfilling algo (#6364) 2022-12-18 23:28:30 +01:00
Giulio rebuffo
e640cea7d0
no CPU implosion when using sentinel (#6361) 2022-12-18 18:57:30 +01:00
Giulio rebuffo
0da12e4c94
Verification by root and not by slot (#6243) 2022-12-07 21:26:45 +01:00
Giulio rebuffo
6e76643c09
Added Handshake protocol to Erigon-CL Lightclient and Fullclient (#6206) 2022-12-05 01:25:12 +01:00
Håvard Anda Estensen
099fb7c627
Grow string builders (#6192)
Strings builders have a buffer (slice) that can be pre-allocated
2022-12-04 10:51:20 +07:00
Giulio rebuffo
1fd3a01edf
Added Consensus Layer staged sync (#6183) 2022-12-03 03:16:26 +01:00
Giulio rebuffo
cea51685fe
attempt at fixing lightclient performance leaks (#6169) 2022-12-02 00:21:33 +01:00
Giulio rebuffo
025839afd5
moved out protobuffers for sentinel (#6145) 2022-11-29 00:00:40 +01:00
Giulio rebuffo
05be20b70b
smol refactor of lightclient CI + logs demotion (#6144) 2022-11-28 23:29:48 +01:00
Giulio rebuffo
8c67c55cc7
Created Erigon beacon downloader (#6130) 2022-11-25 16:38:22 +01:00
Alex Sharov
a0d2d585b8
sentinel: add logs prefix (#6124) 2022-11-24 21:29:51 +07:00
Giulio rebuffo
d745b39df9
skip connection to private IPs (#6093)
Addresses #6079
2022-11-20 22:41:11 +01:00
Mike Neuder
45938124f5
WIP sync from checkpoint (#6042)
https://github.com/ledgerwatch/erigon/issues/5965. This PR starts the
implementation of syncing from a checkpoint to head.

Co-authored-by: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com>
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
Co-authored-by: Giulio rebuffo <giulio.rebuffo@gmail.com>
Co-authored-by: Nebojsa Urosevic <nebojsa94@users.noreply.github.com>
Co-authored-by: Mark Shields <4237425+beejiujitsu@users.noreply.github.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Enrique Jose  Avila Asapche <eavilaasapche@gmail.com>
Co-authored-by: Nathan (Blaise) Bruer <thegreatall@gmail.com>
Co-authored-by: lupin012 <58134934+lupin012@users.noreply.github.com>
Co-authored-by: Philippe Schommers <philippe@schommers.be>
2022-11-20 18:44:42 +01:00
Giulio rebuffo
487ea4e5f3
Refactored Lightclient prefix system (#6092) 2022-11-20 17:16:30 +01:00
Giulio rebuffo
5c5c19aa4c
added basic lightclient stream handlers (#6085) 2022-11-20 14:23:51 +01:00
Giulio rebuffo
7ea8de4a3f
added checkpoint saving (#6060) 2022-11-16 16:19:40 +01:00
Giulio rebuffo
3a2d3be080
Added persistence in LightClient (#6056) 2022-11-15 20:39:18 +01:00
Andrew Ashikhmin
32629bdce4
Upgrade urfave/cli to v2 (#6047)
See also
https://github.com/urfave/cli/blob/main/docs/migrate-v1-to-v2.md
2022-11-14 17:33:57 +01:00
Giulio rebuffo
ae01026ca9
Customizable networking for Erigon Lightclient (#6032) 2022-11-11 23:22:47 +01:00
Mike Neuder
bf34bed004
Adding GetStatus to the req/resp domain (#6010)
Part of https://github.com/ledgerwatch/erigon/issues/5884 defined in the
spec
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#status.

We need this functionality to continue
https://github.com/ledgerwatch/erigon/issues/5965 because we need to
determine how many blocks to request from the checkpoint block.
2022-11-10 14:14:26 +01:00