Browse Source

docs: update mining docs

feat/wallet-doc-update
Alexander Graebe 4 years ago
parent
commit
3fcc437b2f
  1. 15
      src/pages/mining.md
  2. 2
      src/pages/references/stacks-blockchain-api.md
  3. 16
      src/pages/stacks-blockchain/running-testnet-node.md

15
src/pages/mining.md

@ -13,10 +13,10 @@ images:
## Introduction
Make sure you've followed our guide for getting a Stacks 2.0 Testnet node up and running, once completed it's only a few more steps to run a proof-of-burn miner on the testnet.
Make sure you've followed the [Running testnet node](https://docs.blockstack.org/stacks-blockchain/running-testnet-node) tutorial. Once completed it's only a few more steps to run a proof-of-burn miner on the testnet.
[@page-reference | inline]
| /stacks-blockchain/testnet-node
| /stacks-blockchain/running-testnet-node
## Running a miner
@ -42,7 +42,16 @@ After this runs, you'll probably see some installation logs, and at the end you
}
```
We need to get some testnet BTC to that address. Grab the `btcAddress` field, and head over to [the Stacks testnet website](https://testnet.blockstack.org/faucet). In the BTC faucet section, past in your `btcAddress`, and submit. 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.
We need to get some testnet BTC to that address. Grab the `btcAddress` field, and call the BTC faucet:
```bash
# replace <btc_address> with `btcAddress` property from your keychain
curl -XPOST "https://stacks-node-api.blockstack.org/extended/v1/faucets/btc?address=<btc_address>" | json_pp
```
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.
!> Make sure to complete the first
Now, we need to configure out node to use this Bitcoin keychain. In the `stacks-blockchain` folder, create a new file called `testnet/stacks-node/conf/testnet-miner-conf.toml`.

2
src/pages/references/stacks-blockchain-api.md

@ -30,6 +30,8 @@ While the Node RPC API doesn't give the same functionality as the hosted Stacks
- [GET /v2/fees/transfer](https://blockstack.github.io/stacks-blockchain-api/#operation/get_fee_transfer)
- [GET /v2/info](https://blockstack.github.io/stacks-blockchain-api/#operation/get_core_api_info)
~> Your local node exposes an HTTP server via port `20443`. The info endpoint would be `localhost:20443/v2/info`.
## Legacy API
If you are looking for the Stacks 1.0 RPC endpoint references, please follow [this link](https://core.blockstack.org/).

16
src/pages/stacks-blockchain/running-testnet-node.md

@ -23,7 +23,7 @@ This tutorial will walk you through the following steps:
## Requirements
Note: If you use Linux, you may need to manually install [`libssl-dev`](https://wiki.openssl.org/index.php/Libssl_API) and other packages. In your command line, run the following to get all packages:
If you use Linux, you may need to manually install [`libssl-dev`](https://wiki.openssl.org/index.php/Libssl_API) and other packages. In your command line, run the following to get all packages:
```bash
sudo apt-get install build-essential cmake libssl-dev pkg-config
@ -46,9 +46,7 @@ source $HOME/.cargo/env
Next, clone this repository:
```bash
git clone https://github.com/blockstack/stacks-blockchain.git
cd stacks-blockchain
git clone https://github.com/blockstack/stacks-blockchain.git; cd stacks-blockchain
```
Install the Stacks node by running:
@ -57,6 +55,8 @@ Install the Stacks node by running:
cargo install --path ./testnet/stacks-node
```
-> This process will take a few minutes to complete
## Step 2: Running the node
You're all set to run a node that connects to the testnet network.
@ -69,13 +69,15 @@ stacks-node krypton
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. Your node will receive new blocks when they are produced, and you can use your [node's RPC API](/references/stacks-blockchain-api#stacks-node-rpc-api) to send transactions, fetch information for contracts and accounts, and more.
**Awesome! Your node is now connected to the testnet network.**
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.
## Step 3: Mining Stacks token
## Optional: Mining Stacks token
Now that you have a running testnet node, you can easily set up a miner.

Loading…
Cancel
Save