feat(zeam): thread --chain-worker flag from ZEAM_CHAIN_WORKER env#170
Merged
ch4r10t33r merged 1 commit intomainfrom May 6, 2026
Merged
feat(zeam): thread --chain-worker flag from ZEAM_CHAIN_WORKER env#170ch4r10t33r merged 1 commit intomainfrom
ch4r10t33r merged 1 commit intomainfrom
Conversation
576883d to
52a577a
Compare
ch4r10t33r
requested changes
May 6, 2026
Contributor
ch4r10t33r
left a comment
There was a problem hiding this comment.
Changes are needed in ansible/roles as well
52a577a to
0b26232
Compare
Adds an env-gated --chain-worker {on|off} flag for the slice c-2c part 2
burn-in on devnet4 (zeam #803). Threaded through both deployment paths:
1. client-cmds/zeam-cmd.sh: reads ZEAM_CHAIN_WORKER env, validates
against {on, off, empty}, appends --chain-worker <val> to
node_binary and node_docker only when explicitly set. Used by
spin-node.sh and any direct script-driven runs.
2. ansible/roles/zeam (defaults + tasks): new zeam_chain_worker
ansible variable (empty default), threaded into the docker run
templated command so the live devnet4 ansible playbooks can pass
--chain-worker via -e zeam_chain_worker=on or via inventory
group_vars. Without this, the script-side change wouldn't take
effect on the actual devnet4 deployment because the role
re-derives the docker run line itself rather than sourcing the
script. (Noted by @ch4r10t33r reviewing PR #170.)
Default empty in BOTH paths: no flag is emitted unless explicitly set,
so this PR is a strict no-op against any zeam build -- including the
currently-published blockblaz/zeam:devnet4 (v0.4.13, pre-c-1) which
does not recognise --chain-worker at all.
To enable the burn-in once v0.4.14+ is published as blockblaz/zeam:devnet4:
# via script:
export ZEAM_CHAIN_WORKER=on
./spin-node.sh ...
# via ansible:
ansible-playbook ... -e zeam_chain_worker=on
# or set zeam_chain_worker: "on" in group_vars
To explicitly run the legacy synchronous path on a c-1+ build (kill-switch):
substitute 'off' for 'on' above.
Burn-in target per the c-2c plan in zeam #803:
* >=24h with --chain-worker=on
* watch zeam_lock_hold_seconds{lock="states", site="onBlock.commit"} p99
(should drop dramatically vs slice (b) baseline)
* watch lean_chain_state_refcount_distribution (typical=1, never >16)
* watch lean_chain_queue_dropped_total (should be 0 under nominal load)
Verified bash -n green on the script and tested all four script
branches (unset, on, off, invalid) emit the expected node command line.
0b26232 to
70544a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an env-gated
--chain-worker {on|off}flag for the slice c-2c part 2 burn-in on devnet4 (zeam #803, #828). Threaded through both deployment paths so the live ansible-driven devnet4 playbooks pick it up:client-cmds/zeam-cmd.sh— readsZEAM_CHAIN_WORKERenv, validates against{on, off, empty}, appends--chain-worker <val>tonode_binaryandnode_dockeronly when explicitly set. Used byspin-node.sh/ any script-driven run.ansible/roles/zeam/{defaults,tasks}/main.yml— newzeam_chain_workeransible variable (empty default), threaded into thedocker runtemplated command. Without this, the script-side change wouldn't take effect on the actual devnet4 ansible deployment because the role re-derives the docker run line itself rather than sourcing the script. (Caught by @ch4r10t33r reviewing this PR.)Default behavior: strict no-op
ZEAM_CHAIN_WORKER(script) andzeam_chain_worker(ansible) both default to empty → no flag emitted. This PR is a strict no-op against any zeam build, including the currently-publishedblockblaz/zeam:devnet4(v0.4.13, pre-c-1) which does not recognise--chain-workerat all. Land safely; flip-on later via env /-e/ group_vars.How to enable burn-in
Once a zeam build with chain-worker support is published as
blockblaz/zeam:devnet4(target: v0.4.14, zeam release PR):To explicitly run the legacy synchronous path on a c-1+ build (kill-switch): substitute
offforonabove.Burn-in target (per zeam #803 c-2c plan)
--chain-worker=onzeam_lock_hold_seconds{lock="states", site="onBlock.commit"}p99 — should drop dramatically vs slice (b) baseline (rwlock no longer load-bearing under chain-worker single-writer regime).lean_chain_state_refcount_distribution— typical=1, occasional 2-4, never >16 (entries stuck >16 indicate a leaked reader acquire).lean_chain_queue_dropped_total— should be 0 under nominal load; non-zero means producer/consumer mismatch worth investigating.Validation
Ansible side is parallel to the existing
--db-backendplumbing (same template idiom:{{ ('--flag ' + var) if (var | length > 0) else '' }}).Followups
After burn-in clean, two separate PRs:
--chain-workerfromoff→on(one-line, in zeam repo).