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

--prefer-builder-proposals seems not working in local env #6418

Open
cwhcheng opened this issue Sep 20, 2024 · 3 comments
Open

--prefer-builder-proposals seems not working in local env #6418

cwhcheng opened this issue Sep 20, 2024 · 3 comments
Labels
builder API question Further information is requested

Comments

@cwhcheng
Copy link

Description

As mentioned in the doc, using --prefer-builder-proposals flag should force validator client to always prefer blinded blocks, regardless of the payload value. I am using https://github.com/flashbots/builder-playground to create a local env and I add --prefer-builder-proposals flag below line 408 of https://github.com/flashbots/builder-playground/blob/main/main.go

A rbuilder is also running with a private mempool to build blocks. I try to put transactions with 0 priority fee in the private mempool. The validator always chooses its local block instead of the rbuilder block but it should always choose rbuilder block with --prefer-builder-proposals flag

Thanks in advance!

Version

v5.2.1

@alisonsmy
Copy link

Hi, I saw code comment said

If `prefer_builder_proposals` is true, set boost factor to `u64::MAX` to indicate a preference for builder payloads.

This would enhance the builder_boost_factor and ensure it consistently opts for the relay payload over the local one. However, the team set the builder_boost_factor to None before calling determine_and_fetch_payload when the block production version is BlindedV2. (beacon_node/execution_layer/src/lib.rs:840)

BlockProductionVersion::BlindedV2 => {
    let _timer = metrics::start_timer_vec(
        &metrics::EXECUTION_LAYER_REQUEST_TIMES,
        &[metrics::GET_BLINDED_PAYLOAD],
    );
    self.determine_and_fetch_payload(
        parent_hash,
        payload_attributes,
        forkchoice_update_params,
        builder_params,
        current_fork,
        None, // this is builder_boost_factor
        spec,
    )
    .await?
}

@michaelsproul
Copy link
Member

You need to use the blockv3 API in order for the builder flags to work. Lighthouse v5.3.0 uses v3 by default.

@michaelsproul
Copy link
Member

In prior versions you need --produce-block-v3 as a flag on the VC.

@michaelsproul michaelsproul added question Further information is requested builder API labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder API question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants