Skip to content

Commit

Permalink
Merge branch 'development' into dht-docs
Browse files Browse the repository at this point in the history
* development:
  chore: obscure grpc error response (tari-project#3995)
  test: cucumber saf test (tari-project#3135)
  fix(wallet): do not prompt for password if given in config (tari-project#4040)
  fix: makes header consensus encoding infallible (tari-project#4045)
  refactor(base-node): use existing peer feature methods to check if is a base or client node (tari-project#4048)
  chore: remove unused else (tari-project#4051)
  chore(deps): bump ejs from 3.1.6 to 3.1.7 in /applications/tari_web_extension (tari-project#4056)
  feat(tari_explorer): add total hashrate chart (tari-project#4054)
  chore(deps): bump async from 2.6.3 to 2.6.4 in /applications/launchpad/gui-vue (tari-project#4053)
  ci: move npm audit to development only (tari-project#4055)
  test: fix coverage action (tari-project#4036)
  fix: launchpad build docker images (tari-project#4042)
  • Loading branch information
sdbondi committed Apr 29, 2022
2 parents 0ae58f0 + 1fe5811 commit a102829
Show file tree
Hide file tree
Showing 22 changed files with 613 additions and 961 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,6 @@ env:
PROTOC: protoc

jobs:
checks:
name: npm checks
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: npm audit launchpad gui
run: |
cd applications/launchpad/gui-vue
npm audit
- name: npm audit collectibles
run: |
cd applications/tari_collectibles/web-app
# We have to ignore this for now because audit error is in react-scripts
npm audit || true
- name: npm audit explorer
run: |
cd applications/tari_explorer
npm audit
- name: npm audit web extensions
run: |
cd applications/tari_web_extension
# We have to ignore this for now because audit error is in react-scripts
npm audit || true
- name: npm audit web extensions example
run: |
cd applications/tari_web_extension_example
npm audit
clippy:
name: clippy
runs-on: ubuntu-18.04
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
pkg-config \
libsqlite3-dev \
clang-10 \
clang \
git \
cmake \
libc++-dev \
Expand All @@ -47,12 +46,9 @@ jobs:
libappindicator3-dev \
patchelf \
librsvg2-dev \
- name: test key manager wasm
- name: install grcov
run: |
npm install -g wasm-pack
cd base_layer/key_manager
rustup target add wasm32-unknown-unknown
make test
cargo install grcov
- name: cargo test compile
uses: actions-rs/cargo@v1
with:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/development-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
branches:
- development
- main

name: Development CI

env:
toolchain: nightly-2021-11-20
CARGO_HTTP_MULTIPLEXING: false
CARGO_TERM_COLOR: always
PROTOC: protoc

jobs:
checks:
name: npm checks
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: npm audit launchpad gui
run: |
cd applications/launchpad/gui-vue
npm audit
- name: npm audit collectibles
run: |
cd applications/tari_collectibles/web-app
# We have to ignore this for now because audit error is in react-scripts
npm audit || true
- name: npm audit explorer
run: |
cd applications/tari_explorer
npm audit
- name: npm audit web extensions
run: |
cd applications/tari_web_extension
# We have to ignore this for now because audit error is in react-scripts
npm audit || true
- name: npm audit web extensions example
run: |
cd applications/tari_web_extension_example
npm audit
27 changes: 24 additions & 3 deletions applications/launchpad/docker_rig/base_node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -65,7 +86,7 @@ ENV dockerfile_version=$VERSION
ENV APP_NAME=base_node APP_EXEC=tari_base_node

COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh
COPY /applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh


ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/base_node" ]
# CMD [ "--non-interactive-mode" ]
24 changes: 22 additions & 2 deletions applications/launchpad/docker_rig/console_wallet.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -61,4 +82,3 @@ COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh

ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/wallet" ]
# CMD [ "--non-interactive-mode" ]
43 changes: 11 additions & 32 deletions applications/launchpad/docker_rig/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ services:
build:
context: .
dockerfile: tor.Dockerfile
# volumes:
# - ${DATA_FOLDER}/tor:/etc/tor/
# ports:
# - 9050:9050
# - 9051:9051
volumes:
- ${DATA_FOLDER}/tor:/etc/tor/

base_node:
image: quay.io/tarilabs/tari_base_node:latest
Expand All @@ -25,16 +22,7 @@ services:
APP_EXEC: tari_base_node
WAIT_FOR_TOR: ${WAIT_FOR_TOR:-0}
TARI_NETWORK: ${TARI_NETWORK}
TARI_BASE_NODE__DIBBLER__TOR_CONTROL_AUTH: "password=${TOR_CONTROL_AUTH:-tari}"
TARI_BASE_NODE__DIBBLER__DATA_DIR: "/blockchain/dibbler"
TARI_BASE_NODE__IGOR__DATA_DIR: "/blockchain/igor"
TARI_BASE_NODE__MAINNET__DATA_DIR: "/blockchain/mainnet"
TARI_BASE_NODE__DIBBLER__TOR_CONTROL_ADDRESS: "/dns4/tor/tcp/9051"
TARI_BASE_NODE__DIBBLER__TOR_SOCKS_ADDRESS_OVERRIDE: "/dns4/tor/tcp/9050"
TARI_BASE_NODE__DIBBLER__TOR_FORWARD_ADDRESS: "/dns4/base_node/tcp/18189"
TARI_BASE_NODE__DIBBLER__TCP_LISTENER_ADDRESS: "/dns4/base_node/tcp/18189"
TARI_BASE_NODE__DIBBLER__GRPC_BASE_NODE_ADDRESS: "0.0.0.0:18142"
TARI_BASE_NODE__DIBBLER__GRPC_ENABLED: "1"
TARI_DIBBLER__BASE_NODE__DATA_DIR: "/blockchain/dibbler"
ports:
- 18189:18189
- 18142:18142
Expand Down Expand Up @@ -64,12 +52,6 @@ services:
TERM: "linux"
TARI_WALLET_PASSWORD: ${TARI_WALLET_PASSWORD:-tari}
TARI_NETWORK: ${TARI_NETWORK:-dibbler}
TARI_WALLET__DIBBLER__TOR_CONTROL_AUTH: "password=${TOR_CONTROL_AUTH:-tari}"
TARI_WALLET__DIBBLER__TOR_CONTROL_ADDRESS: "/dns4/tor/tcp/9051"
TARI_WALLET__DIBBLER__TOR_SOCKS_ADDRESS_OVERRIDE: "/dns4/tor/tcp/9050"
TARI_WALLET__DIBBLER__TOR_FORWARD_ADDRESS: "/dns4/wallet/tcp/18188"
TARI_WALLET__DIBBLER__TCP_LISTENER_ADDRESS: "/dns4/wallet/tcp/18188"
TARI_BASE_NODE__DIBBLER__GRPC_CONSOLE_WALLET_ADDRESS: "0.0.0.0:18143"
command: ["--non-interactive"]
ports:
- 18188:18188
Expand Down Expand Up @@ -97,9 +79,8 @@ services:
TARI_NETWORK: ${TARI_NETWORK}
TARI_MINER__NUM_MINING_THREADS: 2
TARI_MINER__MINE_ON_TIP_ONLY: 1
TARI_BASE_NODE__DIBBLER__GRPC_BASE_NODE_ADDRESS: "/dns4/base_node/tcp/18142"
TARI_BASE_NODE__DIBBLER__GRPC_CONSOLE_WALLET_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_WALLET__GRPC_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_MINER__BASE_NODE_ADDR: "/dns4/base_node/tcp/18142"
TARI_MINER__WALLET_ADDR: "/dns4/wallet/tcp/18143"
command: []
depends_on:
- base_node
Expand Down Expand Up @@ -164,14 +145,12 @@ services:
APP_EXEC: tari_merge_mining_proxy
WAIT_FOR_TOR: 0
TARI_NETWORK: ${TARI_NETWORK}
TARI_BASE_NODE__DIBBLER__GRPC_BASE_NODE_ADDRESS: "/dns4/base_node/tcp/18142"
TARI_BASE_NODE__DIBBLER__GRPC_CONSOLE_WALLET_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_WALLET__GRPC_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_URL: ${TARI_MONEROD_URL:-["http://stagenet.community.xmr.to:38081","http://monero-stagenet.exan.tech:38081","http://stagenet.xmr-tw.org:38081","http://xmr-lux.boldsuck.org:38081","http://singapore.node.xmr.pm:38081"]}
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_USERNAME: ${TARI_MONEROD_USERNAME}
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_PASSWORD: ${TARI_MONEROD_PASSWORD}
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_USE_AUTH: ${TARI_MONEROD_USE_AUTH:-0}
TARI_MERGE_MINING_PROXY__DIBBLER__PROXY_HOST_ADDRESS: "0.0.0.0:18081"
TARI_MERGE_MINING_PROXY__BASE_NODE_GRPC_ADDRESS: "/dns4/base_node/tcp/18142"
TARI_MERGE_MINING_PROXY__CONSOLE_WALLET_GRPC_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_MERGE_MINING_PROXY__MONEROD_USERNAME: ${TARI_MONEROD_USERNAME}
TARI_MERGE_MINING_PROXY__MONEROD_PASSWORD: ${TARI_MONEROD_PASSWORD}
TARI_MERGE_MINING_PROXY__MONEROD_USE_AUTH: ${TARI_MONEROD_USE_AUTH:-0}
TARI_MERGE_MINING_PROXY__LISTENER_ADDRESS: "/ip4/0.0.0.0/tcp/18081"
depends_on:
- base_node
- wallet
Expand Down
39 changes: 32 additions & 7 deletions applications/launchpad/docker_rig/mm_proxy.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -31,22 +52,27 @@ ADD infrastructure infrastructure
ADD dan_layer dan_layer
ADD meta meta

# Cusomised build
RUN cargo build --bin tari_merge_mining_proxy --release --locked --features "$FEATURES"
RUN cargo build --bin tari_merge_mining_proxy --release --features $FEATURES --locked

# Create a base minimal image for the executables
FROM quay.io/bitnami/minideb:bullseye as base
# Disable Prompt During Packages Installation
ARG VERSION=1.0.1
# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
openssl
gpg \
iputils-ping \
less \
libreadline8 \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet

# Now create a new image with only the essentials and throw everything else away
FROM base
RUN groupadd -g 1000 tari && useradd -s /bin/bash -u 1000 -g 1000 tari
USER tari
Expand All @@ -58,4 +84,3 @@ COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh

ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/mm_proxy" ]
# CMD [ "--non-interactive-mode" ]
46 changes: 36 additions & 10 deletions applications/launchpad/docker_rig/sha3_miner.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -39,15 +60,19 @@ ARG VERSION=1.0.1
# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
openssl
# Now create a new image with only the essentials and throw everything else away
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline8 \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet

FROM base
RUN groupadd -g 1000 tari && useradd -s /bin/bash -u 1000 -g 1000 tari
USER tari
Expand All @@ -59,3 +84,4 @@ COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh

ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/sha3_miner" ]

Loading

0 comments on commit a102829

Please sign in to comment.