Compare commits
130 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3d7d6bfe8 | |||
| d3798a1da7 | |||
| 3bbc0753c6 | |||
| bba9f780bc | |||
| 82cab98f2b | |||
| 9c2bd8292b | |||
| fc1436e86c | |||
| c682ad3111 | |||
| beeba04890 | |||
| 92291c1175 | |||
| 56a1a801bf | |||
| 503fb34c69 | |||
| 43ab92472e | |||
| 0755a9dcf1 | |||
| e62f653b9d | |||
| 752d6a9d05 | |||
| e5d582b6c1 | |||
| 964f4c8065 | |||
| a8a6b7fd02 | |||
| a37362570d | |||
| 01ae862507 | |||
| 81431b12fb | |||
| 2b46cb937a | |||
| 27a0cc9bb1 | |||
| 33b8a500fe | |||
| 28511c7e5a | |||
| 71d07eff63 | |||
| 81533df789 | |||
| 3c28ae9564 | |||
| 24ac83e88b | |||
| c5b4e84652 | |||
| e179208053 | |||
| 2f51c38549 | |||
| 5d14b27616 | |||
| 2822c6abb5 | |||
| 758b55f354 | |||
| a01545e42c | |||
| 3461872435 | |||
| 1957ba519e | |||
| 83f8b70c9b | |||
| 325aca29ce | |||
| 32235b8225 | |||
| e4402845e1 | |||
| 8c56e5f079 | |||
| ee0537c0f5 | |||
| e2ff0ce0da | |||
| 66dc583130 | |||
| 4978cdc9d1 | |||
| 353f22d079 | |||
| fbee340afa | |||
| ed4d0892d7 | |||
| db572ce9d8 | |||
| 436b39c6b1 | |||
| 34820e617f | |||
| 484d34040e | |||
| 06463e3e68 | |||
| 52d3454b0f | |||
| 927258396e | |||
| b9face492d | |||
| d289526f45 | |||
| 1b05f1e750 | |||
| 10d583adb6 | |||
| 1b863109f9 | |||
| e5d487aa50 | |||
| e69f5722df | |||
| b3678bfbe9 | |||
| 7a82b0fe43 | |||
| 5aea5768a7 | |||
| 3f54025384 | |||
| c421324b73 | |||
| 0535ca2892 | |||
| e68a31f72a | |||
| 02533848d2 | |||
| 6cd79b3a48 | |||
| 3d1ef0d049 | |||
| 547b3430c2 | |||
| 88df27a359 | |||
| 7eaef5faca | |||
| 9cb9545ce6 | |||
| 60285a21dd | |||
| 8f716bd1f1 | |||
| 009fa0f474 | |||
| cea19f1c0d | |||
| 0d0bf9cdee | |||
| c353daeb85 | |||
| 865bce5774 | |||
| 853b942af7 | |||
| a9d9e1b48a | |||
| 2f06a8b9b8 | |||
| 197b260d88 | |||
| 26bf2f07a0 | |||
| 09532c901a | |||
| ab89a3c792 | |||
| 2fe5dd8a36 | |||
| 17279708e5 | |||
| e577b298b6 | |||
| d66a2603e3 | |||
| 8bb317c4b7 | |||
| 9ce118ed82 | |||
| aa303a96d1 | |||
| 6c4520481b | |||
| 62707656eb | |||
| 20caceee5d | |||
| 3ac7c0c243 | |||
| ae6a08ee25 | |||
| afa82f4b48 | |||
| e7f87085fb | |||
| 3147a2e968 | |||
| 435e6c7599 | |||
| ce840733f1 | |||
| 54d278643d | |||
| 8d639bfcf2 | |||
| d3026a97b7 | |||
| 77c28df3f0 | |||
| b06fcc7516 | |||
| a01ea2d9d8 | |||
| 0d7b110f15 | |||
| 7cd21f5d0e | |||
| 886da5a73e | |||
| bfa30254df | |||
| b589d373ea | |||
| 8333f7800f | |||
| 91fb15e967 | |||
| e0c1d9377c | |||
| 3f80244d84 | |||
| 433a1991bc | |||
| 915be9e39f | |||
| b9e415c659 | |||
| 1e2e5b85aa | |||
| 40999f0056 |
+141
-47
@@ -14,14 +14,14 @@ jobs:
|
||||
build-alpine-static:
|
||||
|
||||
timeout-minutes: 240
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {arch: x86_64, branch: latest-stable, flags: "-ffunction-sections"}
|
||||
- {arch: aarch64, branch: latest-stable, flags: "-ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
||||
- {arch: riscv64, branch: edge, flags: "-ffunction-sections"}
|
||||
- {arch: riscv64, branch: latest-stable, flags: "-ffunction-sections"}
|
||||
|
||||
steps:
|
||||
- name: Setup Alpine Linux
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
shell: alpine.sh --root {0}
|
||||
run: |
|
||||
apk add git cmake gcc g++ make linux-headers
|
||||
apk add git cmake gcc g++ make linux-headers xz
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
shell: alpine.sh {0}
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
cd external/src/libzmq
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Build p2pool
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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 }}
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -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) p2pool
|
||||
|
||||
- name: Run RandomX tests
|
||||
@@ -88,14 +88,14 @@ jobs:
|
||||
cd tests
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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=${{ matrix.config.arch }}
|
||||
make -j$(nproc)
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -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=${{ matrix.config.arch }}
|
||||
make -j$(nproc) p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
shell: alpine.sh {0}
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: List directory
|
||||
@@ -130,7 +130,7 @@ jobs:
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt update
|
||||
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev ${{ matrix.config.c }} ${{ matrix.config.cpp }}
|
||||
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev xz-utils ${{ matrix.config.c }} ${{ matrix.config.cpp }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -157,12 +157,12 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
@@ -186,7 +186,7 @@ jobs:
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt update
|
||||
sudo apt install -y git build-essential cmake libgss-dev gcc-12 g++-12
|
||||
sudo apt install -y git build-essential cmake libgss-dev gcc-12 g++-12 xz-utils
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
|
||||
|
||||
- name: Checkout repository
|
||||
@@ -197,7 +197,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -237,12 +237,12 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
@@ -259,14 +259,13 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {os: ubuntu-22.04, flags: "-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
||||
- {os: ubuntu-24.04, flags: "-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
||||
- {os: ubuntu-22.04-arm, flags: "-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git build-essential cmake gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu qemu-user
|
||||
sudo apt install -y git build-essential cmake xz-utils
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -276,7 +275,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -285,7 +284,7 @@ jobs:
|
||||
cd external/src/libuv
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Build libzmq
|
||||
@@ -293,36 +292,36 @@ jobs:
|
||||
cd external/src/libzmq
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Build p2pool
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
- name: Run RandomX tests
|
||||
run: |
|
||||
cd build
|
||||
qemu-aarch64 -L /usr/aarch64-linux-gnu p2pool --test
|
||||
./p2pool --test
|
||||
make -j$(nproc) randomx-tests
|
||||
qemu-aarch64 -L /usr/aarch64-linux-gnu external/src/RandomX/randomx-tests
|
||||
external/src/RandomX/randomx-tests
|
||||
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd tests
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_STRIP=/usr/bin/aarch64-linux-gnu-strip -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 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc)
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
qemu-aarch64 -L /usr/aarch64-linux-gnu ./p2pool_tests
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -330,6 +329,102 @@ jobs:
|
||||
name: p2pool-${{ matrix.config.os }}-aarch64
|
||||
path: build/p2pool
|
||||
|
||||
build-ubuntu-riscv64:
|
||||
|
||||
timeout-minutes: 60
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {os: ubuntu-22.04, flags: "-fuse-linker-plugin -ffunction-sections"}
|
||||
|
||||
steps:
|
||||
- name: Setup Alpine Linux
|
||||
uses: jirutka/setup-alpine@v1
|
||||
with:
|
||||
arch: riscv64
|
||||
branch: latest-stable
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git build-essential cmake gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu xz-utils
|
||||
sudo cp /usr/riscv64-linux-gnu/lib/* /home/runner/rootfs/alpine-latest-riscv64/lib
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
- name: Build libuv
|
||||
run: |
|
||||
cd external/src/libuv
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Build libzmq
|
||||
run: |
|
||||
cd external/src/libzmq
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Build p2pool
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/riscv64_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=riscv64 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
- name: Run self-test
|
||||
shell: alpine.sh {0}
|
||||
run: build/p2pool --test
|
||||
|
||||
- name: Build RandomX tests
|
||||
run: |
|
||||
cd build
|
||||
make -j$(nproc) randomx-tests
|
||||
|
||||
- name: Run RandomX tests
|
||||
shell: alpine.sh {0}
|
||||
run: build/external/src/RandomX/randomx-tests
|
||||
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd tests
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../cmake/riscv64_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=riscv64 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool_tests
|
||||
|
||||
- name: Prepare test data
|
||||
run: |
|
||||
cd tests/build
|
||||
unxz *.xz
|
||||
|
||||
- name: Run tests
|
||||
shell: alpine.sh {0}
|
||||
run: |
|
||||
cd tests/build
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool-${{ matrix.config.os }}-riscv64
|
||||
path: build/p2pool
|
||||
|
||||
build-windows-msys2:
|
||||
|
||||
timeout-minutes: 60
|
||||
@@ -360,7 +455,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_C_FLAGS="-Os ${{ matrix.config.flags }}" -DCURL_TARGET_WINDOWS_VERSION=0x0600 -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_C_FLAGS="-Os ${{ matrix.config.flags }}" -DCURL_TARGET_WINDOWS_VERSION=0x0600 -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -400,12 +495,12 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests.exe
|
||||
|
||||
- name: Archive binary
|
||||
@@ -423,11 +518,10 @@ jobs:
|
||||
matrix:
|
||||
config:
|
||||
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "ON", upnp: "ON", grpc: "ON", tls: "ON"}
|
||||
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "ON", upnp: "ON", grpc: "ON", tls: "ON"}
|
||||
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "ON", upnp: "ON", grpc: "OFF", tls: "ON"}
|
||||
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "OFF", upnp: "ON", grpc: "OFF", tls: "ON"}
|
||||
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "OFF", upnp: "OFF", grpc: "OFF", tls: "ON"}
|
||||
- {vs: Visual Studio 16 2019, os: 2019, vspath: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise", rx: "OFF", upnp: "OFF", grpc: "OFF", tls: "OFF"}
|
||||
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "ON", upnp: "ON", grpc: "OFF", tls: "ON"}
|
||||
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "OFF", upnp: "ON", grpc: "OFF", tls: "ON"}
|
||||
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "OFF", upnp: "OFF", grpc: "OFF", tls: "ON"}
|
||||
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "OFF", upnp: "OFF", grpc: "OFF", tls: "OFF"}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -477,7 +571,7 @@ jobs:
|
||||
shell: cmd
|
||||
run: |
|
||||
cd tests/build/Debug
|
||||
7z x *.gz
|
||||
7z x *.xz
|
||||
call "${{ matrix.config.vspath }}\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
|
||||
p2pool_tests.exe
|
||||
|
||||
@@ -501,7 +595,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_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="-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_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="-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j4
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -541,12 +635,12 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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 -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_ASM_FLAGS='-target x86_64-apple-macos10.13' -DSTATIC_LIBS=ON
|
||||
make -j4
|
||||
make -j4 p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
@@ -569,7 +663,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_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="-Os -target arm64-apple-macos-11" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_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="-Os -target arm64-apple-macos-11" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j3
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -609,12 +703,12 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -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_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
@@ -659,7 +753,7 @@ jobs:
|
||||
run: |
|
||||
sudo pkg install -y cmake
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j4
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
cd ../../libuv
|
||||
@@ -685,7 +779,7 @@ jobs:
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DSTATIC_LIBS=ON
|
||||
make -j4 p2pool_tests
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
@@ -736,7 +830,7 @@ jobs:
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make -j4 p2pool_tests
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
|
||||
@@ -19,9 +19,9 @@ jobs:
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 20
|
||||
sudo apt-get install -y clang-tidy-20
|
||||
clang-tidy-20 --verify-config
|
||||
sudo ./llvm.sh 21
|
||||
sudo apt-get install -y clang-tidy-21
|
||||
clang-tidy-21 --verify-config
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -32,9 +32,9 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DDEV_CLANG_TIDY=ON -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-21 -DCMAKE_CXX_COMPILER=clang++-21 -DDEV_CLANG_TIDY=ON -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
|
||||
- name: Run clang-tidy
|
||||
run: |
|
||||
cd src
|
||||
clang-tidy-20 *.cpp -p ../build -checks=-clang-diagnostic-undefined-internal,-clang-analyzer-optin.performance.Padding,-clang-diagnostic-nan-infinity-disabled -warnings-as-errors=* -header-filter=^[^\.]
|
||||
clang-tidy-21 *.cpp -p ../build -checks=-clang-diagnostic-undefined-internal,-clang-analyzer-optin.performance.Padding,-clang-diagnostic-nan-infinity-disabled -warnings-as-errors=* -header-filter=^[^\.]
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev
|
||||
sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
name: Code coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
paths-ignore:
|
||||
- 'docker-compose/**'
|
||||
- 'docs/**'
|
||||
- 'README.md'
|
||||
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev lcov xz-utils
|
||||
|
||||
- name: Install clang
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 21 all
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd tests
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DDEV_DEBUG=ON -DWITH_COVERAGE=ON -DCMAKE_C_COMPILER=clang-21 -DCMAKE_CXX_COMPILER=clang++-21 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
unxz *.xz
|
||||
LLVM_PROFILE_FILE="p2pool_tests.profraw" ./p2pool_tests
|
||||
|
||||
- name: Merge profile data
|
||||
run: |
|
||||
cd tests/build
|
||||
llvm-profdata-21 merge -sparse ./p2pool_tests.profraw -o ./p2pool_tests.profdata
|
||||
|
||||
- name: Export profile data
|
||||
run: |
|
||||
cd tests/build
|
||||
llvm-cov-21 export ./p2pool_tests -format=lcov -instr-profile=./p2pool_tests.profdata > coverage.info
|
||||
|
||||
- name: Run genhtml
|
||||
run: |
|
||||
cd tests/build
|
||||
genhtml --demangle-cpp -o coverage coverage.info
|
||||
|
||||
- name: Checkout GitHub Pages repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: SChernykh/SChernykh.github.io
|
||||
token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
||||
path: gh-pages
|
||||
|
||||
- name: Copy coverage report to GitHub Pages repo
|
||||
run: |
|
||||
rm -rf gh-pages/p2pool-coverage
|
||||
cp -r tests/build/coverage gh-pages/p2pool-coverage
|
||||
|
||||
- name: Commit and push coverage report
|
||||
run: |
|
||||
cd gh-pages
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add p2pool-coverage
|
||||
git commit -m "Update p2pool coverage report"
|
||||
git push
|
||||
|
||||
- name: Archive coverage data
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool-coverage
|
||||
path: tests/build/coverage
|
||||
@@ -26,10 +26,8 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout cppcheck
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: danmar/cppcheck
|
||||
path: cppcheck-main
|
||||
run: |
|
||||
git clone https://github.com/danmar/cppcheck cppcheck-main
|
||||
|
||||
- name: Build cppcheck
|
||||
run: |
|
||||
@@ -74,10 +72,8 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout cppcheck
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: danmar/cppcheck
|
||||
path: cppcheck-main
|
||||
run: |
|
||||
git clone https://github.com/danmar/cppcheck cppcheck-main
|
||||
|
||||
- name: Build cppcheck
|
||||
run: |
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
python ../tests/src/stratum_dummy.py 2 &
|
||||
python ../tests/src/stratum_dummy.py 3 &
|
||||
sudo sysctl vm.mmap_rnd_bits=28
|
||||
TSAN_OPTIONS="suppressions=../tests/src/tsan_sup.txt halt_on_error=1 history_size=4" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
TSAN_OPTIONS="suppressions=../tests/src/tsan_sup.txt halt_on_error=1 history_size=4" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
run: |
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_C_COMPILER=clang-20 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g' -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_C_COMPILER=clang-20 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g' -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -155,7 +155,7 @@ jobs:
|
||||
python ../tests/src/stratum_dummy.py 2 &
|
||||
python ../tests/src/stratum_dummy.py 3 &
|
||||
sudo sysctl vm.mmap_rnd_bits=28
|
||||
MSAN_OPTIONS="halt_on_error=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
MSAN_OPTIONS="halt_on_error=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
run: |
|
||||
@@ -180,7 +180,7 @@ jobs:
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt update
|
||||
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev gcc-12 g++-12
|
||||
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev gcc-12 g++-12
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -202,7 +202,7 @@ jobs:
|
||||
python ../tests/src/stratum_dummy.py 2 &
|
||||
python ../tests/src/stratum_dummy.py 3 &
|
||||
sudo sysctl vm.mmap_rnd_bits=28
|
||||
UBSAN_OPTIONS="suppressions=../tests/src/ubsan_sup.txt halt_on_error=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
UBSAN_OPTIONS="suppressions=../tests/src/ubsan_sup.txt halt_on_error=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
run: |
|
||||
@@ -227,7 +227,7 @@ jobs:
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt update
|
||||
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev gcc-12 g++-12
|
||||
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev gcc-12 g++-12
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -249,7 +249,7 @@ jobs:
|
||||
python ../tests/src/stratum_dummy.py 2 &
|
||||
python ../tests/src/stratum_dummy.py 3 &
|
||||
sudo sysctl vm.mmap_rnd_bits=28
|
||||
ASAN_OPTIONS="detect_stack_use_after_return=1 atexit=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
ASAN_OPTIONS="detect_stack_use_after_return=1 atexit=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
run: |
|
||||
@@ -284,7 +284,7 @@ jobs:
|
||||
- name: Build libcurl
|
||||
run: |
|
||||
cd external/src/curl
|
||||
cmake . -DCMAKE_C_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="${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
cmake . -DCMAKE_C_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="${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j4
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
@@ -318,7 +318,7 @@ jobs:
|
||||
python3 ../tests/src/stratum_dummy.py 1 &
|
||||
python3 ../tests/src/stratum_dummy.py 2 &
|
||||
python3 ../tests/src/stratum_dummy.py 3 &
|
||||
./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
run: |
|
||||
@@ -363,7 +363,7 @@ jobs:
|
||||
start python ../../tests/src/stratum_dummy.py 1
|
||||
start python ../../tests/src/stratum_dummy.py 2
|
||||
start python ../../tests/src/stratum_dummy.py 3
|
||||
p2pool.exe --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
p2pool.exe --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
run: |
|
||||
@@ -406,7 +406,7 @@ jobs:
|
||||
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 1"
|
||||
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 2"
|
||||
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 3"
|
||||
./p2pool.exe --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
./p2pool.exe --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
run: |
|
||||
|
||||
+38
-24
@@ -191,6 +191,18 @@ endif()
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${HEADERS})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${SOURCES})
|
||||
|
||||
include(CheckFunctionExists)
|
||||
|
||||
if (STATIC_BINARY)
|
||||
add_definitions(-DCURL_STATICLIB)
|
||||
|
||||
check_function_exists(__nss_module_disable_loading HAVE_NSS_MODULE_DISABLE_LOADING)
|
||||
|
||||
if (HAVE_NSS_MODULE_DISABLE_LOADING)
|
||||
add_definitions(-DHAVE_NSS_MODULE_DISABLE_LOADING)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT ((CMAKE_CXX_COMPILER_ID MATCHES MSVC) OR STATIC_BINARY OR STATIC_LIBS))
|
||||
include(FindCURL)
|
||||
endif()
|
||||
@@ -256,22 +268,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
find_library(CURL_LIBRARY NAMES curl)
|
||||
endif()
|
||||
endif()
|
||||
find_library(SODIUM_LIBRARY sodium)
|
||||
endif()
|
||||
|
||||
find_library(PGM_LIBRARY pgm)
|
||||
find_library(NORM_LIBRARY norm)
|
||||
|
||||
if (PGM_LIBRARY)
|
||||
set(LIBS ${LIBS} ${PGM_LIBRARY})
|
||||
endif()
|
||||
|
||||
if (NORM_LIBRARY)
|
||||
set(LIBS ${LIBS} ${NORM_LIBRARY})
|
||||
endif()
|
||||
|
||||
if (SODIUM_LIBRARY)
|
||||
set(LIBS ${LIBS} ${SODIUM_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
@@ -281,13 +277,13 @@ if(APPLE)
|
||||
set(LIBS ${LIBS} ${FOUNDATION_LIB} ${CORE_FOUNDATION_LIB} ${SYSTEM_CONFIGURATION_LIB})
|
||||
endif()
|
||||
|
||||
add_definitions(/DZMQ_STATIC)
|
||||
add_definitions(-DZMQ_STATIC)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
||||
check_include_file(asm/hwcap.h HAVE_HWCAP)
|
||||
if(HAVE_HWCAP)
|
||||
add_definitions(/DHAVE_HWCAP)
|
||||
add_definitions(-DHAVE_HWCAP)
|
||||
endif()
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
@@ -364,30 +360,40 @@ int main()
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
if (HAVE_BUILTIN_CLZLL)
|
||||
add_definitions(/DHAVE_BUILTIN_CLZLL)
|
||||
add_definitions(-DHAVE_BUILTIN_CLZLL)
|
||||
endif()
|
||||
|
||||
if (HAVE_BITSCANREVERSE64)
|
||||
add_definitions(/DHAVE_BITSCANREVERSE64)
|
||||
add_definitions(-DHAVE_BITSCANREVERSE64)
|
||||
endif()
|
||||
|
||||
if (HAVE_SCHED)
|
||||
add_definitions(/DHAVE_SCHED)
|
||||
add_definitions(-DHAVE_SCHED)
|
||||
endif()
|
||||
|
||||
if (HAVE_RES_QUERY)
|
||||
add_definitions(/DHAVE_RES_QUERY)
|
||||
add_definitions(-DHAVE_RES_QUERY)
|
||||
if (HAVE_RESOLV_LIB)
|
||||
set(LIBS ${LIBS} resolv)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (HAVE_PTHREAD_SETNAME_NP)
|
||||
add_definitions(/DHAVE_PTHREAD_SETNAME_NP)
|
||||
add_definitions(-DHAVE_PTHREAD_SETNAME_NP)
|
||||
endif()
|
||||
|
||||
check_c_source_compiles("#include <gnu/libc-version.h>\nint main() { return (gnu_get_libc_version() && gnu_get_libc_release()) ? 0 : 1; }" HAVE_GLIBC)
|
||||
|
||||
if (HAVE_GLIBC)
|
||||
add_definitions(-DHAVE_GLIBC)
|
||||
endif()
|
||||
|
||||
add_definitions("-DRAPIDJSON_PARSE_DEFAULT_FLAGS=kParseTrailingCommasFlag")
|
||||
|
||||
if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES})
|
||||
|
||||
if (STATIC_BINARY OR STATIC_LIBS)
|
||||
@@ -412,7 +418,7 @@ if (STATIC_BINARY OR STATIC_LIBS)
|
||||
if (WIN32)
|
||||
set(STATIC_LIBS ${STATIC_LIBS} ws2_32 iphlpapi userenv psapi dnsapi dbghelp)
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) OR (CMAKE_CXX_COMPILER_ID MATCHES Clang))
|
||||
set(STATIC_LIBS ${STATIC_LIBS} bcrypt)
|
||||
set(STATIC_LIBS ${STATIC_LIBS} bcrypt pthread)
|
||||
endif()
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||
set(STATIC_LIBS ${STATIC_LIBS} pthread)
|
||||
@@ -435,6 +441,10 @@ if (STATIC_BINARY OR STATIC_LIBS)
|
||||
set(STATIC_LIBS ${STATIC_LIBS} ssl crypto)
|
||||
endif()
|
||||
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9))
|
||||
set(STATIC_LIBS ${STATIC_LIBS} stdc++fs)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME}
|
||||
"${CMAKE_SOURCE_DIR}/external/src/libzmq/build/lib/libzmq.a"
|
||||
"${CMAKE_SOURCE_DIR}/external/src/libuv/build/libuv.a"
|
||||
@@ -448,6 +458,10 @@ else()
|
||||
set(LIBS ${LIBS} ssl crypto)
|
||||
endif()
|
||||
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9))
|
||||
set(LIBS ${LIBS} stdc++fs)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME} debug ${ZMQ_LIBRARY_DEBUG} debug ${UV_LIBRARY_DEBUG} debug ${CURL_LIBRARY_DEBUG} optimized ${ZMQ_LIBRARY} optimized ${UV_LIBRARY} optimized ${CURL_LIBRARY} ${LIBS})
|
||||
endif()
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ These are 3rd-party pages. If they are down, it doesn't mean there is a problem
|
||||
- [GNU/Linux](#gnulinux)
|
||||
- [Windows](#windows)
|
||||
- [Build instructions](#build-instructions)
|
||||
- [Reproducible builds](#reproducible-builds)
|
||||
- [Donations](#donations)
|
||||
|
||||
## Pool mining vs Solo mining vs P2Pool mining
|
||||
@@ -75,20 +76,19 @@ First you need to find a pool share. This share will stay in [PPLNS](https://en.
|
||||
## Monero version support
|
||||
|
||||
- The latest Monero network upgrade happened on August 13th, 2022 (block 2,688,888).
|
||||
- The latest P2Pool network upgrade happened on March 18th, 2023 at 21:00 UTC.
|
||||
- Next P2Pool network upgrade will happen on October 12th, 2024 at 20:00 UTC.
|
||||
- The latest P2Pool network upgrade happened on October 12th, 2024 at 20:00 UTC.
|
||||
|
||||
In order to continue mining on P2Pool, you must update both Monero and P2Pool software to the latest available versions as soon as they are released.
|
||||
|
||||
|Monero protocol version|Required Monero software version|Required P2Pool version
|
||||
|-|-|-|
|
||||
|v15, v16 (active after August 13th, 2022)|v0.18.0.0 or newer, v0.18.3.4 is recommended|v4.0 or newer
|
||||
|v15, v16 (active after August 13th, 2022)|v0.18.0.0 or newer, v0.18.4.1 is recommended|v4.0 or newer
|
||||
|
||||
## How to mine on P2Pool
|
||||
|
||||
### General Considerations
|
||||
|
||||
- In order to mine on P2Pool, a synced Monero node using monerod v0.18.0.0 or newer is required. If you don't currently have one, you can download the official Monero binaries, start `monerod` on your PC and wait until it's fully synced. Advanced Monero node setup instructions are [here](https://sethforprivacy.com/guides/run-a-monero-node-advanced/).
|
||||
- In order to mine on P2Pool, a synced Monero node using monerod v0.18.0.0 or newer is required. If you don't currently have one, you can download the [official Monero binaries](https://www.getmonero.org/downloads/), start `monerod` on your PC and wait until it's fully synced. Advanced Monero node setup instructions are [here](https://sethforprivacy.com/guides/run-a-monero-node-advanced/).
|
||||
- It is highly recommended that you create a separate restricted user account (in your OS) for mining. While P2Pool has been battle-tested for a long time now, any software may have unknown bugs/vulnerabilities.
|
||||
- You have to use a primary wallet address (the one starting with `4`) for mining. Subaddresses and integrated addresses are not supported, just like with monerod solo mining.
|
||||
- You can add the `--mini` parameter to your P2Pool command to connect to the **p2pool-mini** sidechain. Note that it will also change the default p2p port from 37889 to 37888.
|
||||
@@ -113,16 +113,16 @@ In order to continue mining on P2Pool, you must update both Monero and P2Pool so
|
||||
|
||||
Merge mining is available in P2Pool since the fork that happened on October 12th, 2024. Version 4.0 or newer is required to use it.
|
||||
|
||||
- Blockchains that will support [Merge mining RPC API](https://github.com/SChernykh/p2pool/blob/master/docs/MERGE_MINING.MD#proposed-rpc-api)
|
||||
- [Townforge](https://townforge.net/) supports it in their [tmp-mm branch](https://git.townforge.net/townforge/townforge/src/branch/tmp-mm) (not released yet)
|
||||
- [DarkFi](https://dark.fi/) is going to support it, but it's [not ready yet](https://github.com/darkrenaissance/darkfi/issues/244)
|
||||
```
|
||||
p2pool.exe --wallet YOUR_MONERO_WALLET_ADDRESS --merge-mine IP:port YOUR_WALLET_ADDRESS_ON_ANOTHER_BLOCKCHAIN
|
||||
```
|
||||
Blockchains that will support [Merge mining RPC API](https://github.com/SChernykh/p2pool/blob/master/docs/MERGE_MINING.MD#proposed-rpc-api):
|
||||
- [Townforge](https://townforge.net/) supports it in their [tmp-mm branch](https://git.townforge.net/townforge/townforge/src/branch/tmp-mm) (not released yet)
|
||||
- [DarkFi](https://dark.fi/) is going to support it, but it's [not ready yet](https://github.com/darkrenaissance/darkfi/issues/244)
|
||||
```
|
||||
p2pool.exe --wallet YOUR_MONERO_WALLET_ADDRESS --merge-mine IP:port YOUR_WALLET_ADDRESS_ON_ANOTHER_BLOCKCHAIN
|
||||
```
|
||||
|
||||
### Tari merge mining
|
||||
Blockchains that support merge mining already: [Tari](https://www.tari.com/)
|
||||
|
||||
[Tari](https://www.tari.com/) uses their own gRPC API and requires a different command line:
|
||||
Tari uses their own gRPC API and requires a different command line:
|
||||
```
|
||||
./p2pool --wallet YOUR_MONERO_WALLET_ADDRESS --merge-mine tari://TARI_NODE_IP:18102 TARI_WALLET_ADDRESS
|
||||
```
|
||||
@@ -136,7 +136,7 @@ Merge mining is available on Tari's mainnet:
|
||||
- Download [Tari suite](https://github.com/tari-project/tari/releases/latest) for your OS
|
||||
- Run Minotari node and wait until in synchronizes
|
||||
- Run Minotari console wallet to create a Tari wallet
|
||||
- Copy the interactive wallet address from the "Receive" tab of the wallet
|
||||
- Copy the "Tari Address one-sided" from the "Receive" tab of the wallet
|
||||
- Paste it into the P2Pool command line above
|
||||
- Everything is ready now to start merge mining Monero and Tari!
|
||||
|
||||
@@ -358,6 +358,29 @@ cmake ..
|
||||
make -j$(nproc)
|
||||
```
|
||||
|
||||
## Reproducible builds
|
||||
|
||||
Starting from v4.9, P2Pool uses [reproducible builds](https://en.wikipedia.org/wiki/Reproducible_builds) to create the release binaries. This allows verification that no vulnerabilities or backdoors have been introduced during the compilation process, and that the compiled binaries correspond to the source code.
|
||||
|
||||
It removes the need for trust that the author or maintainer of the code is not malicious/compromised, and that the build server is not compromised.
|
||||
|
||||
Anyone can run the same build script on the same source code, and get the same release binaries in the end, confirming their authenticity.
|
||||
|
||||
Prerequisites: Ubuntu with Docker and Git installed.
|
||||
|
||||
Example of building v4.9 release binaries:
|
||||
|
||||
```
|
||||
git clone --branch v4.9 --recursive https://github.com/SChernykh/p2pool
|
||||
p2pool/scripts/release/build_all.sh v4.9
|
||||
```
|
||||
The binaries will be created in `p2pool/scripts/release` folder. First time you run it, it will take up to several hours to first build the Docker image with all the necessary tools in it. Wait until all builds are finished and then run
|
||||
```
|
||||
cd p2pool/scripts/release
|
||||
./gen_sums.sh
|
||||
```
|
||||
to generate the hash sums and compare them with the official release's hash sums.
|
||||
|
||||
## Donations
|
||||
|
||||
If you'd like to support further development of Monero P2Pool, you're welcome to send any amount of XMR to the following address:
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)
|
||||
set(CMAKE_STRIP /usr/bin/aarch64-linux-gnu-strip)
|
||||
@@ -0,0 +1,9 @@
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(CMAKE_C_COMPILER clang)
|
||||
set(CMAKE_CXX_COMPILER clang++)
|
||||
set(CMAKE_ASM_COMPILER aarch64-linux-gnu-as)
|
||||
set(CMAKE_STRIP aarch64-linux-gnu-strip)
|
||||
+8
-4
@@ -17,14 +17,14 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
set(GENERAL_FLAGS "${GENERAL_FLAGS} -fno-omit-frame-pointer -fsanitize=address")
|
||||
endif()
|
||||
|
||||
set(WARNING_FLAGS "-Wall -Wextra -Wcast-qual -Wlogical-op -Wundef -Wformat=2 -Wpointer-arith -Werror -Wno-error=inline -Wno-error=unused-function")
|
||||
set(WARNING_FLAGS "-Wall -Wextra -Wcast-qual -Wlogical-op -Wundef -Wformat=2 -Wpointer-arith -Werror -Wno-error=inline -Wno-error=unused-function -Wno-error=strict-overflow")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.5.0)
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wstrict-overflow=2")
|
||||
endif()
|
||||
|
||||
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15))
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-error=cpp")
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-cpp")
|
||||
endif()
|
||||
|
||||
if (DISABLE_WARNINGS)
|
||||
@@ -113,10 +113,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
set(GENERAL_FLAGS "${GENERAL_FLAGS} -mfix-cortex-a53-835769")
|
||||
endif()
|
||||
|
||||
set(WARNING_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-undefined-internal -Wunreachable-code-aggressive -Wmissing-prototypes -Wmissing-variable-declarations -Werror")
|
||||
set(WARNING_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-undefined-internal -Wno-unknown-warning-option -Wno-nan-infinity-disabled -Wunreachable-code-aggressive -Wmissing-prototypes -Wmissing-variable-declarations -Werror")
|
||||
|
||||
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20))
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-error=cpp")
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-cpp")
|
||||
endif()
|
||||
|
||||
if (DISABLE_WARNINGS)
|
||||
@@ -150,4 +150,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "")
|
||||
|
||||
if (STATIC_BINARY)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME FreeBSD)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(CMAKE_C_COMPILER clang)
|
||||
set(CMAKE_CXX_COMPILER clang++)
|
||||
@@ -0,0 +1,7 @@
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME FreeBSD)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(CMAKE_C_COMPILER clang)
|
||||
set(CMAKE_CXX_COMPILER clang++)
|
||||
@@ -0,0 +1,9 @@
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/local/bin/aarch64-apple-darwin24.5-clang)
|
||||
set(CMAKE_CXX_COMPILER /usr/local/bin/aarch64-apple-darwin24.5-clang++)
|
||||
set(CMAKE_ASM_COMPILER /usr/local/bin/aarch64-apple-darwin24.5-as)
|
||||
set(CMAKE_STRIP /usr/local/bin/aarch64-apple-darwin24.5-strip)
|
||||
@@ -0,0 +1,9 @@
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/local/bin/x86_64-apple-darwin24.5-clang)
|
||||
set(CMAKE_CXX_COMPILER /usr/local/bin/x86_64-apple-darwin24.5-clang++)
|
||||
set(CMAKE_ASM_COMPILER /usr/local/bin/x86_64-apple-darwin24.5-as)
|
||||
set(CMAKE_STRIP /usr/local/bin/x86_64-apple-darwin24.5-strip)
|
||||
@@ -0,0 +1,8 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR riscv64)
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/bin/riscv64-linux-gnu-gcc)
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/riscv64-linux-gnu-g++)
|
||||
set(CMAKE_STRIP /usr/bin/riscv64-linux-gnu-strip)
|
||||
@@ -0,0 +1,9 @@
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR riscv64)
|
||||
|
||||
set(CMAKE_C_COMPILER clang)
|
||||
set(CMAKE_CXX_COMPILER clang++)
|
||||
set(CMAKE_ASM_COMPILER riscv64-linux-gnu-as)
|
||||
set(CMAKE_STRIP riscv64-linux-gnu-strip)
|
||||
@@ -0,0 +1,8 @@
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_VERSION 6.0)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(CMAKE_C_COMPILER clang)
|
||||
set(CMAKE_CXX_COMPILER clang++)
|
||||
@@ -0,0 +1,93 @@
|
||||
## Setting up P2Pool as a service controlled by a RC script (FreeBSD, and possibly other)
|
||||
|
||||
In order to use this RC script, it is required to create a `p2pool` user account on the system for this service. An example **passwd(5)** line for this user would be:
|
||||
```
|
||||
p2pool:*:818:818::0:0:Monero P2Pool:/var/db/p2pool:/usr/sbin/nologin
|
||||
```
|
||||
Also an example **group(5)** line:
|
||||
```
|
||||
p2pool:*:818:
|
||||
```
|
||||
|
||||
When creating such an user and a group, make sure the UID and GID aren't being used by any other user/group in the system. The home directory of the user will be used as the data directory of P2Pool; set it to your desired location as needed.
|
||||
|
||||
The RC script assumes the P2Pool executable is installed as `/usr/local/bin/p2pool`.
|
||||
|
||||
### /usr/local/etc/rc.d/p2pool
|
||||
```sh
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: p2pool
|
||||
# REQUIRE: LOGIN FILESYSTEMS
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=p2pool
|
||||
rcvar=p2pool_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${p2pool_enable:="NO"} ${p2pool_local_api:="NO"}
|
||||
|
||||
[ -z "$p2pool_wallet" ] && exit 1
|
||||
p2pool_user=p2pool
|
||||
p2pool_home="`getent passwd ${p2pool_user} | cut -d : -f 6`"
|
||||
[ -z "$p2pool_home" ] && exit 1
|
||||
p2pool_env="HOME=$p2pool_home"
|
||||
p2pool_chdir="$p2pool_home"
|
||||
procname=/usr/local/bin/p2pool
|
||||
pidfile="$p2pool_home/p2pool.pid"
|
||||
command=/usr/sbin/daemon
|
||||
flags="-p ${pidfile} -f -- ${procname} ${p2pool_flags} --data-dir ${p2pool_home} --wallet ${p2pool_wallet}"
|
||||
[ -n "${p2pool_api_path}" ] && flags="${flags} --data-api ${p2pool_api_path}"
|
||||
if checkyesno p2pool_local_api; then
|
||||
if [ -n "${p2pool_api_path}" ]; then
|
||||
flags="${flags} --local-api"
|
||||
else
|
||||
echo 'Warning: p2pool_local_api="YES" requires p2pool_api_path being set, ignoring' 1>&2
|
||||
fi
|
||||
fi
|
||||
start_precmd="p2pool_prestart"
|
||||
stop_postcmd="rm -f ${pidfile}"
|
||||
|
||||
p2pool_prestart() {
|
||||
if [ -n "${p2pool_api_path}" ]; then
|
||||
[ -d "${p2pool_api_path}" ] || mkdir -p "${p2pool_api_path}"
|
||||
gid="`getent passwd ${p2pool_user} | cut -d : -f 4`"
|
||||
chown ${p2pool_user}:${gid} "${p2pool_api_path}"
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
```
|
||||
|
||||
### Configuration variables in /etc/rc.conf (or /etc/rc.conf.local)
|
||||
|
||||
* `p2pool_enable` Set to `YES` to enable this service; required.
|
||||
* `p2pool_wallet` Your wallet address; required.
|
||||
* `p2pool_api_path` Path to API directory (See p2pool option `--data-api`), this directory will be created automatically if not already exists, on service startup; optional.
|
||||
* `p2pool_local_api` Set to `YES` to enable creation of `local` path in API directory (See p2pool option `--local-api`), requires `p2pool_api_path` also being set; optional.
|
||||
* `p2pool_flags` Additional options you want to pass to p2pool; optional.
|
||||
|
||||
#### Example
|
||||
```sh
|
||||
p2pool_enable="YES"
|
||||
p2pool_wallet="44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg"
|
||||
p2pool_api_path="/tmp/p2pool-api"
|
||||
p2pool_local_api="YES"
|
||||
p2pool_flags="--host 127.0.0.1 --in-peers 200"
|
||||
```
|
||||
|
||||
## /usr/local/etc/newsyslog.conf.d/p2pool.conf (optional)
|
||||
|
||||
You can create this drop-in **newsyslog(8)** configuration file to periodically rotate the P2Pool log file. The drop-in location `/usr/local/etc/newsyslog.conf.d/` assumes that `/etc/newsyslog.conf` contains an `include` directive for searching drop-in configuration files in it.
|
||||
|
||||
This example assumes `/var/db/p2pool` as your P2Pool data directory.
|
||||
|
||||
```
|
||||
# log file owner:group mode count size (KiB) when flags pid file signal
|
||||
/var/db/p2pool/p2pool.log p2pool:p2pool 640 16 65536 @0101T BEJ /var/db/p2pool/p2pool.pid SIGUSR1
|
||||
```
|
||||
|
||||
You should adjust the `count`, `size`, `when` and/or `flags` fields to fit your needs.
|
||||
@@ -8,6 +8,7 @@
|
||||
--stratum Comma-separated list of IP:port for stratum server to listen on
|
||||
--p2p Comma-separated list of IP:port for p2p server to listen on
|
||||
--addpeers Comma-separated list of IP:port of other p2pool nodes to connect to
|
||||
--stratum-ban-time N Number of seconds to ban misbehaving stratum client, default is 600
|
||||
--light-mode Don't allocate RandomX dataset, saves 2GB of RAM
|
||||
--loglevel Verbosity of the log, integer number between 0 and 6
|
||||
--data-dir Path to store general p2pool files (log, cache, peer data, etc.), default is current directory
|
||||
@@ -22,6 +23,7 @@
|
||||
--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 450)
|
||||
--start-mining N Start built-in miner using N threads (any value between 1 and 64)
|
||||
--mini Connect to p2pool-mini sidechain. Note that it will also change default p2p port from 37889 to 37888
|
||||
--nano Connect to p2pool-nano sidechain. Note that it will also change default p2p port from 37889 to 37890
|
||||
--no-autodiff Disable automatic difficulty adjustment for miners connected to stratum (WARNING: incompatible with Nicehash and MRR)
|
||||
--rpc-login Specify username[:password] required for Monero RPC server
|
||||
--socks5 Specify IP:port of a SOCKS5 proxy to use for outgoing connections
|
||||
|
||||
@@ -18,3 +18,30 @@ start_mining **T**|start mining (**T** is the number of threads to use, must be
|
||||
stop_mining|stop mining
|
||||
exit|terminate p2pool
|
||||
version|show p2pool version
|
||||
|
||||
### Non-interactive console access
|
||||
|
||||
It's possible to send console commands via a local TCP connection. For this, you need to enable the API: `--data-api api --local-api`.
|
||||
|
||||
A sample Python script that sends console commands to P2Pool via TCP:
|
||||
|
||||
```
|
||||
import sys
|
||||
import socket
|
||||
import json
|
||||
|
||||
with open('api/local/console', 'r') as file:
|
||||
data = json.load(file)
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect(('127.0.0.1', data['tcp_port']))
|
||||
|
||||
command = data['cookie'];
|
||||
command += sys.argv[1];
|
||||
command += '\n';
|
||||
|
||||
s.sendall(command.encode('utf-8'))
|
||||
s.close()
|
||||
```
|
||||
|
||||
Run it in P2Pool's directory: `python3 ./p2pool_cmd.py status`
|
||||
|
||||
Vendored
+1
-1
Submodule external/src/RandomX updated: e613bfe364...d341d6a61c
+786
-318
File diff suppressed because it is too large
Load Diff
+640
-70
@@ -172,6 +172,9 @@ extern ListAssetRegistrationsResponseDefaultTypeInternal _ListAssetRegistrations
|
||||
class ListHeadersRequest;
|
||||
struct ListHeadersRequestDefaultTypeInternal;
|
||||
extern ListHeadersRequestDefaultTypeInternal _ListHeadersRequest_default_instance_;
|
||||
class LivenessResult;
|
||||
struct LivenessResultDefaultTypeInternal;
|
||||
extern LivenessResultDefaultTypeInternal _LivenessResult_default_instance_;
|
||||
class MempoolStatsResponse;
|
||||
struct MempoolStatsResponseDefaultTypeInternal;
|
||||
extern MempoolStatsResponseDefaultTypeInternal _MempoolStatsResponse_default_instance_;
|
||||
@@ -583,20 +586,31 @@ class ValueAtHeightResponse final : public ::google::protobuf::Message
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
enum : int {
|
||||
kValueFieldNumber = 1,
|
||||
kHeightFieldNumber = 2,
|
||||
kCirculatingSupplyFieldNumber = 1,
|
||||
kSpendableSupplyFieldNumber = 2,
|
||||
kHeightFieldNumber = 3,
|
||||
};
|
||||
// uint64 value = 1;
|
||||
void clear_value() ;
|
||||
::uint64_t value() const;
|
||||
void set_value(::uint64_t value);
|
||||
// uint64 circulating_supply = 1;
|
||||
void clear_circulating_supply() ;
|
||||
::uint64_t circulating_supply() const;
|
||||
void set_circulating_supply(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_value() const;
|
||||
void _internal_set_value(::uint64_t value);
|
||||
::uint64_t _internal_circulating_supply() const;
|
||||
void _internal_set_circulating_supply(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 height = 2;
|
||||
// uint64 spendable_supply = 2;
|
||||
void clear_spendable_supply() ;
|
||||
::uint64_t spendable_supply() const;
|
||||
void set_spendable_supply(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_spendable_supply() const;
|
||||
void _internal_set_spendable_supply(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 height = 3;
|
||||
void clear_height() ;
|
||||
::uint64_t height() const;
|
||||
void set_height(::uint64_t value);
|
||||
@@ -611,7 +625,7 @@ class ValueAtHeightResponse final : public ::google::protobuf::Message
|
||||
class _Internal;
|
||||
friend class ::google::protobuf::internal::TcParser;
|
||||
static const ::google::protobuf::internal::TcParseTable<
|
||||
1, 2, 0,
|
||||
2, 3, 0,
|
||||
0, 2>
|
||||
_table_;
|
||||
friend class ::google::protobuf::MessageLite;
|
||||
@@ -627,7 +641,8 @@ class ValueAtHeightResponse final : public ::google::protobuf::Message
|
||||
::google::protobuf::Arena* arena);
|
||||
inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
|
||||
::google::protobuf::Arena* arena, const Impl_& from);
|
||||
::uint64_t value_;
|
||||
::uint64_t circulating_supply_;
|
||||
::uint64_t spendable_supply_;
|
||||
::uint64_t height_;
|
||||
mutable ::google::protobuf::internal::CachedSize _cached_size_;
|
||||
PROTOBUF_TSAN_DECLARE_MEMBER
|
||||
@@ -2291,8 +2306,9 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message
|
||||
kTimestampFieldNumber = 4,
|
||||
kPowAlgoFieldNumber = 5,
|
||||
kSha3XEstimatedHashRateFieldNumber = 6,
|
||||
kRandomxEstimatedHashRateFieldNumber = 7,
|
||||
kMoneroRandomxEstimatedHashRateFieldNumber = 7,
|
||||
kNumCoinbasesFieldNumber = 8,
|
||||
kTariRandomxEstimatedHashRateFieldNumber = 10,
|
||||
};
|
||||
// repeated bytes coinbase_extras = 9;
|
||||
int coinbase_extras_size() const;
|
||||
@@ -2382,14 +2398,14 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message
|
||||
void _internal_set_sha3x_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 randomx_estimated_hash_rate = 7;
|
||||
void clear_randomx_estimated_hash_rate() ;
|
||||
::uint64_t randomx_estimated_hash_rate() const;
|
||||
void set_randomx_estimated_hash_rate(::uint64_t value);
|
||||
// uint64 monero_randomx_estimated_hash_rate = 7;
|
||||
void clear_monero_randomx_estimated_hash_rate() ;
|
||||
::uint64_t monero_randomx_estimated_hash_rate() const;
|
||||
void set_monero_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_randomx_estimated_hash_rate() const;
|
||||
void _internal_set_randomx_estimated_hash_rate(::uint64_t value);
|
||||
::uint64_t _internal_monero_randomx_estimated_hash_rate() const;
|
||||
void _internal_set_monero_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 num_coinbases = 8;
|
||||
@@ -2401,13 +2417,23 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message
|
||||
::uint64_t _internal_num_coinbases() const;
|
||||
void _internal_set_num_coinbases(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 tari_randomx_estimated_hash_rate = 10;
|
||||
void clear_tari_randomx_estimated_hash_rate() ;
|
||||
::uint64_t tari_randomx_estimated_hash_rate() const;
|
||||
void set_tari_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_tari_randomx_estimated_hash_rate() const;
|
||||
void _internal_set_tari_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
public:
|
||||
// @@protoc_insertion_point(class_scope:tari.rpc.NetworkDifficultyResponse)
|
||||
private:
|
||||
class _Internal;
|
||||
friend class ::google::protobuf::internal::TcParser;
|
||||
static const ::google::protobuf::internal::TcParseTable<
|
||||
4, 9, 0,
|
||||
4, 10, 0,
|
||||
0, 2>
|
||||
_table_;
|
||||
friend class ::google::protobuf::MessageLite;
|
||||
@@ -2430,8 +2456,9 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message
|
||||
::uint64_t timestamp_;
|
||||
::uint64_t pow_algo_;
|
||||
::uint64_t sha3x_estimated_hash_rate_;
|
||||
::uint64_t randomx_estimated_hash_rate_;
|
||||
::uint64_t monero_randomx_estimated_hash_rate_;
|
||||
::uint64_t num_coinbases_;
|
||||
::uint64_t tari_randomx_estimated_hash_rate_;
|
||||
mutable ::google::protobuf::internal::CachedSize _cached_size_;
|
||||
PROTOBUF_TSAN_DECLARE_MEMBER
|
||||
};
|
||||
@@ -2858,6 +2885,203 @@ class MempoolStatsResponse final : public ::google::protobuf::Message
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class LivenessResult final : public ::google::protobuf::Message
|
||||
/* @@protoc_insertion_point(class_definition:tari.rpc.LivenessResult) */ {
|
||||
public:
|
||||
inline LivenessResult() : LivenessResult(nullptr) {}
|
||||
~LivenessResult() override;
|
||||
template <typename = void>
|
||||
explicit PROTOBUF_CONSTEXPR LivenessResult(
|
||||
::google::protobuf::internal::ConstantInitialized);
|
||||
|
||||
inline LivenessResult(const LivenessResult& from) : LivenessResult(nullptr, from) {}
|
||||
inline LivenessResult(LivenessResult&& from) noexcept
|
||||
: LivenessResult(nullptr, std::move(from)) {}
|
||||
inline LivenessResult& operator=(const LivenessResult& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
inline LivenessResult& operator=(LivenessResult&& from) noexcept {
|
||||
if (this == &from) return *this;
|
||||
if (GetArena() == from.GetArena()
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
&& GetArena() != nullptr
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||
) {
|
||||
InternalSwap(&from);
|
||||
} else {
|
||||
CopyFrom(from);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
|
||||
}
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields()
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor() {
|
||||
return GetDescriptor();
|
||||
}
|
||||
static const ::google::protobuf::Descriptor* GetDescriptor() {
|
||||
return default_instance().GetMetadata().descriptor;
|
||||
}
|
||||
static const ::google::protobuf::Reflection* GetReflection() {
|
||||
return default_instance().GetMetadata().reflection;
|
||||
}
|
||||
static const LivenessResult& default_instance() {
|
||||
return *internal_default_instance();
|
||||
}
|
||||
static inline const LivenessResult* internal_default_instance() {
|
||||
return reinterpret_cast<const LivenessResult*>(
|
||||
&_LivenessResult_default_instance_);
|
||||
}
|
||||
static constexpr int kIndexInFileMessages = 57;
|
||||
friend void swap(LivenessResult& a, LivenessResult& b) { a.Swap(&b); }
|
||||
inline void Swap(LivenessResult* other) {
|
||||
if (other == this) return;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
if (GetArena() != nullptr && GetArena() == other->GetArena()) {
|
||||
#else // PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
if (GetArena() == other->GetArena()) {
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
|
||||
InternalSwap(other);
|
||||
} else {
|
||||
::google::protobuf::internal::GenericSwap(this, other);
|
||||
}
|
||||
}
|
||||
void UnsafeArenaSwap(LivenessResult* other) {
|
||||
if (other == this) return;
|
||||
ABSL_DCHECK(GetArena() == other->GetArena());
|
||||
InternalSwap(other);
|
||||
}
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
LivenessResult* New(::google::protobuf::Arena* arena = nullptr) const final {
|
||||
return ::google::protobuf::Message::DefaultConstruct<LivenessResult>(arena);
|
||||
}
|
||||
using ::google::protobuf::Message::CopyFrom;
|
||||
void CopyFrom(const LivenessResult& from);
|
||||
using ::google::protobuf::Message::MergeFrom;
|
||||
void MergeFrom(const LivenessResult& from) { LivenessResult::MergeImpl(*this, from); }
|
||||
|
||||
private:
|
||||
static void MergeImpl(
|
||||
::google::protobuf::MessageLite& to_msg,
|
||||
const ::google::protobuf::MessageLite& from_msg);
|
||||
|
||||
public:
|
||||
ABSL_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||
bool IsInitialized() const final;
|
||||
|
||||
::size_t ByteSizeLong() const final;
|
||||
const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final;
|
||||
::uint8_t* _InternalSerialize(
|
||||
::uint8_t* target,
|
||||
::google::protobuf::io::EpsCopyOutputStream* stream) const final;
|
||||
int GetCachedSize() const { return _impl_._cached_size_.Get(); }
|
||||
|
||||
private:
|
||||
void SharedCtor(::google::protobuf::Arena* arena);
|
||||
void SharedDtor();
|
||||
void InternalSwap(LivenessResult* other);
|
||||
private:
|
||||
friend class ::google::protobuf::internal::AnyMetadata;
|
||||
static ::absl::string_view FullMessageName() { return "tari.rpc.LivenessResult"; }
|
||||
|
||||
protected:
|
||||
explicit LivenessResult(::google::protobuf::Arena* arena);
|
||||
LivenessResult(::google::protobuf::Arena* arena, const LivenessResult& from);
|
||||
LivenessResult(::google::protobuf::Arena* arena, LivenessResult&& from) noexcept
|
||||
: LivenessResult(arena) {
|
||||
*this = ::std::move(from);
|
||||
}
|
||||
const ::google::protobuf::MessageLite::ClassData* GetClassData()
|
||||
const final;
|
||||
|
||||
public:
|
||||
::google::protobuf::Metadata GetMetadata() const final;
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
enum : int {
|
||||
kPeerNodeIdFieldNumber = 1,
|
||||
kDiscoverLatencyFieldNumber = 2,
|
||||
kPingLatencyFieldNumber = 3,
|
||||
};
|
||||
// bytes peer_node_id = 1;
|
||||
void clear_peer_node_id() ;
|
||||
const std::string& peer_node_id() const;
|
||||
template <typename Arg_ = const std::string&, typename... Args_>
|
||||
void set_peer_node_id(Arg_&& arg, Args_... args);
|
||||
std::string* mutable_peer_node_id();
|
||||
PROTOBUF_NODISCARD std::string* release_peer_node_id();
|
||||
void set_allocated_peer_node_id(std::string* value);
|
||||
|
||||
private:
|
||||
const std::string& _internal_peer_node_id() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_peer_node_id(
|
||||
const std::string& value);
|
||||
std::string* _internal_mutable_peer_node_id();
|
||||
|
||||
public:
|
||||
// uint64 discover_latency = 2;
|
||||
void clear_discover_latency() ;
|
||||
::uint64_t discover_latency() const;
|
||||
void set_discover_latency(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_discover_latency() const;
|
||||
void _internal_set_discover_latency(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 ping_latency = 3;
|
||||
void clear_ping_latency() ;
|
||||
::uint64_t ping_latency() const;
|
||||
void set_ping_latency(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_ping_latency() const;
|
||||
void _internal_set_ping_latency(::uint64_t value);
|
||||
|
||||
public:
|
||||
// @@protoc_insertion_point(class_scope:tari.rpc.LivenessResult)
|
||||
private:
|
||||
class _Internal;
|
||||
friend class ::google::protobuf::internal::TcParser;
|
||||
static const ::google::protobuf::internal::TcParseTable<
|
||||
2, 3, 0,
|
||||
0, 2>
|
||||
_table_;
|
||||
friend class ::google::protobuf::MessageLite;
|
||||
friend class ::google::protobuf::Arena;
|
||||
template <typename T>
|
||||
friend class ::google::protobuf::Arena::InternalHelper;
|
||||
using InternalArenaConstructable_ = void;
|
||||
using DestructorSkippable_ = void;
|
||||
struct Impl_ {
|
||||
inline explicit constexpr Impl_(
|
||||
::google::protobuf::internal::ConstantInitialized) noexcept;
|
||||
inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
|
||||
::google::protobuf::Arena* arena);
|
||||
inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
|
||||
::google::protobuf::Arena* arena, const Impl_& from);
|
||||
::google::protobuf::internal::ArenaStringPtr peer_node_id_;
|
||||
::uint64_t discover_latency_;
|
||||
::uint64_t ping_latency_;
|
||||
mutable ::google::protobuf::internal::CachedSize _cached_size_;
|
||||
PROTOBUF_TSAN_DECLARE_MEMBER
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_base_5fnode_2eproto;
|
||||
};
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class ListHeadersRequest final : public ::google::protobuf::Message
|
||||
/* @@protoc_insertion_point(class_definition:tari.rpc.ListHeadersRequest) */ {
|
||||
public:
|
||||
@@ -8495,14 +8719,34 @@ class GetNetworkStateResponse final : public ::google::protobuf::Message
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
enum : int {
|
||||
kLivenessResultsFieldNumber = 9,
|
||||
kMetadataFieldNumber = 1,
|
||||
kBaseNodeStateFieldNumber = 3,
|
||||
kInitialSyncAchievedFieldNumber = 2,
|
||||
kFailedCheckpointsFieldNumber = 4,
|
||||
kRewardFieldNumber = 5,
|
||||
kSha3XEstimatedHashRateFieldNumber = 6,
|
||||
kRandomxEstimatedHashRateFieldNumber = 7,
|
||||
kMoneroRandomxEstimatedHashRateFieldNumber = 7,
|
||||
kNumConnectionsFieldNumber = 8,
|
||||
kTariRandomxEstimatedHashRateFieldNumber = 10,
|
||||
};
|
||||
// repeated .tari.rpc.LivenessResult liveness_results = 9;
|
||||
int liveness_results_size() const;
|
||||
private:
|
||||
int _internal_liveness_results_size() const;
|
||||
|
||||
public:
|
||||
void clear_liveness_results() ;
|
||||
::tari::rpc::LivenessResult* mutable_liveness_results(int index);
|
||||
::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>* mutable_liveness_results();
|
||||
|
||||
private:
|
||||
const ::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>& _internal_liveness_results() const;
|
||||
::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>* _internal_mutable_liveness_results();
|
||||
public:
|
||||
const ::tari::rpc::LivenessResult& liveness_results(int index) const;
|
||||
::tari::rpc::LivenessResult* add_liveness_results();
|
||||
const ::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>& liveness_results() const;
|
||||
// .tari.rpc.MetaData metadata = 1;
|
||||
bool has_metadata() const;
|
||||
void clear_metadata() ;
|
||||
@@ -8568,14 +8812,34 @@ class GetNetworkStateResponse final : public ::google::protobuf::Message
|
||||
void _internal_set_sha3x_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 randomx_estimated_hash_rate = 7;
|
||||
void clear_randomx_estimated_hash_rate() ;
|
||||
::uint64_t randomx_estimated_hash_rate() const;
|
||||
void set_randomx_estimated_hash_rate(::uint64_t value);
|
||||
// uint64 monero_randomx_estimated_hash_rate = 7;
|
||||
void clear_monero_randomx_estimated_hash_rate() ;
|
||||
::uint64_t monero_randomx_estimated_hash_rate() const;
|
||||
void set_monero_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_randomx_estimated_hash_rate() const;
|
||||
void _internal_set_randomx_estimated_hash_rate(::uint64_t value);
|
||||
::uint64_t _internal_monero_randomx_estimated_hash_rate() const;
|
||||
void _internal_set_monero_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 num_connections = 8;
|
||||
void clear_num_connections() ;
|
||||
::uint64_t num_connections() const;
|
||||
void set_num_connections(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_num_connections() const;
|
||||
void _internal_set_num_connections(::uint64_t value);
|
||||
|
||||
public:
|
||||
// uint64 tari_randomx_estimated_hash_rate = 10;
|
||||
void clear_tari_randomx_estimated_hash_rate() ;
|
||||
::uint64_t tari_randomx_estimated_hash_rate() const;
|
||||
void set_tari_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
private:
|
||||
::uint64_t _internal_tari_randomx_estimated_hash_rate() const;
|
||||
void _internal_set_tari_randomx_estimated_hash_rate(::uint64_t value);
|
||||
|
||||
public:
|
||||
// @@protoc_insertion_point(class_scope:tari.rpc.GetNetworkStateResponse)
|
||||
@@ -8583,7 +8847,7 @@ class GetNetworkStateResponse final : public ::google::protobuf::Message
|
||||
class _Internal;
|
||||
friend class ::google::protobuf::internal::TcParser;
|
||||
static const ::google::protobuf::internal::TcParseTable<
|
||||
3, 7, 1,
|
||||
4, 10, 2,
|
||||
0, 2>
|
||||
_table_;
|
||||
friend class ::google::protobuf::MessageLite;
|
||||
@@ -8601,13 +8865,16 @@ class GetNetworkStateResponse final : public ::google::protobuf::Message
|
||||
::google::protobuf::Arena* arena, const Impl_& from);
|
||||
::google::protobuf::internal::HasBits<1> _has_bits_;
|
||||
mutable ::google::protobuf::internal::CachedSize _cached_size_;
|
||||
::google::protobuf::RepeatedPtrField< ::tari::rpc::LivenessResult > liveness_results_;
|
||||
::tari::rpc::MetaData* metadata_;
|
||||
int base_node_state_;
|
||||
bool initial_sync_achieved_;
|
||||
bool failed_checkpoints_;
|
||||
::uint64_t reward_;
|
||||
::uint64_t sha3x_estimated_hash_rate_;
|
||||
::uint64_t randomx_estimated_hash_rate_;
|
||||
::uint64_t monero_randomx_estimated_hash_rate_;
|
||||
::uint64_t num_connections_;
|
||||
::uint64_t tari_randomx_estimated_hash_rate_;
|
||||
PROTOBUF_TSAN_DECLARE_MEMBER
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
@@ -11085,6 +11352,7 @@ class GetNewBlockResult final : public ::google::protobuf::Message
|
||||
kBlockHashFieldNumber = 1,
|
||||
kMergeMiningHashFieldNumber = 3,
|
||||
kTariUniqueIdFieldNumber = 4,
|
||||
kVmKeyFieldNumber = 6,
|
||||
kBlockFieldNumber = 2,
|
||||
kMinerDataFieldNumber = 5,
|
||||
};
|
||||
@@ -11135,6 +11403,22 @@ class GetNewBlockResult final : public ::google::protobuf::Message
|
||||
const std::string& value);
|
||||
std::string* _internal_mutable_tari_unique_id();
|
||||
|
||||
public:
|
||||
// bytes vm_key = 6;
|
||||
void clear_vm_key() ;
|
||||
const std::string& vm_key() const;
|
||||
template <typename Arg_ = const std::string&, typename... Args_>
|
||||
void set_vm_key(Arg_&& arg, Args_... args);
|
||||
std::string* mutable_vm_key();
|
||||
PROTOBUF_NODISCARD std::string* release_vm_key();
|
||||
void set_allocated_vm_key(std::string* value);
|
||||
|
||||
private:
|
||||
const std::string& _internal_vm_key() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_vm_key(
|
||||
const std::string& value);
|
||||
std::string* _internal_mutable_vm_key();
|
||||
|
||||
public:
|
||||
// .tari.rpc.Block block = 2;
|
||||
bool has_block() const;
|
||||
@@ -11171,7 +11455,7 @@ class GetNewBlockResult final : public ::google::protobuf::Message
|
||||
class _Internal;
|
||||
friend class ::google::protobuf::internal::TcParser;
|
||||
static const ::google::protobuf::internal::TcParseTable<
|
||||
3, 5, 2,
|
||||
3, 6, 2,
|
||||
0, 2>
|
||||
_table_;
|
||||
friend class ::google::protobuf::MessageLite;
|
||||
@@ -11192,6 +11476,7 @@ class GetNewBlockResult final : public ::google::protobuf::Message
|
||||
::google::protobuf::internal::ArenaStringPtr block_hash_;
|
||||
::google::protobuf::internal::ArenaStringPtr merge_mining_hash_;
|
||||
::google::protobuf::internal::ArenaStringPtr tari_unique_id_;
|
||||
::google::protobuf::internal::ArenaStringPtr vm_key_;
|
||||
::tari::rpc::Block* block_;
|
||||
::tari::rpc::MinerData* miner_data_;
|
||||
PROTOBUF_TSAN_DECLARE_MEMBER
|
||||
@@ -14188,26 +14473,48 @@ inline void NetworkDifficultyResponse::_internal_set_sha3x_estimated_hash_rate(:
|
||||
_impl_.sha3x_estimated_hash_rate_ = value;
|
||||
}
|
||||
|
||||
// uint64 randomx_estimated_hash_rate = 7;
|
||||
inline void NetworkDifficultyResponse::clear_randomx_estimated_hash_rate() {
|
||||
// uint64 monero_randomx_estimated_hash_rate = 7;
|
||||
inline void NetworkDifficultyResponse::clear_monero_randomx_estimated_hash_rate() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.randomx_estimated_hash_rate_ = ::uint64_t{0u};
|
||||
_impl_.monero_randomx_estimated_hash_rate_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t NetworkDifficultyResponse::randomx_estimated_hash_rate() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.NetworkDifficultyResponse.randomx_estimated_hash_rate)
|
||||
return _internal_randomx_estimated_hash_rate();
|
||||
inline ::uint64_t NetworkDifficultyResponse::monero_randomx_estimated_hash_rate() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.NetworkDifficultyResponse.monero_randomx_estimated_hash_rate)
|
||||
return _internal_monero_randomx_estimated_hash_rate();
|
||||
}
|
||||
inline void NetworkDifficultyResponse::set_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
_internal_set_randomx_estimated_hash_rate(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.NetworkDifficultyResponse.randomx_estimated_hash_rate)
|
||||
inline void NetworkDifficultyResponse::set_monero_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
_internal_set_monero_randomx_estimated_hash_rate(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.NetworkDifficultyResponse.monero_randomx_estimated_hash_rate)
|
||||
}
|
||||
inline ::uint64_t NetworkDifficultyResponse::_internal_randomx_estimated_hash_rate() const {
|
||||
inline ::uint64_t NetworkDifficultyResponse::_internal_monero_randomx_estimated_hash_rate() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.randomx_estimated_hash_rate_;
|
||||
return _impl_.monero_randomx_estimated_hash_rate_;
|
||||
}
|
||||
inline void NetworkDifficultyResponse::_internal_set_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
inline void NetworkDifficultyResponse::_internal_set_monero_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.randomx_estimated_hash_rate_ = value;
|
||||
_impl_.monero_randomx_estimated_hash_rate_ = value;
|
||||
}
|
||||
|
||||
// uint64 tari_randomx_estimated_hash_rate = 10;
|
||||
inline void NetworkDifficultyResponse::clear_tari_randomx_estimated_hash_rate() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.tari_randomx_estimated_hash_rate_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t NetworkDifficultyResponse::tari_randomx_estimated_hash_rate() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.NetworkDifficultyResponse.tari_randomx_estimated_hash_rate)
|
||||
return _internal_tari_randomx_estimated_hash_rate();
|
||||
}
|
||||
inline void NetworkDifficultyResponse::set_tari_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
_internal_set_tari_randomx_estimated_hash_rate(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.NetworkDifficultyResponse.tari_randomx_estimated_hash_rate)
|
||||
}
|
||||
inline ::uint64_t NetworkDifficultyResponse::_internal_tari_randomx_estimated_hash_rate() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.tari_randomx_estimated_hash_rate_;
|
||||
}
|
||||
inline void NetworkDifficultyResponse::_internal_set_tari_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.tari_randomx_estimated_hash_rate_ = value;
|
||||
}
|
||||
|
||||
// uint64 num_coinbases = 8;
|
||||
@@ -14338,29 +14645,51 @@ NetworkDifficultyResponse::_internal_mutable_coinbase_extras() {
|
||||
|
||||
// ValueAtHeightResponse
|
||||
|
||||
// uint64 value = 1;
|
||||
inline void ValueAtHeightResponse::clear_value() {
|
||||
// uint64 circulating_supply = 1;
|
||||
inline void ValueAtHeightResponse::clear_circulating_supply() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.value_ = ::uint64_t{0u};
|
||||
_impl_.circulating_supply_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t ValueAtHeightResponse::value() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.ValueAtHeightResponse.value)
|
||||
return _internal_value();
|
||||
inline ::uint64_t ValueAtHeightResponse::circulating_supply() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.ValueAtHeightResponse.circulating_supply)
|
||||
return _internal_circulating_supply();
|
||||
}
|
||||
inline void ValueAtHeightResponse::set_value(::uint64_t value) {
|
||||
_internal_set_value(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.ValueAtHeightResponse.value)
|
||||
inline void ValueAtHeightResponse::set_circulating_supply(::uint64_t value) {
|
||||
_internal_set_circulating_supply(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.ValueAtHeightResponse.circulating_supply)
|
||||
}
|
||||
inline ::uint64_t ValueAtHeightResponse::_internal_value() const {
|
||||
inline ::uint64_t ValueAtHeightResponse::_internal_circulating_supply() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.value_;
|
||||
return _impl_.circulating_supply_;
|
||||
}
|
||||
inline void ValueAtHeightResponse::_internal_set_value(::uint64_t value) {
|
||||
inline void ValueAtHeightResponse::_internal_set_circulating_supply(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.value_ = value;
|
||||
_impl_.circulating_supply_ = value;
|
||||
}
|
||||
|
||||
// uint64 height = 2;
|
||||
// uint64 spendable_supply = 2;
|
||||
inline void ValueAtHeightResponse::clear_spendable_supply() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.spendable_supply_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t ValueAtHeightResponse::spendable_supply() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.ValueAtHeightResponse.spendable_supply)
|
||||
return _internal_spendable_supply();
|
||||
}
|
||||
inline void ValueAtHeightResponse::set_spendable_supply(::uint64_t value) {
|
||||
_internal_set_spendable_supply(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.ValueAtHeightResponse.spendable_supply)
|
||||
}
|
||||
inline ::uint64_t ValueAtHeightResponse::_internal_spendable_supply() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.spendable_supply_;
|
||||
}
|
||||
inline void ValueAtHeightResponse::_internal_set_spendable_supply(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.spendable_supply_ = value;
|
||||
}
|
||||
|
||||
// uint64 height = 3;
|
||||
inline void ValueAtHeightResponse::clear_height() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.height_ = ::uint64_t{0u};
|
||||
@@ -15973,6 +16302,56 @@ inline void GetNewBlockResult::set_allocated_miner_data(::tari::rpc::MinerData*
|
||||
// @@protoc_insertion_point(field_set_allocated:tari.rpc.GetNewBlockResult.miner_data)
|
||||
}
|
||||
|
||||
// bytes vm_key = 6;
|
||||
inline void GetNewBlockResult::clear_vm_key() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.vm_key_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& GetNewBlockResult::vm_key() const
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.GetNewBlockResult.vm_key)
|
||||
return _internal_vm_key();
|
||||
}
|
||||
template <typename Arg_, typename... Args_>
|
||||
inline PROTOBUF_ALWAYS_INLINE void GetNewBlockResult::set_vm_key(Arg_&& arg,
|
||||
Args_... args) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.vm_key_.SetBytes(static_cast<Arg_&&>(arg), args..., GetArena());
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.GetNewBlockResult.vm_key)
|
||||
}
|
||||
inline std::string* GetNewBlockResult::mutable_vm_key() ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
std::string* _s = _internal_mutable_vm_key();
|
||||
// @@protoc_insertion_point(field_mutable:tari.rpc.GetNewBlockResult.vm_key)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& GetNewBlockResult::_internal_vm_key() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.vm_key_.Get();
|
||||
}
|
||||
inline void GetNewBlockResult::_internal_set_vm_key(const std::string& value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.vm_key_.Set(value, GetArena());
|
||||
}
|
||||
inline std::string* GetNewBlockResult::_internal_mutable_vm_key() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
return _impl_.vm_key_.Mutable( GetArena());
|
||||
}
|
||||
inline std::string* GetNewBlockResult::release_vm_key() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
// @@protoc_insertion_point(field_release:tari.rpc.GetNewBlockResult.vm_key)
|
||||
return _impl_.vm_key_.Release();
|
||||
}
|
||||
inline void GetNewBlockResult::set_allocated_vm_key(std::string* value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.vm_key_.SetAllocated(value, GetArena());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.vm_key_.IsDefault()) {
|
||||
_impl_.vm_key_.Set("", GetArena());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:tari.rpc.GetNewBlockResult.vm_key)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// GetNewBlockBlobResult
|
||||
@@ -18368,26 +18747,217 @@ inline void GetNetworkStateResponse::_internal_set_sha3x_estimated_hash_rate(::u
|
||||
_impl_.sha3x_estimated_hash_rate_ = value;
|
||||
}
|
||||
|
||||
// uint64 randomx_estimated_hash_rate = 7;
|
||||
inline void GetNetworkStateResponse::clear_randomx_estimated_hash_rate() {
|
||||
// uint64 monero_randomx_estimated_hash_rate = 7;
|
||||
inline void GetNetworkStateResponse::clear_monero_randomx_estimated_hash_rate() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.randomx_estimated_hash_rate_ = ::uint64_t{0u};
|
||||
_impl_.monero_randomx_estimated_hash_rate_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t GetNetworkStateResponse::randomx_estimated_hash_rate() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.randomx_estimated_hash_rate)
|
||||
return _internal_randomx_estimated_hash_rate();
|
||||
inline ::uint64_t GetNetworkStateResponse::monero_randomx_estimated_hash_rate() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.monero_randomx_estimated_hash_rate)
|
||||
return _internal_monero_randomx_estimated_hash_rate();
|
||||
}
|
||||
inline void GetNetworkStateResponse::set_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
_internal_set_randomx_estimated_hash_rate(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.randomx_estimated_hash_rate)
|
||||
inline void GetNetworkStateResponse::set_monero_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
_internal_set_monero_randomx_estimated_hash_rate(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.monero_randomx_estimated_hash_rate)
|
||||
}
|
||||
inline ::uint64_t GetNetworkStateResponse::_internal_randomx_estimated_hash_rate() const {
|
||||
inline ::uint64_t GetNetworkStateResponse::_internal_monero_randomx_estimated_hash_rate() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.randomx_estimated_hash_rate_;
|
||||
return _impl_.monero_randomx_estimated_hash_rate_;
|
||||
}
|
||||
inline void GetNetworkStateResponse::_internal_set_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
inline void GetNetworkStateResponse::_internal_set_monero_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.randomx_estimated_hash_rate_ = value;
|
||||
_impl_.monero_randomx_estimated_hash_rate_ = value;
|
||||
}
|
||||
|
||||
// uint64 tari_randomx_estimated_hash_rate = 10;
|
||||
inline void GetNetworkStateResponse::clear_tari_randomx_estimated_hash_rate() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.tari_randomx_estimated_hash_rate_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t GetNetworkStateResponse::tari_randomx_estimated_hash_rate() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.tari_randomx_estimated_hash_rate)
|
||||
return _internal_tari_randomx_estimated_hash_rate();
|
||||
}
|
||||
inline void GetNetworkStateResponse::set_tari_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
_internal_set_tari_randomx_estimated_hash_rate(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.tari_randomx_estimated_hash_rate)
|
||||
}
|
||||
inline ::uint64_t GetNetworkStateResponse::_internal_tari_randomx_estimated_hash_rate() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.tari_randomx_estimated_hash_rate_;
|
||||
}
|
||||
inline void GetNetworkStateResponse::_internal_set_tari_randomx_estimated_hash_rate(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.tari_randomx_estimated_hash_rate_ = value;
|
||||
}
|
||||
|
||||
// uint64 num_connections = 8;
|
||||
inline void GetNetworkStateResponse::clear_num_connections() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.num_connections_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t GetNetworkStateResponse::num_connections() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.num_connections)
|
||||
return _internal_num_connections();
|
||||
}
|
||||
inline void GetNetworkStateResponse::set_num_connections(::uint64_t value) {
|
||||
_internal_set_num_connections(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.num_connections)
|
||||
}
|
||||
inline ::uint64_t GetNetworkStateResponse::_internal_num_connections() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.num_connections_;
|
||||
}
|
||||
inline void GetNetworkStateResponse::_internal_set_num_connections(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.num_connections_ = value;
|
||||
}
|
||||
|
||||
// repeated .tari.rpc.LivenessResult liveness_results = 9;
|
||||
inline int GetNetworkStateResponse::_internal_liveness_results_size() const {
|
||||
return _internal_liveness_results().size();
|
||||
}
|
||||
inline int GetNetworkStateResponse::liveness_results_size() const {
|
||||
return _internal_liveness_results_size();
|
||||
}
|
||||
inline void GetNetworkStateResponse::clear_liveness_results() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.liveness_results_.Clear();
|
||||
}
|
||||
inline ::tari::rpc::LivenessResult* GetNetworkStateResponse::mutable_liveness_results(int index)
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
// @@protoc_insertion_point(field_mutable:tari.rpc.GetNetworkStateResponse.liveness_results)
|
||||
return _internal_mutable_liveness_results()->Mutable(index);
|
||||
}
|
||||
inline ::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>* GetNetworkStateResponse::mutable_liveness_results()
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
// @@protoc_insertion_point(field_mutable_list:tari.rpc.GetNetworkStateResponse.liveness_results)
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
return _internal_mutable_liveness_results();
|
||||
}
|
||||
inline const ::tari::rpc::LivenessResult& GetNetworkStateResponse::liveness_results(int index) const
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.liveness_results)
|
||||
return _internal_liveness_results().Get(index);
|
||||
}
|
||||
inline ::tari::rpc::LivenessResult* GetNetworkStateResponse::add_liveness_results() ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
::tari::rpc::LivenessResult* _add = _internal_mutable_liveness_results()->Add();
|
||||
// @@protoc_insertion_point(field_add:tari.rpc.GetNetworkStateResponse.liveness_results)
|
||||
return _add;
|
||||
}
|
||||
inline const ::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>& GetNetworkStateResponse::liveness_results() const
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
// @@protoc_insertion_point(field_list:tari.rpc.GetNetworkStateResponse.liveness_results)
|
||||
return _internal_liveness_results();
|
||||
}
|
||||
inline const ::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>&
|
||||
GetNetworkStateResponse::_internal_liveness_results() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.liveness_results_;
|
||||
}
|
||||
inline ::google::protobuf::RepeatedPtrField<::tari::rpc::LivenessResult>*
|
||||
GetNetworkStateResponse::_internal_mutable_liveness_results() {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return &_impl_.liveness_results_;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// LivenessResult
|
||||
|
||||
// bytes peer_node_id = 1;
|
||||
inline void LivenessResult::clear_peer_node_id() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.peer_node_id_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& LivenessResult::peer_node_id() const
|
||||
ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.LivenessResult.peer_node_id)
|
||||
return _internal_peer_node_id();
|
||||
}
|
||||
template <typename Arg_, typename... Args_>
|
||||
inline PROTOBUF_ALWAYS_INLINE void LivenessResult::set_peer_node_id(Arg_&& arg,
|
||||
Args_... args) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.peer_node_id_.SetBytes(static_cast<Arg_&&>(arg), args..., GetArena());
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.LivenessResult.peer_node_id)
|
||||
}
|
||||
inline std::string* LivenessResult::mutable_peer_node_id() ABSL_ATTRIBUTE_LIFETIME_BOUND {
|
||||
std::string* _s = _internal_mutable_peer_node_id();
|
||||
// @@protoc_insertion_point(field_mutable:tari.rpc.LivenessResult.peer_node_id)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& LivenessResult::_internal_peer_node_id() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.peer_node_id_.Get();
|
||||
}
|
||||
inline void LivenessResult::_internal_set_peer_node_id(const std::string& value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.peer_node_id_.Set(value, GetArena());
|
||||
}
|
||||
inline std::string* LivenessResult::_internal_mutable_peer_node_id() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
return _impl_.peer_node_id_.Mutable( GetArena());
|
||||
}
|
||||
inline std::string* LivenessResult::release_peer_node_id() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
// @@protoc_insertion_point(field_release:tari.rpc.LivenessResult.peer_node_id)
|
||||
return _impl_.peer_node_id_.Release();
|
||||
}
|
||||
inline void LivenessResult::set_allocated_peer_node_id(std::string* value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.peer_node_id_.SetAllocated(value, GetArena());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.peer_node_id_.IsDefault()) {
|
||||
_impl_.peer_node_id_.Set("", GetArena());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:tari.rpc.LivenessResult.peer_node_id)
|
||||
}
|
||||
|
||||
// uint64 discover_latency = 2;
|
||||
inline void LivenessResult::clear_discover_latency() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.discover_latency_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t LivenessResult::discover_latency() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.LivenessResult.discover_latency)
|
||||
return _internal_discover_latency();
|
||||
}
|
||||
inline void LivenessResult::set_discover_latency(::uint64_t value) {
|
||||
_internal_set_discover_latency(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.LivenessResult.discover_latency)
|
||||
}
|
||||
inline ::uint64_t LivenessResult::_internal_discover_latency() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.discover_latency_;
|
||||
}
|
||||
inline void LivenessResult::_internal_set_discover_latency(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.discover_latency_ = value;
|
||||
}
|
||||
|
||||
// uint64 ping_latency = 3;
|
||||
inline void LivenessResult::clear_ping_latency() {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.ping_latency_ = ::uint64_t{0u};
|
||||
}
|
||||
inline ::uint64_t LivenessResult::ping_latency() const {
|
||||
// @@protoc_insertion_point(field_get:tari.rpc.LivenessResult.ping_latency)
|
||||
return _internal_ping_latency();
|
||||
}
|
||||
inline void LivenessResult::set_ping_latency(::uint64_t value) {
|
||||
_internal_set_ping_latency(value);
|
||||
// @@protoc_insertion_point(field_set:tari.rpc.LivenessResult.ping_latency)
|
||||
}
|
||||
inline ::uint64_t LivenessResult::_internal_ping_latency() const {
|
||||
PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
|
||||
return _impl_.ping_latency_;
|
||||
}
|
||||
inline void LivenessResult::_internal_set_ping_latency(::uint64_t value) {
|
||||
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
|
||||
_impl_.ping_latency_ = value;
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
+21
-4
@@ -218,15 +218,17 @@ message NetworkDifficultyResponse {
|
||||
uint64 timestamp = 4;
|
||||
uint64 pow_algo = 5;
|
||||
uint64 sha3x_estimated_hash_rate = 6;
|
||||
uint64 randomx_estimated_hash_rate = 7;
|
||||
uint64 monero_randomx_estimated_hash_rate = 7;
|
||||
uint64 tari_randomx_estimated_hash_rate = 10;
|
||||
uint64 num_coinbases = 8;
|
||||
repeated bytes coinbase_extras = 9;
|
||||
}
|
||||
|
||||
// A generic single value response for a specific height
|
||||
message ValueAtHeightResponse {
|
||||
uint64 value= 1;
|
||||
uint64 height = 2;
|
||||
uint64 circulating_supply = 1;
|
||||
uint64 spendable_supply = 2;
|
||||
uint64 height = 3;
|
||||
}
|
||||
|
||||
// A generic uint value
|
||||
@@ -382,6 +384,7 @@ message GetNewBlockResult{
|
||||
bytes merge_mining_hash =3;
|
||||
bytes tari_unique_id =4;
|
||||
MinerData miner_data = 5;
|
||||
bytes vm_key = 6;
|
||||
}
|
||||
|
||||
// This is the message that is returned for a miner after it asks for a new block.
|
||||
@@ -539,6 +542,20 @@ message GetNetworkStateResponse {
|
||||
// estimate sha3x hash rate
|
||||
uint64 sha3x_estimated_hash_rate = 6;
|
||||
// estimate randomx hash rate
|
||||
uint64 randomx_estimated_hash_rate = 7;
|
||||
uint64 monero_randomx_estimated_hash_rate = 7;
|
||||
uint64 tari_randomx_estimated_hash_rate = 10;
|
||||
// number of connections
|
||||
uint64 num_connections = 8;
|
||||
//liveness results
|
||||
repeated LivenessResult liveness_results = 9;
|
||||
}
|
||||
|
||||
message LivenessResult{
|
||||
// node id
|
||||
bytes peer_node_id = 1;
|
||||
// time to discover
|
||||
uint64 discover_latency = 2;
|
||||
// Dial latency
|
||||
uint64 ping_latency = 3;
|
||||
}
|
||||
|
||||
|
||||
+21
-20
@@ -371,22 +371,22 @@ const char descriptor_table_protodef_block_2eproto[] ABSL_ATTRIBUTE_SECTION_VARI
|
||||
"tal_script_offset\030\017 \001(\014\022\031\n\021validator_nod"
|
||||
"e_mr\030\020 \001(\014\022\033\n\023validator_node_size\030\021 \001(\004\""
|
||||
"1\n\013ProofOfWork\022\020\n\010pow_algo\030\001 \001(\004\022\020\n\010pow_"
|
||||
"data\030\004 \001(\014\"o\n\007PowAlgo\022,\n\010pow_algo\030\001 \001(\0162"
|
||||
"\032.tari.rpc.PowAlgo.PowAlgos\"6\n\010PowAlgos\022"
|
||||
"\025\n\021POW_ALGOS_RANDOMX\020\000\022\023\n\017POW_ALGOS_SHA3"
|
||||
"X\020\001\"U\n\005Block\022%\n\006header\030\001 \001(\0132\025.tari.rpc."
|
||||
"BlockHeader\022%\n\004body\030\002 \001(\0132\027.tari.rpc.Agg"
|
||||
"regateBody\"H\n\017HistoricalBlock\022\025\n\rconfirm"
|
||||
"ations\030\001 \001(\004\022\036\n\005block\030\002 \001(\0132\017.tari.rpc.B"
|
||||
"lock\"\252\001\n\026NewBlockHeaderTemplate\022\017\n\007versi"
|
||||
"on\030\001 \001(\r\022\016\n\006height\030\002 \001(\004\022\021\n\tprev_hash\030\003 "
|
||||
"\001(\014\022\033\n\023total_kernel_offset\030\004 \001(\014\022\"\n\003pow\030"
|
||||
"\005 \001(\0132\025.tari.rpc.ProofOfWork\022\033\n\023total_sc"
|
||||
"ript_offset\030\007 \001(\014\"\207\001\n\020NewBlockTemplate\0220"
|
||||
"\n\006header\030\001 \001(\0132 .tari.rpc.NewBlockHeader"
|
||||
"Template\022%\n\004body\030\002 \001(\0132\027.tari.rpc.Aggreg"
|
||||
"ateBody\022\032\n\022is_mempool_in_sync\030\003 \001(\010b\006pro"
|
||||
"to3"
|
||||
"data\030\004 \001(\014\"\210\001\n\007PowAlgo\022,\n\010pow_algo\030\001 \001(\016"
|
||||
"2\032.tari.rpc.PowAlgo.PowAlgos\"O\n\010PowAlgos"
|
||||
"\022\026\n\022POW_ALGOS_RANDOMXM\020\000\022\023\n\017POW_ALGOS_SH"
|
||||
"A3X\020\001\022\026\n\022POW_ALGOS_RANDOMXT\020\002\"U\n\005Block\022%"
|
||||
"\n\006header\030\001 \001(\0132\025.tari.rpc.BlockHeader\022%\n"
|
||||
"\004body\030\002 \001(\0132\027.tari.rpc.AggregateBody\"H\n\017"
|
||||
"HistoricalBlock\022\025\n\rconfirmations\030\001 \001(\004\022\036"
|
||||
"\n\005block\030\002 \001(\0132\017.tari.rpc.Block\"\252\001\n\026NewBl"
|
||||
"ockHeaderTemplate\022\017\n\007version\030\001 \001(\r\022\016\n\006he"
|
||||
"ight\030\002 \001(\004\022\021\n\tprev_hash\030\003 \001(\014\022\033\n\023total_k"
|
||||
"ernel_offset\030\004 \001(\014\022\"\n\003pow\030\005 \001(\0132\025.tari.r"
|
||||
"pc.ProofOfWork\022\033\n\023total_script_offset\030\007 "
|
||||
"\001(\014\"\207\001\n\020NewBlockTemplate\0220\n\006header\030\001 \001(\013"
|
||||
"2 .tari.rpc.NewBlockHeaderTemplate\022%\n\004bo"
|
||||
"dy\030\002 \001(\0132\027.tari.rpc.AggregateBody\022\032\n\022is_"
|
||||
"mempool_in_sync\030\003 \001(\010b\006proto3"
|
||||
};
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_block_2eproto_deps[1] =
|
||||
{
|
||||
@@ -396,7 +396,7 @@ static ::absl::once_flag descriptor_table_block_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_block_2eproto = {
|
||||
false,
|
||||
false,
|
||||
1083,
|
||||
1109,
|
||||
descriptor_table_protodef_block_2eproto,
|
||||
"block.proto",
|
||||
&descriptor_table_block_2eproto_once,
|
||||
@@ -432,15 +432,16 @@ const ::google::protobuf::EnumDescriptor* PowAlgo_PowAlgos_descriptor() {
|
||||
return file_level_enum_descriptors_block_2eproto[0];
|
||||
}
|
||||
PROTOBUF_CONSTINIT const uint32_t PowAlgo_PowAlgos_internal_data_[] = {
|
||||
131072u, 0u, };
|
||||
196608u, 0u, };
|
||||
bool PowAlgo_PowAlgos_IsValid(int value) {
|
||||
return 0 <= value && value <= 1;
|
||||
return 0 <= value && value <= 2;
|
||||
}
|
||||
#if (__cplusplus < 201703) && \
|
||||
(!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
|
||||
|
||||
constexpr PowAlgo_PowAlgos PowAlgo::POW_ALGOS_RANDOMX;
|
||||
constexpr PowAlgo_PowAlgos PowAlgo::POW_ALGOS_RANDOMXM;
|
||||
constexpr PowAlgo_PowAlgos PowAlgo::POW_ALGOS_SHA3X;
|
||||
constexpr PowAlgo_PowAlgos PowAlgo::POW_ALGOS_RANDOMXT;
|
||||
constexpr PowAlgo_PowAlgos PowAlgo::PowAlgos_MIN;
|
||||
constexpr PowAlgo_PowAlgos PowAlgo::PowAlgos_MAX;
|
||||
constexpr int PowAlgo::PowAlgos_ARRAYSIZE;
|
||||
|
||||
+7
-5
@@ -84,8 +84,9 @@ namespace protobuf {
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
enum PowAlgo_PowAlgos : int {
|
||||
PowAlgo_PowAlgos_POW_ALGOS_RANDOMX = 0,
|
||||
PowAlgo_PowAlgos_POW_ALGOS_RANDOMXM = 0,
|
||||
PowAlgo_PowAlgos_POW_ALGOS_SHA3X = 1,
|
||||
PowAlgo_PowAlgos_POW_ALGOS_RANDOMXT = 2,
|
||||
PowAlgo_PowAlgos_PowAlgo_PowAlgos_INT_MIN_SENTINEL_DO_NOT_USE_ =
|
||||
std::numeric_limits<::int32_t>::min(),
|
||||
PowAlgo_PowAlgos_PowAlgo_PowAlgos_INT_MAX_SENTINEL_DO_NOT_USE_ =
|
||||
@@ -95,8 +96,8 @@ enum PowAlgo_PowAlgos : int {
|
||||
bool PowAlgo_PowAlgos_IsValid(int value);
|
||||
extern const uint32_t PowAlgo_PowAlgos_internal_data_[];
|
||||
constexpr PowAlgo_PowAlgos PowAlgo_PowAlgos_PowAlgos_MIN = static_cast<PowAlgo_PowAlgos>(0);
|
||||
constexpr PowAlgo_PowAlgos PowAlgo_PowAlgos_PowAlgos_MAX = static_cast<PowAlgo_PowAlgos>(1);
|
||||
constexpr int PowAlgo_PowAlgos_PowAlgos_ARRAYSIZE = 1 + 1;
|
||||
constexpr PowAlgo_PowAlgos PowAlgo_PowAlgos_PowAlgos_MAX = static_cast<PowAlgo_PowAlgos>(2);
|
||||
constexpr int PowAlgo_PowAlgos_PowAlgos_ARRAYSIZE = 2 + 1;
|
||||
const ::google::protobuf::EnumDescriptor*
|
||||
PowAlgo_PowAlgos_descriptor();
|
||||
template <typename T>
|
||||
@@ -109,7 +110,7 @@ const std::string& PowAlgo_PowAlgos_Name(T value) {
|
||||
template <>
|
||||
inline const std::string& PowAlgo_PowAlgos_Name(PowAlgo_PowAlgos value) {
|
||||
return ::google::protobuf::internal::NameOfDenseEnum<PowAlgo_PowAlgos_descriptor,
|
||||
0, 1>(
|
||||
0, 2>(
|
||||
static_cast<int>(value));
|
||||
}
|
||||
inline bool PowAlgo_PowAlgos_Parse(absl::string_view name, PowAlgo_PowAlgos* value) {
|
||||
@@ -430,8 +431,9 @@ class PowAlgo final : public ::google::protobuf::Message
|
||||
::google::protobuf::Metadata GetMetadata() const final;
|
||||
// nested types ----------------------------------------------------
|
||||
using PowAlgos = PowAlgo_PowAlgos;
|
||||
static constexpr PowAlgos POW_ALGOS_RANDOMX = PowAlgo_PowAlgos_POW_ALGOS_RANDOMX;
|
||||
static constexpr PowAlgos POW_ALGOS_RANDOMXM = PowAlgo_PowAlgos_POW_ALGOS_RANDOMXM;
|
||||
static constexpr PowAlgos POW_ALGOS_SHA3X = PowAlgo_PowAlgos_POW_ALGOS_SHA3X;
|
||||
static constexpr PowAlgos POW_ALGOS_RANDOMXT = PowAlgo_PowAlgos_POW_ALGOS_RANDOMXT;
|
||||
static inline bool PowAlgos_IsValid(int value) {
|
||||
return PowAlgo_PowAlgos_IsValid(value);
|
||||
}
|
||||
|
||||
+2
-1
@@ -80,8 +80,9 @@ message ProofOfWork {
|
||||
message PowAlgo {
|
||||
// The permitted pow algorithms
|
||||
enum PowAlgos {
|
||||
POW_ALGOS_RANDOMX = 0; // Accessible as `grpc::pow_algo::PowAlgos::Randomx`
|
||||
POW_ALGOS_RANDOMXM = 0; // Accessible as `grpc::pow_algo::PowAlgos::RandomxM`
|
||||
POW_ALGOS_SHA3X = 1; // Accessible as `grpc::pow_algo::PowAlgos::Sha3x`
|
||||
POW_ALGOS_RANDOMXT = 2; // Accessible as `grpc::pow_algo::PowAlgos::RandomxT`
|
||||
}
|
||||
// The pow algo to use
|
||||
PowAlgos pow_algo = 1;
|
||||
|
||||
Vendored
+1
-1
Submodule external/src/cppzmq updated: a371495a91...57cc98f8fc
Vendored
+1
-1
Submodule external/src/curl updated: 06c37f3218...939e16f090
Vendored
+1
-1
Submodule external/src/grpc updated: 9ffeba31cf...58c4289a67
Vendored
+1
-1
Submodule external/src/libzmq updated: 8a20bd6132...1fce1ef005
Vendored
+1
-1
Submodule external/src/miniupnp updated: 7e28c9f8af...88a1515ea8
@@ -14,7 +14,7 @@ index a44774d23..09cf10942 100644
|
||||
// See: https://learn.microsoft.com/en-us/windows/win32/seccng/processprng
|
||||
typedef BOOL (WINAPI *ProcessPrngFunction)(PBYTE pbData, SIZE_T cbData);
|
||||
static ProcessPrngFunction g_processprng_fn = NULL;
|
||||
+static HCRYPTPROV g_hCryptProv = NULL;
|
||||
+static HCRYPTPROV g_hCryptProv = 0;
|
||||
+
|
||||
+static BOOL WINAPI wrapper_CryptGenRandom(PBYTE pbData, SIZE_T cbData)
|
||||
+{
|
||||
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: build_all.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker images | grep -q p2pool_compiler_tests_ubuntu
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Build image not found, creating it"
|
||||
images/ubuntu/build.sh
|
||||
fi
|
||||
|
||||
for i in 8 15;
|
||||
do
|
||||
gcc/build.sh $1 $i
|
||||
done
|
||||
|
||||
for i in 17 21;
|
||||
do
|
||||
clang/build.sh $1 $i
|
||||
done
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_compiler_tests_ubuntu
|
||||
ARG P2POOL_VERSION CLANG_VERSION
|
||||
ADD test.sh test2.sh /p2pool/
|
||||
RUN /p2pool/test.sh ${P2POOL_VERSION} ${CLANG_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1 20
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 --build-arg CLANG_VERSION=$2 -t p2pool_compiler_test_clang_$1_$2 .
|
||||
|
||||
docker create --name p2pool_compiler_test_clang_$1_$2_container p2pool_compiler_test_clang_$1_$2:latest
|
||||
docker cp p2pool_compiler_test_clang_$1_$2_container:/p2pool/logs.tar.gz clang_$2_logs.tar.gz
|
||||
docker rm p2pool_compiler_test_clang_$1_$2_container
|
||||
|
||||
docker image rm -f p2pool_compiler_test_clang_$1_$2
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $1
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export COMPILER="-DCMAKE_C_COMPILER=clang-$2 -DCMAKE_CXX_COMPILER=clang++-$2"
|
||||
|
||||
./test2.sh
|
||||
|
||||
tar -czvf /p2pool/logs.tar.gz /p2pool/output.log
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release $COMPILER 1>> /p2pool/output.log 2>&1
|
||||
make -j$(nproc) p2pool 1>> /p2pool/output.log 2>&1
|
||||
|
||||
./p2pool --test 1>> /p2pool/output.log 2>&1
|
||||
|
||||
make -j$(nproc) randomx-tests 1>> /p2pool/output.log 2>&1
|
||||
external/src/RandomX/randomx-tests 1>> /p2pool/output.log 2>&1
|
||||
|
||||
cd ../tests
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release $COMPILER 1>> /p2pool/output.log 2>&1
|
||||
make -j$(nproc) p2pool_tests 1>> /p2pool/output.log 2>&1
|
||||
unxz *.xz
|
||||
|
||||
./p2pool_tests 1>> /p2pool/output.log 2>&1
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_compiler_tests_ubuntu
|
||||
ARG P2POOL_VERSION GCC_VERSION
|
||||
ADD test.sh test2.sh /p2pool/
|
||||
RUN /p2pool/test.sh ${P2POOL_VERSION} ${GCC_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1 15
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 --build-arg GCC_VERSION=$2 -t p2pool_compiler_test_gcc_$1_$2 .
|
||||
|
||||
docker create --name p2pool_compiler_test_gcc_$1_$2_container p2pool_compiler_test_gcc_$1_$2:latest
|
||||
docker cp p2pool_compiler_test_gcc_$1_$2_container:/p2pool/logs.tar.gz gcc_$2_logs.tar.gz
|
||||
docker rm p2pool_compiler_test_gcc_$1_$2_container
|
||||
|
||||
docker image rm -f p2pool_compiler_test_gcc_$1_$2
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $1
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export COMPILER="-DCMAKE_C_COMPILER=/usr/local/gcc-$2/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/gcc-$2/bin/g++ -DCMAKE_AR=/usr/local/gcc-$2/bin/gcc-ar -DCMAKE_RANLIB=/usr/local/gcc-$2/bin/gcc-ranlib"
|
||||
|
||||
./test2.sh
|
||||
|
||||
tar -czvf /p2pool/logs.tar.gz /p2pool/output.log
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release $COMPILER 1>> /p2pool/output.log 2>&1
|
||||
make -j$(nproc) p2pool 1>> /p2pool/output.log 2>&1
|
||||
|
||||
./p2pool --test 1>> /p2pool/output.log 2>&1
|
||||
|
||||
make -j$(nproc) randomx-tests 1>> /p2pool/output.log 2>&1
|
||||
external/src/RandomX/randomx-tests 1>> /p2pool/output.log 2>&1
|
||||
|
||||
cd ../tests
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release $COMPILER 1>> /p2pool/output.log 2>&1
|
||||
make -j$(nproc) p2pool_tests 1>> /p2pool/output.log 2>&1
|
||||
unxz *.xz
|
||||
|
||||
./p2pool_tests 1>> /p2pool/output.log 2>&1
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM ubuntu:24.04
|
||||
ADD prepare.sh /
|
||||
RUN /prepare.sh
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd "$(dirname "$0")"
|
||||
docker build -t p2pool_compiler_tests_ubuntu .
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "Installing prerequisites"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get update && apt-get upgrade -yq --no-install-recommends
|
||||
apt-get install -yq --no-install-recommends ca-certificates curl bzip2 flex lsb-release wget software-properties-common gnupg xz-utils git gcc g++ cmake make libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev
|
||||
|
||||
echo "Installing GCC 8.5.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-8.5.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-8
|
||||
|
||||
cd gcc-8
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-8
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing GCC 9.5.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-9.5.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-9
|
||||
|
||||
cd gcc-9
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-9
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing GCC 10.5.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-10.5.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-10
|
||||
|
||||
cd gcc-10
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-10
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing GCC 11.5.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-11.5.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-11
|
||||
|
||||
cd gcc-11
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-11
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing GCC 12.4.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-12.4.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-12
|
||||
|
||||
cd gcc-12
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-12
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing GCC 13.4.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-13.4.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-13
|
||||
|
||||
cd gcc-13
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-13
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing GCC 14.3.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-14.3.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-14
|
||||
|
||||
cd gcc-14
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-14
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing GCC 15.1.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-15.1.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-15
|
||||
|
||||
cd gcc-15
|
||||
contrib/download_prerequisites
|
||||
|
||||
mkdir build && cd build
|
||||
../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --prefix=/usr/local/gcc-15
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Installing clang"
|
||||
|
||||
cd /root
|
||||
|
||||
curl -L -O https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
|
||||
for i in 17 18 19 20 21;
|
||||
do
|
||||
./llvm.sh $i
|
||||
done
|
||||
|
||||
echo "Cloning the repository"
|
||||
|
||||
cd /
|
||||
git clone --recursive --jobs $(nproc) https://github.com/SChernykh/p2pool
|
||||
|
||||
echo "Deleting temporary files"
|
||||
|
||||
cd /root
|
||||
rm -rf *
|
||||
|
||||
echo "All done"
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: release_scripts/build_all.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker images | grep -q p2pool_build_ubuntu
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Build image not found, creating it"
|
||||
images/ubuntu/build.sh
|
||||
fi
|
||||
|
||||
gnome-terminal --tab -- freebsd_aarch64/build.sh $1
|
||||
gnome-terminal --tab -- freebsd_x64/build.sh $1
|
||||
gnome-terminal --tab -- linux_aarch64/build.sh $1
|
||||
gnome-terminal --tab -- linux_riscv64/build.sh $1
|
||||
gnome-terminal --tab -- linux_x64/build.sh $1
|
||||
gnome-terminal --tab -- windows_x64/build.sh $1
|
||||
gnome-terminal --tab -- macos_aarch64/build.sh $1
|
||||
gnome-terminal --tab -- macos_x64/build.sh $1
|
||||
gnome-terminal --tab -- source/build.sh $1
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_freebsd_aarch64.sh /p2pool/
|
||||
RUN /p2pool/p2pool_freebsd_aarch64.sh p2pool-${P2POOL_VERSION}-freebsd-aarch64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_freebsd_aarch64_build_$1 .
|
||||
|
||||
docker create --name p2pool_freebsd_aarch64_build_$1_container p2pool_freebsd_aarch64_build_$1:latest
|
||||
docker cp p2pool_freebsd_aarch64_build_$1_container:/p2pool/build/p2pool-$1-freebsd-aarch64.tar.gz ../p2pool-$1-freebsd-aarch64.tar.gz
|
||||
docker rm p2pool_freebsd_aarch64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_freebsd_aarch64_build_$1
|
||||
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections"
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="--target=aarch64-unknown-freebsd12.0 --sysroot=/usr/local/cross-freebsd-aarch64 -Os -flto -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
flags_p2pool="--target=aarch64-unknown-freebsd12.0 --sysroot=/usr/local/cross-freebsd-aarch64 -fuse-ld=lld -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/freebsd_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/freebsd_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/freebsd_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/freebsd_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=aarch64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool
|
||||
|
||||
tar cvf $1.tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" $1
|
||||
touch -t $TOUCH_DATE $1.tar
|
||||
7z a -tgzip -mx9 -mfb256 -stl $1.tar.gz $1.tar
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_freebsd_x64.sh /p2pool/
|
||||
RUN /p2pool/p2pool_freebsd_x64.sh p2pool-${P2POOL_VERSION}-freebsd-x64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_freebsd_x64_build_$1 .
|
||||
|
||||
docker create --name p2pool_freebsd_x64_build_$1_container p2pool_freebsd_x64_build_$1:latest
|
||||
docker cp p2pool_freebsd_x64_build_$1_container:/p2pool/build/p2pool-$1-freebsd-x64.tar.gz ../p2pool-$1-freebsd-x64.tar.gz
|
||||
docker rm p2pool_freebsd_x64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_freebsd_x64_build_$1
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections"
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="--target=x86_64-unknown-freebsd12.0 --sysroot=/usr/local/cross-freebsd-x86_64 -Os -flto -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
flags_p2pool="--target=x86_64-unknown-freebsd12.0 --sysroot=/usr/local/cross-freebsd-x86_64 -fuse-ld=lld -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/freebsd_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/freebsd_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/freebsd_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/freebsd_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=x86_64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool
|
||||
|
||||
tar cvf $1.tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" $1
|
||||
touch -t $TOUCH_DATE $1.tar
|
||||
7z a -tgzip -mx9 -mfb256 -stl $1.tar.gz $1.tar
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
OUTPUT_FILE=sha256sums.txt
|
||||
> $OUTPUT_FILE
|
||||
|
||||
format_size() {
|
||||
bytes=$1
|
||||
if [ $bytes -lt 104857600 ]; then
|
||||
kib=$(( bytes / 1024 ))
|
||||
echo "${bytes} bytes : ${kib} KiB"
|
||||
else
|
||||
mib=$(( bytes / 1048576 ))
|
||||
echo "${bytes} bytes : ${mib} MiB"
|
||||
fi
|
||||
}
|
||||
|
||||
first=1
|
||||
|
||||
for file in *.tar.gz *.zip *.tar.xz; do
|
||||
size=$(stat -c %s "$file")
|
||||
size_fmt=$(format_size "$size")
|
||||
sha=$(sha256sum "$file" | awk '{print $1}')
|
||||
|
||||
if [ $first -eq 0 ]; then
|
||||
echo >> $OUTPUT_FILE
|
||||
fi
|
||||
|
||||
echo "Name: $file" >> $OUTPUT_FILE
|
||||
echo "Size: $size_fmt" >> $OUTPUT_FILE
|
||||
echo "SHA256: $sha" >> $OUTPUT_FILE
|
||||
|
||||
first=0
|
||||
done
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM ubuntu:24.04
|
||||
ADD prepare.sh /
|
||||
RUN /prepare.sh
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd "$(dirname "$0")"
|
||||
docker build -t p2pool_build_ubuntu .
|
||||
Executable
+447
@@ -0,0 +1,447 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Software versions to install
|
||||
|
||||
_7ZIP_VERSION=2409
|
||||
BINUTILS_VERSION=2_44
|
||||
CLANG_VERSION=20.1.8
|
||||
CMAKE_VERSION=4.0.3
|
||||
FREEBSD_VERSION=12.4
|
||||
GCC_VERSION=15.1.0
|
||||
GLIBC_VERSION=2.41
|
||||
LINUX_HEADERS_VERSION=6.15.4
|
||||
MACOSX_SDK_VERSION=15.5
|
||||
MAKE_VERSION=4.4.1
|
||||
MINGW_VERSION=13.0.0
|
||||
XZ_VERSION=5.8.1
|
||||
|
||||
_7ZIP_SHA256="914c7e20ad5ef8e4d3cf08620ff8894b28fe11b7eb99809d6930870fbe48a281"
|
||||
CMAKE_SHA256="585ae9e013107bc8e7c7c9ce872cbdcbdff569e675b07ef57aacfb88c886faac"
|
||||
FREEBSD_AARCH64_SHA256="6c401819bfb93e810c9f9aa670a1e4685f924df5e7e0c9c6397dd6c16c954fa2"
|
||||
FREEBSD_X86_64_SHA256="581c7edacfd2fca2bdf5791f667402d22fccd8a5e184635e0cac075564d57aa8"
|
||||
GLIBC_SHA256="a5a26b22f545d6b7d7b3dd828e11e428f24f4fac43c934fb071b6a7d0828e901"
|
||||
HEADERS_SHA256="0eafd627b602f58d73917d00e4fc3196ba18cba67df6995a42aa74744d8efa16"
|
||||
MACOSX_SDK_SHA256="c15cf0f3f17d714d1aa5a642da8e118db53d79429eb015771ba816aa7c6c1cbd"
|
||||
MAKE_SHA256="dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3"
|
||||
|
||||
echo "Install prerequisites"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get update && apt-get upgrade -yq --no-install-recommends
|
||||
apt-get install -yq --no-install-recommends ca-certificates curl bzip2 flex texinfo bison ninja-build python3 file rsync xz-utils gawk gettext patch git gcc g++ make
|
||||
|
||||
echo "Install 7-zip"
|
||||
|
||||
cd /root
|
||||
|
||||
_7ZIP_FILE=7z$_7ZIP_VERSION-linux-x64.tar.xz
|
||||
|
||||
curl -L -O https://7-zip.org/a/$_7ZIP_FILE
|
||||
|
||||
_7ZIP_FILE_SHA256="$(sha256sum $_7ZIP_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $_7ZIP_FILE_SHA256 != $_7ZIP_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $_7ZIP_FILE - expected $_7ZIP_SHA256, got $_7ZIP_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar xf $_7ZIP_FILE
|
||||
cp -f 7zz /usr/local/bin/7z
|
||||
|
||||
echo "Install GCC"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-$GCC_VERSION git://gcc.gnu.org/git/gcc.git
|
||||
rm -rf gcc/.git
|
||||
|
||||
cd gcc
|
||||
contrib/download_prerequisites
|
||||
cd ..
|
||||
|
||||
mkdir gcc_build && cd gcc_build
|
||||
../gcc/configure --enable-languages=c,c++ --disable-multilib
|
||||
|
||||
make -j$(nproc) bootstrap
|
||||
make install
|
||||
|
||||
echo "Install gmp version from GCC"
|
||||
|
||||
cd /root/gcc_build/gmp
|
||||
make install
|
||||
|
||||
echo "Install mpfr version from GCC"
|
||||
|
||||
cd /root/gcc_build/mpfr
|
||||
make install
|
||||
|
||||
echo "Install binutils"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch binutils-$BINUTILS_VERSION git://sourceware.org/git/binutils-gdb.git
|
||||
rm -rf binutils-gdb/.git
|
||||
|
||||
cp -r binutils-gdb binutils-gdb-aarch64
|
||||
cp -r binutils-gdb binutils-gdb-riscv64
|
||||
cp -r binutils-gdb binutils-gdb-w64
|
||||
|
||||
cd binutils-gdb
|
||||
|
||||
CFLAGS='-std=gnu11 -O2' ./configure
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Install cmake"
|
||||
|
||||
cd /root
|
||||
|
||||
CMAKE_NAME=cmake-$CMAKE_VERSION-linux-x86_64
|
||||
CMAKE_FILE=$CMAKE_NAME.tar.gz
|
||||
|
||||
curl -L -O https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/$CMAKE_FILE
|
||||
|
||||
CMAKE_FILE_SHA256="$(sha256sum $CMAKE_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $CMAKE_FILE_SHA256 != $CMAKE_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $CMAKE_FILE - expected $CMAKE_SHA256, got $CMAKE_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar xvf $CMAKE_FILE
|
||||
cp $CMAKE_NAME/bin/* /usr/local/bin
|
||||
cp -r $CMAKE_NAME/share/cmake-4.0 /usr/local/share
|
||||
|
||||
echo "Install make"
|
||||
|
||||
cd /root
|
||||
|
||||
MAKE_NAME=make-$MAKE_VERSION
|
||||
MAKE_FILE=$MAKE_NAME.tar.gz
|
||||
|
||||
curl -L -O https://ftpmirror.gnu.org/make/$MAKE_FILE
|
||||
|
||||
MAKE_FILE_SHA256="$(sha256sum $MAKE_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $MAKE_FILE_SHA256 != $MAKE_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $MAKE_FILE - expected $MAKE_SHA256, got $MAKE_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar xvf $MAKE_FILE
|
||||
cd $MAKE_NAME
|
||||
CFLAGS='-O2' ./configure
|
||||
make
|
||||
cp -f make /usr/bin
|
||||
|
||||
echo "Install clang"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch llvmorg-$CLANG_VERSION https://github.com/llvm/llvm-project.git
|
||||
|
||||
cd llvm-project
|
||||
mkdir build && cd build
|
||||
cmake -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLLVM_ENABLE_PROJECTS="clang;lld;libc" -DCMAKE_BUILD_TYPE=Release -DLLVM_VERSION_SUFFIX="_p2pool" ../llvm
|
||||
ninja
|
||||
ninja install
|
||||
|
||||
cd ..
|
||||
mkdir build_runtimes
|
||||
cmake -G Ninja -S runtimes -B build_runtimes -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
ninja -C build_runtimes cxx cxxabi unwind
|
||||
ninja -C build_runtimes install
|
||||
|
||||
echo "Install binutils for aarch64-linux-gnu"
|
||||
|
||||
cd /root/binutils-gdb-aarch64
|
||||
|
||||
CFLAGS='-std=gnu11 -O2' ./configure --target=aarch64-linux-gnu
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Install Linux headers for aarch64-linux-gnu"
|
||||
|
||||
cd /root
|
||||
|
||||
HEADERS_FILE=linux-$LINUX_HEADERS_VERSION.tar.xz
|
||||
|
||||
curl -L -O https://www.kernel.org/pub/linux/kernel/v6.x/$HEADERS_FILE
|
||||
|
||||
HEADERS_FILE_SHA256="$(sha256sum $HEADERS_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $HEADERS_FILE_SHA256 != $HEADERS_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $HEADERS_FILE - expected $HEADERS_SHA256, got $HEADERS_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar xf linux-$LINUX_HEADERS_VERSION.tar.xz
|
||||
cd linux-$LINUX_HEADERS_VERSION
|
||||
make ARCH=arm64 INSTALL_HDR_PATH=/usr/local/aarch64-linux-gnu headers_install
|
||||
|
||||
echo "Install GCC for aarch64-linux-gnu"
|
||||
|
||||
cd /root
|
||||
|
||||
mkdir gcc_build_aarch64 && cd gcc_build_aarch64
|
||||
../gcc/configure --target=aarch64-linux-gnu --enable-languages=c,c++ --disable-multilib
|
||||
make -j$(nproc) all-gcc
|
||||
make install-gcc
|
||||
|
||||
echo "Install glibc for aarch64-linux-gnu"
|
||||
|
||||
cd /root
|
||||
|
||||
GLIBC_FILE=glibc-$GLIBC_VERSION.tar.xz
|
||||
|
||||
curl -L -O https://ftpmirror.gnu.org/glibc/$GLIBC_FILE
|
||||
|
||||
GLIBC_FILE_SHA256="$(sha256sum $GLIBC_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $GLIBC_FILE_SHA256 != $GLIBC_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $GLIBC_FILE - expected $GLIBC_SHA256, got $GLIBC_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar xf $GLIBC_FILE
|
||||
|
||||
mkdir glibc_build_aarch64 && cd glibc_build_aarch64
|
||||
CFLAGS='-O2' ../glibc-$GLIBC_VERSION/configure --build=x86_64-pc-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --prefix=/usr/local/aarch64-linux-gnu --with-headers=/usr/local/aarch64-linux-gnu/include --disable-multilib --disable-sanity-checks libc_cv_forced_unwind=yes --enable-static-nss
|
||||
make -j$(nproc) install-bootstrap-headers=yes install-headers
|
||||
make -j$(nproc) csu/subdir_lib
|
||||
install csu/crt1.o csu/crti.o csu/crtn.o /usr/local/aarch64-linux-gnu/lib
|
||||
|
||||
aarch64-linux-gnu-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /usr/local/aarch64-linux-gnu/lib/libc.so
|
||||
|
||||
touch /usr/local/aarch64-linux-gnu/include/gnu/stubs.h
|
||||
|
||||
cd /root/gcc_build_aarch64
|
||||
make -j$(nproc) all-target-libgcc
|
||||
make install-target-libgcc
|
||||
|
||||
cd /root/glibc_build_aarch64
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Finish installing GCC for aarch64-linux-gnu"
|
||||
|
||||
cd /root/gcc_build_aarch64
|
||||
make -j$(nproc) all-target-libstdc++-v3
|
||||
make install-target-libstdc++-v3
|
||||
|
||||
echo "Install binutils for riscv64-linux-gnu"
|
||||
|
||||
cd /root/binutils-gdb-riscv64
|
||||
|
||||
CFLAGS='-std=gnu11 -O2' ./configure --target=riscv64-linux-gnu
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Install Linux headers for riscv64-linux-gnu"
|
||||
|
||||
cd /root/linux-$LINUX_HEADERS_VERSION
|
||||
make ARCH=riscv INSTALL_HDR_PATH=/usr/local/riscv64-linux-gnu headers_install
|
||||
|
||||
echo "Install GCC for riscv64-linux-gnu"
|
||||
|
||||
cd /root
|
||||
|
||||
mkdir gcc_build_riscv64 && cd gcc_build_riscv64
|
||||
../gcc/configure --target=riscv64-linux-gnu --enable-languages=c,c++ --disable-multilib
|
||||
make -j$(nproc) all-gcc
|
||||
make install-gcc
|
||||
|
||||
echo "Install glibc for riscv64-linux-gnu"
|
||||
|
||||
cd /root
|
||||
|
||||
mkdir glibc_build_riscv64 && cd glibc_build_riscv64
|
||||
CFLAGS='-O2' ../glibc-$GLIBC_VERSION/configure --build=x86_64-pc-linux-gnu --host=riscv64-linux-gnu --target=riscv64-linux-gnu --prefix=/usr/local/riscv64-linux-gnu --with-headers=/usr/local/riscv64-linux-gnu/include --disable-multilib --disable-sanity-checks libc_cv_forced_unwind=yes --enable-static-nss
|
||||
make -j$(nproc) install-bootstrap-headers=yes install-headers
|
||||
make -j$(nproc) csu/subdir_lib
|
||||
install csu/crt1.o csu/crti.o csu/crtn.o /usr/local/riscv64-linux-gnu/lib
|
||||
|
||||
riscv64-linux-gnu-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /usr/local/riscv64-linux-gnu/lib/libc.so
|
||||
|
||||
touch /usr/local/riscv64-linux-gnu/include/gnu/stubs.h
|
||||
|
||||
cd /root/gcc_build_riscv64
|
||||
make -j$(nproc) all-target-libgcc
|
||||
make install-target-libgcc
|
||||
|
||||
cd /root/glibc_build_riscv64
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Finish installing GCC for riscv64-linux-gnu"
|
||||
|
||||
cd /root/gcc_build_riscv64
|
||||
make -j$(nproc) all-target-libstdc++-v3
|
||||
make install-target-libstdc++-v3
|
||||
|
||||
echo "Add lib path for lld"
|
||||
|
||||
ln -s /usr/local/riscv64-linux-gnu/lib /usr/local/riscv64-linux-gnu/lib64
|
||||
|
||||
echo "Install binutils for x86_64-w64-mingw32"
|
||||
|
||||
cd /root/binutils-gdb-w64
|
||||
|
||||
CFLAGS='-std=gnu11 -O2' ./configure --target=x86_64-w64-mingw32
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Install mingw-w64 headers"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth=1 --branch v$MINGW_VERSION https://git.code.sf.net/p/mingw-w64/mingw-w64 mingw-w64-v$MINGW_VERSION
|
||||
rm -rf mingw-w64-v$MINGW_VERSION/.git
|
||||
|
||||
cd mingw-w64-v$MINGW_VERSION/mingw-w64-headers
|
||||
CFLAGS='-O2' ./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/x86_64-w64-mingw32 --with-default-msvcrt=msvcrt --with-default-win32-winnt=0x0600
|
||||
make install
|
||||
|
||||
echo "Install GCC for x86_64-w64-mingw32"
|
||||
|
||||
cd /root
|
||||
|
||||
mkdir gcc_build_w64 && cd gcc_build_w64
|
||||
../gcc/configure --target=x86_64-w64-mingw32 --enable-languages=c,c++ --disable-multilib
|
||||
make -j$(nproc) all-gcc
|
||||
make install-gcc
|
||||
|
||||
echo "Install mingw-w64 CRT"
|
||||
|
||||
# Need to do it two times for some reason - first time without pthreads, or it will fail to link.
|
||||
cd /root/mingw-w64-v$MINGW_VERSION
|
||||
CFLAGS='-O2' ./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/x86_64-w64-mingw32 --with-default-msvcrt=msvcrt --with-default-win32-winnt=0x0600
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) install
|
||||
|
||||
cd /root/mingw-w64-v$MINGW_VERSION
|
||||
CFLAGS='-O2' ./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/x86_64-w64-mingw32 --with-default-msvcrt=msvcrt --with-default-win32-winnt=0x0600 --with-libraries=winpthreads
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) install
|
||||
|
||||
echo "Finish installing GCC for x86_64-w64-mingw32"
|
||||
|
||||
cd /root/gcc_build_w64
|
||||
make -j$(nproc) all-target-libstdc++-v3
|
||||
make install-target-libstdc++-v3
|
||||
|
||||
echo "Install glibc for x86_64-pc-linux-gnu"
|
||||
|
||||
cd /root
|
||||
|
||||
mkdir glibc_build_x86_64 && cd glibc_build_x86_64
|
||||
CFLAGS='-O2' ../glibc-$GLIBC_VERSION/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --prefix=/usr/local/x86_64-pc-linux-gnu --disable-multilib --enable-static-nss
|
||||
make -j$(nproc) install-bootstrap-headers=yes install-headers
|
||||
make -j$(nproc) csu/subdir_lib
|
||||
|
||||
install csu/crt1.o csu/crti.o csu/crtn.o /usr/local/x86_64-pc-linux-gnu/lib
|
||||
|
||||
gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /usr/local/x86_64-pc-linux-gnu/lib/libc.so
|
||||
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
echo "Get osxcross"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --branch 2.0-llvm-based https://github.com/tpoechtrager/osxcross
|
||||
cd osxcross
|
||||
git checkout cb444e230e815c06202bef1c30eca5d353235a05
|
||||
|
||||
echo "Get MacOSX $MACOSX_SDK_VERSION SDK"
|
||||
|
||||
cd /root/osxcross/tarballs
|
||||
|
||||
MACOSX_SDK_FILE=MacOSX$MACOSX_SDK_VERSION.sdk.tar.xz
|
||||
|
||||
curl -L -O https://github.com/joseluisq/macosx-sdks/releases/download/$MACOSX_SDK_VERSION/$MACOSX_SDK_FILE
|
||||
|
||||
MACOSX_SDK_FILE_SHA256="$(sha256sum $MACOSX_SDK_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $MACOSX_SDK_FILE_SHA256 != $MACOSX_SDK_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $MACOSX_SDK_FILE - expected $MACOSX_SDK_SHA256, got $MACOSX_SDK_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Build MacOSX cross compilers"
|
||||
|
||||
cd /root/osxcross
|
||||
TARGET_DIR=/usr/local OSX_VERSION_MIN=10.15 UNATTENDED=1 ./build.sh
|
||||
./build_compiler_rt.sh
|
||||
|
||||
echo "Install FreeBSD $FREEBSD_VERSION SDK"
|
||||
|
||||
cd /usr/local
|
||||
|
||||
FREEBSD_FILE=base.txz
|
||||
|
||||
mkdir cross-freebsd-x86_64 && mkdir cross-freebsd-aarch64
|
||||
curl -L -Z -o cross-freebsd-x86_64/$FREEBSD_FILE -o cross-freebsd-aarch64/$FREEBSD_FILE https://archive.freebsd.org/old-releases/amd64/$FREEBSD_VERSION-RELEASE/$FREEBSD_FILE https://archive.freebsd.org/old-releases/arm64/$FREEBSD_VERSION-RELEASE/$FREEBSD_FILE
|
||||
|
||||
cd /usr/local/cross-freebsd-x86_64
|
||||
|
||||
FREEBSD_X86_64_FILE_SHA256="$(sha256sum $FREEBSD_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $FREEBSD_X86_64_FILE_SHA256 != $FREEBSD_X86_64_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $FREEBSD_FILE - expected $FREEBSD_X86_64_SHA256, got $FREEBSD_X86_64_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar -xf $FREEBSD_FILE ./lib/ ./usr/lib/ ./usr/include/
|
||||
rm $FREEBSD_FILE
|
||||
#find /usr/local/cross-freebsd-x86_64/usr/lib -xtype l|xargs ls -l|grep ' /lib/'|awk '{print "ln -sf /usr/local/cross-freebsd-x86_64"$11 " " $9}'|/bin/sh
|
||||
|
||||
cd /usr/local/cross-freebsd-aarch64
|
||||
|
||||
FREEBSD_AARCH64_FILE_SHA256="$(sha256sum $FREEBSD_FILE | awk '{ print $1 }')"
|
||||
|
||||
if [ $FREEBSD_AARCH64_FILE_SHA256 != $FREEBSD_AARCH64_SHA256 ]; then
|
||||
echo "Error: SHA256 sum does not match for $FREEBSD_FILE - expected $FREEBSD_AARCH64_SHA256, got $FREEBSD_AARCH64_FILE_SHA256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar -xf $FREEBSD_FILE ./lib/ ./usr/lib/ ./usr/include/
|
||||
rm $FREEBSD_FILE
|
||||
#find /usr/local/cross-freebsd-aarch64/usr/lib -xtype l|xargs ls -l|grep ' /lib/'|awk '{print "ln -sf /usr/local/cross-freebsd-aarch64"$11 " " $9}'|/bin/sh
|
||||
|
||||
echo "Install xz"
|
||||
|
||||
apt-get remove -yq xz-utils
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth=1 --branch v$XZ_VERSION https://github.com/tukaani-project/xz
|
||||
cd xz
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang
|
||||
make -j$(nproc)
|
||||
|
||||
cp -f lzma* /usr/bin
|
||||
cp -f xz* /usr/bin
|
||||
|
||||
echo "Deleting system glibc files to force our glibc"
|
||||
|
||||
rm /usr/lib/x86_64-linux-gnu/crt1.o
|
||||
rm /usr/lib/x86_64-linux-gnu/crti.o
|
||||
rm /usr/lib/x86_64-linux-gnu/crtn.o
|
||||
rm /usr/lib/x86_64-linux-gnu/libc.a
|
||||
|
||||
echo "Deleting temporary files"
|
||||
|
||||
cd /root
|
||||
rm -rf *
|
||||
|
||||
echo "Cloning the repository"
|
||||
|
||||
cd /
|
||||
git clone --recursive --jobs $(nproc) https://github.com/SChernykh/p2pool
|
||||
|
||||
echo "All done"
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_linux_aarch64.sh /p2pool/
|
||||
RUN /p2pool/p2pool_linux_aarch64.sh p2pool-${P2POOL_VERSION}-linux-aarch64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_aarch64_build_$1 .
|
||||
|
||||
docker create --name p2pool_ubuntu_aarch64_build_$1_container p2pool_ubuntu_aarch64_build_$1:latest
|
||||
docker cp p2pool_ubuntu_aarch64_build_$1_container:/p2pool/build/p2pool-$1-linux-aarch64.tar.gz ../p2pool-$1-linux-aarch64.tar.gz
|
||||
docker rm p2pool_ubuntu_aarch64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_ubuntu_aarch64_build_$1
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $3
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections"
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="--target=aarch64-linux-gnu -Os -flto -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
flags_p2pool="--target=aarch64-linux-gnu -fuse-ld=lld -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=aarch64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool
|
||||
|
||||
tar cvf $1.tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" $1
|
||||
touch -t $TOUCH_DATE $1.tar
|
||||
7z a -tgzip -mx9 -mfb256 -stl $1.tar.gz $1.tar
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_linux_riscv64.sh /p2pool/
|
||||
RUN /p2pool/p2pool_linux_riscv64.sh p2pool-${P2POOL_VERSION}-linux-riscv64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_riscv64_build_$1 .
|
||||
|
||||
docker create --name p2pool_ubuntu_riscv64_build_$1_container p2pool_ubuntu_riscv64_build_$1:latest
|
||||
docker cp p2pool_ubuntu_riscv64_build_$1_container:/p2pool/build/p2pool-$1-linux-riscv64.tar.gz ../p2pool-$1-linux-riscv64.tar.gz
|
||||
docker rm p2pool_ubuntu_riscv64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_ubuntu_riscv64_build_$1
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections"
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="--target=riscv64-linux-gnu -Os -flto -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
flags_p2pool="--target=riscv64-linux-gnu -fuse-ld=lld -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/riscv64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/riscv64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/riscv64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=riscv64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool
|
||||
|
||||
tar cvf $1.tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" $1
|
||||
touch -t $TOUCH_DATE $1.tar
|
||||
7z a -tgzip -mx9 -mfb256 -stl $1.tar.gz $1.tar
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_linux_x64.sh /p2pool/
|
||||
RUN /p2pool/p2pool_linux_x64.sh p2pool-${P2POOL_VERSION}-linux-x64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_linux_x64_build_$1 .
|
||||
|
||||
docker create --name p2pool_linux_x64_build_$1_container p2pool_linux_x64_build_$1:latest
|
||||
docker cp p2pool_linux_x64_build_$1_container:/p2pool/build/p2pool-$1-linux-x64.tar.gz ../p2pool-$1-linux-x64.tar.gz
|
||||
docker rm p2pool_linux_x64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_linux_x64_build_$1
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections"
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="-Os -flto -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
flags_p2pool="-fuse-ld=lld -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DSTATIC_BINARY=ON -DARCH_ID=x86_64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool
|
||||
|
||||
tar cvf $1.tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" $1
|
||||
touch -t $TOUCH_DATE $1.tar
|
||||
7z a -tgzip -mx9 -mfb256 -stl $1.tar.gz $1.tar
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_macos_aarch64.sh zutil.patch /p2pool/
|
||||
RUN /p2pool/p2pool_macos_aarch64.sh p2pool-${P2POOL_VERSION}-macos-aarch64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_macos_aarch64_build_$1 .
|
||||
|
||||
docker create --name p2pool_macos_aarch64_build_$1_container p2pool_macos_aarch64_build_$1:latest
|
||||
docker cp p2pool_macos_aarch64_build_$1_container:/p2pool/build/p2pool-$1-macos-aarch64.tar.gz ../p2pool-$1-macos-aarch64.tar.gz
|
||||
docker rm p2pool_macos_aarch64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_macos_aarch64_build_$1
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size=""
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="-Os -flto -w $flags_size $flags_datetime"
|
||||
flags_p2pool="$flags_size $flags_datetime"
|
||||
|
||||
patch -u /p2pool/external/src/grpc/third_party/zlib/zutil.h -i /p2pool/zutil.patch
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/macos_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/macos_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/macos_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/macos_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_LIBS=ON -DARCH_ID=aarch64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool
|
||||
|
||||
tar cvf $1.tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" $1
|
||||
touch -t $TOUCH_DATE $1.tar
|
||||
7z a -tgzip -mx9 -mfb256 -stl $1.tar.gz $1.tar
|
||||
@@ -0,0 +1,10 @@
|
||||
--- zutil.h
|
||||
+++ zutil.h
|
||||
@@ -144,7 +144,6 @@
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
-# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_macos_x64.sh zutil.patch /p2pool/
|
||||
RUN /p2pool/p2pool_macos_x64.sh p2pool-${P2POOL_VERSION}-macos-x64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_macos_x64_build_$1 .
|
||||
|
||||
docker create --name p2pool_macos_x64_build_$1_container p2pool_macos_x64_build_$1:latest
|
||||
docker cp p2pool_macos_x64_build_$1_container:/p2pool/build/p2pool-$1-macos-x64.tar.gz ../p2pool-$1-macos-x64.tar.gz
|
||||
docker rm p2pool_macos_x64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_macos_x64_build_$1
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size=""
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="-Os -flto -w $flags_size $flags_datetime"
|
||||
flags_p2pool="$flags_size $flags_datetime"
|
||||
|
||||
patch -u /p2pool/external/src/grpc/third_party/zlib/zutil.h -i /p2pool/zutil.patch
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/macos_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/macos_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/macos_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/macos_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_LIBS=ON -DARCH_ID=x86_64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool
|
||||
|
||||
tar cvf $1.tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" $1
|
||||
touch -t $TOUCH_DATE $1.tar
|
||||
7z a -tgzip -mx9 -mfb256 -stl $1.tar.gz $1.tar
|
||||
@@ -0,0 +1,10 @@
|
||||
--- zutil.h
|
||||
+++ zutil.h
|
||||
@@ -144,7 +144,6 @@
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
-# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_source.sh /root
|
||||
RUN /root/p2pool_source.sh ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_source_build_$1 .
|
||||
|
||||
docker create --name p2pool_source_build_$1_container p2pool_source_build_$1:latest
|
||||
docker cp p2pool_source_build_$1_container:/p2pool_source-$1.tar.xz ../p2pool_source-$1.tar.xz
|
||||
docker rm p2pool_source_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_source_build_$1
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $1
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $1)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
cd /
|
||||
|
||||
tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" --exclude=".git" -f p2pool_source-$1.tar -c p2pool
|
||||
touch -t $TOUCH_DATE p2pool_source-$1.tar
|
||||
|
||||
xz --version
|
||||
xz --lzma2=preset=9e,dict=256MiB,pb=0 p2pool_source-$1.tar
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_build_ubuntu
|
||||
ARG P2POOL_VERSION
|
||||
ADD p2pool_windows_x64.sh /p2pool/
|
||||
RUN /p2pool/p2pool_windows_x64.sh p2pool-${P2POOL_VERSION}-windows-x64 ${P2POOL_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_windows_x64_build_$1 .
|
||||
|
||||
docker create --name p2pool_windows_x64_build_$1_container p2pool_windows_x64_build_$1:latest
|
||||
docker cp p2pool_windows_x64_build_$1_container:/p2pool/build/p2pool-$1-windows-x64.zip ../p2pool-$1-windows-x64.zip
|
||||
docker rm p2pool_windows_x64_build_$1_container
|
||||
|
||||
docker image rm -f p2pool_windows_x64_build_$1
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections"
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="--target=x86_64-pc-windows-gnu -Os -flto -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
|
||||
flags_p2pool="--target=x86_64-pc-windows-gnu -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
flags_cxx_headers="-isystem /usr/local/x86_64-w64-mingw32/include/c++ -isystem /usr/local/x86_64-w64-mingw32/include/c++/15.1.0 -isystem /usr/local/x86_64-w64-mingw32/include"
|
||||
|
||||
cd /p2pool
|
||||
git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/boringssl-with-bazel patches/boringssl/win7.patch
|
||||
|
||||
cd /p2pool/external/src/curl
|
||||
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
|
||||
make -j$(nproc)
|
||||
cd lib && cp -f libcurl.a .libs
|
||||
|
||||
cd /p2pool/external/src/libuv
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool/external/src/libzmq
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DCMAKE_CXX_FLAGS="$flags_libs" -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF -DPOLLER=epoll
|
||||
make -j$(nproc)
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool $flags_cxx_headers" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=x86_64
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
mkdir $1
|
||||
|
||||
mv p2pool.exe $1
|
||||
mv ../LICENSE $1
|
||||
mv ../README.md $1
|
||||
|
||||
chmod -R 0664 $1
|
||||
chmod 0775 $1
|
||||
chmod 0775 $1/p2pool.exe
|
||||
|
||||
touch -t $TOUCH_DATE $1
|
||||
touch -t $TOUCH_DATE $1/*
|
||||
7z a -tzip -mx9 -mfb256 -stl $1.zip $1
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
* Portions Copyright (c) 2012-2013 The Cryptonote developers
|
||||
* Portions Copyright (c) 2014-2021 The Monero Project
|
||||
* Portions Copyright (c) 2021 XMRig <https://github.com/xmrig>
|
||||
@@ -741,7 +741,7 @@ void BlockTemplate::fill_optimal_knapsack(const MinerData& data, uint64_t base_r
|
||||
constexpr uint64_t FEE_COEFF = 1000;
|
||||
|
||||
const uint64_t n = m_mempoolTxs.size();
|
||||
const uint64_t max_weight = data.median_weight + (data.median_weight / 32) - miner_tx_weight;
|
||||
const uint64_t max_weight = data.median_weight + (data.median_weight / 8) - miner_tx_weight;
|
||||
|
||||
m_knapsack.resize((n + 1) * max_weight);
|
||||
memset(m_knapsack.data(), 0, max_weight * sizeof(uint32_t));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+8
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -80,7 +80,7 @@
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
#elif defined(__linux__) || defined(__unix__) || defined(_POSIX_VERSION) || defined(__MACH__)
|
||||
|
||||
@@ -108,6 +108,12 @@ extern "C" void __asan_unpoison_memory_region(void const volatile* addr, size_t
|
||||
#define ASAN_UNPOISON_MEMORY_REGION(addr, size)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NSS_MODULE_DISABLE_LOADING
|
||||
extern "C" void __nss_module_disable_loading();
|
||||
#else
|
||||
#define __nss_module_disable_loading()
|
||||
#endif
|
||||
|
||||
namespace p2pool {
|
||||
|
||||
constexpr size_t HASH_SIZE = 32;
|
||||
|
||||
+125
-41
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021 hyc <https://github.com/hyc>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -84,21 +84,30 @@ ConsoleCommands::ConsoleCommands(p2pool* pool)
|
||||
}
|
||||
}
|
||||
|
||||
std::random_device rd;
|
||||
std::mt19937_64 rng(rd());
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
if (start_listening(false, "127.0.0.1", 49152 + (rng() % 16384))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_listenPort < 0) {
|
||||
LOGERR(1, "failed to listen on TCP port");
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
if (m_pool->api() && m_pool->params().m_localStats) {
|
||||
std::mt19937_64 rng(RandomDeviceSeed::instance);
|
||||
|
||||
// Diffuse the initial state in case it has low quality
|
||||
rng.discard(10000);
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
if (start_listening(false, "127.0.0.1", 49152 + (rng() % 16384))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_listenPort < 0) {
|
||||
LOGERR(1, "failed to listen on TCP port");
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
// 20 random characters in the range [32, 126] should be enough for 128 bits of entropy
|
||||
m_cookie.resize(20);
|
||||
|
||||
for (char& c : m_cookie) {
|
||||
c = static_cast<char>(rng() % (127 - 32) + 32);
|
||||
}
|
||||
|
||||
m_pool->api()->set(p2pool_api::Category::LOCAL, "console",
|
||||
[stdin_type, this](log::Stream& s)
|
||||
{
|
||||
@@ -114,7 +123,7 @@ ConsoleCommands::ConsoleCommands(p2pool* pool)
|
||||
s << static_cast<int>(stdin_type);
|
||||
}
|
||||
|
||||
s << "\",\"tcp_port\":" << m_listenPort << '}';
|
||||
s << "\",\"tcp_port\":" << m_listenPort << ",\"cookie\":\"" << log::EscapedString(m_cookie) << "\"}";
|
||||
});
|
||||
}
|
||||
|
||||
@@ -194,9 +203,14 @@ static void do_help(p2pool * /* m_pool */, const char * /* args */)
|
||||
|
||||
static void do_status(p2pool *m_pool, const char * /* args */)
|
||||
{
|
||||
m_pool->side_chain().print_status();
|
||||
if (m_pool->stratum_server()) {
|
||||
m_pool->stratum_server()->print_status();
|
||||
const SideChain& c = m_pool->side_chain();
|
||||
|
||||
c.print_status();
|
||||
|
||||
StratumServer* stratum = m_pool->stratum_server();
|
||||
|
||||
if (stratum) {
|
||||
stratum->print_status();
|
||||
}
|
||||
|
||||
P2PServer* p2p = m_pool->p2p_server();
|
||||
@@ -215,6 +229,66 @@ static void do_status(p2pool *m_pool, const char * /* args */)
|
||||
if (p2p) {
|
||||
p2p->check_for_updates(true);
|
||||
}
|
||||
|
||||
int node_health = 10;
|
||||
std::vector<const char*> comments;
|
||||
|
||||
if (!stratum) {
|
||||
node_health = 0;
|
||||
comments.push_back("Stratum server not loaded");
|
||||
}
|
||||
|
||||
if (!p2p) {
|
||||
node_health = 0;
|
||||
comments.push_back("P2P server not loaded");
|
||||
}
|
||||
else if (p2p->num_connections() == 0) {
|
||||
node_health = 0;
|
||||
comments.push_back("No p2p connections");
|
||||
}
|
||||
else if (p2p->num_incoming_connections() == 0) {
|
||||
node_health -= 1;
|
||||
comments.push_back("No incoming p2p connections");
|
||||
}
|
||||
|
||||
const PoolBlock* tip = c.chainTip();
|
||||
|
||||
if (!tip) {
|
||||
node_health = 0;
|
||||
comments.push_back("Sidechain not loaded");
|
||||
}
|
||||
else if (!c.precalcFinished()) {
|
||||
node_health -= 1;
|
||||
comments.push_back("Sidechain just synced, it needs a few minutes to confirm that everything is ok");
|
||||
}
|
||||
|
||||
const MinerData data = m_pool->miner_data();
|
||||
|
||||
if (tip && (data.height < tip->m_txinGenHeight)) {
|
||||
node_health -= 5;
|
||||
comments.push_back("Your Monero node is lagging");
|
||||
}
|
||||
|
||||
if (stratum && (stratum->num_connections() == 0)) {
|
||||
node_health -= 1;
|
||||
comments.push_back("No stratum connections");
|
||||
}
|
||||
|
||||
auto health_color = [](int health) {
|
||||
if (health >= 8) {
|
||||
return log::LightGreen::value;
|
||||
}
|
||||
if (health >= 5) {
|
||||
return log::LightYellow::value;
|
||||
}
|
||||
return log::LightRed::value;
|
||||
};
|
||||
|
||||
LOGINFO(0, health_color(node_health) << "Node health: " << std::max(node_health, 0) << "/10");
|
||||
|
||||
for (const char* comment : comments) {
|
||||
LOGINFO(0, log::LightYellow() << comment);
|
||||
}
|
||||
}
|
||||
|
||||
static void do_loglevel(p2pool * /* m_pool */, const char *args)
|
||||
@@ -321,7 +395,7 @@ static void do_exit(p2pool *m_pool, const char * /* args */)
|
||||
// cppcheck-suppress constParameterCallback
|
||||
static void do_version(p2pool* m_pool, const char* /* args */)
|
||||
{
|
||||
LOGINFO(0, log::LightCyan() << VERSION);
|
||||
LOGINFO(0, log::LightCyan() << p2pool_version());
|
||||
|
||||
const P2PServer* p2p = m_pool->p2p_server();
|
||||
if (p2p) {
|
||||
@@ -349,7 +423,7 @@ void ConsoleCommands::stdinReadCallback(uv_stream_t* stream, ssize_t nread, cons
|
||||
ConsoleCommands* pThis = static_cast<ConsoleCommands*>(stream->data);
|
||||
|
||||
if (nread > 0) {
|
||||
pThis->process_input(pThis->m_command, buf->base, static_cast<uint32_t>(nread));
|
||||
pThis->process_input(pThis->m_command, buf->base, static_cast<uint32_t>(nread), false);
|
||||
}
|
||||
else if (nread < 0) {
|
||||
LOGWARN(4, "read error " << uv_err_name(static_cast<int>(nread)));
|
||||
@@ -359,7 +433,7 @@ void ConsoleCommands::stdinReadCallback(uv_stream_t* stream, ssize_t nread, cons
|
||||
}
|
||||
|
||||
|
||||
void ConsoleCommands::process_input(std::string& command, const char* data, uint32_t size)
|
||||
void ConsoleCommands::process_input(std::string& command, const char* data, uint32_t size, bool check_cookie)
|
||||
{
|
||||
command.append(data, size);
|
||||
|
||||
@@ -370,31 +444,41 @@ void ConsoleCommands::process_input(std::string& command, const char* data, uint
|
||||
}
|
||||
command[k] = '\0';
|
||||
|
||||
cmd* c = cmds;
|
||||
for (; c->name.len; ++c) {
|
||||
if (!strncmp(command.c_str(), c->name.str, c->name.len)) {
|
||||
const char* args = (c->name.len + 1 <= k) ? (command.c_str() + c->name.len + 1) : "";
|
||||
if (check_cookie && ((k <= m_cookie.length()) || (memcmp(command.data(), m_cookie.data(), m_cookie.length()) != 0))) {
|
||||
LOGWARN(4, "cookie check failed, skipping command " << log::MaskNonASCII(command));
|
||||
}
|
||||
else {
|
||||
if (check_cookie) {
|
||||
command.erase(0, m_cookie.length());
|
||||
k -= m_cookie.length();
|
||||
}
|
||||
|
||||
// Skip spaces
|
||||
while ((args[0] == ' ') || (args[0] == '\t')) {
|
||||
++args;
|
||||
}
|
||||
cmd* c = cmds;
|
||||
for (; c->name.len; ++c) {
|
||||
if (!strncmp(command.c_str(), c->name.str, c->name.len)) {
|
||||
const char* args = (c->name.len + 1 <= k) ? (command.c_str() + c->name.len + 1) : "";
|
||||
|
||||
// Check if an argument is required
|
||||
if (strlen(c->arg) && !strlen(args)) {
|
||||
LOGWARN(0, c->name.str << " requires arguments");
|
||||
do_help(nullptr, nullptr);
|
||||
// Skip spaces
|
||||
while ((args[0] == ' ') || (args[0] == '\t')) {
|
||||
++args;
|
||||
}
|
||||
|
||||
// Check if an argument is required
|
||||
if (strlen(c->arg) && !strlen(args)) {
|
||||
LOGWARN(0, c->name.str << " requires arguments");
|
||||
do_help(nullptr, nullptr);
|
||||
break;
|
||||
}
|
||||
|
||||
c->func(m_pool, args);
|
||||
break;
|
||||
}
|
||||
|
||||
c->func(m_pool, args);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->name.len) {
|
||||
LOGWARN(0, "Unknown command " << command.c_str());
|
||||
do_help(nullptr, nullptr);
|
||||
if (!c->name.len) {
|
||||
LOGWARN(0, "Unknown command " << log::MaskNonASCII(command));
|
||||
do_help(nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
k = command.find_first_not_of("\r\n", k + 1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
size_t size() const override { return sizeof(ConsoleClient); }
|
||||
|
||||
bool on_connect() override { return true; };
|
||||
bool on_read(const char* data, uint32_t size) override { static_cast<ConsoleCommands*>(m_owner)->process_input(m_command, data, size); return true; };
|
||||
bool on_read(const char* data, uint32_t size) override { static_cast<ConsoleCommands*>(m_owner)->process_input(m_command, data, size, true); return true; };
|
||||
|
||||
alignas(8) char m_consoleReadBuf[1024] = {};
|
||||
|
||||
@@ -62,11 +62,12 @@ private:
|
||||
bool m_readBufInUse;
|
||||
|
||||
std::string m_command;
|
||||
std::string m_cookie;
|
||||
|
||||
static void allocCallback(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
|
||||
static void stdinReadCallback(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
|
||||
|
||||
void process_input(std::string& command, const char* data, uint32_t size);
|
||||
void process_input(std::string& command, const char* data, uint32_t size, bool check_cookie);
|
||||
};
|
||||
|
||||
} // namespace p2pool
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -80,6 +80,8 @@ struct CurlContext
|
||||
|
||||
uint64_t m_startTime;
|
||||
uint64_t m_connectedTime;
|
||||
|
||||
std::string m_proxy;
|
||||
};
|
||||
|
||||
CurlContext::CurlContext(const std::string& address, int port, const std::string& req, const std::string& auth, const std::string& proxy, bool ssl, const std::string& ssl_fingerprint, CallbackBase* cb, CallbackBase* close_cb, uv_loop_t* loop)
|
||||
@@ -93,6 +95,7 @@ CurlContext::CurlContext(const std::string& address, int port, const std::string
|
||||
, m_headers(nullptr)
|
||||
, m_startTime(0)
|
||||
, m_connectedTime(0)
|
||||
, m_proxy(proxy)
|
||||
{
|
||||
m_pollHandles.reserve(2);
|
||||
|
||||
@@ -111,8 +114,10 @@ CurlContext::CurlContext(const std::string& address, int port, const std::string
|
||||
(void)ssl_fingerprint;
|
||||
#endif
|
||||
|
||||
const bool is_v6 = (address.find(':') != std::string::npos);
|
||||
|
||||
log::Stream s(buf);
|
||||
s << protocol << address << ':' << port;
|
||||
s << protocol << (is_v6 ? "[" : "") << address << (is_v6 ? "]:" : ":") << port;
|
||||
|
||||
if (!m_req.empty() && (m_req.front() == '/')) {
|
||||
s << m_req.c_str() << '\0';
|
||||
@@ -242,9 +247,8 @@ CurlContext::~CurlContext()
|
||||
double tcp_ping = 0.0;
|
||||
|
||||
if (m_error.empty() && !m_response.empty()) {
|
||||
if (m_connectedTime) {
|
||||
tcp_ping = static_cast<double>(m_connectedTime - m_startTime) / 1000.0;
|
||||
}
|
||||
const uint64_t t = (m_proxy.empty() && m_connectedTime) ? m_connectedTime : microseconds_since_epoch();
|
||||
tcp_ping = static_cast<double>(t - m_startTime) / 1000.0;
|
||||
(*m_callback)(m_response.data(), m_response.size(), tcp_ping);
|
||||
}
|
||||
delete m_callback;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+62
-12
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <clocale>
|
||||
|
||||
#if defined(_WIN32) && !defined(S_ISREG)
|
||||
#define S_ISREG(M) (((M) & _S_IFMT) == _S_IFREG)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
@@ -118,6 +122,7 @@ public:
|
||||
: m_writePos(0)
|
||||
, m_readPos(0)
|
||||
, m_stopped(false)
|
||||
, m_needReopen(false)
|
||||
{
|
||||
#if defined(_WIN32) && defined(_MSC_VER) && !defined(NDEBUG)
|
||||
SetUnhandledExceptionFilter(UnhandledExceptionFilter);
|
||||
@@ -128,11 +133,6 @@ public:
|
||||
std::setlocale(LC_ALL, "en_001");
|
||||
|
||||
m_logFilePath = DATA_DIR + log_file_name;
|
||||
m_logFile.open(m_logFilePath, std::ios::app | std::ios::binary);
|
||||
|
||||
if (!m_logFile.is_open()) {
|
||||
fprintf(stderr, "failed to open %s: error %d\n", m_logFilePath.c_str(), errno);
|
||||
}
|
||||
|
||||
m_buf.resize(BUF_SIZE);
|
||||
|
||||
@@ -219,6 +219,12 @@ public:
|
||||
|
||||
const std::string& log_file_path() const { return m_logFilePath; }
|
||||
|
||||
FORCEINLINE void schedule_reopen()
|
||||
{
|
||||
m_needReopen = true;
|
||||
uv_cond_signal(&m_cond);
|
||||
}
|
||||
|
||||
private:
|
||||
static void init_uv_threadpool()
|
||||
{
|
||||
@@ -245,13 +251,41 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
bool reopen(struct stat& st)
|
||||
{
|
||||
st = {};
|
||||
|
||||
if (m_logFile.is_open()) {
|
||||
m_logFile.close();
|
||||
}
|
||||
|
||||
m_logFile.open(m_logFilePath, std::ios::app | std::ios::binary);
|
||||
|
||||
if (!m_logFile.is_open()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stat(m_logFilePath.c_str(), &st) != 0) {
|
||||
st = {};
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
static void run_wrapper(void* arg) { reinterpret_cast<Worker*>(arg)->run(); }
|
||||
|
||||
NOINLINE void run()
|
||||
{
|
||||
set_thread_name("Logger");
|
||||
|
||||
|
||||
struct stat log_file_st;
|
||||
|
||||
if (!reopen(log_file_st)) {
|
||||
fprintf(stderr, "failed to open %s: error %d\n", m_logFilePath.c_str(), errno);
|
||||
}
|
||||
|
||||
do {
|
||||
uv_mutex_lock(&m_mutex);
|
||||
if (m_readPos == m_writePos.load()) {
|
||||
@@ -264,6 +298,14 @@ private:
|
||||
}
|
||||
uv_mutex_unlock(&m_mutex);
|
||||
|
||||
bool expected = true;
|
||||
if (m_needReopen.compare_exchange_strong(expected, false)) {
|
||||
// Reopen the log file on request (logrotate support)
|
||||
if(reopen(log_file_st)) {
|
||||
LOGINFO(0, "reopened " << m_logFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
for (uint32_t writePos = m_writePos.load(); m_readPos != writePos; writePos = m_writePos.load()) {
|
||||
// We have at least one log slot pending, possibly more than one
|
||||
// Process everything in a loop before reading m_writePos again
|
||||
@@ -327,11 +369,18 @@ private:
|
||||
if (m_logFile.is_open()) {
|
||||
m_logFile.flush();
|
||||
|
||||
// Reopen the log file if it's been moved (logrotate support)
|
||||
// Automatically reopen the file if either it
|
||||
// no longer exists or it is now a different
|
||||
// regular file; this detects manual moving or
|
||||
// recreating of the file
|
||||
struct stat buf;
|
||||
if (stat(m_logFilePath.c_str(), &buf) != 0) {
|
||||
m_logFile.close();
|
||||
m_logFile.open(m_logFilePath, std::ios::app | std::ios::binary);
|
||||
if (stat(m_logFilePath.c_str(), &buf) == 0) {
|
||||
if(log_file_st.st_dev && log_file_st.st_ino && S_ISREG(buf.st_mode) &&
|
||||
(buf.st_dev != log_file_st.st_dev || buf.st_ino != log_file_st.st_ino)) {
|
||||
reopen(log_file_st);
|
||||
}
|
||||
} else if(errno == ENOENT) {
|
||||
reopen(log_file_st);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,6 +425,7 @@ private:
|
||||
uv_thread_t m_worker;
|
||||
|
||||
bool m_stopped;
|
||||
std::atomic<bool> m_needReopen;
|
||||
|
||||
std::ofstream m_logFile;
|
||||
std::string m_logFilePath;
|
||||
@@ -445,7 +495,7 @@ void reopen()
|
||||
{
|
||||
// This will trigger the worker thread which will then reopen log file if it's been moved
|
||||
#ifndef P2POOL_LOG_DISABLE
|
||||
LOGINFO(0, "reopening " << worker->log_file_path());
|
||||
worker->schedule_reopen();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -130,7 +130,7 @@ struct Writer : public Stream
|
||||
};
|
||||
|
||||
#define COLOR_ENTRY(x, s) \
|
||||
struct x{}; \
|
||||
struct x{ static constexpr const char value[] = s; }; \
|
||||
template<> struct Stream::Entry<x> { static FORCEINLINE void put(x&&, Stream* wrapper) { wrapper->writeBuf(s, sizeof(s) - 1); } };
|
||||
|
||||
COLOR_ENTRY(NoColor, "\x1b[0m")
|
||||
@@ -168,6 +168,11 @@ template<> struct Stream::Entry<const char*>
|
||||
static FORCEINLINE void put(const char* data, Stream* wrapper) { wrapper->writeBuf(data, strlen(data)); }
|
||||
};
|
||||
|
||||
template<> struct Stream::Entry<const char* const>
|
||||
{
|
||||
static FORCEINLINE void put(const char* const data, Stream* wrapper) { wrapper->writeBuf(data, strlen(data)); }
|
||||
};
|
||||
|
||||
template<> struct Stream::Entry<char*>
|
||||
{
|
||||
// cppcheck-suppress constParameterPointer
|
||||
@@ -344,7 +349,7 @@ template<> struct log::Stream::Entry<Hashrate>
|
||||
|
||||
const double x = static_cast<double>(value.m_data);
|
||||
|
||||
static constexpr const char* units[] = { "H/s", "KH/s", "MH/s", "GH/s", "TH/s", "PH/s", "EH/s" };
|
||||
static constexpr const char* units[] = { "H/s", "kH/s", "MH/s", "GH/s", "TH/s", "PH/s", "EH/s" };
|
||||
|
||||
int n;
|
||||
char buf[32];
|
||||
@@ -435,6 +440,51 @@ template<> struct log::Stream::Entry<Duration>
|
||||
}
|
||||
};
|
||||
|
||||
struct EscapedString
|
||||
{
|
||||
explicit FORCEINLINE EscapedString(const std::string& data, const char* characters_to_escape = "\"\\", char escape_character = '\\')
|
||||
{
|
||||
m_data.reserve(data.length() * 2);
|
||||
|
||||
for (const char c : data) {
|
||||
if (strchr(characters_to_escape, c)) {
|
||||
m_data.append(1, escape_character);
|
||||
}
|
||||
m_data.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
FORCEINLINE operator const std::string&() const { return m_data; }
|
||||
|
||||
std::string m_data;
|
||||
};
|
||||
|
||||
template<> struct log::Stream::Entry<EscapedString>
|
||||
{
|
||||
static FORCEINLINE void put(const EscapedString& value, Stream* wrapper) { *wrapper << value.m_data; }
|
||||
};
|
||||
|
||||
struct MaskNonASCII
|
||||
{
|
||||
explicit FORCEINLINE MaskNonASCII(const std::string& data, char mask_character = '?') : m_data(data)
|
||||
{
|
||||
for (char& c : m_data) {
|
||||
if ((c < 32) || (c >= 127)) {
|
||||
c = mask_character;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FORCEINLINE operator const std::string&() const { return m_data; }
|
||||
|
||||
std::string m_data;
|
||||
};
|
||||
|
||||
template<> struct log::Stream::Entry<MaskNonASCII>
|
||||
{
|
||||
static FORCEINLINE void put(const MaskNonASCII& value, Stream* wrapper) { *wrapper << value.m_data; }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct PadRight
|
||||
{
|
||||
@@ -477,11 +527,19 @@ template<> struct log::Stream::Entry<raw_ip> { static NOINLINE void put(const ra
|
||||
template<> struct log::Stream::Entry<Wallet> { static NOINLINE void put(const Wallet& w, Stream* wrapper); };
|
||||
|
||||
namespace {
|
||||
template<log::Severity severity> void apply_severity(log::Stream&);
|
||||
|
||||
template<> FORCEINLINE void apply_severity<log::Severity::Info>(log::Stream& s) { s << log::NoColor(); }
|
||||
template<> FORCEINLINE void apply_severity<log::Severity::Warning>(log::Stream& s) { s << log::Yellow(); }
|
||||
template<> FORCEINLINE void apply_severity<log::Severity::Error>(log::Stream& s) { s << log::Red(); }
|
||||
template<log::Severity severity>
|
||||
FORCEINLINE void apply_severity(log::Stream& s)
|
||||
{
|
||||
if constexpr (severity == log::Severity::Info) {
|
||||
s << log::NoColor::value;
|
||||
}
|
||||
else if constexpr (severity == log::Severity::Warning) {
|
||||
s << log::Yellow::value;
|
||||
}
|
||||
else if constexpr (severity == log::Severity::Error) {
|
||||
s << log::Red::value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define CONCAT(a, b) CONCAT2(a, b)
|
||||
|
||||
+44
-8
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -21,6 +21,22 @@
|
||||
#include "stratum_server.h"
|
||||
#include "p2p_server.h"
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifdef WITH_GRPC
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4574)
|
||||
#endif
|
||||
|
||||
#include <grpc/grpc.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // WITH_GRPC
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#ifdef WITH_RANDOMX
|
||||
@@ -46,6 +62,7 @@ void p2pool_usage()
|
||||
"--stratum Comma-separated list of IP:port for stratum server to listen on\n"
|
||||
"--p2p Comma-separated list of IP:port for p2p server to listen on\n"
|
||||
"--addpeers Comma-separated list of IP:port of other p2pool nodes to connect to\n"
|
||||
"--stratum-ban-time N Number of seconds to ban misbehaving stratum client, default is %u\n"
|
||||
"--light-mode Don't allocate RandomX dataset, saves 2GB of RAM\n"
|
||||
"--loglevel Verbosity of the log, integer number between 0 and %d\n"
|
||||
"--data-dir Path to store general p2pool files (log, cache, peer data, etc.), default is current directory\n"
|
||||
@@ -62,6 +79,7 @@ void p2pool_usage()
|
||||
"--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 450)\n"
|
||||
"--start-mining N Start built-in miner using N threads (any value between 1 and 64)\n"
|
||||
"--mini Connect to p2pool-mini sidechain. Note that it will also change default p2p port from %d to %d\n"
|
||||
"--nano Connect to p2pool-nano sidechain. Note that it will also change default p2p port from %d to %d\n"
|
||||
"--no-autodiff Disable automatic difficulty adjustment for miners connected to stratum (WARNING: incompatible with Nicehash and MRR)\n"
|
||||
"--rpc-login Specify username[:password] required for Monero RPC server\n"
|
||||
"--socks5 Specify IP:port of a SOCKS5 proxy to use for outgoing connections\n"
|
||||
@@ -85,9 +103,12 @@ void p2pool_usage()
|
||||
"Example command line:\n\n"
|
||||
"%s --host 127.0.0.1 --rpc-port 18081 --zmq-port 18083 --wallet YOUR_WALLET_ADDRESS --stratum 0.0.0.0:%d --p2p 0.0.0.0:%d\n\n",
|
||||
p2pool::VERSION,
|
||||
static_cast<uint32_t>(p2pool::DEFAULT_STRATUM_BAN_TIME),
|
||||
p2pool::log::MAX_GLOBAL_LOG_LEVEL,
|
||||
p2pool::DEFAULT_P2P_PORT,
|
||||
p2pool::DEFAULT_P2P_PORT_MINI,
|
||||
p2pool::DEFAULT_P2P_PORT,
|
||||
p2pool::DEFAULT_P2P_PORT_NANO,
|
||||
#ifdef _WIN32
|
||||
"p2pool.exe"
|
||||
#else
|
||||
@@ -98,13 +119,10 @@ void p2pool_usage()
|
||||
);
|
||||
}
|
||||
|
||||
void p2pool_version()
|
||||
{
|
||||
printf("P2Pool %s\n", p2pool::VERSION);
|
||||
}
|
||||
|
||||
int p2pool_test()
|
||||
{
|
||||
printf("Self-test started\n");
|
||||
|
||||
#ifdef WITH_RANDOMX
|
||||
const char myKey[] = "test key 000";
|
||||
const char myInput[] = "This is a test";
|
||||
@@ -119,7 +137,10 @@ int p2pool_test()
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
printf("RandomX cache allocated\n");
|
||||
|
||||
randomx_init_cache(myCache, myKey, sizeof(myKey) - 1);
|
||||
printf("RandomX cache initialized\n");
|
||||
|
||||
randomx_dataset* myDataset = randomx_alloc_dataset(flags | RANDOMX_FLAG_LARGE_PAGES);
|
||||
if (!myDataset) {
|
||||
@@ -129,6 +150,7 @@ int p2pool_test()
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
printf("RandomX dataset allocated\n");
|
||||
|
||||
{
|
||||
const uint32_t numThreads = std::max(std::thread::hardware_concurrency(), 1U);
|
||||
@@ -149,6 +171,7 @@ int p2pool_test()
|
||||
t.join();
|
||||
}
|
||||
}
|
||||
printf("RandomX dataset initialized\n");
|
||||
|
||||
randomx_release_cache(myCache);
|
||||
|
||||
@@ -160,12 +183,15 @@ int p2pool_test()
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
printf("RandomX VM created\n");
|
||||
|
||||
memset(hash, 0, sizeof(hash));
|
||||
memcpy(hash, myInput, sizeof(myInput));
|
||||
|
||||
for (size_t i = 0; i < 100; ++i) {
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
printf("RandomX: calculating hash %d...", i);
|
||||
randomx_calculate_hash(myMachine, &hash, sizeof(hash), hash);
|
||||
printf("done\n");
|
||||
}
|
||||
|
||||
char buf[RANDOMX_HASH_SIZE * 2 + 1] = {};
|
||||
@@ -201,7 +227,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "/version") || !strcmp(argv[i], "-v") || !strcmp(argv[i], "/v")) {
|
||||
p2pool_version();
|
||||
puts(p2pool::p2pool_version().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -234,6 +260,8 @@ int main(int argc, char* argv[])
|
||||
SymInitialize(GetCurrentProcess(), NULL, TRUE);
|
||||
#endif
|
||||
|
||||
__nss_module_disable_loading();
|
||||
|
||||
memory_tracking_start();
|
||||
|
||||
// Create default loop here
|
||||
@@ -248,6 +276,10 @@ int main(int argc, char* argv[])
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef WITH_GRPC
|
||||
grpc_init();
|
||||
#endif
|
||||
|
||||
try {
|
||||
p2pool::p2pool pool(argc, argv);
|
||||
result = pool.run();
|
||||
@@ -256,6 +288,10 @@ int main(int argc, char* argv[])
|
||||
result = 1;
|
||||
}
|
||||
|
||||
#ifdef WITH_GRPC
|
||||
grpc_shutdown();
|
||||
#endif
|
||||
|
||||
curl_global_cleanup();
|
||||
|
||||
p2pool::destroy_crypto_cache();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -48,8 +48,10 @@ struct TrackedAllocation
|
||||
FORCEINLINE bool operator<(const TrackedAllocation& rhs) { return memcmp(stack_trace, rhs.stack_trace, sizeof(stack_trace)) < 0; }
|
||||
FORCEINLINE bool operator==(const TrackedAllocation& rhs) { return memcmp(stack_trace, rhs.stack_trace, sizeof(stack_trace)) == 0; }
|
||||
|
||||
void print(HANDLE h) const
|
||||
void print(HANDLE h, bool& is_grpc) const
|
||||
{
|
||||
is_grpc = false;
|
||||
|
||||
char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)] = {};
|
||||
PSYMBOL_INFO pSymbol = reinterpret_cast<PSYMBOL_INFO>(buffer);
|
||||
|
||||
@@ -66,13 +68,24 @@ struct TrackedAllocation
|
||||
if (SymFromAddr(h, address, &t1, pSymbol) && SymGetLineFromAddr64(h, address, &t2, &line)) {
|
||||
const char* s = line.FileName;
|
||||
const char* file_name = nullptr;
|
||||
|
||||
while (*s) {
|
||||
if ((*s == '\\') || (*s == '/')) {
|
||||
file_name = s + 1;
|
||||
}
|
||||
++s;
|
||||
}
|
||||
printf("%-25s %s (line %lu)\n", file_name ? file_name : line.FileName, pSymbol->Name, line.LineNumber);
|
||||
|
||||
s = pSymbol->Name;
|
||||
|
||||
printf("%-25s %s (line %lu)\n", file_name ? file_name : line.FileName, s, line.LineNumber);
|
||||
|
||||
if (!is_grpc) {
|
||||
is_grpc = (strstr(s, "grpc::") == s) ||
|
||||
(strstr(s, "grpc_core::") == s) ||
|
||||
(strstr(s, "grpc_event_engine::") == s) ||
|
||||
(strstr(s, "grpc_init") == s);
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
@@ -130,7 +143,8 @@ void show_top_10_allocations()
|
||||
|
||||
for (TrackedAllocation* p = buf; (p < buf + 10) && (p < end); ++p) {
|
||||
printf("%I64u bytes allocated at:\n", p->allocated_size);
|
||||
p->print(h);
|
||||
bool is_grpc;
|
||||
p->print(h, is_grpc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,21 +328,36 @@ bool memory_tracking_stop()
|
||||
const HANDLE h = GetCurrentProcess();
|
||||
|
||||
uint64_t total_leaks = 0;
|
||||
uint64_t grpc_leaks = 0;
|
||||
|
||||
for (uint32_t i = 0; i < N; ++i) {
|
||||
const TrackedAllocation& t = allocations[i];
|
||||
if (t.allocated_size) {
|
||||
total_leaks += t.allocated_size;
|
||||
|
||||
printf("Memory leak detected, %I64u bytes allocated at %p by thread %u:\n", t.allocated_size, t.p, t.thread_id);
|
||||
t.print(h);
|
||||
|
||||
bool is_grpc;
|
||||
t.print(h, is_grpc);
|
||||
|
||||
if (is_grpc) {
|
||||
printf("^^^ grpc leak ^^^\n\n");
|
||||
grpc_leaks += t.allocated_size;
|
||||
}
|
||||
else {
|
||||
printf("^^^ non-grpc leak ^^^\n\n");
|
||||
total_leaks += t.allocated_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (total_leaks > 0) {
|
||||
printf("%I64u bytes leaked\n\n", total_leaks);
|
||||
}
|
||||
else {
|
||||
|
||||
if (grpc_leaks > 0) {
|
||||
printf("%I64u bytes leaked by gRPC\n\n", grpc_leaks);
|
||||
}
|
||||
|
||||
if ((total_leaks == 0) && (grpc_leaks == 0)) {
|
||||
printf("No memory leaks detected\n\n");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of the Monero P2Pool <https://github.com/SChernykh/p2pool>
|
||||
* Copyright (c) 2021-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2021-2025 SChernykh <https://github.com/SChernykh>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user