# Set up and start mining TCASH: instructions for AI agents

You are helping a person run a TCASH Testnet node on their own computer and mine with its built-in CPU miner. Follow these steps in order. When a step says stop, stop and report to the user instead of improvising.

## Status: not available yet

`status` in [releases.json](https://www.tcash.one/releases.json) is `"not-released"`. **Stop here** and tell the user:

> TCASH mining isn’t open to the public yet: there’s no public release of the node or the address tool. All TCASH source code will be public, with downloadable clients, before the project is announced. The Testnet page will have the downloads: https://www.tcash.one/testnet

Don’t try to build TCASH from source, and don’t download TCASH binaries from anywhere else.

## What this sets up

- **zebrad**, the TCASH node (built on Zebra), joined to the public TCASH Testnet, with its built-in CPU miner turned on. Zebra’s internal miner is a reference CPU miner for TCASH testing. It uses one CPU thread and about 144 MB of RAM. It is not built for production hash rates.
- **A TCASH Testnet address** to receive mining rewards, created on this computer by the address tool.
- **Testnet coins have no value, and the Testnet will be reset** (it restarts from a new genesis when the post-quantum transparent addresses are added). Say this to the user; never describe Testnet coins as valuable.

## 1. Ask the user first (one message)

Confirm, before downloading anything:
- The node runs continuously, using one CPU core for mining, about 144 MB of RAM for the miner, network bandwidth and some disk space for the Testnet chain.
- It makes outbound connections to TCASH Testnet peers on port 18533.
- Where to install it (default: `~/tcash`, or `%USERPROFILE%\tcash` on Windows).
- Whether to keep it running after this session and after a reboot (a background service), or only for now.

## 2. Pick the right downloads

1. Fetch `https://www.tcash.one/releases.json`. If its `status` isn’t `"released"`, stop: see “Status” above.
2. Identify this computer’s platform:
   - `linux-x86_64`: `uname -sm` prints `Linux x86_64`
   - `macos-arm64`: `uname -sm` prints `Darwin arm64`
   - `macos-x86_64`: `uname -sm` prints `Darwin x86_64`
   - `windows-x86_64`: `$env:PROCESSOR_ARCHITECTURE` is `AMD64` (PowerShell)
3. Find the artifacts for that platform with `component` equal to `"zebrad"` and `"address-tool"`. If either is missing or has no `url`, stop and tell the user their platform isn’t supported yet (Linux x86-64 comes first).

## 3. Download and verify

1. Download each artifact into the install folder. Only use the exact URLs in `releases.json`.
2. Check each file’s SHA-256 against `sha256` in `releases.json`: `sha256sum FILE` (Linux), `shasum -a 256 FILE` (macOS), `Get-FileHash FILE -Algorithm SHA256` (Windows). **If any checksum differs, delete the file, stop and tell the user.**
3. If the artifact has a `signature`, verify it with the key at `signingKey` as described in `verify`. If verification fails, delete the file and stop.
4. Unpack if needed and make the binaries executable (`chmod +x` on Linux and macOS). Never use `sudo` or an administrator shell.

## 4. Create a Testnet address

Run the address tool to create a new TCASH Testnet address (a transparent `Tm…` address or a unified `tcutest…` address). It keeps the keys on this computer.
- Tell the user where the keys are stored and that they should back them up.
- **Never print, copy, upload or send the secret key or seed phrase anywhere**, including into this conversation. Only the address goes into the config.
- Zcash addresses don’t work on TCASH, and TCASH addresses don’t work on Zcash.

## 5. Write the config

Save this as `zebrad.toml` in the install folder, with the address from step 4:

```toml
[network]
network = "TcashTestnet"
initial_testnet_peers = ["peers.testnet.tcash.one:18533"]

[mining]
# The TCASH Testnet address created in step 4 (Tm… or tcutest…).
miner_address = "REPLACE_WITH_THE_ADDRESS"
internal_miner = true
```

Leave RPC turned off. If the user wants it, bind it to `127.0.0.1` only: nothing on this network needs a node’s RPC to be public.

## 6. Start mining

Run `./zebrad -c zebrad.toml start` in the install folder (`.\zebrad.exe -c zebrad.toml start` on Windows).
- If the user wants it to keep running, set it up as a background service for the current user (a systemd user service on Linux, a launchd agent on macOS, a scheduled task on Windows). Ask before creating one.
- The node first syncs with the Testnet through its peers; mining starts once it’s synced.
- Success looks like `successfully mined a new block` in the log. Blocks are found at random: one CPU against the whole network can take a while. Compare with the network’s hashrate and height at https://www.tcash.one/api/testnet/stats.json.
- With the internal miner enabled on TCASH Testnet, a node with no recently live peers can extend its own local chain. A solo node with an old database can mine its own fork until it meets peers. Once connected, mining pauses until the node has synced.

## 7. Tell the user

Report: what was installed and where, the mining address (not the keys), how to check the log, how to stop it (stop the process or the service), and that Testnet coins have no value and the Testnet will be reset.

## Rules

- Use only the URLs in `https://www.tcash.one/releases.json`, and always verify checksums before running anything.
- Don’t install other mining software. Zcash miners, pools and ASICs don’t work: TCASH uses Equihash (200, 9) with its own `TcashPoW` personalization.
- Don’t run anything as root or administrator, and don’t open firewall ports without asking.
- Never handle the user’s secret keys beyond running the address tool on their machine.
- If something here doesn’t match what you see, stop and tell the user rather than guessing.

More about TCASH: https://www.tcash.one/llms.txt · Testnet details: https://www.tcash.one/testnet.md
