Introduction

What are MSB and trac-peer?

MSB (Main Settlement Bus)

MSB is the base network that provides:

  • transaction ordering / global log

  • fee + anti-spam rules

  • “finality” (confirmed/signed state)

If you want anything to be considered “settled on Trac”, it must exist in MSB confirmed state.

trac-peer

trac-peer is the application layer.

Each trac-peer instance runs (and participates in) a subnet: a smaller P2P network that:

  • replicates its own ordered log

  • executes a deterministic Contract locally on each node

  • exposes RPC so wallets/dApps can interact with that Contract

In short: MSB settles, and trac-peers run the apps/contracts.


What is a subnet (in one paragraph)

trac-peer runs a subnet: a smaller peer-to-peer network that maintains an ordered log and derives a deterministic application state from it (a contract/state machine).

For economic finality and anti-spam rules, transactions are settled on MSB (Main Settlement Bus). Subnet nodes only execute contract operations locally once they can prove the referenced transaction exists in MSB confirmed state.


Who are you? (choose your path)

“I just want to run it locally”

Start with:

“I want to run an RPC endpoint for wallets/dApps”

Start with:

“I want to build an app/contract on trac-peer”

Start with:


Core concepts (minimal)

  • MSB (Main Settlement Bus): the settlement layer. Transactions become “real” when MSB confirms them.

  • Subnet: the P2P application layer. A subnet has:

    • a discovery channel (--subnet-channel)

    • a bootstrap/join-code bootstrap (--subnet-bootstrap, 32-byte hex)

  • Protocol: defines how user commands map into typed ops: { type, value }.

  • Contract: deterministic state machine that executes those typed ops and writes state under app/....

  • Operator vs client:

    • operator uses CLI (admin/writer/indexer/chat/deploy)

    • client (wallet/dApp) uses RPC (schema/context/state/tx submit when enabled)


One “golden” mental model

When a user “calls a contract function” they are not invoking code remotely.

Instead:

  1. a client prepares a typed command { type, value }

  2. the wallet signs the transaction hash (MSB operation type = 12)

  3. the peer broadcasts it to MSB (fees apply)

  4. once MSB confirms it, the subnet appends a reference op

  5. every subnet node executes the same contract logic locally and derives the same state


Last updated