Skip to content

Commit

Permalink
Merge branch 'development' into core-sync-latency-based-peer-switch
Browse files Browse the repository at this point in the history
* development:
  refactor: reduce log level of some messages (tari-project#3804)
  ci: move Apple IDs into envs (tari-project#3797)
  feat: read asset definitions from base layer (tari-project#3802)
  fix: bump flood ban messages config (tari-project#3799)
  docs: readme fixes (tari-project#3800)
  feat(wallet_ffi)!:  add base node connectivity callback to wallet ffi (tari-project#3796)
  fix: minor fixes on collectibles (tari-project#3795)
  refactor: outbound message pipeline, threads and mempool improvements (tari-project#3792)
  feat(collectibles): add delete committee member button (tari-project#3786)
  fix(comms): minor edge-case fix to handle inbound connection while dialing (tari-project#3785)
  fix(core)!: fix potential panic for sidechain merkle root with incorrect length (tari-project#3788)
  fix(core): reduce one block behind waiting period (tari-project#3798)
  feat: add specific LibWallet error code for “Fee is greater than amount” (tari-project#3793)
  fix: coinbase output recovery bug (tari-project#3789)
  feat(base-node): add number of active sync peers metric (tari-project#3784)
  chore: script to keep .gitkeep file (tari-project#3787)
  feat: re-use scanned range proofs (tari-project#3764)
  feat: ability to compile on stable rust (tari-project#3759)
  feat: add logging and config to collectibles (tari-project#3781)
  chore: remove debug info from get-mempool-state (tari-project#3782)
  • Loading branch information
sdbondi committed Feb 8, 2022
2 parents 4d317df + 0754ac5 commit 504529f
Show file tree
Hide file tree
Showing 138 changed files with 1,979 additions and 964 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ jobs:
if: startsWith(runner.os,'macOS')
env:
MACOS_KEYCHAIN_PASS: ${{ secrets.MACOS_KEYCHAIN_PASS }}
MACOS_APPLICATION_ID: ${{ secrets.MACOS_APPLICATION_ID }}
MACOS_APPLICATION_CERT: ${{ secrets.MACOS_APPLICATION_CERT }}
MACOS_APPLICATION_PASS: ${{ secrets.MACOS_APPLICATION_PASS }}
MACOS_INSTALLER_ID: ${{ secrets.MACOS_INSTALLER_ID }}
MACOS_INSTALLER_CERT: ${{ secrets.MACOS_INSTALLER_CERT }}
MACOS_INSTALLER_PASS: ${{ secrets.MACOS_INSTALLER_PASS }}
run: |
Expand All @@ -206,15 +208,15 @@ jobs:
./create_osx_install_zip.sh unused nozip
FILES=("tari_base_node" "tari_console_wallet" "tari_mining_node" "tari_merge_mining_proxy")
for FILE in "${FILES[@]}"; do
codesign --force -s "Developer ID Application: Tari Labs, LLC (8XGMD9X2H2)" "/tmp/tari_testnet/runtime/$FILE" -v
codesign --force -s "Developer ID Application: $MACOS_APPLICATION_ID" "/tmp/tari_testnet/runtime/$FILE" -v
codesign --verify --deep --display --verbose=4 "/tmp/tari_testnet/runtime/$FILE"
done
pkgbuild --root /tmp/tari_testnet \
--identifier "com.tarilabs.pkg" \
--version "$VERSION" \
--install-location "/tmp/tari" \
--scripts "/tmp/tari_testnet/scripts" \
--sign "Developer ID Installer: Tari Labs, LLC (8XGMD9X2H2)" \
--sign "Developer ID Installer: $MACOS_INSTALLER_ID" \
"${{ github.workspace }}${{ env.TBN_DIST }}/tari-${{ env.VERSION }}.pkg"
- name: Artifact macos pkg
if: startsWith(runner.os,'macOS')
Expand Down
61 changes: 56 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Compile NPM
run: |
cd applications/launchpad/gui-vue
npm install
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -80,7 +80,7 @@ jobs:
command: clippy
args: --all-targets -- -D warnings
build:
name: build
name: check nightly
runs-on: ubuntu-18.04
steps:
- name: checkout
Expand Down Expand Up @@ -114,14 +114,65 @@ jobs:
- name: Compile NPM
run: |
cd applications/launchpad/gui-vue
npm install
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.toolchain }}
components: clippy, rustfmt
override: true
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --release --all-targets
build-stable:
name: check stable
runs-on: ubuntu-18.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: caching
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.cpu-model }}-stable-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.cpu-model }}-stable-build-
${{ runner.os }}-${{ runner.cpu-model }}-stable-
- name: ubuntu dependencies
run: |
sudo apt-get update && \
sudo apt-get -y install \
build-essential \
libgtk-3-dev \
libwebkit2gtk-4.0-dev \
libsoup2.4-dev \
curl \
wget \
libappindicator3-dev \
patchelf \
librsvg2-dev \
libprotobuf-dev \
protobuf-compiler
- name: Compile NPM
run: |
cd applications/launchpad/gui-vue
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: rustup show
run: |
rustup show
- name: cargo build
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -163,7 +214,7 @@ jobs:
- name: Compile NPM
run: |
cd applications/launchpad/gui-vue
npm install
npm ci
npm run build
- name: toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -173,4 +224,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --release
args: --release --all-targets
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Only the first four applications will be discussed in this README (see [wallet-a

### Download

[Download binaries](https://tari.com/downloads) from <www.tari.com>. This is the easiest way to run a Tari node, but you're
[Download binaries](https://tari.com/downloads/) from [tari.com](https://www.tari.com/). 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 limited the risks by publishing hashes of the binaries alongside the binaries on our website. You can check
that the binaries match the hash by opening a terminal (or command prompt) and by running
Hashes of the binaries are available alongside the downloads.
You can get the hash of your download by opening a terminal or command prompt and running the following:

(\*nix)

Expand All @@ -31,6 +31,10 @@ that the binaries match the hash by opening a terminal (or command prompt) and b

certUtil -hashfile <PATH_TO_BINARY_INSTALL_FILE> SHA256

If the result doesn't match the published hash, don't run the binary.
Note that this only checks that your binary was downloaded correctly; it cannot detect if the binary was replaced by a bad actor.
If you need to ensure that your binary matches the source, see [Building from source](#building-from-source) below.

### Install

After you have downloaded the binaries, you need to install them. This is easy to do, and works as follows:
Expand Down Expand Up @@ -422,7 +426,7 @@ The Tari Base Node, Tari Console Wallet, Tari Stratum Transcoder and Tari Mining
default installation as described in [Installing using binaries](#installing-using-binaries), all these applications
will be available.

For MiningCore see [here](https://github.com/tari-project/miningcore/master/tari#runtime-requirements-on-linux) and [here](https://github.com/tari-project/miningcore/tree/master#runtime-requirements-on-windows).
For MiningCore see the [Linux](https://github.com/tari-project/miningcore/#building-on-debianubuntu) and [Windows](https://github.com/tari-project/miningcore/#building-on-windows) build instructions.

#### Configuration prerequisites

Expand Down Expand Up @@ -667,7 +671,7 @@ they are, choose different ports. You will need to update the ports in the steps

The `monerod_url` set must contain valid addresses (`host:port`) for `monerod` that is running Monero mainnet (e.g.
`["http://18.132.124.81:18081"]`) or stagenet (e.g. `["http://monero-stagenet.exan.tech:38081"]`), which can be a
[public node hosted by XMR.to](https://community.xmr.to/nodes.html), or to a local instance. To test if the
public node or local instance. To test if the
`monerod_url` address is working properly, try to paste `host:port/get_height` in an internet browser, for example:

```
Expand Down Expand Up @@ -959,7 +963,7 @@ your wallet identity under `Username:` to see your shares, or try `taritest` if

## RFC documents

The RFCs are long-form technical documents proposing changes and features to the Tari network and ecosystem. They are hosted at https://rfc.tari.com, but you can easily build and serve alocal version yourself.
The RFCs are long-form technical documents proposing changes and features to the Tari network and ecosystem. They are hosted at https://rfc.tari.com, but you can easily build and serve a local version yourself.

Firstly, install `mdbook`. Assuming you have Rust and cargo installed, run

Expand Down
4 changes: 2 additions & 2 deletions applications/launchpad/backend/assets/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ track_reorgs = true

[base_node.dibbler]
db_type = "lmdb"
flood_ban_max_msg_count = 10000
flood_ban_max_msg_count = 100_000
allow_test_addresses = false
use_libtor = false
base_node_identity_file = "/var/tari/base_node/config/dibbler/tari_base_node_id.json"
Expand All @@ -65,7 +65,7 @@ grpc_base_node_address = "0.0.0.0:18142"

[base_node.igor]
db_type = "lmdb"
flood_ban_max_msg_count = 10000
flood_ban_max_msg_count = 100_000
allow_test_addresses = false
use_libtor = false
base_node_identity_file = "/var/tari/base_node/config/igor/base_node_id.json"
Expand Down
4 changes: 2 additions & 2 deletions applications/launchpad/docker_rig/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ track_reorgs = true

[base_node.dibbler]
db_type = "lmdb"
flood_ban_max_msg_count = 10000
flood_ban_max_msg_count = 100_000
data_dir = "/blockchain/dibbler"
force_sync_peers = []
allow_test_addresses = false
Expand All @@ -64,7 +64,7 @@ console_wallet_tor_identity_file = "config/dibbler/console_wallet_tor.json"

[base_node.igor]
db_type = "lmdb"
flood_ban_max_msg_count = 10000
flood_ban_max_msg_count = 100_000
data_dir = "/blockchain/igor"
force_sync_peers = []
allow_test_addresses = false
Expand Down
6 changes: 6 additions & 0 deletions applications/tari_app_grpc/proto/wallet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ service Wallet {
rpc GetCompletedTransactions (GetCompletedTransactionsRequest) returns (stream GetCompletedTransactionsResponse);
// Returns the balance
rpc GetBalance (GetBalanceRequest) returns (GetBalanceResponse);
// Returns unspent amounts
rpc GetUnspentAmounts (Empty) returns (GetUnspentAmountsResponse);
// Request the wallet perform a coinsplit
rpc CoinSplit (CoinSplitRequest) returns (CoinSplitResponse);
// Import Utxo to wallet
Expand Down Expand Up @@ -206,6 +208,10 @@ message GetBalanceResponse {
uint64 pending_outgoing_balance = 3;
}

message GetUnspentAmountsResponse {
repeated uint64 amount = 1;
}

message GetCoinbaseRequest {
uint64 reward = 1;
uint64 fee = 2;
Expand Down
11 changes: 6 additions & 5 deletions applications/tari_app_grpc/src/conversions/output_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

use std::convert::{TryFrom, TryInto};

use tari_common_types::types::{Commitment, PublicKey};
use tari_common_types::{
array::copy_into_fixed_array,
types::{Commitment, PublicKey},
};
use tari_core::transactions::transaction::{
AssetOutputFeatures,
MintNonFungibleFeatures,
Expand Down Expand Up @@ -176,10 +179,8 @@ impl TryFrom<grpc::SideChainCheckpointFeatures> for SideChainCheckpointFeatures
PublicKey::from_bytes(c).map_err(|err| format!("committee member was not a valid public key: {}", err))
})
.collect::<Result<_, _>>()?;
let merkle_root = copy_into_fixed_array(&value.merkle_root).map_err(|_| "Invalid merkle_root length")?;

Ok(Self {
merkle_root: value.merkle_root.as_bytes().to_vec(),
committee,
})
Ok(Self { merkle_root, committee })
}
}
2 changes: 1 addition & 1 deletion applications/tari_base_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tari_service_framework = { path = "../../base_layer/service_framework" }
tari_shutdown = { path = "../../infrastructure/shutdown" }
tari_utilities = "0.3.0"

anyhow = "1.0.32"
anyhow = "1.0.53"
bincode = "1.3.1"
chrono = { version = "0.4.19", default-features = false }
config = { version = "0.9.3" }
Expand Down
3 changes: 2 additions & 1 deletion applications/tari_base_node/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ where B: BlockchainBackend + 'static
auxilary_tcp_listener_address: self.config.auxilary_tcp_listener_address.clone(),
datastore_path: self.config.peer_db_path.clone(),
peer_database_name: "peers".to_string(),
max_concurrent_inbound_tasks: 100,
max_concurrent_inbound_tasks: 50,
max_concurrent_outbound_tasks: 100,
outbound_buffer_size: 100,
dht: DhtConfig {
database_url: DbConnectionUrl::File(self.config.data_dir.join("dht.db")),
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_base_node/src/command_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl CommandHandler {
status_line.add_field(
"Rpc",
format!(
"{}/{} sessions",
"{}/{}",
num_active_rpc_sessions,
config
.rpc_max_simultaneous_sessions
Expand Down
4 changes: 4 additions & 0 deletions applications/tari_collectibles/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ tauri-build = { version = "1.0.0-beta.4" }

[dependencies]
tari_app_grpc = { path = "../../tari_app_grpc" }
tari_app_utilities = { path = "../../tari_app_utilities" }
tari_common = { path = "../../../common" }
tari_common_types = { path = "../../../base_layer/common_types" }
tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", branch = "main" }
tari_key_manager = { path = "../../../base_layer/key_manager" }
tari_mmr = { path = "../../../base_layer/mmr"}
tari_utilities = "*"
tari_dan_common_types = { path = "../../../dan_layer/common_types"}
log = { version = "0.4.8", features = ["std"] }

blake2 = "^0.9.0"
futures = "0.3.17"
Expand All @@ -38,6 +41,7 @@ uuid = { version = "0.8.2", features = ["serde"] }
prost = "0.9"
prost-types = "0.9"
structopt = "0.3.25"
tokio = { version = "1.11", features = ["signal"] }

[features]
default = [ "custom-protocol" ]
Expand Down
Loading

0 comments on commit 504529f

Please sign in to comment.