0xMiden / 0xMiden/protocol

Avoid stack underflow in transaction kernel

Ouverte
#1,907 5 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
kernels
Langage dominant
Rust
Étoiles
132
Forks
167
Merge moyen
1 j 23 h
PR mergées (30 j)
110

Description

As a follow-up of #1902, we should investigate if and where in the transaction kernel we drop more felts from the VM stack than we should.

I have one question for @plafer in this context: Is there a way to inspect the `FastProcessor` state from within or outside to get the current buffer size or probably more precisely, where the "bottom" pointer points?
The main use would be to log this value during events (from the outside) or from within the VM to find places where a value was dropped.

Another idea might be to add a (temporary?) flag on the `FastProcessor` API that, if set, would cause the processor to abort the execution if an element was dropped while the current stack size was already <= 16, e.g. during a `(dyn)call`. _If_ I understand correctly, this would allow us to find the exact instructions (assuming an appropriate `SourceManager` is provided) that caused more elements to be dropped than should be allowed.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.