0xMiden / 0xMiden/protocol

Optimize input note num inputs/assets memory layout

Open
#2,256 2 comments 0 reactions 1 assignee Claimed by @hawkadrian View on GitHub
good first issue kernels
Dominant language
Rust
Stars
132
Forks
167
Avg merge
1d 23h
Merged PRs (30d)
110

Description

After #2109 is closed (to avoid merge conflicts), we should be able to make a tiny PR that moves these two constants closer together:

https://github.com/0xMiden/miden-base/blob/eee0e8450b825857e7d56ffebfaa269378a61aca/crates/miden-protocol/src/transaction/kernel/memory.rs#L388-L389

It should be possible to do:
```rust
pub const INPUT_NOTE_NUM_INPUTS_OFFSET: MemoryOffset = 36;
pub const INPUT_NOTE_NUM_ASSETS_OFFSET: MemoryOffset = 37;
pub const INPUT_NOTE_ASSETS_OFFSET: MemoryOffset = 40
```

This applies to `memory.masm` in the same way.

Context: https://github.com/0xMiden/miden-base/pull/2249#discussion_r2679280006

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.