Skip to content
Open
Show file tree
Hide file tree
Changes from 25 commits
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
2 changes: 2 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ categories:
label: eip7594
- title: EIP-7732
label: eip7732
- title: EIP-7782
label: eip7782
- title: EIP-7805
label: eip7805

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- electra
- fulu
- eip7732
- eip7782
- eip7805
steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
- electra
- fulu
- eip7732
- eip7782
- eip7805
steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ tests/core/pyspec/eth2spec/fulu/
tests/core/pyspec/eth2spec/eip6800/
tests/core/pyspec/eth2spec/eip7441/
tests/core/pyspec/eth2spec/eip7732/
tests/core/pyspec/eth2spec/eip7782/
tests/core/pyspec/eth2spec/eip7805/

# coverage reports
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ALL_EXECUTABLE_SPEC_NAMES = \
eip6800 \
eip7441 \
eip7732 \
eip7782 \
eip7805

# A list of fake targets.
Expand Down
25 changes: 24 additions & 1 deletion configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ EIP7441_FORK_EPOCH: 18446744073709551615
# EIP7732
EIP7732_FORK_VERSION: 0x09000000 # temporary stub
EIP7732_FORK_EPOCH: 18446744073709551615
# EIP7782
EIP7782_FORK_VERSION: 0x0b000000 # temporary stub
EIP7782_FORK_EPOCH: 18446744073709551615
# EIP7805
EIP7805_FORK_VERSION: 0x0a000000 # temporary stub
EIP7805_FORK_EPOCH: 18446744073709551615
Expand Down Expand Up @@ -104,6 +107,18 @@ CONTRIBUTION_DUE_BPS_EIP7732: 5000
# 7500 basis points, 75% of SLOT_DURATION_MS
PAYLOAD_ATTESTATION_DUE_BPS: 7500

# EIP-7782
# 6000 milliseconds, 6 seconds
SLOT_DURATION_MS_EIP7782: 6000
# 5000 basis points, 50% of SLOT_DURATION_MS_EIP7782
ATTESTATION_DUE_BPS_EIP7782: 5000
# 7500 basis points, 75% of SLOT_DURATION_MS_EIP7782
AGGREGRATE_DUE_BPS_EIP7782: 7500
# 3333 basis points, ~33% of SLOT_DURATION_MS_EIP7782
SYNC_MESSAGE_DUE_BPS_EIP7782: 3333
# 6667 basis points, ~67% of SLOT_DURATION_MS_EIP7782
CONTRIBUTION_DUE_BPS_EIP7782: 6667

# EIP-7805
# 7500 basis points, 75% of SLOT_DURATION_MS
VIEW_FREEZE_CUTOFF_BPS: 7500
Expand Down Expand Up @@ -135,6 +150,12 @@ MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000
# 2**8 * 10**9 (= 256,000,000,000) Gwei
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000

# EIP-7782
# 2**6 * 10**9 (= 64,000,000,000) Gwei
MIN_PER_EPOCH_CHURN_LIMIT_EIP7782: 64000000000
# 2**7 * 10**9 (= 128,000,000,000) Gwei
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT_EIP7782: 128000000000

Copy link
Member

Choose a reason for hiding this comment

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

might also need to double MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS, otherwise the data availability window goes down from ~18 days to just ~9 days

Copy link
Contributor

Choose a reason for hiding this comment

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

i was just thinking about this one :)

# Fork choice
# ---------------------------------------------------------------
# 40%
Expand Down Expand Up @@ -240,4 +261,6 @@ MAX_BYTES_PER_INCLUSION_LIST: 8192
# Blob Scheduling
# ---------------------------------------------------------------

