feat(fynd-core): expose BlockStepController for gated block ingestion#243
Open
kayibal wants to merge 3 commits into
Open
feat(fynd-core): expose BlockStepController for gated block ingestion#243kayibal wants to merge 3 commits into
kayibal wants to merge 3 commits into
Conversation
Threads tycho-simulation's new BlockStepController (propeller-heads/tycho#1067) through the Fynd solver pipeline so callers can pause block processing for deterministic testing and controlled ingestion. New API: - `FyndBuilder::build_with_step_controller()` — async method returning `(Solver, BlockStepController)`. The feed runs in step-controlled mode: each block is buffered until the caller calls `trigger_next_block()`. - `BlockStepController` is re-exported from `fynd_core` alongside `PendingBlockProcessor`. - New `SolverBuildError::StepControllerChannelClosed` error variant. Blocked on next tycho-simulation release after 0.302.0 that includes BlockStepController. Once published, bump the workspace constraint and run `cargo check --workspace` to update the lockfile. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…port tycho-simulation 0.305.0 and tycho-execution 0.305.0 are now published with BlockStepController available in the evm::stream module. The 0.305.x release changed the protocol stream return type to be !Unpin; fix all three run* methods in TychoFeed to Box::pin the stream at construction so that tokio::select! futures remain Unpin. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Combines PendingBlockProcessor and BlockStepController into a single build method for callers that need both. Adds the corresponding run_with_pending_and_step_controller feed method which calls with_step_controller() on the builder before build_with_pending(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FyndBuilder::build_with_step_controller()— an async builder method that returns(Solver, BlockStepController). The Tycho feed runs in step-controlled mode: each incoming block is buffered and held until the caller callscontroller.trigger_next_block().BlockStepControllerfromfynd_core(alongsidePendingBlockProcessor) so consumers don't need to import fromtycho_simulationdirectly.SolverBuildError::StepControllerChannelClosedfor the case where the feed task panics before delivering the controller.The implementation follows the same pattern as
build_with_pending: aoneshotchannel delivers theBlockStepControllerfromTychoFeed::run_with_step_controllerback to the builder before the event loop starts.Upstream: propeller-heads/tycho#1067 (merged).
Usage
Dependency
Blocked on the next
tycho-simulationrelease after0.302.0that includesBlockStepController. Once published:tycho-simulation = ">=<NEW_VERSION>"inCargo.toml(workspace dependencies).cargo check --workspaceto updateCargo.lock.Test plan
tycho-simulationcrates.io release withBlockStepControllercargo check --workspacepasses./check.shto confirm no regressions🤖 Generated with Claude Code