Skip to content

feat(network-monitor): replace .masm asset files with inline Rust constants#2058

Closed
Ollie202 wants to merge 2 commits into0xMiden:mainfrom
Ollie202:ollie/monitor-rust-scripts
Closed

feat(network-monitor): replace .masm asset files with inline Rust constants#2058
Ollie202 wants to merge 2 commits into0xMiden:mainfrom
Ollie202:ollie/monitor-rust-scripts

Conversation

@Ollie202
Copy link
Copy Markdown

@Ollie202 Ollie202 commented May 7, 2026

Summary

Closes #1831

  • Inlines counter_program.masm as COUNTER_PROGRAM_CODE: &str constant in deploy/counter.rs
  • Introduces CounterComponent struct following the IncrNonceAuthComponent pattern from miden-standards, with a LazyLock-compiled Library and a From impl
  • Inlines increment_counter.masm as INCREMENT_NOTE_SCRIPT: &str constant in counter.rs
  • Deletes the two .masm asset files

The MASM logic is unchanged — only the delivery mechanism changes from external files to Rust constants, making the code easier to maintain and reducing the risk of protocol changes slipping through unnoticed.

Test plan

  • CI build and lint pass
  • Network monitor boots and counter increments as expected

Ollie202 added 2 commits May 7, 2026 06:11
Move counter_program.masm and increment_counter.masm out of the assets
directory and into Rust source as const strings. Introduce CounterComponent
following the IncrNonceAuthComponent pattern from miden-standards, with a
LazyLock-compiled Library and a From impl. The note script is similarly
inlined as INCREMENT_NOTE_SCRIPT in counter.rs.

Closes 0xMiden#1831
@Ollie202
Copy link
Copy Markdown
Author

Ollie202 commented May 7, 2026

Closing to reopen under the assigned contributor account.

@Ollie202 Ollie202 closed this May 7, 2026
@Ollie202 Ollie202 deleted the ollie/monitor-rust-scripts branch May 7, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant