diff --git a/packages/beacon-node/src/chain/chain.ts b/packages/beacon-node/src/chain/chain.ts index 92da02ddab82..20a6ca343565 100644 --- a/packages/beacon-node/src/chain/chain.ts +++ b/packages/beacon-node/src/chain/chain.ts @@ -1001,6 +1001,6 @@ export class BeaconChain implements IBeaconChain { throw Error(`Pre-state is unavailable given block's parent root ${toHexString(block.parentRoot)}`); } - return computeBlockRewards(block, preState, postState); + return computeBlockRewards(block, preState.clone(), postState?.clone()); } } diff --git a/packages/beacon-node/src/chain/rewards/blockRewards.ts b/packages/beacon-node/src/chain/rewards/blockRewards.ts index 7fdfe126e122..bd8bf3537582 100644 --- a/packages/beacon-node/src/chain/rewards/blockRewards.ts +++ b/packages/beacon-node/src/chain/rewards/blockRewards.ts @@ -94,6 +94,7 @@ function computeSyncAggregateReward(block: altair.BeaconBlock, preState: CachedB return 0; // phase0 block does not have syncAggregate } } + /** * Calculate rewards received by block proposer for including proposer slashings. * All proposer slashing rewards go to block proposer and none to whistleblower as of Deneb