Skip to content

Commit

Permalink
Remove some easy Electra TODOs (sigp#5928)
Browse files Browse the repository at this point in the history
* Remove some easy Electra TODOs
  • Loading branch information
michaelsproul authored Jun 17, 2024
1 parent a740980 commit 1eb8694
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 35 deletions.
37 changes: 4 additions & 33 deletions beacon_node/execution_layer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1985,39 +1985,10 @@ impl<E: EthSpec> ExecutionLayer<E> {
excess_blob_gas: deneb_block.excess_blob_gas,
})
}
ExecutionBlockWithTransactions::Electra(electra_block) => {
let withdrawals = VariableList::new(
electra_block
.withdrawals
.into_iter()
.map(Into::into)
.collect(),
)
.map_err(ApiError::DeserializeWithdrawals)?;
ExecutionPayload::Electra(ExecutionPayloadElectra {
parent_hash: electra_block.parent_hash,
fee_recipient: electra_block.fee_recipient,
state_root: electra_block.state_root,
receipts_root: electra_block.receipts_root,
logs_bloom: electra_block.logs_bloom,
prev_randao: electra_block.prev_randao,
block_number: electra_block.block_number,
gas_limit: electra_block.gas_limit,
gas_used: electra_block.gas_used,
timestamp: electra_block.timestamp,
extra_data: electra_block.extra_data,
base_fee_per_gas: electra_block.base_fee_per_gas,
block_hash: electra_block.block_hash,
transactions: convert_transactions(electra_block.transactions)?,
withdrawals,
blob_gas_used: electra_block.blob_gas_used,
excess_blob_gas: electra_block.excess_blob_gas,
// TODO(electra)
// deposit_receipts: electra_block.deposit_receipts,
// withdrawal_requests: electra_block.withdrawal_requests,
deposit_receipts: <_>::default(),
withdrawal_requests: <_>::default(),
})
ExecutionBlockWithTransactions::Electra(_) => {
return Err(ApiError::UnsupportedForkVariant(format!(
"legacy payload construction for {fork} is not implemented"
)));
}
};

Expand Down
1 change: 0 additions & 1 deletion beacon_node/store/src/partial_beacon_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ where
#[superstruct(only(Electra))]
pub earliest_consolidation_epoch: Epoch,

// TODO(electra) should these be optional?
#[superstruct(only(Electra))]
pub pending_balance_deposits: List<PendingBalanceDeposit, E::PendingBalanceDepositsLimit>,
#[superstruct(only(Electra))]
Expand Down
1 change: 0 additions & 1 deletion consensus/types/src/execution_payload_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ impl<E: EthSpec> ExecutionPayloadHeader<E> {
#[allow(clippy::arithmetic_side_effects)]
pub fn ssz_max_var_len_for_fork(fork_name: ForkName) -> usize {
// Matching here in case variable fields are added in future forks.
// TODO(electra): review electra changes
match fork_name {
ForkName::Base
| ForkName::Altair
Expand Down

0 comments on commit 1eb8694

Please sign in to comment.