Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ff1036c
Replace INTERVALS_PER_SLOT with explicit slot component times
jtraglia Jul 30, 2025
130745c
Replace LATE_BLOCK_CUTOFF_BPS with ATTESTATION_DUE_BPS
jtraglia Jul 30, 2025
4d93844
Update eip7805 specs
jtraglia Jul 30, 2025
21e0ef4
Rename eip7805 time params for consistency
jtraglia Jul 30, 2025
d6fa5ea
Slot time update
dankrad Aug 4, 2025
2abb059
Typo
dankrad Aug 4, 2025
860479b
Slot subdivisions and configs
dankrad Aug 4, 2025
308b42a
Base reward update
dankrad Aug 4, 2025
2aa192d
Blob schedule
dankrad Aug 4, 2025
2e292be
Add churn limit updates
dankrad Aug 4, 2025
afc83f0
toc
dankrad Aug 4, 2025
8f22a08
Fix blob schedule
jtraglia Aug 4, 2025
f6f869b
Run make lint
jtraglia Aug 4, 2025
0d381c4
Remove fork check conditions
jtraglia Aug 4, 2025
1725283
Add backend support for eip7782
jtraglia Aug 4, 2025
4d24d40
Make some fixes
jtraglia Aug 4, 2025
e776aa5
Merge branch 'master' into dankrad-eip7782
jtraglia Aug 5, 2025
cfbff41
Update todo comment
jtraglia Aug 5, 2025
312bef5
Merge branch 'master' into dankrad-eip7782
jtraglia Aug 6, 2025
370840f
Add get_forkchoice_store
dankrad Aug 7, 2025
4a29a82
Merge branch 'master' into dankrad-eip7782
jtraglia Aug 11, 2025
490cf8c
Clean up config variables
jtraglia Aug 11, 2025
24f67e7
Remove duplicate function
jtraglia Aug 11, 2025
fc61023
Use pre.proposer_lookahead in upgrade
jtraglia Aug 11, 2025
fd1277c
Merge branch 'master' into dankrad-eip7782
jtraglia Aug 11, 2025
0214feb
Fix sync committee period
dankrad Aug 27, 2025
16e5872
Add sync period functions
dankrad Aug 28, 2025
ea877a8
Merge branch 'master' into dankrad-eip7782
dankrad Aug 28, 2025
3af084e
on_tick logic
dankrad Aug 28, 2025
6a36694
Simplify get_sync_committee_period_at_slot
dankrad Aug 28, 2025
67f7ad2
Merge branch 'master' into dankrad-eip7782
dankrad Sep 22, 2025
5516c49
Add slot subdivision variables and getters
dankrad Sep 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ AGGREGRATE_DUE_BPS_EIP7782: 7500
SYNC_MESSAGE_DUE_BPS_EIP7782: 3333
# 6667 basis points, ~67% of SLOT_DURATION_MS_EIP7782
CONTRIBUTION_DUE_BPS_EIP7782: 6667
# 1667 basis points, ~17% of SLOT_DURATION_MS_EIP7782
PROPOSER_REORG_CUTOFF_BPS_EIP7782: 1667
# 7500 basis points, ~75% of SLOT_DURATION_MS_EIP7782
PAYLOAD_ATTESTATION_DUE_BPS_EIP7782: 7500
# 7500 basis points, ~75% of SLOT_DURATION_MS_EIP7782
VIEW_FREEZE_CUTOFF_BPS_EIP7782: 7500
# 6667 basis points, ~67% of SLOT_DURATION_MS_EIP7782
INCLUSION_LIST_SUBMISSION_DUE_BPS_EIP7782: 6667
# 9167 basis points, ~92% of SLOT_DURATION_MS_EIP7782
PROPOSER_INCLUSION_LIST_CUTOFF_BPS_EIP7782: 9167

