Merged
Conversation
a05c0d6 to
b3de3bb
Compare
…ode, and use saturating arithmetic when calculating the gas price for the operator to prevent potential underflow issues.
b3de3bb to
3c8f35a
Compare
shamatar
reviewed
Feb 23, 2026
| *limb = unsafe { <u64 as UsizeDeserializable>::from_iter(src).unwrap_unchecked() }; | ||
| let mut new = MaybeUninit::uninit(); | ||
| unsafe { | ||
| Self::init_from_iter(&mut new, src)?; |
Member
There was a problem hiding this comment.
This one should be taken with care, as on 32 bit architecture it may be 5 words, so topmost bits of storage will not be initialized (and B160 == [u64; 3] with zero top bits)
Contributor
There was a problem hiding this comment.
We explicitly deserialize limbs as u64 values:
So it has to be encoded as 3 u64 or 6 u32 values
basic_bootloader/src/bootloader/transaction_flow/zk/process_l1_transaction.rs
Outdated
Show resolved
Hide resolved
| self.btree.clear(); | ||
| self.state.next_snapshot_id = CacheSnapshotId(1); | ||
| self.state.frozen_snapshot_id = CacheSnapshotId(0); | ||
| self.state.pending_updated_elements = StackLinkedList::empty(self.state.alloc.clone()); |
Contributor
There was a problem hiding this comment.
Note: here we'll still have deallocations and allocations (same is true for the commit() function). This is not extremely important, but theoretically we can optimize it in future
Contributor
|
Would be nice to add some tests |
05615d7 to
c2c60b1
Compare
Contributor
Author
|
@0xVolosnikov added a couple more regression tests. The rest of the changes I don't think need one, but happy to add one if you disagree |
0xVolosnikov
approved these changes
Feb 25, 2026
Contributor
Benchmark report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What ❔
Fixes for the latest review from Audittens
Why ❔
Is this a breaking change?
Checklist