-
Notifications
You must be signed in to change notification settings - Fork 199
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
Use BundleAccountLocker when handling tip txs #143
Conversation
3602c0b
to
639798b
Compare
core/src/bundle_account_locker.rs
Outdated
read_locks: HashMap<Pubkey, u64>, | ||
write_locks: HashMap<Pubkey, u64>, | ||
) { | ||
let mut read_locks_l = self.read_locks.lock().unwrap(); | ||
let mut write_locks_l = self.write_locks.lock().unwrap(); | ||
let read_locks_l = &mut self.read_locks; |
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.
nit var name
core/src/bundle_stage.rs
Outdated
working_bank: bank, .. | ||
} = bank_start; | ||
|
||
) -> BundleExecutionResult<Vec<SanitizedTransaction>> { |
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.
why do we need to wrap the return in BundleExecutionResult
?
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.
get_configured_tip_receiver can return err
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.
actually brings up another bug here that i introduced, will fix
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.
the name's just confusing since no txs are really being executed here
&read_locks, | ||
&write_locks, | ||
); | ||
let batch = { |
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.
be extra safe here
…133) (#143) * add precompile signature metrics to cost tracker (#133) (cherry picked from commit 9770cd9) * merge fix * fmt --------- Co-authored-by: Tao Zhu <[email protected]> Co-authored-by: Tao Zhu <[email protected]>
Problem
We weren't previously locking any accounts related to processing tip receiver transactions. The consensus issues we've been seeing are what I believe to be a race condition between voting transactions that use the identity account and transactions involved with changing the tip receiver.
Summary of Changes
Use BundleAccountLocker to make sure all accounts involved in a tip transaction are locked
TODO