docs: update consensus.md

Remove outdated things, make it more useful.
This commit is contained in:
Roman Khimov 2021-03-18 13:00:10 +03:00
parent 09d560e8a1
commit e7c4264124

View file

@ -6,33 +6,32 @@ It uses pure Go dBFT implementation from [nspcc-dev/dbft](https://github.com/nsp
## How to start your own privnet with neo-go nodes ## How to start your own privnet with neo-go nodes
### Using existing Dockerfile ### Using existing Dockerfile
neo-go comes with a preconfigured private network setup that consists of four neo-go comes with two preconfigured private network setups, the first one has
consensus nodes and 6000 blocks to make it more usable out of the box. Nodes four consensus nodes and the second one uses single node. Nodes are packed
are packed into Docker containers with one shared volume for chain data (they into Docker containers and four-node setup shares a volume for chain data.
don't share actual DB, each node has its own DB in this volume). They use ports
20333-20336 for P2P communication and ports 30333-30336 for RPC (Prometheus
monitoring is also available at ports 20001-20004).
On the first container start they import 6K of blocks from a file, these Four-node setup uses ports 20333-20336 for P2P communication and ports
blocks contain several transactions that transfer all NEO into one address and 30333-30336 for RPC (Prometheus monitoring is also available at ports
claim some GAS for it. NEO/GAS owner is: 20001-20004). Single-node is on ports 20333/30333/20001 for
* address: AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y P2P/RPC/Prometheus.
* wif: KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr
and you can use it to make some transactions of your own on this privnet. NeoGo default privnet configuration is made to work with four node consensus,
you have to modify it if you're to use single consensus node.
Basically, this setup is closely resembling the one `neo-local` had for C# nodes Node wallets are located in the `.docker/wallets` directory where
before the switch to single-node mode. `wallet1_solo.json` is used for single-node setup and all the other ones for
four-node setup.
#### Prerequisites #### Prerequisites
- `docker` - `docker`
- `docker-compose` - `docker-compose`
- `go` compiler - `go` compiler
#### Instructions #### Instructions
You can use existing docker-compose file located in `.docker/docker-compose.yml`: You can use existing docker-compose file located in `.docker/docker-compose.yml`:
```bash ```bash
make env_image # build image make env_image # build image
make env_up # start containers make env_up # start containers, use "make env_single" for single CN
``` ```
To monitor logs: To monitor logs:
```bash ```bash