Databus programs panic with `MemoryInit block type must be Memory` in Noir→R1CS compilation
Nobody has claimed this yet.
- Dominant language
- Noir
- Stars
- 138
- Forks
- 47
- Avg merge
- 1d 34m
- Merged PRs (30d)
- 6
Description
Description
Databus-style programs trigger a panic during Noir-to-R1CS compilation when they use calldata or returndata block types in memory initialization. Only Memory block type is accepted, which is more restrictive than ACIR's spec.
Details
- Panic location:
noir_to_r1cs.rs#L469 - Opcode:
Opcode::MemoryInit - ACIR block types:
Memory,CallData(u32),ReturnData- acir/src/circuit/opcodes.rs#L25
- acir/src/circuit/opcodes.rs#L112
- Provekit code only accepts:
BlockType::Memory
Impact
Databus-oriented circuits (using calldata/returndata memory semantics) panic during the prepare step in r1cs-compiler.
Error:
MemoryInit block type must be Memory
This prevents compiling and proving valid programs leveraging the expanded ACIR memory semantics.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at r1cs-compiler/src/noir_to_r1cs.rs around line 469 and trace handling for Opcode::MemoryInit during the prepare step. Compare the accepted BlockType behavior with ACIR's Memory, CallData(u32), and ReturnData definitions. Done means valid databus-style programs using calldata or returndata compile without the reported panic.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, cryptography
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100