Skip to content

[WIRE-415] sdk-core: add the sysio.msgch outqueue table - #123

Merged
heifner merged 4 commits into
masterfrom
fix/wire-415-outqueue-types
Oct 26, 2026
Merged

heifner merged 4 commits into
masterfrom
fix/wire-415-outqueue-types

Conversation

@heifner

@heifner heifner commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Companion to Wire-Network/wire-sysio#696 (WIRE-415), which adds sysio.msgch's outqueue table, the per-outpost count of queued general-lane attestations. Merge the two together.

  • Regenerates SysioContractTypes from #696's ABIs on current master. The only change is outqueue and its two structs.
  • #696 also re-indexes sysio.msgch::attestations. The generated types carry no indexes, so nothing else changes.
  • A client test reads outqueue and checks the RPC's code, table and scope and the row type.

pnpm lint and pnpm test pass (92 suites, 1,054 tests).

Regenerate SysioContractTypes from the ABIs of wire-sysio#696, which adds sysio.msgch's outqueue table (WIRE-415). Only the outqueue table and its two structs are taken; sysio.epoch's finishadv, from the same wire-sysio stack, comes with #82.
messages: SysioMsgchMessageEntryType
outenvelopes: SysioMsgchOutboundEnvelopeType
outpcons: SysioMsgchOutpostConsensusEntryType
outqueue: SysioMsgchOutboundQueueEntryType

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.

Please add a system-contract client test that queries sysio.msgch.tables.outqueue, asserts the RPC receives code: "sysio.msgch", table: "outqueue", and scope: "sysio.msgch", and uses SysioMsgchOutboundQueueEntryType for the returned row. The repository requires tests for each new or modified public symbol, but the current suite does not exercise this typed/runtime table registration; without targeted coverage, the SysioMsgchContract mapping and SysioContractDefinitions entry can drift independently.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added in dc5369e. The test queries outqueue through the system-contract client, checks the RPC's code, table and scope, and types the row as SysioMsgchOutboundQueueEntryType.

No conflicts. The types regenerated from wire-sysio#696 on current master match this branch's file once both are normalized for prettier.
HM asked for it: query `outqueue` through the generic system-contract client, check the RPC's code, table and scope, and type the row as `SysioMsgchOutboundQueueEntryType`.
json: true
})

// An outpost with nothing queued has no row.

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 zero-state comment is too broad. In wire-sysio#696, buildenv decrements queued and writes the row back even when it reaches zero, so a previously used outpost retains a row with queued = 0; the row is absent only before its first general-lane enqueue. Please remove this redundant null assertion (generic first() null behavior is already covered below) or narrow the comment/setup to that never-initialized case so this test does not document the wrong protocol semantics.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in a373a11. The row stays once an outpost has queued a general-lane attestation, as you say, and the generic first() null case is covered by the table-alias test.

An outpost keeps its `outqueue` row once it has queued a general-lane attestation, so the comment stated the wrong rule, and the generic `first()` null case is already covered by the table-alias test.

@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.

Re-reviewed current head a373a11. The review feedback is addressed, the generated outqueue types and runtime registration match the companion ABI, focused client coverage is present, and current-head CI passes. No remaining issues.

@heifner
heifner merged commit c2ba062 into master Oct 26, 2026
1 check 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.

2 participants