Skip to content

Commit bc8470b

Browse files
authored
Add builder execution requests (EIP-8282) (#5359)
1 parent a8fc06a commit bc8470b

22 files changed

Lines changed: 1817 additions & 2101 deletions

presets/mainnet/gloas.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ PTC_SIZE: 512
1010
# 2**2 (= 4) attestations
1111
MAX_PAYLOAD_ATTESTATIONS: 4
1212

13+
# Execution
14+
# ---------------------------------------------------------------
15+
# 2**8 (= 256) builder deposit requests
16+
MAX_BUILDER_DEPOSIT_REQUESTS_PER_PAYLOAD: 256
17+
# 2**4 (= 16) builder exit requests
18+
MAX_BUILDER_EXIT_REQUESTS_PER_PAYLOAD: 16
19+
1320
# State list lengths
1421
# ---------------------------------------------------------------
1522
# 2**40 (= 1,099,511,627,776) builder spots

presets/minimal/gloas.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ PTC_SIZE: 16
1010
# 2**2 (= 4) attestations
1111
MAX_PAYLOAD_ATTESTATIONS: 4
1212

13+
# Execution
14+
# ---------------------------------------------------------------
15+
# 2**8 (= 256) builder deposit requests
16+
MAX_BUILDER_DEPOSIT_REQUESTS_PER_PAYLOAD: 256
17+
# 2**4 (= 16) builder exit requests
18+
MAX_BUILDER_EXIT_REQUESTS_PER_PAYLOAD: 16
19+
1320
# State list lengths
1421
# ---------------------------------------------------------------
1522
# 2**40 (= 1,099,511,627,776) builder spots

pysetup/spec_builders/heze.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ def is_inclusion_list_satisfied(self: ExecutionEngine,
6868
def deprecate_functions(cls) -> set[str]:
6969
return {
7070
"initialize_ptc_window",
71+
"is_builder_withdrawal_credential",
72+
"is_pending_validator",
7173
"onboard_builders_from_pending_deposits",
7274
"upgrade_to_gloas",
7375
}

specs/_features/eip8025/beacon-chain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ and imports proof types from [proof-engine.md](./proof-engine.md).
5050

5151
| Name | Value |
5252
| ------------------------ | -------------------------- |
53-
| `DOMAIN_EXECUTION_PROOF` | `DomainType('0x0E000000')` |
53+
| `DOMAIN_EXECUTION_PROOF` | `DomainType('0x0F000000')` |
5454

5555
## Containers
5656

specs/_features/eip8148/beacon-chain.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ control their balance withdrawals more precisely.
5555

5656
| Name | Value |
5757
| ------------------------------ | ---------------- |
58-
| `SWEEP_THRESHOLD_REQUEST_TYPE` | `Bytes1('0x03')` |
58+
| `SWEEP_THRESHOLD_REQUEST_TYPE` | `Bytes1('0x05')` |
5959

6060
### Sweep threshold validation
6161

@@ -136,6 +136,8 @@ class ExecutionRequests(Container):
136136
deposits: List[DepositRequest, MAX_DEPOSIT_REQUESTS_PER_PAYLOAD]
137137
withdrawals: List[WithdrawalRequest, MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD]
138138
consolidations: List[ConsolidationRequest, MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD]
139+
builder_deposits: List[BuilderDepositRequest, MAX_BUILDER_DEPOSIT_REQUESTS_PER_PAYLOAD]
140+
builder_exits: List[BuilderExitRequest, MAX_BUILDER_EXIT_REQUESTS_PER_PAYLOAD]
139141
# [New in EIP8148]
140142
sweep_thresholds: List[SetSweepThresholdRequest, MAX_SET_SWEEP_THRESHOLD_REQUESTS_PER_PAYLOAD]
141143
```
@@ -238,6 +240,8 @@ def get_execution_requests_list(execution_requests: ExecutionRequests) -> Sequen
238240
(DEPOSIT_REQUEST_TYPE, execution_requests.deposits),
239241
(WITHDRAWAL_REQUEST_TYPE, execution_requests.withdrawals),
240242
(CONSOLIDATION_REQUEST_TYPE, execution_requests.consolidations),
243+
(BUILDER_DEPOSIT_REQUEST_TYPE, execution_requests.builder_deposits),
244+
(BUILDER_EXIT_REQUEST_TYPE, execution_requests.builder_exits),
241245
# [New in EIP8148]
242246
(SWEEP_THRESHOLD_REQUEST_TYPE, execution_requests.sweep_thresholds),
243247
]
@@ -375,6 +379,8 @@ def apply_parent_execution_payload(
375379
for_ops(requests.deposits, process_deposit_request)
376380
for_ops(requests.withdrawals, process_withdrawal_request)
377381
for_ops(requests.consolidations, process_consolidation_request)
382+
for_ops(requests.builder_deposits, process_builder_deposit_request)
383+
for_ops(requests.builder_exits, process_builder_exit_request)
378384
# [New in EIP8148]
379385
for_ops(requests.sweep_thresholds, process_set_sweep_threshold_request)
380386

0 commit comments

Comments
 (0)