Skip to content

Commit

Permalink
Merge branch 'development' into mempool-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aviator-app[bot] committed Sep 30, 2021
2 parents 71e26f7 + 6d57cbd commit f9b29d0
Show file tree
Hide file tree
Showing 154 changed files with 796 additions and 804 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

defaults:
rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-05-09
rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-08-17

commands:
test:
Expand Down Expand Up @@ -96,6 +96,9 @@ commands:
cucumber-js:
description: Run cucumber scenarios
steps:
- run:
name: node -v
command: node -v
- run:
name: npm ci
command: cd integration_tests && npm ci
Expand Down Expand Up @@ -126,7 +129,7 @@ commands:
- run:
name: Run cucumber scenarios
no_output_timeout: 20m
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --tags "not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retryTagFilter "@flaky"
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --tags "not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retryTagFilter "@flaky and not @broken"
- run:
name: Generate report
command: cd integration_tests && node ./generate_report.js
Expand Down
39 changes: 20 additions & 19 deletions .github/wip_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ on:
pull_request:
types: [opened]

name: Integration Tests
name: CI

jobs:
integration-tests:
name: Integration Tests
integration:
name: integration
runs-on: ubuntu-20.04
steps:
- name: checkout
Expand All @@ -23,14 +23,15 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-05-09
toolchain: nightly-2021-08-17
components: clippy, rustfmt
override: true
- name: dependencies
run: |
sudo apt-get update && \
sudo apt-get -y install \
libssl-dev \
clang-10 \
pkg-config \
git \
cmake \
Expand All @@ -39,9 +40,9 @@ jobs:
libc++abi-dev \
libprotobuf-dev \
protobuf-compiler
cargo install cargo2junit
- name: npm ci and lint
run: |
node -v
cd integration_tests
npm ci
npm run check-fmt
Expand All @@ -52,23 +53,23 @@ jobs:
cargo build --release --bin tari_console_wallet
cargo build --release --bin tari_merge_mining_proxy
cargo build --release --bin tari_mining_node
cargo build --release --bin tari_stratum_transcoder
cargo build --release --package tari_wallet_ffi
- name: run cucumber scenarios
run: |
cd integration_tests
mkdir -p cucumber_output
node_modules/.bin/cucumber-js --tags "@broken" --format json:cucumber_output/tests.cucumber
node_modules/.bin/cucumber-js --tags "not @long-running and not @broken and not @flaky" --format json:cucumber_output/tests.cucumber
- name: report
uses: deblockt/cucumber-report-annotations-action@v1.7
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
path: "integration_tests/cucumber_output/tests.cucumber"
- name: run flaky/broken cucumber scenarios (always pass)
node_modules/.bin/cucumber-js --tags "not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retryTagFilter "@flaky and not @broken"
- name: generate report
run: |
cd integration_tests
node_modules/.bin/cucumber-js --tags "not @long-running and (@broken or @flaky)" --format json:cucumber_output/broken-tests.cucumber || true
- name: flaky report
uses: deblockt/cucumber-report-annotations-action@v1.7
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
path: "integration_tests/cucumber_output/broken-tests.cucumber"
node ./generate_report.js
- name: run ffi wallet cucumber scenarios
run: |
cd integration_tests
mkdir -p cucumber_output
node_modules/.bin/cucumber-js --tags "not @long-running and not @broken and not @flaky and @wallet-ffi" --format json:cucumber_output/tests_ffi.cucumber --exit
- name: generate ffi report
run: |
cd integration_tests
node ./generate_report.js "cucumber_output/tests_ffi.cucumber" "temp/reports/cucumber_ffi_report.html"
2 changes: 1 addition & 1 deletion .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-05-09
toolchain: nightly-2021-08-17
components: rustfmt
override: true

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-05-09
toolchain: nightly-2021-08-17
components: clippy, rustfmt
override: true
- name: cargo fmt
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-05-09
toolchain: nightly-2021-08-17
components: clippy, rustfmt
override: true

Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-05-09
toolchain: nightly-2021-08-17
components: clippy, rustfmt
override: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/libwallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-05-09
toolchain: nightly-2021-08-17
target: aarch64-apple-ios
components: rustfmt
override: true
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-05-09
toolchain: nightly-2021-08-17
target: x86_64-apple-ios
components: rustfmt
override: true
Expand Down
18 changes: 8 additions & 10 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion applications/tari_app_grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2018"
tari_common_types = { version = "^0.10", path = "../../base_layer/common_types"}
tari_core = { path = "../../base_layer/core"}
tari_wallet = { path = "../../base_layer/wallet", optional = true}
tari_crypto = "0.11.1"
tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", branch = "main" }
tari_comms = { path = "../../comms"}