BLOB_SCHEDULE: []
BLOB_SCHEDULE:
- EPOCH: 18446744073709551615 # EIP7782_FORK_EPOCH (TBD)
MAX_BLOBS_PER_BLOCK: 3
25 changes: 24 additions & 1 deletion configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ EIP7441_FORK_EPOCH: 18446744073709551615
# [customized] EIP7732
EIP7732_FORK_VERSION: 0x09000001
EIP7732_FORK_EPOCH: 18446744073709551615
# [customized] EIP7782
EIP7782_FORK_VERSION: 0x0b000001
EIP7782_FORK_EPOCH: 18446744073709551615
# [customized] EIP7805
EIP7805_FORK_VERSION: 0x0a000001
EIP7805_FORK_EPOCH: 18446744073709551615
Expand Down Expand Up @@ -100,6 +103,18 @@ CONTRIBUTION_DUE_BPS_EIP7732: 5000
# 7500 basis points, 75% of SLOT_DURATION_MS
PAYLOAD_ATTESTATION_DUE_BPS: 7500

# EIP-7782
# [customized] 3000 milliseconds, 3 seconds
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# [customized] 3000 milliseconds, 3 seconds
# [customized] 6000 milliseconds, 6 seconds

SLOT_DURATION_MS_EIP7782: 6000
# 5000 basis points, 50% of SLOT_DURATION_MS_EIP7782
ATTESTATION_DUE_BPS_EIP7782: 5000
# 7500 basis points, 75% of SLOT_DURATION_MS_EIP7782
AGGREGRATE_DUE_BPS_EIP7782: 7500
# 3333 basis points, ~33% of SLOT_DURATION_MS_EIP7782
SYNC_MESSAGE_DUE_BPS_EIP7782: 3333
# 6667 basis points, ~67% of SLOT_DURATION_MS_EIP7782
CONTRIBUTION_DUE_BPS_EIP7782: 6667

# EIP-7805
# 7500 basis points, 75% of SLOT_DURATION_MS
VIEW_FREEZE_CUTOFF_BPS: 7500
Expand Down Expand Up @@ -131,6 +146,12 @@ MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000
# [customized] 2**7 * 10**9 (= 128,000,000,000) Gwei
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 128000000000

# EIP-7782
# [customized] 2**5 * 10**9 (= 32,000,000,000) Gwei
MIN_PER_EPOCH_CHURN_LIMIT_EIP7782: 32000000000
# [customized] 2**6 * 10**9 (= 64,000,000,000) Gwei
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT_EIP7782: 64000000000

# Fork choice
# ---------------------------------------------------------------
# 40%
Expand Down Expand Up @@ -237,4 +258,6 @@ MAX_BYTES_PER_INCLUSION_LIST: 8192
# Blob Scheduling
# ---------------------------------------------------------------

BLOB_SCHEDULE: []
BLOB_SCHEDULE:
- EPOCH: 18446744073709551615 # EIP7782_FORK_EPOCH (TBD)
MAX_BLOBS_PER_BLOCK: 3
1 change: 1 addition & 0 deletions pysetup/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
EIP6800 = "eip6800"
EIP7441 = "eip7441"
EIP7732 = "eip7732"
EIP7782 = "eip7782"
EIP7805 = "eip7805"


Expand Down
2 changes: 2 additions & 0 deletions pysetup/md_doc_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
EIP6800,
EIP7441,
EIP7732,
EIP7782,
EIP7805,
ELECTRA,
FULU,
Expand All @@ -25,6 +26,7 @@
EIP6800: DENEB,
EIP7441: CAPELLA,
EIP7732: ELECTRA,
EIP7782: FULU,
EIP7805: ELECTRA,
}

Expand Down
2 changes: 2 additions & 0 deletions pysetup/spec_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .eip6800 import EIP6800SpecBuilder
from .eip7441 import EIP7441SpecBuilder
from .eip7732 import EIP7732SpecBuilder
from .eip7782 import EIP7782SpecBuilder
from .eip7805 import EIP7805SpecBuilder
from .electra import ElectraSpecBuilder
from .fulu import FuluSpecBuilder
Expand All @@ -23,6 +24,7 @@
EIP6800SpecBuilder,
EIP7441SpecBuilder,
EIP7732SpecBuilder,
EIP7782SpecBuilder,
EIP7805SpecBuilder,
)
}
12 changes: 12 additions & 0 deletions pysetup/spec_builders/eip7782.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from ..constants import EIP7782
from .base import BaseSpecBuilder


class EIP7782SpecBuilder(BaseSpecBuilder):
fork: str = EIP7782

