Skip to content
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

Use root account in loadgen #4445

Open
ThomasBrady opened this issue Aug 28, 2024 · 3 comments
Open

Use root account in loadgen #4445

ThomasBrady opened this issue Aug 28, 2024 · 3 comments
Assignees

Comments

@ThomasBrady
Copy link
Contributor

Currently, LoadGenerator operations require an initial account creation step and the GeneratedLoadConfig for the operations require specification of offsets to utilize the created accounts as source accounts.
When LoadGenerator is start-ed, the mRoot account is initialized. Currently, the root account is only used to create other accounts. We should make it possible to utilize the mRoot account for loadgen operations. This would simplify loadgen usage by removing the extra account creation step and prevent footguns associated with specifying the correct offset in subsequent operations. In certain scenarios, this granular control is necessary, but for some operations, such as executing soroban network upgrades with loadgen, the exact account being used is irrelevant.

@MonsieurNicolas
Copy link
Contributor

we need multiple accounts because of the way transaction queues work, so I am not sure which part of loadgen would get simplified?

@ThomasBrady
Copy link
Contributor Author

ThomasBrady commented Aug 28, 2024

we need multiple accounts because of the way transaction queues work,

Ah, I see. TransactionQueue::mAccountStates has a map from AccountID to AccountState, which only contains at most one transaction (std::optional<TimestampedTx> mTransaction;), meaning its not possible to have two transactions with the same source account in the transaction queue at one time?

so I am not sure which part of loadgen would get simplified?

I agree for most load gen operations we will want simultaneous transaction processing (and therefore need source accounts for each transaction), but if we want to have a linear sequence of transactions processed then we can re-use the same account, and the account could be the root account. For example, this issue was motivated by needing to create accounts in order to do soroban network upgrades with loadgen. That being said, I'm not sure of other scenarios where root account access would be useful. cc @marta-lokhova

@marta-lokhova
Copy link
Contributor

the issue should track soroban upgrade loadgen modes only, where we don't need multiple accounts and can simply use the root account. right now this limitation creates unnecessary burden in the codebase/CI where we need to create accounts first before executing soroban upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants