-
Notifications
You must be signed in to change notification settings - Fork 237
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(avm-mini): add sub, mul, div and error handling for finite fields #3612
Conversation
d517dac
to
7ba180c
Compare
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Values are compared against data from master at commit L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every circuit run across all benchmarks.
MiscellaneousTransaction sizes based on how many contracts are deployed in the tx.
|
barretenberg/cpp/src/barretenberg/vm/generated/AvmMini_composer.test.cpp
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.
nice
Could you please provide a description of the PR? As in "this adds opcodes for the AVM Mini ... ". Makes it easier to follow what PRs are about |
trace_builder.add(4, 5, 5); | ||
trace_builder.add(5, 5, 5); | ||
trace_builder.add(5, 6, 7); | ||
// Memory layout: [0,0,45,23,12,0,0,0,....] |
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.
Could you add comments that would explain what you are testing? Documenting intentions is helpful further down the line, when somebody will need to support this code
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.
Sure. A subsequent PR will be about multiple unit tests and will be commented.
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.
Everything looks good, please just add some comments in places I've highlighted
AztecProtocol#3612) Resolves AztecProtocol#3546 Resolves AztecProtocol#3548 ### Description This PR introduces the following opcodes for the finite field type: - SUB: subtraction - MUL: multiplication - DIV: division For division, error is raised whenever the numerator is zero. A boolean column op_err was introduced for this purpose.
Resolves #3546
Resolves #3548
Description
This PR introduces the following opcodes for the finite field type:
For division, error is raised whenever the numerator is zero. A boolean column op_err was introduced for this purpose.