Skip to content

Conversation

zeroXbrock
Copy link
Member

@zeroXbrock zeroXbrock commented Aug 12, 2025

adds a new flag --contender.arg, which may be specified multiple times, that passes arbitrary args to contender, complete with default values and the ability to override them, as well as passing additional args.

example:

go run main.go cook l1 --contender --contender.arg "--tps 100" --contender.arg "-a 20"

to see that this is working, run docker ps, get the container ID of contender, then run docker logs $CONTAINER_ID. You should see 21 accounts getting funded (the default account always gets funded, maybe should fix), and 100 txs being sent. Something like this:

$ docker logs ffdd2bc90da3
2025-08-13T00:08:40.961364Z  INFO contender: 83: generating seed file at /root/.contender/seed
2025-08-13T00:08:40.986774Z  INFO contender::default_scenarios::fill_block: 57: Attempting to fill blocks with 36000000 gas; sending 100 txs, each with gas limit 360000.
2025-08-13T00:08:40.986788Z  INFO contender::commands::spam: 139: Initializing spammer...
2025-08-13T00:08:41.009647Z  WARN contender::util::utils: 127: No private keys provided. Using default private keys.
2025-08-13T00:08:41.014946Z  INFO contender::util::utils: 292: sending funding txs (21 accounts)...
2025-08-13T00:08:41.015161Z  INFO contender::util::utils: 329: waiting for funding tasks to finish...

note: you can also pass positional args, which enables you to run builtin scenarios, and pass them args if needed:

# run the builtin "storage" scenario, which fills lots of storage slots
go run main.go cook opstack --contender --contender.arg "--tps 40" --contender.arg "storage"

# write to 5000 slots (instead of the default 500)
go run main.go cook opstack --contender --contender.arg "--tps 40" \
--contender.arg "storage" --contender.arg "-s 5000"

@zeroXbrock zeroXbrock requested a review from SozinM August 12, 2025 19:27
@zeroXbrock zeroXbrock changed the title add --contender.tps flag add --contender.arg flag Aug 13, 2025
@zeroXbrock zeroXbrock requested a review from akundaz August 13, 2025 00:09
@SozinM SozinM merged commit b2cf72f into main Aug 13, 2025
8 checks passed
@SozinM SozinM deleted the feat/contender-tps-flag branch August 13, 2025 09:48
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