Skip to content

Commit

Permalink
Updated builder bid warning message (#9007)
Browse files Browse the repository at this point in the history
- Added the expected gas limit for clarity.

Signed-off-by: Paul Harris <paul.harris@consensys.net>
  • Loading branch information
rolfyone authored Jan 17, 2025
1 parent 477080a commit 461653e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- Remove delay when fetching blobs from the local EL on block arrival
- New validator metric `validator_next_attestation_slot` to highlight the next slot that a validator is expected to publish an attestation [#8795](https://github.com/Consensys/teku/issues/8795)
- Support for SSZ format in builder API (mev-boost)
- Added the expected gas limit to the 'not honouring the validator gas limit preference' warning message.

### Bug Fixes
- Fix `--version` command output [#8960](https://github.com/Consensys/teku/issues/8960)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void validateBuilderBid(
final UInt64 expectedGasLimit = expectedGasLimit(parentGasLimit, preferredGasLimit);
if (!expectedGasLimit.equals(preferredGasLimit)) {
eventLogger.builderBidNotHonouringGasLimit(
parentGasLimit, proposedGasLimit, preferredGasLimit);
parentGasLimit, proposedGasLimit, expectedGasLimit, preferredGasLimit);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ void shouldLogEventIfGasLimitDoesNotDecrease() throws BuilderBidValidationExcept

verify(eventLogger)
.builderBidNotHonouringGasLimit(
UInt64.valueOf(1024_000), UInt64.valueOf(1024_000), UInt64.valueOf(1020_000));
UInt64.valueOf(1024_000),
UInt64.valueOf(1024_000),
UInt64.valueOf(1023_001),
UInt64.valueOf(1020_000));
}

@Test
Expand All @@ -220,7 +223,10 @@ void shouldLogEventIfGasLimitDoesNotIncrease() throws BuilderBidValidationExcept

verify(eventLogger)
.builderBidNotHonouringGasLimit(
UInt64.valueOf(1024_000), UInt64.valueOf(1020_000), UInt64.valueOf(1028_000));
UInt64.valueOf(1024_000),
UInt64.valueOf(1020_000),
UInt64.valueOf(1024_999),
UInt64.valueOf(1028_000));
}

static Stream<Arguments> expectedGasLimitPermutations() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,14 @@ public void depositContractLogsSyncingDisabled() {
}

public void builderBidNotHonouringGasLimit(
final UInt64 parentGasLimit, final UInt64 proposedGasLimit, final UInt64 preferredGasLimit) {
final UInt64 parentGasLimit,
final UInt64 proposedGasLimit,
final UInt64 targetGasLimit,
final UInt64 preferredGasLimit) {
String reorgEventLog =
String.format(
"Builder proposed a bid not honouring the validator gas limit preference. Parent: %s - Proposed: %s - Preferred: %s",
parentGasLimit, proposedGasLimit, preferredGasLimit);
"Builder proposed a bid not honouring the validator gas limit preference. Parent: %s - Proposed: %s - Expected %s - Target: %s",
parentGasLimit, proposedGasLimit, targetGasLimit, preferredGasLimit);
warn(reorgEventLog, Color.YELLOW);
}

Expand Down

0 comments on commit 461653e

Please sign in to comment.