-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Stop with HeapVector #9810
Conversation
Removing from draft to get size metrics |
Changes to public function bytecode sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
memory.checkTag(TypeTag.UINT32, returnSizeOffset); | ||
const returnSize = memory.get(returnSizeOffset).toNumber(); | ||
context.machineState.consumeGas(this.gasCost(returnSize)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are missing a check enforcing tag FF on the return memory range, stgh like:
memory.checkTagsRange(TypeTag.FIELD, returnOffset, returnSize);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in .cpp, but as I am working exactly on that I will do it as part of my PR.
I think tests should be passing now |
noir/noir-repo/compiler/noirc_evaluator/src/brillig/brillig_ir/instructions.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. One question on whether you intended to remove usage of "external stop" entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blocking temporarily as there's annoying conflicts on the sync which I don't want to worsen.
Updates the Brillig stop opcode to return a HeapVector (pointer + dynamic size). Also changes the transpiler, simulator and witness gen of the AVM to support it.