Commit Graph

5703 Commits

Author SHA1 Message Date
Michael Sproul
826e748629 Prepare CI for merge queues (#4252)
* Prepare CI for merge queues

* Fix syntax SNAFUs
2023-05-02 01:59:51 +00:00
Eitan Seri-Levi
f1c64d119a remove withdrawal warning (#4207)
## Issue Addressed

[#4196](https://github.com/sigp/lighthouse/issues/4196).

## Proposed Changes

Remove withdrawal warning since we are post shapella upgrade

## Additional Info
2023-05-01 08:22:40 +00:00
Eitan Seri-Levi
11103d6289 Logfile no restrict help text for windows (#4165)
## Issue Addressed

[#4162](https://github.com/sigp/lighthouse/issues/4162)

## Proposed Changes

update `--logfile-no-restricted-perms` flag help text to indicate that, for Windows users, the file permissions are inherited from the parent folder

## Additional Info

N/A
2023-05-01 08:22:39 +00:00
Ricki Moore
aaf1e4b1ab Feat: lighthouse book - ui authentication (#4232)
## Proposed Changes

Added page explanation for authentication under Siren UI book.

## Additional Info

Please provide any additional information. For example, future considerations
or information useful for reviewers.
2023-05-01 02:15:57 +00:00
realbigsean
93bcd6281c some bug fixes and the start of deneb only tests 2023-04-28 15:56:54 -04:00
realbigsean
bfb5242ee3 start fixing up lookup verify error handling 2023-04-28 09:54:09 -04:00
Michael Sproul
c11638c36c Split common crates out into their own repos (#3890)
## Proposed Changes

Split out several crates which now exist in separate repos under `sigp`.

- [`ssz` and `ssz_derive`](https://github.com/sigp/ethereum_ssz)
- [`tree_hash` and `tree_hash_derive`](https://github.com/sigp/tree_hash)
- [`ethereum_hashing`](https://github.com/sigp/ethereum_hashing)
- [`ethereum_serde_utils`](https://github.com/sigp/ethereum_serde_utils)
- [`ssz_types`](https://github.com/sigp/ssz_types)

For the published crates see: https://crates.io/teams/github:sigp:crates-io?sort=recent-updates.

## Additional Info

- [x] Need to work out how to handle versioning. I was hoping to do 1.0 versions of several crates, but if they depend on `ethereum-types 0.x` that is not going to work. EDIT: decided to go with 0.5.x versions.
- [x] Need to port several changes from `tree-states`, `capella`, `eip4844` branches to the external repos.
2023-04-28 01:15:40 +00:00
realbigsean
a9b24bb9df add random blobs 2023-04-27 17:39:52 -04:00
realbigsean
185b7615a2 fix compile after merge 2023-04-27 14:30:07 -04:00
realbigsean
eadf293419 Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into some-blob-reprocessing-work 2023-04-27 14:19:42 -04:00
ethDreamer
c1d47da02d Update engine_api to latest version (#4223)
* Update Engine API to Latest

* Get Mock EE Working

* Fix Mock EE

* Update Engine API Again

* Rip out get_blobs_bundle Stuff

* Fix Test Harness

* Fix Clippy Complaints

* Fix Beacon Chain Tests
2023-04-27 14:18:21 -04:00
realbigsean
d224fce084 wrap availability check error 2023-04-27 14:15:52 -04:00
realbigsean
8e9c98e8e5 make tests into macros 2023-04-27 13:02:53 -04:00
realbigsean
f2267212a5 refactor lookup tests to work with multiple forks and response types 2023-04-27 12:04:34 -04:00
realbigsean
7614abf6df fix 2023-04-26 17:55:21 -04:00
realbigsean
3c9fb78aa1 compilation fix in beacon chain tests 2023-04-26 17:28:24 -04:00
realbigsean
2cad638f41 cargo fmt 2023-04-26 16:33:08 -04:00
realbigsean
0978848caa Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into some-blob-reprocessing-work 2023-04-26 14:59:48 -04:00
Justin Traglia
aa34339298 Rename to MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS (#4206)
Co-authored-by: realbigsean <sean@sigmaprime.io>
2023-04-26 14:53:06 -04:00
realbigsean
d850788278 fix after merge 2023-04-26 14:48:50 -04:00
realbigsean
13f7217172 Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into some-blob-reprocessing-work 2023-04-26 14:45:50 -04:00
realbigsean
69e5e00350 renamings 2023-04-26 14:45:07 -04:00
realbigsean
4390036887 fix existing block lookup tests 2023-04-26 14:44:32 -04:00
Pawan Dhananjay
cbe4880490 Fix deneb doppelganger tests (#4124)
* Temp hack to compile

* Fix doppelganger tests

* Kill in groups instead of storing pid

* Install geth in CI

* Install geth first

* Fix eth1_block_hash

* Fix directory paths and block hash

* Fix workflow for local testnets; reset genesis.json after running script

* Disable capella and deneb forks for doppelganger tests

* oops not capella

* Spin up a spare bn for the doppelganger validator

* testing

* Revert "testing"

This reverts commit 14eb178bca.

* Modify beacon_node script to take trusted peers

* Set doppelganger bn as a trusted peer

* Update var

* update another

* Fix port

* Add a flag to disable peer scoring

* Disable peer scoring in local testnet bn script

* Revert trusted peers hack

* fmt

* Fix proposer boost score
2023-04-26 13:26:00 -04:00
realbigsean
46a9b3a7ed fix lints 2023-04-26 12:15:02 -04:00
realbigsean
83c3ee173f fix lints 2023-04-26 12:05:07 -04:00
realbigsean
ff58698375 fix compile in lookup tests 2023-04-26 11:49:54 -04:00
Pawan Dhananjay
a632969695 Gossip verification cleanup (#4219)
* Add ObservedBlobSidecar tests

* Add logging for tricky verification cases

* Update beacon_node/beacon_chain/src/blob_verification.rs

---------

Co-authored-by: realbigsean <seananderson33@GMAIL.com>
2023-04-26 10:44:58 -04:00
Age Manning
7456e1e8fa Separate BN for block proposals (#4182)
It is a well-known fact that IP addresses for beacon nodes used by specific validators can be de-anonymized. There is an assumed risk that a malicious user may attempt to DOS validators when producing blocks to prevent chain growth/liveness.

Although there are a number of ideas put forward to address this, there a few simple approaches we can take to mitigate this risk.

Currently, a Lighthouse user is able to set a number of beacon-nodes that their validator client can connect to. If one beacon node is taken offline, it can fallback to another. Different beacon nodes can use VPNs or rotate IPs in order to mask their IPs.

This PR provides an additional setup option which further mitigates attacks of this kind.

This PR introduces a CLI flag --proposer-only to the beacon node. Setting this flag will configure the beacon node to run with minimal peers and crucially will not subscribe to subnets or sync committees. Therefore nodes of this kind should not be identified as nodes connected to validators of any kind.

It also introduces a CLI flag --proposer-nodes to the validator client. Users can then provide a number of beacon nodes (which may or may not run the --proposer-only flag) that the Validator client will use for block production and propagation only. If these nodes fail, the validator client will fallback to the default list of beacon nodes.

Users are then able to set up a number of beacon nodes dedicated to block proposals (which are unlikely to be identified as validator nodes) and point their validator clients to produce blocks on these nodes and attest on other beacon nodes. An attack attempting to prevent liveness on the eth2 network would then need to preemptively find and attack the proposer nodes which is significantly more difficult than the default setup.

This is a follow on from: #3328 

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
Co-authored-by: Paul Hauner <paul@paulhauner.com>
2023-04-26 01:12:36 +00:00
int88
90d562b3d4 add attestation inclusion distance in http api (#4148)
## Issue Addressed

#4097

## Proposed Changes

Add attestation inclusion distance in http api, extend `/lighthouse/ui/validator_metrics` to include it.

## Usage
```
curl -X POST "http://localhost:8001/lighthouse/ui/validator_metrics" -d '{"indices": [1]}' -H "Content-Type: application/json" | jq
```

```
{
  "data": {
    "validators": {
      "1": {
        "attestation_hits": 3,
        "attestation_misses": 1,
        "attestation_hit_percentage": 75,
        "attestation_head_hits": 3,
        "attestation_head_misses": 0,
        "attestation_head_hit_percentage": 100,
        "attestation_target_hits": 3,
        "attestation_target_misses": 0,
        "attestation_target_hit_percentage": 100,
        "attestation_inclusion_distance": 1
      }
    }
  }
}
```

## Additional Info

NA
2023-04-26 01:12:35 +00:00
realbigsean
14e5bfae29 fix lints 2023-04-25 18:12:16 -04:00
realbigsean
b5440f740d fix lints 2023-04-25 09:30:16 -04:00
realbigsean
9c2aceed10 fix some todos 2023-04-25 09:25:24 -04:00
realbigsean
53c0356f8d smol bugfix 2023-04-24 21:10:52 -04:00
realbigsean
b8708e38de processing peer refactor 2023-04-24 20:47:02 -04:00
realbigsean
91594adc77 refactor single block processed method 2023-04-24 20:15:45 -04:00
realbigsean
76c09dea21 drop parent lookup if either req has a peer disconnect during download 2023-04-24 19:00:21 -04:00
realbigsean
1d18756303 improve retry code 2023-04-24 18:56:19 -04:00
realbigsean
0560b7d1a5 improve peer scoring during certain failures in parent lookups 2023-04-24 16:58:13 -04:00
realbigsean
274aba95c7 consolidate retry error handling 2023-04-24 15:05:49 -04:00
realbigsean
b6531aa1b1 should remove lookup refactor 2023-04-24 13:04:44 -04:00
realbigsean
381044abe7 add peer usefulness enum 2023-04-24 12:27:49 -04:00
realbigsean
93df0f50e6 fix up sync manager delay message logic 2023-04-24 11:09:14 -04:00
realbigsean
03de817abe Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into some-blob-reprocessing-work 2023-04-24 09:03:58 -04:00
realbigsean
cbe2e47931 update blobs by range protocol name (#4229) 2023-04-24 09:03:23 -04:00
realbigsean
269122f2e6 Merge branch 'some-blob-reprocessing-work' of https://github.com/realbigsean/lighthouse into some-blob-reprocessing-work 2023-04-22 09:23:42 -04:00
realbigsean
b2a4c4e73e Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into some-blob-reprocessing-work 2023-04-22 09:23:01 -04:00
Pawan Dhananjay
7a36d004e4 Subscribe blob topics (#4224) 2023-04-22 09:21:09 -04:00
Pawan Dhananjay
d8ed81182b revert red/stevie changes 2023-04-21 15:49:42 -07:00
Pawan Dhananjay
b6c0e91c05 Merge branch 'eip4844' into deneb-free-blobs 2023-04-21 14:34:50 -07:00