Giulio rebuffo
d4a2298998
Added GC optimization to the ssz list object ( #7488 )
2023-05-11 01:02:23 +02:00
a
37da9ec1e3
[caplin] ssz byteobjects ( #7454 )
...
instead of converting from ssz -> struct -> ssz, it may be better to
just stay as ssz, then use methods to read the data.
this pr explores this concept, while maintaining compatiblity with the
existing codebase.
2023-05-10 21:37:50 +02:00
Enrique Jose Avila Asapche
4f56247610
made KZGCommitment constant and SSZ compatiable ( #7465 )
...
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-05-10 14:40:19 +07:00
Andrew Ashikhmin
771c6fc202
Rename Serenity consensus engine to Merge ( #7475 )
...
[EIP-2982](https://eips.ethereum.org/EIPS/eip-2982 ) "Serenity Phase 0"
was superseded by [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675 )
"Upgrade consensus to Proof-of-Stake"
2023-05-09 18:45:33 +01:00
Giulio rebuffo
5b7643c57b
Added dencun networking ( #7453 )
2023-05-07 01:37:53 +02:00
Enrique Jose Avila Asapche
fbd18516ae
Deneb container changes beacon-chain ( #7420 )
...
Adding container changes for Deneb:
https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/beacon-chain.md
Changed to use pointers for BlobSideCar
#7389
2023-05-06 18:50:58 +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
a
9644e6d220
Implement SpecTests in native go, add fork_choice handler ( #7422 )
...
a few TODO: remain to make this not a draft
---------
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-05-02 16:19:22 +02:00
Enrique Jose Avila Asapche
f363eb1026
adding deneb p2p containers ( #7401 )
...
This PR adds the new p2p containers from Deneb into Caplin
#7389
2023-04-29 21:35:33 +02:00
Giulio rebuffo
250a0a4a65
Caplin: Remotion of bad peers giving us bad blocks ( #7411 )
2023-04-29 21:32:33 +02:00
Giulio rebuffo
01ce968361
Fixed networking issue in Caplin ( #7388 )
2023-04-26 14:33:21 +01: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
Andrew Ashikhmin
2a356babfe
Update TestMainnetFork to Capella fork ID ( #7309 )
2023-04-13 15:09:13 +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
cd2c5fe0fd
sepolia url fix
2023-04-04 11:42:12 +07:00
Alex Sharov
a8e8bf4528
remove simd lib, because it doesn't work with ghcr.io/goreleaser/goreleaser-cross (which producing release binaries) ( #7229 )
...
@shyba hi, seems this lib doesn't work with
ghcr.io/goreleaser/goreleaser-cross (which producing release binaries)
removing it for now, feel free to add it in future - if can make it work
with goreleaser-cross
see: https://github.com/ledgerwatch/erigon/issues/7210
2023-03-31 05:07:43 +00:00
Peter Davies
e912ae01d8
cl: Update checkpoint sync endpoints ( #7223 )
...
I have replaced the `ethdevops.io` endpoints with `ethpandaops.io`. The
Sepolia endpoint was failing with `no such host` and the checkpoint sync
documentation shows `ethpandaops.io` to be the official source for EF
checkpoint sync endpoints.
2023-03-30 20:59:12 +00:00
Giulio rebuffo
ab3a1d2ce5
Remove propagation of lightclient updates ( #7192 )
2023-03-27 22:42:40 +00:00
Giulio rebuffo
628f52dd6c
Added reverse beacon changeset for beacon state rewind ( #7185 )
...
Added changesets for beacon chain to implement memory efficient fork
choice
2023-03-26 22:25:08 +00:00
Andrew Ashikhmin
4a1c61a031
Schedule mainnet Shapella. Fix BellatrixForkEpoch ( #7145 )
...
See https://github.com/ethereum/execution-specs/pull/727 . Also,
`BellatrixForkEpoch` should be 144896, not 144869: refer to [the
spec](https://github.com/ethereum/consensus-specs/blob/dev/specs/bellatrix/fork.md ).
2023-03-20 12:01:35 +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
432e5d7ad2
Error handling to beacon chain gossip ( #7132 )
2023-03-18 17:15:59 +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
Alex Sharov
157a380be7
e3: history no auto-increment ( #7097 )
2023-03-15 08:03:57 +00:00
Victor Shyba
158fb2b606
Optimize memory buffer, simplify set32, use sha256-simd ( #7060 )
...
Hi,
I'm syncing Gnosis on a Celeron N5100 to get familiar with the codebase.
In the process I managed to optimize some things from profiling.
Since I'm not yet on the project Discord, I decided to open this PR as a
suggestion. This pass all tests here and gave me a nice boost for that
platform, although I didn't have time to benchmark it yet.
* reuse VM Memory objects with sync.Pool. It starts with 4k as `evmone`
[code
suggested](0897edb001/lib/evmone/execution_state.hpp (L49)
)
as a good value.
* set32 simplification: mostly cosmetic
* sha256-simd: Celeron has SHA instructions. We should probably do the
same for torrent later, but this already helped as it is very CPU bound
on such a low end processor. Maybe that helps ARM as well.
2023-03-14 07:17:04 +00:00
Giulio rebuffo
bc546c72da
Added hard fork transition support to Erigon-CL. ( #7088 )
2023-03-13 12:10:36 +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
9167429a75
Added phase0 support to Erigon-CL. ( #7066 )
...
Added phase 0 support.
2023-03-11 19:27:21 +00:00
Alex Sharov
81c7936df4
sentry: handle "retry later" grpc stream ( #6852 )
2023-03-10 05:28:25 +00:00
Giulio rebuffo
7f6d1c9575
Added SSZ support for Phase0 state. ( #7065 )
2023-03-09 17:34:49 +00:00
Giulio rebuffo
231b57bd21
Added pending attestation object. ( #7058 )
2023-03-08 22:30:41 +00:00
Giulio rebuffo
e6ba82ca0b
Added Capella specs support to Erigon-CL ( #7051 )
...
Passing consensus-specs tests for Capella. Processing of withdrawals and
ExecutionChanges. efficient non-validation implemented. Refactored:
ExecutionPayload/ExecutionPayloadHeader.
2023-03-07 21:57:18 +00:00
Giulio rebuffo
aadf56376f
Passing operations consensus tests. ( #7018 )
2023-03-03 22:52:33 +00:00
Andrew Ashikhmin
e3906130ae
Rename SHARDING_FORK to DENEB_FORK ( #7014 )
...
See https://github.com/eth-clients/goerli/pull/160
2023-03-03 14:51:57 +00:00
Andrew Ashikhmin
aa9b9bdd1c
Schedule Shapella on Görli/Prater ( #7012 )
...
See https://github.com/ethereum/execution-specs/pull/724 &
https://github.com/eth-clients/goerli/pull/160
2023-03-03 13:27:36 +00:00
alex.sharov
85df06ca26
remove zstd dependency
2023-03-01 12:57:15 +07:00
Giulio rebuffo
f97550c48f
Fixed capella startup for LC ( #6989 )
2023-02-28 21:17:10 +00:00
Giulio rebuffo
edcd271f72
Added capella SSZ tests ( #6965 )
2023-02-27 23:33:10 +00:00
Giulio rebuffo
b51b293f14
faster rewards and penalties processing ( #6958 )
2023-02-25 21:51:30 +00:00
Giulio rebuffo
cfa8dd8657
Fixed sanity consensus tests for slots processing ( #6949 )
2023-02-24 21:07:32 +00:00
Giulio rebuffo
4525db6a9c
Fixed lightclient regression ( #6946 )
2023-02-24 15:11:50 +00:00
Andrew Ashikhmin
54593d934c
Don't use embedded CL by default for Gnosis ( #6918 )
...
Only Nimbus peers support light clients, and there's not enough Nimbus
peers on Gnosis.
2023-02-21 18:36:25 +00:00
Andrew Ashikhmin
67de38f097
Schedule Capella on Sepolia ( #6920 )
...
See https://github.com/eth-clients/sepolia/pull/30
2023-02-21 14:57:35 +00:00
Philippe Schommers
55091456a7
feat: add Gnosis and Chiado to CL ( #6788 )
...
This adds the Gnosis and Chiado configs to the CL. I'm sure there's
other things missing too. Any pointers would be appreciated!
Currently stuck on:
```
INFO[02-06|14:00:01.421] [Checkpoint Sync] Requesting beacon state uri=https://checkpoint.gnosis.gateway.fm/eth/v2/debug/beacon/states/finalized
INFO[02-06|14:00:02.846] [Checkpoint Sync] Retrieving lightclient bootstrap from sentinel root=6cd2f0f4018d7ca17c9bfaf69f7eb46706b5a9b3356b9686aa71ae15a11c47e4
```
2023-02-16 19:40:50 +00:00
Giulio rebuffo
60a3aa71e3
Fixed epoch processing consensus tests ( #6887 )
2023-02-16 19:04:16 +00:00
Giulio rebuffo
3c069f7cbd
added static peers flag ( #6884 )
2023-02-15 17:56:10 +00:00
Giulio rebuffo
7c43cb532c
~2x Optimization to state root computation ( #6854 )
...
Most notably use of more than a single thread. there is still potential
for me but there are more important things for now to work on.
2023-02-12 21:26:31 +00:00
Giulio rebuffo
885ed781fd
added better tests to epoch transitions ( #6838 )
2023-02-10 23:53:05 +00:00
Giulio rebuffo
4e950db56e
added processing of historical roots ( #6823 )
2023-02-10 01:09:05 +01:00
Giulio rebuffo
64ddd9f60e
Added reward/penalties processing ( #6819 )
2023-02-09 17:48:52 +01:00
Giulio rebuffo
a585ae4894
Added Optimizations to Beacon state transition. ( #6792 )
2023-02-07 17:44:37 +01:00
Philippe Schommers
9e93914998
test: fix clparams config test ( #6790 )
...
Was only testing `MainnetNetwork` repeatedly before.
2023-02-07 18:32:23 +07: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
Giulio rebuffo
3748a6af97
Added processing for deposits ( #6746 )
2023-01-30 18:55:57 +01:00
Giulio rebuffo
1436060fd8
added sync aggregate method for processing ( #6740 )
2023-01-30 14:39:56 +01:00
Giulio rebuffo
ff21ef7b21
Added checkpoints and justification bits processing (post-altair) ( #6699 )
...
* Added processing of checkpoints
* Unit tests rigorously imported from prysm
* They all pass :)
2023-01-26 00:31:20 +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
8dda3614e6
Added beacon state capella support ( #6673 )
2023-01-23 14:26:57 +01:00
Giulio rebuffo
eda4471d95
Fixed inconsistencies ( #6670 )
2023-01-23 12:04:50 +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
Giulio rebuffo
9503672194
Separation of SSZ Beacon State and Fix BeaconRpc ( #6635 )
2023-01-20 20:41:16 +01: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
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
Mike Neuder
01ce83ad99
ProcessAttesterSlashing ( #6581 )
...
Spec:
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#attester-slashings
Part of https://github.com/ledgerwatch/erigon/issues/5965
2023-01-15 12:05:51 +01:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib ( #6536 )
2023-01-13 18:12:18 +00:00
Alex Sharov
41e9356f61
e3: stream.ToBitamp() ( #6562 )
2023-01-12 09:58:21 +07:00
Giulio rebuffo
4bee05dd12
Added ETH1 Block SSZ Hashing to CL ( #6549 )
...
more of SSZ again.
2023-01-11 17:18:14 +01:00
Alex Sharov
7c2ed8e01f
mdbx: v0.12.3 ( #6521 )
2023-01-10 09:15:18 +07:00
Giulio rebuffo
599480c5e0
ExecutionPayloaHeader: ssz support for withdrawals root ( #6524 )
...
I do not recommend this.
2023-01-09 01:04: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
4932aa5264
added indexes to beacon blocks ( #6460 )
2022-12-29 15:15:25 +01:00
Giulio rebuffo
80b5954c3c
fixed encoding for slot > 17 million ( #6451 )
2022-12-28 02:29:24 +01:00
Giulio rebuffo
cf7e0e292c
Compact Attestations final form ( #6446 )
2022-12-27 17:22:52 +01:00
Giulio rebuffo
9006804ac0
Fast/compact attestations encoding, prototype 1 ( #6442 )
2022-12-26 19:23:55 +01:00
Giulio rebuffo
fa55cf8efe
Added full backfilling routine with support with Phase0/Altair and Bellatrix + Consensus Layer Database Schema Prototype ( #6435 )
...
This PR Adds:
* Backfilling routine, downloads and write to db all historical blocks.
* Prototype of first attempt at Database schema for Historical blocks.
* Fixed minor bugs.
* Support for following forks: Phase0, Altair, Bellatrix.
2022-12-25 18:07:12 +01:00
Mike Neuder
aa9b30a656
Implement ProcessRandao ( #6425 )
...
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#randao
Part of https://github.com/ledgerwatch/erigon/issues/5965
2022-12-24 19:39:39 +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
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
0a3bfef484
Added prototype for Beacon history reconstruction stage ( #6351 )
2022-12-17 16:05:56 +01:00
Andrew Ashikhmin
1e206e375b
Set default for externalcl based on whether embedded CL is supported ( #6294 )
...
Embedded CL is not supported for Gnosis Chain, so it makes sense to set
`externalcl` to true by default for it.
Also, this PR sets `terminalTotalDifficultyPassed` for Gnosis Chain &
Chiado (see https://docs.gnosischain.com/updates/20221210-merge ).
2022-12-13 14:51:13 +01:00
Giulio rebuffo
1c8a11df40
Added dirty leaves system to beacon state ( #6264 )
2022-12-09 19:19:01 +01:00
Giulio rebuffo
ecf34b2493
Proper Beacon State Repressentation attempt ( #6254 )
2022-12-09 00:55:31 +01:00
Giulio rebuffo
0da12e4c94
Verification by root and not by slot ( #6243 )
2022-12-07 21:26:45 +01:00
Andrew Ashikhmin
7eab12d90d
Shanghai & Cancun forks should be based on timestamp ( #6238 )
2022-12-07 18:45:44 +01:00
Giulio rebuffo
6e76643c09
Added Handshake protocol to Erigon-CL Lightclient and Fullclient ( #6206 )
2022-12-05 01:25:12 +01:00
Giulio rebuffo
1fd3a01edf
Added Consensus Layer staged sync ( #6183 )
2022-12-03 03:16:26 +01:00
Giulio rebuffo
ae6d00747e
removed debug util now not necessary ( #6149 )
2022-11-29 09:46:52 +01:00
Giulio rebuffo
025839afd5
moved out protobuffers for sentinel ( #6145 )
2022-11-29 00:00:40 +01:00
Giulio rebuffo
8c67c55cc7
Created Erigon beacon downloader ( #6130 )
2022-11-25 16:38:22 +01:00
Giulio rebuffo
f8916e9226
Made Lightclient default ( #5813 )
...
lightclient cl is default, for external cl, run `--externalcl`
2022-11-10 17:06:04 +00: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
Mike Neuder
5c5094ae6a
Adding BeaconBlocksByRoot req to consensus layer RPC ( #5968 )
...
https://github.com/ledgerwatch/erigon/issues/5884 .
Follows up on https://github.com/ledgerwatch/erigon/pull/5967 to
implement the by root request as well.
2022-11-06 23:41:21 +01:00
Mike Neuder
bc7128e671
Adding BeaconBlocksByRangeReq to consensus layer RPC ( #5967 )
...
part of https://github.com/ledgerwatch/erigon/issues/5884 . we have
tested this manually, but need to include it in the CL client RPC layer.
2022-11-05 19:39:24 +01:00
Mike Neuder
75db1aae0b
Add support for beacon_blocks_by_root on the req/resp domain ( #5951 )
...
Continuation of https://github.com/ledgerwatch/erigon/issues/5884
We make use of
bb09295072/beacon-chain/p2p/types/types.go
from Prysm to construct our request because the generated code injects
an offset that is not included in the spec.
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#beaconblocksbyroot
2022-11-04 17:34:36 +01:00
Giulio rebuffo
63a8b21bb8
switch BLS library ( #5950 )
2022-11-03 23:55:59 +01:00
Mike Neuder
5518e69005
Finish BeaconBlocksByRange decoder ( #5943 )
...
issue: https://github.com/ledgerwatch/erigon/issues/5884
this PR finishes the decoding of BeaconBlocksByRange responses.
`stream_test.go` now checks two sample ranges, of length 2 and 3
respectively (avoiding doing super long ranges to keep the files
relatively smaller).
https://beaconcha.in/slot/5000007 is the source i used to verify the
decoded data.
2022-11-03 19:04:49 +01:00
Mike Neuder
7590411ffc
BeaconBlocksByRange req/resp domain encoding work. ( #5917 )
...
I am trying to decode these messages from the req/resp domain. see
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#beaconblocksbyrange
for the spec.
this is part of https://github.com/ledgerwatch/erigon/issues/5884
2022-11-02 15:48:22 +01:00
Giulio rebuffo
adf5fc7b82
refactored files regarding lightclient ( #5904 )
2022-10-29 21:51:32 +02:00