Skip to content

Commit

Permalink
updated running a node docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
duelingbenjos committed Jun 25, 2024
1 parent d7f938e commit 3ec96f0
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 19 deletions.
13 changes: 6 additions & 7 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,12 @@ export default defineConfig({
{ text: 'Websockets', link: '/node/interfaces/websockets' },
]
},
// {
// text: "Running a Node", collapsed: true, items: [
// { text: "Getting Started", link: "/node/running-a-node/getting-started" },
// { text: "Service Node", link: "/node/running-a-node/service-node" },
// { text: "Becoming a Validator", link: "/node/running-a-node/becoming-a-validator" },
// ]
// }
{
text: "Running a Node", collapsed: true, items: [
{ text: "Getting Started", link: "/node/running-a-node/getting-started" },
{ text: "Becoming a Validator", link: "/node/running-a-node/becoming-a-validator" },
]
}
]
},
{
Expand Down
121 changes: 113 additions & 8 deletions src/node/running-a-node/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,116 @@
# Getting Started

- System Requirements
- Validator
- Full Node
- Service Node
- Installation
- Configuration
- Running a Node
- Monitoring a Node
## Overview

Xian Network has **3 types of nodes**

### Validator Nodes

* Validators are responsible for creating & validating blocks.
* A block is considered valid when **75%** of validators vote for a block.

### Full Nodes

* Full nodes keep a copy of the entire history & state of the blockchain.
* They are a key component to keeping the network healthy.

### Blockchain Data Service Nodes

Blockchain Data Service (`BDS`) nodes improve developer experience by providing :
- Rich data & querying via REST & Websocket interfaces
- Stamp estimation, allowing a dAPP to know how many `stamps` a transaction will cost before submitting it to the network.

## Generate a wallet.

- Create a wallet using the <a href="/tools/browser-wallet" target="_blank">browser wallet</a>
- Export the private key
- Click `Settings`
- Click `Export Private Key`

## Install prerequisites

1. Install make
```bash
sudo apt update
sudo apt install make
```
2. Install Docker
```bash
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
rm get-docker.sh
```

## Install Xian & Configure Node
### Install
```bash
git clone https://github.com/xian-network/xian-stack.git
cd xian-stack
make setup
```

### Build
* For a Validator / Regular Full-Node
```bash
make core-build
make core-up
make init
make configure CONFIGURE_ARGS='--moniker <your-moniker> --genesis-file-name genesis-devnet.json --validator-privkey <priv-key> --seed-node 128.140.96.150 --copy-genesis'

```
* For a Blockchain Data Service Node
```bash
make core-bds-build
make core-bds-up
make init
make configure CONFIGURE_ARGS='--moniker <your-moniker> --genesis-file-name genesis-devnet.json --validator-privkey <priv-key> --seed-node 128.140.96.150 --copy-genesis --service-node'
```

## Starting the node
* Headless Mode
```bash
make up
```
* Interactive Shell
```bash
make core-shell
cd xian-core
make up
```

* When finished
```bash
exit
```

## Viewing Logs
```bash
make core-shell
cd xian-core
pm2 logs
```
* When finished
```bash
exit
```

## Stopping the node
* Headless mode
```bash
make down
```
* From Container Shell
```bash
cd xian-core
make down
```

## Shutting down the node container
* Needed if rebuilding the container
```bash
make core-down
# or
make code-bds-down
```
4 changes: 0 additions & 4 deletions src/node/running-a-node/service-node.md

This file was deleted.

0 comments on commit 3ec96f0

Please sign in to comment.