Skip to content
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
7 changes: 6 additions & 1 deletion ci/testnet/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ def load(args, client_for, master, counter, nodes, read_nodes):
# others in a round; a rejected call is an answer, not a fault, and is counted on its own
rejected = [0]
lock = threading.Lock()
stop_at = time.time() + args.load_seconds
writers = list(range(1, nodes + 1))
accounts = {i: Account(hashlib.sha256(master.pk + b"contract writer %d" % i).digest()) for i in writers}
funder = Client(9090, 300)
Expand All @@ -323,10 +322,16 @@ def load(args, client_for, master, counter, nodes, read_nodes):
deadline = time.time() + 300
while time.time() < deadline and any(balance(funder, a.pk) < 1000 for a in accounts.values()):
time.sleep(5)
# the load window starts once the writers are funded (funding N accounts takes a block each)
stop_at = time.time() + args.load_seconds

def writer(i):
account = accounts[i]
period = len(writers) / args.write_rate if args.write_rate > 0 else None
# The writers start together and stay in step: their calls land in one block and run in one
# execution cycle of the contract. Spread over the period they land in separate blocks, and
# every call waits for the previous one's new state (about 6 rounds): with 2 calls a second
# the queue grows (scale run 39876040185: write p50 12.6 s at 9 nodes, 37 s at 51)
while period and time.time() < stop_at:
t0 = time.time()
ok = False
Expand Down
3 changes: 2 additions & 1 deletion ci/testnet/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ def key(k):
out.append(f" peak RSS of all nodes and executors together: {max(per_ts.values())} MB")

prog = [(num(r["t"]), num(r["seq_min"]), num(r["seq_max"])) for r in host]
prog = [p for p in prog if None not in p]
# from the first block on: before it the nodes start (and wait for their executors)
prog = [p for p in prog if None not in p and p[2] > 0]
if len(prog) > 1:
overall = (prog[-1][2] - prog[0][2]) / max(prog[-1][0] - prog[0][0], 1)
rates = [(b[2] - a[2]) / (b[0] - a[0]) for a, b in zip(prog, prog[1:]) if b[0] > a[0]]
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ lines under the new release.
| #72 | ci: contract reads on every node and a contract load phase; networks of up to 61 nodes with 5 to 25 initial confidants, stake-based election and nodes below the minimum stake; a scale workflow |
| #73 | api: the executor version check asks every second up to `executor_check_version_delay` instead of once after it (the node starts as soon as its executor answers); with `executor_multi_instance` a stopping node no longer kills the other nodes' executors |
| #74 | api: contract getters and the deployer's contract list take the deploy the smart contracts keep (a pruned node no longer has its block, and answered getters with an empty success); a getter with nothing to execute, or no executor, now fails |
| #75 | ci(testnet): the contract load window starts after funding its writers, block rates from the first block (found in the slowdown analysis of the scale runs) |

## community.9 — 2026-10-22

Expand Down
Loading