Skip to content

Commit 50be3d3

Browse files
Bring back getBeaconProposerIndex validation for Fulu (#9823)
1 parent 7fa6cbf commit 50be3d3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Changelog
22

33
## Upcoming Breaking Changes
4-
- `GOSSIP_MAX_SIZE` and `MAX_CHUNK_SIZE` will be removed from config items post fusaka.
5-
- `TTFB_TIMEOUT` and `RESP_TIMEOUT` will be removed from config items post fusaka.
4+
- `GOSSIP_MAX_SIZE`, `MAX_CHUNK_SIZE`, `TTFB_TIMEOUT` and `RESP_TIMEOUT` configuration variables will NOT be supported after the Fusaka Mainnet release. These variables should be removed from any custom network configs.
65

76
## Current Releases
87

@@ -13,9 +12,9 @@
1312
### Additions and Improvements
1413
- Enabled, by default, a new attestation pool implementation that improves the attestation packing during block and aggregation production. It can still be disabled by setting `--Xaggregating-attestation-pool-v2-enabled=false` if needed
1514
- Added `--p2p-discovery-bootnodes-url` CLI option.
16-
- Updated LUKSO configuration with Electra fork scheduled for epoch 190800 (September 17th, 2025, 16:20:00 UTC)
15+
- Updated `LUKSO` configuration with Electra fork scheduled for epoch `190800` (September 17th, 2025, 16:20:00 UTC)
1716
- Avoid builder validator registration calls potentially delaying block production builder calls.
18-
- removed `TTFB_TIMEOUT` and `RESP_TIMEOUT` from configuration in line with consensus-specs #4532
17+
- Removed `TTFB_TIMEOUT` and `RESP_TIMEOUT` from the default network configurations in line with https://github.com/ethereum/consensus-specs/pull/4532
1918

2019
### Bug Fixes
2120
- Limited the allowed time to wait for fork choice before proceeding with attestation duties, and added a development flag to adjust the timing if required.

ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/BeaconStateAccessors.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ public int getBeaconProposerIndex(final BeaconState state, final UInt64 requeste
218218
.get(
219219
requestedSlot,
220220
slot -> {
221-
UInt64 epoch = miscHelpers.computeEpochAtSlot(slot);
222-
Bytes32 seed =
221+
final UInt64 epoch = miscHelpers.computeEpochAtSlot(slot);
222+
final Bytes32 seed =
223223
Hash.sha256(getSeed(state, epoch, Domain.BEACON_PROPOSER), uint64ToBytes(slot));
224-
IntList indices = getActiveValidatorIndices(state, epoch);
224+
final IntList indices = getActiveValidatorIndices(state, epoch);
225225
return miscHelpers.computeProposerIndex(state, indices, seed);
226226
});
227227
}
@@ -238,7 +238,7 @@ public boolean isInactivityLeak(final BeaconState state) {
238238
return isInactivityLeak(getFinalityDelay(state));
239239
}
240240

241-
private void validateStateCanCalculateProposerIndexAtSlot(
241+
protected void validateStateCanCalculateProposerIndexAtSlot(
242242
final BeaconState state, final UInt64 requestedSlot) {
243243
final UInt64 epoch = miscHelpers.computeEpochAtSlot(requestedSlot);
244244
final UInt64 stateEpoch = getCurrentEpoch(state);

ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/fulu/helpers/BeaconStateAccessorsFulu.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public BeaconStateAccessorsFulu(
4141

4242
@Override
4343
public int getBeaconProposerIndex(final BeaconState state, final UInt64 requestedSlot) {
44+
validateStateCanCalculateProposerIndexAtSlot(state, requestedSlot);
4445
final int lookaheadIndex = requestedSlot.mod(configFulu.getSlotsPerEpoch()).intValue();
4546
return BeaconStateFulu.required(state)
4647
.getProposerLookahead()

0 commit comments

Comments
 (0)