Skip to content

Commit 522f25b

Browse files
authored
Merge of #5352
2 parents 06eb181 + 15f4013 commit 522f25b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

beacon_node/http_api/src/produce_block.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ use warp::{
2020
Reply,
2121
};
2222

23+
/// If default boost factor is provided in validator/blocks v3 request, we will skip the calculation
24+
/// to keep the precision.
25+
const DEFAULT_BOOST_FACTOR: u64 = 100;
26+
2327
pub fn get_randao_verification(
2428
query: &api_types::ValidatorBlocksQuery,
2529
randao_reveal_infinity: bool,
@@ -52,14 +56,19 @@ pub async fn produce_block_v3<T: BeaconChainTypes>(
5256
})?;
5357

5458
let randao_verification = get_randao_verification(&query, randao_reveal.is_infinity())?;
59+
let builder_boost_factor = if query.builder_boost_factor == Some(DEFAULT_BOOST_FACTOR) {
60+
None
61+
} else {
62+
query.builder_boost_factor
63+
};
5564

5665
let block_response_type = chain
5766
.produce_block_with_verification(
5867
randao_reveal,
5968
slot,
6069
query.graffiti,
6170
randao_verification,
62-
query.builder_boost_factor,
71+
builder_boost_factor,
6372
BlockProductionVersion::V3,
6473
)
6574
.await

0 commit comments

Comments
 (0)