Fix phase0 block reward in rewards API (#5101)

* Added Block Rewards

* added new type

* added enum

* Fix phase0 block reward in rewards API (#4929)

* Merge 'guav00a/proposer-rewards-api'

* Merge unstable

* Revamp phase0 reward API tests

- Add test_rewards_base_slashings (testing #5101)
- Improve fix to not include proposer reward in attestation reward API calculation (#4856)
- Adjust test approach for phase0 tests: Pad with empty epochs to include all rewards in calculation
- Simplify and unify code across all reward tests

* Merge branch 'unstable' into fix-4929

* Merge branch 'unstable' into fix-4929

* Merge remote-tracking branch 'origin/unstable' into fix-4929

* Fix merge fallout

* Remove junk revived in merge

* Address review

- check for attestations with lower inclusion delay
- check for double attestations in block
- add test

* Merge branch 'unstable' into fix-4929

* Merge branch 'unstable' into fix-4929
This commit is contained in:
Daniel Knopik
2024-09-17 08:45:02 +02:00
committed by GitHub
parent 2f6ad34795
commit 8b085dd167
7 changed files with 443 additions and 308 deletions

View File

@@ -5,6 +5,7 @@ use compare_fields_derive::CompareFields;
use serde::Deserialize;
use ssz::four_byte_option_impl;
use ssz_derive::{Decode, Encode};
use state_processing::per_epoch_processing::base::rewards_and_penalties::ProposerRewardCalculation;
use state_processing::{
per_epoch_processing::{
altair,
@@ -130,6 +131,7 @@ impl<E: EthSpec> Case for RewardsTest<E> {
let deltas = base::rewards_and_penalties::get_attestation_deltas_all(
&state,
&validator_statuses,
ProposerRewardCalculation::Include,
spec,
)?;