Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
4 changes: 2 additions & 2 deletions specs/gloas/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ to include. They produce a `SignedExecutionPayloadBid` as follows.
`get_proposer_dependent_root(parent_state, compute_epoch_at_slot(bid.slot))`,
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 match the `gas_limit` in the `SignedProposerPreferences` referenced in
step 6.
**MUST** satisfy `is_gas_limit_target_compatible` with respect to the
`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
Expand Down
1 change: 1 addition & 0 deletions specs/gloas/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def upgrade_to_gloas(pre: fulu.BeaconState) -> BeaconState:
# [New in Gloas:EIP7732]
latest_execution_payload_bid=ExecutionPayloadBid(
block_hash=pre.latest_execution_payload_header.block_hash,
gas_limit=pre.latest_execution_payload_header.gas_limit,
execution_requests_root=hash_tree_root(ExecutionRequests()),
),
# [New in Gloas:EIP7732]
Expand Down
16 changes: 8 additions & 8 deletions specs/gloas/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,8 @@ The following validations MUST pass before forwarding the
`signed_proposer_preferences` for the validated `SignedProposerPreferences`
whose `message.proposal_slot` is `bid.slot` and `message.dependent_root` is
`get_proposer_dependent_root(parent_state, compute_epoch_at_slot(bid.slot))`,
where `parent_block` is the block with block root equal to
`bid.parent_block_root`, `parent_state` is the post-state of `parent_block`, and
the alias `proposer_preferences = signed_proposer_preferences.message`.
where `parent_state` is the post-state of `bid.parent_block_root`, and the alias
`proposer_preferences = signed_proposer_preferences.message`:
Comment thread
nflaig marked this conversation as resolved.
Outdated

- _[IGNORE]_ `bid.slot` is the current slot or the next slot.
- _[IGNORE]_ The matching `signed_proposer_preferences` has been seen.
Expand All @@ -358,10 +357,10 @@ the alias `proposer_preferences = signed_proposer_preferences.message`.
- _[IGNORE]_ `bid.value` is less or equal than the builder's excess balance --
i.e. `can_builder_cover_bid(state, builder_index, amount)` returns `True`.
- _[IGNORE]_ `bid.parent_block_hash` is the block hash of a known execution
payload in fork choice. Let `parent_bid` be the `ExecutionPayloadBid` in the
beacon block such that `parent_bid.block_hash == bid.parent_block_hash`.
payload in fork choice. Let `parent_gas_limit` be the `gas_limit` of that
execution payload.
- _[IGNORE]_
`is_gas_limit_target_compatible(parent_bid.gas_limit, bid.gas_limit, proposer_preferences.gas_limit) == True`.
`is_gas_limit_target_compatible(parent_gas_limit, bid.gas_limit, proposer_preferences.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
Expand All @@ -376,8 +375,9 @@ def is_gas_limit_target_compatible(
"""
Check if the bid's gas limit is compatible with the proposer's preferences.
"""
min_gas_limit = parent_gas_limit - parent_gas_limit // 1024 + 1
max_gas_limit = parent_gas_limit + parent_gas_limit // 1024 - 1
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
Expand Down