forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 261
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
TransactionBatch - hold RuntimeTransaction #3041
Merged
apfitzge
merged 9 commits into
anza-xyz:master
from
apfitzge:sep30_big_runtime_transaction_transition
Nov 4, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c309b8e
RuntimeTransaction::try_create
apfitzge bfb09f6
use RuntimeTransaction
apfitzge 7df13fe
remove broken test - runtime transaction verifies this doesn't happen
apfitzge 3303c0f
Use MessageHash
apfitzge abc2691
SVMTransactionAdapter
apfitzge 2c50748
use SVMTransactionAdapter for as_sanitized_transaction
apfitzge 9f67c71
fix newly added test
apfitzge 9787bbe
Add dcou derive clone and revert some test changes
apfitzge b5c2255
re-add test w/ runtime cost-model failure
apfitzge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,10 @@ use { | |
transaction_batch::TransactionBatch, | ||
verify_precompiles::verify_precompiles, | ||
}, | ||
solana_runtime_transaction::instructions_processor::process_compute_budget_instructions, | ||
solana_runtime_transaction::{ | ||
instructions_processor::process_compute_budget_instructions, | ||
runtime_transaction::RuntimeTransaction, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also how come |
||
}, | ||
solana_sdk::{ | ||
clock::{FORWARD_TRANSACTIONS_TO_LEADER_AT_SLOT_OFFSET, MAX_PROCESSING_AGE}, | ||
fee::FeeBudgetLimits, | ||
|
@@ -228,7 +231,7 @@ impl Consumer { | |
&self, | ||
bank: &Arc<Bank>, | ||
bank_creation_time: &Instant, | ||
sanitized_transactions: &[SanitizedTransaction], | ||
sanitized_transactions: &[RuntimeTransaction<SanitizedTransaction>], | ||
banking_stage_stats: &BankingStageStats, | ||
slot_metrics_tracker: &mut LeaderSlotMetricsTracker, | ||
) -> ProcessTransactionsSummary { | ||
|
@@ -284,7 +287,7 @@ impl Consumer { | |
&self, | ||
bank: &Arc<Bank>, | ||
bank_creation_time: &Instant, | ||
transactions: &[SanitizedTransaction], | ||
transactions: &[RuntimeTransaction<SanitizedTransaction>], | ||
) -> ProcessTransactionsSummary { | ||
let mut chunk_start = 0; | ||
let mut all_retryable_tx_indexes = vec![]; | ||
|
@@ -386,7 +389,7 @@ impl Consumer { | |
pub fn process_and_record_transactions( | ||
&self, | ||
bank: &Arc<Bank>, | ||
txs: &[SanitizedTransaction], | ||
txs: &[RuntimeTransaction<SanitizedTransaction>], | ||
chunk_offset: usize, | ||
) -> ProcessTransactionBatchOutput { | ||
let mut error_counters = TransactionErrorMetrics::default(); | ||
|
@@ -429,7 +432,7 @@ impl Consumer { | |
pub fn process_and_record_aged_transactions( | ||
&self, | ||
bank: &Arc<Bank>, | ||
txs: &[SanitizedTransaction], | ||
txs: &[RuntimeTransaction<SanitizedTransaction>], | ||
max_ages: &[MaxAge], | ||
) -> ProcessTransactionBatchOutput { | ||
let move_precompile_verification_to_svm = bank | ||
|
@@ -473,7 +476,7 @@ impl Consumer { | |
fn process_and_record_transactions_with_pre_results( | ||
&self, | ||
bank: &Arc<Bank>, | ||
txs: &[SanitizedTransaction], | ||
txs: &[RuntimeTransaction<SanitizedTransaction>], | ||
chunk_offset: usize, | ||
pre_results: impl Iterator<Item = Result<(), TransactionError>>, | ||
) -> ProcessTransactionBatchOutput { | ||
|
@@ -803,7 +806,7 @@ impl Consumer { | |
/// * `pending_indexes` - identifies which indexes in the `transactions` list are still pending | ||
fn filter_pending_packets_from_pending_txs( | ||
bank: &Bank, | ||
transactions: &[SanitizedTransaction], | ||
transactions: &[RuntimeTransaction<SanitizedTransaction>], | ||
pending_indexes: &[usize], | ||
) -> Vec<usize> { | ||
let filter = | ||
|
@@ -887,7 +890,7 @@ mod tests { | |
signature::Keypair, | ||
signer::Signer, | ||
system_instruction, system_program, system_transaction, | ||
transaction::{MessageHash, Transaction, VersionedTransaction}, | ||
transaction::{Transaction, VersionedTransaction}, | ||
}, | ||
solana_svm::account_loader::CheckedTransactionDetails, | ||
solana_timings::ProgramTiming, | ||
|
@@ -902,6 +905,7 @@ mod tests { | |
thread::{Builder, JoinHandle}, | ||
time::Duration, | ||
}, | ||
transaction::MessageHash, | ||
}; | ||
|
||
fn execute_transactions_with_dummy_poh_service( | ||
|
@@ -2059,7 +2063,7 @@ mod tests { | |
}); | ||
|
||
let tx = VersionedTransaction::try_new(message, &[&keypair]).unwrap(); | ||
let sanitized_tx = SanitizedTransaction::try_create( | ||
let sanitized_tx = RuntimeTransaction::try_create( | ||
tx.clone(), | ||
MessageHash::Compute, | ||
Some(false), | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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 there a reason that
execute_and_commit_transactions_locked
is recomputing the compute budget details still rather than using them from runtime tx?