Skip to content

Record the Envelope Epoch on Each Desyndication Return - #760

Merged
heifner merged 2 commits into
masterfrom
feature/synd-return-epoch
Nov 10, 2026
Merged

heifner merged 2 commits into
masterfrom
feature/synd-return-epoch

Conversation

@heifner

@heifner heifner commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Each sysio.synd returns row now records sent_epoch, the depot epoch of the outbound envelope that carried its DESYNDICATE_LIQ. A later cleanup can expire a row once the outpost has consumed that envelope: once sysio.msgch's outpcons epoch for the outpost reaches sent_epoch. An outpost emits its envelope for an epoch only after accepting the depot's, which is the rule buildenv already uses to drop consumed outbound envelopes.

Behavior

  • sent_epoch is 0 while the attestation waits in the outbound queue. An envelope carries at most 64 attestations and the queue holds up to 512, so a row can ship several epochs after it was queued. The epoch at desyndicate time cannot tell a cleanup which envelope carried it.
  • sysio.msgch::buildenv reads the request id of each DESYNDICATE_LIQ it ships and sends one inline sysio.synd::retsent(chain_code, epoch_index, request_ids) per envelope. An envelope without a DESYNDICATE_LIQ sends nothing. Bytes that do not decode, or carry request id 0, are skipped.
  • retsent (authority sysio.msgch) runs inside sysio.epoch::advance and never aborts. It drops, with a diagnostic, an id with no row (governance already resolved it), a row of another outpost, and a row already stamped.
  • finishreturn and refundreturn are unchanged.
  • Only sysio.synd and sysio.msgch change wasm and ABI.

Coordination

Each sysio.synd returns row records sent_epoch, the depot epoch of the outbound envelope that carried its DESYNDICATE_LIQ, so a cleanup can expire the row once sysio.msgch's outpcons epoch for the outpost reaches it. sysio.msgch::buildenv sends one inline sysio.synd::retsent with the envelope's epoch and the request ids it shipped; sent_epoch stays 0 while the attestation is queued.

retsent runs inside sysio.epoch::advance and never aborts: an id with no row, a row of another outpost and a row already stamped are dropped with a diagnostic.

Change-Id: Iafa9710093510e9ed967a51a2d5f3ecc7e60d603
huangminghuang
huangminghuang previously approved these changes Nov 10, 2026

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

Reviewed the current diff and relevant contract and epoch context using the open code review workflow. No actionable findings given the confirmed prelaunch context.

Validation: all four new tests passed, with 392 assertions.

@heifner
heifner marked this pull request as ready for review November 10, 2026 16:18
sysio.synd and sysio.msgch are rebuilt with the wire-cdt master dispatcher that #755 adopted.

@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 the complete current diff at e2edfaf after the merge of master and dispatcher rebuild, using the open code review workflow. No actionable findings in the confirmed prelaunch context. The source changes, ABI, and added tests match the previously reviewed version; both affected WASMs were rebuilt.

Validation: all 153 syndication and message-channel contract tests passed, with 14,024 assertions, against the current committed contract artifacts using the existing host test libraries. git diff --check passed. GitHub's Linux amd64 build and tests workflow is still queued.

@heifner
heifner merged commit 47834a1 into master Nov 10, 2026
12 checks passed
heifner added a commit that referenced this pull request Nov 11, 2026
…ys-cpu

Brings in #758, #759, #760 and #761. `sysio.system` is rebuilt with the wire-cdt of #132, so `sysio.system.wasm` carries #761's changes and the new parameter. Every other contract and ABI built with that wire-cdt matches master's byte for byte. `get_cached_descriptor`, which this branch adds to the sys-vm-oc code cache, drops the top-level `const` on its return type, as #758 does for the functions beside it. The deep-mind log, the snapshot compatibility files, the consensus blockchain data and the sys-util snapshot info expectations still pass unchanged.
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