MCPcopy Create free account
hub / github.com/base/base / step

Method step

actions/harness/src/node.rs:445–479  ·  view source on GitHub ↗

Perform one complete derivation-and-execution cycle. Drains any pending gossip first, then performs one pipeline step. When the pipeline produces derived attributes they are executed through the engine and the safe head is advanced.

(&mut self)

Source from the content-addressed store, hash-verified

443 /// the pipeline produces derived attributes they are executed through the
444 /// engine and the safe head is advanced.
445 pub async fn step(&mut self) -> NodeStepResult {
446 self.drain_gossip();
447
448 let result = self.pipeline.step(self.safe_head).await;
449 match result {
450 StepResult::PreparedAttributes => {
451 let Some(attrs) = self.pipeline.next() else {
452 return NodeStepResult::AdvancedOrigin;
453 };
454 self.execute_and_advance(attrs).await;
455 NodeStepResult::DerivationProgress
456 }
457 StepResult::AdvancedOrigin => NodeStepResult::AdvancedOrigin,
458 StepResult::StepFailed(err) => match err {
459 PipelineErrorKind::Temporary(PipelineError::Eof) => NodeStepResult::Idle,
460 PipelineErrorKind::Temporary(
461 PipelineError::NotEnoughData | PipelineError::ChannelReaderEmpty,
462 ) => NodeStepResult::AdvancedOrigin,
463 err => panic!("TestRollupNode: pipeline error: {err}"),
464 },
465 StepResult::OriginAdvanceErr(err) => match err {
466 PipelineErrorKind::Temporary(PipelineError::Eof | PipelineError::Provider(_)) => {
467 NodeStepResult::Idle
468 }
469 PipelineErrorKind::Reset(ResetError::HoloceneActivation) => {
470 self.pipeline
471 .signal(ActivationSignal { l2_safe_head: self.safe_head }.signal())
472 .await
473 .expect("TestRollupNode: Holocene activation signal failed");
474 NodeStepResult::AdvancedOrigin
475 }
476 err => panic!("TestRollupNode: origin advance error: {err}"),
477 },
478 }
479 }
480
481 /// Execute exactly one pipeline step and return the raw [`StepResult`].
482 ///

Callers 4

act_l2_pipeline_stepMethod · 0.45
act_l2_pipeline_untilMethod · 0.45
run_until_idleMethod · 0.45

Calls 4

drain_gossipMethod · 0.80
execute_and_advanceMethod · 0.80
nextMethod · 0.45
signalMethod · 0.45