Repository navigation
[WIRE-415] sdk-core: add the sysio.msgch outqueue table - #123
Conversation
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
Companion to Wire-Network/wire-sysio#696 (WIRE-415), which adds
sysio.msgch'soutqueuetable, the per-outpost count of queued general-lane attestations. Merge the two together.SysioContractTypesfrom #696's ABIs on current master. The only change isoutqueueand its two structs.sysio.msgch::attestations. The generated types carry no indexes, so nothing else changes.outqueueand checks the RPC's code, table and scope and the row type.pnpm lintandpnpm testpass (92 suites, 1,054 tests).