Browse Source

Update local-development.md

fix/update-favicon
Friedger Müffke 4 years ago
committed by Alexander Graebe
parent
commit
7997901d94
  1. 81
      src/pages/understand-stacks/local-development.md

81
src/pages/understand-stacks/local-development.md

@ -87,23 +87,7 @@ STACKS_FOLLOWER_MEM=128M
### Bitcoin ### Bitcoin
By default, we're using the bitcoin node operated by PBC. Mocknet does not require any settings for bitcoin
You're welcome to to use any bitcoin testnet/regtest node you'd prefer by changing the following variables in the [`.env`](https://github.com/blockstack/stacks-local-dev/blob/master/.env) file:
```bash
BTC_RPC_PORT=18443
BTC_P2P_PORT=18443
BTC_HOST=bitcoind.blockstack.org
BTC_PW=blockstacksystem
BTC_USER=blockstack
```
-> There is an important env var related here: `BTC_FAUCET_PK`. This will have to be updated if you use a different btc node. For the server defined above, this is already setup - using a different node would require you to set this up manually.
```bash
BTC_FAUCET_PK=8b5c692c6583d5dca70102bb4365b23b40aba9b5a3f32404a1d31bc09d855d9b
```
### Postgres ### Postgres
@ -147,58 +131,20 @@ You can also run the following at anytime to ensure the local images are up to d
docker-compose pull docker-compose pull
``` ```
### Disable Mocknet explorer
Mocknet explorer is set to start by default.
However, if you'd prefer to not run this service you can easily disable it.
The section of the [`docker-compose.yaml`](https://github.com/blockstack/stacks-local-dev/blob/master/docker-compose.yaml) file looks like this:
```yaml
explorer:
image: ${EXPLORER_IMAGE}
container_name: ${EXPLORER_NAME}
restart: unless-stopped
cpus: ${EXPLORER_CPU}
mem_reservation: ${EXPLORER_MEM}
ports:
- ${EXPLORER_PORT_LOCAL}:${EXPLORER_PORT}
environment:
- MOCKNET_API_SERVER=${EXPLORER_MOCKNET_API_SERVER}:${API_STACKS_BLOCKCHAIN_API_PORT}
- TESTNET_API_SERVER=${EXPLORER_TESTNET_API_SERVER}:${API_STACKS_BLOCKCHAIN_API_PORT}
- API_SERVER=${EXPLORER_API_SERVER}:${API_STACKS_BLOCKCHAIN_API_PORT}
- NODE_ENV=${EXPLORER_NODE_ENV}
networks:
- mocknet
depends_on:
- api
```
To disable this service, simply comment the section with `#`. For example:
```yaml
# explorer:
# image: ${EXPLORER_IMAGE}
# container_name: ${EXPLORER_NAME}
```
### Services Running in Mocknet ### Services Running in Mocknet
**docker-compose Mocknet service names**: **docker-compose Mocknet service names**:
- miner
- follower - follower
- api - api
- postgres - postgres
- explorer
**Docker container names**: **Docker container names**:
- mocknet_stacks-node-miner
- mocknet_stacks-node-follower - mocknet_stacks-node-follower
- mocknet_stacks-node-api - mocknet_stacks-node-api
- mocknet_postgres - mocknet_postgres
- mocknet_explorer
#### Starting Mocknet Services #### Starting Mocknet Services
@ -250,14 +196,6 @@ docker logs -f <docker container name>
## Accessing the services ## Accessing the services
**stacks-node-miner**:
- Ports `20443-20444` are exposed to `localhost`
```bash
curl localhost:20443/v2/info | jq
```
**stacks-node-follower**: **stacks-node-follower**:
- Ports `20443-20444` are **only** exposed to the `mocknet` docker network. - Ports `20443-20444` are **only** exposed to the `mocknet` docker network.
@ -278,11 +216,6 @@ curl localhost:3999/v2/info | jq
export PGPASSWORD='postgres' && psql --host localhost -p 5432 -U postgres -d stacks_node_api export PGPASSWORD='postgres' && psql --host localhost -p 5432 -U postgres -d stacks_node_api
``` ```
**explorer**:
- Port `3000` is exposed to `localhost`
- Open a browser to [http://localhost:3000](http://localhost:3000)
## Potential issues ## Potential issues
### Port already in use ### Port already in use
@ -299,3 +232,15 @@ tcp46 0 0 *.5432 *.* LISTEN
### Containers not starting ### Containers not starting
Occasionally, docker can get **stuck** and not allow new containers to start. If this happens, simply restart your docker daemon and try again. Occasionally, docker can get **stuck** and not allow new containers to start. If this happens, simply restart your docker daemon and try again.
### BNS username not found
The mocknet is launched without the import of Stacks 1.0 name, only the test genesis chain state is imported. To change that comment out the corresponding line in `stacks-follower/Config.toml.template` like this:
```
# use_test_genesis_chainstate = true
```
### panic on launch
Verify that the path of the config file is correct in the `.env` file, in particular on Windows OS the slash (`/`) in path names can cause errors.

Loading…
Cancel
Save