Compare commits

..

101 Commits

Author SHA1 Message Date
realbigsean
d137881614 Update beacon_node/beacon_chain/src/attestation_verification.rs 2024-06-21 13:13:07 -04:00
realbigsean
68fd7a7881 Update beacon_node/beacon_chain/src/attestation_verification.rs 2024-06-21 13:09:56 -04:00
realbigsean
cf030d0a8a Merge pull request #5975 from michaelsproul/electra-slasher-no-migration
Avoid changing slasher schema for Electra
2024-06-21 11:25:01 -04:00
realbigsean
5517c78102 Merge pull request #5980 from dapplion/electra-lightclient
Add electra lightclient types
2024-06-21 11:24:33 -04:00
realbigsean
8fc533368c fix imports 2024-06-21 10:57:35 -04:00
realbigsean
09141ec51a Update slasher/src/database.rs 2024-06-21 10:48:43 -04:00
dapplion
8715589e40 Add electra lightclient types 2024-06-21 14:50:03 +02:00
Lion - dapplion
70a80d5da0 Update database.rs 2024-06-21 09:48:35 +02:00
Michael Sproul
339d1b8229 Fix compilation of beacon_chain tests 2024-06-21 17:36:45 +10:00
Michael Sproul
13b1b05960 Fix clippy 2024-06-21 17:03:06 +10:00
Michael Sproul
ebbb17b6bc Delete slasher schema v4 2024-06-21 14:21:36 +10:00
Michael Sproul
b6913ae542 Avoid changing slasher schema for Electra 2024-06-21 14:21:36 +10:00
realbigsean
27ed90e4dc Electra attestation changes sean review (#5972)
* instantiate empty bitlist in unreachable code

* clean up error conversion

* fork enabled bool cleanup

* remove a couple todos

* return bools instead of options in `aggregate` and use the result

* delete commented out code

* use map macros in simple transformations

* remove signers_disjoint_from

* get ef tests compiling

* get ef tests compiling

* update intentionally excluded files
2024-06-21 14:20:10 +10:00
realbigsean
efb8a01e91 Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes 2024-06-20 09:36:56 -04:00
Eitan Seri-Levi
f85a124362 Electra attestation changes from Lions review (#5971)
* dedup/cleanup and remove unneeded hashset use

* remove irrelevant TODOs
2024-06-20 09:36:43 -04:00
dapplion
0e2add2daa Fork aware ssz static attestation tests 2024-06-20 09:58:53 +02:00
realbigsean
381bbaba94 ensure aggregate and proof uses serde untagged on ref 2024-06-19 17:04:47 -04:00
realbigsean
afb9122cc1 update default persisted op pool deserialization 2024-06-19 15:00:33 -04:00
realbigsean
6e4483288a Merge pull request #5940 from dapplion/electra_attestation_changes_lionreview
Electra attestations #5712 review
2024-06-19 13:52:19 -04:00
realbigsean
3977b92c49 remove dup method get_indexed_attestation_from_committees 2024-06-19 13:45:47 -04:00
dapplion
d67270f899 committees are sorted 2024-06-19 12:59:27 +02:00
dapplion
a8d8989c05 Use ok_or instead of if let else 2024-06-19 12:50:41 +02:00
dapplion
9e6e76fb89 Remove get_indexed_attestation_from_signed_aggregate 2024-06-19 12:47:38 +02:00
dapplion
70a2d4de10 Use electra_enabled in pubsub 2024-06-19 11:43:41 +02:00
dapplion
cbb7c5d8f4 Test spec invariant 2024-06-19 11:39:45 +02:00
dapplion
370d511223 Fix beacon_chain tests 2024-06-19 11:31:51 +02:00
dapplion
4d4c268e1e Remove stale TODO 2024-06-19 11:31:51 +02:00
dapplion
7fce143300 Resolve into_attestation_and_indices todo 2024-06-19 11:31:50 +02:00
dapplion
4d3edfeaed Use Ord for ForkName in pubsub 2024-06-19 11:31:50 +02:00
dapplion
7521f97ca5 Diff reduction 2024-06-19 11:31:50 +02:00
dapplion
d26473621a Fix beacon_chain tests 2024-06-19 11:31:50 +02:00
dapplion
444cd625ef Diff reduction in tests 2024-06-19 11:31:50 +02:00
dapplion
6f0b78426a Dedup Attestation constructor code 2024-06-19 11:31:50 +02:00
dapplion
6a4d842376 Use if let Ok for committee_bits 2024-06-19 11:31:50 +02:00
dapplion
dec7cff9c7 Dedup attestation constructor logic in attester cache 2024-06-19 11:31:50 +02:00
Lion - dapplion
2634a1f1a6 Update common/eth2/src/types.rs
Co-authored-by: ethDreamer <37123614+ethDreamer@users.noreply.github.com>
2024-06-19 11:31:50 +02:00
Eitan Seri-Levi
7af3f2eb35 add electra fork enabled fn to ForkName impl (#36)
* add electra fork enabled fn to ForkName impl

* remove inadvertent file
2024-06-19 11:31:50 +02:00
realbigsean
9e84779522 Indexed att on disk (#35)
* indexed att on disk

* fix lints

* Update slasher/src/migrate.rs

Co-authored-by: ethDreamer <37123614+ethDreamer@users.noreply.github.com>

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: ethDreamer <37123614+ethDreamer@users.noreply.github.com>
2024-06-19 11:31:50 +02:00
dapplion
45d007a71f Add PendingAttestationInElectra 2024-06-19 11:31:50 +02:00
dapplion
5070ab254d Drop TestRandom impl 2024-06-19 11:31:50 +02:00
dapplion
f0492852f3 Remove IndexedAttestation faulty Decode impl 2024-06-19 11:31:50 +02:00
dapplion
4f08f6e0da Remove TestRandom impl for IndexedAttestation 2024-06-19 11:31:50 +02:00
dapplion
5acc0523df Make to_electra not fallible 2024-06-19 11:31:50 +02:00
dapplion
1d0e3f4d30 Use ForkName Ord in BeaconBlockBody 2024-06-19 11:31:50 +02:00
dapplion
960f8c5c48 Use ForkName Ord in fork-choice tests 2024-06-19 11:31:50 +02:00
dapplion
795eff9bf4 Remove outdated TODO 2024-06-19 11:31:50 +02:00
dapplion
3ec21a2435 Dedup match_attestation_data 2024-06-19 11:31:50 +02:00
dapplion
dd0d5e2d93 Remove unwraps in Attestation construction 2024-06-19 11:31:50 +02:00
dapplion
d87541c045 De-dup attestation constructor logic 2024-06-19 11:31:50 +02:00
realbigsean
9a01b6b363 Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes 2024-06-17 15:08:36 -04:00
Michael Sproul
3ac3ddb2b7 Clean up Electra observed aggregates (#5929)
* Use consistent key in observed_attestations

* Remove unwraps from observed aggregates
2024-06-17 10:23:02 -04:00
Michael Sproul
c4f2284dbe Small cleanup in slasher tests 2024-06-14 12:50:18 +10:00
Michael Sproul
d5aa2d8dfe Merge remote-tracking branch 'origin/unstable' into electra_attestation_changes 2024-06-14 12:32:47 +10:00
Michael Sproul
d7f3c9583e Update superstruct to 0.8 2024-06-14 12:32:20 +10:00
Pawan Dhananjay
35e07eb0a9 Fix slasher tests (#5906)
* Fix electra tests

* Add electra attestations to double vote tests
2024-06-14 12:27:36 +10:00
realbigsean
b21b1086f1 fix compile 2024-06-13 16:40:52 -04:00
realbigsean
77c630bc2e Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes 2024-06-13 14:45:49 -04:00
ethDreamer
f9d354539a Remove Duplicate KZG Commitment Merkle Proof Code (#5874)
* Remove Duplicate KZG Commitment Merkle Proof Code

* s/tree_lists/fields/
2024-06-01 12:51:00 -04:00
realbigsean
29ed1c5c26 add consolidations to merkle calc for inclusion proof 2024-05-31 08:49:35 -04:00
realbigsean
49de63f792 Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes 2024-05-31 08:49:04 -04:00
realbigsean
b61d244c0c fix some todos (#5817) 2024-05-30 11:52:38 -04:00
Eitan Seri-Levi
e340998241 Fix failing attestation tests and misc electra attestation cleanup (#5810)
* - get attestation related beacon chain tests to pass
- observed attestations are now keyed off of data + committee index
- rename op pool attestationref to compactattestationref
- remove unwraps in agg pool and use options instead
- cherry pick some changes from ef-tests-electra

* cargo fmt

* fix failing test

* Revert dockerfile changes

* make committee_index return option

* function args shouldnt be a ref to attestation ref

* fmt

* fix dup imports

---------

Co-authored-by: realbigsean <seananderson33@GMAIL.com>
2024-05-30 11:51:34 -04:00
ethDreamer
75432e1135 Electra attestation changes rm decode impl (#5856)
* Remove Crappy Decode impl for Attestation

* Remove Inefficient Attestation Decode impl

* Implement Schema Upgrade / Downgrade

* Update beacon_node/beacon_chain/src/schema_change/migration_schema_v20.rs

Co-authored-by: Michael Sproul <micsproul@gmail.com>

---------

Co-authored-by: Michael Sproul <micsproul@gmail.com>
2024-05-30 11:34:14 -04:00
realbigsean
3e10e68c1d Merge pull request #5816 from realbigsean/electra-attestation-slashing-handling
Electra slashing handling
2024-05-24 10:53:26 -04:00
realbigsean
3f169ef17a Merge pull request #5835 from realbigsean/fix-validator-logic
Fix validator logic
2024-05-24 10:52:32 -04:00
realbigsean
469296b665 Merge pull request #5832 from ethDreamer/electra_attestation_changes_merge_unstable
Merge `unstable` into `electra_attestation_changes`
2024-05-24 10:52:12 -04:00
Mark Mackey
bb734afa1d just one more check bro plz.. 2024-05-24 10:50:11 -04:00
Mark Mackey
154b7a7b8a Publish all aggregates 2024-05-24 10:50:04 -04:00
Pawan Dhananjay
82858bc04e Send unagg attestation based on fork 2024-05-24 10:49:53 -04:00
Mark Mackey
987abe07f9 Merge remote-tracking branch 'upstream/unstable' 2024-05-24 13:24:37 +02:00
realbigsean
bafb5f0cc0 fix slashing handling 2024-05-20 14:14:41 -04:00
realbigsean
a8088f1bfa cargo fmt 2024-05-15 03:00:12 -04:00
Eitan Seri-Levi
79a5f2556f Subscribe to the correct subnets for electra attestations (#5782)
* subscribe to the correct att subnets for electra

* subscribe to the correct att subnets for electra
2024-05-15 03:00:09 -04:00
ethDreamer
3b1fb0ad81 Fix Electra Fork Choice Tests (#5764) 2024-05-12 12:24:19 +03:00
realbigsean
e1dcfb6960 update committee offset 2024-05-10 21:15:21 -04:00
realbigsean
7926afeb18 Merge pull request #5749 from sigp/electra_op_pool
Optimise Electra op pool aggregation
2024-05-10 12:08:34 -04:00
Michael Sproul
72548cb54e Fix assert 2024-05-10 12:49:15 +10:00
Michael Sproul
16265ef455 Add comment to max cover optimisation 2024-05-10 12:44:18 +10:00
Michael Sproul
437e8516cd Fix bugs in cross-committee aggregation 2024-05-10 12:29:57 +10:00
realbigsean
e4485570f2 update the naive agg pool interface (#5760) 2024-05-09 21:29:31 -04:00
Eitan Seri-Levi
411fcee2ac Compute on chain aggregate impl (#5752)
* add compute_on_chain_agg impl to op pool changes

* fmt

* get op pool tests to pass
2024-05-10 10:56:20 +10:00
realbigsean
b807d39bad Merge branch 'electra_attestation_changes' of https://github.com/sigp/lighthouse into electra_op_pool 2024-05-09 18:18:01 -04:00
ethDreamer
ca0967119b Revert "Get electra_op_pool up to date (#5756)" (#5757)
This reverts commit ab9e58aa3d.
2024-05-09 17:10:04 -05:00
ethDreamer
ab9e58aa3d Get electra_op_pool up to date (#5756)
* fix get attesting indices (#5742)

* fix get attesting indices

* better errors

* fix compile

* only get committee index once

* Ef test fixes (#5753)

* attestation related ef test fixes

* delete commented out stuff

* Fix Aggregation Pool for Electra (#5754)

* Fix Aggregation Pool for Electra

* Remove Outdated Interface

* fix ssz (#5755)

---------

Co-authored-by: realbigsean <sean@sigmaprime.io>
2024-05-09 16:59:39 -05:00
realbigsean
c30f70906b fix ssz (#5755) 2024-05-09 17:49:12 -04:00
ethDreamer
cb8c8f59cf Fix Aggregation Pool for Electra (#5754)
* Fix Aggregation Pool for Electra

* Remove Outdated Interface
2024-05-09 15:50:11 -04:00
realbigsean
07229b76ed Ef test fixes (#5753)
* attestation related ef test fixes

* delete commented out stuff
2024-05-09 13:40:52 -04:00
realbigsean
e32dfcdcad fix get attesting indices (#5742)
* fix get attesting indices

* better errors

* fix compile

* only get committee index once
2024-05-09 09:34:56 -04:00
Michael Sproul
7cb7653d36 Sketch op pool changes 2024-05-09 17:45:52 +10:00
ethDreamer
43c3f63e30 cargo fmt (#5740) 2024-05-08 11:53:08 -05:00
ethDreamer
f30246b9d4 Some small changes (#5739) 2024-05-08 11:40:08 -05:00
Eitan Seri-Levi
90179d4a88 EIP7549 get_attestation_indices (#5657)
* get attesting indices electra impl

* fmt

* get tests to pass

* fmt

* fix some beacon chain tests

* fmt

* fix slasher test

* fmt got me again

* fix more tests

* fix tests
2024-05-08 11:32:44 -05:00
realbigsean
2c2e44c4ed Merge pull request #5726 from realbigsean/electra_attestation_changes
Merge unstable into Electra attestation changes
2024-05-06 18:04:59 -04:00
realbigsean
38382a3ca1 cargo fmt 2024-05-06 17:32:25 -04:00
realbigsean
9f6de8e5d7 Merge remote-tracking branch 'sigp/unstable' into electra_attestation_changes 2024-05-06 17:26:43 -04:00
ethDreamer
19a9479234 Superstruct AggregateAndProof (#5715)
* Upgrade `superstruct` to `0.8.0`

* superstruct `AggregateAndProof`
2024-05-06 10:09:22 -05:00
ethDreamer
7c6526d978 Finish EF Test Fork Agnostic (#5714) 2024-05-03 14:09:49 -05:00
ethDreamer
9b98f4e297 Make EF Tests Fork-Agnostic (#5713) 2024-05-03 13:57:01 -05:00
Mark Mackey
3a41e137d1 Merge remote-tracking branch 'upstream/unstable' into electra_attestation_changes 2024-05-02 18:23:32 -05:00
ethDreamer
e6c7f145dd superstruct the AttesterSlashing (#5636)
* `superstruct` Attester Fork Variants

* Push a little further

* Deal with Encode / Decode of AttesterSlashing

* not so sure about this..

* Stop Encode/Decode Bounds from Propagating Out

* Tons of Changes..

* More Conversions to AttestationRef

* Add AsReference trait (#15)

* Add AsReference trait

* Fix some snafus

* Got it Compiling! :D

* Got Tests Building

* Get beacon chain tests compiling

---------

Co-authored-by: Michael Sproul <micsproul@gmail.com>
2024-05-02 18:00:21 -05:00
Eitan Seri-Levi
3b7132bc0d Attestation superstruct changes for EIP 7549 (#5644)
* update

* experiment

* superstruct changes

* revert

* superstruct changes

* fix tests

* indexed attestation

* indexed attestation superstruct

* updated TODOs
2024-04-30 11:49:08 -05:00
8 changed files with 16 additions and 118 deletions

View File

@@ -34,7 +34,6 @@ pub const ETH_SYNCING_TIMEOUT: Duration = Duration::from_secs(1);
pub const ENGINE_NEW_PAYLOAD_V1: &str = "engine_newPayloadV1"; pub const ENGINE_NEW_PAYLOAD_V1: &str = "engine_newPayloadV1";
pub const ENGINE_NEW_PAYLOAD_V2: &str = "engine_newPayloadV2"; pub const ENGINE_NEW_PAYLOAD_V2: &str = "engine_newPayloadV2";
pub const ENGINE_NEW_PAYLOAD_V3: &str = "engine_newPayloadV3"; pub const ENGINE_NEW_PAYLOAD_V3: &str = "engine_newPayloadV3";
pub const ENGINE_NEW_PAYLOAD_WITH_WITNESS_V3: &str = "engine_newPayloadV3";
pub const ENGINE_NEW_PAYLOAD_TIMEOUT: Duration = Duration::from_secs(8); pub const ENGINE_NEW_PAYLOAD_TIMEOUT: Duration = Duration::from_secs(8);
pub const ENGINE_GET_PAYLOAD_V1: &str = "engine_getPayloadV1"; pub const ENGINE_GET_PAYLOAD_V1: &str = "engine_getPayloadV1";
@@ -67,7 +66,6 @@ pub static LIGHTHOUSE_CAPABILITIES: &[&str] = &[
ENGINE_NEW_PAYLOAD_V1, ENGINE_NEW_PAYLOAD_V1,
ENGINE_NEW_PAYLOAD_V2, ENGINE_NEW_PAYLOAD_V2,
ENGINE_NEW_PAYLOAD_V3, ENGINE_NEW_PAYLOAD_V3,
ENGINE_NEW_PAYLOAD_WITH_WITNESS_V3,
ENGINE_GET_PAYLOAD_V1, ENGINE_GET_PAYLOAD_V1,
ENGINE_GET_PAYLOAD_V2, ENGINE_GET_PAYLOAD_V2,
ENGINE_GET_PAYLOAD_V3, ENGINE_GET_PAYLOAD_V3,
@@ -853,27 +851,6 @@ impl HttpJsonRpc {
Ok(response.into()) Ok(response.into())
} }
pub async fn new_payload_with_witness_v3<E: EthSpec>(
&self,
new_payload_request_deneb: NewPayloadRequestDeneb<'_, E>,
) -> Result<JsonPayloadStatusWithWitnessV1, Error> {
let params = json!([
JsonExecutionPayload::V3(new_payload_request_deneb.execution_payload.clone().into()),
new_payload_request_deneb.versioned_hashes,
new_payload_request_deneb.parent_beacon_block_root,
]);
let response: JsonPayloadStatusWithWitnessV1 = self
.rpc_request(
ENGINE_NEW_PAYLOAD_WITH_WITNESS_V3,
params,
ENGINE_NEW_PAYLOAD_TIMEOUT * self.execution_timeout_multiplier,
)
.await?;
Ok(response)
}
pub async fn get_payload_v1<E: EthSpec>( pub async fn get_payload_v1<E: EthSpec>(
&self, &self,
payload_id: PayloadId, payload_id: PayloadId,

View File

@@ -786,46 +786,3 @@ impl TryFrom<JsonClientVersionV1> for ClientVersionV1 {
}) })
} }
} }
/*
// statelessWitnessV1 is the witness data necessary to execute an ExecutableData
// without any local data being present.
var statelessWitnessV1 = {
headers: ["0xhrlp1", "0xhrlp2", ...],
codes: ["0xcode1", "0xcode2", ...],
state: ["0xnode1", "0xnode2", ...]
}
// statelessPayloadStatusV1 is the result of a stateless payload execution.
var statelessPayloadStatusV1 = {
status: "same as payloadStatusV1.status",
stateRoot: "0x0000000000000000000000000000000000000000000000000000000000000000",
receiptsRoot: "0x0000000000000000000000000000000000000000000000000000000000000000",
validationError: "same as payloadStatusV1.validationError",
}
*/
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct JsonStatelessWitnessV1 {
headers: Vec<serde_json::Value>,
codes: Vec<serde_json::Value>,
state: Vec<serde_json::Value>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct JsonStatelessPayloadStatusV1 {
status: JsonPayloadStatusV1Status,
state_root: ExecutionBlockHash,
receipts_root: ExecutionBlockHash,
validation_error: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct JsonPayloadStatusWithWitnessV1 {
#[serde(flatten)]
payload_status: JsonPayloadStatusV1,
witness: JsonStatelessWitnessV1,
}

View File

@@ -146,19 +146,8 @@ For more information on historic state storage see the
To manually specify a checkpoint use the following two flags: To manually specify a checkpoint use the following two flags:
* `--checkpoint-state`: accepts an SSZ-encoded `BeaconState` file * `--checkpoint-state`: accepts an SSZ-encoded `BeaconState` blob
* `--checkpoint-block`: accepts an SSZ-encoded `SignedBeaconBlock` file * `--checkpoint-block`: accepts an SSZ-encoded `SignedBeaconBlock` blob
* `--checkpoint-blobs`: accepts an SSZ-encoded `Blobs` file
The command is as following:
```bash
curl -H "Accept: application/octet-stream" "http://localhost:5052/eth/v2/debug/beacon/states/$SLOT" > state.ssz
curl -H "Accept: application/octet-stream" "http://localhost:5052/eth/v2/beacon/blocks/$SLOT" > block.ssz
curl -H "Accept: application/octet-stream" "http://localhost:5052/eth/v1/beacon/blob_sidecars/$SLOT" > blobs.ssz
```
where `$SLOT` is the slot number. It can be specified as `head` or `finalized` as well.
_Both_ the state and block must be provided and the state **must** match the block. The _Both_ the state and block must be provided and the state **must** match the block. The
state may be from the same slot as the block (unadvanced), or advanced to an epoch boundary, state may be from the same slot as the block (unadvanced), or advanced to an epoch boundary,

View File

@@ -16,7 +16,6 @@ validator client or the slasher**.
| Lighthouse version | Release date | Schema version | Downgrade available? | | Lighthouse version | Release date | Schema version | Downgrade available? |
|--------------------|--------------|----------------|----------------------| |--------------------|--------------|----------------|----------------------|
| v5.2.0 | Jun 2024 | v19 | yes before Deneb |
| v5.1.0 | Mar 2024 | v19 | yes before Deneb | | v5.1.0 | Mar 2024 | v19 | yes before Deneb |
| v5.0.0 | Feb 2024 | v19 | yes before Deneb | | v5.0.0 | Feb 2024 | v19 | yes before Deneb |
| v4.6.0 | Dec 2023 | v19 | yes before Deneb | | v4.6.0 | Dec 2023 | v19 | yes before Deneb |

View File

@@ -15,7 +15,6 @@
- [My beacon node logs `WARN Error signalling fork choice waiter`, what should I do?](#bn-fork-choice) - [My beacon node logs `WARN Error signalling fork choice waiter`, what should I do?](#bn-fork-choice)
- [My beacon node logs `ERRO Aggregate attestation queue full`, what should I do?](#bn-queue-full) - [My beacon node logs `ERRO Aggregate attestation queue full`, what should I do?](#bn-queue-full)
- [My beacon node logs `WARN Failed to finalize deposit cache`, what should I do?](#bn-deposit-cache) - [My beacon node logs `WARN Failed to finalize deposit cache`, what should I do?](#bn-deposit-cache)
- [My beacon node logs `WARN Could not verify blob sidecar for gossip`, what does it mean?](#bn-blob)
## [Validator](#validator-1) ## [Validator](#validator-1)
@@ -215,16 +214,6 @@ This suggests that the computer resources are being overwhelmed. It could be due
This is a known [bug](https://github.com/sigp/lighthouse/issues/3707) that will fix by itself. This is a known [bug](https://github.com/sigp/lighthouse/issues/3707) that will fix by itself.
### <a name="bn-blob"></a> My beacon node logs `WARN Could not verify blob sidecar for gossip`, what does it mean?
An example of the full log is shown below:
```text
Jun 07 23:05:12.170 WARN Could not verify blob sidecar for gossip. Ignoring the blob sidecar, commitment: 0xaa97…6f54, index: 1, root: 0x93b8…c47c, slot: 9248017, error: PastFinalizedSlot { blob_slot: Slot(9248017), finalized_slot: Slot(9248032) }, module: network::network_beacon_processor::gossip_methods:720
```
The `PastFinalizedSlot` indicates that the time at which the node received the blob has past the finalization period. This could be due to a peer sending an earlier blob. The log will be gone when Lighthouse eventually drops the peer.
## Validator ## Validator
### <a name="vc-activation"></a> Why does it take so long for a validator to be activated? ### <a name="vc-activation"></a> Why does it take so long for a validator to be activated?
@@ -338,24 +327,13 @@ The first thing is to ensure both consensus and execution clients are synced wit
You can see more information on the [Ethstaker KB](https://ethstaker.gitbook.io/ethstaker-knowledge-base/help/missed-attestations). You can see more information on the [Ethstaker KB](https://ethstaker.gitbook.io/ethstaker-knowledge-base/help/missed-attestations).
Another cause for missing attestations is the block arriving late, or there are delays during block processing. Another cause for missing attestations is delays during block processing. When this happens, the debug logs will show (debug logs can be found under `$datadir/beacon/logs`):
An example of the log: (debug logs can be found under `$datadir/beacon/logs`):
```text ```text
Delayed head block, set_as_head_time_ms: 27, imported_time_ms: 168, attestable_delay_ms: 4209, available_delay_ms: 4186, execution_time_ms: 201, blob_delay_ms: 3815, observed_delay_ms: 3984, total_delay_ms: 4381, slot: 1886014, proposer_index: 733, block_root: 0xa7390baac88d50f1cbb5ad81691915f6402385a12521a670bbbd4cd5f8bf3934, service: beacon, module: beacon_chain::canonical_head:1441 DEBG Delayed head block set_as_head_delay: Some(93.579425ms), imported_delay: Some(1.460405278s), observed_delay: Some(2.540811921s), block_delay: 4.094796624s, slot: 6837344, proposer_index: 211108, block_root: 0x2c52231c0a5a117401f5231585de8aa5dd963bc7cbc00c544e681342eedd1700, service: beacon
``` ```
The field to look for is `attestable_delay`, which defines the time when a block is ready for the validator to attest. If the `attestable_delay` is greater than 4s which has past the window of attestation, the attestation wil fail. In the above example, the delay is mostly caused by late block observed by the node, as shown in `observed_delay`. The `observed_delay` is determined mostly by the proposer and partly by your networking setup (e.g., how long it took for the node to receive the block). Ideally, `observed_delay` should be less than 3 seconds. In this example, the validator failed to attest the block due to the block arriving late. The fields to look for are `imported_delay > 1s` and `observed_delay < 3s`. The `imported_delay` is how long the node took to process the block. The `imported_delay` of larger than 1 second suggests that there is slowness in processing the block. It could be due to high CPU usage, high I/O disk usage or the clients are doing some background maintenance processes. The `observed_delay` is determined mostly by the proposer and partly by your networking setup (e.g., how long it took for the node to receive the block). The `observed_delay` of less than 3 seconds means that the block is not arriving late from the block proposer. Combining the above, this implies that the validator should have been able to attest to the block, but failed due to slowness in the node processing the block.
Another example of log:
```
DEBG Delayed head block, set_as_head_time_ms: 22, imported_time_ms: 312, attestable_delay_ms: 7052, available_delay_ms: 6874, execution_time_ms: 4694, blob_delay_ms: 2159, observed_delay_ms: 2179, total_delay_ms: 7209, slot: 1885922, proposer_index: 606896, block_root: 0x9966df24d24e722d7133068186f0caa098428696e9f441ac416d0aca70cc0a23, service: beacon, module: beacon_chain::canonical_head:1441
/159.69.68.247/tcp/9000, service: libp2p, module: lighthouse_network::service:1811
```
In this example, we see that the `execution_time_ms` is 4694ms. The `execution_time_ms` is how long the node took to process the block. The `execution_time_ms` of larger than 1 second suggests that there is slowness in processing the block. If the `execution_time_ms` is high, it could be due to high CPU usage, high I/O disk usage or the clients are doing some background maintenance processes.
### <a name="vc-head-vote"></a> Sometimes I miss the attestation head vote, resulting in penalty. Is this normal? ### <a name="vc-head-vote"></a> Sometimes I miss the attestation head vote, resulting in penalty. Is this normal?
@@ -536,23 +514,21 @@ If you would still like to subscribe to all subnets, you can use the flag `subsc
### <a name="net-quic"></a> How to know how many of my peers are connected via QUIC? ### <a name="net-quic"></a> How to know how many of my peers are connected via QUIC?
With `--metrics` enabled in the beacon node, the [Grafana Network dashboard](https://github.com/sigp/lighthouse-metrics/blob/master/dashboards/Network.json) displays the connected by transport, which will show the number of peers connected via QUIC. With `--metrics` enabled in the beacon node, you can find the number of peers connected via QUIC using:
Alternatively, you can find the number of peers connected via QUIC manually using:
```bash ```bash
curl -s "http://localhost:5054/metrics" | grep 'transport="quic"' curl -s "http://localhost:5054/metrics" | grep libp2p_quic_peers
``` ```
A response example is: A response example is:
```text ```text
libp2p_peers_multi{direction="inbound",transport="quic"} 27 # HELP libp2p_quic_peers Count of libp2p peers currently connected via QUIC
libp2p_peers_multi{direction="none",transport="quic"} 0 # TYPE libp2p_quic_peers gauge
libp2p_peers_multi{direction="outbound",transport="quic"} 9 libp2p_quic_peers 4
``` ```
which shows that there are a total of 36 peers connected via QUIC. which shows that there are 4 peers connected via QUIC.
## Miscellaneous ## Miscellaneous

View File

@@ -114,13 +114,13 @@ changed after initialization.
* Flag: `--slasher-max-db-size GIGABYTES` * Flag: `--slasher-max-db-size GIGABYTES`
* Argument: maximum size of the database in gigabytes * Argument: maximum size of the database in gigabytes
* Default: 512 GB * Default: 256 GB
Both database backends LMDB and MDBX place a hard limit on the size of the database Both database backends LMDB and MDBX place a hard limit on the size of the database
file. You can use the `--slasher-max-db-size` flag to set this limit. It can be adjusted after file. You can use the `--slasher-max-db-size` flag to set this limit. It can be adjusted after
initialization if the limit is reached. initialization if the limit is reached.
By default the limit is set to accommodate the default history length and around 1 million validators but By default the limit is set to accommodate the default history length and around 600K validators (with about 30% headroom) but
you can set it lower if running with a reduced history length. The space required scales you can set it lower if running with a reduced history length. The space required scales
approximately linearly in validator count and history length, i.e. if you halve either you can halve approximately linearly in validator count and history length, i.e. if you halve either you can halve
the space required. the space required.

View File

@@ -75,7 +75,7 @@ Once you have the slashing protection database from your existing client, you ca
using this command: using this command:
```bash ```bash
lighthouse account validator slashing-protection import filename.json lighthouse account validator slashing-protection import <my_interchange.json>
``` ```
When importing an interchange file, you still need to import the validator keystores themselves When importing an interchange file, you still need to import the validator keystores themselves
@@ -86,7 +86,7 @@ separately, using the instructions for [import validator keys](./mainnet-validat
You can export Lighthouse's database for use with another client with this command: You can export Lighthouse's database for use with another client with this command:
``` ```
lighthouse account validator slashing-protection export filename.json lighthouse account validator slashing-protection export <lighthouse_interchange.json>
``` ```
The validator client needs to be stopped in order to export, to guarantee that the data exported is The validator client needs to be stopped in order to export, to guarantee that the data exported is

View File

@@ -11,7 +11,7 @@ pub const DEFAULT_VALIDATOR_CHUNK_SIZE: usize = 256;
pub const DEFAULT_HISTORY_LENGTH: usize = 4096; pub const DEFAULT_HISTORY_LENGTH: usize = 4096;
pub const DEFAULT_UPDATE_PERIOD: u64 = 12; pub const DEFAULT_UPDATE_PERIOD: u64 = 12;
pub const DEFAULT_SLOT_OFFSET: f64 = 10.5; pub const DEFAULT_SLOT_OFFSET: f64 = 10.5;
pub const DEFAULT_MAX_DB_SIZE: usize = 512 * 1024; // 512 GiB pub const DEFAULT_MAX_DB_SIZE: usize = 256 * 1024; // 256 GiB
pub const DEFAULT_ATTESTATION_ROOT_CACHE_SIZE: NonZeroUsize = new_non_zero_usize(100_000); pub const DEFAULT_ATTESTATION_ROOT_CACHE_SIZE: NonZeroUsize = new_non_zero_usize(100_000);
pub const DEFAULT_BROADCAST: bool = false; pub const DEFAULT_BROADCAST: bool = false;