Skip to content

Commit

Permalink
chore(stagenet): version bump stagenet to 0.52.0 (#5922)
Browse files Browse the repository at this point in the history
Description
---
Onward and upward

Motivation and Context
---
Progress

How Has This Been Tested?
---
CI

Breaking Changes
---

- [ ] None
- [x] Requires data directory on base node to be deleted
- [x] Requires hard fork
- [x] Other - Please specify
  • Loading branch information
SWvheerden committed Nov 7, 2023
2 parents f13cf64 + 8725edc commit 8a7c4be
Show file tree
Hide file tree
Showing 1,039 changed files with 46,086 additions and 55,163 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"
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 11 additions & 5 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,7 +37,9 @@
"target": "aarch64-apple-darwin",
"cross": false,
"target_cpu": "generic",
"features": "safe"
"target_bins": "--bin minotari_node --bin minotari_console_wallet --bin minotari_merge_mining_proxy --bin minotari_miner",
"features": "safe",
"build_enabled": false
},
{
"name": "windows-x64",
Expand All @@ -44,6 +49,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 +60,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
}
]
109 changes: 54 additions & 55 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 All @@ -33,7 +34,7 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: false

Expand All @@ -57,6 +58,8 @@ jobs:
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
matrix-check:
# Debug matrix
if: ${{ false }}
runs-on: ubuntu-latest
needs: matrix-prep
steps:
Expand All @@ -82,7 +85,7 @@ jobs:

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -139,7 +142,8 @@ jobs:
# psutils is out of date
# choco upgrade psutils -y
choco upgrade openssl -y
choco upgrade strawberryperl -y
# Should already be installed
# choco upgrade strawberryperl -y
- name: Debugging - Upload logs if dependences failures
if: failure()
Expand All @@ -154,7 +158,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 All @@ -165,15 +168,6 @@ jobs:
echo "PLATFORM_SPECIFIC_DIR=osx" >> $GITHUB_ENV
echo "LIB_EXT=.dylib" >> $GITHUB_ENV
# Hardcoded sdk for MacOSX 11 on ARM64
- name: Set environment variables - macOS - ARM64 (pin/sdk)
if: ${{ startsWith(runner.os,'macOS') && matrix.builds.name == 'macos-arm64' }}
run: |
xcrun --show-sdk-path
ls -la "/Library/Developer/CommandLineTools/SDKs/"
echo "RANDOMX_RS_CMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk" >> $GITHUB_ENV
rustup target add ${{ matrix.builds.target }}
- name: Set environment variables - Ubuntu
if: startsWith(runner.os,'Linux')
run: |
Expand All @@ -190,7 +184,6 @@ jobs:
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 @@ -199,8 +192,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 @@ -229,7 +221,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 @@ -239,21 +231,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 @@ -283,10 +272,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 @@ -362,13 +351,20 @@ jobs:
run: |
cd buildtools
call generate_config.bat
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.VERSION }}-${{ env.VSHA_SHORT }}-release" "/DTariSuitePath=${{ github.workspace }}${{ env.TBN_DIST }}" "windows_inno_installer.iss"
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer" "/DTariSuitePath=${{ github.workspace }}${{ env.TBN_DIST }}" "windows_inno_installer.iss"
cd Output
echo "Compute archive shasum"
${{ env.SHARUN }} "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe" >> "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256"
echo "Show the shasum"
cat "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256"
echo "Checkum verification archive is "
${{ env.SHARUN }} --check "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256"
- name: Artifact upload for Windows installer
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
Expand All @@ -379,12 +375,14 @@ jobs:
cd "$GITHUB_WORKSPACE${{ env.TBN_DIST }}"
echo "Compute files shasum"
${SHARUN} * >> "${{ env.BINFILE }}.sha256"
echo "Show the shasum"
cat "${{ env.BINFILE }}.sha256"
echo "Checksum verification for files is "
${SHARUN} --check "${{ env.BINFILE }}.sha256"
7z a "${{ env.BINFILE }}.zip" *
echo "Compute archive shasum"
${SHARUN} "${{ env.BINFILE }}.zip" >> "${{ env.BINFILE }}.zip.sha256"
echo "Show the shasum"
cat "${{ env.BINFILE }}.zip.sha256"
echo "Checkum verification archive is "
${SHARUN} --check "${{ env.BINFILE }}.zip.sha256"
Expand All @@ -399,20 +397,21 @@ 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"
echo "Show the shasum"
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 @@ -444,25 +443,24 @@ jobs:
name: ${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}
path: "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils/*.zip*"

- name: Prep diag-utils for upload
- name: Artifact cleanup for diag-utils
continue-on-error: true
shell: bash
run: |
mkdir "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils"
cd "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils"
# Find RandomX built tools for testing
find "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/" \
-name "randomx-*${{ env.TBN_EXT}}" -type f -perm -+x -exec cp -v {} . \;
${SHARUN} * \
>> "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.sha256"
rm -vRf "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils/"
- name: Artifact upload for diag-utils
- name: Artifact Windows Installer for S3
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}
path: "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils/*"

shell: bash
run: |
if [ -d "${{ github.workspace }}/buildtools/Output/" ]; then
echo "Coping Windows installer ..."
cp -v "${{ github.workspace }}/buildtools/Output/"* \
"${{ github.workspace }}${{ env.TBN_DIST }}"
else
echo "No buildtools/Output."
fi
- 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 All @@ -474,6 +472,7 @@ jobs:
else
ls -al ${{ env.SOURCE }}
fi
aws s3 ${{ env.S3CMD }} --region ${{ secrets.AWS_REGION }} \
"${{ env.SOURCE }}" \
s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.DEST_DIR }} \
Expand Down
Loading

0 comments on commit 8a7c4be

Please sign in to comment.