mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 04:31:51 +00:00
Append client version info to graffiti (#7558)
* #7201 Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io> Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com> Co-Authored-By: Jimmy Chen <jimmy@sigmaprime.io> Co-Authored-By: Tan Chee Keong <tanck2005@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ use crate::{
|
||||
add_ssz_content_type_header, beacon_response, inconsistent_fork_rejection,
|
||||
},
|
||||
};
|
||||
use beacon_chain::graffiti_calculator::GraffitiSettings;
|
||||
use beacon_chain::{
|
||||
BeaconBlockResponseWrapper, BeaconChain, BeaconChainTypes, ProduceBlockVerification,
|
||||
};
|
||||
@@ -68,11 +69,13 @@ pub async fn produce_block_v3<T: BeaconChainTypes>(
|
||||
query.builder_boost_factor
|
||||
};
|
||||
|
||||
let graffiti_settings = GraffitiSettings::new(query.graffiti, query.graffiti_policy);
|
||||
|
||||
let block_response_type = chain
|
||||
.produce_block_with_verification(
|
||||
randao_reveal,
|
||||
slot,
|
||||
query.graffiti,
|
||||
graffiti_settings,
|
||||
randao_verification,
|
||||
builder_boost_factor,
|
||||
BlockProductionVersion::V3,
|
||||
@@ -148,11 +151,13 @@ pub async fn produce_blinded_block_v2<T: BeaconChainTypes>(
|
||||
})?;
|
||||
|
||||
let randao_verification = get_randao_verification(&query, randao_reveal.is_infinity())?;
|
||||
let graffiti_settings = GraffitiSettings::new(query.graffiti, query.graffiti_policy);
|
||||
|
||||
let block_response_type = chain
|
||||
.produce_block_with_verification(
|
||||
randao_reveal,
|
||||
slot,
|
||||
query.graffiti,
|
||||
graffiti_settings,
|
||||
randao_verification,
|
||||
None,
|
||||
BlockProductionVersion::BlindedV2,
|
||||
@@ -182,12 +187,13 @@ pub async fn produce_block_v2<T: BeaconChainTypes>(
|
||||
})?;
|
||||
|
||||
let randao_verification = get_randao_verification(&query, randao_reveal.is_infinity())?;
|
||||
let graffiti_settings = GraffitiSettings::new(query.graffiti, query.graffiti_policy);
|
||||
|
||||
let block_response_type = chain
|
||||
.produce_block_with_verification(
|
||||
randao_reveal,
|
||||
slot,
|
||||
query.graffiti,
|
||||
graffiti_settings,
|
||||
randao_verification,
|
||||
None,
|
||||
BlockProductionVersion::FullV2,
|
||||
|
||||
Reference in New Issue
Block a user