Skip to content

Commit 5970ae5

Browse files
authored
Merge pull request #3246 from potuz/simplyfy_commitee_weight
Simplify commitee weight computation
2 parents ffacbb4 + 86962b9 commit 5970ae5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

specs/phase0/fork-choice.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,7 @@ def get_latest_attesting_balance(store: Store, root: Root) -> Gwei:
194194
proposer_score = Gwei(0)
195195
# Boost is applied if ``root`` is an ancestor of ``proposer_boost_root``
196196
if get_ancestor(store, store.proposer_boost_root, store.blocks[root].slot) == root:
197-
num_validators = len(get_active_validator_indices(state, get_current_epoch(state)))
198-
avg_balance = get_total_active_balance(state) // num_validators
199-
committee_size = num_validators // SLOTS_PER_EPOCH
200-
committee_weight = committee_size * avg_balance
197+
committee_weight = get_total_active_balance(state) // SLOTS_PER_EPOCH
201198
proposer_score = (committee_weight * PROPOSER_SCORE_BOOST) // 100
202199
return attestation_score + proposer_score
203200

0 commit comments

Comments
 (0)