Skip to content

Commit

Permalink
Testnet release (Rincewind)
Browse files Browse the repository at this point in the history
** Major Changes from 0.0.9

**** Store and forward

Peers will hold onto message for recipients that are not online and deliver the messages to them when they appear again.

**** OsX package installer

**** Many documentation improvements

**** Ephemeral keys for private messages

This is a big change that preserves privacy on the network but dramatically reduces the amount of traffic peers have to deal with.

**** Emoji Ids

*** Other changes

- The target difficulty for a specified PoW algorithm is included in the block header. This allows the target difficulty
  of any block height to be calculated by only processing the last set of target difficulty samples up to that height.
- Don't mark peers as offline if there are no existing connections (#1763)
- Add UTXO selection strategy for large txs
- Base node: Dynamically determine build version (#1760)
- Include random peers for liveness ping (#1753)
- RandomX - Version Update (#1754)
- Add generic debug log function to FFI (#1752)
- Lots of logging improvements
- Added list-transactions and cancel-transaction commands (#1746)
- ASCII table output for list-peers and list-connections (#1709)
- Improve Difficulty adjustment manager
- Modular configuration via ConfigLoader and ConfigPath traits
- Fix chain monitoring bug in Transaction Service (#1739)
- Empty Emoji String Bug Fix  (#1736)
- Coin-split base node cli command
- Complete the basic OSX pkg build
- Perform reorgs only on stronger tip accumulated difficulties
- Use filesystem storage for dht.db on libwallet (#1735)
- Fix duplicate message propagation (#1730)
- Introduced accumulated difficulty validators to allow different rules for testing and running running a base node. -
- Changes to peer offline handling (#1716)
- Update Transaction cancellation to work for Inbound and Outbound Txs
- Added oneshot reply to outbound messaging (#1703)
- Add transaction stress test command to CLI
- Implemented basic `make-it-rain` command
- Fix MmrCache rewind issue
- Use ephemeral key for private messages (e.g Discovery) (#1686)
- Limit orphan pool size
- Added a function to list UTXOs in the console (#1678)
- Prevent adding yourself as a peer (#1665)
- Update transaction weights (#1661)
- Fix block period calculation
- Validators will now check the weight of a block when doing validation (#1648)
- Cleaned up duplicate code from the Blockchain db
- The ban peer log will now supply n reason why the peer was banned (#1638)
  • Loading branch information
CjS77 committed Apr 25, 2020
1 parent bbf6538 commit e2fbe96
Show file tree
Hide file tree
Showing 343 changed files with 18,181 additions and 9,654 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clippy-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
components: clippy, rustfmt
override: true
- name: Install dependencies
run: |
Expand Down
126 changes: 80 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can check that the binaries match the hash by running
If you have docker on your machine, you can run a prebuilt node using one of the docker images on
[quay.io](https://quay.io/user/tarilabs).

### Building from Source (Ubuntu 18.04)
### Building from source (Ubuntu 18.04)

To build the Tari codebase from source, there are a few dependencies you need to have installed.

Expand Down Expand Up @@ -72,88 +72,121 @@ A successful build should output something as follows
The executable is currently inside your `target/release` folder. You can run it from that folder if you like, but you'll
more likely want to copy it somewhere more convenient. You can simply run

cargo install -p tari_base_node [![Build](https://circleci.com/gh/tari-project/tari.svg?style=svg)](https://circleci.com/gh/tari-project/tari)

# The Tari protocol

## Installing the base node software

### Using binaries

[Download binaries from tari.com](https://tari.com/downloads). This is the easiest way to run a Tari node, but you're
essentially trusting the person that built and uploaded them that nothing untoward has happened.

We've tried to limit the risks by publishing [hashes of the binaries](https://tari.com/downloads) on our website.

You can check that the binaries match the hash by running
cargo install -p tari_base_node

sha256sum path/to/tari_base_node
and cargo will copy the executable into `~/.cargo/bin`. This folder was added to your path in a previous step, so it
will be executable from anywhere on your system.

### Running a node in Docker
Alternatively, you can run the node from your source folder with the command

If you have docker on your machine, you can run a prebuilt node using one of the docker images on
[quay.io](https://quay.io/user/tarilabs).
cargo run -p tari_base_node

### Building from Source (Ubuntu 18.04)
### Building from source (Windows 10)

To build the Tari codebase from source, there are a few dependencies you need to have installed.
To build the Tari codebase from source on Windows 10, there are a few dependencies you need to have installed.

_**Note:** The Tari codebase does not work in Windows Subsystem for Linux version 1 (WSL 1), as the low-level calls
used by LMBD breaks it. Compatibility with WSL-2 must still be tested in future when it is released in a stable
Windows build._

#### Install development packages
#### Install dependencies

First you'll need to make sure you have a full development environment set up:

```
sudo apt-get -y install openssl libssl-dev pkg-config libsqlite3-dev clang git cmake libc++-dev libc++abi-dev
```
- git
- https://git-scm.com/downloads

- LLVM
- https://releases.llvm.org/
- Create a `LIBCLANG_PATH` environment variable pointing to the LLVM lib path, e.g.
```
setx LIBCLANG_PATH "C:\Program Files\LLVM\lib"
```
- Build Tools
- Microsoft Visual Studio Version 2019 or later
- C++ CMake tools for Windows
- MSVC build tools (latest version for your platform ARM, ARM64 or x64.x86)
- Spectre-mitigated libs (latest version for your platform ARM, ARM64 or x64.x86)
or
- [CMake](https://cmake.org/download/)
- [Build Tools for Visual Studio 2019](
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16)
- SQLite:
- Download 32bit/64bit Precompiled Binaries for Windows for [SQL Lite](https://www.sqlite.org/index.html) and unzip
to local path, e.g. `%USERPROFILE%\.sqlite`
- Open the appropriate x64\x86 `Native Tools Command Prompt for VS 2019` in `%USERPROFILE%\.sqlite`
- Run either of these, depending on your environment (32bit/64bit):
```
lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x64
```
```
lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x86
```
- Ensure folder containing `sqlite3.dll`, e.g. `%USERPROFILE%\.sqlite`, is in the path
- Create a `SQLITE3_LIB_DIR` environment variable pointing to the SQLite lib path, e.g.
```
setx SQLITE3_LIB_DIR "%USERPROFILE%\.sqlite"
```
- Tor
- Donwload [Tor Windows Expert Bundle](https://www.torproject.org/download/tor/)
- Extract to local path, e.g. `C:\Program Files (x86)\Tor Services`
- Ensure folder containing the Tor executable, e.g. `C:\Program Files (x86)\Tor Services\Tor`, is in the path
#### Install Rust
You can follow along at [The Rust Website](https://www.rust-lang.org/tools/install) or just follow these steps to get
Rust installed on your machine.
Follow the installation process for Windows at [The Rust Website](https://www.rust-lang.org/tools/install). Then make
sure that `cargo` and `rustc` has been added to your path:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then make sure that `cargo` has been added to your path.

export PATH="$HOME/.cargo/bin:$PATH"
cargo --version
rustc --version
#### Checkout the source code
In your folder of choice, clone the Tari repo
In your folder of choice, e.g. `%USERPROFILE%\Code`, clone the Tari repo
git clone https://github.com/tari-project/tari.git
#### Build
Grab a cup of coffee and begin the Tari build
This is similar to [building in Ubuntu](#building-from-source-ubuntu-1804), except the Microsoft Visual Studio
environment must be sourced.
cd tari
Open the appropriate _x64\x86 Native Tools Command Prompt for VS 2019_, and in your main Tari folder perform the
build, which will create the executable inside your `%USERPROFILE%\Code\tari\target\release` folder:
cd %USERPROFILE%\Code\tari
cargo build --release
A successful build should output something as follows
```
Compiling tari_wallet v0.0.9 (.../tari/base_layer/wallet)
Compiling test_faucet v0.0.1 (.../tari/applications/test_faucet)
Compiling tari_wallet_ffi v0.0.9 (.../tari/base_layer/wallet_ffi)
Compiling tari_base_node v0.0.9 (.../tari/applications/tari_base_node)
Compiling tari_wallet v0.0.9 (...\tari\base_layer\wallet)
Compiling test_faucet v0.0.1 (...\tari\applications\test_faucet)
Compiling tari_wallet_ffi v0.0.9 (...\tari\base_layer\wallet_ffi)
Compiling tari_base_node v0.0.9 (...\tari\applications\tari_base_node)
Finished release [optimized] target(s) in 12m 24s
```
#### Run
Alternatively, cargo can build and install the executable into `%USERPROFILE%\.cargo\bin`:
The executable is currently inside your `target/release` folder. You can run it from that folder if you like, but you'll
more likely want to copy it somewhere more convenient. You can simply run
cargo install tari_base_node
cargo install -p tari_base_node
#### Run
and cargo will copy the executable into `~/.cargo/bin`. This folder was added to your path in a previous step, so it
will be executable from anywhere on your system.
The executable will either be inside your `%USERPROFILE%\Code\tari\target\release` or the `%USERPROFILE%\.cargo\bin`
folder, depending on the build choice above. If the former build method was used, you can run it from that folder,
or you more likely want to copy it somewhere more convenient. Using the latter method, it will be executable from
anywhere on your system, as `%USERPROFILE%\.cargo\bin` was added to your path in a previous step.
Alternatively, you can run the node from your source folder with the command
cargo run -p tari_base_node
cargo run --bin tari_base_node
### Building a docker image
Expand All @@ -178,6 +211,7 @@ Test your image
* [Building with Vagrant](https://github.com/tari-project/tari/issues/1407)



# Project documentation

* [RFC documents](https://rfc.tari.com) are hosted on Github Pages. The source markdown is in the `RFC` directory.
Expand Down
20 changes: 19 additions & 1 deletion RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,22 @@ THings to do before pushing a new commit to `master`:
* Tag commit
* Write release notes on GitHub.
* Merge back into development (where appropriate)
* Delete branch
* Delete branch

| Crate | Version | Last change |
|:-----------------------------|:--------|:-----------------------------------------|
| infrastructure/derive | 0.0.10 | 7d734a2e79bfe2dd5d4ae00a2b760614d21e69c4 |
| infrastructure/shutdown | 0.0.10 | 7d734a2e79bfe2dd5d4ae00a2b760614d21e69c4 |
| infrastructure/storage | 0.1.0 | |
| infrastructure/test_utils | 0.0.10 | 7d734a2e79bfe2dd5d4ae00a2b760614d21e69c4 |
| base_layer/core | 0.1.0 | |
| base_layer/key_manager | 0.0.10 | 7d734a2e79bfe2dd5d4ae00a2b760614d21e69c4 |
| base_layer/mmr | 0.1.0 | |
| base_layer/p2p | 0.1.0 | |
| base_layer/service_framework | 0.0.10 | 7d734a2e79bfe2dd5d4ae00a2b760614d21e69c4 |
| base_layer/wallet | 0.1.0 | |
| base_layer/wallet_ffi | 0.1.0 | |
| common | 0.1.0 | |
| comms | 0.1.0 | |
| comms/dht | 0.1.0 | |
| applications/tari_base_node | 0.1.0 | |
27 changes: 18 additions & 9 deletions applications/tari_base_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@ authors = ["The Tari Development Community"]
description = "The tari full base node implementation"
repository = "https://github.com/tari-project/tari"
license = "BSD-3-Clause"
version = "0.0.10"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
tari_common = {path = "../../common", version= "^0.0"}
tari_comms = { version = "^0.0", path = "../../comms"}
tari_comms_dht = { version = "^0.0", path = "../../comms/dht"}
tari_core = {path = "../../base_layer/core", version= "^0.0"}
tari_p2p = {path = "../../base_layer/p2p", version= "^0.0"}
tari_common = { version= "^0.1", path = "../../common" }
tari_comms = { version = "^0.1", path = "../../comms"}
tari_comms_dht = { version = "^0.1", path = "../../comms/dht"}
tari_core = {path = "../../base_layer/core", version= "^0.1"}
tari_p2p = {path = "../../base_layer/p2p", version= "^0.1"}
tari_service_framework = { version = "^0.0", path = "../../base_layer/service_framework"}
tari_shutdown = { path = "../../infrastructure/shutdown", version = "^0.0" }
tari_mmr = { path = "../../base_layer/mmr", version = "^0.0" }
tari_wallet = { path = "../../base_layer/wallet", version = "^0.0" }
tari_mmr = { path = "../../base_layer/mmr", version = "^0.1" }
tari_wallet = { path = "../../base_layer/wallet", version = "^0.1" }
tari_broadcast_channel = "^0.1"
tari_crypto = { version = "^0.3" }

clap = "2.33.0"
structopt = { version = "0.3.13", default_features = false }
config = { version = "0.9.3" }
dirs = "2.0.2"
futures = { version = "^0.3.1", default-features = false, features = ["alloc"]}
Expand All @@ -35,3 +36,11 @@ rustyline-derive = "0.3"
strum = "0.18.0"
strum_macros = "0.18.0"
qrcode = { version = "0.12" }
chrono = "0.4"
chrono-english = "0.1"
regex = "1"

[build-dependencies]
serde = "1.0.90"
toml = "0.5"
git2 = "0.8"
25 changes: 25 additions & 0 deletions applications/tari_base_node/assets/tari_banner.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"
                                            ▄▄▄▄▄▄▄                                                                                  
  ▄▄▄  ▓██▄     ░                      ▄▒█████████████▄                       ░▐  ░▐                           ▄▄▄▄          ▄▄▄▄    
  ▀███▄ ▀▓█▓     ░                   ▄▓█████████████████▌                      ░░░░ ▒ ░                      ███████▄      ▄███████  
 ▄▄ ▀▓██▄ ▓██▄      ▓███            ▓█████████████████████▄                  ░▄▄▒░▒▄▒░░░░░                 ▐█████████▌    ██████████ 
▐▓██▄ ▀███▄▐███▄   ▐▓▓▓            ▓▌  ▄▄▄▄  ░▀▀▀  ▄▄▄▄▄  ▓░               ▒▒▓▓▀▒▀▓▓▓▒░░░░░░               ███████████   ▐███████████
  ▀▓██▌ ▀███▓████▄▄██▓▒            ▓▓ ▐██ ░░   ▄  ░░ ███░▐▓▒             ▐▒▒▓▓▓▄ ▄▓▓▓▒▒░ ░░░              ▐▐█░   █████▌  ▀██   ▀█████
  ▄ ▐▓██▌░▓███████████▓           ▐▒▓▌▐███▄▄  ▓█▌ ▄▄████ ▓▓▒            ▌▒▒▓▓▓▓▓▓▓▓▓▓▒▒▒░ ░░                     ▐████▌        ░█████
 ▀██▓▄▐███████████████▓░           ▒▓▓▓▄▄▄▄▄▄█████▄▄▄▄▄▄█▓▒▒           ██▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒                  ░   ▄▒█████▒  ░    ▒██████
   ▀▓██▄▄████████████▓▓▒            ▒▓▓▓▓ ▀▀██████▀▀ ▓▓▓▓▒▒           ▀▀██▌▒▒░░░░░░░░░▒▒▒▒                 ▀█████████▌    ██████████░
      ▓█████████████▓▒▒              ▒▒▓▓▓▓       ▓▓▓▓▓▒▒░            ▒▒███▒       ░░▒▒▒▒▒                  ▀███████▌      ████████░ 
        ▀▓███████▓▓▓▒▒                 ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓░                            ░▒▒▒▀                     ▀▀█▀▀          ▀██▀▀    
           ▀▓▓▓▓▓▒▒▒                       ▀▒▒▒▒▒▒▀                                                                                  




                                           ▄▄▄▄▄▄▄▄▄▄        ▄▄      ▄▄▄▄▄▄▄▄▄▄    ▄▄▄▄▄▄                                            
                                           ██ ▀███ ▐█      ▐████      ████   ███    ▐███                                             
                                              ▐███        ███  ███    ███▌   ███    ▐███                                             
                                              ▐███      ███▌    ███▌  ████▄▄▄██▀    ▐███                                             
                                              ▐███      ███████████▌  ███▌ ███▌     ▐███                                             
                                              ▐███      ███▌    ███▌  ███▌   ███    ▐███                                             
                                             ▄████▄▄    ███▌    ███▌ ▄███▌   ███   ▄████▄                                            
"
Loading

0 comments on commit e2fbe96

Please sign in to comment.