# EIP-7782 sync committee period (doubled to maintain ~27 hours with 6-second slots)
# 512 epochs (doubled from 256) to maintain ~27 hours
Expand Down
10 changes: 10 additions & 0 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ AGGREGRATE_DUE_BPS_EIP7782: 7500
SYNC_MESSAGE_DUE_BPS_EIP7782: 3333
# 6667 basis points, ~67% of SLOT_DURATION_MS_EIP7782
CONTRIBUTION_DUE_BPS_EIP7782: 6667
# 1667 basis points, ~17% of SLOT_DURATION_MS_EIP7782
PROPOSER_REORG_CUTOFF_BPS_EIP7782: 1667
# 7500 basis points, ~75% of SLOT_DURATION_MS_EIP7782
PAYLOAD_ATTESTATION_DUE_BPS_EIP7782: 7500
# 7500 basis points, ~75% of SLOT_DURATION_MS_EIP7782
VIEW_FREEZE_CUTOFF_BPS_EIP7782: 7500
# 6667 basis points, ~67% of SLOT_DURATION_MS_EIP7782
INCLUSION_LIST_SUBMISSION_DUE_BPS_EIP7782: 6667
# 9167 basis points, ~92% of SLOT_DURATION_MS_EIP7782
PROPOSER_INCLUSION_LIST_CUTOFF_BPS_EIP7782: 9167

