Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/blockchain/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## Get started

- [Start a Logos Blockchain node via the app UI](./get-started/start-a-logos-blockchain-node-via-the-app-ui.md)
- [Run a Logos Blockchain node on the public testnet from the CLI](get-started/run-a-logos-blockchain-node-from-cli.md)
- [Introduction to the Logos Blockchain](get-started/introduction-to-the-logos-blockchain.md)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
title: Start a Logos Blockchain node via the app UI
doc_type: procedure
product: blockchain
topics: blockchain
steps_layout: sectioned
authors: davidrusu, cheny0
owner: logos
doc_version: 1
slug: start-a-logos-blockchain-node-via-the-app-ui
---

# Start a Logos Blockchain node via the app UI

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was about using basecamp to install a module to just run a node, but realised later it's about building and running the node front-end.

Consider a title that includes 'build'? Something like: Build and run the Logos Blockchain node front-end app

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to keep as-is since the goal of the tutorial is to have a blockchain node, and the way to get one is via the app. The goal is not building or running the app per se.


#### Run a node that participates in consensus via a graphical interface.

The Logos Blockchain is the blockchain module of the Logos technology stack, providing a privacy-preserving and censorship-resistant framework for decentralized network states. You can run a Logos Blockchain node [using the CLI](./run-a-logos-blockchain-node-on-public-testnet-from-cli.md) or the graphical interface.

{% hint style="info" %}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't render when viewing the file in github, consider:

> ![INFO]`
> Some info msg...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I know. This is the format we're now using across the docs to allow callouts to render on the gitbook website. Unfortunately, support for plugins enabling github-style ![INFO] tags is no longer available on gitbook.


For testnet v0.1, you must manually edit the config file and restart the node to add new keys.

{% endhint %}

Before you start, make sure you have the following:

- A supported OS: Linux x86_64 or macOS
- [Nix](https://github.com/NixOS/nix-installer) installed with flakes enabled.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see --enable-flakes as part of the single install line!
Ideally we could have the single install line here (rather than have the user leave to the NixOS repo), and ensure it doesn't go stale by having it in a script, and add a pre-processing step to the docs to take that command and insert it here.
Not for this PR just an idea issue for such scenarios. Note this is different to the automated testing of tutorials in the tool used by core.


## What to expect

By the end of this tutorial:

- You will have a Logos Blockchain node running and connected to peers.
- Your wallet will hold testnet funds requested from the faucet.
- Your node will be eligible to participate in the consensus lottery after the UTXO ages for approximately two hours.

## Step 1: Run the Logos Blockchain app

1. Clone the repository:

```sh
git clone https://github.com/logos-blockchain/logos-blockchain-ui.git
cd logos-blockchain-ui
```

1. Build the standalone app:

```sh
nix build '.#app'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not find .#app target. nix build builds a lib, and nix run seems to be building a lot of things...
Not sure if there's a config here (or was in a past commit) where '.#app' worked quicker?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, nix run Has been running for over 1hr and not yet finished
image
Note: doing nix run is specified in the blockchain-ui repo's readme as how to run it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Khushboo-dev-cpp check out this issue with the blockchain ui

```

- If flakes are not enabled globally, run `nix build --extra-experimental-features 'nix-command flakes' '.#app'` instead.

1. Run the app:

```sh
./result/bin/logos-blockchain-ui-app
```

## Step 2: Generate and load a node config

1. In the app, click **Generate Config**.

1. In the [Logos Blockchain release notes](https://github.com/logos-blockchain/logos-blockchain/releases), search for "testnet bootstrap peers" and copy the initial trusted peer set.

1. In the app, paste the peer set information in the **Initial peers** and click **Generate Config** on the bottom.

1. Click **Load Config** and select the generated config file.

1. Click **Start Node**. A green indicator shows the node is running, and the wallet appears with a balance of `0`.

## Step 3: Request testnet funds from the faucet

1. From the wallet section of the UI, copy one of your keys.

1. Go to the [devnet faucet](https://devnet.blockchain.logos.co/node/0/faucet), paste your key, and click **Request Funds**.

> **Note:**
>
> The transaction can take up to a minute to confirm and appear in your wallet.

## Step 4: Verify the node is healthy

1. Check that the blockchain height is increasing:

```sh
curl localhost:8080/cryptarchia/info
```

Example response:

```json
{"lib":"3d0c...4e6d","tip":"f44d...e2f5","slot":70899,"height":120,"mode":"Bootstrapping"}
```

Expect `height` to increase at an average rate of one block every 10 seconds. The timing is probabilistic, so some variance is normal.

1. Check that the node is connected to peers:

```sh
curl localhost:8080/network/info
```

Example response:

```json
{"listen_addresses":["/ip4/127.0.0.1/udp/3001/quic-v1"],"peer_id":"12D3...fuS2","n_peers":16,"n_connections":19,"n_pending_connections":0}
```

Confirm that `n_peers` is greater than `0`.

Once the node is funded and the UTXO has aged for approximately two hours, the node automatically participates in the consensus lottery and starts producing blocks.

## Troubleshooting starting a node

### The wallet balance does not update after a faucet request

Only one faucet transaction can be included per block, so transactions may be dropped during periods of high demand. Retry the request from the faucet.