Skip to content

Commit

Permalink
chore: network rollover development to nextnet 0.51.0 rc.0 (#5634)
Browse files Browse the repository at this point in the history
Description
---
Moving up and moving on!

Motivation and Context
---

How Has This Been Tested?
---

What process can a PR reviewer use to test or verify this change?
---

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [ ] None
- [ ] Requires data directory on base node to be deleted
- [x] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
SWvheerden authored Aug 11, 2023
2 parents 1ac9547 + af84d60 commit da76880
Show file tree
Hide file tree
Showing 853 changed files with 32,005 additions and 46,631 deletions.
19 changes: 19 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[advisories]
ignore = [
# All data structures using borsh ser/de have been reviewed for ZST's and we have found no reason for concern.
# TODO: Remove this line after borsh-rs has been upgraded to >=0.12.0
# https://github.com/near/borsh-rs/pull/146
"RUSTSEC-2023-0033",

# Repo flagged as unmaintained but our clap dependency uses it
# TODO: Remove this if clap is upgraded to >=3.0.0
"RUSTSEC-2021-0139",

# We are not using a special allocator and will not suffer this issue
"RUSTSEC-2021-0145",

# PGP should be upgraded to 0.10.1 which removes the "unmaintained" dependency but we can't do this as pgp and snow
# specify different version dependencies for curve25519-dalek that are currently unresolvable.
# TODO: Check and see if pgp and snow can be resolved and if so, upgrade them and remove this ignore
"RUSTSEC-2023-0028",
]
3 changes: 3 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[profile.ci]
slow-timeout = { period = "60s", terminate-after=2}

[profile.ci.junit] # this can be some other profile, too
path = "junit.xml"
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- uses: actions/checkout@v3
- uses: rustsec/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 9 additions & 4 deletions .github/workflows/base_node_binaries.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
{
"name": "linux-x86_64",
"runs-on": "ubuntu-20.04",
"rust": "nightly-2023-06-03",
"rust": "nightly-2023-06-04",
"target": "x86_64-unknown-linux-gnu",
"cross": false,
"target_cpu": "x86-64",
"target_bins": "--bin minotari_node --bin minotari_console_wallet --bin minotari_merge_mining_proxy --bin minotari_miner",
"features": "safe"
},
{
Expand All @@ -14,9 +15,10 @@
"rust": "stable",
"target": "aarch64-unknown-linux-gnu",
"cross": true,
"target_bins": "--bin tari_base_node --bin tari_console_wallet --bin tari_merge_mining_proxy --bin tari_miner",
"target_cpu": "generic",
"features": "safe"
"features": "safe",
"target_bins": "--bin minotari_node --bin minotari_console_wallet --bin minotari_merge_mining_proxy --bin minotari_miner",
"flags": "--workspace --exclude minotari_mining_helper_ffi --exclude tari_integration_tests"
},
{
"name": "macos-x86_64",
Expand All @@ -25,6 +27,7 @@
"target": "x86_64-apple-darwin",
"cross": false,
"target_cpu": "x86-64",
"target_bins": "--bin minotari_node --bin minotari_console_wallet --bin minotari_merge_mining_proxy --bin minotari_miner",
"features": "safe"
},
{
Expand All @@ -34,6 +37,7 @@
"target": "aarch64-apple-darwin",
"cross": false,
"target_cpu": "generic",
"target_bins": "--bin minotari_node --bin minotari_console_wallet --bin minotari_merge_mining_proxy --bin minotari_miner",
"features": "safe"
},
{
Expand All @@ -44,6 +48,7 @@
"cross": false,
"target_cpu": "x86-64",
"features": "safe",
"target_bins": "--bin minotari_node --bin minotari_console_wallet --bin minotari_merge_mining_proxy --bin minotari_miner",
"flags": "--workspace --exclude tari_libtor"
},
{
Expand All @@ -54,7 +59,7 @@
"cross": false,
"target_cpu": "generic",
"features": "safe",
"target_bins": "--bin tari_base_node --bin tari_console_wallet --bin tari_merge_mining_proxy --bin tari_miner",
"target_bins": "--bin minotari_node --bin minotari_console_wallet --bin minotari_merge_mining_proxy --bin minotari_miner",
"build_enabled": false
}
]
67 changes: 37 additions & 30 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ name: Build Matrix of Binaries
env:
TBN_FILENAME: "tari_suite"
TBN_BUNDLEID_BASE: "com.tarilabs.pkg"
toolchain: nightly-2023-06-03
toolchain: nightly-2023-06-04
matrix-json-file: ".github/workflows/base_node_binaries.json"
CARGO_HTTP_MULTIPLEXING: false
CARGO_UNSTABLE_SPARSE_REGISTRY: true

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -136,7 +137,8 @@ jobs:
vcpkg.exe install sqlite3:x64-windows zlib:x64-windows
# Bug in choco - need to install each package individually
choco upgrade llvm -y
choco upgrade psutils -y
# psutils is out of date
# choco upgrade psutils -y
choco upgrade openssl -y
choco upgrade strawberryperl -y
Expand All @@ -153,7 +155,6 @@ jobs:
echo "SHARUN=shasum --algorithm 256" >> $GITHUB_ENV
echo "CC=gcc" >> $GITHUB_ENV
echo "TBN_EXT=" >> $GITHUB_ENV
echo "LIB_PRE=lib" >> $GITHUB_ENV
echo "SHELL_EXT=.sh" >> $GITHUB_ENV
echo "PLATFORM_SPECIFIC_DIR=linux" >> $GITHUB_ENV
echo "TBN_DIST=/dist" >> $GITHUB_ENV
Expand Down Expand Up @@ -182,10 +183,13 @@ jobs:
if: startsWith(runner.os,'Windows')
shell: bash
run: |
echo "SHARUN=pwsh C:\ProgramData\chocolatey\lib\psutils\tools\psutils-master\shasum.ps1 --algorithm 256" >> $GITHUB_ENV
# echo "SHARUN=pwsh C:\ProgramData\chocolatey\lib\psutils\tools\psutils-master\shasum.ps1 --algorithm 256" >> $GITHUB_ENV
mkdir -p "$GITHUB_WORKSPACE\psutils"
curl -v -o "$GITHUB_WORKSPACE\psutils\getopt.ps1" "https://raw.githubusercontent.com/lukesampson/psutils/master/getopt.ps1"
curl -v -o "$GITHUB_WORKSPACE\psutils\shasum.ps1" "https://raw.githubusercontent.com/lukesampson/psutils/master/shasum.ps1"
echo "SHARUN=pwsh $GITHUB_WORKSPACE\psutils\shasum.ps1 --algorithm 256" >> $GITHUB_ENV
echo "TBN_EXT=.exe" >> $GITHUB_ENV
echo "LIB_EXT=.dll" >> $GITHUB_ENV
echo "LIB_PRE=" >> $GITHUB_ENV
echo "SHELL_EXT=.bat" >> $GITHUB_ENV
echo "TBN_DIST=\dist" >> $GITHUB_ENV
echo "PLATFORM_SPECIFIC_DIR=windows" >> $GITHUB_ENV
Expand All @@ -194,8 +198,7 @@ jobs:
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $GITHUB_ENV
echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH
- name: Cache cargo files and outputs
uses: Swatinem/rust-cache@v2
# Don't use caches for binary builds. Start from a clean slate.

