Status: ready-for-agent

# 04 — Node client startup flow (`meshnet-node start`)

## What to build

Make `meshnet-node start` self-configuring from scratch on a machine with a CUDA-capable GPU (or CPU fallback). The full startup sequence must complete without any manual configuration:

1. Detect GPU model and available VRAM
2. Load an existing Solana wallet from disk, or generate and save a new one
3. Query the tracker for the optimal shard assignment given the hardware profile
4. Download the assigned shard from HuggingFace (`huggingface_hub`)
5. Register with the tracker (wallet address, endpoint, shard range, hardware profile)
6. Begin accepting inference connections

The node prints a short status summary on startup: wallet address, assigned shard, model preset, and download progress. No interactive prompts — the entire flow is non-interactive.

This is the primary viral growth vector. Every second of friction in this flow costs node operators. The startup sequence must work on Linux with CUDA, and degrade gracefully to CPU on machines without a GPU.

## Acceptance criteria

- [ ] `meshnet-node start --tracker http://localhost:8080` completes startup without prompts on a machine with a CUDA GPU
- [ ] A Solana wallet keypair is generated and saved to `~/.config/meshnet/wallet.json` if none exists
- [ ] The assigned shard is downloaded from HuggingFace and cached to `~/.cache/meshnet/shards/`
- [ ] The node registers with the tracker and appears in the tracker's node registry
- [ ] The node accepts a live inference connection and processes activation tensors correctly after startup
- [ ] On a CPU-only machine, the node starts with a warning and serves a CPU-appropriate shard
- [ ] An integration test covers the full startup sequence against a local tracker stub

## Blocked by

- `03-tracker-registration-and-routing.md`
