|
56 | 56 | - [Configuration](#configuration) |
57 | 57 | - [Validator cycle](#validator-cycle) |
58 | 58 | - [Time parameters](#time-parameters) |
| 59 | + - [Gas limit schedule](#gas-limit-schedule) |
59 | 60 | - [Containers](#containers) |
60 | 61 | - [New containers](#new-containers) |
61 | 62 | - [`Builder`](#builder) |
|
93 | 94 | - [Misc](#misc-2) |
94 | 95 | - [New `convert_builder_index_to_validator_index`](#new-convert_builder_index_to_validator_index) |
95 | 96 | - [New `convert_validator_index_to_builder_index`](#new-convert_validator_index_to_builder_index) |
| 97 | + - [New `get_scheduled_gas_limit`](#new-get_scheduled_gas_limit) |
96 | 98 | - [New `get_pending_balance_to_withdraw_for_builder`](#new-get_pending_balance_to_withdraw_for_builder) |
97 | 99 | - [New `can_builder_cover_bid`](#new-can_builder_cover_bid) |
98 | 100 | - [New `compute_balance_weighted_selection`](#new-compute_balance_weighted_selection) |
@@ -171,6 +173,8 @@ Gloas is a consensus-layer upgrade containing a number of features. Including: |
171 | 173 | Exclude slashed validators from proposing |
172 | 174 | - [EIP-8061](https://github.com/ethereum/EIPs/blob/01f15c37c64114c478cb1136e0a6966084e4db14/EIPS/eip-8061.md): |
173 | 175 | Increase exit and consolidation churn |
| 176 | +- [EIP-8261](https://github.com/ethereum/EIPs/blob/f6b4668ef37612feba85aef151303f4100b79360/EIPS/eip-8261.md): |
| 177 | + Gas Limit Schedule |
174 | 178 | - [EIP-8282](https://github.com/ethereum/EIPs/blob/de4c6f02c7bec4686762c55f8ab6abcf97a77d7d/EIPS/eip-8282.md): |
175 | 179 | Builder Execution Requests |
176 | 180 |
|
@@ -614,6 +618,22 @@ same `Withdrawal` container can be used for validators and builders. |
614 | 618 | | ----------------------------------- | -------------------- | |
615 | 619 | | `MIN_BUILDER_WITHDRAWABILITY_DELAY` | `Epoch(2**6)` (= 64) | |
616 | 620 |
|
| 621 | +### Gas limit schedule |
| 622 | + |
| 623 | +*[New in Gloas:EIP8261]* This schedule defines the default and recommended |
| 624 | +maximum gas limit for a given epoch. The field is optional: clients that do not |
| 625 | +support it ignore it, and it introduces no new validity rules. |
| 626 | + |
| 627 | +There MUST NOT exist multiple gas limit schedule entries with the same epoch |
| 628 | +value. The epoch value in each entry MUST be greater than or equal to |
| 629 | +`GLOAS_FORK_EPOCH`. The gas limit schedule entries SHOULD be sorted by epoch in |
| 630 | +ascending order. The gas limit schedule MAY be empty. |
| 631 | + |
| 632 | +<!-- list-of-records:gas_limit_schedule --> |
| 633 | + |
| 634 | +| Epoch | Gas Limit | Date | |
| 635 | +| ----: | --------: | ---: | |
| 636 | + |
617 | 637 | ## Containers |
618 | 638 |
|
619 | 639 | ### New containers |
@@ -1080,6 +1100,19 @@ def convert_validator_index_to_builder_index(validator_index: ValidatorIndex) -> |
1080 | 1100 | return BuilderIndex(validator_index & ~BUILDER_INDEX_FLAG) |
1081 | 1101 | ``` |
1082 | 1102 |
|
| 1103 | +#### New `get_scheduled_gas_limit` |
| 1104 | + |
| 1105 | +```python |
| 1106 | +def get_scheduled_gas_limit(epoch: Epoch) -> Optional[Uint64]: |
| 1107 | + """ |
| 1108 | + Return the scheduled gas limit at a given epoch, if any. |
| 1109 | + """ |
| 1110 | + for entry in sorted(GAS_LIMIT_SCHEDULE, key=lambda e: e["EPOCH"], reverse=True): |
| 1111 | + if epoch >= entry["EPOCH"]: |
| 1112 | + return entry["GAS_LIMIT"] |
| 1113 | + return None |
| 1114 | +``` |
| 1115 | + |
1083 | 1116 | #### New `get_pending_balance_to_withdraw_for_builder` |
1084 | 1117 |
|
1085 | 1118 | ```python |
|
0 commit comments