From c258d76c807ede5b0c3d132c598ac598dc81d7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:27:16 +0200 Subject: [PATCH 1/9] Update checkout action --- .github/actions/restore-git-mtimes/action.yml | 2 +- .github/workflows/analyzers.yml | 6 +++--- .github/workflows/build_deploy.yml | 10 +++++----- .github/workflows/changelog.yml | 2 +- .github/workflows/code_sanitizers.yml | 4 ++-- .github/workflows/coverage.yml | 2 +- .github/workflows/develop_branch_dockers_deploy.yml | 2 +- .github/workflows/flamegraphs.yml | 2 +- .github/workflows/prepare_release.yml | 2 +- .github/workflows/unit_tests.yml | 6 +++--- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/actions/restore-git-mtimes/action.yml b/.github/actions/restore-git-mtimes/action.yml index 714c7202..e16c8aa5 100644 --- a/.github/actions/restore-git-mtimes/action.yml +++ b/.github/actions/restore-git-mtimes/action.yml @@ -3,7 +3,7 @@ description: "Restore file modification timestamps from git commit timestamps" runs: using: "composite" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: "MestreLion/git-tools" ref: a42a069bc755f0fa81316965335cb33dbf22a968 # pin latest commit diff --git a/.github/workflows/analyzers.yml b/.github/workflows/analyzers.yml index 52d9bb38..c258f129 100644 --- a/.github/workflows/analyzers.yml +++ b/.github/workflows/analyzers.yml @@ -8,7 +8,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + uses: actions/checkout@v4 - name: Installing clang-format env: @@ -28,7 +28,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 #v4.3.0 @@ -50,6 +50,6 @@ jobs: runs-on: ubuntu-20.04 if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 - name: Run code-inspector run: ci/code-inspector-check.sh diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 2670a6fd..f233ed83 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -19,7 +19,7 @@ jobs: ci_tag: ${{ steps.set_vars.outputs.ci_tag }} tag_created: ${{ steps.set_vars.outputs.tag_created }} steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 - name: Set the tag and version id: tag_set run: | @@ -44,7 +44,7 @@ jobs: network: ["TEST", "BETA", "LIVE"] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} @@ -77,7 +77,7 @@ jobs: matrix: network: ["TEST", "BETA", "LIVE"] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} @@ -117,7 +117,7 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} IS_RELEASE_BUILD: ${{ github.event.inputs.is_release_build || 'false' }} steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} @@ -150,7 +150,7 @@ jobs: matrix: network: ["TEST", "BETA", "LIVE"] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ac236ddb..91a2da73 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -37,7 +37,7 @@ jobs: echo "REPO_TO_RUN=${{ github.event.inputs.repo }}" >> $GITHUB_ENV echo "MODE=${{ github.event.inputs.mode }}" >> $GITHUB_ENV - name: Checks out the required workflow files (workflow repo) - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} repository: ${{ github.repository }} diff --git a/.github/workflows/code_sanitizers.yml b/.github/workflows/code_sanitizers.yml index 4c8d632f..1a6ae97b 100644 --- a/.github/workflows/code_sanitizers.yml +++ b/.github/workflows/code_sanitizers.yml @@ -35,7 +35,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" @@ -91,7 +91,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 1079804f..cbdeffee 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,7 +24,7 @@ jobs: continue-on-error: true timeout-minutes: 60 steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 with: submodules: "recursive" - name: Fetch Deps diff --git a/.github/workflows/develop_branch_dockers_deploy.yml b/.github/workflows/develop_branch_dockers_deploy.yml index f69ee795..18ce83de 100644 --- a/.github/workflows/develop_branch_dockers_deploy.yml +++ b/.github/workflows/develop_branch_dockers_deploy.yml @@ -9,7 +9,7 @@ jobs: linux_job: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - uses: actions/checkout@v4 with: submodules: "recursive" - name: Fetch Deps diff --git a/.github/workflows/flamegraphs.yml b/.github/workflows/flamegraphs.yml index 877b0812..a0166fb8 100644 --- a/.github/workflows/flamegraphs.yml +++ b/.github/workflows/flamegraphs.yml @@ -22,7 +22,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml index d7050419..6b0903c6 100644 --- a/.github/workflows/prepare_release.yml +++ b/.github/workflows/prepare_release.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout repository - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} fetch-depth: 0 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 5fafc9b9..7e42a115 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -20,7 +20,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" @@ -66,7 +66,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" @@ -115,7 +115,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" From a65ce7a28c741be61efac0a1082f04e0c8311da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:28:30 +0200 Subject: [PATCH 2/9] Formula qt5 was renamed to qt@5 --- ci/prepare/macos/prepare.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/prepare/macos/prepare.sh b/ci/prepare/macos/prepare.sh index b66fedaa..da5ad9cb 100755 --- a/ci/prepare/macos/prepare.sh +++ b/ci/prepare/macos/prepare.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euox pipefail -#Homebrew randomly fails to update. Retry 5 times with 15s interval +# Homebrew randomly fails to update. Retry 5 times with 15s interval for i in {1..5}; do brew update && break || { echo "Update failed, retrying..."; sleep 15; }; done brew install coreutils @@ -10,4 +10,4 @@ brew install qt@5 brew link qt@5 # Workaround: https://github.com/Homebrew/homebrew-core/issues/8392 -echo "$(brew --prefix qt5)/bin" >> $GITHUB_PATH \ No newline at end of file +echo "$(brew --prefix qt@5)/bin" >> $GITHUB_PATH \ No newline at end of file From 0a1003cda49a13e19f17e0e81dd40292052a47ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:34:11 +0200 Subject: [PATCH 3/9] Fix 'as' and 'FROM' keywords' casing do not match --- docker/node/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile index 8f11e144..5cee44c9 100644 --- a/docker/node/Dockerfile +++ b/docker/node/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 as builder +FROM ubuntu:22.04 AS builder ARG COMPILER=gcc ARG NANO_NETWORK=live @@ -10,7 +10,7 @@ RUN /tmp/prepare/prepare.sh COPY ./ /tmp/src WORKDIR /tmp/src -#Define ARGs for ci/build-node.sh +# Define ARGs for ci/build-node.sh ARG BUILD_TYPE=RelWithDebInfo ARG NANO_TEST=OFF ARG NANO_TRACING=OFF From eb23460aafe8cf298502bd3170d04457104db5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:32:26 +0200 Subject: [PATCH 4/9] Friendly job names in build & deploy workflow --- .github/workflows/build_deploy.yml | 42 +++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index f233ed83..24da36bc 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -1,7 +1,7 @@ name: Build & Deploy on: schedule: - - cron: "0 0 * * 3,6" + - cron: "0 0 * * 3,6" # Every Wednesday and Saturday at 00:00 workflow_dispatch: inputs: is_release_build: @@ -14,12 +14,15 @@ env: jobs: prepare_build: + name: Prepare Build runs-on: ubuntu-22.04 outputs: ci_tag: ${{ steps.set_vars.outputs.ci_tag }} tag_created: ${{ steps.set_vars.outputs.tag_created }} steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 + - name: Set the tag and version id: tag_set run: | @@ -27,14 +30,15 @@ jobs: env: GITHUB_ACTOR: ${{ github.actor }} IS_RELEASE_BUILD: ${{ github.event.inputs.is_release_build || 'false' }} + - name: Set output id: set_vars run: | echo "ci_tag=$CI_TAG" >> $GITHUB_OUTPUT echo "tag_created=$TAG_CREATED" >> $GITHUB_OUTPUT - osx_job: + name: macOS [${{ matrix.network }}] needs: prepare_build if: ${{ needs.prepare_build.outputs.tag_created == 'true' }} runs-on: macOS-14 @@ -43,19 +47,22 @@ jobs: matrix: network: ["TEST", "BETA", "LIVE"] steps: - - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} repository: ${{ github.repository }} + - name: Prepare run: ci/prepare/macos/prepare.sh + - name: Build Artifact run: ci/build-deploy.sh "/tmp/qt/lib/cmake/Qt5"; env: NETWORK: ${{ matrix.network }} CI_TAG: ${{ needs.prepare_build.outputs.ci_tag }} + - name: Deploy Artifact run: ci/actions/deploy.sh env: @@ -66,9 +73,9 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-2 - linux_job: + name: Linux [${{ matrix.network }}] needs: prepare_build if: ${{ needs.prepare_build.outputs.tag_created == 'true' }} runs-on: ubuntu-22.04 @@ -77,13 +84,16 @@ jobs: matrix: network: ["TEST", "BETA", "LIVE"] steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} repository: ${{ github.repository }} + - name: Prepare run: sudo -E ci/prepare/linux/prepare.sh + - name: Build Artifact run: ci/build-deploy.sh "/usr/lib/x86_64-linux-gnu/cmake/Qt5" env: @@ -101,8 +111,8 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-2 - linux_docker_job: + name: Docker [${{ matrix.network }}] needs: prepare_build if: ${{ needs.prepare_build.outputs.tag_created == 'true' }} runs-on: ubuntu-22.04 @@ -117,21 +127,25 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} IS_RELEASE_BUILD: ${{ github.event.inputs.is_release_build || 'false' }} steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} repository: ${{ github.repository }} + - name: Build Docker run: ci/actions/linux/docker-build.sh env: NETWORK: ${{ matrix.network }} - - name: Deploy Docker Hub + + - name: Deploy Docker (Docker Hub) if: env.DOCKER_PASSWORD != '' run: ci/actions/linux/docker-deploy.sh env: NETWORK: ${{ matrix.network }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - name: Deploy Docker (ghcr.io) run: ci/actions/linux/ghcr-deploy.sh env: @@ -140,8 +154,8 @@ jobs: DOCKER_USER: ${{ github.repository_owner }} DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - windows_job: + name: Windows [${{ matrix.network }}] needs: prepare_build if: ${{ needs.prepare_build.outputs.tag_created == 'true' }} runs-on: windows-latest @@ -150,18 +164,22 @@ jobs: matrix: network: ["TEST", "BETA", "LIVE"] steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: submodules: "recursive" ref: ${{ needs.prepare_build.outputs.ci_tag }} repository: ${{ github.repository }} + - name: Prepare run: ci/prepare/windows/prepare.ps1 + - name: Build Artifact run: ci/actions/windows/build.ps1 env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + - name: Deploy Artifact run: ci/actions/windows/deploy.ps1 env: From 11e9581a25d89b6eff2325839c5f21fbfa63c473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:40:38 +0200 Subject: [PATCH 5/9] Avoid unnecessary notices --- ci/tests/run-system-tests.sh | 2 +- ci/tests/show-sanitizer-reports.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/tests/run-system-tests.sh b/ci/tests/run-system-tests.sh index 496fad7f..4027e15a 100755 --- a/ci/tests/run-system-tests.sh +++ b/ci/tests/run-system-tests.sh @@ -44,7 +44,7 @@ for script in ${NANO_SYSTEST_DIR}/*.sh; do done if [ $overall_status -eq 0 ]; then - echo "::notice::All systests passed" + echo "All systests passed" else echo "::error::Some systests failed" exit 1 diff --git a/ci/tests/show-sanitizer-reports.sh b/ci/tests/show-sanitizer-reports.sh index ba4f92d6..f29e6db7 100755 --- a/ci/tests/show-sanitizer-reports.sh +++ b/ci/tests/show-sanitizer-reports.sh @@ -19,7 +19,7 @@ if [[ ${#reports[@]} -gt 0 ]]; then issue_reported=true done else - echo "::notice::No report has been generated." + echo "No report has been generated." fi echo "issue_reported=${issue_reported}" >> $GITHUB_OUTPUT @@ -28,6 +28,6 @@ if $issue_reported; then echo "::error::Issues were reported in the sanitizer report." exit 1 else - echo "::notice::No issues found in the sanitizer reports." + echo "No issues found in the sanitizer reports." exit 0 fi \ No newline at end of file From e821dd4e94b4e646f046986286742d309fc86f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:00:59 +0200 Subject: [PATCH 6/9] Log hashes of executables as notice messages --- ci/actions/deploy.sh | 12 +++++------- ci/actions/windows/deploy.ps1 | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ci/actions/deploy.sh b/ci/actions/deploy.sh index cc6f754f..2a199739 100755 --- a/ci/actions/deploy.sh +++ b/ci/actions/deploy.sh @@ -20,8 +20,6 @@ case "${NETWORK}" in esac if [[ -n "${S3_BUILD_DIRECTORY}" ]]; then - - DIRECTORY="${S3_BUILD_DIRECTORY}/${BUILD}" else DIRECTORY=$BUILD @@ -33,7 +31,7 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then for rpm in $RPMS; do SHA=$(sha256sum ${rpm}) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA > ${GITHUB_WORKSPACE}/$(basename "${rpm}.sha256") aws s3 cp ${rpm} s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/$(basename "${rpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -42,7 +40,7 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then for srpm in $SRPMS; do SHA=$(sha256sum ${srpm}) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA > ${GITHUB_WORKSPACE}/$(basename "${srpm}).sha256") aws s3 cp ${srpm} s3://${S3_BUCKET_NAME}/$DIRECTORY/source/$(basename "${srpm}") --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -50,11 +48,11 @@ if [[ "$OS" == 'Linux' && "$IS_RPM_DEPLOY" -eq "1" ]]; then done elif [[ "$OS" == 'Linux' ]]; then SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.tar.bz2.sha256 SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Linux.deb) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA >$GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256 aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Linux.tar.bz2 s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Linux.tar.bz2 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -63,7 +61,7 @@ elif [[ "$OS" == 'Linux' ]]; then aws s3 cp $GITHUB_WORKSPACE/nano-node-$TAG-Linux.deb.sha256 s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Linux.deb.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers else SHA=$(sha256sum $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg) - echo "Hash: $SHA" + echo "::notice::Hash: $SHA" echo $SHA >$GITHUB_WORKSPACE/build/nano-node-$TAG-Darwin.dmg.sha256 aws s3 cp $GITHUB_WORKSPACE/build/nano-node-*-Darwin.dmg s3://${S3_BUCKET_NAME}/$DIRECTORY/binaries/nano-node-$TAG-Darwin.dmg --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers diff --git a/ci/actions/windows/deploy.ps1 b/ci/actions/windows/deploy.ps1 index 4a859ece..6b53357b 100644 --- a/ci/actions/windows/deploy.ps1 +++ b/ci/actions/windows/deploy.ps1 @@ -27,8 +27,8 @@ $zip_hash = ((Get-FileHash $zip).hash)+" "+(split-path -Path $zip -Resolve -leaf $exe_hash | Out-file -FilePath "$exe.sha256" $zip_hash | Out-file -FilePath "$zip.sha256" -Write-Output "Hash: $exe_hash" -Write-Output "Hash: $zip_hash" +Write-Output "::notice::Hash: $exe_hash" +Write-Output "::notice::Hash: $zip_hash" aws s3 cp "$exe" s3://$env:S3_BUCKET_NAME/$directory/binaries/nano-node-$env:TAG-win64.exe --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers aws s3 cp "$exe.sha256" s3://$env:S3_BUCKET_NAME/$directory/binaries/nano-node-$env:TAG-win64.exe.sha256 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 2fa01e22d7c6d117fc0ac184c5ca0c25c0ac471c Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Tue, 15 Oct 2024 23:00:30 +0200 Subject: [PATCH 7/9] Update to RocksDb V9.7.2 (#4753) --- submodules/rocksdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/rocksdb b/submodules/rocksdb index 41214f0b..d9787264 160000 --- a/submodules/rocksdb +++ b/submodules/rocksdb @@ -1 +1 @@ -Subproject commit 41214f0b4e05aa8123583968df039c0d35228a4f +Subproject commit d9787264a8eb0528966ded06499dff46a4f8739c From 9ff68c1cfa0b6a14e39125577c92a34c7ee03a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:54:21 +0200 Subject: [PATCH 8/9] Fix mismatched channel owners (#4750) * Move `node.inbound ()` * Assert channel owner * Fix tests --- nano/core_test/bootstrap_server.cpp | 24 +++++++-------- nano/core_test/network.cpp | 8 ++--- nano/core_test/node.cpp | 47 ++++++++++++++--------------- nano/core_test/telemetry.cpp | 4 +-- nano/core_test/websocket.cpp | 4 +-- nano/node/network.cpp | 8 ----- nano/node/network.hpp | 1 - nano/node/node.cpp | 10 ++++++ nano/node/node.hpp | 1 + nano/node/transport/channel.cpp | 5 +++ nano/node/transport/channel.hpp | 2 ++ nano/node/transport/inproc.cpp | 2 +- 12 files changed, 62 insertions(+), 54 deletions(-) diff --git a/nano/core_test/bootstrap_server.cpp b/nano/core_test/bootstrap_server.cpp index 4f37d25e..659ecd46 100644 --- a/nano/core_test/bootstrap_server.cpp +++ b/nano/core_test/bootstrap_server.cpp @@ -92,7 +92,7 @@ TEST (bootstrap_server, serve_account_blocks) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -137,7 +137,7 @@ TEST (bootstrap_server, serve_hash) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -182,7 +182,7 @@ TEST (bootstrap_server, serve_hash_one) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -221,7 +221,7 @@ TEST (bootstrap_server, serve_end_of_chain) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -260,7 +260,7 @@ TEST (bootstrap_server, serve_missing) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -303,7 +303,7 @@ TEST (bootstrap_server, serve_multiple) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); } } @@ -359,7 +359,7 @@ TEST (bootstrap_server, serve_account_info) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -405,7 +405,7 @@ TEST (bootstrap_server, serve_account_info_missing) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -450,7 +450,7 @@ TEST (bootstrap_server, serve_frontiers) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); ASSERT_TIMELY_EQ (5s, responses.size (), 1); @@ -503,7 +503,7 @@ TEST (bootstrap_server, serve_frontiers_invalid_count) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); } ASSERT_TIMELY_EQ (5s, node.stats.count (nano::stat::type::bootstrap_server, nano::stat::detail::invalid), 1); @@ -521,7 +521,7 @@ TEST (bootstrap_server, serve_frontiers_invalid_count) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); } ASSERT_TIMELY_EQ (5s, node.stats.count (nano::stat::type::bootstrap_server, nano::stat::detail::invalid), 2); @@ -539,7 +539,7 @@ TEST (bootstrap_server, serve_frontiers_invalid_count) request.payload = request_payload; request.update_header (); - node.network.inbound (request, nano::test::fake_channel (node)); + node.inbound (request, nano::test::fake_channel (node)); } ASSERT_TIMELY_EQ (5s, node.stats.count (nano::stat::type::bootstrap_server, nano::stat::detail::invalid), 3); diff --git a/nano/core_test/network.cpp b/nano/core_test/network.cpp index eb4713f9..c06b28bf 100644 --- a/nano/core_test/network.cpp +++ b/nano/core_test/network.cpp @@ -377,7 +377,7 @@ TEST (receivable_processor, confirm_insufficient_pos) nano::confirm_ack con1{ nano::dev::network_params.network, vote }; auto channel1 = std::make_shared (node1, node1); ASSERT_EQ (1, election->votes ().size ()); - node1.network.inbound (con1, channel1); + node1.inbound (con1, channel1); ASSERT_TIMELY_EQ (5s, 2, election->votes ().size ()) ASSERT_FALSE (election->confirmed ()); } @@ -402,7 +402,7 @@ TEST (receivable_processor, confirm_sufficient_pos) nano::confirm_ack con1{ nano::dev::network_params.network, vote }; auto channel1 = std::make_shared (node1, node1); ASSERT_EQ (1, election->votes ().size ()); - node1.network.inbound (con1, channel1); + node1.inbound (con1, channel1); ASSERT_TIMELY_EQ (5s, 2, election->votes ().size ()) ASSERT_TRUE (election->confirmed ()); } @@ -743,10 +743,10 @@ TEST (network, duplicate_revert_publish) auto channel = nano::test::establish_tcp (system, *other_node, node.network.endpoint ()); ASSERT_NE (nullptr, channel); ASSERT_EQ (0, publish.digest); - node.network.inbound (publish, channel); + node.inbound (publish, nano::test::fake_channel (node)); ASSERT_TRUE (node.network.filter.apply (bytes.data (), bytes.size ())); publish.digest = digest; - node.network.inbound (publish, channel); + node.inbound (publish, nano::test::fake_channel (node)); ASSERT_FALSE (node.network.filter.apply (bytes.data (), bytes.size ())); } diff --git a/nano/core_test/node.cpp b/nano/core_test/node.cpp index 54d1ef29..86cb7d25 100644 --- a/nano/core_test/node.cpp +++ b/nano/core_test/node.cpp @@ -688,16 +688,15 @@ TEST (node, fork_flip) .work (*system.work.generate (nano::dev::genesis->hash ())) .build (); nano::publish publish2{ nano::dev::network_params.network, send2 }; - auto ignored_channel = nano::test::fake_channel (node1); - node1.network.inbound (publish1, ignored_channel); - node2.network.inbound (publish2, ignored_channel); + node1.inbound (publish1, nano::test::fake_channel (node1)); + node2.inbound (publish2, nano::test::fake_channel (node2)); ASSERT_TIMELY_EQ (5s, 1, node1.active.size ()); ASSERT_TIMELY_EQ (5s, 1, node2.active.size ()); system.wallet (0)->insert_adhoc (nano::dev::genesis_key.prv); // Fill nodes with forked blocks - node1.network.inbound (publish2, ignored_channel); + node1.inbound (publish2, nano::test::fake_channel (node1)); ASSERT_TIMELY (5s, node1.active.active (*send2)); - node2.network.inbound (publish1, ignored_channel); + node2.inbound (publish1, nano::test::fake_channel (node2)); ASSERT_TIMELY (5s, node2.active.active (*send1)); auto election1 (node2.active.election (nano::qualified_root (nano::dev::genesis->hash (), nano::dev::genesis->hash ()))); ASSERT_NE (nullptr, election1); @@ -829,7 +828,7 @@ TEST (node, fork_open) .build (); nano::publish publish1{ nano::dev::network_params.network, send1 }; auto channel1 = std::make_shared (node); - node.network.inbound (publish1, channel1); + node.inbound (publish1, channel1); ASSERT_TIMELY (5s, (election = node.active.election (publish1.block->qualified_root ())) != nullptr); election->force_confirm (); ASSERT_TIMELY (5s, node.active.empty () && node.block_confirmed (publish1.block->hash ())); @@ -848,7 +847,7 @@ TEST (node, fork_open) .work (*system.work.generate (key1.pub)) .build (); nano::publish publish2{ nano::dev::network_params.network, open1 }; - node.network.inbound (publish2, channel1); + node.inbound (publish2, channel1); ASSERT_TIMELY_EQ (5s, 1, node.active.size ()); // create 2nd open block, which is a fork of open1 block @@ -860,7 +859,7 @@ TEST (node, fork_open) .work (*system.work.generate (key1.pub)) .build (); nano::publish publish3{ nano::dev::network_params.network, open2 }; - node.network.inbound (publish3, channel1); + node.inbound (publish3, channel1); ASSERT_TIMELY (5s, (election = node.active.election (publish3.block->qualified_root ())) != nullptr); // we expect to find 2 blocks in the election and we expect the first block to be the winner just because it was first @@ -1856,14 +1855,14 @@ TEST (node, DISABLED_local_votes_cache) nano::confirm_req message1{ nano::dev::network_params.network, send1->hash (), send1->root () }; nano::confirm_req message2{ nano::dev::network_params.network, send2->hash (), send2->root () }; auto channel = std::make_shared (node); - node.network.inbound (message1, channel); + node.inbound (message1, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::requests, nano::stat::detail::requests_generated_votes), 1); - node.network.inbound (message2, channel); + node.inbound (message2, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::requests, nano::stat::detail::requests_generated_votes), 2); for (auto i (0); i < 100; ++i) { - node.network.inbound (message1, channel); - node.network.inbound (message2, channel); + node.inbound (message1, channel); + node.inbound (message2, channel); } // Make sure a new vote was not generated ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::requests, nano::stat::detail::requests_generated_votes), 2); @@ -1873,7 +1872,7 @@ TEST (node, DISABLED_local_votes_cache) ASSERT_EQ (nano::block_status::progress, node.ledger.process (transaction, send3)); } nano::confirm_req message3{ nano::dev::network_params.network, send3->hash (), send3->root () }; - node.network.inbound (message3, channel); + node.inbound (message3, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::requests, nano::stat::detail::requests_generated_votes), 3); ASSERT_TIMELY (3s, !node.history.votes (send1->root (), send1->hash ()).empty ()); ASSERT_TIMELY (3s, !node.history.votes (send2->root (), send2->hash ()).empty ()); @@ -1881,7 +1880,7 @@ TEST (node, DISABLED_local_votes_cache) // All requests should be served from the cache for (auto i (0); i < 100; ++i) { - node.network.inbound (message3, channel); + node.inbound (message3, channel); } ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::requests, nano::stat::detail::requests_generated_votes), 3); } @@ -1935,26 +1934,26 @@ TEST (node, DISABLED_local_votes_cache_batch) nano::confirm_req message{ nano::dev::network_params.network, batch }; auto channel = std::make_shared (node); // Generates and sends one vote for both hashes which is then cached - node.network.inbound (message, channel); + node.inbound (message, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out), 1); ASSERT_EQ (1, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out)); ASSERT_FALSE (node.history.votes (send2->root (), send2->hash ()).empty ()); ASSERT_FALSE (node.history.votes (receive1->root (), receive1->hash ()).empty ()); // Only one confirm_ack should be sent if all hashes are part of the same vote - node.network.inbound (message, channel); + node.inbound (message, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out), 2); ASSERT_EQ (2, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out)); // Test when votes are different node.history.erase (send2->root ()); node.history.erase (receive1->root ()); - node.network.inbound (nano::confirm_req{ nano::dev::network_params.network, send2->hash (), send2->root () }, channel); + node.inbound (nano::confirm_req{ nano::dev::network_params.network, send2->hash (), send2->root () }, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out), 3); ASSERT_EQ (3, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out)); - node.network.inbound (nano::confirm_req{ nano::dev::network_params.network, receive1->hash (), receive1->root () }, channel); + node.inbound (nano::confirm_req{ nano::dev::network_params.network, receive1->hash (), receive1->root () }, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out), 4); ASSERT_EQ (4, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out)); // There are two different votes, so both should be sent in response - node.network.inbound (message, channel); + node.inbound (message, channel); ASSERT_TIMELY_EQ (3s, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out), 6); ASSERT_EQ (6, node.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::out)); } @@ -1975,7 +1974,7 @@ TEST (node, DISABLED_local_votes_cache_generate_new_vote) // Send a confirm req for genesis block to node nano::confirm_req message1{ nano::dev::network_params.network, nano::dev::genesis->hash (), nano::dev::genesis->root () }; auto channel = std::make_shared (node); - node.network.inbound (message1, channel); + node.inbound (message1, channel); // check that the node generated a vote for the genesis block and that it is stored in the local vote cache and it is the only vote ASSERT_TIMELY (5s, !node.history.votes (nano::dev::genesis->root (), nano::dev::genesis->hash ()).empty ()); @@ -1998,7 +1997,7 @@ TEST (node, DISABLED_local_votes_cache_generate_new_vote) // One of the hashes is cached std::vector> roots_hashes{ std::make_pair (nano::dev::genesis->hash (), nano::dev::genesis->root ()), std::make_pair (send1->hash (), send1->root ()) }; nano::confirm_req message2{ nano::dev::network_params.network, roots_hashes }; - node.network.inbound (message2, channel); + node.inbound (message2, channel); ASSERT_TIMELY (3s, !node.history.votes (send1->root (), send1->hash ()).empty ()); auto votes2 (node.history.votes (send1->root (), send1->hash ())); ASSERT_EQ (1, votes2.size ()); @@ -2441,13 +2440,13 @@ TEST (node, fork_election_invalid_block_signature) .build (); auto channel1 = std::make_shared (node1); - node1.network.inbound (nano::publish{ nano::dev::network_params.network, send1 }, channel1); + node1.inbound (nano::publish{ nano::dev::network_params.network, send1 }, channel1); ASSERT_TIMELY (5s, node1.active.active (send1->qualified_root ())); auto election (node1.active.election (send1->qualified_root ())); ASSERT_NE (nullptr, election); ASSERT_EQ (1, election->blocks ().size ()); - node1.network.inbound (nano::publish{ nano::dev::network_params.network, send3 }, channel1); - node1.network.inbound (nano::publish{ nano::dev::network_params.network, send2 }, channel1); + node1.inbound (nano::publish{ nano::dev::network_params.network, send3 }, channel1); + node1.inbound (nano::publish{ nano::dev::network_params.network, send2 }, channel1); ASSERT_TIMELY (3s, election->blocks ().size () > 1); ASSERT_EQ (election->blocks ()[send2->hash ()]->block_signature (), send2->block_signature ()); } diff --git a/nano/core_test/telemetry.cpp b/nano/core_test/telemetry.cpp index 4ebe65c5..750d18b9 100644 --- a/nano/core_test/telemetry.cpp +++ b/nano/core_test/telemetry.cpp @@ -253,7 +253,7 @@ TEST (telemetry, invalid_signature) telemetry.block_count = 9999; // Change data so signature is no longer valid auto message = nano::telemetry_ack{ nano::dev::network_params.network, telemetry }; - node.network.inbound (message, nano::test::fake_channel (node)); + node.inbound (message, nano::test::fake_channel (node)); ASSERT_TIMELY (5s, node.stats.count (nano::stat::type::telemetry, nano::stat::detail::invalid_signature) > 0); ASSERT_ALWAYS (1s, node.stats.count (nano::stat::type::telemetry, nano::stat::detail::process) == 0) @@ -267,7 +267,7 @@ TEST (telemetry, mismatched_node_id) auto telemetry = node.local_telemetry (); auto message = nano::telemetry_ack{ nano::dev::network_params.network, telemetry }; - node.network.inbound (message, nano::test::fake_channel (node, /* node id */ { 123 })); + node.inbound (message, nano::test::fake_channel (node, /* node id */ { 123 })); ASSERT_TIMELY (5s, node.stats.count (nano::stat::type::telemetry, nano::stat::detail::node_id_mismatch) > 0); ASSERT_ALWAYS (1s, node.stats.count (nano::stat::type::telemetry, nano::stat::detail::process) == 0) diff --git a/nano/core_test/websocket.cpp b/nano/core_test/websocket.cpp index dacfd7b1..5305b518 100644 --- a/nano/core_test/websocket.cpp +++ b/nano/core_test/websocket.cpp @@ -165,7 +165,7 @@ TEST (websocket, started_election) .build (); nano::publish publish1{ nano::dev::network_params.network, send1 }; auto channel1 = std::make_shared (*node1); - node1->network.inbound (publish1, channel1); + node1->inbound (publish1, channel1); ASSERT_TIMELY (1s, node1->active.election (send1->qualified_root ())); ASSERT_TIMELY_EQ (5s, future.wait_for (0s), std::future_status::ready); @@ -213,7 +213,7 @@ TEST (websocket, stopped_election) .build (); nano::publish publish1{ nano::dev::network_params.network, send1 }; auto channel1 = std::make_shared (*node1); - node1->network.inbound (publish1, channel1); + node1->inbound (publish1, channel1); ASSERT_TIMELY (5s, node1->active.election (send1->qualified_root ())); node1->active.erase (*send1); diff --git a/nano/node/network.cpp b/nano/node/network.cpp index d780f634..a764f453 100644 --- a/nano/node/network.cpp +++ b/nano/node/network.cpp @@ -314,14 +314,6 @@ void nano::network::flood_block_many (std::deque> b } } -void nano::network::inbound (const nano::message & message, const std::shared_ptr & channel) -{ - debug_assert (message.header.network == node.network_params.network.current_network); - debug_assert (message.header.version_using >= node.network_params.network.protocol_version_min); - - node.message_processor.process (message, channel); -} - // Send keepalives to all the peers we've been notified of void nano::network::merge_peers (std::array const & peers_a) { diff --git a/nano/node/network.hpp b/nano/node/network.hpp index f8aac622..5aa6ec87 100644 --- a/nano/node/network.hpp +++ b/nano/node/network.hpp @@ -127,7 +127,6 @@ public: void erase (nano::transport::channel const &); /** Disconnects and adds peer to exclusion list */ void exclude (std::shared_ptr const & channel); - void inbound (nano::message const &, std::shared_ptr const &); nano::container_info container_info () const; diff --git a/nano/node/node.cpp b/nano/node/node.cpp index 3cda7ce3..ceb034f3 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -518,6 +518,16 @@ void nano::node::keepalive (std::string const & address_a, uint16_t port_a) }); } +void nano::node::inbound (const nano::message & message, const std::shared_ptr & channel) +{ + debug_assert (channel->owner () == shared_from_this ()); // This node should be the channel owner + + debug_assert (message.header.network == network_params.network.current_network); + debug_assert (message.header.version_using >= network_params.network.protocol_version_min); + + message_processor.process (message, channel); +} + void nano::node::process_active (std::shared_ptr const & incoming) { block_processor.add (incoming); diff --git a/nano/node/node.hpp b/nano/node/node.hpp index c411b6d9..af5f0e41 100644 --- a/nano/node/node.hpp +++ b/nano/node/node.hpp @@ -94,6 +94,7 @@ public: bool copy_with_compaction (std::filesystem::path const &); void keepalive (std::string const &, uint16_t); int store_version (); + void inbound (nano::message const &, std::shared_ptr const &); void process_confirmed (nano::election_status const &, uint64_t = 0); void process_active (std::shared_ptr const &); std::optional process_local (std::shared_ptr const &); diff --git a/nano/node/transport/channel.cpp b/nano/node/transport/channel.cpp index 18370444..6c31d95b 100644 --- a/nano/node/transport/channel.cpp +++ b/nano/node/transport/channel.cpp @@ -63,6 +63,11 @@ nano::endpoint nano::transport::channel::get_peering_endpoint () const } } +std::shared_ptr nano::transport::channel::owner () const +{ + return node.shared (); +} + void nano::transport::channel::operator() (nano::object_stream & obs) const { obs.write ("endpoint", get_endpoint ()); diff --git a/nano/node/transport/channel.hpp b/nano/node/transport/channel.hpp index e01cc8c5..18416882 100644 --- a/nano/node/transport/channel.hpp +++ b/nano/node/transport/channel.hpp @@ -130,6 +130,8 @@ public: nano::endpoint get_peering_endpoint () const; void set_peering_endpoint (nano::endpoint endpoint); + std::shared_ptr owner () const; + mutable nano::mutex channel_mutex; private: diff --git a/nano/node/transport/inproc.cpp b/nano/node/transport/inproc.cpp index c1cf7a5b..abeca400 100644 --- a/nano/node/transport/inproc.cpp +++ b/nano/node/transport/inproc.cpp @@ -44,7 +44,7 @@ void nano::transport::inproc::channel::send_buffer (nano::shared_const_buffer co // process message { node.stats.inc (nano::stat::type::message, to_stat_detail (message_a->type ()), nano::stat::dir::in); - destination.network.inbound (*message_a, remote_channel); + destination.inbound (*message_a, remote_channel); } }); From c440cc1c8d4d593364f4ef0c7039f1f60b92f3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:49:48 +0200 Subject: [PATCH 9/9] Log digest of docker image --- ci/actions/linux/docker-impl/docker-common.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ci/actions/linux/docker-impl/docker-common.sh b/ci/actions/linux/docker-impl/docker-common.sh index 912558b1..c3e6b1c2 100755 --- a/ci/actions/linux/docker-impl/docker-common.sh +++ b/ci/actions/linux/docker-impl/docker-common.sh @@ -134,7 +134,22 @@ docker_login() push_docker_image() { local image_name=$1 + + # Log the image name before pushing + echo "Pushing image: $image_name" + + # Push the image "$scripts"/custom-timeout.sh 30 docker push "$image_name" + + # After pushing, get the digest from the local image manifest + local digest + digest=$(docker image inspect --format='{{index .RepoDigests 0}}' "$image_name") + + if [ -n "$digest" ]; then + echo "::notice::Hash: $digest $image_name" + else + echo "::error::Could not retrieve digest for image $image_name" + fi } deploy_env_images() @@ -154,7 +169,7 @@ deploy_tags() local exclude_pattern=$2 local tags=$(docker images --format '{{.Repository}}:{{.Tag }}' | grep "$repo" | grep -vE "$exclude_pattern") - #Debug list all tags + # Debug list all tags docker images --format '{{.Repository}}:{{.Tag }}' for tag in $tags; do