- name: Build rust binaries
env:
Expand Down Expand Up @@ -224,7 +227,7 @@ jobs:
run: |
mkdir -p "$GITHUB_WORKSPACE${TBN_DIST}"
cd "$GITHUB_WORKSPACE${TBN_DIST}"
VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' "$GITHUB_WORKSPACE/applications/tari_base_node/Cargo.toml")
VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' "$GITHUB_WORKSPACE/applications/minotari_node/Cargo.toml")
echo "Branch: ${VBRANCH}"
echo "Sha: ${VSHA_SHORT}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
Expand All @@ -234,21 +237,18 @@ jobs:
echo "Copying files for ${BINFILE} to $(pwd)"
ls -la "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/"
FILES=(
"tari_base_node"
"tari_console_wallet"
"tari_miner"
"tari_merge_mining_proxy"
"minotari_node"
"minotari_console_wallet"
"minotari_miner"
"minotari_merge_mining_proxy"
)
for FILE in "${FILES[@]}"; do
if [ -f "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/${FILE}${TBN_EXT}" ]; then
cp -v "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/${FILE}${TBN_EXT}" .
fi
done
if [ -f "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/${LIB_PRE}tari_mining_helper_ffi${LIB_EXT}" ]; then
cp -v "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/${LIB_PRE}tari_mining_helper_ffi${LIB_EXT}" .
fi
if [ -f "$GITHUB_WORKSPACE/applications/tari_base_node/${PLATFORM_SPECIFIC_DIR}/runtime/start_tor${SHELL_EXT}" ]; then
cp -v "$GITHUB_WORKSPACE/applications/tari_base_node/${PLATFORM_SPECIFIC_DIR}/runtime/start_tor${SHELL_EXT}" .
if [ -f "$GITHUB_WORKSPACE/applications/minotari_node/${PLATFORM_SPECIFIC_DIR}/runtime/start_tor${SHELL_EXT}" ]; then
cp -v "$GITHUB_WORKSPACE/applications/minotari_node/${PLATFORM_SPECIFIC_DIR}/runtime/start_tor${SHELL_EXT}" .
fi
- name: Build the macOS pkg
Expand Down Expand Up @@ -278,10 +278,10 @@ jobs:
export target_release="target/${{ matrix.builds.target }}/release"
./create_osx_install_zip.sh unused nozip
FILES=(
"tari_base_node"
"tari_console_wallet"
"tari_miner"
"tari_merge_mining_proxy"
"minotari_node"
"minotari_console_wallet"
"minotari_miner"
"minotari_merge_mining_proxy"
)
for FILE in "${FILES[@]}"; do
codesign --options runtime --force --verify --verbose --timestamp --sign "Developer ID Application: $MACOS_APPLICATION_ID" "/tmp/tari_testnet/runtime/$FILE"
Expand Down Expand Up @@ -363,10 +363,11 @@ jobs:
uses: actions/upload-artifact@v3
if: startsWith(runner.os,'Windows')
with:
name: "tari_windows_installer"
name: "${{ env.TBN_FILENAME }}_windows_installer"
path: "${{ github.workspace }}/buildtools/Output/*"

