Skip to content

feat(debug): record advice mutations from event handlers for replay#2306

Draft
djolertrk wants to merge 10 commits into
0xMiden:mainfrom
walnuthq:fix/record
Draft

feat(debug): record advice mutations from event handlers for replay#2306
djolertrk wants to merge 10 commits into
0xMiden:mainfrom
walnuthq:fix/record

Conversation

@djolertrk

Copy link
Copy Markdown
Contributor

Addresses 0xMiden/miden-debug#93.

Basically follow up on the debuggers part: 0xMiden/miden-debug#96.

@igamigo

igamigo commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Is this related to the patch we discussed on the call or is that separate? If it is, the PR should probably target the main branch

djolertrk added 3 commits July 6, 2026 17:24
Attach the advice-mutation recorder to the DAP program executor so
every on_event invocation of the transaction host is captured during
the session, and report the number of recorded mutation sets when the
session ends. The recording always describes the final run: the engine
clears it whenever the DAP client restarts execution from the
beginning.
@djolertrk
djolertrk changed the base branch from next to main July 6, 2026 15:25
@djolertrk

Copy link
Copy Markdown
Contributor Author

Is this related to the patch we discussed on the call or is that separate? If it is, the PR should probably target the main branch

yes, thanks! heads up, please do not merge until 0xMiden/miden-debug#96 is done and debugger is released. Thanks!

// Record the advice mutations produced by the host's event handlers during the session.
// The recording describes the final (post-restart) run and is what an event-replay
// debugging session needs to re-execute this transaction without the original host.
let recorder = executor.record_event_mutations();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How can the recorded advice mutations be extracted and passed on to the debugger? self is consumed and the returned ExecutionOutput does not contain the recorded mutations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah, well I intentionally made this PR not ready, and added the sentence into the changelog file that this is groundwork, but yeah, let me prepare everything here (but I marked it as draft until we merge debugger PR)

let me update it now

@djolertrk
djolertrk marked this pull request as draft July 7, 2026 15:31
@igamigo

igamigo commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Hey @djolertrk, are we ready to open this PR now that miden-debug#96 is done?

@djolertrk

Copy link
Copy Markdown
Contributor Author

Hey @djolertrk, are we ready to open this PR now that miden-debug#96 is done?

yes yes, I am back. :) will do it

@djolertrk

djolertrk commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@igamigo the new debugger release is based on miden-vm v0.25, not sure if main is still a valid target here

Edit: or we could create a new point release of debugger, that is based on v0.23 VM

cc @bitwalker

@igamigo

igamigo commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

@igamigo the new debugger release is based on miden-vm v0.25, not sure if main is still a valid target here

Edit: or we could create a new point release of debugger, that is based on v0.23 VM

cc @bitwalker

I see. Yeah, we either merge this to next directly or we'd have to port the fix to the 0.23-compatible miden-debug.

@djolertrk

Copy link
Copy Markdown
Contributor Author

@igamigo the new debugger release is based on miden-vm v0.25, not sure if main is still a valid target here
Edit: or we could create a new point release of debugger, that is based on v0.23 VM
cc @bitwalker

I see. Yeah, we either merge this to next directly or we'd have to port the fix to the 0.23-compatible miden-debug.

But even client does not depend on the v0.25 VM, on the next branch, right? We will need to wait for it to be merged here as well...

@igamigo

igamigo commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

We have a branch that moves to VM 0.25 which should be merges soon, we can branch from there or wait (should be within today/tomorrow)

@djolertrk

Copy link
Copy Markdown
Contributor Author

We have a branch that moves to VM 0.25 which should be merges soon, we can branch from there or wait (should be within today/tomorrow)

hey @igamigo, please let me know once that PR is merged! Thank you!

@igamigo

igamigo commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

We have a branch that moves to VM 0.25 which should be merges soon, we can branch from there or wait (should be within today/tomorrow)

hey @igamigo, please let me know once that PR is merged! Thank you!

@djolertrk we merged this to next some hours ago!

@djolertrk

Copy link
Copy Markdown
Contributor Author

We have a branch that moves to VM 0.25 which should be merges soon, we can branch from there or wait (should be within today/tomorrow)

hey @igamigo, please let me know once that PR is merged! Thank you!

@djolertrk we merged this to next some hours ago!

Thanks @igamigo! I am working on a rebase.

Sign up for free to 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