diff --git a/specs/gloas/builder.md b/specs/gloas/builder.md index 2b1767838f..64297cfdb0 100644 --- a/specs/gloas/builder.md +++ b/specs/gloas/builder.md @@ -124,7 +124,7 @@ to include. They produce a `SignedExecutionPayloadBid` as follows. where `parent_state` is the post-state of `bid.parent_block_root`. 07. Set `bid.gas_limit` to be the gas limit of the constructed payload, which **MUST** satisfy `is_gas_limit_target_compatible` with respect to the - `gas_limit` in the `SignedProposerPreferences` referenced in step 6. + `target_gas_limit` in the `SignedProposerPreferences` referenced in step 6. 08. Set `bid.builder_index` to be the index of the builder performing these actions. 09. Set `bid.slot` to be the slot for which this bid is aimed. This slot diff --git a/specs/gloas/p2p-interface.md b/specs/gloas/p2p-interface.md index 89095d3859..fdb2afc59f 100644 --- a/specs/gloas/p2p-interface.md +++ b/specs/gloas/p2p-interface.md @@ -90,7 +90,7 @@ class ProposerPreferences(Container): proposal_slot: Slot validator_index: ValidatorIndex fee_recipient: ExecutionAddress - gas_limit: uint64 + target_gas_limit: uint64 ``` #### New `SignedProposerPreferences` @@ -361,7 +361,7 @@ the alias `proposer_preferences = signed_proposer_preferences.message`. payload in fork choice. Let `parent_gas_limit` be the `gas_limit` of that execution payload. - _[IGNORE]_ - `is_gas_limit_target_compatible(parent_gas_limit, bid.gas_limit, proposer_preferences.gas_limit) == True`. + `is_gas_limit_target_compatible(parent_gas_limit, bid.gas_limit, proposer_preferences.target_gas_limit) == True`. - _[IGNORE]_ `bid.parent_block_root` is the hash tree root of a known beacon block in fork choice. - _[REJECT]_ `signed_execution_payload_bid.signature` is valid with respect to @@ -371,18 +371,19 @@ The following helper is used to validate the bid's gas limit ```python def is_gas_limit_target_compatible( - parent_gas_limit: uint64, gas_limit: uint64, proposer_gas_limit: uint64 + parent_gas_limit: uint64, gas_limit: uint64, target_gas_limit: uint64 ) -> bool: """ - Check if the bid's gas limit is compatible with the proposer's preferences. + Check if ``gas_limit`` is compatible with ``target_gas_limit`` under the + EIP-1559 transition rule from ``parent_gas_limit``. """ max_gas_limit_difference = max(parent_gas_limit // 1024, 1) - 1 min_gas_limit = parent_gas_limit - max_gas_limit_difference max_gas_limit = parent_gas_limit + max_gas_limit_difference - if proposer_gas_limit >= min_gas_limit and proposer_gas_limit <= max_gas_limit: - return gas_limit == proposer_gas_limit - if proposer_gas_limit > max_gas_limit: + if target_gas_limit >= min_gas_limit and target_gas_limit <= max_gas_limit: + return gas_limit == target_gas_limit + if target_gas_limit > max_gas_limit: return gas_limit == max_gas_limit return gas_limit == min_gas_limit ``` @@ -399,7 +400,7 @@ bid at regular time intervals. This topic is used to propagate signed proposer preferences as `SignedProposerPreferences`. These messages allow validators to communicate -their preferred `fee_recipient` and `gas_limit` to builders. +their preferred `fee_recipient` and `target_gas_limit` to builders. The following validations MUST pass before forwarding the `signed_proposer_preferences` on the network, assuming the alias diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index 49b690c280..f2ef7c320e 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -127,9 +127,9 @@ A validator MAY broadcast `SignedProposerPreferences` messages to the `get_upcoming_proposal_slots(state, validator_index)`. These include any future proposal slots within the proposer lookahead, i.e. the current epoch up to `MIN_SEED_LOOKAHEAD` epochs ahead. This allows builders to construct execution -payloads with the validator's preferred `fee_recipient` and `gas_limit`. If a -validator does not broadcast a `SignedProposerPreferences` message, this implies -that the validator will not accept any trustless bids for that slot. +payloads with the validator's preferred `fee_recipient` and `target_gas_limit`. +If a validator does not broadcast a `SignedProposerPreferences` message, this +implies that the validator will not accept any trustless bids for that slot. ```python def get_upcoming_proposal_slots( @@ -161,8 +161,8 @@ To construct each `SignedProposerPreferences`: 4. Set `preferences.validator_index` to the validator's index. 5. Set `preferences.fee_recipient` to the execution address where the validator wishes to receive the builder payment. -6. Set `preferences.gas_limit` to the validator's preferred gas limit for this - execution payload. +6. Set `preferences.target_gas_limit` to the validator's preferred gas limit for + this execution payload. 7. Instantiate a new `SignedProposerPreferences` object as `signed_preferences`. 8. Set `signed_preferences.message` to `preferences`. 9. Set `signed_preferences.signature` to the result of