tari-project / tari-launchpad

A node, wallet and miner for Tari focusing on ease of use
BSD 3-Clause "New" or "Revised" License
8 stars 16 forks source link

Tari Launchpad - Text edition

Currently, the Tauri UI is not working, as an interim solution, a text version is available with:

   $ cargo run --bin tari-lp-cli

This will build/run the text based version that can run launchpad.

Tari Launchpad - Tauri edition

a.k.a. Tari one-click miner.

Prerequisites

  1. Rust and cargo (https://www.rust-lang.org/tools/install).
  2. NodeJs (v16.0 or higher) and Yarn (v 1.22 or higher).
  3. Tauri CLI (cargo install tauri-cli). Optional.
  4. Docker is not strictly a pre-requisite, since the launchpad on-boarding flow will install it for you, but you will need docker eventually, so putting it here.
  5. Install the front-end dependencies
  6. Running a development version of launchpad

These commands

$ yarn run tauri dev

Debugging

The console relays debug messages from the launchpad backend (a Rust application). The front-end is a standard ReactJs application wrapped inside a Tauri desktop application. You can open a standard browser console in the front-end to debug front-end issues.

Tip: If you receive the following error Unable to create base node... there was a problem packaging the assets for the app.

Building a production release

To build a production release, which also includes a bundled installer (.dmg on mac, .deb on linux, .msi on windows), you can execute:

$ cd applications/launchpad
$ yarn run tauri build

Viewing logs and configuration files

You can use the bundled Grafana environment that is packaged with launchpad to view log files. Or you can use your favorite text editor instead.

Logs and configuration files are stored in

You can edit the log configuration, {network}/config/log4rs.yml to change the log level, output etc. Changes are picked up on the fly and take effect within 30s.

Miscellaneous notes

Accessing blockchain data

The blockchain data is stored in a docker volume for performance reasons. If you need to back up or access the LMDB of blockchain data, you can use something like this to extract it to the host filesystem:

docker run --rm -v $(pwd):/backup -v blockchain:/blockchain ubuntu tar czvf /backup/backup.tar.gz /blockchain

Layout

      +-----------------------+
      |                       |
+---->|    Console Wallet     +------------------+
|     |                       |                  |
|     +----------+------------+                  |
|                |                               |
|                | gRPC                          |
|                |                               |
|                |                               |
|     +----------v------------+           +------v-----+
|     |                       |  Socks5   |            |
|     |       Base Node       +---------->|     Tor    |----> Network
|     |                       |           |            |
|     +----------^------------+           +------------+
|                |
|                |
|                |
|     +----------+------------+
|     |                       |
+-----+      SHA3-Miner       |
|     |                       |
|     +-----------------------+
|
|
|
|     +-----------------------+
|     |                       |
+-----+        XMRRig etc     |
      |                       |
      +-----------------------+

Building custom docker images

The docker images for the base node, wallet etc. are designed to handle the broadest set of chipsets and architectures. For this reason, they not be optimal for your system. You can build custom images for launchpad using the build_images.sh script in this folder.

Refer to that script for further details and build options.

There are a set of files in this folder that offer a convenient way of setting the environment up for some common configurations.

run source {env_config}.env to set up the environment. Currently, the presets are: