Skip to content

sdk-core: regenerate SysioContractTypes for the uwrit lock changes - #67

Open
heifner wants to merge 1 commit into
masterfrom
fix/chklocks-bounded-sweep-types
Open

sdk-core: regenerate SysioContractTypes for the uwrit lock changes#67
heifner wants to merge 1 commit into
masterfrom
fix/chklocks-bounded-sweep-types

Conversation

@heifner

@heifner heifner commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Generated-output-only companion to Wire-Network/wire-sysio#563.

Regenerated from the sysio.uwrit ABI that PR produces:

  • chklocks gains max_rows: number — the per-epoch release budget. chklocks was the only sweep sysio.epoch::advance inlines without one, and lock expiry is bursty (every lock is stamped now + collateral_lock_duration_ms), so an unbounded sweep of a large expiry burst could abort advance — permanently, since the same locks are still due at the next advance.
  • New locksums table plus SysioUwritLockSumType / SysioUwritLockSumKeyType — the materialized per-(underwriter, chain_code, token_code) locked total that replaces the O(N) lock scan behind sysio.opreg::available().

Diff

18 insertions, 1 deletion, confined to packages/sdk-core/src/types/SysioContractTypes.ts — the max_rows field, the two new type interfaces, the locksums entry in the uwrit tables map, and "locksums" in the SysioContractDefinitions registry. Nothing else moved.

Provenance

No hand edits. Produced by the canonical generator:

contracts/tools/generate-sysio-contract-types.py -B . -P snake -f

pnpm build green, and locksums is present in both lib/cjs and lib/esm output (checked explicitly — tsc -b is incremental and will silently keep a stale lib/ when .tsbuildinfo thinks nothing upstream changed).

Merge order

Lands after wire-sysio#563, since it encodes that PR's ABI. wire-tools-ts consumes this via the sibling link and needs no source change — verified separately.

@huangminghuang huangminghuang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The companion generated-types PR must be regenerated after wire-sysio#563 is rebased onto current master.


/** sysio.uwrit::chklocks (action) */
export interface SysioUwritChklocksAction {
max_rows: number

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Regenerate after rebasing onto the current uwrit ABI. This output predates the underwriter-challenge merge: current master contains the holdlocks, freelocks, and sweeplocks action interfaces and registry entries, while this branch does not. Resolving the file conflict from this generated snapshot would drop those public client types. Once wire-sysio#563 has integrated the challenge actions with max_rows and locksums, rebase this PR and rerun the canonical generator; the resulting action map must retain all three challenge actions.

@heifner

heifner commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

E2E gate: green — 13/13 flows

Run 31712204244All E2E flows passed. ~89 min wall clock.

This branch was one of the three overrides:

repo ref
wire-sysio fix/chklocks-bounded-per-epoch-sweep (wire-sysio#563)
wire-libraries-ts fix/chklocks-bounded-sweep-types — this PR
wire-tools-ts master

That combination is what makes the run meaningful for this PR: the gate builds wire-tools-ts against these regenerated types, so a max_rows / locksums mismatch would have surfaced in //wire-tools-ts:build rather than at flow time. It built clean and all 13 flows then passed against the contracts these types describe.

Flows: batch-operator-slashing, batch-operator-termination, emissions-soak, node-owner-nft, operator-collateral-deposit, reserve-lifecycle, swap-from-wire, swap-non-native-tokens, swap-private-reserves, swap-to-wire, swap-variance-revert, swap-with-underwriting, yield-distribution — all ✅.

Still merges after wire-sysio#563, since it encodes that PR's ABI.

Regenerated from the sysio.uwrit ABI produced by wire-sysio#563:

  * `chklocks` gains `max_rows: number` -- the per-epoch release budget
    that bounds what was an unbounded sweep inlined by
    `sysio.epoch::advance`.
  * new `locksums` table plus `SysioUwritLockSumType` /
    `SysioUwritLockSumKeyType` -- the materialized per-(underwriter,
    chain_code, token_code) locked total that replaces the O(N) scan
    behind `sysio.opreg::available()`.

Generated output only, no hand edits:
`contracts/tools/generate-sysio-contract-types.py -B . -P snake -f`.

Change-Id: I34843c949c931badfdacbc98ea8b63476522fce5
@heifner
heifner force-pushed the fix/chklocks-bounded-sweep-types branch from e0ffd58 to 026fb8e Compare August 14, 2026 20:04
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