Use `trace` for debugger events
- Linguagem predominante
- Rust
- Estrelas
- 115
- Forks
- 84
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 15
Descrição
### 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
Guia de contribuição
Direção de pesquisa
A issue trata da alteração dos eventos do depurador de eventos regulares para traces somente leitura no compilador Miden. Comece examinando o arquivo events.rs vinculado na issue para entender a estrutura atual de eventos. Em seguida, veja os manipuladores no-op na biblioteca principal (readonly.rs) para entender o que precisa ser removido. Verifique a documentação da Miden VM sobre traces vs. eventos para entender a diferença de custo de ciclos. O objetivo é substituir os eventos por traces e remover os manipuladores no-op, garantindo que o DebugExecutor ainda funcione corretamente.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Domínio
- compilers
- Tipo de issue
- Refatoração
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 55/100