Skip to content

Commit

Permalink
Problem: number of idle_blocks is not configurable (#1631)
Browse files Browse the repository at this point in the history
allow wait longer when timeout_commit is small
  • Loading branch information
mmsqe authored Oct 9, 2024
1 parent ac4652d commit 4dda39e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit 4dda39e

Please sign in to comment.