- name: Archive and Checksum Binaries
# if: "!startsWith(runner.os,'Windows')" # Disable checksum for Windows - workaround
shell: bash
run: |
echo "Archive ${{ env.BINFILE }} too ${{ env.BINFILE }}.zip"
Expand All @@ -393,20 +394,20 @@ jobs:
shell: bash
run: |
cd "${{ github.workspace }}${{ env.TBN_DIST }}"
cp -v "tari_miner${{ env.TBN_EXT}}" \
"tari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}"
cp -v "minotari_miner${{ env.TBN_EXT}}" \
"minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}"
echo "Compute miner shasum"
${SHARUN} "tari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}" \
>> "tari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
cat "tari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
${SHARUN} "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}" \
>> "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
cat "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
echo "Checksum verification for miner is "
${SHARUN} --check "tari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
${SHARUN} --check "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
- name: Artifact upload for Miner
uses: actions/upload-artifact@v3
with:
name: tari_miner-${{ matrix.builds.name }}
path: "${{ github.workspace }}${{ env.TBN_DIST }}/tari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}*"
name: minotari_miner-${{ matrix.builds.name }}
path: "${{ github.workspace }}${{ env.TBN_DIST }}/minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}*"

- name: Prep diag-utils archive for upload
continue-on-error: true
Expand Down Expand Up @@ -438,6 +439,12 @@ jobs:
name: ${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}
path: "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils/*.zip*"

