-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Description
The helper function create_accounts in tools-common/src/accounts_creator.rs:create_accounts() creates new accounts <= num_accounts argument provided to the function
The current functionality of the function is that it first gets rpc_client.get_latest_blockhash() on each loop and creates batches of transactions, and sending the txns to the rpc and then adding to the created_accounts vec
But design wise, it's not going to be able to avoid rate limit by the rpc based on the following observations:
- Each loop calls the
rpc_client.get_latest_blockhash()function, which is fine, but blockhash are valid for 150 slots(which is ~60 sec), more then enough to create all the accounts even if it's called once. - The
create_transaction_batchfunction returns aVec<Transactions>, each having a singlesystem_program::create_accountinstruction. which are then sent to thesend_transaction_batchfunction, which concurrently sends all the transactions(separately). imo, we can put up to 7 such instruction per transaction(adhering to1232 byteslimit in a solana transaction). This will avoid rate limits presented by the rpc calls
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels