@ -126,6 +126,108 @@ In case you are running into issues or would like to see verbose logging, you ca
BLOCKSTACK_DEBUG=1 stacks-node krypton
```
## Running a miner in Windows
### Generate keychain and get testnet tokens in Windows
To setup the miner, first, we need to generate a keychain. With this keychain, we'll get some testnet BTC from a faucet, and then use that BTC to start mining.
To get a keychain, the simplest way is to use the `stacks-cli`.We'll use the `stx make-keychain` command,and pass -t to indicate that we want a testnet keychain.
Generate a keychain:
```bash
npm install --global @stacks/cli
stx make_keychain -t > cli_keychain.json
type cli_keychain.json
```
After this runs, you'll probably see some installation logs, and at the end you should see some JSON that looks like this:
```json
{
"mnemonic": "exhaust spin topic distance hole december impulse gate century absent breeze ostrich armed clerk oak peace want scrap auction sniff cradle siren blur blur",
You'll be sent 0.5 testnet BTC to that address. Don't lose this information - we'll need to use the `privateKey` field later on.
### Create configuration file
Now, we need to configure our node to use this Bitcoin keychain. In the `folder where your binary is extracted`, create a new file called `testnet-miner-conf.toml`.
Now, grab your `privateKey` from earlier, when you ran the `stx make_keychain` command. Replace the seed field with your private key. Save and close this configuration file.
@ -91,6 +91,51 @@ INFO [1588108047.585] [src/chainstate/stacks/index/marf.rs:732] First-ever block
Your node will receive new blocks when they are produced, and you can use the [Stacks Node RPC API](/references/stacks-blockchain-api#stacks-node-rpc-api) to send transactions, fetch information for contracts and accounts, and more.
## Running the testnet node on Windows
### Prerequisites
Before you begin, check that you have the below necessary softwares installed on your PC
Extract the binary .Open the command prompt from the folder where binary is extracted and execute the below command:
```bash
stacks-node krypton
# This command will start the testnet follower node.
```
To execute Stacks node with extra debugging enabled, run:
```bash
set RUST_BACKTRACE=full
set BLOCKSTACK_DEBUG=1
stacks-node krypton
# This command will execute the binary and start the follower node with debug enabled.
```
The first time you run this, you'll see some logs indicating that the Rust code is being compiled. Once that's done, you should see some logs that look something like the this:
```bash
INFO [1588108047.585] [src/chainstate/stacks/index/marf.rs:732] First-ever block 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
```
**Awesome! Your node is now connected to the testnet network.**
## Optional: Running with Docker
Alternatively, you can run the testnet node with Docker.