@@ -139,28 +139,25 @@ pub trait TransactionProcessingCallback {
139
139
Consumers can customize this plug-in to use their own Solana account source,
140
140
caching, and more.
141
141
142
- ### ` SanitizedTransaction `
142
+ ### ` SVMTransaction `
143
143
144
- A "sanitized" Solana transaction is a transaction that has undergone the
144
+ An SVM transaction is a transaction that has undergone the
145
145
various checks required to evaluate a transaction against the Solana protocol
146
146
ruleset. Some of these rules include signature verification and validation
147
147
of account indices (` num_readonly_signers ` , etc.).
148
148
149
- A ` SanitizedTransaction ` contains:
150
-
151
- - ` SanitizedMessage ` : Enum with two kinds of messages - ` LegacyMessage ` and
152
- ` LoadedMessage ` - both of which contain:
153
- - ` MessageHeader ` : Vector of ` Pubkey ` of accounts used in the transaction.
154
- - ` Hash ` of recent block.
155
- - Vector of ` CompiledInstruction ` .
156
- - In addition, ` LoadedMessage ` contains a vector of
157
- ` MessageAddressTableLookup ` - list of address table lookups to
158
- load additional accounts for this transaction.
159
- - A Hash of the message
160
- - A boolean flag ` is_simple_vote_tx ` - shortcut for determining if the
161
- transaction is merely a simple vote transaction produced by a validator.
162
- - A vector of ` Signature ` - the hash of the transaction message encrypted using
149
+ A ` SVMTransaction ` is a trait that can access:
150
+
151
+ - ` signatures ` : the hash of the transaction message encrypted using
163
152
the signing key (for each signer in the transaction).
153
+ - ` static_account_keys ` : Slice of ` Pubkey ` of accounts used in the transaction.
154
+ - ` account_keys ` : Pubkeys of all accounts used in the transaction, including
155
+ those from address table lookups.
156
+ - ` recent_blockhash ` : Hash of a recent block.
157
+ - ` instructions_iter ` : An iterator over the transaction's instructions.
158
+ - ` message_address_table_lookups ` : An iterator over the transaction's
159
+ address table lookups. These are only used in V0 transactions, for legacy
160
+ transactions the iterator is empty.
164
161
165
162
### ` TransactionCheckResult `
166
163
@@ -245,10 +242,10 @@ Steps of `load_and_execute_sanitized_transactions`
245
242
- Return the replenished local program cache.
246
243
247
244
2 . Load accounts (call to ` load_accounts ` function)
248
- - For each ` SanitizedTransaction ` and ` TransactionCheckResult ` , we:
245
+ - For each ` SVMTransaction ` and ` TransactionCheckResult ` , we:
249
246
- Calculate the number of signatures in transaction and its cost.
250
247
- Call ` load_transaction_accounts `
251
- - The function is interwined with the struct ` CompiledInstruction `
248
+ - The function is interwined with the struct ` SVMInstruction `
252
249
- Load accounts from accounts DB
253
250
- Extract data from accounts
254
251
- Verify if we've reached the maximum account data size
0 commit comments