Skip to content

fix: reject zero-valued RPC limits to prevent chunks(0) panic - #2398

Merged
igamigo merged 2 commits into
0xMiden:nextfrom
dumanoglu1:fix/reject-zero-rpc-limits
Aug 20, 2026
Merged

fix: reject zero-valued RPC limits to prevent chunks(0) panic#2398
igamigo merged 2 commits into
0xMiden:nextfrom
dumanoglu1:fix/reject-zero-rpc-limits

Conversation

@dumanoglu1

Copy link
Copy Markdown
Contributor

What changed

Reject zero-valued RPC limits while converting the node GetLimits response into RpcLimits, and add a regression test for a zero note_id limit.

Why

The client uses these limits as chunk sizes for note IDs, tags, nullifier prefixes, and account IDs. Rust's slice::chunks(0) panics, so a malformed node response could crash the client instead of returning an RPC conversion error.

Fixes #2394

Validation

  • git diff --check -- crates/rust-client/src/rpc/domain/limits.rs
  • cargo test -p miden-client rejects_zero_limits_from_rpc_response -- --nocapture could not complete locally because miden-node-proto-build failed before reaching this test: remote_prover.proto is not in any include path.
  • cargo check -p miden-client --no-default-features hit the same dependency build-script failure.

@igamigo

igamigo commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

@dumanoglu1 can you fix the CI checks?

@dumanoglu1

Copy link
Copy Markdown
Contributor Author

Pushed 2915b2a to fix the CI compile/format issues from the regression test. The new pull_request workflow runs are currently marked �ction_required, so they need maintainer approval before GitHub Actions will execute them.

@igamigo igamigo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@igamigo
igamigo merged commit 319d49d into 0xMiden:next Aug 20, 2026
18 of 19 checks passed
midasbal pushed a commit to midasbal/rust-sdk that referenced this pull request Aug 20, 2026
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.

Client panics when node reports a zero RPC limit

2 participants