Skip to content

Commit

Permalink
Merge parent and current sync lookups (sigp#5655)
Browse files Browse the repository at this point in the history
* Drop lookup type trait for a simple arg

* Drop reconstructed for processing

* Send parent blocks one by one

* Merge current and parent lookups

* Merge current and parent lookups clean up todos

* Merge current and parent lookups tests

* Merge remote-tracking branch 'origin/unstable' into sync-merged-lookup

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into sync-merged-lookup

* fix compile after merge

* sigp#5655 pr review (sigp#26)

* fix compile after merge

* remove todos, fix typos etc

* fix compile

* stable rng

* delete TODO and unfilled out test

* make download result a struct

* enums instead of bools as params

* fix comment

* Various fixes

* Track ignored child components

* Track dropped lookup reason as metric

* fix test

* add comment describing behavior of avail check error

*  update ordering
  • Loading branch information
dapplion authored and ethDreamer committed May 3, 2024
1 parent d9b79a7 commit 5cca3bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions beacon_node/network/src/sync/block_lookups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
Ok(LookupResult::Completed)
}
}
Ok(())
}

/// Makes progress on the immediate children of `block_root`
Expand Down
11 changes: 11 additions & 0 deletions beacon_node/network/src/sync/block_lookups/single_block_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,3 +505,14 @@ impl<T: Clone> std::fmt::Display for State<T> {
}
}
}

impl LookupRequestError {
pub(crate) fn as_metric(&self) -> &'static str {
match self {
LookupRequestError::TooManyAttempts { .. } => "TooManyAttempts",
LookupRequestError::NoPeers => "NoPeers",
LookupRequestError::SendFailed { .. } => "SendFailed",
LookupRequestError::BadState { .. } => "BadState",
}
}
}

0 comments on commit 5cca3bf

Please sign in to comment.