Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some easy Electra TODOs #5928

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading