0xMiden / 0xMiden/miden-vm

Document values of constants using `insta`

未关闭
#2,221 3 条评论 2 个 reaction 已指派 1 人 已指派给 @Nashtare 在 GitHub 查看
documentation processor
主要语言
Rust
星标
772
派生
352
平均合并
1 天 12 小时
30 天内合并 PR
93

描述

We currently define many constants which are defined programmatically rather than using "magic numbers". This ensures for example that column indices are properly computed. Unfortunately, this also makes it hard to easily figure out what the values actually are. In my particular workflow, my IDE is not smart enough to actually compute and display the values.

While we should always update the docs whenever we make any changes that might affect things like trace widths and offsets, these must be done manually and are hard to check, and easily lead to outdated documentation.

The codebase is and should be the single source of truth when it comes to specification of our VM. We can make it easier to understand by writing tests using `insta` to document parameters such as
- the widths of all our traces along with their offsets
- the specific range of sets of columns for some chiplets (e.g. capacity portion of RPO inside the hasher chiplet)

The docs could then point to this specific test when trying to understand the structure of the VM.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。