@@ -49,6 +49,87 @@ When set to `0`, host-listener disables slow-lane decisions, skips dependent-op
4949throttling accounting, and promotes seen chains to
5050` schedule_priority = 0 ` during ingest.
5151
52+ ### Local validation runbook (2 host-listener types)
53+
54+ Goal: validate slow-lane behavior with both ` host_listener ` and
55+ ` host_listener_poller ` running concurrently against the same DB.
56+
57+ 1 . Start local stack
58+
59+ ``` bash
60+ cd test-suite/fhevm
61+ ./fhevm-cli deploy --build --local
62+ ```
63+
64+ 2 . Enable the cap on both listener types
65+
66+ Temporarily add ` --dependent-ops-max-per-chain=<N> ` to both services in
67+ ` test-suite/fhevm/docker-compose/coprocessor-docker-compose.yml ` :
68+
69+ - ` coprocessor-host-listener ` command
70+ - ` coprocessor-host-listener-poller ` command
71+
72+ Use a low value for validation (example: ` 2 ` ) so slow-lane is easy to trigger.
73+ Then restart only these services:
74+
75+ ``` bash
76+ cd test-suite/fhevm
77+ docker compose \
78+ --env-file ../env/staging/.env.coprocessor.local \
79+ -f docker-compose/coprocessor-docker-compose.yml \
80+ up -d --force-recreate \
81+ coprocessor-host-listener \
82+ coprocessor-host-listener-poller
83+ ```
84+
85+ 3 . Generate dependent load
86+
87+ Run ` stress_generator ` with a dependent synthetic chain scenario
88+ (` ADDChain ` or ` MULChain ` ), and run in parallel a lighter/independent scenario.
89+
90+ ``` bash
91+ cd coprocessor/fhevm-engine/stress-test-generator
92+ export EVGEN_DB_URL=
' postgresql://postgres:[email protected] :5432/coprocessor' 93+ export EVGEN_SCENARIO=' data/evgen_scenario.csv'
94+ cargo run --release --bin stress_generator
95+ ```
96+
97+ 4 . Validate acceptance criteria in DB
98+
99+ ``` sql
100+ -- A. heavy dependent chains are marked slow
101+ SELECT schedule_priority, COUNT (* )
102+ FROM dependence_chain
103+ GROUP BY schedule_priority
104+ ORDER BY schedule_priority;
105+
106+ -- B. under contention, fast lane is selected first
107+ SELECT dependence_chain_id, schedule_priority, last_updated_at
108+ FROM dependence_chain
109+ WHERE status = ' updated'
110+ AND worker_id IS NULL
111+ AND dependency_count = 0
112+ ORDER BY schedule_priority ASC , last_updated_at ASC
113+ LIMIT 20 ;
114+ ```
115+
116+ Expected:
117+
118+ - At least one chain with ` schedule_priority = 1 ` .
119+ - Fast (` 0 ` ) chains appear before slow (` 1 ` ) chains in acquisition order.
120+
121+ 5 . Validate off-mode (` N=0 ` )
122+
123+ - Set ` --dependent-ops-max-per-chain=0 ` on both listener types.
124+ - Restart the same two services.
125+ - Generate a small dependent burst.
126+ - Re-run the SQL above.
127+
128+ Expected:
129+
130+ - No new slow-lane assignments.
131+ - Seen slow chains are promoted back to fast (` schedule_priority = 0 ` ).
132+
52133## Events in FHEVM
53134
54135### Blockchain Events
0 commit comments