Skip to content

Deploy sysio.kicker in the cluster bootstrap, with a kick flow - #122

Merged
valthon merged 2 commits into
masterfrom
feature/sysio-kicker
Oct 27, 2026
Merged

valthon merged 2 commits into
masterfrom
feature/sysio-kicker

Conversation

@valthon

@valthon valthon commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Deploys and exercises the new sysio.kicker contract from Wire-Network/wire-sysio#675 on the local cluster. CI needs an @wireio/sdk-core release carrying the kicker types (Wire-Network/wire-libraries-ts#106); until it exists, CI cannot install them and stays red.

1. c70884c3 Deploy and configure sysio.kicker

  • sysio.kicker is a system account. A Kicker phase after the emissions and shadow setup deploys it, verifies its privilege, and calls setconfig: a 1,000,000 WIRE budget, a 60 s min_interval_sec, a one-day twap_window_sec, a 5,000 bps max_spot_deviation_bps (the contract default, RegistrySteps.KickerMaxSpotDeviationBps), and the mandatory 1,000 WIRE daily ceiling per pool.
  • A KickerPools phase registers LIQETH and LIQSOL pools only when mock LIQ pools are enabled.
  • Typed steps for all five kicker actions (setconfig, addpool, setpool, rmpool, kick), with governance or explicit keeper authorization, and unit tests.
  • Asset-unit parsing has one home, cluster-tool/src/utils/assetUtils.ts. Every former copy uses it: the flow substrate, the LIQ yield, syndication challenge and rate-limit flows, ProducerCollateralSteps, WireSyndicationTool (whose own assetUnits from Underwrite syndication from the batch operators: plugin flow and cap flow #127 is removed) and WireClient.getWireBalance.

2. 0cdf829a Verify kicker gifts and failure paths — new package flow-liq-kicker

  • A payment must equal an independent model of the contract: the cumulative-price TWAP over the observation window, simple accrual bounded to 72 h, and the exact partial clock. Every ledger it touches must conserve: budget, gifted_total, yieldidx, the treasury.
  • A crank-pushed payment is isolated with a one-unit budget and cap, located in an irreversible block, and verified the same way. The nodeop capability probe is its own Report Step.
  • Failure paths: governance rejections (window below 60 s, cap of 0 or above 1,000 WIRE, unauthorized callers), TWAP warm-up and interval skips, Andon hold, funding shortfalls (treasury reserved through a temporary emission ceiling, never a transfer of a sampled balance), the exhausted daily cap with positive budget (re-established if the day rolls over), rmpool and re-adding, zero supply, and atomic rollback. Configuration and holdings are restored and checked.
  • UTC rollover, overflow and long-outage cases stay in #675's controlled-clock contract tests; the flow README records the split.
  • The flow sets twap_window_sec to its 60 s floor and needs three 60 s maturity windows: the shared one, the isolated crank fixture's, and the one the crank payment restarts (every payment, partial included, restarts the TWAP observation) before the cap probe.
  • Paid kicks must leave spot_deviation clear with spot inside the configured guard of the paid TWAP; invalid governance now includes spot-guard values 0 and 10001. The flow never trips the guard itself; #675's spot_deviation_threshold_is_inclusive and pump_straddling_a_checkpoint_funds_no_payout cover that branch.

Review: an adversarial Codex review found 7 issues (crank finality, the multi-payment oracle, unbounded stabilization, coverage, the probe outside a Step, a duplicated helper, the shared logger). Three fix rounds, each re-reviewed, fixed them plus the issues the re-reviews raised (a stale-balance treasury race, a masked cap check, a UTC-midnight flake, empty-reserve pricing, a third window, if/else dispatch). The last re-review returned no findings.

Rebased onto master b883fe48 (after #155 and #157). The conflicts there were the utils/index.ts barrel (master's portRangeUtils.js export kept beside assetUtils.js) and #157's new SyndContractSteps test, which now imports the shared assetUnits from @wireio/cluster-tool/utils instead of WireSyndicationTool.assetUnits. Earlier, onto c7eada67: The one textual conflict was tsconfig.json (master's flow-lco-import reference kept, flow-liq-kicker added); the integration uses master's Constants.SHADOW_LIQ_TOKEN_PAIRS and the shared assetUnits parser. Updated for #675's kicker at 959454a660: gifts are sized on min(kick_pool.supply_snapshot, current LIQ supply), so the flow's accrual oracle and scenario now model the checkpoints (addpool and every full payment checkpoint the current supply; a partial payment keeps the priced supply; a zero snapshot under a nonzero supply only checkpoints; the saturated below-minimum reset), with unit coverage for supply growth, burns and resets.

Validation (local, node 24.20, sdk-core linked from wire-libraries-ts master 6242ad0, i.e. #106 and #127 merged):

  • At b883fe48: per-commit gate at c70884c3 and 0cdf829a, each in a clean worktree under the platform root: install, build, lint, test:ci — RC 0 at both (pr-ready verdict pass).

Earlier, on the pre-rebase SHAs:

  • Per-commit gate at each commit (430a9392, 7e637c29), each in a clean worktree: install, build, lint, test — RC 0 at both. The commit hooks ran 474/474 Jest suites, 4,829/4,829 tests and the 89 flow-liq-kicker unit tests.
  • An independent review of the update (every changed line across 43 files) found no issues.

UNVERIFIED: the flow itself has not been run against a cluster since the fix rounds. Its previous live run (215/215 steps) predates the TWAP pricing, the configurable window and the new failure-path coverage. Running it needs a nodeop and contracts built from #675 at 959454a660.

🤖 Generated with Claude Code

@valthon
valthon force-pushed the fix/sysio-670-consumers branch from f258cc5 to e3d76da Compare October 10, 2026 22:44
@valthon
valthon force-pushed the feature/sysio-kicker branch from ccf0c67 to 1e5d56d Compare October 10, 2026 23:03
@valthon
valthon marked this pull request as ready for review October 12, 2026 15:17
Base automatically changed from fix/sysio-670-consumers to master October 12, 2026 18:31
@valthon
valthon force-pushed the feature/sysio-kicker branch 3 times, most recently from cdf8d9a to 0c78e9a Compare October 20, 2026 17:59
@valthon
valthon force-pushed the feature/sysio-kicker branch 2 times, most recently from 305c928 to 7e637c2 Compare October 26, 2026 22:09
valthon and others added 2 commits October 27, 2026 15:58
LIQ gifts need a privileged treasury draw and governance configuration
before any keeper can pay. Deploy sysio.kicker after emissions and
shadow setup, verify its privilege, and register pools only with mock
yield pools.

Configure a one-million-WIRE budget, a 60-second cadence, a one-day TWAP
window, the contract's 5,000-bps spot-deviation guard and the mandatory
1,000-WIRE daily ceiling. Expose all five typed
kicker actions with governance or explicit keeper authorization. Share
exact asset-unit parsing across the flow substrate, LIQ yield and
syndication tools and LCO imports.

Ship bootstrap ordering, configuration, privilege, authorization, action
failure and asset precision tests with the implementation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Codex CLI (gpt via ChatGPT) <[email protected]>
Verify manual and automatic kicker payments at irreversibility against
independent TWAP, capped accrual, partial-clock and ledger oracles. Size
gifts on min(supply_snapshot, current supply), distribute over current
supply, checkpoint full payments and retain priced supply on partials.

Exercise governance refusals, interval and observation gates, budget and
treasury shortfalls, daily caps, zero supply and atomic rollback. Hold
automatic kicks between the zero-supply and zero-snapshot probes, then
restore the original configuration atomically with the checkpoint. This
keeps the zero snapshot available across finality and the one-second
wait. Funding and manual payment share the next mature window.

Verify a saturated below-minimum gift checkpoints only when the same
interval at the same TWAP on current supply reaches the minimum. Cover
growth, burns, zero snapshots, inclusive saturation and price dips.

Probe crank capability in the Report, isolate a one-unit partial payment
and locate it in an irreversible block. Reconstruct its microsecond
clock and settled observation, check the exhausted cap with UTC rollover
recovery, and restore governance and the remaining budget less payments.

Keep controlled-clock overflow and rollover contract cases in sysio.
Test receipt inclusion, ledgers, restoration, cancellation and capability
alongside the flow. Every write remains an explicit Report Step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Codex CLI (gpt via ChatGPT) <[email protected]>
@valthon
valthon force-pushed the feature/sysio-kicker branch from 7e637c2 to 0cdf829 Compare October 27, 2026 20:32
@valthon
valthon merged commit 2fc14ea into master Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant