# 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`&#x20;

`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:

* [Quickstart](https://docs.trac.network/documentation/developers/mainnet/dapp-developer-guide/quickstart)
* [Bootstrap checklist](https://docs.trac.network/documentation/developers/mainnet/dapp-developer-guide/bootstrap-checklist) (canonical step-by-step)

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

Start with:

* [RPC](https://docs.trac.network/documentation/developers/mainnet/dapp-developer-guide/rpc)
* [Production notes](https://docs.trac.network/documentation/developers/mainnet/dapp-developer-guide/production-notes) (ops/security notes)

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

Start with:

* [App dev](https://docs.trac.network/documentation/developers/mainnet/dapp-developer-guide/app-dev)
* [Intercom example](https://docs.trac.network/documentation/developers/mainnet/dapp-developer-guide/references-examples/intercom) (real project example)

***

### 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

***
