Skip to content
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

TransactionView: ReceiveAndBuffer #3820

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

apfitzge
Copy link

Problem

  • Need to ingest new tx type into banking stage

Summary of Changes

  • Implement a new TransactionViewReceiveAndBuffer to allow banking stage to ingest TransactionView-based transactions
  • Add argument to BankingStage::new to switch between transaction representations
  • Hook up CLI for validator and relevant benchmarks
  • Run all BankingStage and SchedulerController tests using both options

Fixes #

@apfitzge apfitzge force-pushed the new_receive_and_buffer_2024_11_26 branch 4 times, most recently from 2876a3f to c868ff5 Compare November 27, 2024 17:17
type Transaction = RuntimeTransaction<ResolvedTransactionView<Bytes>>;
type Container = TransactionViewStateContainer;

fn receive_and_buffer_packets(
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: this does not run the bank.check_transactions because I prioritized safety around not leaking Bytes in the container, which is much trickier if we do batching.
We should probably follow this up with a call to clean immediately after, so that we check age on transactions we actually inserted, which is likely better anyway. However, I'd like to profile with and without that change first.

@apfitzge apfitzge marked this pull request as ready for review December 2, 2024 18:50
@apfitzge apfitzge requested a review from a team as a code owner December 2, 2024 18:50
@apfitzge apfitzge self-assigned this Dec 2, 2024
if container.is_empty()
&& matches!(
decision,
BufferedPacketsDecision::Forward | BufferedPacketsDecision::ForwardAndHold
Copy link
Author

@apfitzge apfitzge Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed Hold branch here. Sometimes after a leader slot, we do not have a bank ready in Consume for our next leader slot. We should still avoid the recv_timeout in that case. Also added a check that container is not empty - if container has items, then we should try to process them instead of sleeping for packets

@apfitzge apfitzge force-pushed the new_receive_and_buffer_2024_11_26 branch from f87bd2f to 2d9cc88 Compare December 3, 2024 17:54
Copy link

@pgarg66 pgarg66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from SVM point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants