Closed maciejka closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
raito | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 10, 2024 1:03pm |
It would be nice to have this kind of inspection provided by the Cairo runtime :)
I wonder what would be the overhead if we replaced the context with an empty struct (Cairo seems to allow that) 🤔 Generally I really like the idea that you print the context only when you got an error, and that the context data kind is somewhat standardized.
Note also, that we will have a mutable context anyways (Utreexo and local cache), so it might not necessarily be an overhead in the end.
Closing for now, we will probably go simple logging macro route.
Draft of
TraceContext
. Maintains context which allows to construct more meaningful errors and trace messages.Initialization:
Errors:
Frame
struct is a very rough draft, subject for discussion.With macros or conditional compilation(to be added later to the prototype) most of the runtime cost can be eliminated for provable(vs test) executions.
Even with macros I don't see a clean way to get rid of explicit context argument. Any ideas? Maybe it is ok to add let's say 5% to the proving cost for current simplicity of the construction?