Skip to content

Commit

Permalink
Set DEFAULT_BUILDER_BID_COMPARE_FACTOR to 90 (#8108)
Browse files Browse the repository at this point in the history
Co-authored-by: Enrico Del Fante <[email protected]>
  • Loading branch information
fredriksvantes and tbenr authored Mar 21, 2024
1 parent c93c873 commit 344b134
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ the [releases page](https://github.com/Consensys/teku/releases).
- `—p2p-private-key-file` command line option supports reading a binary private key file.
- Updated libp2p seen cache configuration to reflect EIP-7045 spec changes. This reduces CPU and network bandwidth consumption.
- Increased the attestation cache capacity to allow teku a bigger pool of attestations when block building.
- Set DEFAULT_BUILDER_BID_COMPARE_FACTOR to 90. This makes it necessary for external block builders to give at least 10% additional profit compared to a local build before being taken into consideration. If you would like to go back to the previous default, execute the client with --builder-bid-compare-factor=100

### Bug Fixes
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package tech.pegasys.teku.services.executionlayer;

import static com.google.common.base.Preconditions.checkState;
import static tech.pegasys.teku.ethereum.executionlayer.ExecutionBuilderModule.BUILDER_BOOST_FACTOR_MAX_PROFIT;
import static tech.pegasys.teku.ethereum.executionlayer.ExecutionBuilderModule.BUILDER_BOOST_FACTOR_PREFER_BUILDER;
import static tech.pegasys.teku.spec.executionlayer.ExecutionLayerChannel.STUB_ENDPOINT_PREFIX;

Expand All @@ -35,7 +34,7 @@ public class ExecutionLayerConfiguration {
public static final int DEFAULT_BUILDER_CIRCUIT_BREAKER_ALLOWED_FAULTS = 5;
public static final int DEFAULT_BUILDER_CIRCUIT_BREAKER_ALLOWED_CONSECUTIVE_FAULTS = 3;
public static final int BUILDER_CIRCUIT_BREAKER_WINDOW_HARD_CAP = 64;
public static final UInt64 DEFAULT_BUILDER_BID_COMPARE_FACTOR = BUILDER_BOOST_FACTOR_MAX_PROFIT;
public static final UInt64 DEFAULT_BUILDER_BID_COMPARE_FACTOR = UInt64.valueOf(90);
public static final boolean DEFAULT_BUILDER_SET_USER_AGENT_HEADER = true;
public static final boolean DEFAULT_USE_SHOULD_OVERRIDE_BUILDER_FLAG = true;
public static final boolean DEFAULT_EXCHANGE_CAPABILITIES_MONITORING_ENABLED = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatCode;
import static tech.pegasys.teku.ethereum.executionlayer.ExecutionBuilderModule.BUILDER_BOOST_FACTOR_MAX_PROFIT;
import static tech.pegasys.teku.ethereum.executionlayer.ExecutionBuilderModule.BUILDER_BOOST_FACTOR_PREFER_BUILDER;
import static tech.pegasys.teku.services.executionlayer.ExecutionLayerConfiguration.BUILDER_ALWAYS_KEYWORD;
import static tech.pegasys.teku.services.executionlayer.ExecutionLayerConfiguration.DEFAULT_BUILDER_BID_COMPARE_FACTOR;

import org.junit.jupiter.api.Test;
import tech.pegasys.teku.infrastructure.exceptions.InvalidConfigurationException;
Expand Down Expand Up @@ -87,7 +87,7 @@ public void shouldParseBuilderBidCompareFactor() {
public void shouldHaveCorrectDefaultBuilderBidCompareFactor() {
final ExecutionLayerConfiguration.Builder builder1 = configBuilder.specProvider(bellatrixSpec);
assertThat(builder1.build().getBuilderBidCompareFactor())
.isEqualByComparingTo(BUILDER_BOOST_FACTOR_MAX_PROFIT);
.isEqualByComparingTo(DEFAULT_BUILDER_BID_COMPARE_FACTOR);
}

@Test
Expand Down

0 comments on commit 344b134

Please sign in to comment.