Skip to content

smite-scenarios: convert execute fn into Executor struct - #117

Merged
morehouse merged 1 commit into
lnfuzz:masterfrom
NishantBansal2003:executor-struct
Jun 10, 2026
Merged

smite-scenarios: convert execute fn into Executor struct#117
morehouse merged 1 commit into
lnfuzz:masterfrom
NishantBansal2003:executor-struct

Conversation

@NishantBansal2003

Copy link
Copy Markdown
Contributor

ref: #111 (comment)

Move execution state into an Executor struct that owns the resources used during program execution. This prepares for future changes that will add channel state to the executor, maintaining a ChannelId -> ChannelState mapping so IR operations can read and mutate channel-specific state throughout execution.

Now, during the funding flow, we can add a ChannelState field that is populated during BuildFundingCreated and later used to verify the signature received in RecvFundingSigned (See: #103 (comment)).

@ekzyisekzyis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nit: commit message mentions "owns the resources", but I think "borrow" is more accurate

Comment threadsmite-scenarios/src/scenarios/ir.rs Outdated

fn run(&mut self, input: &[u8]) -> ScenarioResult {
let start = std::time::Instant::now();
let mut bitcoin_cli = self.target.bitcoin_cli().clone();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could move this to where it's needed?

@NishantBansal2003
NishantBansal2003force-pushed the executor-struct branch 2 times, most recently from ff628b8 to dc5480cCompareJune 9, 2026 06:22

@ekzyisekzyis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK dc5480c

CI failure looks unrelated, should work on force-push:

build (eclair)
ERROR: Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded

Comment threadsmite-scenarios/src/executor.rs Outdated
Comment threadsmite-scenarios/src/executor.rs Outdated
Comment threadsmite-scenarios/src/executor.rs Outdated
Comment threadsmite-scenarios/src/executor.rs Outdated
Move execution state into an Executor struct that encapsulates the
state and handles required during program execution.
This prepares for future changes that will add channel state to the
executor, maintaining a ChannelId -> ChannelState mapping so IR
operations can read and mutate channel-specific state throughout
execution.
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>

@morehousemorehouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morehouse
morehouse merged commit cc5edd5 into lnfuzz:masterJun 10, 2026
5 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@NishantBansal2003@morehouse@ekzyis