Skip to content

docs: document non-ledger transactions (#1533)#1619

Open
m2ux wants to merge 5 commits into
mainfrom
docs/1533-document-non-ledger-transactions
Open

docs: document non-ledger transactions (#1533)#1619
m2ux wants to merge 5 commits into
mainfrom
docs/1533-document-non-ledger-transactions

Conversation

@m2ux

@m2ux m2ux commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Document the Midnight transaction format and the node's non-ledger transaction types across two surfaces: the public Midnight docs site and the node's crate documentation (rustdoc). Ledger-transaction internals are delegated to the ledger team; this work covers the node-owned non-ledger surface.

🐛 Issue 📐 Engineering


Motivation

The Midnight node accepts several categories of transactions. The ledger-side transactions are documented reasonably well, but the node-defined non-ledger transaction types — and the overall transaction format that ties them together — are under-documented in the public docs and in the crates themselves. Integrators, partner teams, and newer engineers currently have to read the source to understand what the node accepts and how those transactions are structured.

In line with shieldedtech/product#40, this work improves the documentation around the transaction format and the non-ledger transaction types the node provides, giving consumers a single trustworthy reference and reducing integration mistakes and support load.


Changes

Two surfaces:

  • Docs site (midnight-docs, separate PR) — Expand the existing network-architecture/transactions.mdx: a transaction-format/classification spine, an explicit ledger/non-ledger boundary with a :::info deferral to the ledger team, and a per-category reference table (system transaction, timestamp, unknown, cNIGHT observation, bridge transfer). Consensus inherents are mentioned only, with a pointer to onchain-logic.
  • Crate rustdoc (this repo) — Crate //! docs for primitives/midnight, pallets/midnight, and pallets/midnight-system; item docs for the TransactionType* classification enums and variants, send_mn_transaction, send_mn_system_transaction, SystemTransactionApplied, MidnightSystemTransactionExecutor, and BridgeRecipient. The c2m-bridge crate is the in-repo template and is preserved/cross-linked.
  • Cross-surface nuance — Both surfaces state, in their own register, that the transaction classification is consumed off-node (indexer/toolkit) and is not an in-node dispatch mechanism, and that a bridge transfer is an inherent that produces a system transaction (not a peer extrinsic).

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason: documentation-only change
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • No new todos introduced

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other
  • N/A

🗹 TODO before merging

  • Ready for review

Closes #1533

Scaffold commit for the work package to document the Midnight
transaction format and the node's non-ledger transaction types in
the Midnight docs. Documentation commits will follow.

Signed-off-by: Mike Clay <mike.clay@shielded.io>
@m2ux m2ux self-assigned this Jun 1, 2026
Add crate-level and item-level rustdoc across the node-owned non-ledger
transaction surface:

- midnight-primitives: crate doc; TransactionType/TransactionTypeV2 type
  and variant docs framing the classification as an off-node vocabulary
  consumed through metadata, not in-node dispatch, plus the V1 to V2
  evolution; MidnightSystemTransactionExecutor and BridgeRecipient docs.
- pallet-midnight: crate doc; send_mn_transaction doc with the
  ledger/non-ledger boundary and an Errors section; remove the stale
  scaffold and todo comments.
- pallet-midnight-system: crate doc; send_mn_system_transaction doc with
  the root and governance gate and an Errors section; SystemTransactionApplied
  event docs.
- pallet-cnight-observation: process_tokens inherent-path doc.
- pallet-c2m-bridge: cross-link the bridge handler to the system
  transaction seam, framing a bridge transfer as an inherent that
  produces a system transaction.

Documentation only; no code logic changed.

Assisted by AI

Signed-off-by: Mike Clay <mike.clay@shielded.io>
Add a #node changelog fragment for PR #1619 so the Changes Check CI gate
passes. The PR documents the node's non-ledger transaction surface in
rustdoc and was missing its required changes/ entry.

Closes #1533

Assisted by AI

Signed-off-by: Mike Clay <mike.clay@shielded.io>
@m2ux m2ux marked this pull request as ready for review June 1, 2026 17:45
@m2ux m2ux requested a review from a team as a code owner June 1, 2026 17:45
Comment thread primitives/midnight/src/lib.rs Outdated
justinfrevert
justinfrevert previously approved these changes Jun 5, 2026
Co-authored-by: justinfrevert <81839854+justinfrevert@users.noreply.github.com>
Signed-off-by: Mike Clay <176900785+m2ux@users.noreply.github.com>
@m2ux

m2ux commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

/bot rebuild-metadata

@github-actions

Copy link
Copy Markdown
Contributor

❌ Metadata rebuild failed. Check the workflow logs for details.

@m2ux

m2ux commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

/bot rebuild-metadata

@github-actions

Copy link
Copy Markdown
Contributor

❌ Metadata rebuild failed. Check the workflow logs for details.

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