chrono = "0.4.6"
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_app_utilities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dependencies]
tari_comms = { path = "../../comms" }
tari_crypto = "0.11.1"
tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", branch = "main" }
tari_common = { path = "../../common" }
tari_common_types = { path = "../../base_layer/common_types" }
tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] }
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_base_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tari_comms = { path = "../../comms", features = ["rpc"] }
tari_common_types = {path = "../../base_layer/common_types"}
tari_comms_dht = { path = "../../comms/dht" }
tari_core = { path = "../../base_layer/core", default-features = false, features = ["transactions"] }
tari_crypto = "0.11.1"
tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", branch = "main" }
tari_mmr = { path = "../../base_layer/mmr" }
tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] }
tari_service_framework = { path = "../../base_layer/service_framework" }
Expand Down
4 changes: 2 additions & 2 deletions applications/tari_base_node/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Parser {
}

let mut args = command_str.split_whitespace();
match args.next().unwrap_or(&"help").parse() {
match args.next().unwrap_or("help").parse() {
Ok(command) => {
self.process_command(command, args, shutdown);
},
Expand Down Expand Up @@ -693,7 +693,7 @@ impl Parser {
self.print_help(BaseNodeCommand::HeaderStats);
"No end height provided".to_string()
})
.and_then(|arg| u64::from_str(&arg).map_err(|err| err.to_string())));
.and_then(|arg| u64::from_str(arg).map_err(|err| err.to_string())));

let filename = args.next().unwrap_or("header-data.csv").to_string();

Expand Down
2 changes: 1 addition & 1 deletion applications/tari_console_wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dependencies]
tari_wallet = { path = "../../base_layer/wallet", features = ["bundled_sqlite"] }
tari_crypto = "0.11.1"
tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", branch = "main" }
tari_common = { path = "../../common" }
tari_app_utilities = { path = "../tari_app_utilities", features = ["wallet"] }
tari_comms = { path = "../../comms" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ fn parse_make_it_rain(mut args: SplitWhitespace) -> Result<Vec<ParsedArgument>,
let start_time = args.next().ok_or_else(|| ParseError::Empty("start time".to_string()))?;
let now = Utc::now();
let start_time = if start_time != "now" {
parse_date_string(&start_time, now, Dialect::Uk).map_err(ParseError::Date)?
parse_date_string(start_time, now, Dialect::Uk).map_err(ParseError::Date)?
} else {
now
};
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_console_wallet/src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ pub async fn init_wallet(
node_features,
));

let transport_type = create_transport_type(&config);
let transport_type = create_transport_type(config);
let transport_type = match transport_type {
Tor(mut tor_config) => {
tor_config.identity = wallet_db.get_tor_id().await?.map(Box::new);
Expand Down
21 changes: 9 additions & 12 deletions applications/tari_console_wallet/src/notifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,17 @@ impl Notifier {

self.handle.spawn(async move {
match transaction_service.get_any_transaction(tx_id).await {
Ok(option_tx) => {
if let Some(wallet_tx) = option_tx {
let args = match wallet_tx {
WalletTransaction::Completed(tx) => args_from_complete(&tx, CANCELLED, None),
WalletTransaction::PendingInbound(tx) => args_from_inbound(&tx, CANCELLED),
WalletTransaction::PendingOutbound(tx) => args_from_outbound(&tx, CANCELLED),
};
let result = Command::new(program).args(&args).output();
log(result);
} else {
error!(target: LOG_TARGET, "Transaction not found tx_id: {}", tx_id);
}
Ok(Some(wallet_tx)) => {
let args = match wallet_tx {
WalletTransaction::Completed(tx) => args_from_complete(&tx, CANCELLED, None),
WalletTransaction::PendingInbound(tx) => args_from_inbound(&tx, CANCELLED),
WalletTransaction::PendingOutbound(tx) => args_from_outbound(&tx, CANCELLED),
};
let result = Command::new(program).args(&args).output();
log(result);
},
Err(e) => error!(target: LOG_TARGET, "Transaction service error: {}", e),
_ => error!(target: LOG_TARGET, "Transaction not found tx_id: {}", tx_id),
}
});
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl NetworkTab {
let (public_address, style) = match self.base_node_edit_mode {
BaseNodeInputMode::PublicKey => (self.address_field.clone(), Style::default()),
BaseNodeInputMode::Address => (self.address_field.clone(), Style::default().fg(Color::Magenta)),
_ => (display_address(&peer), Style::default()),
_ => (display_address(peer), Style::default()),
};

let address_input = Paragraph::new(public_address)
Expand Down
Loading

0 comments on commit f9b29d0

Please sign in to comment.