# EIP-7782 sync committee period (doubled to maintain ~27 hours with 6-second slots)
# 16 epochs (doubled from 8) to maintain ~27 hours
Expand Down
134 changes: 134 additions & 0 deletions specs/_features/eip7782/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
- [Rewards and penalties](#rewards-and-penalties-1)
- [Helpers](#helpers)
- [`get_base_reward_per_increment`](#get_base_reward_per_increment)
- [Modified timing functions](#modified-timing-functions)
- [Modified `get_attestation_due_ms`](#modified-get_attestation_due_ms)
- [Modified `get_aggregate_due_ms`](#modified-get_aggregate_due_ms)
- [Modified `get_sync_message_due_ms`](#modified-get_sync_message_due_ms)
- [Modified `get_contribution_due_ms`](#modified-get_contribution_due_ms)
- [Modified `get_proposer_reorg_cutoff_ms`](#modified-get_proposer_reorg_cutoff_ms)
- [Modified `get_payload_attestation_due_ms`](#modified-get_payload_attestation_due_ms)
- [Modified `get_view_freeze_cutoff_ms`](#modified-get_view_freeze_cutoff_ms)
- [Modified `get_inclusion_list_submission_due_ms`](#modified-get_inclusion_list_submission_due_ms)
- [Modified `get_proposer_inclusion_list_cutoff_ms`](#modified-get_proposer_inclusion_list_cutoff_ms)

<!-- mdformat-toc end -->

Expand Down Expand Up @@ -46,6 +56,11 @@
| `AGGREGRATE_DUE_BPS_EIP7782` | `uint64(7500)` | basis points | ~75% of slot |
| `SYNC_MESSAGE_DUE_BPS_EIP7782` | `uint64(3333)` | basis points | ~33% of slot |
| `CONTRIBUTION_DUE_BPS_EIP7782` | `uint64(6667)` | basis points | ~67% of slot |
| `PROPOSER_REORG_CUTOFF_BPS_EIP7782` | `uint64(1667)` | basis points | ~17% of slot |
| `PAYLOAD_ATTESTATION_DUE_BPS_EIP7782` | `uint64(7500)` | basis points | ~75% of slot |
| `VIEW_FREEZE_CUTOFF_BPS_EIP7782` | `uint64(7500)` | basis points | ~75% of slot |
| `INCLUSION_LIST_SUBMISSION_DUE_BPS_EIP7782` | `uint64(6667)` | basis points | ~67% of slot |
| `PROPOSER_INCLUSION_LIST_CUTOFF_BPS_EIP7782` | `uint64(9167)` | basis points | ~92% of slot |

### EIP-7782 sync committee parameters

Expand Down Expand Up @@ -144,3 +159,122 @@ def get_base_reward_per_increment(state: BeaconState) -> Gwei:
// integer_squareroot(get_total_active_balance(state))
)
```

### Modified timing functions

#### Modified `get_attestation_due_ms`

```python
def get_attestation_due_ms(epoch: Epoch) -> uint64:
"""
Return the attestation due time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return ATTESTATION_DUE_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return ATTESTATION_DUE_BPS * SLOT_DURATION_MS // BASIS_POINTS
```
Comment on lines +167 to +176
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dankrad these modifications don't match the way we do this elsewhere. Like:

def get_attestation_due_ms(epoch: Epoch) -> uint64:
# [New in Gloas]
if epoch >= GLOAS_FORK_EPOCH:
return get_slot_component_duration_ms(ATTESTATION_DUE_BPS_GLOAS)
return get_slot_component_duration_ms(ATTESTATION_DUE_BPS)

For this function, it should be:

def get_attestation_due_ms(epoch: Epoch) -> uint64:
    # [New in EIP7782]
    if epoch >= EIP7782_FORK_EPOCH:
        get_slot_component_duration_ms(ATTESTATION_DUE_BPS_EIP7782)
    return get_slot_component_duration_ms(ATTESTATION_DUE_BPS)

And we need to update get_slot_component_duration_ms to be:

def get_slot_component_duration_ms(basis_points: uint64) -> uint64:
    """
    Calculate the duration of a slot component in milliseconds.
    """
    return basis_points * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS

At the fork, the updated get_slot_component_duration_ms will be used. It doesn't need to know the epoch.


#### Modified `get_aggregate_due_ms`

```python
def get_aggregate_due_ms(epoch: Epoch) -> uint64:
"""
Return the aggregate due time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return AGGREGRATE_DUE_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return AGGREGATE_DUE_BPS * SLOT_DURATION_MS // BASIS_POINTS
```

#### Modified `get_sync_message_due_ms`

```python
def get_sync_message_due_ms(epoch: Epoch) -> uint64:
"""
Return the sync message due time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return SYNC_MESSAGE_DUE_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return SYNC_MESSAGE_DUE_BPS * SLOT_DURATION_MS // BASIS_POINTS
```

#### Modified `get_contribution_due_ms`

```python
def get_contribution_due_ms(epoch: Epoch) -> uint64:
"""
Return the contribution due time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return CONTRIBUTION_DUE_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return CONTRIBUTION_DUE_BPS * SLOT_DURATION_MS // BASIS_POINTS
```

#### Modified `get_proposer_reorg_cutoff_ms`

```python
def get_proposer_reorg_cutoff_ms(epoch: Epoch) -> uint64:
"""
Return the proposer reorg cutoff time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return PROPOSER_REORG_CUTOFF_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return PROPOSER_REORG_CUTOFF_BPS * SLOT_DURATION_MS // BASIS_POINTS
```

#### Modified `get_payload_attestation_due_ms`

```python
def get_payload_attestation_due_ms(epoch: Epoch) -> uint64:
"""
Return the payload attestation due time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return PAYLOAD_ATTESTATION_DUE_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return PAYLOAD_ATTESTATION_DUE_BPS * SLOT_DURATION_MS // BASIS_POINTS
```

#### Modified `get_view_freeze_cutoff_ms`

```python
def get_view_freeze_cutoff_ms(epoch: Epoch) -> uint64:
"""
Return the view freeze cutoff time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return VIEW_FREEZE_CUTOFF_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return VIEW_FREEZE_CUTOFF_BPS * SLOT_DURATION_MS // BASIS_POINTS
```

#### Modified `get_inclusion_list_submission_due_ms`

```python
def get_inclusion_list_submission_due_ms(epoch: Epoch) -> uint64:
"""
Return the inclusion list submission due time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return INCLUSION_LIST_SUBMISSION_DUE_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return INCLUSION_LIST_SUBMISSION_DUE_BPS * SLOT_DURATION_MS // BASIS_POINTS
```

#### Modified `get_proposer_inclusion_list_cutoff_ms`

```python
def get_proposer_inclusion_list_cutoff_ms(epoch: Epoch) -> uint64:
"""
Return the proposer inclusion list cutoff time in milliseconds for the given epoch.
"""
if epoch >= EIP7782_FORK_EPOCH:
return PROPOSER_INCLUSION_LIST_CUTOFF_BPS_EIP7782 * SLOT_DURATION_MS_EIP7782 // BASIS_POINTS
else:
return PROPOSER_INCLUSION_LIST_CUTOFF_BPS * SLOT_DURATION_MS // BASIS_POINTS
```
Loading