MCPcopy Create free account
hub / github.com/SeismicSystems/summit / handle_proposal

Method handle_proposal

application/src/actor.rs:343–580  ·  view source on GitHub ↗
(
        &mut self,
        parent: (View, Digest),
        syncer: &mut SyncerMailbox<S, Block>,
        finalizer: &mut FinalizerMailbox<S, Block>,
        round: Round,
    )

Source from the content-addressed store, hash-verified

341 ?round,
342 parent_height,
343 ?parent_digest,
344 "certify: finalizer did not confirm parent on its chain (superseded, fork, or digest mismatch)"
345 );
346 return false;
347 }
348 }
349
350 #[cfg(feature = "prom")]
351 let check_start = std::time::Instant::now();
352
353 let valid = loop {
354 let status = match engine_client.check_payload(&block).await {
355 Ok(status) => status,
356 Err(e) => {
357 error!(
358 target: "critical",
359 ?round,
360 height = block.height(),
361 "certify: engine client error on check_payload: {e}"
362 );
363 #[cfg(feature = "prom")]
364 counter!("critical_errors_total", "reason" => "engine_client_error", "severity" => "critical")
365 .increment(1);
366 break false;
367 }
368 };
369 if status.is_syncing() {
370 warn!(
371 ?round,
372 height = block.height(),
373 "certify: execution client returned SYNCING, retrying"
374 );
375 #[cfg(feature = "prom")]
376 counter!("certify_syncing_total").increment(1);
377 context.sleep(CERTIFY_SYNCING_RETRY).await;
378 continue;
379 }
380 break status.is_valid();
381 };
382
383 #[cfg(feature = "prom")]
384 {
385 let elapsed = check_start.elapsed().as_millis() as f64;
386 histogram!("certify_check_payload_duration_millis").record(elapsed);
387 if !valid {
388 counter!("certify_invalid_total").increment(1);
389 }
390 }
391
392 if !valid {
393 warn!(
394 ?round,
395 height = block.height(),
396 "certify: payload rejected by execution client"
397 );
398 }
399 valid
400 };

Callers

nothing calls this directly

Calls 13

getMethod · 0.80
epochMethod · 0.80
notify_at_heightMethod · 0.80
get_aux_dataMethod · 0.80
lastMethod · 0.80
currentMethod · 0.80
timestampMethod · 0.80
viewMethod · 0.80
subscribeMethod · 0.45
heightMethod · 0.45
digestMethod · 0.45
start_building_blockMethod · 0.45

Tested by

no test coverage detected