-
Notifications
You must be signed in to change notification settings - Fork 322
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: Inject fee payment update in base rollup #6403
Conversation
1c32bfd
to
75c75c0
Compare
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
Docs PreviewHey there! 👋 You can check your preview at https://664de539634e2bf5377a7c27--aztec-docs-dev.netlify.app |
5104f8f
to
74e0ae1
Compare
624e6a4
to
e1ec553
Compare
@@ -26,6 +26,8 @@ pub fn batch_insert<Value, Leaf, SubtreeWidth, SiblingPathLength, SubtreeHeight, | |||
// A permutation to the values is provided to make the insertion use only one insertion strategy | |||
check_permutation(values_to_insert, sorted_values, sorted_values_indexes); | |||
|
|||
// TODO: Shouldn't we check `sorted_values` is sorted? |
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.
@LeilaWang do you know if this is a missing check or it's indeed not needed?
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.
It doesn't necessary have to be sorted in increasing order. But the values need to be arranged in a way that the low leaf will be inserted before a value if both are pending. It's on the prover to decide how to create the array, as long as it's a permutation of values_to_insert
, which is checked above.
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.
We probably need better names cause I was confused for a bit 😂
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.
Makes sense, thanks! I'll remove this comment on the next PR.
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.
LGTM! 🚀
Had been disabled after #6403
87bf5e1
to
0ae0240
Compare
Had been disabled after #6403
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!
0ae0240
to
03677ab
Compare
Had been disabled after #6403
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @spalladino and the rest of your teammates on |
Benchmark resultsNo base data found for comparison. Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Proof generationEach column represents the number of threads used in proof generation.
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 kernel circuit run across all benchmarks.
Stats on running time collected for app circuits
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method | Metric | | Transaction processing duration by data writes.
|
03677ab
to
3082c4d
Compare
Had been disabled after #6403
Had been disabled after #6403
Had been disabled after #6403
Had been disabled after #6403
Had been disabled after #6403
Had been disabled after #6403
Had been disabled after #6403
Implements the fee payment update spec by charging the user's fee in the base rollup circuit. Involves the following changes:
protocol-public-data-writes
, which are data writes triggered by the protocol and not the user. We populate this in the base rollup circuit to charge thefee_payer
. Note that if nofee_payer
is sent, the tx goes through without paying (this will change once we enforce fees).fee_payer
's current balance.GasToken
contract now has nopay_fee
function anymore. Thepay_fee
functions in the FPC are now renamed topay_refund
GasToken
address is now a constant, since the base rollup circuit needs to know it to derive the slot for users balances. Because of this, theportal_address
is removed from theGasToken
constructor, so the address of the GasToken does not depend on its L1 counterpart, which would have made deployments more cumbersome.ACVM_FORCE_WASM
flag to tests to force using acvm wasm instead of binary, since the binary failed to report the assertion failed messages.fee_payer
(if set) has enough balance to pay for the tx before picking it up, assuming it consumes all its gas limits.Coming up on future PRs: