Skip to content

Commit 047c754

Browse files
Clean capella (sigp#4019)
## Issue Addressed Cleans up all the remnants of 4844 in capella. This makes sure when 4844 is reviewed there is nothing we are missing because it got included here ## Proposed Changes drop a bomb on every 4844 thing ## Additional Info Merge process I did (locally) is as follows: - squash merge to produce one commit - in new branch off unstable with the squashed commit create a `git revert HEAD` commit - merge that new branch onto 4844 with `--strategy ours` - compare local 4844 to remote 4844 and make sure the diff is empty - enjoy Co-authored-by: Paul Hauner <[email protected]>
1 parent 17d9a62 commit 047c754

File tree

96 files changed

+199
-2307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+199
-2307
lines changed

Cargo.lock

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

beacon_node/beacon_chain/src/beacon_chain.rs

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4106,9 +4106,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
41064106
None
41074107
};
41084108

4109-
//FIXME(sean) waiting for the BN<>EE api for this to stabilize
4110-
let kzg_commitments = vec![];
4111-
41124109
// Part 3/3 (blocking)
41134110
//
41144111
// Perform the final steps of combining all the parts and computing the state root.
@@ -4119,7 +4116,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
41194116
chain.complete_partial_beacon_block(
41204117
partial_beacon_block,
41214118
block_contents,
4122-
kzg_commitments,
41234119
verification,
41244120
)
41254121
},
@@ -4190,7 +4186,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
41904186
// allows it to run concurrently with things like attestation packing.
41914187
let prepare_payload_handle = match &state {
41924188
BeaconState::Base(_) | BeaconState::Altair(_) => None,
4193-
BeaconState::Merge(_) | BeaconState::Capella(_) | BeaconState::Eip4844(_) => {
4189+
BeaconState::Merge(_) | BeaconState::Capella(_) => {
41944190
let prepare_payload_handle =
41954191
get_execution_payload(self.clone(), &state, proposer_index, builder_params)?;
41964192
Some(prepare_payload_handle)
@@ -4373,7 +4369,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
43734369
&self,
43744370
partial_beacon_block: PartialBeaconBlock<T::EthSpec, Payload>,
43754371
block_contents: Option<BlockProposalContents<T::EthSpec, Payload>>,
4376-
kzg_commitments: Vec<KzgCommitment>,
43774372
verification: ProduceBlockVerification,
43784373
) -> Result<BeaconBlockAndState<T::EthSpec, Payload>, BlockProductionError> {
43794374
let PartialBeaconBlock {
@@ -4481,31 +4476,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
44814476
bls_to_execution_changes: bls_to_execution_changes.into(),
44824477
},
44834478
}),
4484-
BeaconState::Eip4844(_) => BeaconBlock::Eip4844(BeaconBlockEip4844 {
4485-
slot,
4486-
proposer_index,
4487-
parent_root,
4488-
state_root: Hash256::zero(),
4489-
body: BeaconBlockBodyEip4844 {
4490-
randao_reveal,
4491-
eth1_data,
4492-
graffiti,
4493-
proposer_slashings: proposer_slashings.into(),
4494-
attester_slashings: attester_slashings.into(),
4495-
attestations: attestations.into(),
4496-
deposits: deposits.into(),
4497-
voluntary_exits: voluntary_exits.into(),
4498-
sync_aggregate: sync_aggregate
4499-
.ok_or(BlockProductionError::MissingSyncAggregate)?,
4500-
execution_payload: block_contents
4501-
.ok_or(BlockProductionError::MissingExecutionPayload)?
4502-
.to_payload()
4503-
.try_into()
4504-
.map_err(|_| BlockProductionError::InvalidPayloadFork)?,
4505-
bls_to_execution_changes: bls_to_execution_changes.into(),
4506-
blob_kzg_commitments: VariableList::from(kzg_commitments),
4507-
},
4508-
}),
45094479
};
45104480

