mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Change timeout and add debug log
This commit is contained in:
@@ -60,7 +60,7 @@ const WAITING_FOR_GENESIS_POLL_TIME: Duration = Duration::from_secs(12);
|
|||||||
const HTTP_ATTESTATION_TIMEOUT_QUOTIENT: u32 = 4;
|
const HTTP_ATTESTATION_TIMEOUT_QUOTIENT: u32 = 4;
|
||||||
const HTTP_ATTESTER_DUTIES_TIMEOUT_QUOTIENT: u32 = 4;
|
const HTTP_ATTESTER_DUTIES_TIMEOUT_QUOTIENT: u32 = 4;
|
||||||
const HTTP_ATTESTATION_SUBSCRIPTIONS_TIMEOUT_QUOTIENT: u32 = 24;
|
const HTTP_ATTESTATION_SUBSCRIPTIONS_TIMEOUT_QUOTIENT: u32 = 24;
|
||||||
const HTTP_ATTESTATION_AGGREGATOR_TIMEOUT_QUOTIENT: u32 = 3;
|
const HTTP_ATTESTATION_AGGREGATOR_TIMEOUT_QUOTIENT: u32 = 24;
|
||||||
const HTTP_LIVENESS_TIMEOUT_QUOTIENT: u32 = 4;
|
const HTTP_LIVENESS_TIMEOUT_QUOTIENT: u32 = 4;
|
||||||
const HTTP_PROPOSAL_TIMEOUT_QUOTIENT: u32 = 2;
|
const HTTP_PROPOSAL_TIMEOUT_QUOTIENT: u32 = 2;
|
||||||
const HTTP_PROPOSER_DUTIES_TIMEOUT_QUOTIENT: u32 = 4;
|
const HTTP_PROPOSER_DUTIES_TIMEOUT_QUOTIENT: u32 = 4;
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ async fn make_selection_proof<T: SlotClock + 'static, E: EthSpec>(
|
|||||||
spec: &ChainSpec,
|
spec: &ChainSpec,
|
||||||
distributed: bool,
|
distributed: bool,
|
||||||
beacon_nodes: &Arc<BeaconNodeFallback<T, E>>,
|
beacon_nodes: &Arc<BeaconNodeFallback<T, E>>,
|
||||||
|
duties_service: &DutiesService<T, E>,
|
||||||
) -> Result<Option<SelectionProof>, Error> {
|
) -> Result<Option<SelectionProof>, Error> {
|
||||||
let selection_proof = if distributed {
|
let selection_proof = if distributed {
|
||||||
// Submit a partial selection proof in the data field of the POST HTTP endpoint
|
// Submit a partial selection proof in the data field of the POST HTTP endpoint
|
||||||
@@ -146,17 +147,31 @@ async fn make_selection_proof<T: SlotClock + 'static, E: EthSpec>(
|
|||||||
};
|
};
|
||||||
// Call the endpoint /eth/v1/validator/beacon_committee_selections
|
// Call the endpoint /eth/v1/validator/beacon_committee_selections
|
||||||
// The middleware should return a full selection proof here
|
// The middleware should return a full selection proof here
|
||||||
|
let log = duties_service.context.log();
|
||||||
let response = beacon_nodes
|
let response = beacon_nodes
|
||||||
.first_success(|beacon_node| {
|
.first_success(|beacon_node| {
|
||||||
let selections = selection.clone();
|
let selections = selection.clone();
|
||||||
println!("Selection proof: {:?}", selections);
|
debug!(
|
||||||
|
log,
|
||||||
|
"Partial selection proof from VC";
|
||||||
|
"Validator index" => selections.validator_index,
|
||||||
|
"Slot" => selections.slot,
|
||||||
|
"Selection proof" => ?selections.selection_proof,
|
||||||
|
|
||||||
|
);
|
||||||
|
// println!("Selection proof: {:?}", selections);
|
||||||
async move {
|
async move {
|
||||||
let response = beacon_node
|
let response = beacon_node
|
||||||
.post_validator_beacon_committee_selections(&[selections])
|
.post_validator_beacon_committee_selections(&[selections])
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
println!("Response from middleware {:?}", response);
|
debug!(
|
||||||
|
log,
|
||||||
|
"Response from middleware";
|
||||||
|
"response" => ?response,
|
||||||
|
|
||||||
|
);
|
||||||
|
// println!("Response from middleware {:?}", response);
|
||||||
|
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
@@ -1148,6 +1163,7 @@ async fn fill_in_selection_proofs<T: SlotClock + 'static, E: EthSpec>(
|
|||||||
&duties_service.spec,
|
&duties_service.spec,
|
||||||
duties_service.distributed,
|
duties_service.distributed,
|
||||||
&duties_service.beacon_nodes,
|
&duties_service.beacon_nodes,
|
||||||
|
&duties_service,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
Ok((duty, opt_selection_proof))
|
Ok((duty, opt_selection_proof))
|
||||||
|
|||||||
Reference in New Issue
Block a user