-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Support sending VersionedTransaction in tests #22862
Conversation
/// Return pubkeys referenced by all instructions, with the ones needing signatures first. If the | ||
/// payer key is provided, it is always placed first in the list of signed keys. Read-only signed | ||
/// accounts are placed last in the set of signed accounts. Read-only unsigned accounts, | ||
/// including program ids, are placed last in the set. No duplicates and order is preserved. |
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.
need to update this comment
signed_keys, | ||
unsigned_keys, | ||
address_table_keys, | ||
address_table_lookups, // TODO: remove empty ones |
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.
Remove references to address lookup tables that were not needed by any instruction's accounts.
Err(err) | ||
// TODO: Can't verify precompiles without looking up address map accounts... | ||
//} else if let Err(err) = transaction.verify_precompiles(feature_set) { | ||
// Err(err) |
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.
Check if verify_precompiles is possible because program accounts are guaranteed to be in the static list?
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This is not stale. The PR is still needed to write tests with address lookup tables. |
@jstarry Great, so this PR can be closed? |
Yeah feel free, I'll likely borrow your bank api changes still but will do that in another PR |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This stale pull request has been automatically closed. Thank you for your contributions. |
Problem
VersionedTransaction
from instructions and address lookup tables.banks-client
Bank
rejected them because it didn't support receiving transactions with address maps frombanks-server
Summary of Changes
prepare_entry_batch()
inBank
to deal with lookup table addresses.process_versioned_transaction_with_commitment_and_context()
etc tobanks-{interface,client,server}
for use in tests.v0::Message::new_*
functions to conveniently make instances.Open questions
verify_versioned_transaction()
in banks_server:For non-versioned transactions there's a
transaction.verify_precompiles()
that I haven't transfered over yet. Are program addresses guaranteed to be in the static address list, and not come from address lookup tables?v0::Message::new_*()
functions.I copied liberally from the legacy message but think naming could be better.
pub struct AddressLookupTable
in versions/v0/mod.rs.I need information about the contents of the lookup tables to be able to go from
Instruction
toCompiledInstruction
. Is there an existing data structure I should use instead?@jstarry