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

Method step

actions/harness/src/node.rs:438–472  ·  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

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

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