Commit Graph

5131 Commits

Author SHA1 Message Date
Pawan Dhananjay
ba410c3012
Embed trusted setup in network config (#3851)
* Load trusted setup in network config

* Fix trusted setup serialize and deserialize

* Load trusted setup from hardcoded preset instead of a file

* Truncate after deserialising trusted setup

* Fix beacon node script

* Remove hardcoded setup file

* Add length checks
2023-01-09 12:34:16 +05:30
Michael Sproul
168a7805c3 Add more Gnosis bootnodes (#3855)
## Proposed Changes

Add the latest long-running Gnosis chain bootnodes provided to us by the Gnosis team.
2023-01-09 05:12:31 +00:00
Paul Hauner
026b5afbb9 Allow leading skipped tuple fields 2023-01-09 15:56:17 +11:00
Michael Sproul
87c44697d0
Bump MSRV to 1.65 (#3860) 2023-01-09 14:40:09 +11:00
Michael Sproul
4bd2b777ec Verify execution block hashes during finalized sync (#3794)
## Issue Addressed

Recent discussions with other client devs about optimistic sync have revealed a conceptual issue with the optimisation implemented in #3738. In designing that feature I failed to consider that the execution node checks the `blockHash` of the execution payload before responding with `SYNCING`, and that omitting this check entirely results in a degradation of the full node's validation. A node omitting the `blockHash` checks could be tricked by a supermajority of validators into following an invalid chain, something which is ordinarily impossible.

## Proposed Changes

I've added verification of the `payload.block_hash` in Lighthouse. In case of failure we log a warning and fall back to verifying the payload with the execution client.

I've used our existing dependency on `ethers_core` for RLP support, and a new dependency on Parity's `triehash` crate for the Merkle patricia trie. Although the `triehash` crate is currently unmaintained it seems like our best option at the moment (it is also used by Reth, and requires vastly less boilerplate than Parity's generic `trie-root` library).

Block hash verification is pretty quick, about 500us per block on my machine (mainnet).

The optimistic finalized sync feature can be disabled using `--disable-optimistic-finalized-sync` which forces full verification with the EL.

## Additional Info

This PR also introduces a new dependency on our [`metastruct`](https://github.com/sigp/metastruct) library, which was perfectly suited to the RLP serialization method. There will likely be changes as `metastruct` grows, but I think this is a good way to start dogfooding it.

I took inspiration from some Parity and Reth code while writing this, and have preserved the relevant license headers on the files containing code that was copied and modified.
2023-01-09 03:11:59 +00:00
ethDreamer
11f4784ae6
Added bls_to_execution_changes to PersistedOpPool (#3857)
* Added bls_to_execution_changes to PersistedOpPool
2023-01-09 12:38:02 +11:00
ethDreamer
cb94f639b0
Isolate withdrawals-processing Feature (#3854) 2023-01-09 11:05:28 +11:00
ethDreamer
6b72f45cad
Merge pull request #3845 from realbigsean/capella-cleanup
Capella cleanup
2023-01-06 13:26:41 -06:00
Age Manning
1d9a2022b4 Upgrade to libp2p v0.50.0 (#3764)
I've needed to do this work in order to do some episub testing. 

This version of libp2p has not yet been released, so this is left as a draft for when we wish to update.

Co-authored-by: Diva M <divma@protonmail.com>
2023-01-06 15:59:33 +00:00
realbigsean
33ff84743d
Merge pull request #3848 from emhane/empty_blobs_db
Don't write empty blobs to db
2023-01-06 10:12:02 -05:00
Emilia Hane
c44738c77b
Undo response modification in commit 597363d2f 2023-01-06 12:42:21 +01:00
Emilia Hane
74bca46fc2
Fix bug of early termination of batch send 2023-01-06 11:45:13 +01:00
Emilia Hane
caad492d48
Avoid loading unecessary data 2023-01-06 11:17:26 +01:00
Emilia Hane
88dde8b3bb
Remove accidentally added file 2023-01-06 08:17:39 +01:00
ethDreamer
a7c79ab5a4
Merge pull request #3847 from ethDreamer/capella
Update Execution Layer Tests for Capella
2023-01-05 15:50:26 -06:00
Mark Mackey
2ac609b64e Fixing Moar Failing Tests 2023-01-05 13:00:44 -06:00
Age Manning
4e5e7ee1fc Restructure code for libp2p upgrade (#3850)
Our custom RPC implementation is lagging from the libp2p v50 version. 

We are going to need to change a bunch of function names and would be nice to have consistent ordering of function names inside the handlers. 

This is a precursor to the libp2p upgrade to minimize merge conflicts in function ordering.
2023-01-05 17:18:24 +00:00
Emilia Hane
e9e9fc865b
Cargo clean 2023-01-05 16:28:59 +01:00
Emilia Hane
597363d2f9
Don't send empty blobs sidecar for blobs by range request 2023-01-05 16:28:59 +01:00
Emilia Hane
01ac7ad23c
Return empty blobs sidecar when no kzg commitments in block 2023-01-05 16:28:58 +01:00
Emilia Hane
92c4e99305
Don't write empty blobs to db 2023-01-05 16:28:58 +01:00
Mark Mackey
8711db2f3b Fix EF Tests 2023-01-04 15:14:43 -06:00
realbigsean
8a77b05c19
Merge pull request #3830 from jimmygchen/blobs-beacon-api
Add Beacon API endpoint (/lighthouse) to download blobs by block ID
2023-01-04 09:04:32 -05:00
Jimmy Chen
11e3902dc8 Add support for blobs_sidecar ssz parsing 2023-01-04 18:51:28 +11:00
Mark Mackey
933772dd06
Fixed Operation Pool Tests 2023-01-03 18:40:35 -06:00
Mark Mackey
be232c4587
Update Execution Layer Tests for Capella 2023-01-03 16:58:15 -06:00
realbigsean
e02fcb30ab
dont verify the signature of the genesis block in backfill sync (#3846) 2023-01-03 17:23:01 -05:00
Jimmy Chen
7c2a0aeb58 Merge branch 'blobs-beacon-api' of github.com:jimmygchen/lighthouse into blobs-beacon-api 2023-01-04 01:58:08 +11:00
Jimmy Chen
355cab8704 Simplify blob_sidecar query and remove override for Head and Slot 2023-01-04 01:57:15 +11:00
realbigsean
786d9834f5
sym link clang in cross dockerfile 2023-01-03 09:25:02 -05:00
Jimmy Chen
11736b68d3 Return beacon_chain_error if blob query from BeaconStore returns an error 2023-01-04 01:23:31 +11:00
realbigsean
4353c49855
Update beacon_node/execution_layer/src/engine_api/json_structures.rs 2023-01-03 08:55:19 -05:00
realbigsean
d8f7277beb
cleanup 2022-12-30 11:00:14 -05:00
realbigsean
c4a41e8f55
only use withdrawals-processing in docker build on capella 2022-12-29 11:07:22 -05:00
Pawan Dhananjay
2734f3f9db
Fix devnet3 genesis.ssz.zip 2022-12-29 20:34:25 +05:30
realbigsean
c28c38b044
Merge pull request #3844 from pawanjay176/minor-fixes
Devnet 3 minor fixes
2022-12-29 09:05:00 -05:00
Pawan Dhananjay
e63cf80040
Update c-kzg version 2022-12-29 16:42:48 +05:30
Pawan Dhananjay
c47a0ade22 Fix config values for devnet 3; add more bootnodes 2022-12-29 16:42:26 +05:30
Michael Sproul
222a514506
Merge pull request #3842 from ethDreamer/capella
Merge with `unstable` and fix clippy
2022-12-29 09:35:33 +11:00
Mark Mackey
986ae4360a
Fix clippy complaints 2022-12-28 14:47:16 -06:00
Mark Mackey
c188cde034
merge upstream/unstable 2022-12-28 14:43:25 -06:00
sean
31ba051879 add clang to dockerfile 2022-12-28 18:34:28 +00:00
sean
e94eb1d2d6 Merge branch 'capella' of https://github.com/sigp/lighthouse into eip4844 2022-12-28 18:29:45 +00:00
realbigsean
d34706b044
Merge pull request #3840 from realbigsean/blob-renamings-and-cleanup
Blob cleanup (renames, remove , wrap BlockWrapper enum)
2022-12-28 13:28:36 -05:00
sean
40c6daa34b add pawan's suggestsion 2022-12-28 18:27:21 +00:00
realbigsean
6e73965450
Merge pull request #3841 from realbigsean/docker-eip4844
create automatic docker build for eip4844
2022-12-28 11:12:37 -05:00
realbigsean
6d85930520
create automatic docker build for eip4844 2022-12-28 11:11:17 -05:00
realbigsean
019467840f
Merge pull request #3833 from realbigsean/empty-blobs
Empty blobs validation
2022-12-28 10:32:06 -05:00
realbigsean
8a70d80a2f
Revert "Revert "renames, remove , wrap BlockWrapper enum to make descontruction private""
This reverts commit 1931a442dc.
2022-12-28 10:31:18 -05:00
realbigsean
1931a442dc
Revert "renames, remove , wrap BlockWrapper enum to make descontruction private"
This reverts commit 5b3b34a9d7.
2022-12-28 10:30:36 -05:00