-
Notifications
You must be signed in to change notification settings - Fork 206
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
Bundles #20
Bundles #20
Conversation
)) | ||
.is_err() | ||
{ | ||
if let Ok((record, sender)) = record { |
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.
revert some of this
tx_account_locks.writable, | ||
tx_account_locks.readonly, | ||
); | ||
if matches!(locked, Err(TransactionError::AccountInUse)) { |
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.
double check there can't be other errors; need to ensure contiguous batch
core/src/banking_stage.rs
Outdated
} | ||
} | ||
|
||
fn get_bundle_txs(bundle: Bundle, bank: &Arc<Bank>) -> 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.
wdyt about adding this as a method on the Bundle
object ++ rename to something like get_txs
, extract_txs
etc.?
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 guess it's just a wrapper around transactions_from_packets
which set precedent on defining here; your call
core/src/banking_stage.rs
Outdated
} = &*working_bank_start.unwrap(); | ||
|
||
// Process + send one bundle at a time | ||
// TODO (LB): probably want to lock all the other tx procesing pipelines (except votes) until this is done |
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.
Is locking what would theoretically guarantee top of block inclusion?
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 so, without locking other stages seems like you may have a situation where a bundle is fragmented within a block
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.
locking mainly about preventing other reads and writes that would invalidate cache. bundle will never be fragmented bc its written in a batch to poh
self.num_hashes = 0; | ||
self.remaining_hashes -= 1; | ||
PohEntry { | ||
num_hashes, |
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.
after the first iteration this will always be 1
, is that the desired behavior? also it's not immediately clear to me why it was set to 0 in the base branch revision, mind giving some color offline or here?
self.hash = hashv(&[self.hash.as_ref(), m.as_ref()]); | ||
let num_hashes = self.num_hashes + 1; | ||
self.num_hashes = 0; | ||
self.remaining_hashes -= 1; |
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.
micro-optimization, but why not just move this outside the map
and just self.remaining_hashes -= mixins.len()
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.
if optimized at all haha, just tryna squeeze out some juice
73d599c
to
5812ae9
Compare
Previously TPU and TPU forward addresses were passed via CLI args, now the validator requests TPU addresses from the validator interface it connects to.
TPU Proxy Receiver (#10) credits to @whistlinwilly Fetch TPU proxy address on connection (#20) Previously TPU and TPU forward addresses were passed via CLI args, now the validator requests TPU addresses from the validator interface it connects to. removed submodule fixes
Problem
Validator can't guarantee sequential, all-or-nothing transaction bundle processing.
Summary of Changes
TX Flow
BankingStage::bundle_stage
thread.PoH