From 30df7419b746b722ad3765982ab773df46f702c2 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Sun, 11 Feb 2024 23:56:05 +0100 Subject: [PATCH] Updated gRPC --- .github/workflows/c-cpp.yml | 57 ++++++++++++------- .github/workflows/test-sync.yml | 10 ++-- README.md | 2 +- external/src/Tari/proto/gRPC/base_node.pb.h | 4 +- external/src/Tari/proto/gRPC/block.pb.h | 4 +- external/src/Tari/proto/gRPC/network.pb.h | 4 +- .../src/Tari/proto/gRPC/sidechain_types.pb.h | 4 +- external/src/Tari/proto/gRPC/transaction.pb.h | 4 +- external/src/Tari/proto/gRPC/types.pb.h | 4 +- external/src/grpc | 2 +- 10 files changed, 54 insertions(+), 41 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 33676a0..5930cb7 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -71,13 +71,15 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_BINARY=ON -DARCH_ID=${{ matrix.config.arch }} - make -j$(nproc) + make -j$(nproc) p2pool - name: Run RandomX tests shell: alpine.sh {0} run: | - build/p2pool --test - build/external/src/RandomX/randomx-tests + cd build + ./p2pool --test + make -j$(nproc) randomx-tests + external/src/RandomX/randomx-tests - name: Build tests shell: alpine.sh {0} @@ -115,7 +117,7 @@ jobs: strategy: matrix: config: - - {os: ubuntu-20.04, c: gcc-7, cpp: g++-7, flags: "-Wno-lto-type-mismatch"} + - {os: ubuntu-20.04, c: gcc-8, cpp: g++-8, flags: "-Wno-lto-type-mismatch"} - {os: ubuntu-20.04, c: gcc-11, cpp: g++-11, flags: ""} - {os: ubuntu-22.04, c: gcc-12, cpp: g++-12, flags: ""} @@ -136,12 +138,14 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -flto=2' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -flto=2' - make -j$(nproc) + make -j$(nproc) p2pool - name: Run RandomX tests run: | - build/p2pool --test - build/external/src/RandomX/randomx-tests + cd build + ./p2pool --test + make -j$(nproc) randomx-tests + external/src/RandomX/randomx-tests - name: Build tests run: | @@ -214,12 +218,14 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON - make -j$(nproc) + make -j$(nproc) p2pool - name: Run RandomX tests run: | - build/p2pool --test - build/external/src/RandomX/randomx-tests + cd build + ./p2pool --test + make -j$(nproc) randomx-tests + external/src/RandomX/randomx-tests - name: Build tests run: | @@ -291,12 +297,14 @@ jobs: mkdir build cd build cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=aarch64 - make -j$(nproc) + make -j$(nproc) p2pool - name: Run RandomX tests run: | - qemu-aarch64 -L /usr/aarch64-linux-gnu build/p2pool --test - qemu-aarch64 -L /usr/aarch64-linux-gnu build/external/src/RandomX/randomx-tests + cd build + qemu-aarch64 -L /usr/aarch64-linux-gnu p2pool --test + make -j$(nproc) randomx-tests + qemu-aarch64 -L /usr/aarch64-linux-gnu external/src/RandomX/randomx-tests - name: Build tests run: | @@ -379,12 +387,14 @@ jobs: mkdir build cd build cmake .. -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DSTATIC_LIBS=ON -DOPENSSL_NO_ASM=ON -DWITH_LTO=OFF - make -j$(nproc) + make -j$(nproc) p2pool - name: Run RandomX tests run: | - build/p2pool.exe --test - build/external/src/RandomX/randomx-tests.exe + cd build + ./p2pool.exe --test + make -j$(nproc) randomx-tests + external/src/RandomX/randomx-tests.exe - name: Build tests run: | @@ -509,12 +519,14 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-flto" -DCMAKE_CXX_FLAGS="-flto" -DSTATIC_LIBS=ON - make -j3 + make -j3 p2pool - name: Run RandomX tests run: | - build/p2pool --test - build/external/src/RandomX/randomx-tests + cd build + ./p2pool --test + make -j3 randomx-tests + external/src/RandomX/randomx-tests - name: Build tests run: | @@ -575,7 +587,7 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-target arm64-apple-macos-11" -DCMAKE_CXX_FLAGS="-target arm64-apple-macos-11" -DSTATIC_LIBS=ON -DWITH_LTO=OFF -DARCH_ID=aarch64 - make -j3 + make -j3 p2pool - name: Archive binary uses: actions/upload-artifact@v4 @@ -634,8 +646,9 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_FLAGS='-flto' -DCMAKE_CXX_FLAGS='-flto' -DSTATIC_LIBS=ON - make -j2 + make -j2 p2pool ./p2pool --test + make -j2 randomx-tests external/src/RandomX/randomx-tests cd ../tests mkdir build @@ -686,7 +699,7 @@ jobs: sudo pkg_add -I cmake libuv zeromq curl mkdir build && cd build cmake .. - make -j2 + make -j2 p2pool cd ../tests mkdir build && cd build cmake .. diff --git a/.github/workflows/test-sync.yml b/.github/workflows/test-sync.yml index b288ce5..93ba777 100644 --- a/.github/workflows/test-sync.yml +++ b/.github/workflows/test-sync.yml @@ -55,7 +55,7 @@ jobs: mkdir build cd build cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_TSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWITH_LTO=OFF -DSTATIC_LIBS=ON - make -j$(nproc) + make -j$(nproc) p2pool - name: Run p2pool run: | @@ -143,7 +143,7 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_COMPILER=clang-17 -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -isystem /tmp/libcxx_msan/include/c++/v1 -L/tmp/libcxx_msan/lib -Wl,-rpath /tmp/libcxx_msan/lib -lc++ -lc++abi -Wno-unused-command-line-argument -fuse-ld=lld-17 -fno-omit-frame-pointer -g' -DDEV_TEST_SYNC=ON -DDEV_WITH_MSAN=ON -DWITH_LTO=OFF -DSTATIC_LIBS=ON - make -j$(nproc) + make -j$(nproc) p2pool - name: Run p2pool run: | @@ -192,7 +192,7 @@ jobs: mkdir build cd build cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_UBSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWITH_LTO=OFF - make -j$(nproc) + make -j$(nproc) p2pool - name: Run p2pool run: | @@ -241,7 +241,7 @@ jobs: mkdir build cd build cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWITH_LTO=OFF - make -j$(nproc) + make -j$(nproc) p2pool - name: Run p2pool run: | @@ -312,7 +312,7 @@ jobs: mkdir build cd build cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DDEV_TEST_SYNC=ON - make -j3 + make -j3 p2pool - name: Run p2pool run: | diff --git a/README.md b/README.md index dd3715f..52163d3 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ Only 64-bit builds are supported, in particular ARMv7 or older CPUs are not supp ### Prerequisites - cmake >= 3.10 -- C++ compiler with C++17 support. GCC-7, Clang-13 and MSVC-2019 have been tested and confirmed to work, older compilers may fail to build P2Pool. +- C++ compiler with C++17 support. GCC-8, Clang-13 and MSVC-2019 have been tested and confirmed to work, older compilers may fail to build P2Pool. ### Ubuntu 20.04 diff --git a/external/src/Tari/proto/gRPC/base_node.pb.h b/external/src/Tari/proto/gRPC/base_node.pb.h index a1f6180..0196d71 100644 --- a/external/src/Tari/proto/gRPC/base_node.pb.h +++ b/external/src/Tari/proto/gRPC/base_node.pb.h @@ -1,6 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: base_node.proto -// Protobuf C++ Version: 4.25.1 +// Protobuf C++ Version: 4.25.2 #ifndef GOOGLE_PROTOBUF_INCLUDED_base_5fnode_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_base_5fnode_2eproto_2epb_2eh @@ -17,7 +17,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 4025001 < PROTOBUF_MIN_PROTOC_VERSION +#if 4025002 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/external/src/Tari/proto/gRPC/block.pb.h b/external/src/Tari/proto/gRPC/block.pb.h index df50f45..b7d880e 100644 --- a/external/src/Tari/proto/gRPC/block.pb.h +++ b/external/src/Tari/proto/gRPC/block.pb.h @@ -1,6 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: block.proto -// Protobuf C++ Version: 4.25.1 +// Protobuf C++ Version: 4.25.2 #ifndef GOOGLE_PROTOBUF_INCLUDED_block_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_block_2eproto_2epb_2eh @@ -17,7 +17,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 4025001 < PROTOBUF_MIN_PROTOC_VERSION +#if 4025002 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/external/src/Tari/proto/gRPC/network.pb.h b/external/src/Tari/proto/gRPC/network.pb.h index fd73803..f9cfdf7 100644 --- a/external/src/Tari/proto/gRPC/network.pb.h +++ b/external/src/Tari/proto/gRPC/network.pb.h @@ -1,6 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: network.proto -// Protobuf C++ Version: 4.25.1 +// Protobuf C++ Version: 4.25.2 #ifndef GOOGLE_PROTOBUF_INCLUDED_network_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_network_2eproto_2epb_2eh @@ -17,7 +17,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 4025001 < PROTOBUF_MIN_PROTOC_VERSION +#if 4025002 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/external/src/Tari/proto/gRPC/sidechain_types.pb.h b/external/src/Tari/proto/gRPC/sidechain_types.pb.h index 31a4835..c4b2bc7 100644 --- a/external/src/Tari/proto/gRPC/sidechain_types.pb.h +++ b/external/src/Tari/proto/gRPC/sidechain_types.pb.h @@ -1,6 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: sidechain_types.proto -// Protobuf C++ Version: 4.25.1 +// Protobuf C++ Version: 4.25.2 #ifndef GOOGLE_PROTOBUF_INCLUDED_sidechain_5ftypes_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_sidechain_5ftypes_2eproto_2epb_2eh @@ -17,7 +17,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 4025001 < PROTOBUF_MIN_PROTOC_VERSION +#if 4025002 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/external/src/Tari/proto/gRPC/transaction.pb.h b/external/src/Tari/proto/gRPC/transaction.pb.h index 3198c62..28bc13e 100644 --- a/external/src/Tari/proto/gRPC/transaction.pb.h +++ b/external/src/Tari/proto/gRPC/transaction.pb.h @@ -1,6 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: transaction.proto -// Protobuf C++ Version: 4.25.1 +// Protobuf C++ Version: 4.25.2 #ifndef GOOGLE_PROTOBUF_INCLUDED_transaction_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_transaction_2eproto_2epb_2eh @@ -17,7 +17,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 4025001 < PROTOBUF_MIN_PROTOC_VERSION +#if 4025002 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/external/src/Tari/proto/gRPC/types.pb.h b/external/src/Tari/proto/gRPC/types.pb.h index 3e8d6a9..f60bf6b 100644 --- a/external/src/Tari/proto/gRPC/types.pb.h +++ b/external/src/Tari/proto/gRPC/types.pb.h @@ -1,6 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: types.proto -// Protobuf C++ Version: 4.25.1 +// Protobuf C++ Version: 4.25.2 #ifndef GOOGLE_PROTOBUF_INCLUDED_types_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_types_2eproto_2epb_2eh @@ -17,7 +17,7 @@ #error "your headers." #endif // PROTOBUF_VERSION -#if 4025001 < PROTOBUF_MIN_PROTOC_VERSION +#if 4025002 < PROTOBUF_MIN_PROTOC_VERSION #error "This file was generated by an older version of protoc which is" #error "incompatible with your Protocol Buffer headers. Please" #error "regenerate this file with a newer version of protoc." diff --git a/external/src/grpc b/external/src/grpc index b330d6b..20f72b9 160000 --- a/external/src/grpc +++ b/external/src/grpc @@ -1 +1 @@ -Subproject commit b330d6bf23768763af41a754ac5b3f6088ab8531 +Subproject commit 20f72b9e938c02d1cc7468bb624aaccfa40acf44