-
Notifications
You must be signed in to change notification settings - Fork 259
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
SVM: Group transaction processing environment #1650
Conversation
a73fb17
to
1d88262
Compare
1d88262
to
7c42678
Compare
7c42678
to
becfec3
Compare
@buffalojoec could you run a node against MNB with this PR? I don't suspect this change to cause any divergence, but it's modifying some part of the transaction processing. So it'll be great to have some coverage there. |
Yep, no problem. I'll spin up a node right now and let it run overnight. |
Node seems to be still running healthy for ~16 hours. ID: I'll continue running another >14 hours to cross the next epoch boundary. |
Node continues to hum along through the epoch boundary! |
* SVM: introduce `TransactionProcessingEnvironment` * SVM: fold `blockhash` and `lamports_per_signature` into env * SVM: fold `rent_collector` into env * SVM: fold `feature_set` into env * SVM: fold `epoch_stake` into env
Problem
The
TransactionBatchProcessorCallbacks
trait is required for callers who wishto use the
TransactionBatchProcessor
. It provides the batch processor with ameans for loading accounts, as well as retrieving information about the runtime
environment.
The
TransactionBatchProcessor
already requires a handful of runtimeconfigurations in its global config, as well as as inputs to
load_and_execute_sanitized_transactions
.It would be easier for downstream users of the transaction batch processor if we
coalesced runtime environment configurations.
Summary of Changes
First introduce the
TransactionProcessingEnvironment
as a required input tothe transaction batch processor.
Then, remove environment-related callbacks from
TransactionBatchProcessorCallbacks
in favor of the provided environmentobject.