Skip to content

Conversation

@bitwiseguy
Copy link
Contributor

This is a 2-part pr:

  1. Ensure the same seed is used for setup and spam phases. This allows us to run setup such as minting tokens for a pool of spammers accounts, 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 a from_all_accounts field to the scenario struct so that, when set to true, a tx is sent from every account in the from_pool. This allows us to, for example, mint tokens for every account in the from_pool via single [[setup]] block instead of having to duplicate it for each sender account.
  2. Updates campaign mode handling of --redeploy and --skip-setup flags so that it mirrors the behavior of contender spam commands (for both builtin and toml-based scenarios)

Copy link
Member

@zeroXbrock zeroXbrock left a 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

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>,
Copy link
Member

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?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants