Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: chain storage stub for validator node #3525

Merged
merged 88 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
d99292b
ci: run libwallet daily
stringhandler Oct 1, 2021
0e5edfb
Merge branch 'development' into libwallet-run-daily
stringhandler Oct 20, 2021
efd43ad
chore: update rust toolchain refs
Oct 20, 2021
d124e02
fix: ban peer that advertises higher PoW than able to provide
sdbondi Oct 20, 2021
823f6ca
Merge branch 'development' into libwallet-test
aviator-app[bot] Oct 21, 2021
dbba593
Merge branch 'development' into libwallet-test
aviator-app[bot] Oct 21, 2021
89af8a1
update osx zipper
Oct 19, 2021
f419c19
wip
Oct 21, 2021
367f046
wip2
Oct 21, 2021
68c3b33
wip3
Oct 21, 2021
bda5510
wip4
Oct 21, 2021
a40560a
wip
Oct 21, 2021
5ec35ec
wip
Oct 21, 2021
a217ad2
wip
Oct 21, 2021
72ee3ef
wip
Oct 21, 2021
b7b93b7
wip
Oct 21, 2021
d599e4a
yolo
Oct 21, 2021
97c1d29
wip
Oct 21, 2021
6f2d11f
path
Oct 21, 2021
62bd66e
wip
Oct 21, 2021
1f29914
wip
Oct 21, 2021
c557ecc
Merge branch 'development' into core-ban-peer-for-advertising-incorre…
sdbondi Oct 21, 2021
2b2ebfd
Merge branch 'development' into libwallet-test
aviator-app[bot] Oct 21, 2021
3df2a52
install to tmp then use script to copy to home
Oct 22, 2021
a6dda91
remove scripts after install
Oct 22, 2021
f5d5a66
Merge branch 'development' into libwallet-test
aviator-app[bot] Oct 22, 2021
0e1c349
Merge branch 'development' into core-ban-peer-for-advertising-incorre…
aviator-app[bot] Oct 23, 2021
3018cfe
Fix missing awaits in cucumber tests
sdbondi Oct 24, 2021
ea100fb
Merge branch 'development' into core-ban-peer-for-advertising-incorre…
sdbondi Oct 24, 2021
9e6fc82
Increase timeouts for tip height waiting
sdbondi Oct 24, 2021
0bdbc58
Merge branch 'development' into core-ban-peer-for-advertising-incorre…
sdbondi Oct 24, 2021
c38e659
Fix silly mistake on cucumber step
sdbondi Oct 24, 2021
052e3a9
Merge branch 'development' into libwallet-run-daily
stringhandler Oct 25, 2021
6efcdbd
merge dev
Oct 25, 2021
2ab59bd
clean
Oct 25, 2021
1fad214
ci: delete versioning action (#3482)
Oct 25, 2021
6d9549e
macos-11
Oct 25, 2021
5d3560e
Revert "macos-11"
Oct 25, 2021
1697439
Merge branch 'development' into libwallet-test
stringhandler Oct 25, 2021
e30f64f
ci: mark test 'pruned mode reorg past horizon' as flaky
stringhandler Oct 25, 2021
49d16f3
Merge branch 'development' into libwallet-test
aviator-app[bot] Oct 25, 2021
09ea722
ci: run libwallet daily (#3404)
stringhandler Oct 25, 2021
62c9b3e
Merge branch 'development' into core-ban-peer-for-advertising-incorre…
aviator-app[bot] Oct 25, 2021
cabd672
Merge branch 'development' into ci-mac-pkg
Oct 25, 2021
a027f32
feat: add decay_params method (#3454)
CjS77 Oct 25, 2021
9ab13fc
Merge branch 'development' into ci-mac-pkg
aviator-app[bot] Oct 25, 2021
762cb9a
fix: improve responsiveness of wallet base node switching (#3488)
sdbondi Oct 25, 2021
3f1731e
fix after merge
stringhandler Oct 25, 2021
19f0cb0
bump to rerun tests
Oct 26, 2021
996c047
fix: fix config file whitespace issue when auto generated in windows …
hansieodendaal Oct 26, 2021
e747c3d
Merge branch 'development' into ci-mac-pkg
aviator-app[bot] Oct 26, 2021
e651a60
feat: optimize get transactions query (#3496)
hansieodendaal Oct 26, 2021
dd00931
refactor: move payload processor to prepare stage
stringhandler Oct 26, 2021
2fde54d
ci: create macos pkg from github actions (#3481)
stringhandler Oct 27, 2021
af15fcc
fix: correct panic in tracing for comms (#3499)
StriderDM Oct 27, 2021
476aa54
ci: fix windows installer build github action
Oct 27, 2021
7987edc
test: change timeouts in ci to reasonable values (#3494)
therustmonk Oct 27, 2021
6b3bac8
fix: improve test Wallet should display transactions made (#3501)
SWvheerden Oct 27, 2021
6ea19d0
test: add trace logs to wallet's base node monitor (#3502)
hansieodendaal Oct 27, 2021
2c72ffb
Merge branch 'development' into libwallet-test
Oct 27, 2021
3dfb503
chore: update rust toolchain refs (#3477)
stringhandler Oct 27, 2021
1f99f68
messy wip
stringhandler Oct 27, 2021
823b748
Merge branch 'development' into build-windows-ci
aviator-app[bot] Oct 27, 2021
4ea02e7
feat: optimize pending transactions inbound query (#3500)
hansieodendaal Oct 28, 2021
abef608
Merge branch 'development' into build-windows-ci
aviator-app[bot] Oct 28, 2021
7f90665
fix: wallet grpc setting
stringhandler Oct 28, 2021
45eb940
test: improve cucumber with wallets (#3507)
hansieodendaal Oct 28, 2021
b0595c2
Merge branch 'development' into build-windows-ci
aviator-app[bot] Oct 28, 2021
de00313
Merge branch 'development' into core-ban-peer-for-advertising-incorre…
sdbondi Oct 28, 2021
4ffebf2
ci: fix windows installer build github action (#3503)
stringhandler Oct 28, 2021
c04fca5
fix: ban peer that advertises higher PoW than able to provide (#3478)
stringhandler Oct 28, 2021
930860d
feat(wallet_ffi)!: add get_balance callback to wallet ffi (#3475)
hansieodendaal Oct 28, 2021
e1f4e60
v0.12.0
stringhandler Oct 29, 2021
e585f31
v0.12.0
stringhandler Oct 29, 2021
375bc69
wip
stringhandler Oct 29, 2021
fad8520
test: increase limit for cucumber
stringhandler Oct 30, 2021
401e200
ci: disable builds on ci
stringhandler Oct 30, 2021
beacb9e
feat: add caching and clippy annotations to CI (#3518)
CjS77 Oct 31, 2021
e5bf571
test: add logs on non-passing tests (#3516)
stringhandler Oct 31, 2021
f2cb924
test: fix stack overflow for noise::larger_writes test 1.57-nightly (…
sdbondi Nov 1, 2021
c0c59fd
wip
stringhandler Oct 30, 2021
48a54b0
chore: update toolchain to nightly-2021-09-18 (#3514)
CjS77 Nov 1, 2021
f3c9b09
wip
stringhandler Nov 2, 2021
e5b6c09
Merge branch 'validator-node' into mb-v-next
stringhandler Nov 2, 2021
72c030d
fixes after compile
stringhandler Nov 2, 2021
8825b37
refactor: move to dan_core
stringhandler Nov 2, 2021
f378536
Merge branch 'development' into mb-v-next
stringhandler Nov 3, 2021
25b255b
chore: merge development
stringhandler Nov 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 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-08-17
rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-09-18

commands:
test:
Expand Down Expand Up @@ -76,13 +76,13 @@ commands:
- run:
name: Cargo fmt
command: |
TOOLCHAIN=$(cat rust-toolchain)
TOOLCHAIN=$(awk '/channel = /{print $NF}' rust-toolchain.toml)
rustup component add --toolchain $TOOLCHAIN rustfmt
cargo fmt --all -- --check
- run:
name: Run clippy (main source)
command: |
TOOLCHAIN=$(cat rust-toolchain)
TOOLCHAIN=$(awk '/channel = /{print $NF}' rust-toolchain.toml)
rustup component add --toolchain $TOOLCHAIN clippy
cargo clippy -- -D warnings -W clippy::cognitive_complexity
when: always
Expand Down Expand Up @@ -134,15 +134,15 @@ commands:
- run:
name: Run cucumber scenarios
no_output_timeout: 20m
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "ci" --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"
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "ci" --tags "not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 3 --retry-tag-filter "@flaky and not @broken"
- run:
name: Generate report
command: cd integration_tests && node ./generate_report.js
when: always
# Below step requires NodeJS v12 to run correctly, see explanation in WalletFFI.feature
- run:
name: Run FFI wallet library cucumber scenarios
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "ci" --tags "not @long-running and not @broken and not @flaky and @wallet-ffi" --format json:cucumber_output/tests_ffi.cucumber --exit
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "ci" --tags "not @long-running and not @broken and @wallet-ffi" --format json:cucumber_output/tests_ffi.cucumber --exit --retry 3 --retry-tag-filter "@flaky and not @broken"
when: always
- run:
name: Generate report (ffi)
Expand Down
9 changes: 0 additions & 9 deletions .clog.toml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/wip_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-08-17
toolchain: nightly-2021-08-18
components: clippy, rustfmt
override: true
- name: dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
60 changes: 50 additions & 10 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-08-17
toolchain: nightly-2021-09-18
components: rustfmt
override: true

Expand All @@ -87,7 +87,7 @@ jobs:
# sudo apt-get -y upgrade
- name: Install macOS dependencies
if: startsWith(runner.os,'macOS')
run: brew install cmake zip
run: brew install cmake zip coreutils

- name: Install Windows dependencies
if: startsWith(runner.os,'Windows')
Expand Down Expand Up @@ -141,13 +141,13 @@ jobs:
#cargo build --release --bin tari_base_node --features ${{ matrix.features}}
cargo build --release

# - name: Prepare Archives
# shell: bash
# run: |
# ls -la "$GITHUB_WORKSPACE"
# mkdir -p "$GITHUB_WORKSPACE${TBN_DIST}/archives"
# export distDir="$GITHUB_WORKSPACE${TBN_DIST}/archives"
# "$GITHUB_WORKSPACE/scripts/build_dists_tarball.sh" noBuild
# - name: Prepare Archives
# shell: bash
# run: |
# ls -la "$GITHUB_WORKSPACE"
# mkdir -p "$GITHUB_WORKSPACE${TBN_DIST}/archives"
# export distDir="$GITHUB_WORKSPACE${TBN_DIST}/archives"
# "$GITHUB_WORKSPACE/scripts/build_dists_tarball.sh" noBuild

- name: Prepare binaries
shell: bash
Expand All @@ -162,19 +162,59 @@ jobs:
#BINFILE="${TBN_FILENAME}-${VERSION}-${VSHA_SHORT}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}${TBN_EXT}"
BINFILE="${TBN_FILENAME}-${VERSION}-${VSHA_SHORT}-${{ matrix.os }}-${{ matrix.target_cpu }}${TBN_EXT}"
echo "BINFILE=${BINFILE}" >> $GITHUB_ENV
echo "Copying files for ${BINFILE} too $(pwd)"
echo "Copying files for ${BINFILE} to $(pwd)"
#cp -v "$GITHUB_WORKSPACE/target/release/${TBN_FILENAME}${TBN_EXT}" "./${BINFILE}"
ls -la "$GITHUB_WORKSPACE/target/release/"
cp -v "$GITHUB_WORKSPACE/target/release/tari_base_node${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_console_wallet${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_merge_mining_proxy${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_mining_node${TBN_EXT}" .

- name: Build the macos pkg
if: startsWith(runner.os,'macOS')
env:
MACOS_KEYCHAIN_PASS: ${{ secrets.MACOS_KEYCHAIN_PASS }}
MACOS_APPLICATION_CERT: ${{ secrets.MACOS_APPLICATION_CERT }}
MACOS_APPLICATION_PASS: ${{ secrets.MACOS_APPLICATION_PASS }}
MACOS_INSTALLER_CERT: ${{ secrets.MACOS_INSTALLER_CERT }}
MACOS_INSTALLER_PASS: ${{ secrets.MACOS_INSTALLER_PASS }}
run: |
echo $MACOS_APPLICATION_CERT | base64 --decode > application.p12
echo $MACOS_INSTALLER_CERT | base64 --decode > installer.p12
security create-keychain -p $MACOS_KEYCHAIN_PASS build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $MACOS_KEYCHAIN_PASS build.keychain
security import application.p12 -k build.keychain -P $MACOS_APPLICATION_PASS -T /usr/bin/codesign
security import installer.p12 -k build.keychain -P $MACOS_INSTALLER_PASS -T /usr/bin/pkgbuild
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PASS build.keychain
cd buildtools
./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 --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)" \
"${{ github.workspace }}${{ env.TBN_DIST }}/tari-${{ env.VERSION }}.pkg"
- name: Artifact macos pkg
if: startsWith(runner.os,'macOS')
uses: actions/upload-artifact@v2
with:
name: tari-${{ env.VERSION }}.pkg
path: "${{ github.workspace }}${{ env.TBN_DIST }}/tari-${{ env.VERSION }}.pkg"

# unlike inno script studio, iscc.exe doesn't run the [precompile] step generate_config.bat
- name: Build the windows installer
shell: cmd
if: startsWith(runner.os,'Windows')
run: |
cd buildtools
call generate_config.bat
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.VERSION }}-${{ env.VSHA_SHORT }}-release" "windows_inno_installer.iss"

- name: Upload artifact for Windows installer
Expand Down
101 changes: 26 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:

name: CI

env:
CARGO_HTTP_MULTIPLEXING: false
toolchain: nightly-2021-09-18

jobs:
clippy:
name: clippy
Expand All @@ -27,9 +31,17 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-08-17
toolchain: ${{ env.toolchain }}
components: clippy, rustfmt
override: true
- name: Caching
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.cpu-model }}-${{ env.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
Expand All @@ -39,86 +51,25 @@ jobs:
# uses: actions-rs/cargo@v1
# with:
# command: check
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings -W clippy::cognitive_complexity
- name: cargo clippy --all-targets
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
build:
name: build
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v2

- name: ubuntu dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt-get update && \
sudo apt-get -y install \
build-essential \
libgtk-3-dev \
libwebkit2gtk-4.0-dev \
libsoup2.4-dev

- name: macOS dependencies
if: startsWith(matrix.os,'macos')
run: brew install cmake zip

- name: windows dependencies
if: startsWith(matrix.os,'windows')
run: |
vcpkg.exe install sqlite3:x64-windows zlib:x64-windows
choco upgrade llvm zip psutils strawberryperl -y

- name: windows env
if: startsWith(matrix.os,'Windows')
shell: bash
run: |
echo "SQLITE3_LIB_DIR=C:\vcpkg\installed\x64-windows\lib" >> $GITHUB_ENV
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $GITHUB_ENV

- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-08-17
components: clippy, rustfmt
override: true

- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release

- name: cargo build wallet
uses: actions-rs/cargo@v1
with:
command: build
args: --release -p tari_wallet

- name: cargo build wallet ffi
uses: actions-rs/cargo@v1
- name: Clippy check
uses: actions-rs/clippy-check@v1
with:
command: build
args: --release -p tari_wallet_ffi

token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
test:
name: test
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 }}-${{ env.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
- name: ubuntu dependencies
run: |
sudo apt-get update && \
Expand All @@ -131,7 +82,7 @@ jobs:
- name: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-08-17
toolchain: ${{ env.toolchain }}
components: clippy, rustfmt
override: true

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/libwallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
# - development
tags:
- "libwallet-*"
schedule:
- cron: "05 00 * * *"
jobs:
android:
runs-on: ubuntu-latest
Expand All @@ -28,6 +30,7 @@ jobs:
path: ${{ github.workspace }}/libwallet/
# Copy tarballs to S3
- name: Sync to S3
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
continue-on-error: true # Don't break if s3 upload fails
uses: jakejarvis/s3-sync-action@v0.5.1
with:
Expand All @@ -45,13 +48,13 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-08-17
toolchain: nightly-2021-09-18
target: aarch64-apple-ios
components: rustfmt
override: true
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-08-17
toolchain: nightly-2021-09-18
target: x86_64-apple-ios
components: rustfmt
override: true
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/version.yml

This file was deleted.

Loading