mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-02 20:34:27 +00:00
Gloas alpha spec 9 (#9393)
Changes implemented Ensure bids are for a higher slot than their parent (https://github.com/ethereum/consensus-specs/pull/5302) Ignore PTC attestations for empty assigned slots (https://github.com/ethereum/consensus-specs/pull/5281) Limit should_build_on_full checks to the previous slot (https://github.com/ethereum/consensus-specs/pull/5309) Apply proposer boost if dependent roots match (https://github.com/ethereum/consensus-specs/pull/5306) Exclude slashed validators from proposing (EIP-8045) (https://github.com/ethereum/consensus-specs/pull/5115) Force the proposer to reorg late payloads (https://github.com/ethereum/consensus-specs/pull/5210) Remove support for old deposit mechanism in Fulu (https://github.com/ethereum/consensus-specs/pull/4704) Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com> Co-Authored-By: Eitan Seri-Levi <eserilev@gmail.com> Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -124,6 +124,15 @@ pub enum Operation {
|
||||
#[serde(default)]
|
||||
proposer_boost_root: Option<Hash256>,
|
||||
},
|
||||
/// Assert the result of `should_build_on_full` for the parent `block_root`, where
|
||||
/// `parent_payload_status` is the status the proposer would build on and `proposal_slot`
|
||||
/// is the slot being proposed.
|
||||
AssertShouldBuildOnFull {
|
||||
block_root: Hash256,
|
||||
parent_payload_status: PayloadStatus,
|
||||
proposal_slot: Slot,
|
||||
expected: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -606,6 +615,30 @@ impl ForkChoiceTestDefinition {
|
||||
op_index
|
||||
);
|
||||
}
|
||||
Operation::AssertShouldBuildOnFull {
|
||||
block_root,
|
||||
parent_payload_status,
|
||||
proposal_slot,
|
||||
expected,
|
||||
} => {
|
||||
let actual = fork_choice
|
||||
.should_build_on_full::<MainnetEthSpec>(
|
||||
&block_root,
|
||||
parent_payload_status,
|
||||
proposal_slot,
|
||||
)
|
||||
.unwrap_or_else(|e| {
|
||||
panic!(
|
||||
"should_build_on_full op at index {} returned error: {}",
|
||||
op_index, e
|
||||
)
|
||||
});
|
||||
assert_eq!(
|
||||
actual, expected,
|
||||
"should_build_on_full mismatch at op index {}",
|
||||
op_index
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user