Introduction

These docs are intended to be the “from zero to productive” guide for:

  • running a peer against an MSB network

  • creating and operating subnets (“apps”)

  • connecting wallets and dApps over HTTP RPC

  • building your own Protocol + Contract application on top of the peer runtime

If you previously felt “I can start it, but I don’t know what to do next”, start here.


What is trac-peer

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