- name: Artifact cleanup for diag-utils
continue-on-error: true
shell: bash
run: |
rm -vRf "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils/"
- name: Sync dist to S3 - Bash
continue-on-error: true # Don't break if s3 upload fails
if: ${{ env.AWS_SECRET_ACCESS_KEY != '' && matrix.builds.runs-on != 'self-hosted' }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_dockers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ name: Build docker images
- linux/arm64
- linux/arm64, linux/amd64
build_items:
default: tari_all
default: minotari_all
description: 'image(s) to build'
type: choice
options:
- all
- tari_all
- tari_base_node
- tari_wallet
- tari_mm_proxy
- tari_sha3_miner
- minotari_all
- minotari_node
- minotari_console_wallet
- minotari_merge_mining_proxy
- minotari_sha3_miner
- 3rdparty_all
- tor
- monerod
- xmrig

env:
toolchain_default: nightly-2023-06-03
toolchain_default: nightly-2023-06-04

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
echo "Daily Build - limited"
echo "platforms=linux/amd64" >> $GITHUB_OUTPUT
echo "tag_alias=latest-daily" >> $GITHUB_OUTPUT
echo "build_items=tari_all" >> $GITHUB_OUTPUT
echo "build_items=minotari_all" >> $GITHUB_OUTPUT
fi
builds_run:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build_dockers_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: Build docker images - workflow_call/on-demand
toolchain:
type: string
description: 'Rust toolchain'
default: nightly-2023-06-03
default: nightly-2023-06-04
arch:
type: string
default: x86-64
Expand All @@ -29,7 +29,7 @@ name: Build docker images - workflow_call/on-demand
description: 'build tag alias'
build_items:
type: string
default: tari_sha3_miner
default: minotari_sha3_miner
description: 'build images'
platforms:
type: string
Expand Down Expand Up @@ -60,11 +60,11 @@ jobs:
run: |
build_items=${{ inputs.build_items }}
echo "Building with ${build_items}."
if [ -z "${build_items}" ] || [ "${build_items}" = "tari_all" ] ; then
echo "Build all tari images"
if [ -z "${build_items}" ] || [ "${build_items}" = "minotari_all" ] ; then
echo "Build all Minotari images"
matrix_selection=$( jq -s -c '.[]' tari-launchpad/tarisuite.json )
elif [ "${build_items:0:5}" = "tari_" ] ; then
echo "Build only selected tari images - ${build_items}"
elif [ "${build_items:0:9}" = "minotari_" ] ; then
echo "Build only selected minotari images - ${build_items}"
matrix_selection=$( jq --arg jsonVar "${build_items}" -r '[. []
| select(."image_name"==$jsonVar)]' tari-launchpad/tarisuite.json )
elif [ "${build_items}" = "all" ] ; then
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
TARI_SOURCE_ROOT="tari/"
VAPP=$(awk -F ' = ' \
'$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' \
"${TARI_SOURCE_ROOT}/applications/tari_base_node/Cargo.toml")
"${TARI_SOURCE_ROOT}/applications/minotari_node/Cargo.toml")
VBRANCH=$(git --git-dir ${TARI_SOURCE_ROOT}/.git branch --show-current)
VSHA_SHORT=$(git --git-dir ${TARI_SOURCE_ROOT}/.git rev-parse --short HEAD)
Expand All @@ -143,8 +143,8 @@ jobs:
echo "Setup tag_alias"
echo "TAG_ALIAS=${{ secrets.DOCKER_PROVIDER }}/${{ secrets.DOCKER_REPO }}/${{ matrix.builds.image_name }}:${{ inputs.tag_alias }}" >> $GITHUB_ENV
fi
if [ "${IMAGE_NAME:0:5}" = "tari_" ] ; then
echo "Tari builds"
if [ "${IMAGE_NAME:0:9}" = "minotari_" ] ; then
echo "Minotari builds"
mkdir -p tari/buildtools/docker_rig
cp -v tari-launchpad/docker_rig/start_tari_app.sh tari/buildtools/docker_rig/start_tari_app.sh
echo "DOCKERFILE=tarilabs" >> $GITHUB_ENV
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_libwallets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
working-directory: libwallets
run: |
ls -alht
find . -name "libtari_wallet_ffi.*.sha256" -type f \
find . -name "libminotari_wallet_ffi.*.sha256" -type f \
-exec sed -i -e "s/libwallet-.*\///g" '{}' \;
ls -alht
Expand All @@ -113,11 +113,11 @@ jobs:
run: |
ls -alht
if [ -d libwallet-ios-xcframework ]; then
7z a libtari_wallet_ffi.ios-xcframework.zip libwallet-ios-xcframework/*
7z a libminotari_wallet_ffi.ios-xcframework.zip libwallet-ios-xcframework/*
rm -fr libwallet-ios-xcframework/*
shasum -a 256 \
"libtari_wallet_ffi.ios-xcframework.zip" \
> "libtari_wallet_ffi.ios-xcframework.zip.sha256"
"libminotari_wallet_ffi.ios-xcframework.zip" \
> "libminotari_wallet_ffi.ios-xcframework.zip.sha256"
fi
ls -alht
Expand Down
Loading

0 comments on commit da76880

Please sign in to comment.