mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Gloas bid and preference verification (#9036)
Gossip verify and cache bids and proposer preferences. This PR also ensures we subscribe to new fork topics one epoch early instead of two slots early. This is required for proposer preferences. Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
This commit is contained in:
@@ -242,8 +242,8 @@ impl<T: BeaconChainTypes> GossipVerifiedEnvelope<T> {
|
||||
}
|
||||
|
||||
impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
/// Build a `GossipVerificationContext` from this `BeaconChain`.
|
||||
pub fn gossip_verification_context(&self) -> GossipVerificationContext<'_, T> {
|
||||
/// Build a `GossipVerificationContext` from this `BeaconChain` for `GossipVerifiedEnvelope`.
|
||||
pub fn payload_envelope_gossip_verification_context(&self) -> GossipVerificationContext<'_, T> {
|
||||
GossipVerificationContext {
|
||||
canonical_head: &self.canonical_head,
|
||||
store: &self.store,
|
||||
@@ -277,7 +277,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
let slot = envelope.slot();
|
||||
let beacon_block_root = envelope.message.beacon_block_root;
|
||||
|
||||
let ctx = chain.gossip_verification_context();
|
||||
let ctx = chain.payload_envelope_gossip_verification_context();
|
||||
match GossipVerifiedEnvelope::new(envelope, &ctx) {
|
||||
Ok(verified) => {
|
||||
debug!(
|
||||
|
||||
Reference in New Issue
Block a user