Skip to content

Commit d2e565f

Browse files
authored
Merge branch 'master' into leolara/eip7732_checklist
2 parents 04dfbdc + 937a3a3 commit d2e565f

File tree

22 files changed

+402
-64
lines changed

22 files changed

+402
-64
lines changed

.github/workflows/checks.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2222
- name: Set up Python
23-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
23+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
2424
with:
2525
python-version-file: "pyproject.toml"
2626
- name: Install uv ${{ vars.UV_VERSION }}
27-
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
27+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
2828
with:
2929
enable-cache: true
3030
version: ${{ vars.UV_VERSION }}
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4141
- name: Check for trailing whitespace
4242
run: |
4343
if git grep -n '[[:blank:]]$'; then
@@ -49,9 +49,9 @@ jobs:
4949
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
5050
steps:
5151
- name: Checkout repository
52-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
52+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
5353
- name: Set up Python
54-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
54+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
5555
with:
5656
python-version-file: "pyproject.toml"
5757
- name: Check fork comments
@@ -61,13 +61,13 @@ jobs:
6161
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
6262
steps:
6363
- name: Checkout repository
64-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
64+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6565
- name: Set up Python
66-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
66+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
6767
with:
6868
python-version-file: "pyproject.toml"
6969
- name: Install uv ${{ vars.UV_VERSION }}
70-
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
70+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
7171
with:
7272
enable-cache: true
7373
version: ${{ vars.UV_VERSION }}
@@ -88,8 +88,9 @@ jobs:
8888
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
8989
steps:
9090
- name: Check PR title
91+
env:
92+
PR_TITLE: ${{ github.event.pull_request.title }}
9193
run: |
92-
PR_TITLE="${{ github.event.pull_request.title }}"
9394
9495
echo "Checking PR title: $PR_TITLE"
9596
@@ -155,13 +156,13 @@ jobs:
155156
- eip7928
156157
steps:
157158
- name: Checkout repository
158-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
159+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
159160
- name: Set up Python
160-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
161+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
161162
with:
162163
python-version-file: "pyproject.toml"
163164
- name: Install uv ${{ vars.UV_VERSION }}
164-
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
165+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
165166
with:
166167
enable-cache: true
167168
version: ${{ vars.UV_VERSION }}

.github/workflows/nightly-reftests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs]
2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3030
with:
3131
repository: ${{ inputs.repo }}
3232
path: "consensus-specs"
3333
ref: ${{ inputs.ref }}
3434
- name: Set up Python
35-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
35+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
3636
with:
3737
python-version-file: "consensus-specs/pyproject.toml"
3838
- name: Install uv ${{ vars.UV_VERSION }}
39-
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
39+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
4040
with:
4141
enable-cache: true
4242
version: ${{ vars.UV_VERSION }}

.github/workflows/nightly-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
- eip7928
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
39+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4040
- name: Set up Python
41-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
41+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
4242
with:
4343
python-version-file: "pyproject.toml"
4444
- name: Install uv ${{ vars.UV_VERSION }}
45-
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
45+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
4646
with:
4747
enable-cache: true
4848
version: ${{ vars.UV_VERSION }}

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
steps:
1818
# Clone specs
1919
- name: Checkout repository
20-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2121
with:
2222
path: "consensus-specs"
2323

2424
# Setup python
2525
- name: Set up Python
26-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
26+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
2727
with:
2828
python-version-file: "consensus-specs/pyproject.toml"
2929

3030
- name: Install uv ${{ vars.UV_VERSION }}
31-
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
31+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
3232
with:
3333
enable-cache: true
3434
version: ${{ vars.UV_VERSION }}
@@ -89,7 +89,7 @@ jobs:
8989

9090
# Upload spec test tarballs to the specs release
9191
- name: Upload spec test tarballs
92-
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
92+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
9393
with:
9494
tag_name: ${{ github.ref_name }}
9595
files: |

.github/workflows/website.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
16+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
1717

1818
- name: Set up Python
19-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
19+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
2020
with:
2121
python-version-file: "pyproject.toml"
2222

2323
- name: Install uv ${{ vars.UV_VERSION }}
24-
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
24+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
2525
with:
2626
enable-cache: true
2727
version: ${{ vars.UV_VERSION }}

specs/_features/eip8025/beacon-chain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ validation of execution payloads through cryptographic proofs.
5050

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

5555
## Configuration
5656

specs/bellatrix/validator.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,19 @@ To obtain an execution payload, a block proposer building a block on top of a
127127
`state` must take the following actions:
128128

