Compare commits
254 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a15afb3eb | |||
| fe85c2ff8e | |||
| 5187049b7f | |||
| ba20d3c9db | |||
| 9830987cf2 | |||
| c23d0e5024 | |||
| d8662ad41e | |||
| e7e623fbdd | |||
| 27fbf2fc93 | |||
| 25a5361777 | |||
| 0451aebb8a | |||
| 5dc0cc4861 | |||
| 8d9bac3b0c | |||
| c41018bc5a | |||
| 55d1ee982c | |||
| 801c131172 | |||
| f6353a6939 | |||
| cb9fc89b22 | |||
| d88790237d | |||
| d8e4a00a32 | |||
| baf13781e4 | |||
| 4e690feefb | |||
| e2f0ec7c69 | |||
| 52bcbda381 | |||
| c490fe556a | |||
| 977cd73bbd | |||
| f14e6fd08e | |||
| 8826a6c02c | |||
| 2ce8ce65e2 | |||
| dd9d5b03aa | |||
| 741aaf95a8 | |||
| 6fc51d5a31 | |||
| e3d680ec46 | |||
| 571a5d5410 | |||
| 6b4c39f4c9 | |||
| e1da9ff4d3 | |||
| 5d7dfa2466 | |||
| fbe30b8fb1 | |||
| e53f712eb5 | |||
| fd6549849c | |||
| 22cabb5ac9 | |||
| 7cb6a0dcc3 | |||
| e9c14ef3d0 | |||
| eb09178a1c | |||
| 458c7a3389 | |||
| 82f3982175 | |||
| 0184a3139c | |||
| 26357f44ec | |||
| 85931f564a | |||
| 1e8e6c1010 | |||
| f6a1612ff1 | |||
| 1eb22109b5 | |||
| c0b99ac6fd | |||
| cff1210761 | |||
| bae7c65126 | |||
| 04d195d5cd | |||
| a4e1f00993 | |||
| 0d101f0ae6 | |||
| 2ae77e5b71 | |||
| 2e32d14d5f | |||
| 415ad70e2f | |||
| 6380e204dd | |||
| 12993dfe19 | |||
| a64753ecd0 | |||
| e9c7367b92 | |||
| 9f7dc5b768 | |||
| f141bef4b5 | |||
| 32e940577e | |||
| 012d148080 | |||
| d64b4ea2dc | |||
| a9e0b834d9 | |||
| 3a8ec27d93 | |||
| b69de65e78 | |||
| 44f8d941a7 | |||
| 8c1c5fd8e1 | |||
| bbfdeeaff5 | |||
| f12e43bb79 | |||
| a1544022cf | |||
| e2008578da | |||
| 9b5a43580e | |||
| 20c3973504 | |||
| 16b74edc51 | |||
| d611056b1c | |||
| ecc33cfebb | |||
| 0ae2af0bb8 | |||
| bdd34c5f56 | |||
| bbee372a01 | |||
| 5c907d39aa | |||
| 6d3fbc5467 | |||
| 068b286a88 | |||
| b7c4613d40 | |||
| 971f804a6e | |||
| 830c78a032 | |||
| 50634e5e79 | |||
| c5fba9992e | |||
| 29df28d3c8 | |||
| 4a2b75c7fb | |||
| 2a9cf67c3a | |||
| 3bcde151ee | |||
| b22088f330 | |||
| bfb0b5383a | |||
| 560f62a427 | |||
| 271a30998f | |||
| 3c4eeb49fd | |||
| 257781f2e2 | |||
| fb85deabbe | |||
| 6bc30dc6e1 | |||
| 93395771d3 | |||
| d6c249ca17 | |||
| 07259e029a | |||
| b1348b6c80 | |||
| a977f988d5 | |||
| 847ffe3959 | |||
| ed2e0f1a1b | |||
| 240cbd100e | |||
| f7c1baa453 | |||
| 644084a32f | |||
| baab8d3788 | |||
| ce1ef36613 | |||
| 3d08803709 | |||
| a4a0c03517 | |||
| fb21c917ac | |||
| 0d9670ee29 | |||
| ca47bed7b9 | |||
| 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 |
+161
-71
@@ -13,15 +13,15 @@ on:
|
||||
jobs:
|
||||
build-alpine-static:
|
||||
|
||||
timeout-minutes: 240
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 90
|
||||
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,9 +44,8 @@ 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/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
- name: Build libuv
|
||||
shell: alpine.sh {0}
|
||||
@@ -63,7 +62,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 +70,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' -DWITH_GRPC=OFF -DSTATIC_BINARY=ON -DARCH_ID=${{ matrix.config.arch }}
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
- name: Run RandomX tests
|
||||
@@ -88,14 +87,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 +129,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 +156,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 +185,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,9 +196,8 @@ 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/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
- name: Build libuv
|
||||
run: |
|
||||
@@ -237,12 +235,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 +257,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,16 +273,15 @@ 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/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/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 +289,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 +326,101 @@ 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/include
|
||||
make -j$(nproc)
|
||||
|
||||
- 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
|
||||
@@ -338,8 +429,8 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {c: "gcc", cxx: "g++", flags: "-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes"}
|
||||
- {c: "clang", cxx: "clang++", flags: "-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled"}
|
||||
- {c: "gcc", cxx: "g++", flags: "-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes -Wno-attributes"}
|
||||
- {c: "clang", cxx: "clang++", flags: "-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled -Wno-attributes"}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -357,12 +448,15 @@ jobs:
|
||||
update: true
|
||||
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-cmake make git
|
||||
|
||||
- name: Apply patch
|
||||
run: |
|
||||
git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/protobuf patches/protobuf/protobuf.patch
|
||||
|
||||
- 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/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
- name: Build libuv
|
||||
run: |
|
||||
@@ -400,12 +494,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 +517,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 +570,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
|
||||
|
||||
@@ -489,8 +582,8 @@ jobs:
|
||||
|
||||
build-macos:
|
||||
|
||||
timeout-minutes: 60
|
||||
runs-on: macos-13
|
||||
timeout-minutes: 90
|
||||
runs-on: macos-15-intel
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -501,16 +594,15 @@ 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@18)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/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/include
|
||||
make -j4
|
||||
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_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_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j4
|
||||
|
||||
- name: Build libzmq
|
||||
@@ -518,14 +610,14 @@ jobs:
|
||||
cd external/src/libzmq
|
||||
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='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j4
|
||||
|
||||
- name: Build p2pool
|
||||
run: |
|
||||
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
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/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 p2pool
|
||||
|
||||
- name: Run RandomX tests
|
||||
@@ -540,25 +632,25 @@ jobs:
|
||||
cd tests
|
||||
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
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/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 p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool-macos-13
|
||||
name: p2pool-macos
|
||||
path: build/p2pool
|
||||
|
||||
build-macos-aarch64:
|
||||
|
||||
timeout-minutes: 30
|
||||
runs-on: macos-14
|
||||
runs-on: macos-15
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -569,16 +661,15 @@ 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@18)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/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/include
|
||||
make -j3
|
||||
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_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_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -target arm64-apple-macos-11' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j3
|
||||
|
||||
- name: Build libzmq
|
||||
@@ -586,14 +677,14 @@ jobs:
|
||||
cd external/src/libzmq
|
||||
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='-Os -target arm64-apple-macos-11' -DCMAKE_CXX_FLAGS='-Os -target arm64-apple-macos-11' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -target arm64-apple-macos-11' -DCMAKE_CXX_FLAGS='-Os -target arm64-apple-macos-11' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j3
|
||||
|
||||
- name: Build p2pool
|
||||
run: |
|
||||
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
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/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 p2pool
|
||||
|
||||
- name: Run RandomX tests
|
||||
@@ -608,19 +699,19 @@ jobs:
|
||||
cd tests
|
||||
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
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/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 p2pool_tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd tests/build
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool-macos-11-aarch64
|
||||
name: p2pool-macos-aarch64
|
||||
path: build/p2pool
|
||||
|
||||
build-freebsd:
|
||||
@@ -659,10 +750,9 @@ 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/include
|
||||
make -j4
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
cd ../../libuv
|
||||
cd ../libuv
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
@@ -685,7 +775,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 +826,7 @@ jobs:
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make -j4 p2pool_tests
|
||||
gunzip *.gz
|
||||
unxz *.xz
|
||||
./p2pool_tests
|
||||
|
||||
- name: Archive binary
|
||||
|
||||
@@ -12,16 +12,16 @@ on:
|
||||
|
||||
jobs:
|
||||
clang-tidy:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install clang
|
||||
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 -DWITH_INDEXED_HASHES=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=bugprone-*,clang-analyzer-*,llvm-*,cppcoreguidelines-pro-type-const-cast,cppcoreguidelines-pro-type-cstyle-cast,cppcoreguidelines-rvalue-reference-param-not-moved,hicpp-use-emplace,hicpp-use-override,-bugprone-easily-swappable-parameters,-bugprone-empty-catch,-llvm-include-order -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_INDEXED_HASHES=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: |
|
||||
@@ -40,7 +38,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSTATIC_LIBS=ON -DWITH_GRPC=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSTATIC_LIBS=ON -DWITH_GRPC=OFF -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
python ../cppcheck/remove_external.py compile_commands.json
|
||||
|
||||
- name: Run cppcheck
|
||||
@@ -64,7 +62,7 @@ jobs:
|
||||
|
||||
cppcheck-windows:
|
||||
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 120
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
@@ -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,9 +34,8 @@ 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/include
|
||||
make -j$(nproc)
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
- name: Build libuv
|
||||
run: |
|
||||
@@ -58,7 +57,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_TSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_TSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
- name: Run p2pool
|
||||
@@ -69,14 +68,20 @@ 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
|
||||
- name: Check synchronization
|
||||
run: |
|
||||
cd build
|
||||
grep 'Synchronization finished successfully' p2pool.log
|
||||
|
||||
- name: Check p2pool.log for errors
|
||||
run: |
|
||||
cd build
|
||||
../scripts/workflows/test-sync-check.sh
|
||||
|
||||
- name: Archive p2pool.log
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool_ubuntu_data_tsan
|
||||
@@ -98,14 +103,14 @@ jobs:
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 20 all
|
||||
sudo ./llvm.sh 21 all
|
||||
|
||||
- name: Build libcxx_msan
|
||||
run: |
|
||||
git clone --depth=1 https://github.com/llvm/llvm-project -b release/20.x
|
||||
git clone --depth=1 https://github.com/llvm/llvm-project -b release/21.x
|
||||
cd llvm-project
|
||||
mkdir build
|
||||
cmake -G Ninja -S runtimes -B build -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DLLVM_USE_SANITIZER=MemoryWithOrigins -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
|
||||
cmake -G Ninja -S runtimes -B build -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DCMAKE_C_COMPILER=clang-21 -DCMAKE_CXX_COMPILER=clang++-21 -DLLVM_USE_SANITIZER=MemoryWithOrigins -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
|
||||
ninja -C build cxx cxxabi
|
||||
cd build
|
||||
mkdir /tmp/libcxx_msan
|
||||
@@ -120,16 +125,15 @@ 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_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-21 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -O0 -fno-omit-frame-pointer -g3' -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/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_C_COMPILER=clang-20 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-21 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -O0 -fno-omit-frame-pointer -g3' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Build libzmq
|
||||
@@ -137,14 +141,14 @@ jobs:
|
||||
cd external/src/libzmq
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -Og -fno-omit-frame-pointer -g -isystem /tmp/libcxx_msan/include/c++/v1 -L/tmp/libcxx_msan/lib -lc++ -lc++abi -Wno-unused-command-line-argument' -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=Debug -DCMAKE_C_COMPILER=clang-21 -DCMAKE_CXX_COMPILER=clang++-21 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -O0 -fno-omit-frame-pointer -g3' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -isystem /tmp/libcxx_msan/include/c++/v1 -O0 -fno-omit-frame-pointer -g3' -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_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -isystem /tmp/libcxx_msan/include/c++/v1 -L/tmp/libcxx_msan/lib -Wl,-rpath /tmp/libcxx_msan/lib -lc++ -lc++abi -Wno-unused-command-line-argument -fuse-ld=lld-20 -fno-omit-frame-pointer -g' -DDEV_TEST_SYNC=ON -DDEV_WITH_MSAN=ON -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-21 -DCMAKE_CXX_COMPILER=clang++-21 -DCMAKE_C_FLAGS='-fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -fno-omit-frame-pointer' -DCMAKE_CXX_FLAGS='-nostdinc++ -nostdlib++ -fsanitize=memory -fsanitize-recover -fsanitize-memory-track-origins -isystem /tmp/libcxx_msan/include/c++/v1 -L/tmp/libcxx_msan/lib -Wl,-rpath /tmp/libcxx_msan/lib -lc++ -lc++abi -Wno-unused-command-line-argument -fuse-ld=lld-21 -fno-omit-frame-pointer' -DDEV_TEST_SYNC=ON -DDEV_WITH_MSAN=ON -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
- name: Run p2pool
|
||||
@@ -155,14 +159,20 @@ 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 }} --out-peers 50 --data-api data --local-api --loglevel 6
|
||||
|
||||
- name: Check p2pool.log
|
||||
- name: Check synchronization
|
||||
run: |
|
||||
cd build
|
||||
grep 'Synchronization finished successfully' p2pool.log
|
||||
|
||||
- name: Check p2pool.log for errors
|
||||
run: |
|
||||
cd build
|
||||
../scripts/workflows/test-sync-check.sh
|
||||
|
||||
- name: Archive p2pool.log
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool_ubuntu_data_msan
|
||||
@@ -180,7 +190,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
|
||||
@@ -191,7 +201,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_UBSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWITH_LTO=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_UBSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWITH_LTO=OFF -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
- name: Run p2pool
|
||||
@@ -202,14 +212,20 @@ 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
|
||||
- name: Check synchronization
|
||||
run: |
|
||||
cd build
|
||||
grep 'Synchronization finished successfully' p2pool.log
|
||||
|
||||
- name: Check p2pool.log for errors
|
||||
run: |
|
||||
cd build
|
||||
../scripts/workflows/test-sync-check.sh
|
||||
|
||||
- name: Archive p2pool.log
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool_ubuntu_data_ubsan
|
||||
@@ -227,7 +243,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
|
||||
@@ -238,7 +254,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DWITH_LTO=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -DDEV_TEST_SYNC=ON -DDEV_DEBUG=ON -DDEV_WITH_ASAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DWITH_LTO=OFF -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
make -j$(nproc) p2pool
|
||||
|
||||
- name: Run p2pool
|
||||
@@ -249,14 +265,20 @@ 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
|
||||
- name: Check synchronization
|
||||
run: |
|
||||
cd build
|
||||
grep 'Synchronization finished successfully' p2pool.log
|
||||
|
||||
- name: Check p2pool.log for errors
|
||||
run: |
|
||||
cd build
|
||||
../scripts/workflows/test-sync-check.sh
|
||||
|
||||
- name: Archive p2pool.log
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool_ubuntu_data_asan
|
||||
@@ -266,14 +288,14 @@ jobs:
|
||||
|
||||
sync-test-macos:
|
||||
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 120
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {os: macos-13, flags: ""}
|
||||
- {os: macos-14, flags: "-target arm64-apple-macos-11"}
|
||||
- {os: macos-15-intel, flags: ""}
|
||||
- {os: macos-15, flags: "-target arm64-apple-macos-11"}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -284,16 +306,15 @@ 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@18)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/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/include
|
||||
make -j4
|
||||
cd lib && mkdir .libs && cp libcurl.a .libs
|
||||
|
||||
- name: Build libuv
|
||||
run: |
|
||||
cd external/src/libuv
|
||||
mkdir build
|
||||
cd build
|
||||
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_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
|
||||
make -j4
|
||||
|
||||
- name: Build libzmq
|
||||
@@ -301,14 +322,14 @@ jobs:
|
||||
cd external/src/libzmq
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
|
||||
make -j4
|
||||
|
||||
- name: Build p2pool
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DDEV_TEST_SYNC=ON -DDEV_DEBUG=ON
|
||||
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@18)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@18)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DDEV_TEST_SYNC=ON -DDEV_DEBUG=ON -DWITH_INDEXED_HASHES=ON
|
||||
make -j4 p2pool
|
||||
|
||||
- name: Run p2pool
|
||||
@@ -318,14 +339,20 @@ 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
|
||||
- name: Check synchronization
|
||||
run: |
|
||||
cd build
|
||||
grep 'Synchronization finished successfully' p2pool.log
|
||||
|
||||
- name: Check p2pool.log for errors
|
||||
run: |
|
||||
cd build
|
||||
../scripts/workflows/test-sync-check.sh
|
||||
|
||||
- name: Archive p2pool.log
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool_${{ matrix.config.os }}_data
|
||||
@@ -351,7 +378,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON -DDEV_DEBUG=ON -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Debug p2pool.vcxproj
|
||||
|
||||
- name: Run p2pool
|
||||
@@ -363,7 +390,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: |
|
||||
@@ -371,6 +398,7 @@ jobs:
|
||||
findstr /C:"Synchronization finished successfully" p2pool.log
|
||||
|
||||
- name: Archive p2pool.log
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: p2pool_windows_data_debug_asan
|
||||
@@ -396,7 +424,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_TRACK_MEMORY=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_DEBUG=ON -DDEV_TRACK_MEMORY=ON -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
|
||||
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=RelWithDebInfo p2pool.vcxproj
|
||||
|
||||
- name: Run p2pool
|
||||
@@ -406,7 +434,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: |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SChernykh <15806605+SChernykh@users.noreply.github.com> sech1 <sech1@sech1>
|
||||
+54
-28
@@ -18,6 +18,7 @@ option(WITH_LTO "Use link-time compiler optimization (if linking fails for you,
|
||||
option(WITH_UPNP "Include UPnP support. If this is turned off, p2pool will not be able to configure port forwarding on UPnP-enabled routers." ON)
|
||||
option(WITH_GRPC "Include gRPC support. If this is turned off, p2pool will not be able to merge mine with Tari." ON)
|
||||
option(WITH_TLS "Include TLS support. If this is turned off, p2pool will not support Stratum TLS connections, and lack many other security features. It's recommended to keep it ON!" ON)
|
||||
option(WITH_INDEXED_HASHES "Save memory used for storing transaction hashes and public keys (a bit slower block verification - use it only if you compile for a very low memory system)" OFF)
|
||||
|
||||
option(WITH_MERGE_MINING_DONATION "Merge mine donations to the author. This doesn't affect your hashrate or payouts in any way - only unused merge mining capacity will be utilised. If you merge mine yourself, your settings will take priority." ON)
|
||||
|
||||
@@ -32,6 +33,8 @@ option(DEV_DEBUG "[Developer only] Compile a debug build" OFF)
|
||||
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT p2pool)
|
||||
|
||||
set(BUILD_TESTING OFF CACHE BOOL "CMake's CTest module")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
include(cmake/msvc_libs.cmake)
|
||||
endif()
|
||||
@@ -43,7 +46,7 @@ if (WITH_GRPC)
|
||||
add_subdirectory(external/src/Tari)
|
||||
elseif (WITH_TLS)
|
||||
add_subdirectory(cmake/ssl)
|
||||
include_directories(external/src/grpc/third_party/boringssl-with-bazel/src/include)
|
||||
include_directories(external/src/grpc/third_party/boringssl-with-bazel/include)
|
||||
endif()
|
||||
|
||||
if (WITH_RANDOMX)
|
||||
@@ -133,6 +136,7 @@ set(SOURCES
|
||||
external/src/crypto/sha256.c
|
||||
external/src/cryptonote/crypto-ops-data.c
|
||||
external/src/cryptonote/crypto-ops.c
|
||||
external/src/cryptonote/fcmp_pp_crypto.cpp
|
||||
external/src/hardforks/hardforks.cpp
|
||||
src/block_cache.cpp
|
||||
src/block_template.cpp
|
||||
@@ -188,9 +192,26 @@ if (WITH_TLS)
|
||||
set(SOURCES ${SOURCES} src/tls.cpp)
|
||||
endif()
|
||||
|
||||
if (WITH_INDEXED_HASHES)
|
||||
add_compile_definitions(WITH_INDEXED_HASHES)
|
||||
set(SOURCES ${SOURCES} src/indexed_hash.cpp)
|
||||
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()
|
||||
@@ -245,33 +266,17 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
find_library(UV_LIBRARY_DEBUG NAMES uv libuv.a)
|
||||
find_library(UV_LIBRARY NAMES uv libuv.a)
|
||||
if (WIN32)
|
||||
find_library(CURL_LIBRARY_DEBUG NAMES libcurl.a PATHS "external/src/curl/lib" NO_DEFAULT_PATH)
|
||||
find_library(CURL_LIBRARY_DEBUG NAMES libcurl-d.a PATHS "external/src/curl/lib" NO_DEFAULT_PATH)
|
||||
find_library(CURL_LIBRARY NAMES libcurl.a PATHS "external/src/curl/lib" NO_DEFAULT_PATH)
|
||||
else()
|
||||
if (CURL_LIBRARIES)
|
||||
set(CURL_LIBRARY_DEBUG ${CURL_LIBRARIES})
|
||||
set(CURL_LIBRARY ${CURL_LIBRARIES})
|
||||
else()
|
||||
find_library(CURL_LIBRARY_DEBUG NAMES curl)
|
||||
find_library(CURL_LIBRARY_DEBUG NAMES curl-d)
|
||||
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 +286,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 +369,42 @@ 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()
|
||||
|
||||
include(cmake/git.cmake)
|
||||
|
||||
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES})
|
||||
|
||||
if (STATIC_BINARY OR STATIC_LIBS)
|
||||
@@ -412,7 +429,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,10 +452,15 @@ 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"
|
||||
"${CMAKE_SOURCE_DIR}/external/src/curl/lib/libcurl.a"
|
||||
debug "${CMAKE_SOURCE_DIR}/external/src/curl/lib/libcurl-d.a"
|
||||
optimized "${CMAKE_SOURCE_DIR}/external/src/curl/lib/libcurl.a"
|
||||
${STATIC_LIBS}
|
||||
)
|
||||
else()
|
||||
@@ -448,6 +470,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()
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM debian:12-slim
|
||||
|
||||
RUN set -e && \
|
||||
apt-get update -q -y --no-install-recommends && \
|
||||
@@ -25,7 +25,7 @@ RUN git submodule update --init --recursive && \
|
||||
|
||||
# ---
|
||||
|
||||
FROM ubuntu:20.04
|
||||
FROM debian:12-slim
|
||||
COPY --from=0 /usr/src/p2pool/build/p2pool /
|
||||
|
||||
RUN set -e && \
|
||||
|
||||
@@ -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
|
||||
@@ -59,6 +60,7 @@ Here's the comparison table of the different ways of mining. While pool mining i
|
||||
* Advanced mempool picking algorithm, it creates blocks with better reward than what monerod solo mining does
|
||||
* Password protected private pools
|
||||
* Highly reliable configurations are supported (multiple P2Pool nodes mining to the same wallet, each P2Pool node can use multiple Monero nodes and switch on the fly if an issue is detected)
|
||||
* Mining through [TOR](docs/TOR.MD) is fully supported
|
||||
|
||||
## How payouts work in P2Pool
|
||||
|
||||
@@ -75,22 +77,21 @@ 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.2 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 mine to a primary wallet address (the one starting with `4`) for mining. If you want to mine to a subaddress, you will need to provide both the main address (starting with 4) and the subaddress (starting with 8) using `--wallet` and `--subaddress` command line parameters.
|
||||
- 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.
|
||||
- Check that ports 18080 (Monero p2p port) and 37889/37888 (P2Pool/P2Pool mini p2p port) are open in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine.
|
||||
- You can connect multiple miners to the same P2Pool node. The more the better!
|
||||
@@ -113,16 +114,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 +137,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!
|
||||
|
||||
@@ -154,7 +155,7 @@ sudo sysctl vm.nr_hugepages=3072
|
||||
4. Check that ports 18080 (Monero p2p port) and 37889/37888 (P2Pool/P2Pool mini p2p port) are open in your local firewall to ensure better connectivity.
|
||||
5. Start `monerod` with the following command/options:
|
||||
```
|
||||
./monerod --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --disable-dns-checkpoints --enable-dns-blocklist
|
||||
./monerod --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --enforce-dns-checkpointing --enable-dns-blocklist
|
||||
```
|
||||
**Note:**
|
||||
The `--zmq-pub` option is required for P2Pool to work properly.
|
||||
@@ -163,7 +164,7 @@ The `--zmq-pub` option is required for P2Pool to work properly.
|
||||
|
||||
`--add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080` is needed to have guaranteed good working nodes in your connected peers.
|
||||
|
||||
`--disable-dns-checkpoints` is needed to avoid periodical lags when DNS is updated (it's not needed when mining)
|
||||
`--enforce-dns-checkpointing` is needed to combat the selfish mining attempts by malicious actors
|
||||
|
||||
`--enable-dns-blocklist` is needed to ban known bad nodes
|
||||
|
||||
@@ -222,7 +223,7 @@ nocreate
|
||||
|
||||
8. Start `monerod` with the following command/options:
|
||||
```
|
||||
.\Monero\monerod.exe --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --disable-dns-checkpoints --enable-dns-blocklist
|
||||
.\Monero\monerod.exe --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --enforce-dns-checkpointing --enable-dns-blocklist
|
||||
```
|
||||
**Note:**
|
||||
The `--zmq-pub` option is required for P2Pool to work properly.
|
||||
@@ -231,7 +232,7 @@ The `--zmq-pub` option is required for P2Pool to work properly.
|
||||
|
||||
`--add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080` is needed to have guaranteed good working nodes in your connected peers.
|
||||
|
||||
`--disable-dns-checkpoints` is needed to avoid periodical lags when DNS is updated (it's not needed when mining)
|
||||
`--enforce-dns-checkpointing` is needed to combat the selfish mining attempts by malicious actors
|
||||
|
||||
`--enable-dns-blocklist` is needed to ban known bad nodes
|
||||
|
||||
@@ -253,7 +254,7 @@ The `--zmq-pub` option is required for P2Pool to work properly.
|
||||
13. *(Optional but highly recommended)* You can create a Quickstart by creating a batch (.bat) file with the following contents and placing it in your P2Pool directory along with `xmrig.exe`.
|
||||
```
|
||||
@ECHO OFF
|
||||
start cmd /k %~dp0\Monero\monerod.exe --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --disable-dns-checkpoints --enable-dns-blocklist
|
||||
start cmd /k %~dp0\Monero\monerod.exe --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --enforce-dns-checkpointing --enable-dns-blocklist
|
||||
ECHO Wait until the Monero daemon shows fully synced before continuing. This can take some time. Type 'status' in other window to check progress.
|
||||
PAUSE
|
||||
start cmd /k %~dp0\p2pool.exe --wallet YOUR_WALLET_ADDRESS --mini
|
||||
@@ -358,6 +359,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)
|
||||
+9
-5
@@ -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)
|
||||
@@ -73,7 +73,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
endif()
|
||||
endif()
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
set(GENERAL_FLAGS "/MP /EHa")
|
||||
set(GENERAL_FLAGS "/MP /EHa /permissive-")
|
||||
set(WARNING_FLAGS "/Wall /WX /sdl")
|
||||
set(SECURITY_FLAGS "/GS /guard:cf")
|
||||
set(OPTIMIZATION_FLAGS "/O2 /Oi /Ob2 /Ot /Oy /DNDEBUG /GL")
|
||||
@@ -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,33 @@
|
||||
if (GIT_COMMIT)
|
||||
message(STATUS "GIT_COMMIT is set to ${GIT_COMMIT}")
|
||||
else()
|
||||
set(GIT_COMMIT "unknown")
|
||||
|
||||
find_program(GIT_EXECUTABLE git)
|
||||
|
||||
if (GIT_EXECUTABLE)
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short=7 HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
RESULT_VARIABLE RET
|
||||
OUTPUT_VARIABLE COMMIT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if (RET EQUAL 0)
|
||||
set(GIT_COMMIT "${COMMIT}")
|
||||
|
||||
execute_process(COMMAND git status --porcelain
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
RESULT_VARIABLE RET
|
||||
OUTPUT_VARIABLE GIT_UNSTAGED
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(GIT_UNSTAGED OR RET)
|
||||
set(GIT_COMMIT "${GIT_COMMIT} (dirty)")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "You are currently on commit ${GIT_COMMIT}")
|
||||
endif()
|
||||
|
||||
add_compile_definitions(GIT_COMMIT="${GIT_COMMIT}")
|
||||
+6
-1
@@ -1,8 +1,10 @@
|
||||
set(protobuf_INSTALL OFF CACHE BOOL "Install protobuf binaries and files")
|
||||
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
|
||||
set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Build libprotoc and protoc compiler")
|
||||
set(protobuf_BUILD_LIBUPB OFF CACHE BOOL "Build libupb")
|
||||
set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Build protobuf Shared Libraries")
|
||||
set(protobuf_DISABLE_RTTI ON CACHE BOOL "Remove runtime type information in the binaries")
|
||||
set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support")
|
||||
|
||||
set(utf8_range_ENABLE_TESTS OFF CACHE BOOL "Build test suite")
|
||||
set(utf8_range_ENABLE_INSTALL OFF CACHE BOOL "Configure installation")
|
||||
@@ -32,9 +34,12 @@ endif()
|
||||
|
||||
add_definitions(-DPROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0)
|
||||
|
||||
add_definitions(-DGRPC_NO_RLS)
|
||||
add_definitions(-DGRPC_NO_XDS)
|
||||
|
||||
add_subdirectory(external/src/grpc)
|
||||
|
||||
include_directories(external/src/grpc/third_party/abseil-cpp)
|
||||
include_directories(external/src/grpc/third_party/boringssl-with-bazel/src/include)
|
||||
include_directories(external/src/grpc/third_party/boringssl-with-bazel/include)
|
||||
include_directories(external/src/grpc/third_party/protobuf/src)
|
||||
include_directories(external/src/grpc/include)
|
||||
|
||||
@@ -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-darwin25-clang)
|
||||
set(CMAKE_CXX_COMPILER /usr/local/bin/aarch64-apple-darwin25-clang++)
|
||||
set(CMAKE_ASM_COMPILER /usr/local/bin/aarch64-apple-darwin25-as)
|
||||
set(CMAKE_STRIP /usr/local/bin/aarch64-apple-darwin25-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-darwin25-clang)
|
||||
set(CMAKE_CXX_COMPILER /usr/local/bin/x86_64-apple-darwin25-clang++)
|
||||
set(CMAKE_ASM_COMPILER /usr/local/bin/x86_64-apple-darwin25-as)
|
||||
set(CMAKE_STRIP /usr/local/bin/x86_64-apple-darwin25-strip)
|
||||
@@ -56,7 +56,7 @@ set(CURL_STATIC_CRT ON CACHE BOOL "")
|
||||
|
||||
if (WITH_TLS)
|
||||
set(P2POOL_BORINGSSL ON CACHE BOOL "")
|
||||
set(OPENSSL_INCLUDE_DIR "../grpc/third_party/boringssl-with-bazel/src/include" CACHE STRING "")
|
||||
set(OPENSSL_INCLUDE_DIR "../grpc/third_party/boringssl-with-bazel/include" CACHE STRING "")
|
||||
endif()
|
||||
|
||||
add_subdirectory(external/src/curl)
|
||||
|
||||
@@ -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++)
|
||||
@@ -4,7 +4,7 @@
|
||||
../external/src/cryptonote/
|
||||
../external/src/libuv/
|
||||
../external/src/cppzmq/
|
||||
../external/src/libzmq/
|
||||
../external/src/libzmq/include/
|
||||
../external/src/miniupnp/miniupnpc/include/
|
||||
../external/src/randomx/src/
|
||||
../external/src/rapidjson/include/
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
"..\cppcheck-main\bin\cppcheck.exe" ../src/*.cpp -D__cppcheck__ -DSIZE_MAX=UINT64_MAX -DRAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN -D_WIN32=1 -D_WIN64=1 -DWIN32=1 -D_WINDOWS=1 -DNDEBUG=1 -DWITH_GRPC=1 -DPROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0 -DWITH_RANDOMX=1 -DWITH_UPNP=1 -DWITH_TLS=1 -DWITH_MERGE_MINING_DONATION=1 -DCURL_STATICLIB=1 -DWIN32_LEAN_AND_MEAN=1 -D_WIN32_WINNT=0x0600 -D_DISABLE_VECTOR_ANNOTATION=1 -D_DISABLE_STRING_ANNOTATION=1 -DZMQ_STATIC=1 -DHAVE_BITSCANREVERSE64=1 -DRAPIDJSON_PARSE_DEFAULT_FLAGS=kParseTrailingCommasFlag -DMINIUPNP_STATICLIB=1 -DCARES_STATICLIB=1 -DCMAKE_INTDIR="Release" -D__SSE2__=1 -D_MSC_VER=1929 --platform=win64 --std=c++17 --enable=all --inconclusive --inline-suppr --template="{file}:{line}:{id}{inconclusive: INCONCLUSIVE} {message}" --includes-file=includes.txt --suppressions-list=suppressions.txt --output-file=errors_full.txt --max-ctu-depth=3 --check-level=exhaustive --checkers-report=checkers_report.txt
|
||||
"..\cppcheck-main\bin\cppcheck.exe" ../src/*.cpp -D__cppcheck__ -DSIZE_MAX=UINT64_MAX -DRAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN -D_WIN32=1 -D_WIN64=1 -DWIN32=1 -D_WINDOWS=1 -DNDEBUG=1 -DWITH_GRPC=1 -DPROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0 -DWITH_RANDOMX=1 -DWITH_UPNP=1 -DWITH_TLS=1 -DWITH_MERGE_MINING_DONATION=1 -DCURL_STATICLIB=1 -DWIN32_LEAN_AND_MEAN=1 -D_WIN32_WINNT=0x0600 -D_DISABLE_VECTOR_ANNOTATION=1 -D_DISABLE_STRING_ANNOTATION=1 -DZMQ_STATIC=1 -DZMQ_VERSION=40306 -DHAVE_BITSCANREVERSE64=1 -DRAPIDJSON_PARSE_DEFAULT_FLAGS=kParseTrailingCommasFlag -DMINIUPNP_STATICLIB=1 -DCARES_STATICLIB=1 -DCMAKE_INTDIR="Release" -D__SSE2__=1 -D_MSC_VER=1929 --platform=win64 --std=c++17 --enable=all --inconclusive --inline-suppr --template="{file}:{line}:{id}{inconclusive: INCONCLUSIVE} {message}" --includes-file=includes.txt --suppressions-list=suppressions.txt --output-file=errors_full.txt --max-ctu-depth=3 --check-level=exhaustive --checkers-report=checkers_report.txt
|
||||
|
||||
findstr /V /C:"external\src" errors_full.txt > errors_filtered0.txt
|
||||
findstr /V /C:":checkersReport" errors_filtered0.txt > errors_filtered.txt
|
||||
|
||||
@@ -611,7 +611,7 @@ class MoneroConfigForm(ConfigFormBase):
|
||||
self.sync_pruned_blocks = self.add(
|
||||
npyscreen.Checkbox,
|
||||
name="Sync Pruned Blocks",
|
||||
value=False,
|
||||
value=True,
|
||||
begin_entry_at=self.name_size,
|
||||
relx=self.indent,
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"limit_data_rates": false,
|
||||
"rate_limit_up": "2048",
|
||||
"rate_limit_down": "8192",
|
||||
"sync_pruned_blocks": false,
|
||||
"sync_pruned_blocks": true,
|
||||
"fast_sync": true,
|
||||
"monero_options": "",
|
||||
"public_monero_node": "",
|
||||
|
||||
@@ -118,7 +118,7 @@ services:
|
||||
restart: unless-stopped
|
||||
command: >-
|
||||
--zmq-pub tcp://0.0.0.0:18083
|
||||
--disable-dns-checkpoints
|
||||
--enforce-dns-checkpointing
|
||||
--enable-dns-blocklist
|
||||
--out-peers 16
|
||||
--in-peers 32
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"limit_data_rates": false,
|
||||
"rate_limit_up": "2048",
|
||||
"rate_limit_down": "8192",
|
||||
"sync_pruned_blocks": false,
|
||||
"sync_pruned_blocks": true,
|
||||
"fast_sync": true,
|
||||
"monero_options": "",
|
||||
"public_monero_node": "",
|
||||
|
||||
@@ -94,7 +94,7 @@ services:
|
||||
restart: unless-stopped
|
||||
command: >-
|
||||
--zmq-pub tcp://0.0.0.0:18083
|
||||
--disable-dns-checkpoints
|
||||
--enforce-dns-checkpointing
|
||||
--enable-dns-blocklist
|
||||
--out-peers 16
|
||||
--in-peers 32
|
||||
@@ -111,6 +111,8 @@ services:
|
||||
|
||||
--prune-blockchain
|
||||
|
||||
--sync-pruned-blocks
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# Multistage docker build, requires docker 17.05
|
||||
|
||||
# builder stage
|
||||
FROM ubuntu:20.04 as builder
|
||||
FROM ubuntu:22.04 as builder
|
||||
ARG MONERO_GIT_TAG="latest"
|
||||
|
||||
RUN set -e && \
|
||||
apt-get update -q -y --no-install-recommends && \
|
||||
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update -q -y --no-install-recommends && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
|
||||
autoconf \
|
||||
automake \
|
||||
autotools-dev \
|
||||
bsdmainutils \
|
||||
@@ -15,32 +17,47 @@ RUN set -e && \
|
||||
ccache \
|
||||
cmake \
|
||||
curl \
|
||||
doxygen \
|
||||
git \
|
||||
libtool \
|
||||
graphviz \
|
||||
libtool libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libexpat1-dev \
|
||||
qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev \
|
||||
libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev \
|
||||
pkg-config \
|
||||
python3 \
|
||||
gperf
|
||||
|
||||
|
||||
WORKDIR /src
|
||||
RUN git clone --recursive https://github.com/monero-project/monero && \
|
||||
|
||||
RUN git clone --recursive --branch release-v0.18 https://github.com/monero-project/monero && \
|
||||
cd monero && \
|
||||
if [ "x$MONERO_GIT_TAG" = "xlatest" ]; then MONERO_GIT_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)); fi && \
|
||||
git checkout $MONERO_GIT_TAG && \
|
||||
git submodule sync && git submodule update --init --force --recursive && \
|
||||
make -j$(nproc) depends target=$(contrib/depends/config.guess)
|
||||
curl -L -O https://p2pool.io/checkpoints/checkpoints.dat && \
|
||||
curl -L -O https://p2pool.io/checkpoints/checkpoints.patch && \
|
||||
git apply checkpoints.patch && \
|
||||
cp -f checkpoints.dat src/blocks && \
|
||||
make -j$(nproc)
|
||||
|
||||
# ---
|
||||
|
||||
# runtime stage
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:22.04
|
||||
|
||||
COPY --from=0 /src/monero/build/*/release/bin /usr/local/bin/
|
||||
COPY --from=0 /src/monero/build/Linux/*/release/bin /usr/local/bin/
|
||||
|
||||
RUN set -e && \
|
||||
apt-get update -q -y --no-install-recommends && \
|
||||
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update -q -y --no-install-recommends && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
netcat \
|
||||
libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-thread-dev \
|
||||
libzmq5 \
|
||||
libreadline8 \
|
||||
libhidapi-libusb0 \
|
||||
libunbound8 \
|
||||
&& \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN set -e && \
|
||||
apt-get update -q -y --no-install-recommends && \
|
||||
@@ -20,15 +20,16 @@ RUN git clone https://github.com/xmrig/xmrig.git && \
|
||||
|
||||
# ---
|
||||
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:22.04
|
||||
|
||||
COPY --from=0 /usr/src/xmrig/build/xmrig /
|
||||
|
||||
RUN set -e && \
|
||||
apt-get update -q -y --no-install-recommends && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
|
||||
libssl1.1 \
|
||||
libcrypto++6 \
|
||||
libuv1 \
|
||||
libssl3 \
|
||||
libcrypto++8 \
|
||||
libhwloc15 \
|
||||
&& \
|
||||
apt-get clean
|
||||
|
||||
@@ -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.
|
||||
+21
-1
@@ -1,13 +1,15 @@
|
||||
### P2Pool command line options
|
||||
|
||||
```
|
||||
--wallet Wallet address to mine to. Subaddresses and integrated addresses are not supported!
|
||||
--wallet Main wallet address (the one that starts with 4...). To mine to a subaddress of this wallet, use it together with --subaddress
|
||||
--subaddress Subaddress to mine to. It must belong to the same wallet that was specified with --wallet parameter
|
||||
--host IP address of your Monero node, default is 127.0.0.1
|
||||
--rpc-port monerod RPC API port number, default is 18081
|
||||
--zmq-port monerod ZMQ pub port number, default is 18083 (same port as in monerod's "--zmq-pub" command line parameter)
|
||||
--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 +24,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
|
||||
@@ -37,6 +40,9 @@
|
||||
--rpc-ssl Enable SSL on RPC connections to the Monero node
|
||||
--rpc-ssl-fingerprint base64-encoded fingerprint of the Monero node's certificate (optional, use it for certificate pinning)
|
||||
--no-stratum-http Disable HTTP on Stratum ports
|
||||
--full-validation Enables full share validation / increases CPU usage
|
||||
--onion-address Tell other peers to use this .onion address to connect to this node through TOR
|
||||
--no-clearnet-p2p Forces P2P server to listen on 127.0.0.1 and to not connect to clearnet IPs
|
||||
```
|
||||
|
||||
### Example command line
|
||||
@@ -45,6 +51,12 @@
|
||||
p2pool.exe --host 127.0.0.1 --rpc-port 18081 --zmq-port 18083 --wallet YOUR_WALLET_ADDRESS --stratum 0.0.0.0:3333 --p2p 0.0.0.0:37889
|
||||
```
|
||||
|
||||
### Example command line (mining to a subaddress)
|
||||
|
||||
```
|
||||
p2pool.exe --host 127.0.0.1 --wallet WALLET_MAIN_ADDRESS --subaddress SUBADDRESS_FROM_THE_SAME_WALLET
|
||||
```
|
||||
|
||||
### Multiple backup hosts
|
||||
|
||||
You can have multiple hosts in command line. If P2Pool detects that the host it's currently using is down or stuck, it will cycle through hosts until it finds a working one. It will not switch back as long as the current host it found is working.
|
||||
@@ -114,3 +126,11 @@ openssl x509 -in rpc_ssl.crt -pubkey -noout -inform pem | openssl pkey -pubin -o
|
||||
```
|
||||
|
||||
By default, `rpc_ssl.crt` can be found in Monero data directory: `/home/username/.bitmonero/rpc_ssl.crt` on Linux and `C:\ProgramData\bitmonero\rpc_ssl.crt` on Windows.
|
||||
|
||||
|
||||
### Full validation
|
||||
|
||||
`--full-validation` is a boolean flag and will set the value to true; by default it is false to reduce CPU usage
|
||||
|
||||
Enable this if untrusted sources can submit shares to your p2pool server and you want to verify the validity of the shares PoW. Increases CPU usage.
|
||||
This option is for shared mining services, and not neccessary in local setups.
|
||||
@@ -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`
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
## Running P2Pool with TOR
|
||||
|
||||
P2Pool has several command-line options that should be used for TOR setup:
|
||||
|
||||
- `--socks5 IP:port` to specify your TOR proxy address (usually `127.0.0.1:9050` if you installed TOR on the same PC)
|
||||
- `--no-dns` to disable all DNS queries and prevent DNS leaks. P2Pool only ever makes DNS requests to get a list of seed nodes, to resolve your Monero node's domain (if it's not set as an IP address), and to resolve manually added peers
|
||||
- `--no-upnp` to disable UPnP requests (they are sent to your router, so use this option if you are not on your home network)
|
||||
- `--onion-address` your hidden service's address (without port number). This address will be broadcast to other peers when you mine a share in P2Pool. This is to prevent address spamming - you have to mine a real share to be able to broadcast your TOR address.
|
||||
- **Attention: this also links the onion address with the Monero wallet you use for mining. Create a new onion address when mining through TOR, don't use your existing onion addresses to avoid meta-data leaks.**
|
||||
- `--no-clearnet-p2p` to never connect to clearnet P2Pool nodes. This also makes sure that your P2Pool traffic doesn't exit the TOR network (and is not seen/modified by the exit nodes)
|
||||
|
||||
## Setting up a hidden service for P2Pool (Linux)
|
||||
|
||||
- Add these lines to your TOR config in `/etc/tor/torrc`:
|
||||
```
|
||||
HiddenServiceDir /var/lib/tor/p2pool/
|
||||
HiddenServicePort 28722 127.0.0.1:37889
|
||||
```
|
||||
Note that you must use port 28722 as the hidden service's port because this is what other peers will use when trying to connect to you. The internal port (37889) should be your actual P2Pool listening port (37889 for P2Pool-main, 37888 for P2Pool-mini, 37890 for P2Pool-nano)
|
||||
- Restart the TOR service:
|
||||
```
|
||||
sudo systemctl restart tor.service
|
||||
```
|
||||
- If there were no errors, you should now have the `/var/lib/tor/p2pool` directory with a `hostname` file in it. This file will contain your onion address
|
||||
- Use this address in P2Pool's command line: `--onion-address ADDRESS_FROM_HOSTNAME_FILE`
|
||||
- It is strongly recommended to create a new onion address for mining (see `--onion-address` remarks). This guide ensures you will be using a new onion address, assuming that you don't already have a hidden service named `p2pool`.
|
||||
|
||||
## Command line example
|
||||
```
|
||||
./p2pool --host MONERO_NODE_IP --wallet YOUR_WALLET --socks5 127.0.0.1:9050 --no-dns --no-upnp --onion-address ADDRESS_FROM_HOSTNAME_FILE
|
||||
```
|
||||
@@ -241,14 +241,14 @@ Wallets with confirmed P2Pool support<br>
|
||||
<li><a href="https://featherwallet.org/" target="_blank">Feather Wallet v2.1.0</a> and newer
|
||||
<li><a href="https://mymonero.com/" target="_blank">MyMonero</a>
|
||||
</ul>
|
||||
It's highly recommended to create a new wallet for mining because wallet addresses are public on p2pool. You have to use the primary wallet address for mining. Subaddresses and integrated addresses are not supported, just like with monerod solo mining.
|
||||
It's highly recommended to create a new wallet for mining because wallet addresses are public on p2pool. You can mine to a primary wallet address (the one starting with `4`) for mining. If you want to mine to a subaddress, you will need to provide both the main address (starting with 4) and the subaddress (starting with 8) using "--wallet" and "--subaddress" command line parameters.
|
||||
</details>
|
||||
|
||||
<details><summary>Setup Monero node</summary>
|
||||
<ul>
|
||||
<li>Download the latest Monero <a href="https://www.getmonero.org/downloads/" target="_blank">release</a>
|
||||
<li>[Optional] Open port <span>18080</span> (Monero p2p port) in your firewall to ensure better connectivity
|
||||
<li>Run <span>./monerod --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --disable-dns-checkpoints --enable-dns-blocklist</span>
|
||||
<li>Run <span>./monerod --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --enforce-dns-checkpointing --enable-dns-blocklist</span>
|
||||
<li>If your network connection's upload bandwidth is less than 10 Mbit, use <span>--out-peers 8 --in-peers 16</span> instead.
|
||||
<li>Wait until it's fully synchronized. If you didn't run Monero node before, it can take up to several days to synchronize (5-6 hours on a modern PC with fast SSD and fast Internet connection). You can add <span>--prune-blockchain</span> argument to the command line to run a pruned node (3-4 times less disk usage)
|
||||
</ul></details>
|
||||
@@ -304,7 +304,7 @@ P2Pool is a decentralized community, there is no dedicated support. You can reac
|
||||
<li><span style="font-size:2rem;color:#e09000;">I get an error "monerod RPC ... is incompatible, update to RPC >= v3.8"</span>
|
||||
<ul><li>Use monerod v0.18.0.0 or newer</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">I get warnings "peer ... is ahead on mainchain (height ..., your height ...). Is your monerod stuck or lagging?"</span>
|
||||
<ul><li>Make sure you add these arguments to monerod command line: <span style="color:#808080;">--zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist</span></ul><br>
|
||||
<ul><li>Make sure you add these arguments to monerod command line: <span style="color:#808080;">--zmq-pub tcp://127.0.0.1:18083 --enforce-dns-checkpointing --enable-dns-blocklist</span></ul><br>
|
||||
</ul>
|
||||
</td></tr></table>
|
||||
<br><br>
|
||||
|
||||
@@ -241,14 +241,14 @@ Wallets with confirmed P2Pool support<br>
|
||||
<li><a href="https://featherwallet.org/" target="_blank">Feather Wallet v2.1.0</a> and newer
|
||||
<li><a href="https://mymonero.com/" target="_blank">MyMonero</a>
|
||||
</ul>
|
||||
It's highly recommended to create a new wallet for mining because wallet addresses are public on p2pool. You have to use the primary wallet address for mining. Subaddresses and integrated addresses are not supported, just like with monerod solo mining.
|
||||
It's highly recommended to create a new wallet for mining because wallet addresses are public on p2pool. You can mine to a primary wallet address (the one starting with `4`) for mining. If you want to mine to a subaddress, you will need to provide both the main address (starting with 4) and the subaddress (starting with 8) using "--wallet" and "--subaddress" command line parameters.
|
||||
</details>
|
||||
|
||||
<details><summary>Setup Monero node</summary>
|
||||
<ul>
|
||||
<li>Download the latest Monero <a href="https://www.getmonero.org/downloads/" target="_blank">release</a>
|
||||
<li>[Optional] Open port <span>18080</span> (Monero p2p port) in your firewall to ensure better connectivity
|
||||
<li>Run <span>./monerod --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --disable-dns-checkpoints --enable-dns-blocklist</span>
|
||||
<li>Run <span>./monerod --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --enforce-dns-checkpointing --enable-dns-blocklist</span>
|
||||
<li>If your network connection's upload bandwidth is less than 10 Mbit, use <span>--out-peers 8 --in-peers 16</span> instead.
|
||||
<li>Wait until it's fully synchronized. If you didn't run Monero node before, it can take up to several days to synchronize (5-6 hours on a modern PC with fast SSD and fast Internet connection). You can add <span>--prune-blockchain</span> argument to the command line to run a pruned node (3-4 times less disk usage)
|
||||
</ul></details>
|
||||
@@ -304,7 +304,7 @@ P2Pool is a decentralized community, there is no dedicated support. You can reac
|
||||
<li><span style="font-size:2rem;color:#e09000;">I get an error "monerod RPC ... is incompatible, update to RPC >= v3.8"</span>
|
||||
<ul><li>Use monerod v0.18.0.0 or newer</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">I get warnings "peer ... is ahead on mainchain (height ..., your height ...). Is your monerod stuck or lagging?"</span>
|
||||
<ul><li>Make sure you add these arguments to monerod command line: <span style="color:#808080;">--zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist</span></ul><br>
|
||||
<ul><li>Make sure you add these arguments to monerod command line: <span style="color:#808080;">--zmq-pub tcp://127.0.0.1:18083 --enforce-dns-checkpointing --enable-dns-blocklist</span></ul><br>
|
||||
</ul>
|
||||
</td></tr></table>
|
||||
<br><br>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 671 B |
@@ -0,0 +1,320 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>P2Pool nano - Decentralized Monero mining pool</title>
|
||||
<link rel="shortcut icon" type="image/png" href="favicon-32x32.png"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.5">
|
||||
<style>
|
||||
a {
|
||||
color: #e09000;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #808080;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #383838;
|
||||
color: #e0e0e0;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
table {
|
||||
color: #c0c0c0;
|
||||
border-spacing:15px 5px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
table.menu_page {
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
details > summary {
|
||||
padding: 0.25rem;
|
||||
font-size: 2.5rem;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
details > ul > li > span {
|
||||
color: #e09000;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function elapsedTimeStr(ts1, ts2, short_form) {
|
||||
let s = ts2 - ts1;
|
||||
if (s < 0) s = 0;
|
||||
let m = Math.floor(s / 60) % 60;
|
||||
let h = Math.floor(s / 3600) % 24;
|
||||
let d = Math.floor(s / 86400);
|
||||
if (short_form) {
|
||||
if (s >= 86400) return d + 'd';
|
||||
if (s >= 3600) return h + 'h';
|
||||
return m + 'm';
|
||||
}
|
||||
else {
|
||||
let result = m + 'm';
|
||||
if (s >= 3600) result = h + 'h ' + result;
|
||||
if (s >= 86400) result = d + 'd ' + h + 'h';
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
function set_effort(el, value) {
|
||||
el.innerHTML = value.toFixed(2) + '%';
|
||||
el.style = (value < 100.0) ? "color:#00C000;" : (value < 200.0) ? "color:#E0E000;" : "color:#FF0000;";
|
||||
}
|
||||
|
||||
async function load_data() {
|
||||
init_menu();
|
||||
window.onresize = init_menu;
|
||||
|
||||
let pool_stats_req = await fetch('api/pool/stats');
|
||||
let pool_blocks_req = await fetch('api/pool/blocks');
|
||||
let network_stats_req = await fetch('api/network/stats');
|
||||
let latest_release_req = await fetch('api/latest_release');
|
||||
|
||||
let pool_stats = JSON.parse(await pool_stats_req.text());
|
||||
let pool_blocks = JSON.parse(await pool_blocks_req.text());
|
||||
let network_stats = JSON.parse(await network_stats_req.text());
|
||||
let latest_release = JSON.parse(await latest_release_req.text());
|
||||
|
||||
let pool_hashrate = pool_stats.pool_statistics.hashRate / 1e6;
|
||||
let pplns_duration = pool_stats.pool_statistics.pplnsWeight / pool_stats.pool_statistics.hashRate;
|
||||
let min_payout = 0.6 * pool_stats.pool_statistics.sidechainDifficulty / pool_stats.pool_statistics.pplnsWeight;
|
||||
|
||||
document.getElementById("pool_hashrate").innerHTML = pool_hashrate.toFixed(3) + ' MH/s';
|
||||
document.getElementById("pplns_duration").innerHTML = elapsedTimeStr(0, pplns_duration, 0) + ' ' + Math.floor(pplns_duration % 60) + 's';
|
||||
document.getElementById("pool_miners").innerHTML = pool_stats.pool_statistics.miners;
|
||||
document.getElementById("min_payout").innerHTML = min_payout.toFixed(5) + ' XMR';
|
||||
document.getElementById("latest_release").innerHTML = '<a href="' + latest_release.html_url + '" target="_blank">' + latest_release.name + '</a>';
|
||||
|
||||
let ts = Math.floor(Date.now() / 1000);
|
||||
|
||||
let n = pool_stats.pool_statistics.lastBlockFound;
|
||||
document.getElementById("pool_last_block").innerHTML = n ? ('<a href="/explorer/block/' + n + '" target="_blank">' + n + '</a> (' + elapsedTimeStr(pool_stats.pool_statistics.lastBlockFoundTime, ts, 0) + ' ago)') : 'N/A';
|
||||
document.getElementById("pool_total_blocks").innerHTML = pool_stats.pool_statistics.totalBlocksFound;
|
||||
|
||||
let t = document.getElementById('menu_blocks');
|
||||
let cur_effort = (pool_stats.pool_statistics.totalHashes - ((pool_blocks.length > 0) ? pool_blocks[0].totalHashes : 0)) * 100.0 / network_stats.difficulty;
|
||||
set_effort(document.getElementById("current_effort"), (cur_effort >= 0) ? cur_effort : 0);
|
||||
let total_effort = 0.0;
|
||||
let num_blocks_with_effort = 0;
|
||||
for (let i = 0, m = Math.min(pool_blocks.length, 50); i < m; ++i) {
|
||||
if (t.rows.length <= i + 1) t.insertRow(-1);
|
||||
let row = t.rows[i + 1];
|
||||
while (row.cells.length < 3) row.insertCell(-1);
|
||||
|
||||
let height = row.cells[0];
|
||||
let effort = row.cells[1];
|
||||
let age = row.cells[2];
|
||||
|
||||
n = pool_blocks[i].height;
|
||||
height.innerHTML = '<a href="/explorer/block/' + pool_blocks[i].hash + '" target="_blank">' + n + '</a>';
|
||||
|
||||
let value = 0.0;
|
||||
|
||||
if ((i + 1 < pool_blocks.length) && (pool_blocks[i + 1].totalHashes > 0)) {
|
||||
value = (pool_blocks[i].totalHashes - pool_blocks[i + 1].totalHashes) * 100.0 / pool_blocks[i].difficulty;
|
||||
}
|
||||
else {
|
||||
value = pool_blocks[i].totalHashes * 100.0 / pool_blocks[i].difficulty;
|
||||
}
|
||||
|
||||
total_effort += value;
|
||||
++num_blocks_with_effort;
|
||||
set_effort(effort, value);
|
||||
|
||||
age.innerHTML = elapsedTimeStr(pool_blocks[i].ts, ts, 1);
|
||||
}
|
||||
if (num_blocks_with_effort > 0) {
|
||||
let average_effort = total_effort / num_blocks_with_effort;
|
||||
set_effort(document.getElementById("average_effort"), average_effort);
|
||||
}
|
||||
|
||||
let network_hashrate = network_stats.difficulty / 120e6;
|
||||
document.getElementById("monero_hashrate").innerHTML = network_hashrate.toFixed(3) + ' MH/s';
|
||||
document.getElementById("monero_last_block").innerHTML = network_stats.height + ' (' + elapsedTimeStr(network_stats.timestamp, ts, 0) + ' ago)';
|
||||
}
|
||||
|
||||
const menu = ['pool', 'blocks', 'help', 'faq'];
|
||||
|
||||
function init_menu()
|
||||
{
|
||||
let is_mobile = false;
|
||||
|
||||
if (navigator.userAgentData) {
|
||||
is_mobile = navigator.userAgentData.mobile;
|
||||
}
|
||||
else {
|
||||
const mobile_preg = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i;
|
||||
is_mobile = mobile_preg.test(navigator.userAgent) || mobile_preg.test(navigator.platform);
|
||||
}
|
||||
|
||||
let e = document.getElementById('main_menu');
|
||||
|
||||
if (!is_mobile) {
|
||||
e.style.cursor = "pointer";
|
||||
document.querySelectorAll("details > summary").forEach(el => { el.style.cursor = "pointer"; });
|
||||
}
|
||||
|
||||
e.style.width = (window.innerWidth > 1600) ? "1600px" : "100%";
|
||||
|
||||
menu.forEach(element => {
|
||||
let e2 = document.getElementById('menu_' + element);
|
||||
e2.style.width = e.style.width;
|
||||
});
|
||||
}
|
||||
|
||||
function toggle_menu(name) {
|
||||
if (!name) {
|
||||
name = 'pool';
|
||||
}
|
||||
|
||||
menu.forEach(element => {
|
||||
let e = document.getElementById('menu_' + element);
|
||||
let b = document.getElementById('button_' + element);
|
||||
if (element == name) {
|
||||
e.style.display = 'block';
|
||||
b.style.backgroundColor = '#646464';
|
||||
window.location.hash = '#' + name;
|
||||
}
|
||||
else {
|
||||
e.style.display = 'none';
|
||||
b.style.backgroundColor = '#404040';
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="load_data();setInterval(load_data, 2000);toggle_menu(window.location.hash.substr(1));">
|
||||
<div style="font-size:3rem;text-align:center;">P2Pool nano</div><div style="font-size:1.1rem;text-align:center;">Decentralized Monero mining pool</div>
|
||||
<div style="font-size:1rem;text-align:center;">Latest release: <span id="latest_release"><a href="https://github.com/SChernykh/p2pool/releases/latest" target="_blank">P2Pool</a></span></div>
|
||||
<br>
|
||||
<table id="main_menu" style="width:100%;margin-left:auto;margin-right:auto;table-layout:fixed;text-align:center;-ms-touch-action:none;touch-action:none;"><tr>
|
||||
<td onclick="toggle_menu('pool')" id="button_pool">Pool</td>
|
||||
<td onclick="toggle_menu('blocks')" id="button_blocks">Blocks</td>
|
||||
<td onclick="toggle_menu('help')" id="button_help">Get started</td>
|
||||
<td onclick="toggle_menu('faq')" id="button_faq">FAQ</td>
|
||||
</tr></table>
|
||||
<br>
|
||||
<table id="menu_pool" class="menu_page">
|
||||
<tr><td></td><td style="width:17rem;">Pool</td><td>Network</td></tr>
|
||||
<tr><td style="padding-bottom: 1rem;"></td><td></td><td></td></tr>
|
||||
<tr><td>Hashrate</td><td><span id="pool_hashrate">N/A</span></td><td><span id="monero_hashrate">N/A</span></td></tr>
|
||||
<tr><td>Miners</td><td><span id="pool_miners">N/A</span></td><td></td></tr>
|
||||
<tr><td>PPLNS window</td><td><span id="pplns_duration">N/A</span></td><td></td></tr>
|
||||
<tr><td>Last block</td><td><span id="pool_last_block">N/A</span></td><td><span id="monero_last_block">N/A</span></td></tr>
|
||||
<tr><td>Total blocks</td><td><span id="pool_total_blocks">N/A</span></td><td></td></tr>
|
||||
<tr><td>Current effort</td><td><span id="current_effort">N/A</span></td><td></td></tr>
|
||||
<tr><td>Average effort<br><div style="text-align:center;font-size:0.9rem">last 50 blocks</div></td><td><span id="average_effort">N/A</span></td><td></td></tr>
|
||||
<tr><td> </td><td></td><td></td></tr>
|
||||
<tr><td>Fee</td><td>0%</td><td></td></tr>
|
||||
<tr><td>Min payout</td><td><span id="min_payout">0.00027 XMR</span></td><td></td></tr>
|
||||
<tr><td>Payout scheme</td><td><a href="https://en.wikipedia.org/wiki/Mining_pool#Pay-per-last-N-shares" target="_blank">PPLNS</a></td><td></td></tr>
|
||||
<tr><td> </td><td></td><td></td></tr>
|
||||
<tr><td>Statistics</td><td><a href="https://nano.p2pool.observer/" target="_blank">P2Pool observer</a></td><td></td></tr>
|
||||
</table>
|
||||
<table id="menu_blocks" class="menu_page">
|
||||
<tr><td style="padding-right:5rem;">Height</td><td style="padding-right:5rem;">Effort</td><td>Age</td></tr>
|
||||
</table>
|
||||
<table id="menu_help" class="menu_page"><tr><td>
|
||||
|
||||
<details><summary>P2Pool video guide</summary>
|
||||
<ul>
|
||||
<li>A detailed <a href="https://www.youtube.com/watch?v=NbxbRu-2GWI" target="_blank">video guide</a> to install P2Pool and start mining
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details><summary>Setup Monero wallet</summary>
|
||||
Wallets with confirmed P2Pool support<br>
|
||||
<span style="font-size:0.9rem;color:#e09000;">You might not see P2Pool payouts in other wallets if they're not updated!</span>
|
||||
<ul>
|
||||
<li>Official <a href="https://www.getmonero.org/downloads/" target="_blank">Monero CLI and GUI v0.18.1.0</a> and newer
|
||||
<li><a href="https://play.google.com/store/apps/details?id=com.m2049r.xmrwallet" target="_blank">Monerujo v3.0.2 "Fluorine Fermi"</a> and newer
|
||||
<li><a href="https://play.google.com/store/apps/details?id=com.cakewallet.cake_wallet" target="_blank">Cake Wallet v4.4.5</a> and newer
|
||||
<li><a href="https://featherwallet.org/" target="_blank">Feather Wallet v2.1.0</a> and newer
|
||||
<li><a href="https://mymonero.com/" target="_blank">MyMonero</a>
|
||||
</ul>
|
||||
It's highly recommended to create a new wallet for mining because wallet addresses are public on p2pool. You can mine to a primary wallet address (the one starting with `4`) for mining. If you want to mine to a subaddress, you will need to provide both the main address (starting with 4) and the subaddress (starting with 8) using "--wallet" and "--subaddress" command line parameters.
|
||||
</details>
|
||||
|
||||
<details><summary>Setup Monero node</summary>
|
||||
<ul>
|
||||
<li>Download the latest Monero <a href="https://www.getmonero.org/downloads/" target="_blank">release</a>
|
||||
<li>[Optional] Open port <span>18080</span> (Monero p2p port) in your firewall to ensure better connectivity
|
||||
<li>Run <span>./monerod --zmq-pub tcp://127.0.0.1:18083 --out-peers 32 --in-peers 64 --add-priority-node=p2pmd.xmrvsbeast.com:18080 --add-priority-node=nodes.hashvault.pro:18080 --enforce-dns-checkpointing --enable-dns-blocklist</span>
|
||||
<li>If your network connection's upload bandwidth is less than 10 Mbit, use <span>--out-peers 8 --in-peers 16</span> instead.
|
||||
<li>Wait until it's fully synchronized. If you didn't run Monero node before, it can take up to several days to synchronize (5-6 hours on a modern PC with fast SSD and fast Internet connection). You can add <span>--prune-blockchain</span> argument to the command line to run a pruned node (3-4 times less disk usage)
|
||||
</ul></details>
|
||||
|
||||
<details><summary>Setup P2Pool node</summary>
|
||||
<ul>
|
||||
<li>Download the latest P2Pool <a href="https://github.com/SChernykh/p2pool/releases/latest" target="_blank">release</a>
|
||||
<li>[Optional] Open port <span>37889</span> (P2Pool port) or <span>37890</span> (P2Pool nano port) in your firewall to ensure better connectivity
|
||||
<li>Run <span>./p2pool --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS --nano</span>
|
||||
<li>It should take no more than 5-10 minutes to synchronize
|
||||
</ul></details>
|
||||
|
||||
<details><summary>Miner software</summary>
|
||||
<ul>
|
||||
<li><a href="https://xmrig.com/" target="_blank">XMRig</a> is recommended. <a href="https://xmrig.com/proxy" target="_blank">XMRig Proxy</a> is fully supported.
|
||||
<li>Once P2Pool sync is complete, XMRig should be able to connect to the stratum server on port <span>3333</span>
|
||||
<li>Run <span>./xmrig -o 127.0.0.1:3333</span>. Note that you don't need to specify wallet address for xmrig. Wallet address set in xmrig config will be ignored!
|
||||
<li>To set custom fixed difficulty for your miner (for example, <span>10000</span>), run <span>./xmrig -u x+10000 -o 127.0.0.1:3333</span>
|
||||
<li>To connect another mining rig to your P2Pool node, run <span>./xmrig -o YOUR_P2POOL_NODE_IP:3333</span> on that mining rig
|
||||
</ul></details>
|
||||
|
||||
<details><summary>Checking your progress</summary>
|
||||
<ul>
|
||||
<li>You can enter your wallet address at <a href="https://p2pool.observer/" target="_blank">P2Pool Observer</a>
|
||||
<li>P2Pool Observer for P2Pool nano can be found <a href="https://nano.p2pool.observer/" target="_blank">here</a>
|
||||
<li>You will find your wallet's statistics there only after you've mined at least 1 P2Pool share
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details><summary>Help and support</summary>
|
||||
P2Pool is a decentralized community, there is no dedicated support. You can reach and get help from other miners on:
|
||||
<ul>
|
||||
<li>IRC channels: <span>#p2pool-log</span> (<span>#p2pool-mini</span> for P2Pool mini) on <a href="https://libera.chat/" target="_blank">Libera.Chat</a>
|
||||
<li>Reddit: <a href="https://reddit.com/r/MoneroMining/" target="_blank">r/MoneroMining</a>
|
||||
</ul></details>
|
||||
</td></tr></table>
|
||||
<table id="menu_faq" class="menu_page"><tr><td>
|
||||
<ul>
|
||||
<li><span style="font-size:2rem;color:#e09000;">What are system requirements to run P2Pool?</span>
|
||||
<ul><li>P2Pool needs 0.5 GB disc space and 2.6 GB RAM to run (0.6 GB RAM in light mode). Add this to monerod requirements if you run both on the same machine. Add <span style="color:#808080;">--light-mode</span> to p2pool command line to reduce the memory usage to 0.6 GB, or <span style="color:#808080;">--no-randomx --no-cache</span> to reduce the memory usage to less than 100 MB.</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">Does P2Pool work with XMRig Proxy?</span>
|
||||
<ul><li>Yes, P2Pool fully supports <a href="https://xmrig.com/proxy" target="_blank">XMRig Proxy</a>.</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">Does monerod have to be run on the same machine as P2Pool?</span>
|
||||
<ul><li>No, you can run them on different machines and even connect multiple p2pool instances to a single server running monerod</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">Does P2Pool work with pruned Monero node?</span>
|
||||
<ul><li>Yes, you can use pruned Monero node to mine on P2Pool</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">Does P2Pool require incoming connections to work properly?</span>
|
||||
<ul><li>P2Pool (and Monero) can work with only outgoing connections, but it's recommended to open ports 18080 (Monero) and 37889/37888/37890 (P2Pool/P2Pool mini/P2Pool nano) for better connectivity with the rest of the network.</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">I have been mining for several hours and still got no rewards?</span>
|
||||
<ul><li>P2Pool doesn't work exactly like regular pools - there's no "pending balance" here. You need to find a pool share first and then wait for P2Pool to find a Monero block. You'll get a payout to your XMR wallet as soon as a block is found and you have shares in PPLNS window. It can take several days to a week to find a share if your hashrate is low. Type "status" command in P2Pool console or visit <a href="https://nano.p2pool.observer/" target="_blank">P2Pool observer</a> to check your progress.</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">I am mining but I can't find any shares</span>
|
||||
<ul><li>First check for any warnings and errors in P2Pool console and logs. If everything works fine, you can check the <a href="https://p2pool.observer/calculate-share-time" target="_blank">average share time calculator</a> to get an idea how often you should find a share with your hashrate. If this time is more than 1 day, it's recommended to switch to P2Pool mini or P2Pool nano by adding <span style="color:#808080;">--mini</span> or <span style="color:#808080;">--nano</span> to P2Pool command line.</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">I get an error "monerod RPC ... is incompatible, update to RPC >= v3.8"</span>
|
||||
<ul><li>Use monerod v0.18.0.0 or newer</ul><br>
|
||||
<li><span style="font-size:2rem;color:#e09000;">I get warnings "peer ... is ahead on mainchain (height ..., your height ...). Is your monerod stuck or lagging?"</span>
|
||||
<ul><li>Make sure you add these arguments to monerod command line: <span style="color:#808080;">--zmq-pub tcp://127.0.0.1:18083 --enforce-dns-checkpointing --enable-dns-blocklist</span></ul><br>
|
||||
</ul>
|
||||
</td></tr></table>
|
||||
<br><br>
|
||||
<div style="position:fixed;width:100%;bottom:0;background-color:#383838;font-size:1rem;text-align:center;color:#b0b0b0;">
|
||||
<a href="api/" target="_blank">Pool API</a> | <a href="https://github.com/SChernykh/p2pool" target="_blank">Source</a> | <a href="http://yucmgsbw7nknw7oi3bkuwudvc657g2xcqahhbjyewazusyytapqo4xid.onion/nano/" target="_blank">Onion URL</a><br>
|
||||
Donate to support the project:<br><span style="font-size:0.9rem;color:#b0b0b0;">44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg</span><br>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+1
-1
Submodule external/src/RandomX updated: e613bfe364...d341d6a61c
+4
@@ -0,0 +1,4 @@
|
||||
To update the files:
|
||||
|
||||
- Build gRPC in `../../../grpc/.build` folder: `cmake .. && make -j$(nproc)`
|
||||
- Run `../../../grpc/.build/third_party/protobuf/protoc --cpp_out=. --plugin=protoc-gen-grpc=../../../grpc/.build/grpc_cpp_plugin --grpc_out=. --proto_path=../../../grpc/third_party/protobuf/src --proto_path=. *.proto`
|
||||
+132
-18
@@ -19,6 +19,7 @@
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
|
||||
@@ -56,10 +57,13 @@ static const char* BaseNode_method_names[] = {
|
||||
"/tari.rpc.BaseNode/ListConnectedPeers",
|
||||
"/tari.rpc.BaseNode/GetMempoolStats",
|
||||
"/tari.rpc.BaseNode/GetActiveValidatorNodes",
|
||||
"/tari.rpc.BaseNode/GetValidatorNodeChanges",
|
||||
"/tari.rpc.BaseNode/GetShardKey",
|
||||
"/tari.rpc.BaseNode/GetTemplateRegistrations",
|
||||
"/tari.rpc.BaseNode/GetSideChainUtxos",
|
||||
"/tari.rpc.BaseNode/GetNetworkState",
|
||||
"/tari.rpc.BaseNode/SearchPaymentReferences",
|
||||
"/tari.rpc.BaseNode/SearchPaymentReferencesViaOutputHash",
|
||||
};
|
||||
|
||||
std::unique_ptr< BaseNode::Stub> BaseNode::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
||||
@@ -102,10 +106,13 @@ BaseNode::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel,
|
||||
, rpcmethod_ListConnectedPeers_(BaseNode_method_names[30], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetMempoolStats_(BaseNode_method_names[31], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetActiveValidatorNodes_(BaseNode_method_names[32], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_GetShardKey_(BaseNode_method_names[33], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetTemplateRegistrations_(BaseNode_method_names[34], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_GetSideChainUtxos_(BaseNode_method_names[35], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_GetNetworkState_(BaseNode_method_names[36], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetValidatorNodeChanges_(BaseNode_method_names[33], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetShardKey_(BaseNode_method_names[34], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetTemplateRegistrations_(BaseNode_method_names[35], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_GetSideChainUtxos_(BaseNode_method_names[36], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_GetNetworkState_(BaseNode_method_names[37], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SearchPaymentReferences_(BaseNode_method_names[38], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_SearchPaymentReferencesViaOutputHash_(BaseNode_method_names[39], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
{}
|
||||
|
||||
::grpc::ClientReader< ::tari::rpc::BlockHeaderResponse>* BaseNode::Stub::ListHeadersRaw(::grpc::ClientContext* context, const ::tari::rpc::ListHeadersRequest& request) {
|
||||
@@ -255,23 +262,23 @@ void BaseNode::Stub::async::GetBlockFees(::grpc::ClientContext* context, const :
|
||||
return result;
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Stub::GetVersion(::grpc::ClientContext* context, const ::tari::rpc::Empty& request, ::tari::rpc::StringValue* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall< ::tari::rpc::Empty, ::tari::rpc::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetVersion_, context, request, response);
|
||||
::grpc::Status BaseNode::Stub::GetVersion(::grpc::ClientContext* context, const ::tari::rpc::Empty& request, ::tari::rpc::BaseNodeGetVersionResponse* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall< ::tari::rpc::Empty, ::tari::rpc::BaseNodeGetVersionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetVersion_, context, request, response);
|
||||
}
|
||||
|
||||
void BaseNode::Stub::async::GetVersion(::grpc::ClientContext* context, const ::tari::rpc::Empty* request, ::tari::rpc::StringValue* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc::internal::CallbackUnaryCall< ::tari::rpc::Empty, ::tari::rpc::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetVersion_, context, request, response, std::move(f));
|
||||
void BaseNode::Stub::async::GetVersion(::grpc::ClientContext* context, const ::tari::rpc::Empty* request, ::tari::rpc::BaseNodeGetVersionResponse* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc::internal::CallbackUnaryCall< ::tari::rpc::Empty, ::tari::rpc::BaseNodeGetVersionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetVersion_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void BaseNode::Stub::async::GetVersion(::grpc::ClientContext* context, const ::tari::rpc::Empty* request, ::tari::rpc::StringValue* response, ::grpc::ClientUnaryReactor* reactor) {
|
||||
void BaseNode::Stub::async::GetVersion(::grpc::ClientContext* context, const ::tari::rpc::Empty* request, ::tari::rpc::BaseNodeGetVersionResponse* response, ::grpc::ClientUnaryReactor* reactor) {
|
||||
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetVersion_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::tari::rpc::StringValue>* BaseNode::Stub::PrepareAsyncGetVersionRaw(::grpc::ClientContext* context, const ::tari::rpc::Empty& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tari::rpc::StringValue, ::tari::rpc::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetVersion_, context, request);
|
||||
::grpc::ClientAsyncResponseReader< ::tari::rpc::BaseNodeGetVersionResponse>* BaseNode::Stub::PrepareAsyncGetVersionRaw(::grpc::ClientContext* context, const ::tari::rpc::Empty& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tari::rpc::BaseNodeGetVersionResponse, ::tari::rpc::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetVersion_, context, request);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::tari::rpc::StringValue>* BaseNode::Stub::AsyncGetVersionRaw(::grpc::ClientContext* context, const ::tari::rpc::Empty& request, ::grpc::CompletionQueue* cq) {
|
||||
::grpc::ClientAsyncResponseReader< ::tari::rpc::BaseNodeGetVersionResponse>* BaseNode::Stub::AsyncGetVersionRaw(::grpc::ClientContext* context, const ::tari::rpc::Empty& request, ::grpc::CompletionQueue* cq) {
|
||||
auto* result =
|
||||
this->PrepareAsyncGetVersionRaw(context, request, cq);
|
||||
result->StartCall();
|
||||
@@ -797,6 +804,29 @@ void BaseNode::Stub::async::GetActiveValidatorNodes(::grpc::ClientContext* conte
|
||||
return ::grpc::internal::ClientAsyncReaderFactory< ::tari::rpc::GetActiveValidatorNodesResponse>::Create(channel_.get(), cq, rpcmethod_GetActiveValidatorNodes_, context, request, false, nullptr);
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Stub::GetValidatorNodeChanges(::grpc::ClientContext* context, const ::tari::rpc::GetValidatorNodeChangesRequest& request, ::tari::rpc::GetValidatorNodeChangesResponse* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall< ::tari::rpc::GetValidatorNodeChangesRequest, ::tari::rpc::GetValidatorNodeChangesResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetValidatorNodeChanges_, context, request, response);
|
||||
}
|
||||
|
||||
void BaseNode::Stub::async::GetValidatorNodeChanges(::grpc::ClientContext* context, const ::tari::rpc::GetValidatorNodeChangesRequest* request, ::tari::rpc::GetValidatorNodeChangesResponse* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc::internal::CallbackUnaryCall< ::tari::rpc::GetValidatorNodeChangesRequest, ::tari::rpc::GetValidatorNodeChangesResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetValidatorNodeChanges_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void BaseNode::Stub::async::GetValidatorNodeChanges(::grpc::ClientContext* context, const ::tari::rpc::GetValidatorNodeChangesRequest* request, ::tari::rpc::GetValidatorNodeChangesResponse* response, ::grpc::ClientUnaryReactor* reactor) {
|
||||
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetValidatorNodeChanges_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::tari::rpc::GetValidatorNodeChangesResponse>* BaseNode::Stub::PrepareAsyncGetValidatorNodeChangesRaw(::grpc::ClientContext* context, const ::tari::rpc::GetValidatorNodeChangesRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tari::rpc::GetValidatorNodeChangesResponse, ::tari::rpc::GetValidatorNodeChangesRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetValidatorNodeChanges_, context, request);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::tari::rpc::GetValidatorNodeChangesResponse>* BaseNode::Stub::AsyncGetValidatorNodeChangesRaw(::grpc::ClientContext* context, const ::tari::rpc::GetValidatorNodeChangesRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
auto* result =
|
||||
this->PrepareAsyncGetValidatorNodeChangesRaw(context, request, cq);
|
||||
result->StartCall();
|
||||
return result;
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Stub::GetShardKey(::grpc::ClientContext* context, const ::tari::rpc::GetShardKeyRequest& request, ::tari::rpc::GetShardKeyResponse* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall< ::tari::rpc::GetShardKeyRequest, ::tari::rpc::GetShardKeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetShardKey_, context, request, response);
|
||||
}
|
||||
@@ -875,6 +905,38 @@ void BaseNode::Stub::async::GetNetworkState(::grpc::ClientContext* context, cons
|
||||
return result;
|
||||
}
|
||||
|
||||
::grpc::ClientReader< ::tari::rpc::PaymentReferenceResponse>* BaseNode::Stub::SearchPaymentReferencesRaw(::grpc::ClientContext* context, const ::tari::rpc::SearchPaymentReferencesRequest& request) {
|
||||
return ::grpc::internal::ClientReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(channel_.get(), rpcmethod_SearchPaymentReferences_, context, request);
|
||||
}
|
||||
|
||||
void BaseNode::Stub::async::SearchPaymentReferences(::grpc::ClientContext* context, const ::tari::rpc::SearchPaymentReferencesRequest* request, ::grpc::ClientReadReactor< ::tari::rpc::PaymentReferenceResponse>* reactor) {
|
||||
::grpc::internal::ClientCallbackReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_SearchPaymentReferences_, context, request, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncReader< ::tari::rpc::PaymentReferenceResponse>* BaseNode::Stub::AsyncSearchPaymentReferencesRaw(::grpc::ClientContext* context, const ::tari::rpc::SearchPaymentReferencesRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
|
||||
return ::grpc::internal::ClientAsyncReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(channel_.get(), cq, rpcmethod_SearchPaymentReferences_, context, request, true, tag);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncReader< ::tari::rpc::PaymentReferenceResponse>* BaseNode::Stub::PrepareAsyncSearchPaymentReferencesRaw(::grpc::ClientContext* context, const ::tari::rpc::SearchPaymentReferencesRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc::internal::ClientAsyncReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(channel_.get(), cq, rpcmethod_SearchPaymentReferences_, context, request, false, nullptr);
|
||||
}
|
||||
|
||||
::grpc::ClientReader< ::tari::rpc::PaymentReferenceResponse>* BaseNode::Stub::SearchPaymentReferencesViaOutputHashRaw(::grpc::ClientContext* context, const ::tari::rpc::FetchMatchingUtxosRequest& request) {
|
||||
return ::grpc::internal::ClientReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(channel_.get(), rpcmethod_SearchPaymentReferencesViaOutputHash_, context, request);
|
||||
}
|
||||
|
||||
void BaseNode::Stub::async::SearchPaymentReferencesViaOutputHash(::grpc::ClientContext* context, const ::tari::rpc::FetchMatchingUtxosRequest* request, ::grpc::ClientReadReactor< ::tari::rpc::PaymentReferenceResponse>* reactor) {
|
||||
::grpc::internal::ClientCallbackReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_SearchPaymentReferencesViaOutputHash_, context, request, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncReader< ::tari::rpc::PaymentReferenceResponse>* BaseNode::Stub::AsyncSearchPaymentReferencesViaOutputHashRaw(::grpc::ClientContext* context, const ::tari::rpc::FetchMatchingUtxosRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
|
||||
return ::grpc::internal::ClientAsyncReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(channel_.get(), cq, rpcmethod_SearchPaymentReferencesViaOutputHash_, context, request, true, tag);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncReader< ::tari::rpc::PaymentReferenceResponse>* BaseNode::Stub::PrepareAsyncSearchPaymentReferencesViaOutputHashRaw(::grpc::ClientContext* context, const ::tari::rpc::FetchMatchingUtxosRequest& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc::internal::ClientAsyncReaderFactory< ::tari::rpc::PaymentReferenceResponse>::Create(channel_.get(), cq, rpcmethod_SearchPaymentReferencesViaOutputHash_, context, request, false, nullptr);
|
||||
}
|
||||
|
||||
BaseNode::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[0],
|
||||
@@ -949,11 +1011,11 @@ BaseNode::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[7],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< BaseNode::Service, ::tari::rpc::Empty, ::tari::rpc::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
new ::grpc::internal::RpcMethodHandler< BaseNode::Service, ::tari::rpc::Empty, ::tari::rpc::BaseNodeGetVersionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](BaseNode::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::tari::rpc::Empty* req,
|
||||
::tari::rpc::StringValue* resp) {
|
||||
::tari::rpc::BaseNodeGetVersionResponse* resp) {
|
||||
return service->GetVersion(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
@@ -1209,6 +1271,16 @@ BaseNode::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[33],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< BaseNode::Service, ::tari::rpc::GetValidatorNodeChangesRequest, ::tari::rpc::GetValidatorNodeChangesResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](BaseNode::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::tari::rpc::GetValidatorNodeChangesRequest* req,
|
||||
::tari::rpc::GetValidatorNodeChangesResponse* resp) {
|
||||
return service->GetValidatorNodeChanges(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[34],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< BaseNode::Service, ::tari::rpc::GetShardKeyRequest, ::tari::rpc::GetShardKeyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](BaseNode::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
@@ -1217,7 +1289,7 @@ BaseNode::Service::Service() {
|
||||
return service->GetShardKey(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[34],
|
||||
BaseNode_method_names[35],
|
||||
::grpc::internal::RpcMethod::SERVER_STREAMING,
|
||||
new ::grpc::internal::ServerStreamingHandler< BaseNode::Service, ::tari::rpc::GetTemplateRegistrationsRequest, ::tari::rpc::GetTemplateRegistrationResponse>(
|
||||
[](BaseNode::Service* service,
|
||||
@@ -1227,7 +1299,7 @@ BaseNode::Service::Service() {
|
||||
return service->GetTemplateRegistrations(ctx, req, writer);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[35],
|
||||
BaseNode_method_names[36],
|
||||
::grpc::internal::RpcMethod::SERVER_STREAMING,
|
||||
new ::grpc::internal::ServerStreamingHandler< BaseNode::Service, ::tari::rpc::GetSideChainUtxosRequest, ::tari::rpc::GetSideChainUtxosResponse>(
|
||||
[](BaseNode::Service* service,
|
||||
@@ -1237,7 +1309,7 @@ BaseNode::Service::Service() {
|
||||
return service->GetSideChainUtxos(ctx, req, writer);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[36],
|
||||
BaseNode_method_names[37],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< BaseNode::Service, ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](BaseNode::Service* service,
|
||||
@@ -1246,6 +1318,26 @@ BaseNode::Service::Service() {
|
||||
::tari::rpc::GetNetworkStateResponse* resp) {
|
||||
return service->GetNetworkState(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[38],
|
||||
::grpc::internal::RpcMethod::SERVER_STREAMING,
|
||||
new ::grpc::internal::ServerStreamingHandler< BaseNode::Service, ::tari::rpc::SearchPaymentReferencesRequest, ::tari::rpc::PaymentReferenceResponse>(
|
||||
[](BaseNode::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::tari::rpc::SearchPaymentReferencesRequest* req,
|
||||
::grpc::ServerWriter<::tari::rpc::PaymentReferenceResponse>* writer) {
|
||||
return service->SearchPaymentReferences(ctx, req, writer);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
BaseNode_method_names[39],
|
||||
::grpc::internal::RpcMethod::SERVER_STREAMING,
|
||||
new ::grpc::internal::ServerStreamingHandler< BaseNode::Service, ::tari::rpc::FetchMatchingUtxosRequest, ::tari::rpc::PaymentReferenceResponse>(
|
||||
[](BaseNode::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::tari::rpc::FetchMatchingUtxosRequest* req,
|
||||
::grpc::ServerWriter<::tari::rpc::PaymentReferenceResponse>* writer) {
|
||||
return service->SearchPaymentReferencesViaOutputHash(ctx, req, writer);
|
||||
}, this)));
|
||||
}
|
||||
|
||||
BaseNode::Service::~Service() {
|
||||
@@ -1300,7 +1392,7 @@ BaseNode::Service::~Service() {
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Service::GetVersion(::grpc::ServerContext* context, const ::tari::rpc::Empty* request, ::tari::rpc::StringValue* response) {
|
||||
::grpc::Status BaseNode::Service::GetVersion(::grpc::ServerContext* context, const ::tari::rpc::Empty* request, ::tari::rpc::BaseNodeGetVersionResponse* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
@@ -1482,6 +1574,13 @@ BaseNode::Service::~Service() {
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Service::GetValidatorNodeChanges(::grpc::ServerContext* context, const ::tari::rpc::GetValidatorNodeChangesRequest* request, ::tari::rpc::GetValidatorNodeChangesResponse* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Service::GetShardKey(::grpc::ServerContext* context, const ::tari::rpc::GetShardKeyRequest* request, ::tari::rpc::GetShardKeyResponse* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
@@ -1510,7 +1609,22 @@ BaseNode::Service::~Service() {
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Service::SearchPaymentReferences(::grpc::ServerContext* context, const ::tari::rpc::SearchPaymentReferencesRequest* request, ::grpc::ServerWriter< ::tari::rpc::PaymentReferenceResponse>* writer) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) writer;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status BaseNode::Service::SearchPaymentReferencesViaOutputHash(::grpc::ServerContext* context, const ::tari::rpc::FetchMatchingUtxosRequest* request, ::grpc::ServerWriter< ::tari::rpc::PaymentReferenceResponse>* writer) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) writer;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
|
||||
} // namespace tari
|
||||
} // namespace rpc
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
|
||||
|
||||
+550
-73
File diff suppressed because it is too large
Load Diff
+16069
-7250
File diff suppressed because it is too large
Load Diff
+17053
-9955
File diff suppressed because it is too large
Load Diff
+172
-28
@@ -46,7 +46,7 @@ service BaseNode {
|
||||
// Returns Block Fees
|
||||
rpc GetBlockFees (BlockGroupRequest) returns (BlockGroupResponse);
|
||||
// Get Version
|
||||
rpc GetVersion(Empty) returns (StringValue);
|
||||
rpc GetVersion(Empty) returns (BaseNodeGetVersionResponse);
|
||||
// Check for new updates
|
||||
rpc CheckForUpdates(Empty) returns (SoftwareUpdate);
|
||||
// Get coins in circulation
|
||||
@@ -95,11 +95,17 @@ service BaseNode {
|
||||
rpc GetMempoolStats(Empty) returns (MempoolStatsResponse);
|
||||
// Get VNs
|
||||
rpc GetActiveValidatorNodes(GetActiveValidatorNodesRequest) returns (stream GetActiveValidatorNodesResponse);
|
||||
rpc GetValidatorNodeChanges(GetValidatorNodeChangesRequest) returns (GetValidatorNodeChangesResponse);
|
||||
rpc GetShardKey(GetShardKeyRequest) returns (GetShardKeyResponse);
|
||||
// Get templates
|
||||
rpc GetTemplateRegistrations(GetTemplateRegistrationsRequest) returns (stream GetTemplateRegistrationResponse);
|
||||
rpc GetSideChainUtxos(GetSideChainUtxosRequest) returns (stream GetSideChainUtxosResponse);
|
||||
rpc GetNetworkState(GetNetworkStateRequest) returns (GetNetworkStateResponse);
|
||||
// PayRef (Payment Reference) lookup for block explorers and external services
|
||||
rpc SearchPaymentReferences(SearchPaymentReferencesRequest) returns (stream PaymentReferenceResponse);
|
||||
// PayRef (Payment Reference) lookup for block explorers and external services via output hash
|
||||
rpc SearchPaymentReferencesViaOutputHash(FetchMatchingUtxosRequest) returns (stream PaymentReferenceResponse);
|
||||
|
||||
}
|
||||
|
||||
message GetAssetMetadataRequest {
|
||||
@@ -174,6 +180,42 @@ enum BaseNodeState{
|
||||
SYNC_FAILED = 6;
|
||||
}
|
||||
|
||||
message ReadinessStatus {
|
||||
enum State {
|
||||
NOT_READY = 0;
|
||||
STARTING_UP = 1;
|
||||
|
||||
// Database phase (10-19)
|
||||
DATABASE_INITIALIZING = 10;
|
||||
|
||||
// Recovery phase (20-29)
|
||||
RECOVERING_PREPARING = 20;
|
||||
RECOVERING_REBUILDING = 21;
|
||||
RECOVERING_REBUILDING_DATABASE = 22;
|
||||
|
||||
// Context building phase (30-39)
|
||||
BUILDING_CONTEXT_BLOCKCHAIN = 32;
|
||||
BUILDING_CONTEXT_BOOTSTRAP = 34;
|
||||
|
||||
READY = 100;
|
||||
}
|
||||
|
||||
oneof status {
|
||||
State state = 1;
|
||||
MigrationProgress migration = 2;
|
||||
}
|
||||
uint64 timestamp = 6;
|
||||
|
||||
}
|
||||
|
||||
message MigrationProgress {
|
||||
uint64 current_block = 1;
|
||||
uint64 total_blocks = 2;
|
||||
double progress_percentage = 3;
|
||||
uint64 current_db_version = 4;
|
||||
uint64 target_db_version = 5;
|
||||
}
|
||||
|
||||
/// return type of GetNewBlockTemplate
|
||||
message NewBlockTemplateResponse {
|
||||
NewBlockTemplate new_block_template = 1;
|
||||
@@ -218,15 +260,33 @@ 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;
|
||||
UDecimalValue cuckaroo_estimated_hash_rate = 11;
|
||||
uint64 num_coinbases = 8;
|
||||
repeated bytes coinbase_extras = 9;
|
||||
repeated bytes coinbase_extras = 9;
|
||||
}
|
||||
|
||||
// A generic single value response for a specific height
|
||||
message ValueAtHeightResponse {
|
||||
uint64 value= 1;
|
||||
uint64 height = 2;
|
||||
// This is the total circulating token supply up to date ('mined_rewards + spendable_pre_mine').
|
||||
uint64 circulating_supply = 1;
|
||||
// uint64 spendable_supply = 2; // No longer used
|
||||
// This is the block height the values are valid for.
|
||||
uint64 height = 3;
|
||||
// This is the total mined rewards up to date, including time locked coinbase rewards that is not spendable.
|
||||
uint64 mined_rewards = 4;
|
||||
// This is the total spendable minded rewards up to date, which excludes all coinbase rewards that is
|
||||
// still time locked.
|
||||
uint64 spendable_rewards = 5;
|
||||
// This is the total spendable pre-mine tokens released up to date, i.e. not time-locked anymore.
|
||||
uint64 spendable_pre_mine = 6;
|
||||
// This is the total spendable token supply up to date ('spendable_rewards + spendable_pre_mine').
|
||||
uint64 total_spendable = 7;
|
||||
// This is the total pre-mine tokens in the genesis block, time-locked and not time-locked.
|
||||
uint64 total_pre_mine = 8;
|
||||
// This is the total pre-mine tokens that are still time-locked up to date (`total_pre_mine - spendable_pre_mine`).
|
||||
uint64 time_locked_pre_mine = 9;
|
||||
}
|
||||
|
||||
// A generic uint value
|
||||
@@ -234,9 +294,9 @@ message IntegerValue {
|
||||
uint64 value = 1;
|
||||
}
|
||||
|
||||
// A generic String value
|
||||
message StringValue {
|
||||
string value = 1;
|
||||
message BaseNodeGetVersionResponse {
|
||||
string version = 1;
|
||||
uint32 network = 2;
|
||||
}
|
||||
|
||||
/// GetBlockSize / GetBlockFees Request
|
||||
@@ -382,6 +442,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.
|
||||
@@ -478,48 +539,76 @@ message MempoolStatsResponse {
|
||||
}
|
||||
|
||||
message GetActiveValidatorNodesRequest {
|
||||
uint64 height = 1;
|
||||
uint64 height = 1;
|
||||
bytes sidechain_id = 2;
|
||||
}
|
||||
|
||||
message GetActiveValidatorNodesResponse {
|
||||
bytes shard_key = 1;
|
||||
bytes public_key = 2;
|
||||
bytes shard_key = 1;
|
||||
bytes public_key = 2;
|
||||
bytes sidechain_id = 3;
|
||||
}
|
||||
|
||||
message GetValidatorNodeChangesRequest {
|
||||
uint64 epoch = 1;
|
||||
bytes sidechain_id = 2;
|
||||
}
|
||||
|
||||
message ValidatorNodeChange {
|
||||
oneof change {
|
||||
ValidatorNodeChangeAdd add = 1;
|
||||
ValidatorNodeChangeRemove remove = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message ValidatorNodeChangeAdd {
|
||||
uint64 activation_epoch = 1;
|
||||
ValidatorNodeRegistration registration = 2;
|
||||
uint64 minimum_value_promise = 3;
|
||||
bytes shard_key = 4;
|
||||
}
|
||||
|
||||
message ValidatorNodeChangeRemove {
|
||||
bytes public_key = 1;
|
||||
}
|
||||
|
||||
message GetValidatorNodeChangesResponse {
|
||||
repeated ValidatorNodeChange changes = 1;
|
||||
}
|
||||
|
||||
message GetShardKeyRequest {
|
||||
uint64 height = 1;
|
||||
bytes public_key = 2;
|
||||
uint64 epoch = 1;
|
||||
bytes public_key = 2;
|
||||
}
|
||||
|
||||
message GetShardKeyResponse {
|
||||
bytes shard_key = 1;
|
||||
bool found = 2;
|
||||
bytes shard_key = 1;
|
||||
}
|
||||
|
||||
message GetTemplateRegistrationsRequest {
|
||||
bytes start_hash = 1;
|
||||
uint64 count = 2;
|
||||
bytes start_hash = 1;
|
||||
uint64 count = 2;
|
||||
}
|
||||
|
||||
message GetTemplateRegistrationResponse {
|
||||
bytes utxo_hash = 1;
|
||||
TemplateRegistration registration = 2;
|
||||
bytes utxo_hash = 1;
|
||||
TemplateRegistration registration = 2;
|
||||
}
|
||||
|
||||
message BlockInfo {
|
||||
uint64 height = 1;
|
||||
bytes hash = 2;
|
||||
bytes next_block_hash = 3;
|
||||
uint64 height = 1;
|
||||
bytes hash = 2;
|
||||
bytes next_block_hash = 3;
|
||||
}
|
||||
|
||||
message GetSideChainUtxosRequest {
|
||||
bytes start_hash = 1;
|
||||
uint64 count = 2;
|
||||
bytes start_hash = 1;
|
||||
uint64 count = 2;
|
||||
}
|
||||
|
||||
message GetSideChainUtxosResponse {
|
||||
BlockInfo block_info = 1;
|
||||
repeated TransactionOutput outputs = 2;
|
||||
BlockInfo block_info = 1;
|
||||
repeated TransactionOutput outputs = 2;
|
||||
}
|
||||
|
||||
message GetNetworkStateRequest {
|
||||
@@ -538,7 +627,62 @@ message GetNetworkStateResponse {
|
||||
uint64 reward = 5;
|
||||
// estimate sha3x hash rate
|
||||
uint64 sha3x_estimated_hash_rate = 6;
|
||||
// estimate randomx hash rate
|
||||
uint64 randomx_estimated_hash_rate = 7;
|
||||
// estimate monero randomx hash rate
|
||||
uint64 monero_randomx_estimated_hash_rate = 7;
|
||||
// estimate tari randomx hash rate
|
||||
uint64 tari_randomx_estimated_hash_rate = 10;
|
||||
// estimate cuckaroo hash rate
|
||||
UDecimalValue cuckaroo_estimated_hash_rate = 12;
|
||||
// number of connections
|
||||
uint64 num_connections = 8;
|
||||
//liveness results
|
||||
repeated LivenessResult liveness_results = 9;
|
||||
// readiness status
|
||||
ReadinessStatus readiness_status = 11;
|
||||
}
|
||||
|
||||
message LivenessResult{
|
||||
// node id
|
||||
bytes peer_node_id = 1;
|
||||
// time to discover
|
||||
uint64 discover_latency = 2;
|
||||
// Dial latency
|
||||
uint64 ping_latency = 3;
|
||||
}
|
||||
|
||||
// PayRef (Payment Reference) search and lookup messages
|
||||
|
||||
// Request to search for outputs by payment reference
|
||||
message SearchPaymentReferencesRequest {
|
||||
// Payment reference as hex string (64 characters)
|
||||
repeated string payment_reference_hex = 1;
|
||||
repeated bytes payment_reference_bytes = 2;
|
||||
// Optional: include spent outputs in results
|
||||
bool include_spent = 3;
|
||||
}
|
||||
|
||||
// Response containing payment reference match
|
||||
message PaymentReferenceResponse {
|
||||
// The payment reference that was found
|
||||
string payment_reference_hex = 1;
|
||||
// Block height where the output was mined
|
||||
uint64 block_height = 2;
|
||||
// Block hash where the output was mined
|
||||
bytes block_hash = 3;
|
||||
// Timestamp when the output was mined
|
||||
uint64 mined_timestamp = 4;
|
||||
// Output commitment (32 bytes)
|
||||
bytes commitment = 5;
|
||||
// Whether this output has been spent
|
||||
bool is_spent = 6;
|
||||
// Height where output was spent - will be 0 for unspent outputs as it is not applicable
|
||||
uint64 spent_height = 7;
|
||||
// Block hash where output was spent - will be empty for unspent outputs
|
||||
bytes spent_block_hash = 8;
|
||||
// Minimum value promise
|
||||
uint64 min_value_promise = 9;
|
||||
// Timestamp when the output was spent - will be 0 for unspent outputs as it is not applicable
|
||||
uint64 spent_timestamp = 10;
|
||||
// Output hash of the output
|
||||
bytes output_hash = 11;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
|
||||
} // namespace tari
|
||||
} // namespace rpc
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <grpcpp/support/status.h>
|
||||
#include <grpcpp/support/stub_options.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
@@ -54,4 +55,5 @@ namespace rpc {
|
||||
} // namespace tari
|
||||
|
||||
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
#endif // GRPC_block_2eproto__INCLUDED
|
||||
|
||||
+1813
-1264
File diff suppressed because it is too large
Load Diff
+1505
-1097
File diff suppressed because it is too large
Load Diff
+6
-2
@@ -68,8 +68,10 @@ message BlockHeader {
|
||||
// The proof of work data structure that is included in the block header.
|
||||
message ProofOfWork {
|
||||
// The algorithm used to mine this block
|
||||
// 0 = Monero
|
||||
// 0 = Monero RandomX
|
||||
// 1 = Sha3X
|
||||
// 2 = Tari RandomX
|
||||
// 3 = Cuckaroo
|
||||
uint64 pow_algo = 1;
|
||||
// Supplemental proof of work data. For example for Sha3x, this would be empty (only the block header is
|
||||
// required), but for Monero merge mining we need the Monero block header and RandomX seed hash.
|
||||
@@ -80,8 +82,10 @@ 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`
|
||||
POW_ALGOS_CUCKAROO = 3; // Accessible as `grpc::pow_algo::PowAlgos::Cuckaroo`
|
||||
}
|
||||
// The pow algo to use
|
||||
PowAlgos pow_algo = 1;
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
|
||||
} // namespace tari
|
||||
} // namespace rpc
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <grpcpp/support/status.h>
|
||||
#include <grpcpp/support/stub_options.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
@@ -54,4 +55,5 @@ namespace rpc {
|
||||
} // namespace tari
|
||||
|
||||
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
#endif // GRPC_network_2eproto__INCLUDED
|
||||
|
||||
+1964
-1162
File diff suppressed because it is too large
Load Diff
+1564
-1202
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -66,7 +66,7 @@ message NetworkStatusResponse {
|
||||
uint32 num_node_connections = 3;
|
||||
}
|
||||
|
||||
message Address{
|
||||
message Address {
|
||||
bytes address =1;
|
||||
string last_seen = 2;
|
||||
uint32 connection_attempts = 3;
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
|
||||
} // namespace tari
|
||||
} // namespace rpc
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <grpcpp/support/status.h>
|
||||
#include <grpcpp/support/stub_options.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
@@ -54,4 +55,5 @@ namespace rpc {
|
||||
} // namespace tari
|
||||
|
||||
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
#endif // GRPC_sidechain_5ftypes_2eproto__INCLUDED
|
||||
|
||||
+7067
-1003
File diff suppressed because it is too large
Load Diff
+7693
-1196
File diff suppressed because it is too large
Load Diff
+119
-24
@@ -26,43 +26,59 @@ package tari.rpc;
|
||||
import "types.proto";
|
||||
|
||||
message SideChainFeature {
|
||||
oneof side_chain_feature {
|
||||
ValidatorNodeRegistration validator_node_registration = 1;
|
||||
TemplateRegistration template_registration = 2;
|
||||
ConfidentialOutputData confidential_output = 3;
|
||||
}
|
||||
oneof feature {
|
||||
ValidatorNodeRegistration validator_node_registration = 1;
|
||||
TemplateRegistration template_registration = 2;
|
||||
ConfidentialOutputData confidential_output = 3;
|
||||
EvictionProof eviction_proof = 4;
|
||||
ValidatorNodeExit validator_node_exit = 5;
|
||||
}
|
||||
SideChainId sidechain_id = 6;
|
||||
}
|
||||
|
||||
message SideChainId {
|
||||
bytes public_key = 1;
|
||||
Signature knowledge_proof = 2;
|
||||
}
|
||||
|
||||
message ValidatorNodeRegistration {
|
||||
bytes public_key = 1;
|
||||
Signature signature = 2;
|
||||
bytes public_key = 1;
|
||||
Signature signature = 2;
|
||||
bytes claim_public_key = 3;
|
||||
uint64 max_epoch = 4;
|
||||
}
|
||||
|
||||
message ValidatorNodeExit {
|
||||
bytes public_key = 1;
|
||||
Signature signature = 2;
|
||||
uint64 max_epoch = 3;
|
||||
}
|
||||
|
||||
message TemplateRegistration {
|
||||
bytes author_public_key = 1;
|
||||
Signature author_signature = 2;
|
||||
string template_name = 3;
|
||||
uint32 template_version = 4;
|
||||
TemplateType template_type = 5;
|
||||
BuildInfo build_info = 6;
|
||||
bytes binary_sha = 7;
|
||||
string binary_url = 8;
|
||||
bytes author_public_key = 1;
|
||||
Signature author_signature = 2;
|
||||
string template_name = 3;
|
||||
uint32 template_version = 4;
|
||||
TemplateType template_type = 5;
|
||||
BuildInfo build_info = 6;
|
||||
bytes binary_sha = 7;
|
||||
string binary_url = 8;
|
||||
}
|
||||
|
||||
message ConfidentialOutputData {
|
||||
bytes claim_public_key = 1;
|
||||
bytes claim_public_key = 1;
|
||||
}
|
||||
|
||||
message TemplateType {
|
||||
oneof template_type {
|
||||
WasmInfo wasm = 1;
|
||||
FlowInfo flow = 2;
|
||||
ManifestInfo manifest = 3;
|
||||
}
|
||||
oneof template_type {
|
||||
WasmInfo wasm = 1;
|
||||
FlowInfo flow = 2;
|
||||
ManifestInfo manifest = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message WasmInfo {
|
||||
uint32 abi_version = 1;
|
||||
uint32 abi_version = 1;
|
||||
}
|
||||
|
||||
message FlowInfo {
|
||||
@@ -72,6 +88,85 @@ message ManifestInfo {
|
||||
}
|
||||
|
||||
message BuildInfo {
|
||||
string repo_url = 1;
|
||||
bytes commit_hash = 2;
|
||||
string repo_url = 1;
|
||||
bytes commit_hash = 2;
|
||||
}
|
||||
|
||||
|
||||
message EvictionProof {
|
||||
CommitProof proof = 1;
|
||||
}
|
||||
|
||||
message CommitProof {
|
||||
oneof version {
|
||||
CommitProofV1 v1 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message CommitProofV1 {
|
||||
bytes command = 1;
|
||||
SidechainBlockCommitProof commit_proof = 2;
|
||||
bytes encoded_inclusion_proof = 3;
|
||||
}
|
||||
|
||||
message SidechainBlockCommitProof {
|
||||
SidechainBlockHeader header = 1;
|
||||
repeated CommitProofElement proof_elements = 2;
|
||||
}
|
||||
|
||||
message CommitProofElement {
|
||||
oneof proof_element {
|
||||
QuorumCertificate quorum_certificate = 1;
|
||||
DummyChain dummy_chain = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message DummyChain {
|
||||
repeated ChainLink chain_links = 1;
|
||||
}
|
||||
|
||||
message ChainLink {
|
||||
bytes header_hash = 1;
|
||||
bytes parent_id = 2;
|
||||
}
|
||||
|
||||
message SidechainBlockHeader {
|
||||
uint32 network = 1;
|
||||
bytes parent_id = 2;
|
||||
bytes justify_id = 3;
|
||||
uint64 height = 4;
|
||||
uint64 epoch = 5;
|
||||
ShardGroup shard_group = 6;
|
||||
bytes proposed_by = 7;
|
||||
bytes state_merkle_root = 8;
|
||||
bytes command_merkle_root = 9;
|
||||
Signature signature = 11;
|
||||
bytes metadata_hash = 10;
|
||||
}
|
||||
|
||||
message ShardGroup {
|
||||
uint32 start = 1;
|
||||
uint32 end_inclusive = 2;
|
||||
}
|
||||
|
||||
message EvictAtom {
|
||||
bytes public_key = 1;
|
||||
}
|
||||
|
||||
message QuorumCertificate {
|
||||
bytes header_hash = 1;
|
||||
bytes parent_id = 2;
|
||||
repeated ValidatorSignature signatures = 3;
|
||||
QuorumDecision decision = 4;
|
||||
}
|
||||
|
||||
enum QuorumDecision {
|
||||
Accept = 0;
|
||||
Reject = 1;
|
||||
}
|
||||
|
||||
message ValidatorSignature {
|
||||
bytes public_key = 1;
|
||||
Signature signature = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
|
||||
} // namespace tari
|
||||
} // namespace rpc
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <grpcpp/support/status.h>
|
||||
#include <grpcpp/support/stub_options.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
@@ -54,4 +55,5 @@ namespace rpc {
|
||||
} // namespace tari
|
||||
|
||||
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
#endif // GRPC_transaction_2eproto__INCLUDED
|
||||
|
||||
+2481
-1690
File diff suppressed because it is too large
Load Diff
+2526
-1824
File diff suppressed because it is too large
Load Diff
@@ -115,6 +115,10 @@ message TransactionOutput {
|
||||
bytes encrypted_data = 10;
|
||||
// The minimum value of the commitment that is proven by the range proof (in MicroMinotari)
|
||||
uint64 minimum_value_promise = 11;
|
||||
// Payment reference (PayRef) - 32-byte Blake2b hash of (block_hash || output_hash)
|
||||
// This provides a unique, deterministic reference for the output that can be used
|
||||
// for payment verification without revealing wallet ownership
|
||||
bytes payment_reference = 12;
|
||||
}
|
||||
|
||||
// Options for UTXOs
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
|
||||
} // namespace tari
|
||||
} // namespace rpc
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <grpcpp/support/status.h>
|
||||
#include <grpcpp/support/stub_options.h>
|
||||
#include <grpcpp/support/sync_stream.h>
|
||||
#include <grpcpp/ports_def.inc>
|
||||
|
||||
namespace tari {
|
||||
namespace rpc {
|
||||
@@ -54,4 +55,5 @@ namespace rpc {
|
||||
} // namespace tari
|
||||
|
||||
|
||||
#include <grpcpp/ports_undef.inc>
|
||||
#endif // GRPC_types_2eproto__INCLUDED
|
||||
|
||||
+3534
-2067
File diff suppressed because it is too large
Load Diff
+2337
-1471
File diff suppressed because it is too large
Load Diff
+12
-1
@@ -126,7 +126,6 @@ message ConsensusConstants {
|
||||
uint64 block_weight_kernels = 16;
|
||||
uint64 pre_mine_value = 17;
|
||||
uint64 max_script_byte_size = 18;
|
||||
uint64 validator_node_validity_period = 19;
|
||||
uint64 effective_from_height = 20;
|
||||
Range valid_blockchain_version_range = 21;
|
||||
uint64 max_randomx_seed_height = 22;
|
||||
@@ -144,4 +143,16 @@ message ConsensusConstants {
|
||||
uint64 inflation_bips = 35;
|
||||
uint64 tail_epoch_length = 36;
|
||||
uint64 max_block_coinbase_count = 37;
|
||||
uint32 vn_registration_max_vns_initial_epoch = 38;
|
||||
uint32 vn_registration_max_vns_per_epoch = 39;
|
||||
}
|
||||
|
||||
// Unsigned decimal value, examples:
|
||||
// 12345.6789 -> { units = 12345, nanos = 678900000 }
|
||||
// 12345.0006789 -> { units = 12345, nanos = 678900 }
|
||||
message UDecimalValue {
|
||||
// Whole units part of the amount
|
||||
uint64 units = 1;
|
||||
// Nano units of the amount (10^-9)
|
||||
fixed32 nanos = 2;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,6 @@
|
||||
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) __asan_unpoison_memory_region((addr), (size))
|
||||
#endif
|
||||
|
||||
#define __asan_address_is_poisoned(addr) false
|
||||
|
||||
#endif // P2POOL_EXTERNAL_SRC_COMMON_SANITIZER_ASAN_INTERFACE_H
|
||||
|
||||
Vendored
+1
-1
Submodule external/src/cppzmq updated: a371495a91...57cc98f8fc
+13
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
// Copyright (c) 2014-2024, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -42,6 +42,13 @@ const fe fe_d = {-10913610, 13857413, -15372611, 6949391, 114729, -8787816, -627
|
||||
const fe fe_sqrtm1 = {-32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482}; /* sqrt(-1) */
|
||||
const fe fe_d2 = {-21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199}; /* 2 * d */
|
||||
|
||||
/* a = -1 */
|
||||
// TODO: double check these consts
|
||||
const fe fe_a_sub_d = {10913609, -13857413, 15372611, -6949391, -114729, 8787816, 6275908, 3247719, 18696448, 12055116}; /* a - d */
|
||||
const fe fe_a0 = {-21827241, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199}; /* A0 = 2 * (a + d) */
|
||||
const fe fe_ap = {-23454401, 11679213, -5618422, 5756869, -458917, 1596832, 25103633, 12990876, 7676928, 14666033}; /* Ap = -2 * A0 */
|
||||
const fe fe_msqrt2b = {-1359796, -3165658, 8463188, -8916281, -9242332, 8801166, -2887120, 14417306, 28934311, 6371549};
|
||||
|
||||
/* base[i][j] = (j+1)*256^i*B */
|
||||
const ge_precomp ge_base[32][8] = {
|
||||
{
|
||||
@@ -874,6 +881,11 @@ const fe fe_fffb1 = {-31702527, -2466483, -26106795, -12203692, -12169197, -3210
|
||||
const fe fe_fffb2 = {8166131, -6741800, -17040804, 3154616, 21461005, 1466302, -30876704, -6368709, 10503587, -13363080}; /* sqrt(2 * A * (A + 2)) */
|
||||
const fe fe_fffb3 = {-13620103, 14639558, 4532995, 7679154, 16815101, -15883539, -22863840, -14813421, 13716513, -6477756}; /* sqrt(-sqrt(-1) * A * (A + 2)) */
|
||||
const fe fe_fffb4 = {-21786234, -12173074, 21573800, 4524538, -4645904, 16204591, 8012863, -8444712, 3212926, 6885324}; /* sqrt(sqrt(-1) * A * (A + 2)) */
|
||||
const fe fe_a_inv_3 = {-22207407, 11184811, 22369621, -11184811, -22369621, 11184811, 22369621, -11184811, -22369621, 11184811}; /* A / 3*/
|
||||
const fe fe_c = {-12222970, -8312128, -11511410, 9067497, -15300785, -241793, 25456130, 14121551, -12187136, 3972024}; /* sqrt(-(A + 2))*/
|
||||
const fe fe_one = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
const fe fe_m1 = {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
const fe fe_inv2 = {10, 0, 0, 0, 0, 0, 0, 0, 0, -16777216}; /* 1 / 2 */
|
||||
const ge_p3 ge_p3_identity = { {0}, {1, 0}, {1, 0}, {0} };
|
||||
const ge_p3 ge_p3_H = {
|
||||
{7329926, -15101362, 31411471, 7614783, 27996851, -3197071, -11157635, -6878293, 466949, -7986503},
|
||||
|
||||
Vendored
+360
-54
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
// Copyright (c) 2014-2024, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -34,13 +34,13 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "crypto-ops.h"
|
||||
|
||||
/* Predeclarations */
|
||||
|
||||
static void fe_mul(fe, const fe, const fe);
|
||||
static void fe_sq(fe, const fe);
|
||||
static void ge_madd(ge_p1p1 *, const ge_p3 *, const ge_precomp *);
|
||||
static void ge_msub(ge_p1p1 *, const ge_p3 *, const ge_precomp *);
|
||||
static void ge_p2_0(ge_p2 *);
|
||||
@@ -73,7 +73,7 @@ uint64_t load_4(const unsigned char *in)
|
||||
h = 0
|
||||
*/
|
||||
|
||||
static void fe_0(fe h) {
|
||||
void fe_0(fe h) {
|
||||
h[0] = 0;
|
||||
h[1] = 0;
|
||||
h[2] = 0;
|
||||
@@ -92,7 +92,7 @@ static void fe_0(fe h) {
|
||||
h = 1
|
||||
*/
|
||||
|
||||
static void fe_1(fe h) {
|
||||
void fe_1(fe h) {
|
||||
h[0] = 1;
|
||||
h[1] = 0;
|
||||
h[2] = 0;
|
||||
@@ -232,7 +232,7 @@ static void fe_cmov(fe f, const fe g, unsigned int b) {
|
||||
h = f
|
||||
*/
|
||||
|
||||
static void fe_copy(fe h, const fe f) {
|
||||
void fe_copy(fe h, const fe f) {
|
||||
int32_t f0 = f[0];
|
||||
int32_t f1 = f[1];
|
||||
int32_t f2 = f[2];
|
||||
@@ -315,6 +315,39 @@ void fe_invert(fe out, const fe z) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Montgomery's trick
|
||||
// https://iacr.org/archive/pkc2004/29470042/29470042.pdf 2.2
|
||||
int fe_batch_invert(fe *out, const fe *in, const int n) {
|
||||
if (n == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Step 1: collect initial muls
|
||||
fe *init_muls = (fe *) malloc(n * sizeof(fe));
|
||||
if (!init_muls) {
|
||||
return 1;
|
||||
}
|
||||
memcpy(&init_muls[0], &in[0], sizeof(fe));
|
||||
for (int i = 1; i < n; ++i) {
|
||||
fe_mul(init_muls[i], init_muls[i-1], in[i]);
|
||||
}
|
||||
|
||||
// Step 2: get the inverse of all elems multiplied together
|
||||
fe a;
|
||||
fe_invert(a, init_muls[n-1]);
|
||||
|
||||
// Step 3: get each inverse
|
||||
for (int i = n; i > 1; --i) {
|
||||
fe_mul(out[i-1], a, init_muls[i-2]);
|
||||
fe_mul(a, a, in[i-1]);
|
||||
}
|
||||
memcpy(&out[0], &a, sizeof(fe));
|
||||
|
||||
free(init_muls);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* From fe_isnegative.c */
|
||||
|
||||
/*
|
||||
@@ -325,7 +358,7 @@ Preconditions:
|
||||
|f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
|
||||
*/
|
||||
|
||||
static int fe_isnegative(const fe f) {
|
||||
int fe_isnegative(const fe f) {
|
||||
unsigned char s[32];
|
||||
fe_tobytes(s, f);
|
||||
return s[0] & 1;
|
||||
@@ -376,7 +409,7 @@ Can get away with 11 carries, but then data flow is much deeper.
|
||||
With tighter constraints on inputs can squeeze carries into int32.
|
||||
*/
|
||||
|
||||
static void fe_mul(fe h, const fe f, const fe g) {
|
||||
void fe_mul(fe h, const fe f, const fe g) {
|
||||
int32_t f0 = f[0];
|
||||
int32_t f1 = f[1];
|
||||
int32_t f2 = f[2];
|
||||
@@ -606,7 +639,7 @@ Postconditions:
|
||||
|h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
|
||||
*/
|
||||
|
||||
static void fe_neg(fe h, const fe f) {
|
||||
void fe_neg(fe h, const fe f) {
|
||||
int32_t f0 = f[0];
|
||||
int32_t f1 = f[1];
|
||||
int32_t f2 = f[2];
|
||||
@@ -656,7 +689,7 @@ Postconditions:
|
||||
See fe_mul.c for discussion of implementation strategy.
|
||||
*/
|
||||
|
||||
static void fe_sq(fe h, const fe f) {
|
||||
void fe_sq(fe h, const fe f) {
|
||||
int32_t f0 = f[0];
|
||||
int32_t f1 = f[1];
|
||||
int32_t f2 = f[2];
|
||||
@@ -960,7 +993,7 @@ Postconditions:
|
||||
|h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
|
||||
*/
|
||||
|
||||
static void fe_sub(fe h, const fe f, const fe g) {
|
||||
void fe_sub(fe h, const fe f, const fe g) {
|
||||
int32_t f0 = f[0];
|
||||
int32_t f1 = f[1];
|
||||
int32_t f2 = f[2];
|
||||
@@ -1330,16 +1363,9 @@ void ge_double_scalarmult_base_vartime_p3(ge_p3 *r3, const unsigned char *a, con
|
||||
}
|
||||
}
|
||||
|
||||
/* From ge_frombytes.c, modified */
|
||||
|
||||
int ge_frombytes_vartime(ge_p3 *h, const unsigned char *s) {
|
||||
fe u;
|
||||
fe v;
|
||||
fe vxx;
|
||||
fe check;
|
||||
|
||||
/* From fe_frombytes.c */
|
||||
/* From fe_frombytes.c */
|
||||
|
||||
int fe_frombytes_vartime(fe y, const unsigned char *s) {
|
||||
int64_t h0 = load_4(s);
|
||||
int64_t h1 = load_3(s + 4) << 6;
|
||||
int64_t h2 = load_3(s + 7) << 5;
|
||||
@@ -1380,18 +1406,31 @@ int ge_frombytes_vartime(ge_p3 *h, const unsigned char *s) {
|
||||
carry6 = (h6 + (int64_t) (1<<25)) >> 26; h7 += carry6; h6 -= carry6 << 26;
|
||||
carry8 = (h8 + (int64_t) (1<<25)) >> 26; h9 += carry8; h8 -= carry8 << 26;
|
||||
|
||||
h->Y[0] = h0;
|
||||
h->Y[1] = h1;
|
||||
h->Y[2] = h2;
|
||||
h->Y[3] = h3;
|
||||
h->Y[4] = h4;
|
||||
h->Y[5] = h5;
|
||||
h->Y[6] = h6;
|
||||
h->Y[7] = h7;
|
||||
h->Y[8] = h8;
|
||||
h->Y[9] = h9;
|
||||
y[0] = h0;
|
||||
y[1] = h1;
|
||||
y[2] = h2;
|
||||
y[3] = h3;
|
||||
y[4] = h4;
|
||||
y[5] = h5;
|
||||
y[6] = h6;
|
||||
y[7] = h7;
|
||||
y[8] = h8;
|
||||
y[9] = h9;
|
||||
|
||||
/* End fe_frombytes.c */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* From ge_frombytes.c, modified */
|
||||
|
||||
int ge_frombytes_vartime(ge_p3 *h, const unsigned char *s) {
|
||||
fe u;
|
||||
fe v;
|
||||
fe vxx;
|
||||
fe check;
|
||||
|
||||
if (fe_frombytes_vartime(h->Y, s) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
fe_1(h->Z);
|
||||
fe_sq(u, h->Y);
|
||||
@@ -1608,7 +1647,7 @@ static void ge_precomp_cmov(ge_precomp *t, const ge_precomp *u, unsigned char b)
|
||||
fe_cmov(t->xy2d, u->xy2d, b);
|
||||
}
|
||||
|
||||
static void select(ge_precomp *t, int pos, signed char b) {
|
||||
static void _select(ge_precomp *t, int pos, signed char b) {
|
||||
ge_precomp minust;
|
||||
unsigned char bnegative = negative(b);
|
||||
unsigned char babs = b - (((-bnegative) & b) << 1);
|
||||
@@ -1628,6 +1667,32 @@ static void select(ge_precomp *t, int pos, signed char b) {
|
||||
ge_precomp_cmov(t, &minust, bnegative);
|
||||
}
|
||||
|
||||
// With these select_vartime/ge_scalarmult_base_vartime I got ~25% speed up comparing to the select/ge_scalarmult_base -- sowle
|
||||
static void select_vartime(ge_precomp *t, int pos, signed char b) {
|
||||
unsigned char bnegative = negative(b);
|
||||
unsigned char babs = b - (((-bnegative) & b) << 1);
|
||||
const ge_precomp* base;
|
||||
|
||||
if (babs == 0)
|
||||
{
|
||||
ge_precomp_0(t);
|
||||
}
|
||||
else if (bnegative == 0)
|
||||
{
|
||||
base = &ge_base[pos][babs - 1];
|
||||
fe_copy(t->yplusx, base->yplusx);
|
||||
fe_copy(t->yminusx, base->yminusx);
|
||||
fe_copy(t->xy2d, base->xy2d);
|
||||
}
|
||||
else
|
||||
{
|
||||
base = &ge_base[pos][babs - 1];
|
||||
fe_copy(t->yplusx, base->yminusx);
|
||||
fe_copy(t->yminusx, base->yplusx);
|
||||
fe_neg(t->xy2d, base->xy2d);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
h = a * B
|
||||
where a = a[0]+256*a[1]+...+256^31 a[31]
|
||||
@@ -1664,7 +1729,7 @@ void ge_scalarmult_base(ge_p3 *h, const unsigned char *a) {
|
||||
|
||||
ge_p3_0(h);
|
||||
for (i = 1; i < 64; i += 2) {
|
||||
select(&t, i / 2, e[i]);
|
||||
_select(&t, i / 2, e[i]);
|
||||
ge_madd(&r, h, &t); ge_p1p1_to_p3(h, &r);
|
||||
}
|
||||
|
||||
@@ -1674,7 +1739,49 @@ void ge_scalarmult_base(ge_p3 *h, const unsigned char *a) {
|
||||
ge_p2_dbl(&r, &s); ge_p1p1_to_p3(h, &r);
|
||||
|
||||
for (i = 0; i < 64; i += 2) {
|
||||
select(&t, i / 2, e[i]);
|
||||
_select(&t, i / 2, e[i]);
|
||||
ge_madd(&r, h, &t); ge_p1p1_to_p3(h, &r);
|
||||
}
|
||||
}
|
||||
|
||||
void ge_scalarmult_base_vartime(ge_p3 *h, const unsigned char *a) {
|
||||
signed char e[64];
|
||||
signed char carry;
|
||||
ge_p1p1 r;
|
||||
ge_p2 s;
|
||||
ge_precomp t;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 32; ++i) {
|
||||
e[2 * i + 0] = (a[i] >> 0) & 15;
|
||||
e[2 * i + 1] = (a[i] >> 4) & 15;
|
||||
}
|
||||
/* each e[i] is between 0 and 15 */
|
||||
/* e[63] is between 0 and 7 */
|
||||
|
||||
carry = 0;
|
||||
for (i = 0; i < 63; ++i) {
|
||||
e[i] += carry;
|
||||
carry = e[i] + 8;
|
||||
carry >>= 4;
|
||||
e[i] -= carry << 4;
|
||||
}
|
||||
e[63] += carry;
|
||||
/* each e[i] is between -8 and 8 */
|
||||
|
||||
ge_p3_0(h);
|
||||
for (i = 1; i < 64; i += 2) {
|
||||
select_vartime(&t, i / 2, e[i]);
|
||||
ge_madd(&r, h, &t); ge_p1p1_to_p3(h, &r);
|
||||
}
|
||||
|
||||
ge_p3_dbl(&r, h); ge_p1p1_to_p2(&s, &r);
|
||||
ge_p2_dbl(&r, &s); ge_p1p1_to_p2(&s, &r);
|
||||
ge_p2_dbl(&r, &s); ge_p1p1_to_p2(&s, &r);
|
||||
ge_p2_dbl(&r, &s); ge_p1p1_to_p3(h, &r);
|
||||
|
||||
for (i = 0; i < 64; i += 2) {
|
||||
select_vartime(&t, i / 2, e[i]);
|
||||
ge_madd(&r, h, &t); ge_p1p1_to_p3(h, &r);
|
||||
}
|
||||
}
|
||||
@@ -1955,26 +2062,18 @@ void sc_reduce(unsigned char *s) {
|
||||
s[31] = s11 >> 17;
|
||||
}
|
||||
|
||||
/* New code */
|
||||
/* From fe_pow22523.c */
|
||||
|
||||
static void fe_divpowm1(fe r, const fe u, const fe v) {
|
||||
fe v3, uv7, t0, t1, t2;
|
||||
void fe_pow22523(fe out, const fe z) {
|
||||
fe t0;
|
||||
fe t1;
|
||||
fe t2;
|
||||
int i;
|
||||
|
||||
fe_sq(v3, v);
|
||||
fe_mul(v3, v3, v); /* v3 = v^3 */
|
||||
fe_sq(uv7, v3);
|
||||
fe_mul(uv7, uv7, v);
|
||||
fe_mul(uv7, uv7, u); /* uv7 = uv^7 */
|
||||
|
||||
/*fe_pow22523(uv7, uv7);*/
|
||||
|
||||
/* From fe_pow22523.c */
|
||||
|
||||
fe_sq(t0, uv7);
|
||||
fe_sq(t0, z);
|
||||
fe_sq(t1, t0);
|
||||
fe_sq(t1, t1);
|
||||
fe_mul(t1, uv7, t1);
|
||||
fe_mul(t1, z, t1);
|
||||
fe_mul(t0, t0, t1);
|
||||
fe_sq(t0, t0);
|
||||
fe_mul(t0, t1, t0);
|
||||
@@ -2013,12 +2112,24 @@ static void fe_divpowm1(fe r, const fe u, const fe v) {
|
||||
fe_mul(t0, t1, t0);
|
||||
fe_sq(t0, t0);
|
||||
fe_sq(t0, t0);
|
||||
fe_mul(t0, t0, uv7);
|
||||
fe_mul(out, t0, z);
|
||||
}
|
||||
|
||||
/* End fe_pow22523.c */
|
||||
/* t0 = (uv^7)^((q-5)/8) */
|
||||
fe_mul(t0, t0, v3);
|
||||
fe_mul(r, t0, u); /* u^(m+1)v^(-(m+1)) */
|
||||
/* New code */
|
||||
|
||||
static void fe_divpowm1(fe r, const fe u, const fe v) {
|
||||
fe v3, uv7;
|
||||
|
||||
fe_sq(v3, v);
|
||||
fe_mul(v3, v3, v); /* v3 = v^3 */
|
||||
fe_sq(uv7, v3);
|
||||
fe_mul(uv7, uv7, v);
|
||||
fe_mul(uv7, uv7, u); /* uv7 = uv^7 */
|
||||
|
||||
fe_pow22523(r, uv7); /* (uv^7)^((q-5)/8) */
|
||||
|
||||
fe_mul(r, r, v3);
|
||||
fe_mul(r, r, u); /* u^(m+1)v^(-(m+1)) */
|
||||
}
|
||||
|
||||
static void ge_cached_0(ge_cached *r) {
|
||||
@@ -2096,6 +2207,43 @@ void ge_scalarmult(ge_p2 *r, const unsigned char *a, const ge_p3 *A) {
|
||||
}
|
||||
}
|
||||
|
||||
void ge_scalarmult_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A) {
|
||||
signed char aslide[256];
|
||||
ge_dsmp Ai; /* A, 3A, 5A, 7A, 9A, 11A, 13A, 15A */
|
||||
ge_p1p1 t;
|
||||
ge_p3 u;
|
||||
ge_p2 r_p2;
|
||||
int i;
|
||||
|
||||
slide(aslide, a);
|
||||
ge_dsm_precomp(Ai, A);
|
||||
|
||||
ge_p2_0(&r_p2);
|
||||
ge_p2_0(r);
|
||||
|
||||
for (i = 255; i >= 0; --i) {
|
||||
if (aslide[i]) break;
|
||||
}
|
||||
|
||||
for (; i >= 0; --i) {
|
||||
ge_p2_dbl(&t, &r_p2);
|
||||
|
||||
if (aslide[i] > 0) {
|
||||
ge_p1p1_to_p3(&u, &t);
|
||||
ge_add(&t, &u, &Ai[aslide[i] / 2]);
|
||||
}
|
||||
else if (aslide[i] < 0) {
|
||||
ge_p1p1_to_p3(&u, &t);
|
||||
ge_sub(&t, &u, &Ai[(-aslide[i]) / 2]);
|
||||
}
|
||||
|
||||
if (i != 0)
|
||||
ge_p1p1_to_p2(&r_p2, &t);
|
||||
else
|
||||
ge_p1p1_to_p2(r, &t); // last step
|
||||
}
|
||||
}
|
||||
|
||||
void ge_scalarmult_p3(ge_p3 *r3, const unsigned char *a, const ge_p3 *A) {
|
||||
signed char e[64];
|
||||
int carry, carry2, i;
|
||||
@@ -2431,6 +2579,14 @@ void sc_0(unsigned char *s) {
|
||||
}
|
||||
}
|
||||
|
||||
void sc_1(unsigned char *s) {
|
||||
int i;
|
||||
s[0] = 1;
|
||||
for (i = 1; i < 32; i++) {
|
||||
s[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sc_reduce32(unsigned char *s) {
|
||||
int64_t s0 = 2097151 & load_3(s);
|
||||
int64_t s1 = 2097151 & (load_4(s + 2) >> 5);
|
||||
@@ -3831,6 +3987,92 @@ int sc_isnonzero(const unsigned char *s) {
|
||||
s[27] | s[28] | s[29] | s[30] | s[31]) - 1) >> 8) + 1;
|
||||
}
|
||||
|
||||
static void edwardsYZ_to_x25519(unsigned char *xbytes, const fe Y, const fe Z) {
|
||||
// y = Y/Z
|
||||
// x_mont = (1 + y) / (1 - y)
|
||||
// = (1 + Y/Z) / (1 - Y/Z)
|
||||
// = (Z + Y) / (Z - Y)
|
||||
|
||||
fe tmp0;
|
||||
fe tmp1;
|
||||
fe_add(tmp0, Z, Y); // Z + Y
|
||||
fe_sub(tmp1, Z, Y); // Z - Y
|
||||
fe_invert(tmp1, tmp1); // 1/(Z - Y)
|
||||
fe_mul(tmp0, tmp0, tmp1); // (Z + Y) / (Z - Y)
|
||||
fe_tobytes(xbytes, tmp0); // tobytes((Z + Y) / (Z - Y))
|
||||
}
|
||||
|
||||
void ge_p3_to_x25519(unsigned char *xbytes, const ge_p3 *h)
|
||||
{
|
||||
edwardsYZ_to_x25519(xbytes, h->Y, h->Z);
|
||||
}
|
||||
|
||||
int edwards_bytes_to_x25519_vartime(unsigned char *xbytes, const unsigned char *s)
|
||||
{
|
||||
/* From fe_frombytes.c */
|
||||
|
||||
int64_t h0 = load_4(s);
|
||||
int64_t h1 = load_3(s + 4) << 6;
|
||||
int64_t h2 = load_3(s + 7) << 5;
|
||||
int64_t h3 = load_3(s + 10) << 3;
|
||||
int64_t h4 = load_3(s + 13) << 2;
|
||||
int64_t h5 = load_4(s + 16);
|
||||
int64_t h6 = load_3(s + 20) << 7;
|
||||
int64_t h7 = load_3(s + 23) << 5;
|
||||
int64_t h8 = load_3(s + 26) << 4;
|
||||
int64_t h9 = (load_3(s + 29) & 8388607) << 2;
|
||||
int64_t carry0;
|
||||
int64_t carry1;
|
||||
int64_t carry2;
|
||||
int64_t carry3;
|
||||
int64_t carry4;
|
||||
int64_t carry5;
|
||||
int64_t carry6;
|
||||
int64_t carry7;
|
||||
int64_t carry8;
|
||||
int64_t carry9;
|
||||
|
||||
/* Validate the number to be canonical */
|
||||
if (h9 == 33554428 && h8 == 268435440 && h7 == 536870880 && h6 == 2147483520 &&
|
||||
h5 == 4294967295 && h4 == 67108860 && h3 == 134217720 && h2 == 536870880 &&
|
||||
h1 == 1073741760 && h0 >= 4294967277) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
carry9 = (h9 + (int64_t) (1<<24)) >> 25; h0 += carry9 * 19; h9 -= carry9 << 25;
|
||||
carry1 = (h1 + (int64_t) (1<<24)) >> 25; h2 += carry1; h1 -= carry1 << 25;
|
||||
carry3 = (h3 + (int64_t) (1<<24)) >> 25; h4 += carry3; h3 -= carry3 << 25;
|
||||
carry5 = (h5 + (int64_t) (1<<24)) >> 25; h6 += carry5; h5 -= carry5 << 25;
|
||||
carry7 = (h7 + (int64_t) (1<<24)) >> 25; h8 += carry7; h7 -= carry7 << 25;
|
||||
|
||||
carry0 = (h0 + (int64_t) (1<<25)) >> 26; h1 += carry0; h0 -= carry0 << 26;
|
||||
carry2 = (h2 + (int64_t) (1<<25)) >> 26; h3 += carry2; h2 -= carry2 << 26;
|
||||
carry4 = (h4 + (int64_t) (1<<25)) >> 26; h5 += carry4; h4 -= carry4 << 26;
|
||||
carry6 = (h6 + (int64_t) (1<<25)) >> 26; h7 += carry6; h6 -= carry6 << 26;
|
||||
carry8 = (h8 + (int64_t) (1<<25)) >> 26; h9 += carry8; h8 -= carry8 << 26;
|
||||
|
||||
fe Y;
|
||||
Y[0] = h0;
|
||||
Y[1] = h1;
|
||||
Y[2] = h2;
|
||||
Y[3] = h3;
|
||||
Y[4] = h4;
|
||||
Y[5] = h5;
|
||||
Y[6] = h6;
|
||||
Y[7] = h7;
|
||||
Y[8] = h8;
|
||||
Y[9] = h9;
|
||||
|
||||
/* End fe_frombytes.c */
|
||||
|
||||
fe Z;
|
||||
fe_1(Z);
|
||||
|
||||
edwardsYZ_to_x25519(xbytes, Y, Z);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ge_p3_is_point_at_infinity_vartime(const ge_p3 *p) {
|
||||
// https://eprint.iacr.org/2008/522
|
||||
// X == T == 0 and Y/Z == 1
|
||||
@@ -3879,3 +4121,67 @@ int ge_p3_is_point_at_infinity_vartime(const ge_p3 *p) {
|
||||
// Y/Z = 0/0
|
||||
return 0;
|
||||
}
|
||||
|
||||
// https://www.ietf.org/archive/id/draft-ietf-lwig-curve-representations-02.pdf E.2
|
||||
static void fe_ed_derivatives_to_wei_x(unsigned char *wei_x, const fe inv_one_minus_y, const fe one_plus_y)
|
||||
{
|
||||
// (1/(1-y))*(1+y)
|
||||
fe inv_one_minus_y_mul_one_plus_y;
|
||||
fe_mul(inv_one_minus_y_mul_one_plus_y, inv_one_minus_y, one_plus_y);
|
||||
|
||||
// wei x = (1/(1-y))*(1+y) + (A/3)
|
||||
fe wei_x_fe;
|
||||
fe_add(wei_x_fe, inv_one_minus_y_mul_one_plus_y, fe_a_inv_3);
|
||||
fe_tobytes(wei_x, wei_x_fe);
|
||||
}
|
||||
|
||||
// https://www.ietf.org/archive/id/draft-ietf-lwig-curve-representations-02.pdf E.2
|
||||
void fe_ed_derivatives_to_wei_x_y(unsigned char *wei_x, unsigned char *wei_y, const fe inv_one_minus_y, const fe one_plus_y, const fe inv_one_minus_y_mul_x)
|
||||
{
|
||||
fe_ed_derivatives_to_wei_x(wei_x, inv_one_minus_y, one_plus_y);
|
||||
|
||||
// c*(1+y)
|
||||
fe fe_c_mul_one_plus_y;
|
||||
fe_mul(fe_c_mul_one_plus_y, fe_c, one_plus_y);
|
||||
|
||||
// wei y = c * (1+y) * (1/((1-y)*x))
|
||||
fe wei_y_fe;
|
||||
fe_mul(wei_y_fe, fe_c_mul_one_plus_y, inv_one_minus_y_mul_x);
|
||||
fe_tobytes(wei_y, wei_y_fe);
|
||||
}
|
||||
|
||||
/*
|
||||
Since fe_add and fe_sub enforce the following conditions:
|
||||
|
||||
Preconditions:
|
||||
|f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
|
||||
|g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
|
||||
|
||||
Postconditions:
|
||||
|h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
|
||||
|
||||
We sometimes need to "reduce" field elems when they are in the poscondition's
|
||||
larger domain to match the precondition domain. This way we can take the output
|
||||
of fe_add or fe_sub and use it as input to another call to fe_add or fe_sub.
|
||||
|
||||
We reduce by converting the field elem to its byte repr, then re-deriving the
|
||||
field elem from the byte repr.
|
||||
*/
|
||||
void fe_reduce(fe reduced_f, const fe f)
|
||||
{
|
||||
unsigned char f_bytes[32];
|
||||
fe_tobytes(f_bytes, f);
|
||||
fe_frombytes_vartime(reduced_f, f_bytes);
|
||||
}
|
||||
|
||||
void fe_dbl(fe h, const fe f)
|
||||
{
|
||||
// Reduce the input for safety to ensure we meet the preconditions for fe_add
|
||||
fe f_reduced;
|
||||
fe_reduce(f_reduced, f);
|
||||
fe h_res;
|
||||
fe_add(h_res, f_reduced, f_reduced);
|
||||
// Reduce the output for safety to ensure the result can be used as input to
|
||||
// fe_add or fe_sub without an extra call to fe_reduce
|
||||
fe_reduce(h, h_res);
|
||||
}
|
||||
|
||||
Vendored
+41
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2020, The Monero Project
|
||||
// Copyright (c) 2014-2024, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* From fe.h */
|
||||
|
||||
typedef int32_t fe[10];
|
||||
@@ -86,6 +88,7 @@ void ge_double_scalarmult_base_vartime_p3(ge_p3 *, const unsigned char *, const
|
||||
|
||||
extern const fe fe_sqrtm1;
|
||||
extern const fe fe_d;
|
||||
int fe_frombytes_vartime(fe, const unsigned char *);
|
||||
int ge_frombytes_vartime(ge_p3 *, const unsigned char *);
|
||||
|
||||
/* From ge_p1p1_to_p2.c */
|
||||
@@ -118,6 +121,8 @@ void ge_p3_tobytes(unsigned char *, const ge_p3 *);
|
||||
extern const ge_precomp ge_base[32][8];
|
||||
void ge_scalarmult_base(ge_p3 *, const unsigned char *);
|
||||
|
||||
void ge_scalarmult_base_vartime(ge_p3 *h, const unsigned char *a);
|
||||
|
||||
/* From ge_tobytes.c */
|
||||
|
||||
void ge_tobytes(unsigned char *, const ge_p2 *);
|
||||
@@ -126,25 +131,40 @@ void ge_tobytes(unsigned char *, const ge_p2 *);
|
||||
|
||||
void sc_reduce(unsigned char *);
|
||||
|
||||
/* From fe_pow22523.c */
|
||||
|
||||
void fe_pow22523(fe, const fe);
|
||||
|
||||
/* New code */
|
||||
|
||||
void ge_scalarmult(ge_p2 *, const unsigned char *, const ge_p3 *);
|
||||
void ge_scalarmult_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A);
|
||||
void ge_scalarmult_p3(ge_p3 *, const unsigned char *, const ge_p3 *);
|
||||
void ge_double_scalarmult_precomp_vartime(ge_p2 *, const unsigned char *, const ge_p3 *, const unsigned char *, const ge_dsmp);
|
||||
void ge_triple_scalarmult_precomp_vartime(ge_p2 *, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp);
|
||||
void ge_double_scalarmult_precomp_vartime2(ge_p2 *, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp);
|
||||
void ge_double_scalarmult_precomp_vartime2_p3(ge_p3 *, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp);
|
||||
void ge_mul8(ge_p1p1 *, const ge_p2 *);
|
||||
extern const fe fe_a_sub_d;
|
||||
extern const fe fe_a0;
|
||||
extern const fe fe_ap;
|
||||
extern const fe fe_msqrt2b;
|
||||
extern const fe fe_ma2;
|
||||
extern const fe fe_ma;
|
||||
extern const fe fe_fffb1;
|
||||
extern const fe fe_fffb2;
|
||||
extern const fe fe_fffb3;
|
||||
extern const fe fe_fffb4;
|
||||
extern const fe fe_a_inv_3;
|
||||
extern const fe fe_c;
|
||||
extern const fe fe_one;
|
||||
extern const fe fe_m1;
|
||||
extern const fe fe_inv2;
|
||||
extern const ge_p3 ge_p3_identity;
|
||||
extern const ge_p3 ge_p3_H;
|
||||
void ge_fromfe_frombytes_vartime(ge_p2 *, const unsigned char *);
|
||||
void sc_0(unsigned char *);
|
||||
void sc_1(unsigned char *);
|
||||
void sc_reduce32(unsigned char *);
|
||||
void sc_add(unsigned char *, const unsigned char *, const unsigned char *);
|
||||
void sc_sub(unsigned char *, const unsigned char *, const unsigned char *);
|
||||
@@ -154,12 +174,32 @@ void sc_muladd(unsigned char *s, const unsigned char *a, const unsigned char *b,
|
||||
int sc_check(const unsigned char *);
|
||||
int sc_isnonzero(const unsigned char *); /* Doesn't normalize */
|
||||
|
||||
/**
|
||||
* brief: Convert Ed25519 y-coord to X25519 x-coord, AKA "ConvertPointE()" in the Carrot spec
|
||||
*/
|
||||
void ge_p3_to_x25519(unsigned char *xbytes, const ge_p3 *h);
|
||||
int edwards_bytes_to_x25519_vartime(unsigned char *xbytes, const unsigned char *s);
|
||||
|
||||
// internal
|
||||
uint64_t load_3(const unsigned char *in);
|
||||
uint64_t load_4(const unsigned char *in);
|
||||
void ge_sub(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q);
|
||||
void fe_add(fe h, const fe f, const fe g);
|
||||
void fe_neg(fe h, const fe f);
|
||||
void fe_tobytes(unsigned char *, const fe);
|
||||
void fe_copy(fe h, const fe f);
|
||||
int fe_isnegative(const fe f);
|
||||
void fe_invert(fe out, const fe z);
|
||||
int fe_batch_invert(fe *out, const fe *in, const int n);
|
||||
void fe_mul(fe out, const fe, const fe);
|
||||
void fe_sq(fe h, const fe f);
|
||||
void fe_sub(fe h, const fe f, const fe g);
|
||||
void fe_0(fe h);
|
||||
void fe_1(fe h);
|
||||
|
||||
int ge_p3_is_point_at_infinity_vartime(const ge_p3 *p);
|
||||
|
||||
void fe_ed_derivatives_to_wei_x_y(unsigned char *wei_x, unsigned char *wei_y, const fe inv_one_minus_y, const fe one_plus_y, const fe inv_one_minus_y_mul_x);
|
||||
|
||||
void fe_reduce(fe reduced_f, const fe f);
|
||||
void fe_dbl(fe h, const fe f);
|
||||
|
||||
+251
@@ -0,0 +1,251 @@
|
||||
// Copyright (c) 2024, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4800)
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
#include "crypto-ops.h"
|
||||
}
|
||||
|
||||
#include "fcmp_pp_crypto.h"
|
||||
#include <cstring>
|
||||
|
||||
static bool fe_compare(const fe a, const fe b)
|
||||
{
|
||||
unsigned char a_bytes[32];
|
||||
unsigned char b_bytes[32];
|
||||
|
||||
fe_tobytes(a_bytes, a);
|
||||
fe_tobytes(b_bytes, b);
|
||||
|
||||
return memcmp(a_bytes, b_bytes, sizeof(a_bytes)) == 0;
|
||||
}
|
||||
|
||||
static bool sqrt_ext(fe y, const fe x)
|
||||
{
|
||||
fe y_res;
|
||||
|
||||
fe x2;
|
||||
fe_dbl(x2, x);
|
||||
|
||||
fe b;
|
||||
fe_pow22523(b, x2);
|
||||
|
||||
fe b_sq;
|
||||
fe_sq(b_sq, b);
|
||||
|
||||
fe c;
|
||||
fe_mul(c, x2, b_sq);
|
||||
|
||||
if (fe_compare(c, fe_one) || fe_compare(c, fe_m1))
|
||||
{
|
||||
fe_0(c);
|
||||
c[0] = 3;
|
||||
}
|
||||
|
||||
fe c_sub_1;
|
||||
fe_sub(c_sub_1, c, fe_one);
|
||||
|
||||
fe_mul(y_res, x, b);
|
||||
fe_mul(y_res, y_res, c_sub_1);
|
||||
|
||||
if (fe_isnegative(y_res)) {
|
||||
fe_neg(y_res, y_res);
|
||||
}
|
||||
|
||||
fe y_sq;
|
||||
fe_sq(y_sq, y_res);
|
||||
bool r = fe_compare(x, y_sq);
|
||||
|
||||
fe_copy(y, y_res);
|
||||
return r;
|
||||
};
|
||||
|
||||
namespace fcmp_pp
|
||||
{
|
||||
// TODO: impl faster sqrt
|
||||
bool sqrt(fe y, const fe x)
|
||||
{
|
||||
return sqrt_ext(y, x);
|
||||
};
|
||||
} // namespace fcmp_pp
|
||||
|
||||
static void inv_iso(fe u_out, fe w_out, const fe u, const fe w)
|
||||
{
|
||||
// 4u
|
||||
fe_dbl(u_out, u);
|
||||
fe_dbl(u_out, u_out);
|
||||
// 2w
|
||||
fe_dbl(w_out, w);
|
||||
};
|
||||
|
||||
static void inv_psi1(fe e_out, fe u_out, fe w_out, const fe e, const fe u, const fe w)
|
||||
{
|
||||
fe e_res, u_res, w_res;
|
||||
|
||||
fe tt;
|
||||
bool cc = sqrt_ext(tt, u);
|
||||
fe_copy(w_res, tt);
|
||||
fe w_;
|
||||
fe_copy(w_, w);
|
||||
fe_copy(e_res, e);
|
||||
|
||||
if (!cc)
|
||||
{
|
||||
fe tt_sq;
|
||||
fe_sq(tt_sq, tt);
|
||||
fe neg_u_dbl;
|
||||
fe_dbl(neg_u_dbl, u);
|
||||
fe_neg(neg_u_dbl, neg_u_dbl);
|
||||
if (fe_compare(tt_sq, neg_u_dbl)) {
|
||||
fe_mul(tt, tt, fe_sqrtm1);
|
||||
}
|
||||
|
||||
fe_mul(w_, w, tt);
|
||||
|
||||
fe e_sq;
|
||||
fe_sq(e_sq, e);
|
||||
fe_mul(w_res, fe_msqrt2b, e_sq);
|
||||
|
||||
fe_mul(e_res, e_res, tt);
|
||||
}
|
||||
|
||||
fe w_res_sq;
|
||||
fe_sq(w_res_sq, w_res);
|
||||
|
||||
fe e_res_sq;
|
||||
fe_sq(e_res_sq, e_res);
|
||||
|
||||
fe A_e_sq;
|
||||
fe_mul(A_e_sq, fe_a0, e_res_sq);
|
||||
|
||||
fe w_res_w;
|
||||
fe_mul(w_res_w, w_res, w_);
|
||||
|
||||
fe_sub(u_res, w_res_sq, A_e_sq);
|
||||
fe_reduce(u_res, u_res);
|
||||
fe_sub(u_res, u_res, w_res_w);
|
||||
fe_mul(u_res, u_res, fe_inv2);
|
||||
|
||||
fe_copy(e_out, e_res);
|
||||
fe_copy(u_out, u_res);
|
||||
fe_copy(w_out, w_res);
|
||||
};
|
||||
|
||||
static bool inv_psi2(fe u_out, fe w_out, const fe e, const fe u, const fe w)
|
||||
{
|
||||
fe u_res, w_res;
|
||||
|
||||
if (!fcmp_pp::sqrt(w_res, u))
|
||||
return false;
|
||||
fe e_sq;
|
||||
fe_sq(e_sq, e);
|
||||
fe Ap_e_sq;
|
||||
fe_mul(Ap_e_sq, fe_ap, e_sq);
|
||||
|
||||
fe w_res_w;
|
||||
fe_mul(w_res_w, w_res, w);
|
||||
|
||||
fe_sub(u_res, u, Ap_e_sq);
|
||||
fe_reduce(u_res, u_res);
|
||||
fe_sub(u_res, u_res, w_res_w);
|
||||
fe_mul(u_res, u_res, fe_inv2);
|
||||
|
||||
fe_copy(u_out, u_res);
|
||||
fe_copy(w_out, w_res);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
namespace fcmp_pp
|
||||
{
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
bool mul8_is_identity(const ge_p3 &point) {
|
||||
ge_p2 point_ge_p2;
|
||||
ge_p3_to_p2(&point_ge_p2, &point);
|
||||
ge_p1p1 point_mul8;
|
||||
ge_mul8(&point_mul8, &point_ge_p2);
|
||||
ge_p3 point_mul8_p3;
|
||||
ge_p1p1_to_p3(&point_mul8_p3, &point_mul8);
|
||||
return ge_p3_is_point_at_infinity_vartime(&point_mul8_p3);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// https://github.com/kayabaNerve/fcmp-plus-plus/blob/94744c5324e869a9483bbbd93a864e108304bf76/crypto/divisors/src/tests/torsion_check.rs
|
||||
// Returns true if point is torsion free
|
||||
// Pre-condition: point is a valid point and point*8 not equal to identity
|
||||
// WARNING1: this approach needs to be carefully vetted academically and audited
|
||||
// before it can be used in production.
|
||||
// WARNING2: since fe_add and fe_sub expect the input fe's to be within a
|
||||
// smaller domain than the output fe, we sometimes need to "reduce" a field elem
|
||||
// to chain calls to fe_add and fe_sub. Notice all calls to fe_reduce.
|
||||
bool torsion_check_vartime(const ge_p3 &point) {
|
||||
//assert(!mul8_is_identity(point));
|
||||
|
||||
// ed to wei
|
||||
fe e, u, w;
|
||||
{
|
||||
fe z_plus_ed_y, z_minus_ed_y;
|
||||
fe_add(z_plus_ed_y, fe_one, point.Y);
|
||||
fe_sub(z_minus_ed_y, fe_one, point.Y);
|
||||
|
||||
// e
|
||||
fe_mul(e, z_minus_ed_y, point.X);
|
||||
// u
|
||||
fe_mul(u, fe_a_sub_d, z_plus_ed_y);
|
||||
fe_mul(u, u, point.X);
|
||||
fe_mul(u, u, e);
|
||||
// w
|
||||
fe_dbl(w, z_minus_ed_y);
|
||||
}
|
||||
|
||||
//assert(check_e_u_w(e, u, w));
|
||||
|
||||
// Torsion check
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
inv_iso(u, w, u, w);
|
||||
if (!inv_psi2(u, w, e, u, w)) {
|
||||
return false;
|
||||
}
|
||||
inv_psi1(e, u, w, e, u, w);
|
||||
//assert(check_e_u_w(e, u, w));
|
||||
}
|
||||
|
||||
fe _;
|
||||
inv_iso(u, _, u, w);
|
||||
|
||||
if (!sqrt(u, u)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
}//namespace fcmp_pp
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2024, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace fcmp_pp
|
||||
{
|
||||
bool sqrt(fe y, const fe x);
|
||||
bool mul8_is_identity(const ge_p3 &point);
|
||||
bool torsion_check_vartime(const ge_p3 &point);
|
||||
} //namespace fcmp_pp
|
||||
Vendored
+1
-1
Submodule external/src/curl updated: 06c37f3218...efe7a9f403
Vendored
+1
-1
Submodule external/src/grpc updated: 9ffeba31cf...0a4737ced1
Vendored
+1
-1
Submodule external/src/libzmq updated: 8a20bd6132...1fce1ef005
Vendored
+1
-1
Submodule external/src/miniupnp updated: 7e28c9f8af...88a1515ea8
@@ -1,20 +1,20 @@
|
||||
diff --git a/src/crypto/rand_extra/windows.c b/src/crypto/rand_extra/windows.c
|
||||
index a44774d23..09cf10942 100644
|
||||
--- a/src/crypto/rand_extra/windows.c
|
||||
+++ b/src/crypto/rand_extra/windows.c
|
||||
@@ -26,6 +26,7 @@
|
||||
OPENSSL_MSVC_PRAGMA(warning(push, 3))
|
||||
diff --git a/crypto/rand/windows.cc b/crypto/rand/windows.cc
|
||||
index 59df467e7..aa5ac076c 100644
|
||||
--- a/crypto/rand/windows.cc
|
||||
+++ b/crypto/rand/windows.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <windows.h>
|
||||
+#include <wincrypt.h>
|
||||
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
|
||||
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
@@ -61,16 +62,40 @@ void CRYPTO_sysrand(uint8_t *out, size_t requested) {
|
||||
@@ -57,16 +58,40 @@ void CRYPTO_sysrand(uint8_t *out, size_t requested) {
|
||||
// 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)
|
||||
+{
|
||||
@@ -25,21 +25,22 @@ index a44774d23..09cf10942 100644
|
||||
HMODULE hmod = LoadLibraryW(L"bcryptprimitives");
|
||||
- if (hmod == NULL) {
|
||||
- abort();
|
||||
- }
|
||||
- g_processprng_fn = (ProcessPrngFunction)GetProcAddress(hmod, "ProcessPrng");
|
||||
- if (g_processprng_fn == NULL) {
|
||||
- abort();
|
||||
+
|
||||
+ if (hmod) {
|
||||
+ g_processprng_fn = (ProcessPrngFunction)GetProcAddress(hmod, "ProcessPrng");
|
||||
+ if (g_processprng_fn) {
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
- g_processprng_fn = (ProcessPrngFunction)GetProcAddress(hmod, "ProcessPrng");
|
||||
- if (g_processprng_fn == NULL) {
|
||||
- abort();
|
||||
+ }
|
||||
+
|
||||
+ if (CryptAcquireContext(&g_hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) {
|
||||
+ g_processprng_fn = &wrapper_CryptGenRandom;
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ DWORD err = GetLastError();
|
||||
+ if (err == NTE_BAD_KEYSET) {
|
||||
@@ -50,7 +51,7 @@ index a44774d23..09cf10942 100644
|
||||
+ else {
|
||||
+ err = GetLastError();
|
||||
+ }
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ abort();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
diff --git a/src/google/protobuf/generated_message_tctable_lite.cc b/src/google/protobuf/generated_message_tctable_lite.cc
|
||||
index 5758c1602..e425d6715 100644
|
||||
--- a/src/google/protobuf/generated_message_tctable_lite.cc
|
||||
+++ b/src/google/protobuf/generated_message_tctable_lite.cc
|
||||
@@ -406,7 +406,7 @@ PROTOBUF_ALWAYS_INLINE const char* TcParser::MiniParse(PROTOBUF_TC_PARAM_DECL) {
|
||||
if (entry == nullptr) {
|
||||
if (export_called_function) *test_out = {table->fallback, tag};
|
||||
data.data = tag;
|
||||
- PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
|
||||
+ return table->fallback(PROTOBUF_TC_PARAM_PASS);
|
||||
}
|
||||
|
||||
// The handler may need the tag and the entry to resolve fallback logic. Both
|
||||
@@ -468,7 +468,7 @@ PROTOBUF_ALWAYS_INLINE const char* TcParser::MiniParse(PROTOBUF_TC_PARAM_DECL) {
|
||||
TailCallParseFunc parse_fn = kMiniParseTable[field_type];
|
||||
if (export_called_function) *test_out = {parse_fn, tag, entry};
|
||||
|
||||
- PROTOBUF_MUSTTAIL return parse_fn(PROTOBUF_TC_PARAM_PASS);
|
||||
+ return parse_fn(PROTOBUF_TC_PARAM_PASS);
|
||||
}
|
||||
|
||||
PROTOBUF_NOINLINE const char* TcParser::MiniParse(
|
||||
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
|
||||
index edd6d5122..da894d384 100644
|
||||
--- a/src/google/protobuf/port_def.inc
|
||||
+++ b/src/google/protobuf/port_def.inc
|
||||
@@ -506,7 +506,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
|
||||
#error PROTOBUF_ATTRIBUTE_WEAK was previously defined
|
||||
#endif
|
||||
#if ABSL_HAVE_ATTRIBUTE(weak) && !defined(__APPLE__) && \
|
||||
- (!defined(_WIN32) || __clang_major__ < 9) && !defined(__MINGW32__)
|
||||
+ (!defined(_WIN32) || (defined(__clang_major__) && (__clang_major__ < 9))) && !defined(__MINGW32__)
|
||||
#define PROTOBUF_ATTRIBUTE_WEAK __attribute__((weak))
|
||||
#define PROTOBUF_HAVE_ATTRIBUTE_WEAK 1
|
||||
#else
|
||||
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/output.log clang_$2_output.log
|
||||
docker rm p2pool_compiler_test_clang_$1_$2_container
|
||||
|
||||
docker image rm -f p2pool_compiler_test_clang_$1_$2
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/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
|
||||
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/output.log gcc_$2_output.log
|
||||
docker rm p2pool_compiler_test_gcc_$1_$2_container
|
||||
|
||||
docker image rm -f p2pool_compiler_test_gcc_$1_$2
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/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
|
||||
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.2.0"
|
||||
|
||||
cd /root
|
||||
|
||||
git clone --depth 1 --branch releases/gcc-15.2.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
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: release_scripts/build_all.sh v4.9
|
||||
|
||||
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
|
||||
|
||||
N=$(($(nproc)-1))
|
||||
N1=$(($N/2))
|
||||
N2=$(($N1+1))
|
||||
|
||||
gnome-terminal --tab -- freebsd_aarch64/build.sh $1 0-$N1
|
||||
gnome-terminal --tab -- freebsd_x64/build.sh $1 $N2-$N
|
||||
gnome-terminal --tab -- linux_aarch64/build.sh $1 0-$N1
|
||||
gnome-terminal --tab -- linux_riscv64/build.sh $1 $N2-$N
|
||||
gnome-terminal --tab -- linux_x64/build.sh $1 0-$N1
|
||||
gnome-terminal --tab -- windows_x64/build.sh $1 $N2-$N
|
||||
gnome-terminal --tab -- macos_aarch64/build.sh $1 0-$N1
|
||||
gnome-terminal --tab -- macos_x64/build.sh $1 $N2-$N
|
||||
gnome-terminal --tab -- source/build.sh $1 0-$N1
|
||||
@@ -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
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.9
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ "$2" ]; then
|
||||
cpu_set="--cpuset-cpus $2"
|
||||
else
|
||||
cpu_set=""
|
||||
fi
|
||||
|
||||
docker build $cpu_set --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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user