Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set default builderBoostFactor to 90 #6568

Merged
merged 10 commits into from
Apr 10, 2024
4 changes: 2 additions & 2 deletions docs/pages/validator-management/vc-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ You may choose to use the `--strictFeeRecipientCheck` flag to enable a strict ch

If you are running a beacon node with connected builder relays, you may use these validator configurations to signal which block (builder vs. local execution) the beacon node should produce.

With produceBlockV3 (enabled automatically after the Deneb hard fork), the `--builder.boostFactor` is a percentage multiplier the block producing beacon node must apply to boost (>100) or dampen (<100) builder block value for selection against execution block. The multiplier is ignored if `--builder.selection` is set to anything other than `default`. Even though this is set on the validator client, the calculation is requested and applied on the beacon node itself. For more information, see the [produceBlockV3 Beacon API](https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/produceBlockV3).
With produceBlockV3 (enabled automatically after the Deneb hard fork), the `--builder.boostFactor` is a percentage multiplier the block producing beacon node must apply to boost (>100) or dampen (<100) builder block value for selection against execution block. The multiplier is ignored if `--builder.selection` is set to anything other than `maxprofit`. Even though this is set on the validator client, the calculation is requested and applied on the beacon node itself. For more information, see the [produceBlockV3 Beacon API](https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/produceBlockV3).

With Lodestar's `--builder.selection` validator options, you can select:

- `default`: Default setting for Lodestar set at `--builder.boostFactor=90`. This default setting will have a local block boost of ~10%. Note that this value might change in the future depending on what we think is the most appropriate value to help increase censorship resistance.
- `default`: Default setting for Lodestar set at `--builder.boostFactor=90`. This default setting will have a local block boost of ~10%. Note that this value might change in the future depending on what we think is the most appropriate value to help improve censorship resistance of Ethereum.
- `maxprofit`: An alias of `--builder.boostFactor=100`, which will always choose the more profitable block. Using this option, you may customize your `--builder.boostFactor` to your preference. Examples of its usage are below.
- `executionalways`: An alias of `--builder.boostFactor=0`, which will select the local execution block, unless it fails to produce due to an error or a delay in the response from the execution client.
- `executiononly`: Beacon node will be requested to produce local execution block even if builder relays are configured. This option will always select the local execution block and will error if it couldn't produce one.
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmds/validator/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const validatorOptions: CliCommandOptions<IValidatorCliArgs> = {
"builder.boostFactor": {
type: "string",
description:
"Percentage multiplier the block producing beacon node must apply to boost (>100) or dampen (<100) builder block value for selection against execution block. The multiplier is ignored if `--builder.selection` is set to anything other than `default` or `maxprofit`",
Copy link
Member

@nflaig nflaig Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have the default for users that do not change the defaults it makes more sense to only apply the manually set boost factor in case of maxprofit as it is anyhow a setting for more advanced users.

"Percentage multiplier the block producing beacon node must apply to boost (>100) or dampen (<100) builder block value for selection against execution block. The multiplier is ignored if `--builder.selection` is set to anything other than `maxprofit`",
defaultDescription: `${defaultOptions.builderBoostFactor}`,
group: "builder",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const testValue = {
feeRecipient: "0xcccccccccccccccccccccccccccccccccccccccc",
builder: {
gasLimit: 30000000,
selection: routes.validator.BuilderSelection.Default,
boostFactor: BigInt(90),
selection: routes.validator.BuilderSelection.MaxProfit,
boostFactor: BigInt(50),
},
},
};
Expand Down
8 changes: 4 additions & 4 deletions packages/validator/src/services/validatorStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const defaultOptions = {
defaultGasLimit: 30_000_000,
builderSelection: routes.validator.BuilderSelection.ExecutionOnly,
builderAliasSelection: routes.validator.BuilderSelection.Default,
builderBoostFactor: BigInt(90),
builderBoostFactor: BigInt(100),
// spec asks for gossip validation by default
broadcastValidation: routes.beacon.BroadcastValidation.gossip,
// should request fetching the locally produced block in blinded format
Expand Down Expand Up @@ -268,12 +268,12 @@ export class ValidatorStore {
let boostFactor;
switch (selection) {
case routes.validator.BuilderSelection.Default:
boostFactor =
(this.validators.get(pubkeyHex)?.builder || {}).boostFactor ?? this.defaultProposerConfig.builder.boostFactor;
boostFactor = BigInt(90);
break;

case routes.validator.BuilderSelection.MaxProfit:
boostFactor = (this.validators.get(pubkeyHex)?.builder || {}).boostFactor ?? BigInt(100);
boostFactor =
(this.validators.get(pubkeyHex)?.builder || {}).boostFactor ?? this.defaultProposerConfig.builder.boostFactor;
break;

case routes.validator.BuilderSelection.BuilderAlways:
Expand Down
8 changes: 4 additions & 4 deletions packages/validator/test/unit/services/block.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ describe("BlockDutiesService", function () {
signature: signedBlock.signature,
}));
validatorStore.getBuilderSelectionParams.mockReturnValue({
selection: routes.validator.BuilderSelection.Default,
boostFactor: BigInt(90),
selection: routes.validator.BuilderSelection.MaxProfit,
boostFactor: BigInt(100),
});
validatorStore.getGraffiti.mockReturnValue("aaaa");
validatorStore.getFeeRecipient.mockReturnValue("0x00");
Expand Down Expand Up @@ -107,10 +107,10 @@ describe("BlockDutiesService", function () {
false,
{
feeRecipient: "0x00",
builderSelection: routes.validator.BuilderSelection.Default,
builderSelection: routes.validator.BuilderSelection.MaxProfit,
strictFeeRecipientCheck: false,
blindedLocal: false,
builderBoostFactor: BigInt(90),
builderBoostFactor: BigInt(100),
},
]);
});
Expand Down
Loading