Compare commits

..

80 Commits

Author SHA1 Message Date
SChernykh 458c7a3389 p2pool v4.11 2025-09-27 12:29:52 +02:00
SChernykh 82f3982175 Fixed wallet payout log message for subaddresses 2025-09-27 10:13:37 +02:00
SChernykh 0184a3139c CI: revised clang-tidy list of checks 2025-09-25 18:46:22 +02:00
SChernykh 26357f44ec Merge pull request #376 from SChernykh/subaddress
Subaddress support
2025-09-25 14:51:43 +02:00
SChernykh 85931f564a Build scripts: updated versions, moved downloads to the beginning 2025-09-25 13:23:27 +02:00
SChernykh 1e8e6c1010 Added filter for late txpool notifications 2025-09-24 09:56:53 +02:00
SChernykh f6a1612ff1 Fixed build errors 2025-09-23 17:17:17 +02:00
SChernykh 1eb22109b5 Fixed m_mergeMiningExtra format description 2025-09-23 12:53:50 +02:00
SChernykh c0b99ac6fd Refactored BlockTemplate::update() - removed the use of pointers as parameters 2025-09-23 11:45:56 +02:00
SChernykh cff1210761 Store public viewkey of the subaddress 2025-09-22 19:00:43 +02:00
SChernykh bae7c65126 Reproducible builds: fixed clang version display 2025-09-22 17:59:30 +02:00
SChernykh 04d195d5cd Added support for mining to a subaddress 2025-09-22 14:24:11 +02:00
SChernykh a4e1f00993 Wallet: added subaddress detection 2025-09-21 15:50:08 +02:00
SChernykh 0d101f0ae6 Fixed MSVC build 2025-09-20 19:23:25 +02:00
SChernykh 2ae77e5b71 MSVC: disable permissive mode 2025-09-20 18:02:57 +02:00
SChernykh 2e32d14d5f CI: tweaked msan parameters 2025-09-19 21:19:43 +02:00
SChernykh 415ad70e2f CI: lighter parameters for msan 2025-09-19 10:09:40 +02:00
SChernykh 6380e204dd CI: increased time limit for msan 2025-09-19 08:05:03 +02:00
SChernykh 12993dfe19 Fixed FreeBSD build 2025-09-18 22:29:30 +02:00
SChernykh a64753ecd0 clang-21, one more time 2025-09-18 21:37:49 +02:00
SChernykh e9c7367b92 Reverted back to clang-20 for msan 2025-09-17 19:16:49 +02:00
SChernykh 9f7dc5b768 CI: use clang-21 for msan 2025-09-17 14:12:10 +02:00
SChernykh f141bef4b5 Fixed TLS init order 2025-09-17 09:14:32 +02:00
SChernykh 32e940577e Tari: track gRPC channel state and display it in logs/status/API 2025-09-15 15:53:35 +02:00
SChernykh 012d148080 Added git mailmap 2025-09-15 14:31:15 +02:00
SChernykh d64b4ea2dc Updated recommended Monero version 2025-09-15 14:21:26 +02:00
sech1 a9e0b834d9 Reproducible builds: shortened clang version display 2025-09-15 09:39:30 +02:00
sech1 3a8ec27d93 Reproducible builds: fix git commit display 2025-09-14 17:58:48 +02:00
sech1 b69de65e78 Display git commit in version 2025-09-14 16:27:26 +02:00
sech1 44f8d941a7 Refactored background job shutdown logic 2025-09-14 14:41:31 +02:00
sech1 8c1c5fd8e1 P2PServer: check PoW in background to not stall the P2P loop 2025-09-14 12:55:23 +02:00
sech1 bbfdeeaff5 Log submit_block RPC performance 2025-09-14 00:25:15 +02:00
sech1 f12e43bb79 CI: use the latest cppcheck again 2025-09-13 12:02:16 +02:00
sech1 a1544022cf Build scripts: updated tool versions 2025-09-13 10:04:43 +02:00
sech1 e2008578da Updated Tari gRPC proto files 2025-09-10 21:11:43 +02:00
sech1 9b5a43580e Updated curl to 8.16.0 2025-09-10 14:19:06 +02:00
sech1 20c3973504 p2pool v4.10.1 2025-09-10 09:14:12 +02:00
sech1 16b74edc51 ZMQ: more JSON parsing fixes 2025-09-10 01:17:34 +02:00
sech1 d611056b1c ZMQ: fixed JSON parsing check 2025-09-10 00:05:57 +02:00
sech1 ecc33cfebb Stratum: fixed stats counters when full share validation is on 2025-09-09 17:24:04 +02:00
sech1 0ae2af0bb8 Added more sanity checks 2025-09-09 16:46:57 +02:00
sech1 bdd34c5f56 Fixed on_share_found background job counter 2025-09-09 11:23:25 +02:00
sech1 bbee372a01 p2pool v4.10 2025-09-09 09:22:45 +02:00
sech1 5c907d39aa Fix: submit broadcasted Monero blocks one at a time 2025-09-07 19:39:10 +02:00
SChernykh 6d3fbc5467 Merge pull request #374 from gavinbarnard/gavinbarnard/fullvalidationoption
full share validation via cmdline option
2025-09-07 14:22:57 +02:00
gavinbarnard 068b286a88 full share validation via cmdline option 2025-09-06 18:05:11 +00:00
sech1 b7c4613d40 Fixed handling of multiple blocks from ZMQ 2025-09-06 14:25:57 +02:00
sech1 971f804a6e Fix: get missing blocks in a thread-safe way 2025-09-05 15:35:39 +02:00
sech1 830c78a032 Fixed build errors, refined Monero block broadcast logic 2025-09-03 14:35:53 +02:00
sech1 50634e5e79 Feature: broadcast all new Monero blocks through p2pool network for faster propagation 2025-09-03 10:07:39 +02:00
sech1 c5fba9992e Docker: use fresh checkpoints for faster Monero sync 2025-08-31 17:24:25 +02:00
sech1 29df28d3c8 Docker: fixed missing dependencies 2025-08-30 00:36:36 +02:00
sech1 4a2b75c7fb Build scripts: updated tool versions 2025-08-30 00:34:34 +02:00
sech1 2a9cf67c3a Docker: fixed Monero build again 2025-08-29 20:49:19 +02:00
sech1 3bcde151ee Updated docs: --enforce-dns-checkpointing is now recommended 2025-08-29 18:47:29 +02:00
sech1 b22088f330 CI: update to clang-21 2025-08-26 22:34:11 +02:00
sech1 bfb0b5383a Docker: fixed XMRig build 2025-08-24 19:43:54 +02:00
sech1 560f62a427 Docker: fixed Monero build 2025-08-24 11:28:03 +02:00
sech1 271a30998f Fixed cppcheck command line 2025-08-24 10:13:09 +02:00
sech1 3c4eeb49fd p2pool v4.9.1 2025-08-21 10:28:34 +02:00
sech1 257781f2e2 Docker: updated Ubuntu version 2025-08-20 10:17:16 +02:00
SChernykh fb85deabbe Merge pull request #368 from worldwideward/master
update Dockerfile base image
2025-08-11 18:22:29 +02:00
w 6bc30dc6e1 update Dockerfile base image 2025-08-11 10:18:56 +02:00
SChernykh 93395771d3 CI: temporary cppcheck fix 2025-08-05 13:48:22 +02:00
SChernykh d6c249ca17 Tari: fixed a crash when node is not available 2025-08-04 22:03:35 +02:00
SChernykh 07259e029a TCPServer: pass connection fails to clients 2025-08-02 14:59:49 +02:00
SChernykh b1348b6c80 Fixed asan error (use after poison) 2025-08-01 18:21:06 +02:00
SChernykh a977f988d5 Fixed cppcheck errors 2025-07-31 21:09:54 +02:00
SChernykh 847ffe3959 Updated build scripts 2025-07-28 00:05:28 +02:00
SChernykh ed2e0f1a1b Removed more unused code from tests 2025-07-27 14:05:35 +02:00
SChernykh 240cbd100e Removed unused code from tests, tweaked build scripts 2025-07-26 18:34:13 +02:00
SChernykh f7c1baa453 CI: removed gRPC from Alpine builds because they were too slow 2025-07-26 10:39:38 +02:00
SChernykh 644084a32f More build fixes 2025-07-26 01:15:42 +02:00
SChernykh baab8d3788 Reduced gRPC bloat 2025-07-25 23:23:12 +02:00
SChernykh ce1ef36613 Build fixes 2025-07-25 17:05:25 +02:00
SChernykh 3d08803709 Updated gRPC to v1.74.0 2025-07-25 13:28:07 +02:00
SChernykh a4a0c03517 Tari: fixed the previous fix 2025-07-25 09:49:08 +02:00
SChernykh fb21c917ac Compiler test scripts: don't compress the output 2025-07-24 16:07:11 +02:00
SChernykh 0d9670ee29 Fixed build errors 2025-07-24 14:42:03 +02:00
SChernykh ca47bed7b9 Workaround for read-only working directory 2025-07-24 13:27:59 +02:00
145 changed files with 68197 additions and 32466 deletions
+9 -13
View File
@@ -13,7 +13,7 @@ on:
jobs:
build-alpine-static:
timeout-minutes: 240
timeout-minutes: 90
runs-on: ubuntu-latest
strategy:
@@ -46,7 +46,6 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
shell: alpine.sh {0}
@@ -71,7 +70,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_BINARY=ON -DARCH_ID=${{ matrix.config.arch }}
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
@@ -199,7 +198,6 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
@@ -277,7 +275,6 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
@@ -362,7 +359,6 @@ jobs:
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
@@ -433,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-unknown-attributes"}
- {c: "clang", cxx: "clang++", flags: "-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled -Wno-unknown-attributes"}
defaults:
run:
@@ -452,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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
@@ -597,7 +596,6 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j4
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
@@ -665,7 +663,6 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j3
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
@@ -755,8 +752,7 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j4
cd lib && mkdir .libs && cp libcurl.a .libs
cd ../../libuv
cd ../libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
+2 -2
View File
@@ -12,7 +12,7 @@ on:
jobs:
clang-tidy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Install clang
@@ -37,4 +37,4 @@ jobs:
- name: Run clang-tidy
run: |
cd src
clang-tidy-21 *.cpp -p ../build -checks=-clang-diagnostic-undefined-internal,-clang-analyzer-optin.performance.Padding,-clang-diagnostic-nan-infinity-disabled -warnings-as-errors=* -header-filter=^[^\.]
clang-tidy-21 *.cpp -p ../build -checks=bugprone-*,clang-analyzer-*,llvm-*,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=^[^\./]
+1 -1
View File
@@ -62,7 +62,7 @@ jobs:
cppcheck-windows:
timeout-minutes: 60
timeout-minutes: 120
runs-on: windows-latest
steps:
+8 -11
View File
@@ -36,7 +36,6 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
@@ -98,14 +97,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 +119,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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
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/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_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 +135,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 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run p2pool
@@ -155,7 +153,7 @@ jobs:
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
sudo sysctl vm.mmap_rnd_bits=28
MSAN_OPTIONS="halt_on_error=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --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
run: |
@@ -286,7 +284,6 @@ jobs:
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 -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j4
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
+1
View File
@@ -0,0 +1 @@
SChernykh <15806605+SChernykh@users.noreply.github.com> sech1 <sech1@sech1>
+6 -3
View File
@@ -257,14 +257,14 @@ 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()
@@ -394,6 +394,8 @@ 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)
@@ -448,7 +450,8 @@ if (STATIC_BINARY OR STATIC_LIBS)
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()
+2 -2
View File
@@ -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 && \
+6 -6
View File
@@ -82,7 +82,7 @@ In order to continue mining on P2Pool, you must update both Monero and P2Pool so
|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.4.1 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
@@ -154,7 +154,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 +163,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 +222,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 +231,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 +253,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
+1 -1
View File
@@ -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")
+33
View File
@@ -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}")
+5
View File
@@ -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,6 +34,9 @@ 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)
+1 -1
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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,
)
+1 -1
View File
@@ -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": "",
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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": "",
+3 -1
View File
@@ -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
+28 -11
View File
@@ -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
+5 -4
View File
@@ -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
+11 -1
View File
@@ -1,7 +1,8 @@
### 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)
@@ -39,6 +40,7 @@
--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
```
### Example command line
@@ -116,3 +118,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.
+2 -2
View File
@@ -248,7 +248,7 @@ It's highly recommended to create a new wallet for mining because wallet address
<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>
+2 -2
View File
@@ -248,7 +248,7 @@ It's highly recommended to create a new wallet for mining because wallet address
<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

+320
View File
@@ -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>&nbsp;</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>&nbsp;</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 have to use the primary wallet address for mining. Subaddresses and integrated addresses are not supported, just like with monerod solo mining.
</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>&nbsp;|&nbsp;<a href="https://github.com/SChernykh/p2pool" target="_blank">Source</a>&nbsp;|&nbsp;<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>
&nbsp;
</div>
</body>
</html>
+4
View File
@@ -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
View File
@@ -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>
File diff suppressed because it is too large Load Diff
+15806 -7455
View File
File diff suppressed because it is too large Load Diff
+16731 -10203
View File
File diff suppressed because it is too large Load Diff
+152 -25
View File
@@ -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;
@@ -220,15 +262,31 @@ message NetworkDifficultyResponse {
uint64 sha3x_estimated_hash_rate = 6;
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 {
// This is the total circulating token supply up to date ('mined_rewards + spendable_pre_mine').
uint64 circulating_supply = 1;
uint64 spendable_supply = 2;
// 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
@@ -236,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
@@ -481,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 {
@@ -541,13 +627,18 @@ message GetNetworkStateResponse {
uint64 reward = 5;
// estimate sha3x hash rate
uint64 sha3x_estimated_hash_rate = 6;
// estimate randomx hash rate
// 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{
@@ -559,3 +650,39 @@ message LivenessResult{
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;
}
+2
View File
@@ -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>
+2
View File
@@ -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
+1812 -1264
View File
File diff suppressed because it is too large Load Diff
+1501 -1095
View File
File diff suppressed because it is too large Load Diff
+6 -3
View File
@@ -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,9 +82,10 @@ message ProofOfWork {
message PowAlgo {
// The permitted pow algorithms
enum PowAlgos {
POW_ALGOS_RANDOMXM = 0; // Accessible as `grpc::pow_algo::PowAlgos::RandomxM`
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_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;
+2
View File
@@ -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>
+2
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+1564 -1202
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+119 -24
View File
@@ -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;
}
+2
View File
@@ -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>
+2
View File
@@ -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
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4
View File
@@ -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
+2
View File
@@ -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>
+2
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+2337 -1471
View File
File diff suppressed because it is too large Load Diff
+12 -1
View File
@@ -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;
}
+2
View File
@@ -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
+14 -13
View File
@@ -1,16 +1,16 @@
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/src/crypto/rand/windows.cc b/src/crypto/rand/windows.cc
index 59df467e7..aa5ac076c 100644
--- a/src/crypto/rand/windows.cc
+++ b/src/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;
@@ -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();
}
+35
View File
@@ -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
+1 -1
View File
@@ -7,7 +7,7 @@ cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 --build-arg CLANG_VERSION=$2 -t p2pool_compiler_test_clang_$1_$2 .
docker create --name p2pool_compiler_test_clang_$1_$2_container p2pool_compiler_test_clang_$1_$2:latest
docker cp p2pool_compiler_test_clang_$1_$2_container:/p2pool/logs.tar.gz clang_$2_logs.tar.gz
docker 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
-2
View File
@@ -8,5 +8,3 @@ git submodule update --recursive --jobs $(nproc)
export COMPILER="-DCMAKE_C_COMPILER=clang-$2 -DCMAKE_CXX_COMPILER=clang++-$2"
./test2.sh
tar -czvf /p2pool/logs.tar.gz /p2pool/output.log
+1 -1
View File
@@ -7,7 +7,7 @@ cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 --build-arg GCC_VERSION=$2 -t p2pool_compiler_test_gcc_$1_$2 .
docker create --name p2pool_compiler_test_gcc_$1_$2_container p2pool_compiler_test_gcc_$1_$2:latest
docker cp p2pool_compiler_test_gcc_$1_$2_container:/p2pool/logs.tar.gz gcc_$2_logs.tar.gz
docker 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
-2
View File
@@ -8,5 +8,3 @@ git submodule update --recursive --jobs $(nproc)
export COMPILER="-DCMAKE_C_COMPILER=/usr/local/gcc-$2/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/gcc-$2/bin/g++ -DCMAKE_AR=/usr/local/gcc-$2/bin/gcc-ar -DCMAKE_RANLIB=/usr/local/gcc-$2/bin/gcc-ranlib"
./test2.sh
tar -czvf /p2pool/logs.tar.gz /p2pool/output.log
@@ -106,11 +106,11 @@ mkdir build && cd build
make -j$(nproc)
make install
echo "Installing GCC 15.1.0"
echo "Installing GCC 15.2.0"
cd /root
git clone --depth 1 --branch releases/gcc-15.1.0 --jobs $(nproc) git://gcc.gnu.org/git/gcc.git gcc-15
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
+14 -10
View File
@@ -1,6 +1,6 @@
#!/bin/sh
# Example usage: release_scripts/build_all.sh v4.8.1
# Example usage: release_scripts/build_all.sh v4.9
cd "$(dirname "$0")"
@@ -11,12 +11,16 @@ if [ $? -ne 0 ]; then
images/ubuntu/build.sh
fi
gnome-terminal --tab -- freebsd_aarch64/build.sh $1
gnome-terminal --tab -- freebsd_x64/build.sh $1
gnome-terminal --tab -- linux_aarch64/build.sh $1
gnome-terminal --tab -- linux_riscv64/build.sh $1
gnome-terminal --tab -- linux_x64/build.sh $1
gnome-terminal --tab -- windows_x64/build.sh $1
gnome-terminal --tab -- macos_aarch64/build.sh $1
gnome-terminal --tab -- macos_x64/build.sh $1
gnome-terminal --tab -- source/build.sh $1
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
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_freebsd_aarch64_build_$1 .
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
@@ -22,7 +22,6 @@ flags_p2pool="--target=aarch64-unknown-freebsd12.0 --sysroot=/usr/local/cross-fr
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/freebsd_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -38,7 +37,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/freebsd_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=aarch64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/freebsd_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=aarch64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_freebsd_x64_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_freebsd_x64_build_$1 .
docker create --name p2pool_freebsd_x64_build_$1_container p2pool_freebsd_x64_build_$1:latest
docker cp p2pool_freebsd_x64_build_$1_container:/p2pool/build/p2pool-$1-freebsd-x64.tar.gz ../p2pool-$1-freebsd-x64.tar.gz
@@ -22,7 +22,6 @@ flags_p2pool="--target=x86_64-unknown-freebsd12.0 --sysroot=/usr/local/cross-fre
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/freebsd_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -38,7 +37,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/freebsd_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=x86_64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/freebsd_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=x86_64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
+1 -1
View File
@@ -1,3 +1,3 @@
FROM ubuntu:24.04
ADD prepare.sh /
ADD prepare.sh clang_version.patch /
RUN /prepare.sh
@@ -0,0 +1,15 @@
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index cce839295..b87fe998e 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -873,9 +873,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
Builder.defineMacro("__clang_patchlevel__", TOSTR(CLANG_VERSION_PATCHLEVEL));
#undef TOSTR
#undef TOSTR2
- Builder.defineMacro("__clang_version__",
- "\"" CLANG_VERSION_STRING " "
- + getClangFullRepositoryVersion() + "\"");
+ Builder.defineMacro("__clang_version__", "\"" CLANG_VERSION_STRING "\"");
if (LangOpts.GNUCVersion != 0) {
// Major, minor, patch, are given two decimal places each, so 4.2.1 becomes
+159 -127
View File
@@ -3,42 +3,88 @@ set -e
# Software versions to install
_7ZIP_VERSION=2409
BINUTILS_VERSION=2_44
CLANG_VERSION=20.1.8
CMAKE_VERSION=4.0.3
_7ZIP_VERSION=2501
BINUTILS_VERSION=2_45
CLANG_VERSION=21.1.2
CMAKE_VERSION=4.1.1
FREEBSD_VERSION=12.4
GCC_VERSION=15.1.0
GLIBC_VERSION=2.41
LINUX_HEADERS_VERSION=6.15.4
GCC_VERSION=15.2.0
GLIBC_VERSION=2.42
LINUX_HEADERS_VERSION=6.16.8
MACOSX_SDK_VERSION=15.5
MAKE_VERSION=4.4.1
MINGW_VERSION=13.0.0
XZ_VERSION=5.8.1
TAR_VERSION=1.35
_7ZIP_SHA256="914c7e20ad5ef8e4d3cf08620ff8894b28fe11b7eb99809d6930870fbe48a281"
CMAKE_SHA256="585ae9e013107bc8e7c7c9ce872cbdcbdff569e675b07ef57aacfb88c886faac"
_7ZIP_SHA256="4ca3b7c6f2f67866b92622818b58233dc70367be2f36b498eb0bdeaaa44b53f4"
CMAKE_SHA256="5a6c61cb62b38e153148a2c8d4af7b3d387f0c8c32b6dbceb5eb4af113efd65a"
FREEBSD_AARCH64_SHA256="6c401819bfb93e810c9f9aa670a1e4685f924df5e7e0c9c6397dd6c16c954fa2"
FREEBSD_X86_64_SHA256="581c7edacfd2fca2bdf5791f667402d22fccd8a5e184635e0cac075564d57aa8"
GLIBC_SHA256="a5a26b22f545d6b7d7b3dd828e11e428f24f4fac43c934fb071b6a7d0828e901"
HEADERS_SHA256="0eafd627b602f58d73917d00e4fc3196ba18cba67df6995a42aa74744d8efa16"
GLIBC_SHA256="d1775e32e4628e64ef930f435b67bb63af7599acb6be2b335b9f19f16509f17f"
HEADERS_SHA256="231311bd7084dc3129944d26bb43be6ff837da82fb2104a67704aebca8bfa69f"
MACOSX_SDK_SHA256="c15cf0f3f17d714d1aa5a642da8e118db53d79429eb015771ba816aa7c6c1cbd"
MAKE_SHA256="dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3"
TAR_SHA256="4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16"
echo "Install prerequisites"
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get upgrade -yq --no-install-recommends
apt-get install -yq --no-install-recommends ca-certificates curl bzip2 flex texinfo bison ninja-build python3 file rsync xz-utils gawk gettext patch git gcc g++ make
apt-get install -yq --no-install-recommends ca-certificates curl bzip2 flex texinfo bison ninja-build python3 file rsync xz-utils gawk gettext patch git gcc g++
echo "Install 7-zip"
echo "Cloning the P2Pool repository in background"
cd /
git clone --recursive --jobs $(nproc) https://github.com/SChernykh/p2pool &
echo "Download archives"
cd /root
MAKE_NAME=make-$MAKE_VERSION
MAKE_FILE=$MAKE_NAME.tar.gz
_7ZIP_FILE=7z$_7ZIP_VERSION-linux-x64.tar.xz
curl -L -O https://7-zip.org/a/$_7ZIP_FILE
CMAKE_NAME=cmake-$CMAKE_VERSION-linux-x86_64
CMAKE_FILE=$CMAKE_NAME.tar.gz
HEADERS_FILE=linux-$LINUX_HEADERS_VERSION.tar.xz
GLIBC_FILE=glibc-$GLIBC_VERSION.tar.xz
MACOSX_SDK_FILE=MacOSX$MACOSX_SDK_VERSION.sdk.tar.xz
FREEBSD_FILE=base.txz
TAR_FILE=tar-$TAR_VERSION.tar.xz
mkdir /usr/local/cross-freebsd-x86_64
mkdir /usr/local/cross-freebsd-aarch64
curl -L -Z \
-O https://ftpmirror.gnu.org/make/$MAKE_FILE \
-O https://7-zip.org/a/$_7ZIP_FILE \
-O https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/$CMAKE_FILE \
-O https://www.kernel.org/pub/linux/kernel/v6.x/$HEADERS_FILE \
-O https://ftpmirror.gnu.org/glibc/$GLIBC_FILE \
-O https://github.com/joseluisq/macosx-sdks/releases/download/$MACOSX_SDK_VERSION/$MACOSX_SDK_FILE \
-o /usr/local/cross-freebsd-x86_64/$FREEBSD_FILE https://archive.freebsd.org/old-releases/amd64/$FREEBSD_VERSION-RELEASE/$FREEBSD_FILE \
-o /usr/local/cross-freebsd-aarch64/$FREEBSD_FILE https://archive.freebsd.org/old-releases/arm64/$FREEBSD_VERSION-RELEASE/$FREEBSD_FILE \
-O https://ftpmirror.gnu.org/tar/$TAR_FILE
echo "Verifying checksums"
cd /root
MAKE_FILE_SHA256="$(sha256sum $MAKE_FILE | awk '{ print $1 }')"
if [ $MAKE_FILE_SHA256 != $MAKE_SHA256 ]; then
echo "Error: SHA256 sum does not match for $MAKE_FILE - expected $MAKE_SHA256, got $MAKE_FILE_SHA256"
exit 1
fi
_7ZIP_FILE_SHA256="$(sha256sum $_7ZIP_FILE | awk '{ print $1 }')"
@@ -47,6 +93,88 @@ if [ $_7ZIP_FILE_SHA256 != $_7ZIP_SHA256 ]; then
exit 1
fi
CMAKE_FILE_SHA256="$(sha256sum $CMAKE_FILE | awk '{ print $1 }')"
if [ $CMAKE_FILE_SHA256 != $CMAKE_SHA256 ]; then
echo "Error: SHA256 sum does not match for $CMAKE_FILE - expected $CMAKE_SHA256, got $CMAKE_FILE_SHA256"
exit 1
fi
HEADERS_FILE_SHA256="$(sha256sum $HEADERS_FILE | awk '{ print $1 }')"
if [ $HEADERS_FILE_SHA256 != $HEADERS_SHA256 ]; then
echo "Error: SHA256 sum does not match for $HEADERS_FILE - expected $HEADERS_SHA256, got $HEADERS_FILE_SHA256"
exit 1
fi
GLIBC_FILE_SHA256="$(sha256sum $GLIBC_FILE | awk '{ print $1 }')"
if [ $GLIBC_FILE_SHA256 != $GLIBC_SHA256 ]; then
echo "Error: SHA256 sum does not match for $GLIBC_FILE - expected $GLIBC_SHA256, got $GLIBC_FILE_SHA256"
exit 1
fi
MACOSX_SDK_FILE_SHA256="$(sha256sum $MACOSX_SDK_FILE | awk '{ print $1 }')"
if [ $MACOSX_SDK_FILE_SHA256 != $MACOSX_SDK_SHA256 ]; then
echo "Error: SHA256 sum does not match for $MACOSX_SDK_FILE - expected $MACOSX_SDK_SHA256, got $MACOSX_SDK_FILE_SHA256"
exit 1
fi
cd /usr/local/cross-freebsd-x86_64
FREEBSD_X86_64_FILE_SHA256="$(sha256sum $FREEBSD_FILE | awk '{ print $1 }')"
if [ $FREEBSD_X86_64_FILE_SHA256 != $FREEBSD_X86_64_SHA256 ]; then
echo "Error: SHA256 sum does not match for $FREEBSD_FILE - expected $FREEBSD_X86_64_SHA256, got $FREEBSD_X86_64_FILE_SHA256"
exit 1
fi
cd /usr/local/cross-freebsd-aarch64
FREEBSD_AARCH64_FILE_SHA256="$(sha256sum $FREEBSD_FILE | awk '{ print $1 }')"
if [ $FREEBSD_AARCH64_FILE_SHA256 != $FREEBSD_AARCH64_SHA256 ]; then
echo "Error: SHA256 sum does not match for $FREEBSD_FILE - expected $FREEBSD_AARCH64_SHA256, got $FREEBSD_AARCH64_FILE_SHA256"
exit 1
fi
cd /root
TAR_FILE_SHA256="$(sha256sum $TAR_FILE | awk '{ print $1 }')"
if [ $TAR_FILE_SHA256 != $TAR_SHA256 ]; then
echo "Error: SHA256 sum does not match for $TAR_FILE - expected $TAR_SHA256, got $TAR_FILE_SHA256"
exit 1
fi
echo "Cloning repositories"
cd /root
git clone --depth 1 --branch releases/gcc-$GCC_VERSION git://gcc.gnu.org/git/gcc.git
git clone --depth 1 --branch binutils-$BINUTILS_VERSION git://sourceware.org/git/binutils-gdb.git
git clone --depth 1 --branch llvmorg-$CLANG_VERSION https://github.com/llvm/llvm-project.git
git clone --depth=1 --branch v$MINGW_VERSION https://git.code.sf.net/p/mingw-w64/mingw-w64 mingw-w64-v$MINGW_VERSION
git clone --branch 2.0-llvm-based https://github.com/tpoechtrager/osxcross
git clone --depth=1 --branch v$XZ_VERSION https://github.com/tukaani-project/xz
mv /root/$MACOSX_SDK_FILE osxcross/tarballs
echo "Install make"
cd /root
tar xvf $MAKE_FILE
cd $MAKE_NAME
CFLAGS='-O2' ./configure --disable-dependency-tracking
./build.sh
./make install
echo "Install 7-zip"
cd /root
tar xf $_7ZIP_FILE
cp -f 7zz /usr/local/bin/7z
@@ -54,7 +182,6 @@ echo "Install GCC"
cd /root
git clone --depth 1 --branch releases/gcc-$GCC_VERSION git://gcc.gnu.org/git/gcc.git
rm -rf gcc/.git
cd gcc
@@ -81,7 +208,6 @@ echo "Install binutils"
cd /root
git clone --depth 1 --branch binutils-$BINUTILS_VERSION git://sourceware.org/git/binutils-gdb.git
rm -rf binutils-gdb/.git
cp -r binutils-gdb binutils-gdb-aarch64
@@ -98,53 +224,20 @@ echo "Install cmake"
cd /root
CMAKE_NAME=cmake-$CMAKE_VERSION-linux-x86_64
CMAKE_FILE=$CMAKE_NAME.tar.gz
curl -L -O https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/$CMAKE_FILE
CMAKE_FILE_SHA256="$(sha256sum $CMAKE_FILE | awk '{ print $1 }')"
if [ $CMAKE_FILE_SHA256 != $CMAKE_SHA256 ]; then
echo "Error: SHA256 sum does not match for $CMAKE_FILE - expected $CMAKE_SHA256, got $CMAKE_FILE_SHA256"
exit 1
fi
tar xvf $CMAKE_FILE
cp $CMAKE_NAME/bin/* /usr/local/bin
cp -r $CMAKE_NAME/share/cmake-4.0 /usr/local/share
echo "Install make"
cd /root
MAKE_NAME=make-$MAKE_VERSION
MAKE_FILE=$MAKE_NAME.tar.gz
curl -L -O https://ftpmirror.gnu.org/make/$MAKE_FILE
MAKE_FILE_SHA256="$(sha256sum $MAKE_FILE | awk '{ print $1 }')"
if [ $MAKE_FILE_SHA256 != $MAKE_SHA256 ]; then
echo "Error: SHA256 sum does not match for $MAKE_FILE - expected $MAKE_SHA256, got $MAKE_FILE_SHA256"
exit 1
fi
tar xvf $MAKE_FILE
cd $MAKE_NAME
CFLAGS='-O2' ./configure
make
cp -f make /usr/bin
cp -r $CMAKE_NAME/share/cmake-4.1 /usr/local/share
echo "Install clang"
cd /root
git clone --depth 1 --branch llvmorg-$CLANG_VERSION https://github.com/llvm/llvm-project.git
cd llvm-project
mv /clang_version.patch .
git apply --verbose --ignore-whitespace clang_version.patch
mkdir build && cd build
cmake -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLLVM_ENABLE_PROJECTS="clang;lld;libc" -DCMAKE_BUILD_TYPE=Release -DLLVM_VERSION_SUFFIX="_p2pool" ../llvm
cmake -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLLVM_ENABLE_PROJECTS="clang;lld;libc" -DCMAKE_BUILD_TYPE=Release -DLLVM_VERSION_SUFFIX="_p2pool" -DLIBC_WNO_ERROR=ON -DLLVM_APPEND_VC_REV=OFF ../llvm
ninja
ninja install
@@ -166,17 +259,6 @@ echo "Install Linux headers for aarch64-linux-gnu"
cd /root
HEADERS_FILE=linux-$LINUX_HEADERS_VERSION.tar.xz
curl -L -O https://www.kernel.org/pub/linux/kernel/v6.x/$HEADERS_FILE
HEADERS_FILE_SHA256="$(sha256sum $HEADERS_FILE | awk '{ print $1 }')"
if [ $HEADERS_FILE_SHA256 != $HEADERS_SHA256 ]; then
echo "Error: SHA256 sum does not match for $HEADERS_FILE - expected $HEADERS_SHA256, got $HEADERS_FILE_SHA256"
exit 1
fi
tar xf linux-$LINUX_HEADERS_VERSION.tar.xz
cd linux-$LINUX_HEADERS_VERSION
make ARCH=arm64 INSTALL_HDR_PATH=/usr/local/aarch64-linux-gnu headers_install
@@ -194,17 +276,6 @@ echo "Install glibc for aarch64-linux-gnu"
cd /root
GLIBC_FILE=glibc-$GLIBC_VERSION.tar.xz
curl -L -O https://ftpmirror.gnu.org/glibc/$GLIBC_FILE
GLIBC_FILE_SHA256="$(sha256sum $GLIBC_FILE | awk '{ print $1 }')"
if [ $GLIBC_FILE_SHA256 != $GLIBC_SHA256 ]; then
echo "Error: SHA256 sum does not match for $GLIBC_FILE - expected $GLIBC_SHA256, got $GLIBC_FILE_SHA256"
exit 1
fi
tar xf $GLIBC_FILE
mkdir glibc_build_aarch64 && cd glibc_build_aarch64
@@ -297,7 +368,6 @@ echo "Install mingw-w64 headers"
cd /root
git clone --depth=1 --branch v$MINGW_VERSION https://git.code.sf.net/p/mingw-w64/mingw-w64 mingw-w64-v$MINGW_VERSION
rm -rf mingw-w64-v$MINGW_VERSION/.git
cd mingw-w64-v$MINGW_VERSION/mingw-w64-headers
@@ -348,66 +418,24 @@ gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /usr/local/x86_64-pc-linux
make -j$(nproc)
make install
echo "Get osxcross"
cd /root
git clone --branch 2.0-llvm-based https://github.com/tpoechtrager/osxcross
cd osxcross
git checkout cb444e230e815c06202bef1c30eca5d353235a05
echo "Get MacOSX $MACOSX_SDK_VERSION SDK"
cd /root/osxcross/tarballs
MACOSX_SDK_FILE=MacOSX$MACOSX_SDK_VERSION.sdk.tar.xz
curl -L -O https://github.com/joseluisq/macosx-sdks/releases/download/$MACOSX_SDK_VERSION/$MACOSX_SDK_FILE
MACOSX_SDK_FILE_SHA256="$(sha256sum $MACOSX_SDK_FILE | awk '{ print $1 }')"
if [ $MACOSX_SDK_FILE_SHA256 != $MACOSX_SDK_SHA256 ]; then
echo "Error: SHA256 sum does not match for $MACOSX_SDK_FILE - expected $MACOSX_SDK_SHA256, got $MACOSX_SDK_FILE_SHA256"
exit 1
fi
echo "Build MacOSX cross compilers"
cd /root/osxcross
git checkout cb444e230e815c06202bef1c30eca5d353235a05
TARGET_DIR=/usr/local OSX_VERSION_MIN=10.15 UNATTENDED=1 ./build.sh
./build_compiler_rt.sh
echo "Install FreeBSD $FREEBSD_VERSION SDK"
cd /usr/local
FREEBSD_FILE=base.txz
mkdir cross-freebsd-x86_64 && mkdir cross-freebsd-aarch64
curl -L -Z -o cross-freebsd-x86_64/$FREEBSD_FILE -o cross-freebsd-aarch64/$FREEBSD_FILE https://archive.freebsd.org/old-releases/amd64/$FREEBSD_VERSION-RELEASE/$FREEBSD_FILE https://archive.freebsd.org/old-releases/arm64/$FREEBSD_VERSION-RELEASE/$FREEBSD_FILE
cd /usr/local/cross-freebsd-x86_64
FREEBSD_X86_64_FILE_SHA256="$(sha256sum $FREEBSD_FILE | awk '{ print $1 }')"
if [ $FREEBSD_X86_64_FILE_SHA256 != $FREEBSD_X86_64_SHA256 ]; then
echo "Error: SHA256 sum does not match for $FREEBSD_FILE - expected $FREEBSD_X86_64_SHA256, got $FREEBSD_X86_64_FILE_SHA256"
exit 1
fi
tar -xf $FREEBSD_FILE ./lib/ ./usr/lib/ ./usr/include/
rm $FREEBSD_FILE
#find /usr/local/cross-freebsd-x86_64/usr/lib -xtype l|xargs ls -l|grep ' /lib/'|awk '{print "ln -sf /usr/local/cross-freebsd-x86_64"$11 " " $9}'|/bin/sh
cd /usr/local/cross-freebsd-aarch64
FREEBSD_AARCH64_FILE_SHA256="$(sha256sum $FREEBSD_FILE | awk '{ print $1 }')"
if [ $FREEBSD_AARCH64_FILE_SHA256 != $FREEBSD_AARCH64_SHA256 ]; then
echo "Error: SHA256 sum does not match for $FREEBSD_FILE - expected $FREEBSD_AARCH64_SHA256, got $FREEBSD_AARCH64_FILE_SHA256"
exit 1
fi
tar -xf $FREEBSD_FILE ./lib/ ./usr/lib/ ./usr/include/
rm $FREEBSD_FILE
#find /usr/local/cross-freebsd-aarch64/usr/lib -xtype l|xargs ls -l|grep ' /lib/'|awk '{print "ln -sf /usr/local/cross-freebsd-aarch64"$11 " " $9}'|/bin/sh
@@ -418,7 +446,6 @@ apt-get remove -yq xz-utils
cd /root
git clone --depth=1 --branch v$XZ_VERSION https://github.com/tukaani-project/xz
cd xz
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang
@@ -427,6 +454,16 @@ make -j$(nproc)
cp -f lzma* /usr/bin
cp -f xz* /usr/bin
echo "Install tar"
cd /root
tar xvf $TAR_FILE
cd tar-$TAR_VERSION
FORCE_UNSAFE_CONFIGURE=1 ./configure
make -j$(nproc)
make install
echo "Deleting system glibc files to force our glibc"
rm /usr/lib/x86_64-linux-gnu/crt1.o
@@ -439,9 +476,4 @@ echo "Deleting temporary files"
cd /root
rm -rf *
echo "Cloning the repository"
cd /
git clone --recursive --jobs $(nproc) https://github.com/SChernykh/p2pool
echo "All done"
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_aarch64_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_aarch64_build_$1 .
docker create --name p2pool_ubuntu_aarch64_build_$1_container p2pool_ubuntu_aarch64_build_$1:latest
docker cp p2pool_ubuntu_aarch64_build_$1_container:/p2pool/build/p2pool-$1-linux-aarch64.tar.gz ../p2pool-$1-linux-aarch64.tar.gz
@@ -3,7 +3,7 @@ set -e
cd /p2pool
git fetch --jobs=$(nproc)
git checkout $3
git checkout $2
git submodule update --recursive --jobs $(nproc)
export TZ=UTC0
@@ -22,7 +22,6 @@ flags_p2pool="--target=aarch64-linux-gnu -fuse-ld=lld -Wno-unused-command-line-a
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -38,7 +37,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=aarch64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=aarch64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_riscv64_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_ubuntu_riscv64_build_$1 .
docker create --name p2pool_ubuntu_riscv64_build_$1_container p2pool_ubuntu_riscv64_build_$1:latest
docker cp p2pool_ubuntu_riscv64_build_$1_container:/p2pool/build/p2pool-$1-linux-riscv64.tar.gz ../p2pool-$1-linux-riscv64.tar.gz
@@ -22,7 +22,6 @@ flags_p2pool="--target=riscv64-linux-gnu -fuse-ld=lld -Wno-unused-command-line-a
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -38,7 +37,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/riscv64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=riscv64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/riscv64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=riscv64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_linux_x64_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_linux_x64_build_$1 .
docker create --name p2pool_linux_x64_build_$1_container p2pool_linux_x64_build_$1:latest
docker cp p2pool_linux_x64_build_$1_container:/p2pool/build/p2pool-$1-linux-x64.tar.gz ../p2pool-$1-linux-x64.tar.gz
@@ -22,7 +22,6 @@ flags_p2pool="-fuse-ld=lld -Wno-unused-command-line-argument $flags_size $flags_
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -38,7 +37,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DSTATIC_BINARY=ON -DARCH_ID=x86_64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DSTATIC_BINARY=ON -DARCH_ID=x86_64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
+1 -1
View File
@@ -1,4 +1,4 @@
FROM p2pool_build_ubuntu
ARG P2POOL_VERSION
ADD p2pool_macos_aarch64.sh zutil.patch /p2pool/
ADD p2pool_macos_aarch64.sh /p2pool/
RUN /p2pool/p2pool_macos_aarch64.sh p2pool-${P2POOL_VERSION}-macos-aarch64 ${P2POOL_VERSION}
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_macos_aarch64_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_macos_aarch64_build_$1 .
docker create --name p2pool_macos_aarch64_build_$1_container p2pool_macos_aarch64_build_$1:latest
docker cp p2pool_macos_aarch64_build_$1_container:/p2pool/build/p2pool-$1-macos-aarch64.tar.gz ../p2pool-$1-macos-aarch64.tar.gz
@@ -19,12 +19,9 @@ flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_T
flags_libs="-Os -flto -w $flags_size $flags_datetime"
flags_p2pool="$flags_size $flags_datetime"
patch -u /p2pool/external/src/grpc/third_party/zlib/zutil.h -i /p2pool/zutil.patch
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/macos_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -40,7 +37,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/macos_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_LIBS=ON -DARCH_ID=aarch64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/macos_aarch64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_LIBS=ON -DARCH_ID=aarch64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
-10
View File
@@ -1,10 +0,0 @@
--- zutil.h
+++ zutil.h
@@ -144,7 +144,6 @@
# include <unix.h> /* for fdopen */
# else
# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
# endif
# endif
# endif
+1 -1
View File
@@ -1,4 +1,4 @@
FROM p2pool_build_ubuntu
ARG P2POOL_VERSION
ADD p2pool_macos_x64.sh zutil.patch /p2pool/
ADD p2pool_macos_x64.sh /p2pool/
RUN /p2pool/p2pool_macos_x64.sh p2pool-${P2POOL_VERSION}-macos-x64 ${P2POOL_VERSION}
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_macos_x64_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_macos_x64_build_$1 .
docker create --name p2pool_macos_x64_build_$1_container p2pool_macos_x64_build_$1:latest
docker cp p2pool_macos_x64_build_$1_container:/p2pool/build/p2pool-$1-macos-x64.tar.gz ../p2pool-$1-macos-x64.tar.gz
@@ -19,12 +19,9 @@ flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_T
flags_libs="-Os -flto -w $flags_size $flags_datetime"
flags_p2pool="$flags_size $flags_datetime"
patch -u /p2pool/external/src/grpc/third_party/zlib/zutil.h -i /p2pool/zutil.patch
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/macos_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -40,7 +37,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/macos_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_LIBS=ON -DARCH_ID=x86_64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/macos_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool" -DOPENSSL_NO_ASM=ON -DSTATIC_LIBS=ON -DARCH_ID=x86_64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
-10
View File
@@ -1,10 +0,0 @@
--- zutil.h
+++ zutil.h
@@ -144,7 +144,6 @@
# include <unix.h> /* for fdopen */
# else
# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
# endif
# endif
# endif
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_source_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_source_build_$1 .
docker create --name p2pool_source_build_$1_container p2pool_source_build_$1:latest
docker cp p2pool_source_build_$1_container:/p2pool_source-$1.tar.xz ../p2pool_source-$1.tar.xz
+8 -2
View File
@@ -1,10 +1,16 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
# Example usage: ./build.sh v4.9
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 -t p2pool_windows_x64_build_$1 .
if [ "$2" ]; then
cpu_set="--cpuset-cpus $2"
else
cpu_set=""
fi
docker build $cpu_set --build-arg P2POOL_VERSION=$1 -t p2pool_windows_x64_build_$1 .
docker create --name p2pool_windows_x64_build_$1_container p2pool_windows_x64_build_$1:latest
docker cp p2pool_windows_x64_build_$1_container:/p2pool/build/p2pool-$1-windows-x64.zip ../p2pool-$1-windows-x64.zip
@@ -18,8 +18,8 @@ flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_T
flags_libs="--target=x86_64-pc-windows-gnu -Os -flto -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -w $flags_size $flags_datetime"
flags_p2pool="--target=x86_64-pc-windows-gnu -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument $flags_size $flags_datetime"
flags_cxx_headers="-isystem /usr/local/x86_64-w64-mingw32/include/c++ -isystem /usr/local/x86_64-w64-mingw32/include/c++/15.1.0 -isystem /usr/local/x86_64-w64-mingw32/include"
flags_p2pool="--target=x86_64-pc-windows-gnu -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument -Wno-unknown-attributes $flags_size $flags_datetime"
flags_cxx_headers="-isystem /usr/local/x86_64-w64-mingw32/include/c++ -isystem /usr/local/x86_64-w64-mingw32/include/c++/15.2.0 -isystem /usr/local/x86_64-w64-mingw32/include"
cd /p2pool
git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/boringssl-with-bazel patches/boringssl/win7.patch
@@ -27,7 +27,6 @@ git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_part
cd /p2pool/external/src/curl
cmake . -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=../../../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_libs" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DBUILD_TESTING=OFF -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && cp -f libcurl.a .libs
cd /p2pool/external/src/libuv
rm -rf build
@@ -43,7 +42,7 @@ make -j$(nproc)
cd /p2pool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool $flags_cxx_headers" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=x86_64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_TOOLCHAIN_FILE=../cmake/windows_x86_64_toolchain_clang.cmake -DCMAKE_C_FLAGS="$flags_p2pool" -DCMAKE_CXX_FLAGS="$flags_p2pool $flags_cxx_headers" -DOPENSSL_NO_ASM=ON -DSTATIC_BINARY=ON -DARCH_ID=x86_64 -DGIT_COMMIT="$(git rev-parse --short=7 HEAD)"
make -j$(nproc) p2pool
mkdir $1
+4 -4
View File
@@ -44,16 +44,16 @@ struct BlockCache::Impl : public nocopy_nomove
return;
}
int result = lseek(m_fd, static_cast<off_t>(CACHE_SIZE) - 1, SEEK_SET);
if (result == -1) {
auto result1 = lseek(m_fd, static_cast<off_t>(CACHE_SIZE) - 1, SEEK_SET);
if (result1 == -1) {
LOGERR(1, "lseek failed");
close(m_fd);
m_fd = -1;
return;
}
result = write(m_fd, "", 1);
if (result != 1) {
auto result2 = write(m_fd, "", 1);
if (result2 != 1) {
LOGERR(1, "write failed");
close(m_fd);
m_fd = -1;
+16 -5
View File
@@ -27,7 +27,6 @@
#include "p2pool.h"
#include "side_chain.h"
#include "pool_block.h"
#include "params.h"
#include "merkle.h"
#include <zmq.hpp>
#include <ctime>
@@ -205,7 +204,7 @@ void BlockTemplate::shuffle_tx_order()
}
}
void BlockTemplate::update(const MinerData& data, const Mempool& mempool, const Wallet* miner_wallet)
void BlockTemplate::update(const MinerData& data, const Mempool& mempool, const Wallet& miner_wallet, const Wallet& subaddress)
{
if (data.major_version > HARDFORK_SUPPORTED_VERSION) {
LOGERR(1, "got hardfork version " << data.major_version << ", expected <= " << HARDFORK_SUPPORTED_VERSION);
@@ -270,7 +269,7 @@ void BlockTemplate::update(const MinerData& data, const Mempool& mempool, const
m_blockHeaderSize = m_blockHeader.size();
m_poolBlockTemplate->m_minerWallet = *miner_wallet;
m_poolBlockTemplate->m_minerWallet = miner_wallet;
m_sidechain->fill_sidechain_data(*m_poolBlockTemplate, m_shares);
@@ -591,7 +590,7 @@ void BlockTemplate::update(const MinerData& data, const Mempool& mempool, const
m_poolBlockTemplate->m_transactions.push_back(m_mempoolTxs[m_mempoolTxsOrder[i]].id);
}
m_poolBlockTemplate->m_minerWallet = *miner_wallet;
m_poolBlockTemplate->m_minerWallet = miner_wallet;
// Layout: [software id, version, random number, sidechain extra_nonce]
uint32_t* sidechain_extra = m_poolBlockTemplate->m_sidechainExtraBuf;
@@ -626,6 +625,18 @@ void BlockTemplate::update(const MinerData& data, const Mempool& mempool, const
m_poolBlockTemplate->m_mergeMiningExtra.emplace(c.unique_id, std::move(v));
}
if (subaddress.valid()) {
std::vector<uint8_t> v;
v.reserve(HASH_SIZE + 2);
const hash& key = subaddress.view_public_key();
v.insert(v.end(), key.h, key.h + HASH_SIZE);
v.push_back(0);
v.push_back(0);
m_poolBlockTemplate->m_mergeMiningExtra.emplace(keccak_subaddress_viewpub, std::move(v));
}
init_merge_mining_merkle_proof();
const std::vector<uint8_t> sidechain_data = m_poolBlockTemplate->serialize_sidechain_data();
@@ -854,7 +865,7 @@ void BlockTemplate::select_mempool_transactions(const Mempool& mempool)
k += r / 34359738368ULL;
}
const size_t max_transactions = (MAX_BLOCK_SIZE > k) ? ((MAX_BLOCK_SIZE - k) / HASH_SIZE) : 0;
const uint32_t max_transactions = static_cast<uint32_t>((MAX_BLOCK_SIZE > k) ? ((MAX_BLOCK_SIZE - k) / HASH_SIZE) : 0);
LOGINFO(6, max_transactions << " transactions can be taken with current block size limit");
if (max_transactions == 0) {
+1 -1
View File
@@ -39,7 +39,7 @@ public:
BlockTemplate(const BlockTemplate& b);
BlockTemplate& operator=(const BlockTemplate& b);
void update(const MinerData& data, const Mempool& mempool, const Wallet* miner_wallet);
void update(const MinerData& data, const Mempool& mempool, const Wallet& miner_wallet, const Wallet& subaddress);
uint64_t last_updated() const { return m_lastUpdated.load(); }
bool get_difficulties(const uint32_t template_id, uint64_t& height, uint64_t& sidechain_height, difficulty_type& mainchain_difficulty, difficulty_type& aux_diff, difficulty_type& sidechain_difficulty) const;
+16
View File
@@ -166,6 +166,14 @@ struct alignas(uint64_t) hash
FORCEINLINE hash() : h{} {}
constexpr hash(std::initializer_list<uint8_t> l) : h{} {
auto it = l.begin();
for (size_t i = 0; (i < HASH_SIZE) && (it != l.end()); ++i, ++it) {
h[i] = *it;
}
}
FORCEINLINE bool operator<(const hash& other) const
{
const uint64_t* a = u64();
@@ -496,6 +504,14 @@ struct raw_ip
static_assert(sizeof(raw_ip) == 16, "struct raw_ip has invalid size");
struct MoneroBlockBroadcastHeader
{
uint32_t header_size;
uint32_t miner_tx_size;
};
static_assert(sizeof(MoneroBlockBroadcastHeader) == sizeof(uint32_t) * 2, "struct MoneroBlockBroadcastHeader has invalid size");
void* malloc_hook(size_t n) noexcept;
void* realloc_hook(void* ptr, size_t size) noexcept;
void* calloc_hook(size_t count, size_t size) noexcept;
+2 -3
View File
@@ -91,7 +91,7 @@ ConsoleCommands::ConsoleCommands(p2pool* pool)
rng.discard(10000);
for (int i = 0; i < 10; ++i) {
if (start_listening(false, "127.0.0.1", 49152 + (rng() % 16384))) {
if (start_listening(false, "127.0.0.1", 49152 + static_cast<int>(rng() % 16384))) {
break;
}
}
@@ -293,7 +293,7 @@ static void do_status(p2pool *m_pool, const char * /* args */)
static void do_loglevel(p2pool * /* m_pool */, const char *args)
{
int level = strtol(args, nullptr, 10);
int level = static_cast<int>(strtol(args, nullptr, 10));
level = std::min(std::max(level, 0), log::MAX_GLOBAL_LOG_LEVEL);
log::GLOBAL_LOG_LEVEL = level;
LOGINFO(0, "log level set to " << level);
@@ -388,7 +388,6 @@ static void do_stop_mining(p2pool* m_pool, const char* /*args*/)
static void do_exit(p2pool *m_pool, const char * /* args */)
{
bkg_jobs_tracker->wait();
m_pool->stop();
}
+4 -4
View File
@@ -66,7 +66,7 @@ private:
static RandomBytes* randomBytes = nullptr;
}
} // namespace
static FORCEINLINE bool less32(const uint8_t* k0, const uint8_t* k1)
{
@@ -390,7 +390,7 @@ private:
m_viewTags1[i] = k; \
return; \
} \
else if (t == k) { \
if (t == k) { \
return; \
} \
} while (0)
@@ -481,12 +481,12 @@ void init_crypto_cache()
void destroy_crypto_cache()
{
{
auto p = randomBytes;
auto* p = randomBytes;
randomBytes = nullptr;
delete p;
}
{
auto p = cache;
auto* p = cache;
cache = nullptr;
delete p;
}
+1
View File
@@ -57,6 +57,7 @@ struct parse_wrapper<T, out_type> \
JSON_VALUE_PARSER(String, const char*)
JSON_VALUE_PARSER(String, std::string)
JSON_VALUE_PARSER(Uint, uint8_t)
JSON_VALUE_PARSER(Uint, uint32_t)
JSON_VALUE_PARSER(Uint64, uint64_t)
JSON_VALUE_PARSER(Bool, bool)
+7 -3
View File
@@ -25,7 +25,7 @@ LOG_CATEGORY(JSONRPCRequest)
namespace p2pool {
namespace JSONRPCRequest {
struct CurlContext
struct CurlContext : public nocopy_nomove
{
CurlContext(const std::string& address, int port, const std::string& req, const std::string& auth, const std::string& proxy, bool ssl, const std::string& ssl_fingerprint, CallbackBase* cb, CallbackBase* close_cb, uv_loop_t* loop);
~CurlContext();
@@ -97,6 +97,8 @@ CurlContext::CurlContext(const std::string& address, int port, const std::string
, m_connectedTime(0)
, m_proxy(proxy)
{
BACKGROUND_JOB_START(CurlContext);
m_pollHandles.reserve(2);
{
@@ -124,7 +126,7 @@ CurlContext::CurlContext(const std::string& address, int port, const std::string
m_req.clear();
}
else {
s << "/json_rpc\0";
s << "/json_rpc" << '\0';
}
m_url = buf;
@@ -266,6 +268,8 @@ CurlContext::~CurlContext()
delete m_closeCallback;
curl_slist_free_all(m_headers);
BACKGROUND_JOB_STOP(CurlContext);
}
int CurlContext::on_socket(CURL* /*easy*/, curl_socket_t s, int action)
@@ -481,7 +485,7 @@ void CurlContext::shutdown()
void Call(const std::string& address, int port, const std::string& req, const std::string& auth, const std::string& proxy, bool ssl, const std::string& ssl_fingerprint, CallbackBase* cb, CallbackBase* close_cb, uv_loop_t* loop)
{
if (!loop) {
loop = uv_default_loop();
loop = uv_default_loop_checked();
}
const bool result = CallOnLoop(loop,
+3 -1
View File
@@ -20,7 +20,9 @@
namespace p2pool {
namespace JSONRPCRequest {
typedef Callback<void, const char*, size_t, double>::Base CallbackBase;
typedef Callback<void, const char* /*msg*/, size_t /*msg_size*/, double /*tcp_ping*/>::Base CallbackBase;
FORCEINLINE static constexpr void dummy_callback(const char* /*msg*/, size_t /*msg_size*/, double /*tcp_ping*/) {}
void Call(const std::string& address, int port, const std::string& req, const std::string& auth, const std::string& proxy, bool ssl, const std::string& ssl_fingerprint, CallbackBase* cb, CallbackBase* close_cb, uv_loop_t* loop);

Some files were not shown because too many files have changed in this diff Show More