@classmethod
def imports(cls, preset_name: str):
return f"""
from eth2spec.fulu import {preset_name} as fulu
"""
100 changes: 100 additions & 0 deletions specs/_features/eip7782/beacon-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# EIP-7782 -- The Beacon Chain

<!-- mdformat-toc start --slug=github --no-anchors --maxlevel=6 --minlevel=2 -->

- [Time parameters](#time-parameters)
- [Rewards and penalties](#rewards-and-penalties)
- [Configuration](#configuration)
- [Time parameters](#time-parameters-1)
- [EIP-7782 timing parameters](#eip-7782-timing-parameters)
- [EIP-7782 churn limit parameters](#eip-7782-churn-limit-parameters)
- [Modified churn limit functions](#modified-churn-limit-functions)
- [Modified `get_balance_churn_limit`](#modified-get_balance_churn_limit)
- [Modified `get_activation_exit_churn_limit`](#modified-get_activation_exit_churn_limit)
- [Rewards and penalties](#rewards-and-penalties-1)
- [Helpers](#helpers)
- [`get_base_reward_per_increment`](#get_base_reward_per_increment)

<!-- mdformat-toc end -->

### Time parameters

### Rewards and penalties

| Name | Value |
| ---------------------------- | --------------------- |
| `BASE_REWARD_FACTOR_EIP7782` | `uint64(2**5)` (= 32) |

## Configuration

### Time parameters

| Name | Value | Unit | Duration |
| -------------------------- | -------------- | :----------: | :-------: |
| `SLOT_DURATION_MS_EIP7782` | `uint64(6000)` | milliseconds | 6 seconds |

### EIP-7782 timing parameters

| Name | Value | Unit | Duration |
| ------------------------------ | -------------- | :----------: | :----------: |
| `ATTESTATION_DUE_BPS_EIP7782` | `uint64(5000)` | basis points | ~50% of slot |
| `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 |

*Note*: EIP-7782 uses the blob schedule mechanism to reduce blob throughput. The
blob schedule entry for EIP-7782 sets `MAX_BLOBS_PER_BLOCK` to 3 (half of the
current 6 blobs) to maintain constant throughput per unit time with 6-second
slots. Transaction limits remain unchanged.

*Note*: EIP-7782 also halves the churn limits to maintain timing constants with
6-second slots. This ensures that validator activation/exit rates remain
proportional to time rather than slot count.

### EIP-7782 churn limit parameters

| Name | Value | Unit | Description |
| --------------------------------------------------- | -------------------- | :--: | :-----------------------------: |
| `MIN_PER_EPOCH_CHURN_LIMIT_EIP7782` | `Gwei(64000000000)` | Gwei | Minimum balance per epoch |
| `MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT_EIP7782` | `Gwei(128000000000)` | Gwei | Maximum activation/exit balance |

### Modified churn limit functions

#### Modified `get_balance_churn_limit`

```python
def get_balance_churn_limit(state: BeaconState) -> Gwei:
"""
Return the churn limit for the current epoch.
"""
churn = max(
MIN_PER_EPOCH_CHURN_LIMIT_EIP7782,
get_total_active_balance(state) // CHURN_LIMIT_QUOTIENT,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to double CHURN_LIMIT_QUOTIENT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Weak subjectivity is epoch based so this is possibly ok, but may ask @mkalinin

)
return churn - churn % EFFECTIVE_BALANCE_INCREMENT
```

#### Modified `get_activation_exit_churn_limit`

```python
def get_activation_exit_churn_limit(state: BeaconState) -> Gwei:
"""
Return the churn limit for the current epoch dedicated to activations and exits.
"""
return min(MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT_EIP7782, get_balance_churn_limit(state))
```

## Rewards and penalties

### Helpers

#### `get_base_reward_per_increment`

```python
def get_base_reward_per_increment(state: BeaconState) -> Gwei:
return Gwei(
EFFECTIVE_BALANCE_INCREMENT
* BASE_REWARD_FACTOR_EIP7782
// integer_squareroot(get_total_active_balance(state))
)
```
Loading
Loading