Once imported, we need to get some BTC to that address. You should be able to transfer BTC to this address using a crytpocurrency exchange such as [Coinbase](https://www.coinbase.com), [Binance](https://www.binance.com), or [Kraken](https://www.kraken.com).
Now, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, create a new file called `mainnet-miner-conf.toml`.
Now, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, modify the file at [`testnet/stacks-node/conf/mainnet-miner-conf.toml`](https://github.com/blockstack/stacks-blockchain/blob/master/testnet/stacks-node/conf/mainnet-miner-conf.toml).
Paste in the following configuration:
Update the following properties:
```toml
[node]
rpc_bind = "0.0.0.0:20443"
p2p_bind = "0.0.0.0:20444"
...
# Enter your private key here
seed = "replace-with-your-private-key"
miner = true
local_peer_seed = "replace-with-your-private-key"
...
[burnchain]
chain = "bitcoin"
mode = "mainnet"
# peer_host should point to your local bitcoind node
...
# To mine on mainnet, you need to run bitcoind locally
# Details can be found in above section, 'Running bitcoind locally'
peer_host = "127.0.0.1"
username = "your-bitcoind-username"
password = "your-bitcoind-password"
rpc_port = 8332
peer_port = 8333
# optional - may help speed up sync time
[connection_options]
read_only_call_limit_write_length = 0
read_only_call_limit_read_length = 100000
read_only_call_limit_write_count = 0
read_only_call_limit_read_count = 30
read_only_call_limit_runtime = 1000000000
username = "<USERNAME>"
password = "<PASSWORD>"
...
```
Now, grab your `privateKey` from earlier, when you ran the `make_keychain` command. Replace the `seed` field with your private key. Save and close this configuration file.
@ -128,7 +119,7 @@ Now, grab your `privateKey` from earlier, when you ran the `make_keychain` comma
Once imported, we need to get some BTC to that address. You should be able to transfer BTC to this address using a crytpocurrency exchange such as [Coinbase](https://www.coinbase.com), [Binance](https://www.binance.com), or [Kraken](https://www.kraken.com).
### Create configuration file
### Update 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 `mainnet-miner-conf.toml`.
Now, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, modify the file at [`testnet/stacks-node/conf/mainnet-miner-conf.toml`](https://github.com/blockstack/stacks-blockchain/blob/master/testnet/stacks-node/conf/mainnet-miner-conf.toml).
Paste in the following configuration:
Update the following properties:
```toml
[node]
rpc_bind = "0.0.0.0:20443"
p2p_bind = "0.0.0.0:20444"
...
# Enter your private key here
seed = "replace-with-your-private-key"
miner = true
local_peer_seed = "replace-with-your-private-key"
...
[burnchain]
chain = "bitcoin"
mode = "mainnet"
# peer_host should point to your local bitcoind node
...
# To mine on mainnet, you need to run bitcoind locally
# Details can be found in above section, 'Running bitcoind locally'
peer_host = "127.0.0.1"
username = "your-bitcoind-username"
password = "your-bitcoind-password"
rpc_port = 8332
peer_port = 8333
# optional - may help speed up sync time
[connection_options]
read_only_call_limit_write_length = 0
read_only_call_limit_read_length = 100000
read_only_call_limit_write_count = 0
read_only_call_limit_read_count = 30
read_only_call_limit_runtime = 1000000000
username = "<USERNAME>"
password = "<PASSWORD>"
...
```
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.
@ -251,7 +233,7 @@ Now, grab your `privateKey` from earlier, when you ran the `stx make_keychain` c
To start your miner, run this in the command line:
-> **Note** : While starting the node for the first time, windows defender might pop up with a message to allow access. If so, allow access to run the node.
We need to get some BTC to that address. You should be able to transfer BTC to this address using a crytpocurrency exchange such as [Coinbase](https://www.coinbase.com), [Binance](https://www.binance.com), or [Kraken](https://www.kraken.com).
### Create a config file directory
You need a dedicated directory to keep the config files:
### Update configuration file
```bash
mkdir -p $HOME/stacks
```
Now, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, modify the file at [`testnet/stacks-node/conf/mainnet-miner-conf.toml`](https://github.com/blockstack/stacks-blockchain/blob/master/testnet/stacks-node/conf/mainnet-miner-conf.toml).
### Create config file
Inside the new `$HOME/stacks` folder, you should create a new miner config `Config.toml`:
Update the following properties:
```toml
[node]
rpc_bind = "0.0.0.0:20443"
p2p_bind = "0.0.0.0:20444"
...
# Enter your private key here
seed = "replace-with-your-private-key"
miner = true
local_peer_seed = "replace-with-your-private-key"
...
[burnchain]
chain = "bitcoin"
mode = "mainnet"
# peer_host should point to your local bitcoind node
...
# To mine on mainnet, you need to run bitcoind locally
# Details can be found in above section, 'Running bitcoind locally'
peer_host = "127.0.0.1"
username = "your-bitcoind-username"
password = "your-bitcoind-password"
rpc_port = 8332
peer_port = 8333
# optional - may help speed up sync time
[connection_options]
read_only_call_limit_write_length = 0
read_only_call_limit_read_length = 100000
read_only_call_limit_write_count = 0
read_only_call_limit_read_count = 30
read_only_call_limit_runtime = 1000000000
username = "<USERNAME>"
password = "<PASSWORD>"
...
```
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.
### Start the miner
-> The ENV VARS `RUST_BACKTRACE` and `STACKS_LOG_DEBUG` are optional. If removed, debug logs will be disabled
Once imported, we need to get some testnet BTC to that address. Grab the `btcAddress` field, and paste it into [this Bitcoin testnet faucet](https://tbtc.bitaps.com/). You'll be sent `0.01` testnet BTC to that address.
Now, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, create a new file called `testnet/stacks-node/conf/testnet-miner-conf.toml`.
Now, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, modify the file at [`testnet/stacks-node/conf/testnet-miner-conf.toml`](https://github.com/blockstack/stacks-blockchain/blob/master/testnet/stacks-node/conf/testnet-miner-conf.toml).
Now, grab your `privateKey` from earlier, when you ran the `make_keychain` command. Replace the `seed` field with your private key. Save and close this configuration file.
@ -161,7 +134,7 @@ The above code will compile an optimized binary. To use it, run:
For a full reference of subcommands and configuration options used by `stacks-node`, please see this page.
@ -222,54 +195,27 @@ Request BTC from faucet:
We need to get some testnet BTC to that address. Grab the `btcAddress` field, and paste it into [this Bitcoin testnet faucet](https://tbtc.bitaps.com/). You'll be sent 0.01 testnet BTC to that address.
### Create configuration file
### Update 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, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, modify the file at [`testnet/stacks-node/conf/testnet-miner-conf.toml`](https://github.com/blockstack/stacks-blockchain/blob/master/testnet/stacks-node/conf/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.
@ -279,7 +225,7 @@ Now, grab your `privateKey` from earlier, when you ran the `stx make_keychain` c
To start your miner, run this in the command line:
-> **Note** : While starting the node for the first time, windows defender might pop up with a message to allow access. If so, allow access to run the node.
We need to get some testnet BTC to that address. Grab the `btcAddress` field, and paste it into [this Bitcoin testnet faucet](https://tbtc.bitaps.com/). You'll be sent 0.01 testnet BTC to that address.
### Create a config file directory
You need a dedicated directory to keep the config files:
```bash
mkdir -p $HOME/stacks
```
### Update config file
### Create config file
Now, we need to configure our node to use this Bitcoin keychain. In the `stacks-blockchain` folder, modify the file at [`testnet/stacks-node/conf/testnet-miner-conf.toml`](https://github.com/blockstack/stacks-blockchain/blob/master/testnet/stacks-node/conf/testnet-miner-conf.toml).
Inside the new `$HOME/stacks` folder, you should create a new miner config `Config.toml`:
-> Notice that this configuration differs from the one used to run the miner locally
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.