Skip to content

Commit

Permalink
Make PROPOSER_SCORE_BOOST a percentage value
Browse files Browse the repository at this point in the history
  • Loading branch information
adiasg authored and djrtwo committed Nov 22, 2021
1 parent 504d82c commit b0fb861
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions specs/phase0/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ Any of the above handlers that trigger an unhandled exception (e.g. a failed ass

| Name | Value |
| - | - |
| `PROPOSER_SCORE_BOOST_QUOTIENT` | `uint64(4)` |
| `PROPOSER_SCORE_BOOST` | `uint64(25)` |

- The proposer score boost is worth `PROPOSER_SCORE_BOOST` percentage of the committee's weight, i.e., for slot with committee weight `committee_weight` the boost weight is equal to `(committee_weight * PROPOSER_SCORE_BOOST) // 100`.

### Helpers

Expand Down Expand Up @@ -181,7 +183,7 @@ def get_latest_attesting_balance(store: Store, root: Root) -> Gwei:
block_epoch = compute_epoch_at_slot(block_slot)
committee_size = get_committee_count_per_slot(state, block_epoch) * TARGET_COMMITTEE_SIZE
committee_weight = committee_size * avg_balance
proposer_score = committee_weight // PROPOSER_SCORE_BOOST_QUOTIENT
proposer_score = (committee_weight * PROPOSER_SCORE_BOOST) // 100
return attestation_score + proposer_score

```
Expand Down

0 comments on commit b0fb861

Please sign in to comment.