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

Problem: number of idle_blocks is not configurable #1631

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions testground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ nix run .#stateless-testcase -- gen /tmp/data/out \
--fullnodes 0 \
--num-accounts 800 \
--num-txs 20 \
--num-idle 20 \
--app-patch '{"mempool": {"max-txs": -1}}' \
--config-patch '{"mempool": {"size": 100000}}' \
--tx-type erc20-transfer \
Expand Down
5 changes: 4 additions & 1 deletion testground/benchmark/benchmark/stateless.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def validate_json(ctx, param, value):
@click.option("--fullnodes", default=7)
@click.option("--num-accounts", default=10)
@click.option("--num-txs", default=1000)
@click.option("--num-idle", default=20)
@click.option("--tx-type", default="simple-transfer")
@click.option("--config-patch", default="{}", callback=validate_json)
@click.option("--app-patch", default="{}", callback=validate_json)
Expand All @@ -78,6 +79,7 @@ def _gen(
fullnodes: int = 7,
num_accounts: int = 10,
num_txs: int = 1000,
num_idle: int = 20,
tx_type: str = "simple-transfer",
validator_generate_load: bool = True,
config_patch: dict = None,
Expand Down Expand Up @@ -140,6 +142,7 @@ def _gen(
"fullnodes": fullnodes,
"num_accounts": num_accounts,
"num_txs": num_txs,
"num_idle": num_idle,
"tx_type": tx_type,
"validator-generate-load": validator_generate_load,
}
Expand Down Expand Up @@ -277,7 +280,7 @@ def do_run(
print("sent", len(txs), "txs")

# node quit when the chain is idle or halted for a while
detect_idle_halted(20, 20)
detect_idle_halted(cfg["num_idle"], 20)

with (home / "block_stats.log").open("w") as logfile:
dump_block_stats(logfile)
Expand Down
Loading