Use `trace` for debugger events
- Ngôn ngữ chính
- Rust
- Star
- 115
- Fork
- 84
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 15
Mô tả
### Discussed in https://github.com/0xMiden/compiler/discussions/1313
Originally posted by **mooori** August 8, 2026
After the removal of traces we turned debug traces into events:
https://github.com/0xMiden/compiler/blob/6195153c50b689648a635390e948496ce324c5f3/codegen/masm/src/events.rs#L19-L24
Only the `DebugExecutor` cares about these events. However, most `Host`s error on observing an event for which no handler is registered. So we added [no-op handlers](https://github.com/0xMiden/miden-vm/blob/next/crates/lib/core/src/handlers/readonly.rs) for these events to the core library.
In the meantime readonly events were added, called `trace` as well. We have two options now:
#### A) Keep regular events
Maintain the existing state, relying on the no-op handlers in core lib to avoid errors in hosts other than `DebugExecutor`.
- Pro: More efficient in terms of cycles
- Con: Relies on no-op handlers
#### B) Change to traces (readonly events)
Make the events above traces and remove the no-op handlers from the core library.
- Pro: Cleaner solution, not relying on no-op handlers
- Con: 2 extra cycles per trace compared to regular event
Hướng dẫn đóng góp
Hướng nghiên cứu
The issue is about changing debugger events from regular events to readonly traces in the Miden compiler. Start by examining the events.rs file linked in the issue to understand the current event structure. Then, look at the no-op handlers in the core library (readonly.rs) to see what needs to be removed. Check the Miden VM documentation on traces vs. events to understand the cycle cost difference. The goal is to replace the events with traces and remove the no-op handlers, ensuring the DebugExecutor still works correctly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- compilers
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100