Conversation
There was a problem hiding this comment.
Hey @greenhat, nice work on this migration!
The skill file changes conflict with my PR #36 (Miden Day feedback corrections). I think the cleanest path is:
- I'll get #36 merged first (it's smaller and focused on content corrections, once you approve of course)
- Then you rebase #37 on top, which should auto-merge the testing-patterns file and leave 2 manual conflicts (patterns + pitfalls)
For the conflict resolution, I think we want to keep your v0.14 API updates and also preserve the still-valid Miden Day pitfalls (Felt::new Result, NoteType construction, note-to-component boundaries, note input immutability) with updated terminology.
I also let my AI agent run through the skill file changes to catch potential inaccuracies. It flagged 3 things in the inline comments below. Let me know if any of those are off.
Thanks!
| // CORRECT for business logic — compare as integers | ||
| if balance.as_u64() > threshold.as_u64() { ... } | ||
| if balance.as_canonical_u64() > threshold.as_canonical_u64() { ... } | ||
| - [ ] `Recipient::compute(...)` replaced with `note::build_recipient(...)` |
There was a problem hiding this comment.
Looks like a stray checklist item from editing. The Recipient::compute replacement is correctly documented in P8 below. This line should be remove
| | `StorageValue<T>` | Single typed slot (flags, counters, IDs) | `.get() -> T` | `.set(T) -> T` | | ||
| | `StorageMap<K, V>` | Typed key-value mapping (balances, records) | `.get(K) -> V` | `.set(K, V) -> V` | | ||
|
|
||
| **Storage keys** are always `Word` (4 Felts). Use `Word::from_u64_unchecked(a, b, c, d)` or `Word::from([f0, f1, f2, f3])`. |
There was a problem hiding this comment.
I think Word::from_u64_unchecked(a, b, c, d) doesn't exist on the Word type (checked miden-field v0.23.0 source). The code examples below correctly use Word::new([felt!(0), ...]) and Word::try_from([0_u64, ...]). I think this paragraph should be updated to match. (It's also stale in the compiler's own doc comments in output_note.rs, so might be worth a follow-up fix there too.)
There was a problem hiding this comment.
My PR #36 adds pitfalls P8-P14 covering Miden Day findings (Felt::new returning Result, NoteType variant construction, note-to-component call boundaries, note input immutability). Some of these are still valid in v0.14 and should be preserved during the rebase. Happy to help with the conflict resolution if needed.
|
Thank you! Fixed. |
…:Felt` and remove `miden-core` dependency
next branch commit
c3a8256 to
290fbed
Compare
TODO:
cargo-midenand move git tag;miden-clientv0.14;