Standardize the config note selector as an explicit "note variant"
- Dominant language
- Rust
- Stars
- 132
- Forks
- 167
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 110
Description
Follow-up to the discussion in [#3721](https://github.com/0xMiden/protocol/issues/3721), where we have talked on a consistent methodology for the notes we add from here on by @bobbinth
> Using the selector - I think this is probably the most robust approach and as we add more notes that exhibit different behavior under different contexts, we should encode the info in this selector (maybe we should call it "note variant").
This issue covers making that convention explicit:
- We should rename the `SELECTOR_*` constants in the config note scripts and the `selector()` helpers on the Rust side to `note_variant`.
- Document the rule in `note/config/mod.rs`: a note with more than one code path carries a
`note_variant` felt in its first storage item, and variants are contiguous values starting at 0 and
are mirrored by a Rust enum. The script asserts both that the variant is known and that the
storage item count matches that variant.
Contributor guide
Assessment
This issue has not been assessed yet.