Skip to content

chore(sdk-core): regenerate SysioContractTypes for the producer-score ABI (WIRE-367) - #80

Merged
heifner merged 8 commits into
masterfrom
feature/wire-367-producer-registration
Sep 11, 2026
Merged

heifner merged 8 commits into
masterfrom
feature/wire-367-producer-registration

Conversation

@heifner

@heifner heifner commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Part of WIRE-367. Regenerated SysioContractTypes.ts for the sysio.system ABI produced by Wire-Network/wire-sysio#599.

One file, no hand edits — output of contracts/tools/generate-sysio-contract-types.py -B . -O /tmp/ctt -P snake -f.

What the ABI moved

Added by WIRE-367:

producers rank_score, consecutive_missed_rounds, is_demoted, snapshot_attestations, snapshot_period
global rescore_cursor, rescore_pending, last_producer, round_start_block — the height the current producer's round began at, so its delivered block count is a subtraction rather than a per-block counter
emitcfg standby_bps — the standby retainer's share of the producer pool
new tables prodscorecfg, the factor-weight singleton, and prodsched, the observed-schedule snapshot missed-round attribution compares against
new action setscorecfg, carrying max_consecutive_missed_rounds and min_blocks_per_round — the blocks a round needs to count as served

Removed by WIRE-367:

producers rank, and the round-threshold pay counters last_block_num, current_round_blocks, eligible_rounds
global total_unpaid_blocks
action setrank

snapshot_period is the pay period a snapshot credit was earned in; the contract ignores a stale one rather than clearing it at every exit from the pay walk. Declared at the tail of the struct, matching the serializer order.

The removals on producers and global are the per-block pay model: pay is unpaid_blocks against the period's slot count, so nothing needs to track round boundaries or a global block total.

Also corrects pre-existing staleness

master's checked-in types were behind the deployed ABI independently of this work — the regen additionally drops delsnapprov and threshold_pct, both removed by WIRE-350 before it merged. Those deltas are not WIRE-367's doing; they are what a faithful regeneration produces.

Merge order

After Wire-Network/wire-sysio#599 (the ABI these types describe), before the wire-tools-ts PR that consumes them. Wire-Network/wire-tools-ts#94's CI is red until this merges and publishes: it resolves @wireio/sdk-core from the registry, and the published version has no setscorecfg, rank_score or standby_bps. No code change there will fix it, and none is needed.

Validated as part of the stack: e2e gate 34262752643 on the current heads, 15/15 flows green.

… ABI (WIRE-367)

Picks up `producer_info.rank_score` / `consecutive_missed_rounds` /
`is_demoted` / `snapshot_attestations`, the `prodscorecfg` + `prodsched`
tables and `setscorecfg`, and the global's `last_producer` /
`rescore_cursor` / `rescore_generation` / `scored_collateral_stamp`;
`setrank` is gone.

Also drops `delsnapprov` and `threshold_pct`, which this file still carried:
WIRE-350 removed them from wire-sysio before merge and the types were never
regenerated afterwards.

Change-Id: I6dd420349caabbe072d183c8f75a5e3c1dc90856
… pay (WIRE-367)

rescore_pending replaces rescore_generation on the system global; emitcfg
gains standby_bps; producer_info drops last_block_num, current_round_blocks
and eligible_rounds; the global drops total_unpaid_blocks.

Change-Id: Ib8236f1b2d9189a5035f576bb9b635b0df56196c
…ral_stamp (WIRE-367)

sysio.system's global row no longer carries the collateral-config stamp;
the rescore sweep opens from sysio.opreg::setconfig's notification instead.

Change-Id: I2d35c0ade31827bf7f33ade7fd421cd84305e227
…window (WIRE-367)

Producers now carry the rolling window their miss RATE is measured over --
rounds observed, rounds missed, and when the window opened -- and the score
config carries the window length and the percentage limit that go with it.
Both mirror the batch-operator availability gates in `sysio.opreg`.

Also picks up the batch-epoch reward types that landed on master while this
branch was open; they arrive here simply because a faithful regeneration
reflects the whole ABI.

Change-Id: If27eeef989e4f3879331c1beef8f850a087c2751
…te (WIRE-367)

Output of `contracts/tools/generate-sysio-contract-types.py -B . -O /tmp/ctt -P snake -f`
against the ABI from Wire-Network/wire-sysio#599. Two fields:

- `prodscorecfg.min_blocks_per_round` -- blocks a producer must deliver inside its
  own round for that round to count as served. Below it the round is charged
  against the miss RATE, so a producer can no longer hold a slot indefinitely while
  delivering a fraction of its window.
- `global.round_start_block` -- the height the current producer's round began at.
  Every block between it and the next producer's first block belongs to that
  producer by construction, so the difference IS its delivered block count, with no
  per-block counter.

Both are declared at the tail of their structs, matching the serializer order.

Change-Id: I2f9ed567b7083e1cb7278ab97af03067e521e8e8
…ount (WIRE-367)

Output of `contracts/tools/generate-sysio-contract-types.py -B . -O /tmp/ctt -P snake -f`
against the ABI from Wire-Network/wire-sysio#599. One field:

- `t5state.pending_nominal_slots` — block slots the open pay period is entitled
  to, accumulated as each epoch accrues at that epoch's own duration. The pay
  divisor now builds the same way the pool does; computing it at payout from the
  current duration applied today's value to epochs that ran under a different
  one, mis-sizing any period that spans a duration change.

Declared at the tail of the struct, matching the serializer order.

Change-Id: Ie63369dedcb0e33c3990a172f5884f301ccd2e19
…indow (WIRE-367)

Output of `contracts/tools/generate-sysio-contract-types.py -B . -O /tmp/ctt -P snake -f`
against the ABI from Wire-Network/wire-sysio#599. Two fields on `producers`:

- `prev_rounds_in_window`
- `prev_missed_rounds_in_window`

The previous bucket of the miss window. A single bucket emptied at its duration
is a TUMBLING window: each half can read under the configured rate while the
trailing window does not, and the bucket's open time is on-chain, so the boundary
is targetable. Carrying the previous bucket and weighting it by how much of it
the window still covers closes that in O(1) state.

Declared at the tail of the struct, matching the serializer order.

Change-Id: I624ec0834b9f144d5cf703628744932621a66d0d
…otion rule (WIRE-367)

Regen against wire-sysio#599. Net -7 fields: the miss window (`rounds_in_window`,
`missed_rounds_in_window`, `miss_window_open_ms`, `prev_*`) and its two config
knobs are gone, replaced by `producers.snapshot_period` — the pay period a
snapshot credit was earned in.

Change-Id: I6f048e80ccbccdfa7d7bc716baeb08eed2d6a786
@heifner
heifner requested a review from jglanz September 10, 2026 13:09
@heifner
heifner merged commit 9699775 into master Sep 11, 2026
1 check passed
@heifner
heifner deleted the feature/wire-367-producer-registration branch September 11, 2026 13:32
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.

2 participants