mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-05 13:54:36 +00:00
Gloas alpha spec 11 (#9511)
Alpha spec 11 changes Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -31,7 +31,7 @@ use types::{
|
||||
Address, Attestation, AttestationElectra, AttesterSlashing, AttesterSlashingElectra,
|
||||
BeaconBlock, BeaconBlockBodyGloas, BeaconBlockGloas, BeaconState, BeaconStateError,
|
||||
BuilderIndex, ChainSpec, Deposit, Eth1Data, EthSpec, ExecutionBlockHash, ExecutionPayloadBid,
|
||||
ExecutionPayloadEnvelope, ExecutionPayloadGloas, ExecutionRequests, FullPayload, Graffiti,
|
||||
ExecutionPayloadEnvelope, ExecutionPayloadGloas, ExecutionRequestsGloas, FullPayload, Graffiti,
|
||||
Hash256, PayloadAttestation, ProposerSlashing, RelativeEpoch, SignedBeaconBlock,
|
||||
SignedBlsToExecutionChange, SignedExecutionPayloadBid, SignedExecutionPayloadEnvelope,
|
||||
SignedVoluntaryExit, Slot, SyncAggregate, Withdrawal, Withdrawals,
|
||||
@@ -74,7 +74,7 @@ pub struct PartialBeaconBlock<E: EthSpec> {
|
||||
/// The envelope requires the beacon_block_root which can only be computed after the block exists.
|
||||
pub struct ExecutionPayloadData<E: types::EthSpec> {
|
||||
pub payload: ExecutionPayloadGloas<E>,
|
||||
pub execution_requests: ExecutionRequests<E>,
|
||||
pub execution_requests: ExecutionRequestsGloas<E>,
|
||||
pub builder_index: BuilderIndex,
|
||||
pub slot: Slot,
|
||||
pub blobs_and_proofs: (types::BlobsList<E>, types::KzgProofs<E>),
|
||||
@@ -175,7 +175,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.map(|env| env.message.execution_requests.clone())
|
||||
.ok_or(BlockProductionError::MissingParentExecutionPayload)?
|
||||
} else {
|
||||
ExecutionRequests::default()
|
||||
ExecutionRequestsGloas::default()
|
||||
};
|
||||
|
||||
// Part 1/3 (blocking)
|
||||
@@ -259,7 +259,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
produce_at_slot: Slot,
|
||||
randao_reveal: Signature,
|
||||
graffiti: Graffiti,
|
||||
parent_execution_requests: &ExecutionRequests<T::EthSpec>,
|
||||
parent_execution_requests: &ExecutionRequestsGloas<T::EthSpec>,
|
||||
) -> Result<(PartialBeaconBlock<T::EthSpec>, BeaconState<T::EthSpec>), BlockProductionError>
|
||||
{
|
||||
// It is invalid to try to produce a block using a state from a future slot.
|
||||
@@ -530,7 +530,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
&self,
|
||||
partial_beacon_block: PartialBeaconBlock<T::EthSpec>,
|
||||
signed_execution_payload_bid: SignedExecutionPayloadBid<T::EthSpec>,
|
||||
parent_execution_requests: ExecutionRequests<T::EthSpec>,
|
||||
parent_execution_requests: ExecutionRequestsGloas<T::EthSpec>,
|
||||
payload_data: Option<ExecutionPayloadData<T::EthSpec>>,
|
||||
mut state: BeaconState<T::EthSpec>,
|
||||
verification: ProduceBlockVerification,
|
||||
@@ -1109,7 +1109,7 @@ where
|
||||
/// `exit_epoch`. A voluntary exit for the same validator would then fail with `AlreadyExited`.
|
||||
fn filter_voluntary_exits_for_parent_execution_requests<E: EthSpec>(
|
||||
voluntary_exits: &mut Vec<SignedVoluntaryExit>,
|
||||
parent_execution_requests: &ExecutionRequests<E>,
|
||||
parent_execution_requests: &ExecutionRequestsGloas<E>,
|
||||
pubkey_at_index: impl Fn(u64) -> Option<PublicKeyBytes>,
|
||||
spec: &ChainSpec,
|
||||
) {
|
||||
@@ -1161,17 +1161,19 @@ mod tests {
|
||||
fn requests(
|
||||
withdrawals: Vec<WithdrawalRequest>,
|
||||
consolidations: Vec<ConsolidationRequest>,
|
||||
) -> ExecutionRequests<TestSpec> {
|
||||
ExecutionRequests {
|
||||
) -> ExecutionRequestsGloas<TestSpec> {
|
||||
ExecutionRequestsGloas {
|
||||
deposits: VariableList::empty(),
|
||||
withdrawals: VariableList::new(withdrawals).unwrap(),
|
||||
consolidations: VariableList::new(consolidations).unwrap(),
|
||||
builder_deposits: VariableList::empty(),
|
||||
builder_exits: VariableList::empty(),
|
||||
}
|
||||
}
|
||||
|
||||
fn run_filter(
|
||||
exits: &mut Vec<SignedVoluntaryExit>,
|
||||
requests: &ExecutionRequests<TestSpec>,
|
||||
requests: &ExecutionRequestsGloas<TestSpec>,
|
||||
validator_pubkeys: &[PublicKeyBytes],
|
||||
spec: &ChainSpec,
|
||||
) {
|
||||
@@ -1307,7 +1309,7 @@ mod tests {
|
||||
LocalBuildResult {
|
||||
payload_data: ExecutionPayloadData {
|
||||
payload: types::ExecutionPayloadGloas::default(),
|
||||
execution_requests: ExecutionRequests::default(),
|
||||
execution_requests: ExecutionRequestsGloas::default(),
|
||||
builder_index: BUILDER_INDEX_SELF_BUILD,
|
||||
slot: Slot::new(0),
|
||||
blobs_and_proofs: (VariableList::empty(), VariableList::empty()),
|
||||
|
||||
Reference in New Issue
Block a user