45114481
let block = SignedBeaconBlock::from_block(
@@ -4760,7 +4730,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
47604730

47614731
let withdrawals = match self.spec.fork_name_at_slot::<T::EthSpec>(prepare_slot) {
47624732
ForkName::Base | ForkName::Altair | ForkName::Merge => None,
4763-
ForkName::Capella | ForkName::Eip4844 => {
4733+
ForkName::Capella => {
47644734
// We must use the advanced state because balances can change at epoch boundaries
47654735
// and balances affect withdrawals.
47664736
// FIXME(mark)

beacon_node/beacon_chain/src/blob_verification.rs

Lines changed: 0 additions & 136 deletions
This file was deleted.

beacon_node/beacon_chain/src/errors.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,6 @@ pub enum BlockProductionError {
258258
BlockingFailed(execution_layer::Error),
259259
TerminalPoWBlockLookupFailed(execution_layer::Error),
260260
GetPayloadFailed(execution_layer::Error),
261-
GetBlobsFailed(execution_layer::Error),
262-
BlobPayloadMismatch {
263-
blob_block_hash: ExecutionBlockHash,
264-
payload_block_hash: ExecutionBlockHash,
265-
},
266261
FailedToReadFinalizedBlock(store::Error),
267262
MissingFinalizedBlock(Hash256),
268263
BlockTooLarge(usize),

beacon_node/beacon_chain/src/execution_payload.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,7 @@ pub fn get_execution_payload<
406406
let latest_execution_payload_header_block_hash =
407407
state.latest_execution_payload_header()?.block_hash();
408408
let withdrawals = match state {
409-
&BeaconState::Capella(_) | &BeaconState::Eip4844(_) => {
410-
Some(get_expected_withdrawals(state, spec)?.into())
411-
}
409+
&BeaconState::Capella(_) => Some(get_expected_withdrawals(state, spec)?.into()),
412410
&BeaconState::Merge(_) => None,
413411
// These shouldn't happen but they're here to make the pattern irrefutable
414412
&BeaconState::Base(_) | &BeaconState::Altair(_) => None,

beacon_node/beacon_chain/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ mod beacon_chain;
77
mod beacon_fork_choice_store;
88
pub mod beacon_proposer_cache;
99
mod beacon_snapshot;
10-
pub mod blob_verification;
1110
pub mod block_reward;
1211
mod block_times_cache;
1312
mod block_verification;

beacon_node/beacon_chain/src/metrics.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -972,22 +972,6 @@ lazy_static! {
972972
"beacon_pre_finalization_block_lookup_count",
973973
"Number of block roots subject to single block lookups"
974974
);
975-
976-
/*
977-
* Blob sidecar Verification
978-
*/
979-
pub static ref BLOBS_SIDECAR_PROCESSING_REQUESTS: Result<IntCounter> = try_create_int_counter(
980-
"beacon_blobs_sidecar_processing_requests_total",
981-
"Count of all blob sidecars submitted for processing"
982-
);
983-
pub static ref BLOBS_SIDECAR_PROCESSING_SUCCESSES: Result<IntCounter> = try_create_int_counter(
984-
"beacon_blobs_sidecar_processing_successes_total",
985-
"Number of blob sidecars verified for gossip"
986-
);
987-
pub static ref BLOBS_SIDECAR_GOSSIP_VERIFICATION_TIMES: Result<Histogram> = try_create_histogram(
988-
"beacon_blobs_sidecar_gossip_verification_seconds",
989-
"Full runtime of blob sidecars gossip verification"
990-
);
991975
}
992976

993977
// Fifth lazy-static block is used to account for macro recursion limit.

beacon_node/beacon_chain/src/test_utils.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,6 @@ where
420420
spec.capella_fork_epoch.map(|epoch| {
421421
genesis_time + spec.seconds_per_slot * E::slots_per_epoch() * epoch.as_u64()
422422
});
423-
mock.server.execution_block_generator().eip4844_time =
424-
spec.eip4844_fork_epoch.map(|epoch| {
425-
genesis_time + spec.seconds_per_slot * E::slots_per_epoch() * epoch.as_u64()
426-
});
427423

428424
self
429425
}
@@ -433,14 +429,10 @@ where
433429
let shanghai_time = spec.capella_fork_epoch.map(|epoch| {
434430
HARNESS_GENESIS_TIME + spec.seconds_per_slot * E::slots_per_epoch() * epoch.as_u64()
435431
});
436-
let eip4844_time = spec.eip4844_fork_epoch.map(|epoch| {
437-
HARNESS_GENESIS_TIME + spec.seconds_per_slot * E::slots_per_epoch() * epoch.as_u64()
438-
});
439432
let mock = MockExecutionLayer::new(
440433
self.runtime.task_executor.clone(),
441434
DEFAULT_TERMINAL_BLOCK,
442435
shanghai_time,
443-
eip4844_time,
444436
None,
445437
Some(JwtKey::from_slice(&DEFAULT_JWT_SECRET).unwrap()),
446438
spec,
@@ -464,14 +456,10 @@ where
464456
let shanghai_time = spec.capella_fork_epoch.map(|epoch| {
465457
HARNESS_GENESIS_TIME + spec.seconds_per_slot * E::slots_per_epoch() * epoch.as_u64()
466458
});
467-
let eip4844_time = spec.eip4844_fork_epoch.map(|epoch| {
468-
HARNESS_GENESIS_TIME + spec.seconds_per_slot * E::slots_per_epoch() * epoch.as_u64()
469-
});
470459
let mock_el = MockExecutionLayer::new(
471460
self.runtime.task_executor.clone(),
472461
DEFAULT_TERMINAL_BLOCK,
473462
shanghai_time,
474-
eip4844_time,
475463
builder_threshold,
476464
Some(JwtKey::from_slice(&DEFAULT_JWT_SECRET).unwrap()),
477465
spec.clone(),

0 commit comments

Comments
 (0)