Changes for fusaka-devnet-1 (#7559)

Changes for [fusaka-devnet-1](https://notes.ethereum.org/@ethpandaops/fusaka-devnet-1)


  [Consensus Specs v1.6.0-alpha.1](https://github.com/ethereum/consensus-specs/pull/4346)
* [EIP-7917: Deterministic Proposer Lookahead](https://eips.ethereum.org/EIPS/eip-7917)
* [EIP-7892: Blob Parameter Only Hardforks](https://eips.ethereum.org/EIPS/eip-7892)
This commit is contained in:
ethDreamer
2025-06-09 11:10:08 +02:00
committed by GitHub
parent 170cd0f587
commit b08d49c4cb
18 changed files with 201 additions and 39 deletions

View File

@@ -181,7 +181,7 @@ pub fn compute_proposer_duties_from_head<T: BeaconChainTypes>(
ensure_state_is_in_epoch(&mut state, head_state_root, request_epoch, &chain.spec)?;
let indices = state
.get_beacon_proposer_indices(&chain.spec)
.get_beacon_proposer_indices(request_epoch, &chain.spec)
.map_err(BeaconChainError::from)?;
let dependent_root = state

View File

@@ -523,7 +523,8 @@ pub fn validate_blob_sidecar_for_gossip<T: BeaconChainTypes, O: ObservationStrat
&chain.spec,
)?;
let proposers = state.get_beacon_proposer_indices(&chain.spec)?;
let epoch = state.current_epoch();
let proposers = state.get_beacon_proposer_indices(epoch, &chain.spec)?;
let proposer_index = *proposers
.get(blob_slot.as_usize() % T::EthSpec::slots_per_epoch() as usize)
.ok_or_else(|| BeaconChainError::NoProposerForSlot(blob_slot))?;

View File

@@ -962,7 +962,8 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
&chain.spec,
)?;
let proposers = state.get_beacon_proposer_indices(&chain.spec)?;
let epoch = state.current_epoch();
let proposers = state.get_beacon_proposer_indices(epoch, &chain.spec)?;
let proposer_index = *proposers
.get(block.slot().as_usize() % T::EthSpec::slots_per_epoch() as usize)
.ok_or_else(|| BeaconChainError::NoProposerForSlot(block.slot()))?;

View File

@@ -669,7 +669,8 @@ fn verify_proposer_and_signature<T: BeaconChainTypes>(
&chain.spec,
)?;
let proposers = state.get_beacon_proposer_indices(&chain.spec)?;
let epoch = state.current_epoch();
let proposers = state.get_beacon_proposer_indices(epoch, &chain.spec)?;
// Prime the proposer shuffling cache with the newly-learned value.
Ok::<_, GossipDataColumnError>(EpochBlockProposers {
epoch: column_epoch,

View File

@@ -377,7 +377,7 @@ fn advance_head<T: BeaconChainTypes>(beacon_chain: &Arc<BeaconChain<T>>) -> Resu
state.current_epoch(),
head_block_root,
state
.get_beacon_proposer_indices(&beacon_chain.spec)
.get_beacon_proposer_indices(state.current_epoch(), &beacon_chain.spec)
.map_err(BeaconChainError::from)?,
state.fork(),
)