129129
1. Set
130-
`payload_id = prepare_execution_payload(state, pow_chain, safe_block_hash, finalized_block_hash, suggested_fee_recipient, execution_engine)`,
130+
`payload_id = prepare_execution_payload(state, safe_block_hash, finalized_block_hash, suggested_fee_recipient, execution_engine, pow_chain)`,
131131
where:
132132
- `state` is the state object after applying `process_slots(state, slot)`
133133
transition to the resulting state of the parent block processing
134-
- `pow_chain` is a `Dict[Hash32, PowBlock]` dictionary that abstractly
135-
represents all blocks in the PoW chain with block hash as the dictionary
136-
key
137134
- `safe_block_hash` is the return value of the
138135
`get_safe_execution_block_hash(store: Store)` function call
139136
- `finalized_block_hash` is the block hash of the latest finalized execution
140137
payload (`Hash32()` if none yet finalized)
141138
- `suggested_fee_recipient` is the value suggested to be used for the
142139
`fee_recipient` field of the execution payload
140+
- `pow_chain` is a `Dict[Hash32, PowBlock]` dictionary that abstractly
141+
represents all blocks in the PoW chain with block hash as the dictionary
142+
key
143143

144144
```python
145145
def prepare_execution_payload(

specs/electra/validator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def compute_on_chain_aggregate(network_aggregates: Sequence[Attestation]) -> Att
142142
return Attestation(
143143
aggregation_bits=aggregation_bits,
144144
data=data,
145-
committee_bits=committee_bits,
146145
signature=signature,
146+
committee_bits=committee_bits,
147147
)
148148
```
149149

specs/fulu/das-core.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ def compute_matrix(blobs: Sequence[Blob]) -> Sequence[MatrixEntry]:
152152
MatrixEntry(
153153
cell=cell,
154154
kzg_proof=proof,
155-
row_index=blob_index,
156155
column_index=cell_index,
156+
row_index=blob_index,
157157
)
158158
)
159159
return matrix
@@ -181,8 +181,8 @@ def recover_matrix(
181181
MatrixEntry(
182182
cell=cell,
183183
kzg_proof=proof,
184-
row_index=blob_index,
185184
column_index=cell_index,
185+
row_index=blob_index,
186186
)
187187
)
188188
return matrix

specs/gloas/beacon-chain.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Gloas is a consensus-layer upgrade containing a number of features. Including:
8989

9090
| Name | Value |
9191
| ----------------------- | -------------------------- |
92-
| `DOMAIN_BEACON_BUILDER` | `DomainType('0x1B000000')` |
92+
| `DOMAIN_BEACON_BUILDER` | `DomainType('0x0B000000')` |
9393
| `DOMAIN_PTC_ATTESTER` | `DomainType('0x0C000000')` |
9494

9595
### Misc
@@ -315,7 +315,7 @@ class BeaconState(Container):
315315
# [New in Gloas:EIP7732]
316316
latest_block_hash: Hash32
317317
# [New in Gloas:EIP7732]
318-
latest_withdrawals_root: Root
318+
payload_expected_withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
319319
```
320320

321321
## Helper functions
@@ -738,16 +738,23 @@ def process_block(state: BeaconState, block: BeaconBlock) -> None:
738738

739739
##### New `is_builder_payment_withdrawable`
740740

741+
*Note*: Builder payments are immediately withdrawable if the builder is not
742+
slashed; this allows the builder to submit bids as soon as it becomes active. On
743+
the other hand, if the builder is slashed, builder payments cannot be made until
744+
after the builder's withdrawable epoch (which is set by the `slash_validator`
745+
function); this is a security measure to prevent a slashed builder from sending
746+
its stake to a colluding proposer before the appropriate penalties are applied.
747+
741748
```python
742749
def is_builder_payment_withdrawable(
743750
state: BeaconState, withdrawal: BuilderPendingWithdrawal
744751
) -> bool:
745752
"""
746-
Check if the builder is slashed and not yet withdrawable.
753+
Check if a builder payment is withdrawable.
747754
"""
748755
builder = state.validators[withdrawal.builder_index]
749756
current_epoch = compute_epoch_at_slot(state.slot)
750-
return builder.withdrawable_epoch >= current_epoch or not builder.slashed
757+
return not builder.slashed or current_epoch >= builder.withdrawable_epoch
751758
```
752759

753760
##### Modified `get_expected_withdrawals`
@@ -889,8 +896,7 @@ def process_withdrawals(
889896
withdrawals, processed_builder_withdrawals_count, processed_partial_withdrawals_count = (
890897
get_expected_withdrawals(state)
891898
)
892-
withdrawals_list = List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD](withdrawals)
893-
state.latest_withdrawals_root = hash_tree_root(withdrawals_list)
899+
state.payload_expected_withdrawals = List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD](withdrawals)
894900
for withdrawal in withdrawals:
895901
decrease_balance(state, withdrawal.validator_index, withdrawal.amount)
896902

@@ -1257,8 +1263,8 @@ def process_execution_payload(
12571263
assert committed_bid.blob_kzg_commitments_root == hash_tree_root(envelope.blob_kzg_commitments)
12581264
assert committed_bid.prev_randao == payload.prev_randao
12591265

1260-
# Verify the withdrawals root
1261-
assert hash_tree_root(payload.withdrawals) == state.latest_withdrawals_root
1266+
# Verify consistency with expected withdrawals
1267+
assert hash_tree_root(payload.withdrawals) == hash_tree_root(state.payload_expected_withdrawals)
12621268

12631269
# Verify the gas_limit
12641270
assert committed_bid.gas_limit == payload.gas_limit

0 commit comments

Comments
 (0)