-
Notifications
You must be signed in to change notification settings - Fork 37
campaign: fix seed and flag behavior #419
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
base: main
Are you sure you want to change the base?
Conversation
zeroXbrock
left a comment
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.
Thanks @bitwiseguy! Nice work, really like these improvements. Just one request in the comments but otherwise lgtm
crates/cli/src/commands/setup.rs
Outdated
| pub eth_json_rpc_args: SendTxsCliArgsInner, | ||
| pub seed: RandSeed, | ||
| /// Number of accounts to create per agent pool. If None, defaults to 1. | ||
| pub accounts_per_agent: Option<u64>, |
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.
I wonder if it would be useful to have accounts_per_agent in SendTxsCliArgsInner instead (move it from common::SendSpamCliArgs, keeping the CLI flag features, and remove this ^ then-duplicate field). Doing this would allow it to be used for TOML-based setups, and not just in campaigns + spam, and reduce duplication. Wdyt?
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.
Yes good call. Pushed a commit for this change: 3a576ad
This is a 2-part pr:
spammersaccounts, then using that same pool of accounts in the spam phases so that they have all the tokens/approvals they need to execute txs. Complementary to that, we also add afrom_all_accountsfield to the scenario struct so that, when set to true, a tx is sent from every account in thefrom_pool. This allows us to, for example, mint tokens for every account in thefrom_poolvia single[[setup]]block instead of having to duplicate it for each sender account.--redeployand--skip-setupflags so that it mirrors the behavior ofcontender spamcommands (for both builtin and toml-based scenarios)