Merge unstable (needs a few more fixes)

This commit is contained in:
Michael Sproul
2023-01-17 13:15:41 +11:00
156 changed files with 6766 additions and 2387 deletions

View File

@@ -52,11 +52,12 @@ pub fn process_sync_aggregate<T: EthSpec>(
.into_iter()
.zip(aggregate.sync_committee_bits.iter())
{
// FIXME(sproul): double-check this for Capella, proposer shouldn't have 0 effective balance
if participation_bit {
increase_balance(state, participant_index as usize, participant_reward)?;
increase_balance(state, participant_index, participant_reward)?;
total_proposer_reward.safe_add_assign(proposer_reward)?;
} else {
decrease_balance(state, participant_index as usize, participant_reward)?;
decrease_balance(state, participant_index, participant_reward)?;
}
}
increase_balance(state, proposer_index as usize, total_proposer_reward)?;

View File

@@ -242,7 +242,7 @@ fn get_inclusion_delay_delta(
let max_attester_reward = base_reward.safe_sub(proposer_reward)?;
delta.reward(max_attester_reward.safe_div(inclusion_info.delay)?)?;
let proposer_index = inclusion_info.proposer_index as usize;
let proposer_index = inclusion_info.proposer_index;
Ok((delta, Some((proposer_index, proposer_delta))))
} else {
Ok((Delta::default(), None))