mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-05 05:44:30 +00:00
Optimisations relating to get_expected_withdrawals (#9314)
Tweaking/optimising `get_expected_withdrawals` on the pre-Gloas path, after the removal of some optimisations in: - https://github.com/sigp/lighthouse/pull/9102 - Remove `prepare_beacon_proposer` calls from `register_validator`. These calls were: heavily duplicated, happening _too early_ (at the start of the slot before the block arrived), expensive on epoch boundaries (forcing an early epoch transition), _and_ unnecessary. They are completely safe to remove because the scheduled proposer preparation routine exists. - Instrument `get_expected_withdrawals`/`prepare_beacon_proposer` to find more unexpected callers. Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -406,6 +406,10 @@ impl ProposerPreparationDataEntry {
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: This key should arguably include the `suggested_fee_recipient`, as it is part of the
|
||||
// `Proposer::payload_attributes` value that is cached based on it. However, in some cases where
|
||||
// this key is constructed the fee recipient is not straight-forward to determine. Therefore we
|
||||
// accept the risk of loading a stale fee recipient within the timespan of a single slot.
|
||||
#[derive(Hash, PartialEq, Eq)]
|
||||
pub struct ProposerKey {
|
||||
slot: Slot,
|
||||
|
||||
Reference in New Issue
Block a user