Compare commits

...

1276 Commits

Author SHA1 Message Date
SChernykh f3d7d6bfe8 p2pool v4.9 2025-07-20 14:35:50 +02:00
SChernykh d3798a1da7 Compiler test scripts: updated to use xz 2025-07-20 07:25:25 +02:00
SChernykh 3bbc0753c6 Build scripts: use clang-21 2025-07-19 22:16:50 +02:00
SChernykh bba9f780bc Updated recommended Monero version 2025-07-19 18:10:47 +02:00
SChernykh 82cab98f2b CI: revert to clang-20 for msan test 2025-07-18 23:39:39 +02:00
SChernykh 9c2bd8292b CI: use clang 21 2025-07-18 18:39:13 +02:00
SChernykh fc1436e86c Build scripts: fixed file permissions 2025-07-18 14:20:35 +02:00
SChernykh c682ad3111 Tari: fixed incorrect block template for stale shares 2025-07-18 12:24:17 +02:00
SChernykh beeba04890 Build scripts: reduced binary sizes 2025-07-16 21:29:10 +02:00
SChernykh 92291c1175 Builds: updated curl command line 2025-07-16 17:41:01 +02:00
SChernykh 56a1a801bf Updated curl to 8.15.0 2025-07-16 08:54:06 +02:00
SChernykh 503fb34c69 Builds: updated curl command line 2025-07-16 00:14:12 +02:00
SChernykh 43ab92472e Updated curl to 8.15.0 2025-07-15 19:43:40 +02:00
SChernykh 0755a9dcf1 CI: updated and repacked test data 2025-07-15 18:22:52 +02:00
SChernykh e62f653b9d Fixed the initial sync stalling sometimes 2025-07-15 16:18:18 +02:00
SChernykh 752d6a9d05 Fixed grpc leak detection 2025-07-15 10:18:04 +02:00
SChernykh e5d582b6c1 Updated grpc 2025-07-14 21:05:56 +02:00
SChernykh 964f4c8065 Updated copyright 2025-07-14 20:30:33 +02:00
SChernykh a8a6b7fd02 Refactored log coloring 2025-07-14 00:21:04 +02:00
SChernykh a37362570d Build scripts: improved compresstion a little 2025-07-13 18:44:28 +02:00
SChernykh 01ae862507 Console: print node overall health in status 2025-07-13 16:45:51 +02:00
SChernykh 81431b12fb CI: fixed cppcheck build 2025-07-12 08:54:11 +02:00
SChernykh 2b46cb937a Fixed MSVC compilation 2025-07-11 21:48:51 +02:00
SChernykh 27a0cc9bb1 Build scripts: use unique names for temp containers 2025-07-11 17:26:51 +02:00
SChernykh 33b8a500fe Fixed cppcheck errors 2025-07-11 14:58:33 +02:00
SChernykh 28511c7e5a Show additional version information 2025-07-11 12:25:09 +02:00
SChernykh 71d07eff63 README.md - added reproducible builds info 2025-07-10 23:12:25 +02:00
SChernykh 81533df789 Release builds: updated clang to 20.1.8 2025-07-09 14:06:42 +02:00
SChernykh 3c28ae9564 Updated miniupnp 2025-07-07 21:29:50 +02:00
SChernykh 24ac83e88b Build scripts: fixed timestamp setting 2025-07-07 16:17:18 +02:00
SChernykh c5b4e84652 Compiler test scripts: added RandomX tests 2025-07-07 10:54:58 +02:00
SChernykh e179208053 Compiler test scripts: added clang 2025-07-06 23:18:55 +02:00
SChernykh 2f51c38549 Added compiler test scripts 2025-07-06 21:59:52 +02:00
SChernykh 5d14b27616 Fixed compiler warnings in tests 2025-07-06 21:52:02 +02:00
SChernykh 2822c6abb5 Build scripts: support building from a tag/commit 2025-07-05 23:13:52 +02:00
SChernykh 758b55f354 Renamed files 2025-07-05 19:39:04 +02:00
SChernykh a01545e42c Build scripts: use the latest mingw 2025-07-05 15:17:37 +02:00
SChernykh 3461872435 Build scripts: fixed Windows 7 compatibility 2025-07-05 12:58:49 +02:00
SChernykh 1957ba519e Added a script to generate sha256sums.txt 2025-07-04 21:24:38 +02:00
SChernykh 83f8b70c9b Build scripts: added source archive 2025-07-04 20:09:01 +02:00
SChernykh 325aca29ce Build scripts: added FreeBSD builds 2025-07-04 14:12:25 +02:00
SChernykh 32235b8225 Build scripts: added MacOS builds 2025-07-03 23:06:40 +02:00
SChernykh e4402845e1 Build scripts: actually disable dynamic nss 2025-07-03 13:01:51 +02:00
SChernykh 8c56e5f079 Build scripts: build glibc with static nss 2025-07-02 12:43:31 +02:00
SChernykh ee0537c0f5 Build scripts: fixed image build errors 2025-07-02 00:12:54 +02:00
SChernykh e2ff0ce0da Build scripts: lock 7-zip version 2025-07-01 16:35:00 +02:00
SChernykh 66dc583130 Build scripts: fixed tar format options 2025-07-01 15:34:57 +02:00
SChernykh 4978cdc9d1 Build scripts: fixed file permissions and archive format 2025-07-01 15:07:29 +02:00
SChernykh 353f22d079 Use mirros site to download glibc 2025-07-01 11:55:10 +02:00
SChernykh fbee340afa Use mirror site to download make 2025-07-01 11:49:04 +02:00
SChernykh ed4d0892d7 Build fixed versions of toolchains to make release builds reproducible 2025-07-01 08:23:20 +02:00
SChernykh db572ce9d8 Scripts to build release binaries without Github CI (WIP) 2025-06-29 11:45:12 +02:00
SChernykh 436b39c6b1 Fixed incorrect hash for stale shares 2025-06-27 07:45:22 +02:00
SChernykh 34820e617f Updated mining instructions 2025-06-26 14:47:15 +02:00
SChernykh 484d34040e Fixed cppcheck errors 2025-06-25 12:07:23 +02:00
SChernykh 06463e3e68 p2pool v4.8.1 2025-06-25 08:03:43 +02:00
SChernykh 52d3454b0f CI: added pruned and compact block blobs test 2025-06-24 23:13:58 +02:00
SChernykh 927258396e Merge pull request #365 from Low-power/update-stratum-hashrate-data-without-connected-workers
Hash rate values in `local/stratum` API file stuck after all workers disconnected
2025-06-24 13:41:15 +02:00
SChernykh b9face492d CI: always save coverage data 2025-06-24 10:36:39 +02:00
WHR d289526f45 Stratum: update hash rate data on new block template, even when no workers connected 2025-06-24 16:32:16 +08:00
SChernykh 1b05f1e750 Block parser: stricter checks 2025-06-24 00:57:13 +02:00
SChernykh 10d583adb6 Added more checks to readVarint 2025-06-23 13:06:01 +02:00
SChernykh 1b863109f9 CI: more tests 2025-06-22 23:18:36 +02:00
SChernykh e5d487aa50 CI: added more tests 2025-06-22 21:58:57 +02:00
SChernykh e69f5722df CI: use clang-20 for code coverage 2025-06-22 17:22:35 +02:00
SChernykh b3678bfbe9 CI: added submit_sidechain_block test 2025-06-22 13:40:00 +02:00
SChernykh 7a82b0fe43 Deploy code coverage report 2025-06-22 11:11:06 +02:00
SChernykh 5aea5768a7 CI: more tests 2025-06-21 16:20:24 +02:00
SChernykh 3f54025384 CI: added more block template tests 2025-06-21 13:16:56 +02:00
SChernykh c421324b73 SideChain: fixed a synchronization blocker bug 2025-06-21 01:06:36 +02:00
SChernykh 0535ca2892 CI: added more tests 2025-06-20 23:30:10 +02:00
SChernykh e68a31f72a CI: added more crypto tests 2025-06-20 22:06:52 +02:00
SChernykh 02533848d2 Updated cppzmq 2025-06-20 19:52:54 +02:00
SChernykh 6cd79b3a48 CI: added more tests to improve code coverage 2025-06-20 19:49:30 +02:00
SChernykh 3d1ef0d049 CI: added code coverage workflow 2025-06-20 18:23:26 +02:00
SChernykh 547b3430c2 CI: added nano sidechain dump to tests 2025-06-20 11:24:49 +02:00
SChernykh 88df27a359 CI: block verify - more tests 2025-06-20 08:33:21 +02:00
SChernykh 7eaef5faca CI: use the latest cppcheck code again 2025-06-18 18:40:32 +02:00
SChernykh 9cb9545ce6 CI: use native runner for Ubuntu ARM64 builds 2025-06-16 17:00:55 +02:00
SChernykh 60285a21dd p2pool v4.8 2025-06-15 09:57:28 +02:00
SChernykh 8f716bd1f1 Merge pull request #363 from Low-power/last-pool-share-found-time-in-local-stratum-api
API: add `last_share_found_time` in `local/stratum`
2025-06-14 12:52:07 +02:00
WHR 009fa0f474 API: add 'last_share_found_time' in local/stratum 2025-06-14 10:26:07 +08:00
SChernykh cea19f1c0d Log: reopen it in the worker thread only
Moved it to the worker thread to contain  it - there is no need to have outside access to its data.
2025-06-12 11:48:55 +02:00
SChernykh 0d0bf9cdee Merge pull request #362 from Low-power/reopen-log-file
Reopening of the log file on SIGUSR1 didn't work as expected
2025-06-11 23:11:32 +02:00
SChernykh c353daeb85 TCPServer: fixed SOCKS5 error checking logic 2025-06-11 20:14:35 +02:00
WHR 865bce5774 Always reopen the log file on SIGUSR1 2025-06-12 00:53:44 +08:00
SChernykh 853b942af7 Console: fixed command length calculation 2025-06-11 16:48:48 +02:00
SChernykh a9d9e1b48a Merge pull request #361 from Low-power/docs-bsd-rc-script
Create document for running P2Pool as a service on FreeBSD
2025-06-11 13:33:23 +02:00
SChernykh 2f06a8b9b8 Fixed build 2025-06-11 12:45:35 +02:00
WHR 197b260d88 Create document for running P2Pool as a service on FreeBSD 2025-06-11 18:38:47 +08:00
SChernykh 26bf2f07a0 Console: don't let random unformatted data end up in the log 2025-06-11 11:49:38 +02:00
SChernykh 09532c901a CMake: removed unused dependencies 2025-06-11 10:22:07 +02:00
SChernykh ab89a3c792 Fixed GCC-8 builds 2025-06-10 22:20:55 +02:00
SChernykh 2fe5dd8a36 Console: don't listen on a TCP port when local API is not enabled 2025-06-10 22:11:26 +02:00
SChernykh 17279708e5 Console: limit access via TCP 2025-06-10 21:51:05 +02:00
SChernykh e577b298b6 CI: fixed MSVC paths 2025-06-10 20:57:01 +02:00
SChernykh d66a2603e3 Merge pull request #360 from Low-power/mebibyte-unit
Correct unit prefix symbol for unit `mebibyte`
2025-06-10 19:30:08 +02:00
SChernykh 8bb317c4b7 CI: added Ubuntu RISC-V build, fixed Windows builds 2025-06-10 19:13:14 +02:00
SChernykh 9ce118ed82 Merge pull request #358 from Low-power/configurable-stratum-ban-time
Make ban time of stratum clients configurable
2025-06-10 18:34:16 +02:00
WHR aa303a96d1 Correct unit prefix symbol for unit 'mebibyte' 2025-06-10 21:16:21 +08:00
WHR 6c4520481b Make ban time of stratum clients configurable via '--stratum-ban-time' option 2025-06-10 20:08:09 +08:00
SChernykh 62707656eb Merge pull request #357 from Low-power/kilohash-per-second-unit
Correct unit prefix symbol for unit `kilohash per second`
2025-06-10 14:06:00 +02:00
WHR 20caceee5d Correct unit prefix symbol for unit 'kilohash per second' 2025-06-10 11:38:25 +08:00
SChernykh 3ac7c0c243 CI: use latest-stable Alpine branch for the RISC-V build 2025-06-09 15:38:37 +02:00
SChernykh ae6a08ee25 Self-test: added more output 2025-06-09 08:35:39 +02:00
SChernykh afa82f4b48 Fixed build 2025-06-08 23:46:10 +02:00
SChernykh e7f87085fb Fixed host ping time calculation when using SOCKS5 proxy 2025-06-08 20:37:55 +02:00
SChernykh 3147a2e968 Fixed build errors 2025-06-06 20:21:47 +02:00
SChernykh 435e6c7599 Tari: added block push via gRPC API 2025-06-06 19:02:08 +02:00
SChernykh ce840733f1 Merge mining: get a new block template immediately after submitting a block. 2025-06-06 12:36:17 +02:00
SChernykh 54d278643d CI: sync test - added merge mining 2025-06-05 23:22:11 +02:00
SChernykh 8d639bfcf2 API: added chain ID to the merge mining data 2025-06-05 11:31:06 +02:00
SChernykh d3026a97b7 API: added merge mining data 2025-06-04 11:46:10 +02:00
SChernykh 77c28df3f0 Updated curl to 8.14.1 2025-06-04 10:09:41 +02:00
SChernykh b06fcc7516 Fix: don't use outdated merge mining data
And warn the user in the log
2025-06-02 14:09:28 +02:00
SChernykh a01ea2d9d8 Updated Monero/P2Pool hardfork info 2025-05-30 14:19:52 +02:00
SChernykh 0d7b110f15 Fix: more robust startup sequence 2025-05-29 17:44:08 +02:00
SChernykh 7cd21f5d0e p2pool v4.7 2025-05-29 13:43:07 +02:00
SChernykh 886da5a73e CI: fixed msys2 clang build 2025-05-29 09:16:03 +02:00
SChernykh bfa30254df Fixed build errors 2025-05-28 20:10:52 +02:00
SChernykh b589d373ea P2Pool-nano: display correct parameters at start-up 2025-05-28 17:47:18 +02:00
SChernykh 8333f7800f P2Pool-nano: fixed sync when using restricted RPC nodes 2025-05-28 17:13:16 +02:00
SChernykh 91fb15e967 Updated curl to 8.14.0 2025-05-28 16:16:12 +02:00
SChernykh e0c1d9377c P2Pool-nano support 2025-05-28 15:04:11 +02:00
SChernykh 3f80244d84 Updated miniupnp 2025-05-27 15:10:51 +02:00
SChernykh 433a1991bc Updated cppzmq 2025-05-27 15:07:40 +02:00
SChernykh 915be9e39f Tari: fixed max gRPC message size 2025-05-27 12:58:54 +02:00
SChernykh b9e415c659 Updated Tari gRPC proto files 2025-05-25 10:07:28 +02:00
SChernykh 1e2e5b85aa CI: don't build extra binaries when building tests 2025-05-23 10:45:40 +02:00
SChernykh 40999f0056 Fix: failure to connect to a node if its domain resolves to an IPv6 address 2025-05-21 10:34:22 +02:00
SChernykh cf51fe5273 p2pool v4.6 2025-05-17 09:05:09 +02:00
SChernykh 3154b61fc6 P2PServer: show protocol version in peer list 2025-05-16 09:40:14 +02:00
SChernykh f9831500e4 Fixed build 2025-05-16 08:11:22 +02:00
SChernykh e9d49b2a1d Added missing #ifdef 2025-05-15 23:21:47 +02:00
SChernykh 5eabfb0a1a Fixed Coverity errors 2025-05-15 22:38:54 +02:00
SChernykh 3fc68e680a Tweaked log messages 2025-05-15 18:43:22 +02:00
SChernykh 1bd9ff1379 Stratum local API: added wallet address 2025-05-15 16:32:44 +02:00
SChernykh 9a0a96f990 Merge pull request #349 from SChernykh/mm_donate
Merge mining donation support
2025-05-15 16:15:06 +02:00
SChernykh 604ef13aa6 Tari merge mining: added more checks 2025-05-15 12:28:07 +02:00
SChernykh 293c6f3930 Updated merge mining docs 2025-05-15 08:27:58 +02:00
SChernykh 1f3872254d Tari: more efficient polling
Use `GetTipInfo` gRPC call to quickly check for changes
2025-05-14 12:47:31 +02:00
SChernykh 27a2461d1d Tari: don't update the aux data too often if only fees change 2025-05-14 09:41:24 +02:00
SChernykh 70298cd065 Merge mining donation support 2025-05-13 17:18:29 +02:00
SChernykh f655fd1e30 Tari: smaller reconnect timeouts 2025-05-11 21:17:29 +02:00
SChernykh 9abe993bb0 Moved GCC 15 fix to flags.cmake 2025-05-07 18:33:30 +02:00
SChernykh 2a30901ba5 Added comments to PoolBlock::get_pow_hash
To explain what looks like a random magic code there
2025-05-07 16:21:27 +02:00
SChernykh 2c29092b7a Updated Tari merge mining docs 2025-05-06 20:02:39 +02:00
SChernykh 7d610f61d5 Sync test: updated Monero nodes 2025-05-04 10:39:48 +02:00
SChernykh 7d632fdc85 More informative main thread name 2025-05-03 17:53:51 +02:00
SChernykh 2416a80642 p2pool v4.5
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (map[flags: os:macos-13]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-10 cpp:g++-10 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-13 cpp:g++-13 flags: os:ubuntu-24.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-14 cpp:g++-14 flags: os:ubuntu-24.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-9 cpp:g++-9 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-24.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled -Wno-error=cpp]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes -Wno-error=cpp]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
2025-05-03 11:06:46 +02:00
SChernykh 779f72a71e Sync test: updated Monero nodes 2025-05-02 07:58:44 +02:00
SChernykh 6483c32c8d Fixed GCC 15 compilation 2025-05-01 17:28:11 +02:00
SChernykh 3f9c622b88 Updated googletest to v1.17.0 2025-05-01 10:09:48 +02:00
SChernykh 68cbf91fc7 Removed msys2 patch (not necessary now) 2025-04-29 11:42:11 +02:00
SChernykh df21dd48af Fixed std::random_device usage 2025-04-29 11:07:03 +02:00
SChernykh 9462f2a85b Updated libuv to v1.51.0 2025-04-25 20:15:59 +02:00
SChernykh 9e37216be2 CI: fixed builds 2025-04-02 11:29:37 +02:00
SChernykh 901b6cb828 Updated curl to 8.13.0 2025-04-02 09:56:45 +02:00
SChernykh 2396725eb8 CI: fixed builds again 2025-04-01 10:31:40 +02:00
SChernykh 11236f7dc8 Fixed sync test with cmake 4.0 2025-03-29 10:21:26 +01:00
SChernykh 8b4b06f1be ZMQ: fixed connect detection
It could give false negative if the connection took >= 1000 ms.
2025-03-22 21:44:07 +01:00
SChernykh 55e12a3715 Fixed unaligned memory accesses 2025-03-20 19:00:02 +01:00
SChernykh a66716c0b1 Log: fixed unsafe read 2025-03-20 11:45:47 +01:00
SChernykh abde2ef1ce CI: updated msan sync test to use clang 20 2025-03-19 16:15:45 +01:00
SChernykh f94d411f3c Updated Tari gRPC proto files 2025-03-19 13:51:53 +01:00
SChernykh 6178277745 Switch to another host during startup if the current host is unavailable 2025-03-19 11:15:41 +01:00
SChernykh a55858b44f More debug thread name fixes 2025-03-16 14:39:56 +01:00
SChernykh 2449366d87 Updated libuv 2025-03-14 10:10:29 +01:00
SChernykh d1dd95d9c9 Set thread names for better debugging 2025-03-13 11:19:58 +01:00
SChernykh 37e8cc01cf Fixed a crash in RISC-V build when huge pages are not available 2025-03-12 15:16:39 +01:00
SChernykh e182c4c992 RandomX self-test: try to allocate using large pages first 2025-03-12 12:23:48 +01:00
SChernykh 71b6b8fdef Updated jinja2 version 2025-03-08 23:21:38 +01:00
SChernykh 860bb7b067 Updated miniupnp 2025-03-05 12:50:21 +01:00
SChernykh 7361ddf24d CI: removed an incorrect parameter for Windows test builds 2025-03-04 13:43:19 +01:00
SChernykh 1a3ce762b3 Fixed slow MSAN debug build 2025-03-04 12:06:42 +01:00
SChernykh d006ac2c6e Better gcc/clang debugging flags 2025-03-04 00:41:07 +01:00
SChernykh 13bd678c03 Correct compiler flags for CMake debug configs 2025-03-02 17:11:09 +01:00
SChernykh 4aef6cf8bb CI: removed deprecated ubuntu-20.04 2025-03-01 20:14:31 +01:00
SChernykh f1c9a1f505 p2pool v4.4
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (map[flags: os:macos-13]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-8 cpp:g++-8 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
2025-03-01 16:13:43 +01:00
SChernykh 6fe6925f23 Fixed cppcheck error 2025-02-26 14:19:02 +01:00
SChernykh 2e14be3534 Update miniupnp 2025-02-24 11:19:13 +01:00
SChernykh f24273378d MSVC build: fixed release compiler flags 2025-02-19 14:24:29 +01:00
SChernykh 5a94840442 MSVC build: don't use prebuilt libcurl 2025-02-19 11:48:31 +01:00
SChernykh 0936d6e4f0 MSVC build: don't use prebuilt libuv and libzmq 2025-02-18 21:21:38 +01:00
SChernykh a80d5eb540 Updated dependencies 2025-02-18 18:54:13 +01:00
SChernykh 6492c6008e CI: use clang-20 2025-02-13 11:25:28 +01:00
SChernykh 9af5dd43ad Updated curl to 8.12.1 2025-02-13 09:21:38 +01:00
SChernykh 3558181a7b Removed deprected --config parameter 2025-02-08 19:18:04 +01:00
SChernykh 37e9c3b8a4 Updated googletest to v1.16.0 2025-02-07 19:18:34 +01:00
SChernykh 3c5c938d40 Updated curl to 8.12.0 2025-02-05 10:41:42 +01:00
SChernykh 02a9ce4ee5 CI: re-enabled cppcheck-ubuntu with faster parameters 2025-02-03 17:24:12 +01:00
SChernykh 9baec059ee CI: disabled cppcheck-ubuntu temporarily 2025-01-31 15:01:19 +01:00
SChernykh e9ab515594 CI: increased cppcheck timeout 2025-01-29 17:33:00 +01:00
SChernykh 07be6a3a81 CI: removed duplicate compiler flag 2025-01-28 14:07:08 +01:00
SChernykh 06aa632e6f Docs: clarify --rpc-ssl-fingerprint usage 2025-01-28 10:54:21 +01:00
SChernykh 9ce9516c99 Added RPC-SSL support for Monero node connections 2025-01-27 22:32:28 +01:00
SChernykh 16053d45d7 Updated libuv to v1.50.0 2025-01-15 20:07:35 +01:00
SChernykh b39a9bd3ca Update miniupnp 2025-01-11 10:38:41 +01:00
SChernykh a60584e9ec p2pool v4.3
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-8 cpp:g++-8 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (map[flags: os:macos-13]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
2024-12-30 12:33:51 +01:00
SChernykh 00b6dabc78 API: added ZMQ last active to local/p2p 2024-12-29 16:19:18 +01:00
SChernykh 0d33214557 Documentation: removed #monero-pools channel 2024-12-29 12:43:06 +01:00
SChernykh d68afc1868 Updated jinja2 version 2024-12-25 19:31:28 +01:00
SChernykh e95cc65c43 Fixed cppcheck errors 2024-12-24 10:26:47 +01:00
SChernykh 8cc49350f8 Merge pull request #326 from David-Moody/master
Fix stop signal for stats container
2024-12-20 19:39:51 +01:00
David Moody 5bd55a5ec6 fix stop signal for stats container 2024-12-20 13:27:11 +00:00
SChernykh dd2812f1e5 Fixed data race 2024-12-17 16:19:40 +01:00
SChernykh 92dfde8a3e Stratum: fixed TLS display in workers command 2024-12-17 15:41:55 +01:00
SChernykh 6dcdbe0f15 Stratum: display stratum shares separately
To avoid confusion between P2Pool shares and Stratum shares.
2024-12-17 15:09:39 +01:00
SChernykh dd7e2a477f Renamed --config command line parameter 2024-12-17 14:36:40 +01:00
SChernykh a4459d6207 Added a command line parameter to disable Stratum HTTP 2024-12-17 11:39:49 +01:00
SChernykh 2581b4c2da Updated curl to 8.11.1 2024-12-11 08:41:44 +01:00
SChernykh 28ee73b9e4 Update check_win7.py 2024-12-05 10:52:04 +01:00
SChernykh 4b18bb6ea4 Try to create the data dir if it doesn't exist 2024-12-04 19:41:05 +01:00
SChernykh 921611ff4d Added --data-dir command line option 2024-12-04 15:39:19 +01:00
SChernykh fb8e2a71e0 Fixed global init/shutdown order 2024-12-04 14:30:20 +01:00
SChernykh ecdaa83669 CI: always save cppcheck files 2024-12-02 21:46:59 +01:00
SChernykh cf325e0e76 Updated rapidjson 2024-12-02 17:44:08 +01:00
SChernykh 94da2e8dff Fixed cppcheck errors 2024-12-01 15:31:43 +01:00
SChernykh 8071ff985f CI: increased cppcheck timeout 2024-12-01 09:44:27 +01:00
SChernykh a365cfca31 Fixed cppcheck macros for Linux 2024-11-30 17:01:44 +01:00
SChernykh d7cd9d24fc Fixed cppcheck errors 2024-11-30 12:28:31 +01:00
SChernykh 7b1b526988 Fixed cppcheck macros for Linux 2024-11-29 22:10:00 +01:00
SChernykh 86962eb7aa Fixed a bug with Letsencrypt certs
One of internal buffers was too small
2024-11-27 19:49:05 +01:00
SChernykh 1029faa02f Refactor PoolBlock's lock code 2024-11-23 13:20:47 +01:00
SChernykh 4a9ccaa62d Fixed macOS sync test 2024-11-23 13:02:44 +01:00
SChernykh fd0a7ea0c7 Faster initial sync
0.5-1 seconds saved on verification after removing the repeated `get_shares` calls
2024-11-22 18:42:51 +01:00
SChernykh c0d1070395 Update miniupnp 2024-11-17 10:09:29 +01:00
SChernykh 180b7edd77 Fixed Windows compilation 2024-11-16 15:18:34 +01:00
SChernykh 09f5a89a12 Revert "CI: use macos-15"
This reverts commit b1d59a6def.
2024-11-12 11:18:40 +01:00
SChernykh b1d59a6def CI: use macos-15 2024-11-12 10:17:59 +01:00
SChernykh 3be1d87462 Updated curl to 8.11.0 2024-11-06 11:04:27 +01:00
SChernykh 8fa00efa7b Check for missing Monero seed height blocks 2024-11-04 18:37:14 +01:00
SChernykh 18b280ed1d Update version to 4.2
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-8 cpp:g++-8 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (map[flags: os:macos-13]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2024-11-01 09:07:17 +01:00
SChernykh 996bb1baba Fixed compilation error 2024-10-31 18:51:05 +01:00
SChernykh a3006cb51a Stratum: check found P2Pool shares one at a time
Parallel checks could result in a deadlock
2024-10-31 17:18:24 +01:00
SChernykh 031a1c2eea SideChain: more fine-grained locks 2024-10-29 12:36:39 +01:00
SChernykh 3c4cf098a9 CMake: added DEV_DEBUG option 2024-10-29 11:33:46 +01:00
SChernykh c9193c53d9 Init P2P server before Stratum server (fixed a data race) 2024-10-23 18:41:18 +02:00
SChernykh 831edc465a Merge pull request #321 from z80-asm/patch-1
fix: docker version check in docker-compose configure
2024-10-23 17:11:56 +02:00
MontyDev eb8ac56cf6 fix: docker version check 2024-10-22 21:30:15 +01:00
SChernykh 8daa05bab2 Updated libuv to v1.49.2 2024-10-18 21:32:22 +02:00
SChernykh 02006e1b50 Stratum: disconnect miners when not connected to P2Pool network 2024-10-18 21:23:51 +02:00
SChernykh fb78eb615b CI: save a minidump if it hangs on panic stop 2024-10-17 16:18:00 +02:00
SChernykh 2b453dd0cb CI: use clang-19 2024-10-15 14:49:33 +02:00
SChernykh 510a271434 Added an error code to some error messages 2024-10-14 12:23:12 +02:00
SChernykh 1053e22a52 Removed hardfork code 2024-10-13 14:17:37 +02:00
SChernykh c88f126cb1 Updated tests post-fork 2024-10-13 13:13:14 +02:00
SChernykh 61bb862cdb Updated Tari merge mining information 2024-10-12 22:39:10 +02:00
SChernykh 2586290a1d Updated libuv to v1.49.1 2024-10-11 10:24:01 +02:00
SChernykh d6c9c931fd Fixed a data race when using UV loop data 2024-10-10 14:46:15 +02:00
SChernykh 210ae3f9df Fixed Windows 7 compatibility 2024-10-01 11:29:18 +02:00
SChernykh 4dfdaf5447 Update version to 4.1.1
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-Og -ftrapv -target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-Og -ftrapv os:macos-13]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-8 cpp:g++-8 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-msan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-asan (push) Has been cancelled
Sync test (old) / sync-test-macos (map[flags:-Og -ftrapv -target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test (old) / sync-test-macos (map[flags:-Og -ftrapv os:macos-13]) (push) Has been cancelled
Sync test (old) / sync-test-windows-debug-asan (push) Has been cancelled
Sync test (old) / sync-test-windows-leaks (push) Has been cancelled
2024-09-30 12:44:08 +02:00
SChernykh a1f1719f3b Updated libuv to v1.49.0 2024-09-25 12:08:16 +02:00
SChernykh d17608e631 Updated curl to 8.10.1 2024-09-18 10:51:47 +02:00
SChernykh 38211932dc Single code path for curl timer callbacks 2024-09-12 17:33:08 +02:00
SChernykh bc2b3fa3ac Reapply "Updated curl to 8.10.0"
This reverts commit 56f42e0018.
2024-09-12 17:30:17 +02:00
SChernykh 56f42e0018 Revert "Updated curl to 8.10.0"
This reverts commit 25452898d9.
2024-09-11 17:52:49 +02:00
SChernykh 25452898d9 Updated curl to 8.10.0 2024-09-11 14:55:11 +02:00
SChernykh ad08f8b117 Updated grpc (boringssl-with-bazel) 2024-09-06 15:04:43 +02:00
SChernykh 93062e4341 Stratum: fixed response to HTTP GET/HEAD requests 2024-09-04 21:43:18 +02:00
SChernykh 314d306145 Update COMMAND_LINE.MD 2024-09-04 21:20:04 +02:00
SChernykh a003486b4a Stratum: fixed an unaligned memory read 2024-09-01 00:08:45 +02:00
SChernykh ab6b08404a Updated recommended Monero version 2024-08-30 11:48:01 +02:00
SChernykh 1a75b201fd Stratum: don't show the shutdown warning for low diff shares 2024-08-25 11:53:20 +02:00
SChernykh bbc36c3869 Updated grpc to v1.65.5 2024-08-21 22:10:10 +02:00
SChernykh bf1a09097f JSON RPC: fixed memory leak after an error 2024-08-13 15:06:35 +02:00
SChernykh f3e96d7138 Update version to 4.1.0
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-8 cpp:g++-8 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2019 rx:ON tls:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON tls:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-msan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-asan (push) Has been cancelled
Sync test (old) / sync-test-macos (map[flags:-Og -ftrapv -target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test (old) / sync-test-macos (map[flags:-Og -ftrapv os:macos-13]) (push) Has been cancelled
Sync test (old) / sync-test-windows-debug-asan (push) Has been cancelled
Sync test (old) / sync-test-windows-leaks (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-Og -ftrapv -target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-Og -ftrapv os:macos-13]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2024-08-12 17:24:50 +02:00
SChernykh 2b47218406 API: filter out unnecessary updates 2024-08-12 00:47:27 +02:00
SChernykh c49f12b41d ZMQ: bind to random port for internal messages 2024-08-10 20:19:15 +02:00
SChernykh 2eea660184 New merge mining test 2024-08-09 15:56:32 +02:00
SChernykh 4b1c077b4a Fixed Coverity error 2024-08-09 13:04:29 +02:00
SChernykh de25ef0162 Merge remote-tracking branch 'origin/tls' 2024-08-08 20:02:52 +02:00
SChernykh ad49afb34b Stratum: detect HTTP and send a response 2024-08-08 18:31:17 +02:00
SChernykh 8aad4a16b3 CI: use TLS in sync test 2024-08-08 14:40:50 +02:00
SChernykh 8960365f82 TLS: added command line to load certificate files 2024-08-07 21:21:24 +02:00
SChernykh c967c84e0e Allow TLS support without GRPC 2024-08-06 18:42:00 +02:00
SChernykh 61cc29a260 Updated grpc to v1.65.4 2024-08-06 10:28:50 +02:00
SChernykh cb3b4de1a5 Update miniupnp 2024-08-06 09:00:50 +02:00
SChernykh 127dcc04bf Stratum: added TLS support 2024-08-05 22:39:28 +02:00
SChernykh cb8ea37dab Updated curl to 8.9.1 2024-07-31 10:19:04 +02:00
SChernykh ebb6fe6942 Don't use -Ofast flag
clang will deprecate it soon
2024-07-28 19:48:15 +02:00
SChernykh eb490d89c2 Updated curl to 8.9.0 2024-07-24 09:38:57 +02:00
SChernykh 64a199be6d Stratum: fixed starting diff calculation 2024-07-23 13:32:43 +02:00
SChernykh b01ba2e116 JSON RPC API: stop polling when shutting down 2024-07-23 10:41:00 +02:00
SChernykh 0bada79b6b Fixed an occasional deadlock on exit with merge mining active 2024-07-22 00:16:41 +02:00
SChernykh 8894da4f93 Fixed handle leak 2024-07-21 11:58:21 +02:00
SChernykh 37bf8554fc CI: save a minidump if it hangs on shutdown 2024-07-20 19:55:49 +02:00
SChernykh ce6553863a Updated googletest to v1.15.0 2024-07-15 21:32:40 +02:00
SChernykh b16cf00dae Stratum: faster JSON parsing 2024-07-01 23:29:39 +02:00
SChernykh 17de2ff4bc More info about merge mining
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 flags: os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-8 cpp:g++-8 flags: os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:OFF os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[grpc:ON os:2022 rx:ON upnp:ON vs:Visual Studio 17 2022 vspath:C:\Program Files\Microsoft Visual Studio\2022\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-latest name:freebsd version:13.3]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-latest name:openbsd version:7.4]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-msan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test (old) / sync-test-ubuntu-asan (push) Has been cancelled
Sync test (old) / sync-test-macos (map[flags:-Og -ftrapv -target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test (old) / sync-test-macos (map[flags:-Og -ftrapv os:macos-13]) (push) Has been cancelled
Sync test (old) / sync-test-windows-debug-asan (push) Has been cancelled
Sync test (old) / sync-test-windows-leaks (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-Og -ftrapv -target arm64-apple-macos-11 os:macos-14]) (push) Has been cancelled
Sync test / sync-test-macos (map[flags:-Og -ftrapv os:macos-13]) (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2024-06-30 17:51:03 +02:00
SChernykh 0b079228d9 Updated grpc to v1.65.0 2024-06-29 11:39:03 +02:00
SChernykh 82edb263f8 Update COMMAND_LINE.MD 2024-06-28 12:19:44 +02:00
SChernykh 477ab117fc Updated command line docs
Also updated nodes for sync test
2024-06-27 17:16:27 +02:00
SChernykh b5558baa4c More tests, code cleanup 2024-06-26 11:25:21 +02:00
SChernykh 75a894bbd1 Update miniupnp 2024-06-25 11:43:22 +02:00
SChernykh 24f2ed2f81 Fixed Coverity errors 2024-06-23 23:51:47 +02:00
SChernykh a75cf652de CI: enabled scheduled sync tests 2024-06-20 18:47:58 +02:00
SChernykh 12deaff85f Mainnet fork on October 12 2024-06-20 10:59:27 +02:00
SChernykh caed7f9493 Update version to 4.0.0 2024-06-19 10:44:09 +02:00
SChernykh 2cbb648a7f CI: update curl build command lines 2024-06-18 20:16:54 +02:00
SChernykh 245e6fd9e8 Fix: init Merkle tree before selecting txs 2024-06-18 18:27:07 +02:00
SChernykh 3ce57ec254 Second merge mining test 2024-06-17 10:36:36 +02:00
SChernykh 5b3c1d749c Added merge mining extra
For future merge mining needs
2024-06-16 22:42:22 +02:00
SChernykh 180766f9aa Update RandomX 2024-06-15 21:11:08 +02:00
SChernykh 955a471747 Updated gRPC to v1.65.x 2024-06-12 21:16:54 +02:00
SChernykh ff7d92c731 Disable debug checks in release builds 2024-06-11 20:33:20 +02:00
SChernykh 5e8da4e672 Fixed merge mining with multiple chains 2024-06-11 18:40:30 +02:00
SChernykh 8fc5e5013c Fix: update peer height on block notify 2024-06-09 21:21:52 +02:00
SChernykh b92eedeed7 Set testnet fork time 2024-06-05 19:08:14 +02:00
SChernykh a188ca7fad Fixed CI errors 2024-06-03 21:11:16 +02:00
SChernykh 9cd9055913 Print merge mining status 2024-06-03 17:31:18 +02:00
SChernykh 4bc0b559cb Block parser: sanity check minor version 2024-06-03 11:29:01 +02:00
SChernykh 9a9f6379cd Tweaked software version display
GoObserver will have the same version format
2024-06-03 11:10:38 +02:00
SChernykh 7293e37165 More hardfork code
All block format changes must be a part of hardfork
2024-06-03 10:59:57 +02:00
SChernykh 403a39d32f Sync test: detect integer overflows 2024-06-02 20:04:18 +02:00
SChernykh fb87e01986 Fixed keccak_bmi.cpp compilation without RandomX 2024-05-31 11:40:35 +02:00
SChernykh bd6f68790e Faster Keccak code (BMI instructions) 2024-05-31 00:39:11 +02:00
SChernykh 33e1ebd3fe Calculate hashing blobs in parallel
Improved performance with high number of connected miners.
2024-05-30 16:53:32 +02:00
SChernykh 9a2cab4b5e Fixed a Coverity warning 2024-05-29 13:32:11 +02:00
SChernykh 70e889ebdb Fixed software version display 2024-05-29 10:47:03 +02:00
SChernykh 59b693d2f3 P2Pool version: add patch number 2024-05-28 22:41:37 +02:00
SChernykh c96e7323cc Miner: fix displayed difficulty for found aux blocks 2024-05-24 18:32:03 +02:00
SChernykh 4acc9d09b8 JSON RPC API: added seed_hash
It is required to verify RandomX PoW
2024-05-24 17:05:50 +02:00
SChernykh d0107ed148 Fixed block template generation
Mining with `--merge-mining` in the command line but with merge mining disabled was broken
2024-05-23 22:17:39 +02:00
SChernykh 3d85ee847c Merge branch 'master' into merge-mining 2024-05-23 19:10:00 +02:00
SChernykh 10c2d334f8 Updated Monero nodes 2024-05-23 17:12:14 +02:00
SChernykh 82d9d75a78 Updated Monero nodes 2024-05-23 17:10:31 +02:00
SChernykh 23ba77ee4d Updated dependencies 2024-05-23 15:37:39 +02:00
SChernykh 460b09e70b Updated curl to 8.8.0 2024-05-23 11:27:23 +02:00
SChernykh b07e8813c6 Tari: call SubmitBlock RPC in background
to avoid stalling the main thread
2024-05-23 00:16:13 +02:00
SChernykh 406aa72112 Merge branch 'master' into merge-mining 2024-05-22 16:21:46 +02:00
SChernykh 9fd85942e0 Fixed cppcheck error 2024-05-22 16:18:40 +02:00
SChernykh 5e7d48e70c Fix: don't call update_block_template twice 2024-05-22 15:27:23 +02:00
SChernykh fb9ade7e9f CI: fix BSD builds 2024-05-21 01:26:49 +02:00
SChernykh 2b7febf5d0 Fixed cppcheck error 2024-05-20 19:17:19 +02:00
SChernykh 710f6c2eb7 Submit merge mined blocks asynchronously 2024-05-20 15:22:03 +02:00
SChernykh b0a63e2d34 Update grpc 2024-05-20 00:25:01 +02:00
SChernykh 84b656ebbd Merge branch 'master' into merge-mining 2024-05-18 18:38:26 +02:00
SChernykh 7bd824bae3 CI: updated nodes for sync test 2024-05-18 11:33:40 +02:00
SChernykh e7ce5d044d CI: updated nodes for sync test 2024-05-18 11:25:19 +02:00
SChernykh 1c2939e8b2 CI: macos-11 is deprecated, use macos-13 2024-05-17 10:19:02 +02:00
SChernykh 9c3b8ef3a7 CI: New config for the sync test 2024-05-17 00:54:35 +02:00
SChernykh 08384156e4 Better API name, added API descriptions 2024-05-16 18:10:04 +02:00
SChernykh d219b78d4c CI: added MSVC 2022 build 2024-05-16 15:55:40 +02:00
SChernykh d40b3ddfab Fixed gcc-14 msys2 build 2024-05-16 12:37:17 +02:00
SChernykh 2c549f61a4 Create test-sync-old.yml 2024-05-14 23:43:49 +02:00
SChernykh 899a908409 Added hardfork code 2024-05-14 22:48:59 +02:00
SChernykh 21326c5103 Merkle trees: added get_position_from_path
Also double check against Monero's Merkle tree path code.
2024-05-14 19:37:38 +02:00
SChernykh ae1907816e CI: don't build curl tests 2024-05-14 12:11:16 +02:00
SChernykh 5063ace6bf Merge branch 'master' into merge-mining 2024-05-14 11:45:40 +02:00
SChernykh e05ece5ad7 Update libuv 2024-05-14 11:44:41 +02:00
SChernykh a25b5c9713 Tari: fixed pow_data generation 2024-05-11 18:58:53 +02:00
SChernykh c09da948fe Merge branch 'master' into merge-mining 2024-05-11 11:50:34 +02:00
SChernykh 0fe44256b9 Update curl 2024-05-11 11:47:15 +02:00
SChernykh fe19402218 Tari: enabled submit block gRPC call 2024-05-10 20:01:10 +02:00
SChernykh be1445d7b5 Added Merkle proof's path bitmap to JSON RPC API 2024-05-10 16:53:47 +02:00
SChernykh 27f644fc1c Update grpc 2024-05-10 15:54:44 +02:00
SChernykh f67009f133 Added path bitmap to get_merkle_proof 2024-05-10 15:34:30 +02:00
SChernykh e986e5dc2e Tari: Added coinbase_merkle_proof to pow_data 2024-05-10 13:56:28 +02:00
SChernykh d6364709ca Fixed cppcheck errors 2024-05-10 00:09:53 +02:00
SChernykh e07d37ede8 Fixed overflow check 2024-05-09 21:55:30 +02:00
SChernykh f270b979c8 Fix: use correct nonce value 2024-05-09 20:47:26 +02:00
SChernykh fd953a0b26 Tari: serialize pow_data WIP 2024-05-09 20:35:41 +02:00
SChernykh 258c93e661 Merge branch 'master' into merge-mining 2024-05-07 17:09:14 +02:00
SChernykh e3ce482ede Updated jinja2 version 2024-05-07 17:08:51 +02:00
SChernykh e8d800b433 Tari: submit block code WIP 2024-04-30 23:15:34 +02:00
SChernykh a5f3e1e2ee Tari: fill in merge mining hash and difficulty 2024-04-29 21:59:44 +02:00
SChernykh 5f62069590 CI: cppcheck script fixes 2024-04-25 19:57:23 +02:00
SChernykh 4d04e9e2bd Merge branch 'master' into merge-mining 2024-04-25 15:10:06 +02:00
SChernykh bbddf40590 Fixed cppcheck error 2024-04-25 14:48:34 +02:00
SChernykh f4ed9e9840 CI: fixed cppcheck for Windows 2024-04-25 11:46:59 +02:00
SChernykh 2085bb454b Tari: use GetNewBlockTemplateWithCoinbases API 2024-04-23 21:31:40 +02:00
SChernykh 313a099a4b Added missing newline 2024-04-23 18:59:04 +02:00
SChernykh c3add767be Merge branch 'master' into merge-mining 2024-04-23 18:43:35 +02:00
SChernykh 6dd72dfcd5 Fixed a rare crash on shutdown 2024-04-23 18:40:15 +02:00
SChernykh b3f562caab Added sanity checks for height and difficulty 2024-04-23 18:29:19 +02:00
SChernykh a847baf331 Revert "Fixed include paths"
This reverts commit 1b0103c119.
2024-04-23 18:10:09 +02:00
SChernykh 929e1ca01c Updated Tari protocol definitions
Also removed mining helper binaries
2024-04-22 20:32:26 +02:00
SChernykh 1b0103c119 Fixed include paths 2024-04-11 20:41:20 +02:00
SChernykh d6d9b5bc22 Updated Tari protocol definitions 2024-04-11 18:04:10 +02:00
SChernykh ad04fd13ae Merge branch 'master' into merge-mining 2024-04-03 11:40:30 +02:00
SChernykh adf3f5df19 Use 500k starting difficulty for autodiff 2024-04-03 10:58:35 +02:00
SChernykh 6ecdf1af57 Merge branch 'master' into merge-mining 2024-03-20 16:48:42 +01:00
SChernykh dd17372ec0 CI: fixed crashing msys2 clang build 2024-03-20 16:11:00 +01:00
SChernykh 38d900ba83 Merge branch 'master' into merge-mining 2024-03-19 23:53:03 +01:00
SChernykh b786271ce7 Fixed clang-18 compilation 2024-03-19 23:40:43 +01:00
SChernykh 64dc1c7ea7 Merge branch 'master' into merge-mining 2024-03-19 17:43:30 +01:00
SChernykh 43e814ce9a CI: use clang-18 for MSan 2024-03-19 17:24:28 +01:00
SChernykh 5f6a655ff9 Merge branch 'master' into merge-mining 2024-03-14 10:57:00 +01:00
SChernykh e4cfcc1dd9 Sync test: possible fix for sanitizer errors 2024-03-14 09:26:20 +01:00
SChernykh 8bb3e54689 Added mining helper lib 2024-03-12 12:47:33 +01:00
SChernykh 52b7c4fb25 Merge branch 'master' into merge-mining 2024-03-07 18:42:45 +01:00
SChernykh 29d84e3bcf Fixed data race in tx mempool 2024-03-07 17:48:49 +01:00
SChernykh d4a3bc0e20 Fixed cppcheck errors 2024-02-25 00:48:51 +01:00
SChernykh 45dabd8ddb Merge branch 'master' into merge-mining 2024-02-24 19:11:52 +01:00
SChernykh e82fe8cdc1 Fixed cppcheck errors 2024-02-24 10:02:50 +01:00
SChernykh 58dc32dd97 Tari poll loop - bring two exit checks together 2024-02-19 10:10:51 +01:00
SChernykh 6f22dfca11 Fixed a deadlock on shutdown 2024-02-18 17:46:47 +01:00
SChernykh 785aaec4c3 Added Tari node polling 2024-02-18 00:06:07 +01:00
SChernykh bbfe3d84b7 Build fixes 2024-02-15 21:06:32 +01:00
SChernykh dbb21151b0 Tari: connect to a node and get unique_id 2024-02-15 17:47:05 +01:00
SChernykh cf165af025 CI: faster builds
Update c-cpp.yml
2024-02-13 19:40:39 +01:00
SChernykh b99b1689b7 Fixed compiler flags 2024-02-13 18:03:31 +01:00
SChernykh 3d9a81108d Update grpc to v1.61.1 2024-02-13 13:51:17 +01:00
SChernykh 75140a0ec6 Merge branch 'master' into merge-mining 2024-02-13 08:14:25 +01:00
SChernykh f370c93e1f Update c-cpp.yml 2024-02-12 23:10:49 +01:00
SChernykh a5f8d4198b Added ignore paths to msvc analysis 2024-02-12 15:29:42 +01:00
SChernykh 9289a8c40c CI: use macos-14 (Apple M1) runners 2024-02-12 14:48:45 +01:00
SChernykh ec15b3b673 More CI fixes 2024-02-12 11:19:59 +01:00
SChernykh 8eb5f86e9a Fixed cppcheck error 2024-02-12 09:45:02 +01:00
SChernykh d28090f292 More CI fixes 2024-02-12 07:50:24 +01:00
SChernykh 30df7419b7 Updated gRPC 2024-02-12 01:08:04 +01:00
SChernykh cfc3ba4b51 Fixed msys2 builds 2024-02-11 22:49:45 +01:00
SChernykh 3327e7f54a Fixed MSVC builds 2024-02-11 19:11:13 +01:00
SChernykh 6263c0bbda Fixed CI errors 2024-02-11 15:17:34 +01:00
SChernykh 0801d607a1 Added gRPC library 2024-02-10 23:38:22 +01:00
SChernykh 2ff6fb7b65 Updated libuv to v1.48 2024-02-08 14:31:06 +01:00
SChernykh fdb2ab19ab Added Tari gRPC client stub 2024-02-06 21:04:19 +01:00
SChernykh 9b15e8179f Merge mining client interface 2024-02-05 20:34:48 +01:00
SChernykh 2660d9dd0f Merge branch 'master' into merge-mining 2024-02-04 00:20:14 +01:00
SChernykh a92ca028b1 Exit early if command line is invalid 2024-02-04 00:19:37 +01:00
SChernykh 159b54e943 Updated curl 2024-02-02 17:58:28 +01:00
SChernykh 2df53839d9 Update cppcheck.yml 2024-02-01 12:47:44 +01:00
SChernykh 94496c3dde Merge branch 'master' into merge-mining 2024-01-31 20:01:13 +01:00
SChernykh 8a2a9a99a9 Fixed cppcheck error 2024-01-31 20:00:55 +01:00
SChernykh 6d39ea4696 Changed protobuf to protobuf-c
To reduce code bloat
2024-01-29 17:45:15 +01:00
SChernykh 373182024a Updated Tari protocol definitions 2024-01-29 14:24:04 +01:00
SChernykh 0d8610815a Updated dependencies 2024-01-29 13:48:12 +01:00
SChernykh 7255578936 Update protobuf 2024-01-28 21:05:02 +01:00
SChernykh 39e411c2e1 Update miniupnp 2024-01-28 19:54:35 +01:00
SChernykh 8628dc9141 Updated protobuf to 26.x 2024-01-28 17:28:46 +01:00
SChernykh a60fba8c18 Added Tari gRPC definitions 2024-01-28 10:41:16 +01:00
SChernykh ab747d66ac Update c-cpp.yml 2024-01-26 20:37:48 +01:00
SChernykh 7a0a8b94fe Merge branch 'master' into merge-mining 2024-01-26 18:56:22 +01:00
SChernykh aacee86563 CI: updated to newer tool versions 2024-01-26 18:10:27 +01:00
SChernykh 08fb0ecb53 Updated jinja2 version 2024-01-11 20:55:55 +01:00
SChernykh e1f847bc20 Merge branch 'master' into merge-mining 2024-01-10 18:00:08 +01:00
SChernykh ec15417fd2 More C++17 2024-01-05 14:36:35 +01:00
SChernykh 010bdda236 C++17 2024-01-04 16:56:52 +01:00
SChernykh 3797f017e9 p2pool v3.10
C/C++ CI / build-alpine-static (map[arch:aarch64 branch:latest-stable flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:riscv64 branch:edge flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 branch:latest-stable flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:13.2]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2024-01-04 09:29:53 +01:00
SChernykh 8c74532f27 Merge pull request #297 from gador/add-miner-stats
add miner stats to web server output
2024-01-02 14:57:46 +01:00
SChernykh 891f7f0a0e Updated copyright 2024-01-02 14:28:00 +01:00
SChernykh f95d366881 Merge branch 'master' into merge-mining 2024-01-02 14:26:32 +01:00
SChernykh 1e1c3ad6e9 Updated copyright 2024-01-02 14:12:16 +01:00
Florian Brandes 71da808969 sort by hashrate
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2024-01-01 15:23:39 +01:00
Florian Brandes 0db8dc2433 add miner stats to web server output
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2024-01-01 11:52:23 +01:00
SChernykh 94c8ac09bc Merge branch 'master' into merge-mining 2023-12-27 18:16:34 +01:00
SChernykh 36a6e8dcbe Added RISC-V build 2023-12-27 17:42:45 +01:00
SChernykh 1729b51868 Merge mining API: added a check for the result field 2023-12-26 20:28:30 +01:00
SChernykh 896eac6d8c Force debug checks 2023-12-25 20:34:18 +01:00
SChernykh 6eb83dc891 Cache find_aux_nonce to save CPU time 2023-12-25 15:53:01 +01:00
SChernykh 15f4761108 Merge branch 'master' into merge-mining 2023-12-23 20:09:06 +01:00
SChernykh f98d2e652a Fixed cppcheck errors 2023-12-23 19:22:06 +01:00
SChernykh c28021b5a4 Merge branch 'master' into merge-mining 2023-12-23 19:07:04 +01:00
SChernykh bc36be1e58 Fixed block broadcast detection
Peers could ban each other erroneously for "not broadcasting blocks"
2023-12-23 19:06:18 +01:00
SChernykh f7a2a6fe07 Fixed block broadcasts 2023-12-23 15:19:25 +01:00
SChernykh df2a81d76d Fixed cppcheck errors 2023-12-23 11:22:03 +01:00
SChernykh 1d4aa3478d cppcheck: save checkers report 2023-12-23 11:04:54 +01:00
SChernykh 3c510598fa Better type checking for Merkle root hashes 2023-12-23 10:17:49 +01:00
SChernykh c4153a9a2a Merge branch 'master' into merge-mining 2023-12-22 12:01:58 +01:00
SChernykh ae233bbf0b Fixed BLOCK_FOUND detection 2023-12-22 11:50:08 +01:00
SChernykh e44df03d82 Fixed cppcheck test 2023-12-20 17:43:36 +01:00
SChernykh 18e5e6ab0f Merge branch 'master' into merge-mining 2023-12-11 17:30:32 +01:00
SChernykh c61ca959b2 Sync test: run until fully synced
Old shortcut is not needed anymore
2023-12-11 11:04:22 +01:00
SChernykh 9015106ca2 Fixed a potential deadlock 2023-12-10 20:11:10 +01:00
SChernykh 658d756120 Fixed Merkle proof generation for aux chains 2023-12-10 19:24:05 +01:00
SChernykh 38417b0fd5 Fixed BlockTemplate::get_block_template_blob
submit_block was broken because of it
2023-12-10 17:11:11 +01:00
SChernykh 4362ee490c Multiple bugfixes 2023-12-10 15:40:05 +01:00
SChernykh 9ad9821e2a Fix: set timestamp for locally found blocks 2023-12-10 00:41:49 +01:00
SChernykh 32b502a1e3 Sync test: use testnet 2023-12-10 00:18:44 +01:00
SChernykh 1f57e4f701 Reduced min difficulty for testing 2023-12-09 23:19:39 +01:00
SChernykh 746cf3dd42 Merge branch 'master' into merge-mining 2023-12-09 17:32:39 +01:00
SChernykh 85d2c71047 Update RandomX 2023-12-09 16:56:23 +01:00
SChernykh e20c73fa27 Merge branch 'master' into merge-mining 2023-12-08 14:18:22 +01:00
SChernykh 2e3d042d60 Fixed cppcheck error 2023-12-08 09:38:22 +01:00
SChernykh eb1fd155a3 Fixed compiler flags for code sanitizers
For example, `-O2` can optimize away some undefined behaviour, so use a conservative `-Og` optimization level.
2023-11-27 10:27:29 +01:00
SChernykh a8582b2a0f p2pool v3.9
C/C++ CI / build-alpine-static (map[arch:aarch64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2023-11-26 16:17:46 +01:00
SChernykh 6a7bbfabcd Merge branch 'master' into merge-mining 2023-11-26 10:49:43 +01:00
SChernykh 8493dbc47b Fixed cppcheck errors 2023-11-26 09:52:24 +01:00
SChernykh 1bf594d9e2 Refactored keccak interface 2023-11-24 14:20:11 +01:00
SChernykh 65d83aa09c More tests 2023-11-23 14:02:00 +01:00
SChernykh aebd9c28f5 Added Merkle tree params tests 2023-11-21 19:20:22 +01:00
SChernykh 602b9e2ae9 Merge pull request #294 from felixonmars/patch-1
Update Arch Linux package URL in README.md
2023-11-21 09:22:32 +01:00
Felix Yan 103a2cbd4f Update Arch Linux package URL in README.md
The old URL returns 404 now.
2023-11-21 09:15:03 +02:00
SChernykh 13087dd45e Submit found aux blocks 2023-11-20 22:22:37 +01:00
SChernykh d697d0017e Submit the aux block when the difficulty is met (WIP) 2023-11-20 00:56:48 +01:00
SChernykh 7e0b958207 Propagate aux difficulty to miners 2023-11-19 19:48:23 +01:00
SChernykh 394b4f310e Sync test fixes 2023-11-17 19:50:55 +01:00
SChernykh 5aff5f5796 Sync test: added merge mining 2023-11-17 19:36:21 +01:00
SChernykh d1fee33482 Added a fake merge mining node 2023-11-15 18:51:32 +01:00
SChernykh e6b8292d5b Added command line for merge mining
Start a merge mining client for each of the aux chains
2023-11-10 16:17:34 +01:00
SChernykh abd9c80e4d Merge branch 'master' into merge-mining 2023-11-07 16:52:57 +01:00
SChernykh e4b11ecab4 Merge pull request #286 from hinto-janai/master
Add `gupax.io` to DNS seed nodes
2023-11-07 16:20:40 +01:00
SChernykh 781606bec5 Enabled SEH for MSVC builds 2023-11-07 13:09:24 +01:00
SChernykh f4d709c0dd Util: more checks in get_dns_txt_records_base 2023-11-07 12:34:36 +01:00
SChernykh 8699e1887c Debug: print call stack of unhandled exceptions 2023-11-07 11:00:39 +01:00
hinto.janai bf39319cbb add gupax.io to DNS seed nodes 2023-11-06 17:05:33 -05:00
SChernykh 9eab833f66 Merge mining RPC: added merge_mining_submit_solution 2023-11-06 17:22:44 +01:00
SChernykh 40b2c2a858 Merge mining RPC: added merge_mining_get_job 2023-11-05 19:06:57 +01:00
SChernykh e92ce0a5f3 Log: fixed broken output redirection on Windows 2023-11-05 18:28:11 +01:00
SChernykh f7b90b3808 Fixed sync test 2023-11-02 21:42:03 +01:00
SChernykh 75bb046f22 Added merge mining RPC client
Basic code and one API call implemented
2023-11-01 19:52:19 +01:00
SChernykh fd20313d65 Merge branch 'master' into merge-mining 2023-10-31 14:10:27 +01:00
SChernykh 837a33480e p2pool v3.8
C/C++ CI / build-alpine-static (map[arch:aarch64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019 vspath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2023-10-31 12:32:36 +01:00
SChernykh 7b02c3d24a Documentation: recommend more in-peers
This will balance out peers which can only have outgoing connections.
2023-10-30 09:49:36 +01:00
SChernykh c59845e746 Fixed cppcheck errors 2023-10-29 09:43:22 +01:00
SChernykh c75981d201 Update MERGE_MINING.MD
Added proposed RPC API
2023-10-28 18:59:29 +02:00
SChernykh eef41696e8 Create MERGE_MINING.MD 2023-10-26 21:34:07 +02:00
SChernykh fc31ac6cd0 Fixed Merkle tree root update 2023-10-25 22:54:25 +02:00
SChernykh a852b4e3ad Update clang-tidy.yml 2023-10-25 20:30:50 +02:00
SChernykh 0b711cbe65 Init and update merkle tree root 2023-10-25 20:06:12 +02:00
SChernykh 2d1158af64 Store Merkle tree root in the merge mining tag 2023-10-25 15:49:25 +02:00
SChernykh 963514667d Increased time limit for cppcheck 2023-10-25 10:40:27 +02:00
SChernykh ec35c74e5f Init merge mining tag properly 2023-10-25 00:14:09 +02:00
SChernykh 417c89e96f Added get_aux_slot 2023-10-24 14:16:55 +02:00
SChernykh da45871f0b Added sha256 2023-10-24 13:03:50 +02:00
SChernykh d5a9fb8d0e Fixed cppcheck error 2023-10-24 10:55:26 +02:00
SChernykh b8c68dc2e4 Added verify_merkle_proof by index 2023-10-23 20:43:45 +02:00
SChernykh 12a3eb862e Added merkle proofs 2023-10-22 23:31:07 +02:00
SChernykh e51af9e6e8 Added merkle_hash_full_tree 2023-10-21 22:45:07 +02:00
SChernykh b46da74c2c Moved out merkle tree hash code 2023-10-21 19:04:17 +02:00
SChernykh 119782920a Warn if there are too many background jobs 2023-10-20 21:12:26 +02:00
SChernykh 30ba38c2b3 macOS aarch64 build: switch to clang 15 2023-10-19 19:57:37 +02:00
SChernykh 87547576de Update RandomX 2023-10-19 18:08:40 +02:00
SChernykh 5febb8c4e2 Self-test: multithreaded dataset initialization 2023-10-18 13:43:40 +02:00
SChernykh ddc6986401 Self-test: calculate 100 hashes instead of just 1 2023-10-18 11:18:57 +02:00
SChernykh c0cabc9739 Check for Windows 7 compatibility 2023-10-17 18:04:46 +02:00
SChernykh 9a1da5b7c2 Update README.md 2023-10-16 13:44:07 +02:00
SChernykh 5daa2b9dff Removed -Wcast-align
Not necessary because misaligned accesses will be detected by UB sanitizer
2023-10-11 19:59:14 +02:00
SChernykh 5988acb12b Fix CVE-2023-38545 2023-10-11 08:17:35 +02:00
SChernykh 011d05f7b6 Update RandomX 2023-10-09 18:42:45 +02:00
SChernykh 294d1a525e Update check now also checks for connected peer versions 2023-10-09 11:08:51 +02:00
SChernykh e5770a5343 Fixed cppcheck errors 2023-10-08 23:33:06 +02:00
SChernykh 7a65e1feb5 Check for updates in status and version commands 2023-10-08 21:01:50 +02:00
SChernykh 4e55f53fb4 Notify about new P2Pool versions 2023-10-08 18:52:06 +02:00
SChernykh 4d944d3dc3 HTML: added latest release URL 2023-10-08 18:11:07 +02:00
SChernykh 3d3b4837ff Update rapidjson 2023-10-05 13:33:59 +02:00
SChernykh 8270e0898b StratumServer: fixed memory leak on shutdown 2023-10-02 08:19:28 +02:00
SChernykh 2ed63ab3ac p2pool v3.7
C/C++ CI / build-alpine-static (map[arch:aarch64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline -mfix-cortex-a53-835769 -mfix-cortex-a53-843419]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2023-09-30 11:19:13 +02:00
SChernykh d99a48d87d Added a reserve domain for seed node lists 2023-09-30 08:43:29 +02:00
SChernykh 27375e7382 StratumServer: removed an unnecessary check 2023-09-29 11:55:25 +02:00
SChernykh a81d3c4989 ZMQ: fixed bind port error message 2023-09-26 19:35:30 +02:00
SChernykh b922440fc7 Refactored software id code
Show a warning when an unknown software id is seen
2023-09-23 18:04:02 +02:00
SChernykh 6ca6f2ed3d HTML: update min payout 2023-09-18 18:22:12 +02:00
SChernykh 954b9252c1 StratumServer: fixed data race in api update 2023-09-17 22:30:21 +02:00
SChernykh e355f45544 Merge pull request #278 from BadTigrou/master
Adding workers data to api
2023-09-17 21:51:32 +02:00
charlie ed32664b9e Adding workers data to api in stratum files 2023-09-17 20:09:53 +02:00
SChernykh 8619057224 Log: set locale for data output 2023-09-17 19:30:39 +02:00
SChernykh 10978c59e4 Made custom worker names safe for JSON data
And comma-separated lists too.
2023-09-17 11:32:56 +02:00
SChernykh ed56206c30 More log tests 2023-09-17 10:38:46 +02:00
SChernykh 513c2dfc3b Updated copyright 2023-09-16 22:29:32 +02:00
SChernykh 0b544bf55a API: removed file size limitation 2023-09-16 19:38:16 +02:00
SChernykh a9d39f0803 Better error messages 2023-09-13 21:37:07 +02:00
SChernykh 2248739dd5 Don't update api when shutting down 2023-09-13 21:12:01 +02:00
SChernykh b83b691714 TCPServer: cleaned up IPv4 address handling 2023-09-11 19:43:28 +02:00
SChernykh 887611c9d8 P2Pool: normalized peer list IPv4/IPv6 data 2023-09-09 20:22:43 +02:00
SChernykh 390cf0257e StratumServer: fixed data races on disconnect 2023-09-08 15:19:59 +02:00
SChernykh 2503dca0e3 Docker: updated priority node 2023-09-06 22:06:13 +02:00
SChernykh 8fd45cc977 Docker: expose port 18083 together with RPC port 2023-09-06 19:26:23 +02:00
SChernykh 8d9b9e505e Added ARM errata mitigations
Reworked #189
2023-09-06 16:32:09 +02:00
SChernykh 2453c08194 SideChain: fixed use-after-free in precalc code 2023-09-06 10:05:55 +02:00
SChernykh f149613d54 Removed unnecessary async call 2023-09-04 20:38:01 +02:00
SChernykh 2c5cfb6442 Fixed data races when using uv_async_send 2023-09-04 19:33:31 +02:00
SChernykh cfddaf1508 TCPServer: added thread check on connection close 2023-09-03 23:17:04 +02:00
SChernykh 6eff190f87 Sync test: use macOS release build settings 2023-09-03 17:56:34 +02:00
SChernykh e40c5190b1 macOS aarch64 build: disabled LTO 2023-09-03 17:45:05 +02:00
SChernykh 2584799415 TCPServer: fixed ASAN code 2023-09-03 17:13:22 +02:00
SChernykh 0463901db7 Run thread sanitizer test with static libs 2023-09-03 16:23:11 +02:00
SChernykh c2704af523 Sync test: increased countdown length 2023-09-03 14:35:12 +02:00
SChernykh 328e9cade9 SideChain: fixed read from uninitialized buffer 2023-09-03 14:16:09 +02:00
SChernykh 2b61fff449 Sync test: increase test load 2023-09-03 13:44:06 +02:00
SChernykh d8bbe2110e P2PServer: fixed a data race when banning peers 2023-09-03 13:15:45 +02:00
SChernykh 1ef88622d6 p2pool v3.6.2
C/C++ CI / build-alpine-static (map[arch:aarch64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2023-09-03 09:49:31 +02:00
SChernykh b1d3fb63f3 Use the old compiler for macOS-aarch64 build 2023-09-02 18:41:11 +02:00
SChernykh f44ffd1959 Sync test: rewrote stratum connection code 2023-09-01 18:20:50 +02:00
SChernykh e7545db663 Sync test: make sure stratum logs are saved 2023-09-01 17:12:22 +02:00
SChernykh fcf9d2ad15 p2pool v3.6.1
C/C++ CI / build-alpine-static (map[arch:aarch64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2023-09-01 12:39:07 +02:00
SChernykh 7986321a52 Fixed console commands startup 2023-08-31 17:50:31 +02:00
SChernykh 8e0f28ee30 Fixed Windows 7 compatibility 2023-08-31 16:21:59 +02:00
SChernykh fecfa18999 p2pool v3.6
C/C++ CI / build-alpine-static (map[arch:aarch64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-alpine-static (map[arch:x86_64 flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=inline]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[flags:-flto=2 -fuse-linker-plugin -ffunction-sections os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:clang cxx:clang++ flags:-flto -ffunction-sections -fuse-ld=lld -Wno-unused-command-line-argument]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (map[c:gcc cxx:g++ flags:-flto=2 -fuse-linker-plugin -ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
source-snapshot / source-snapshot (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
Sync test / sync-test-windows-leaks (push) Has been cancelled
2023-08-31 10:32:34 +02:00
SChernykh d8b23cd13c CI: fixed paths and file names 2023-08-26 21:00:23 +02:00
SChernykh 0e0101f507 CI: build libcxx_msan every time 2023-08-24 15:11:55 +02:00
SChernykh 17a17850ea Update libcxx_msan.tar.xz 2023-08-23 20:55:15 +02:00
SChernykh 71d4a6dab0 Tweaked macOS build parameters 2023-08-23 20:22:44 +02:00
SChernykh 936d3b5280 Added quick self-test 2023-08-23 17:01:01 +02:00
SChernykh fac9c23103 Fixed LTO in macOS builds 2023-08-23 16:23:48 +02:00
SChernykh 3674401923 Update RandomX 2023-08-23 13:37:07 +02:00
SChernykh 66d6d0dc33 CI: fixed BSD builds 2023-08-22 17:00:39 +02:00
SChernykh 31ce134413 Fixed INVALID SHARE log color 2023-08-21 21:24:04 +02:00
SChernykh b8e6aae289 Disabled RandomX tests 2023-08-21 20:49:45 +02:00
SChernykh 8f620712ef Update RandomX 2023-08-21 17:47:09 +02:00
SChernykh 1069d1c066 Fixed cppcheck error 2023-08-21 11:20:50 +02:00
SChernykh bc0634a541 RandomX: try to recover after an error 2023-08-21 11:01:57 +02:00
SChernykh 8d65a99fe4 Fixed data race 2023-08-18 21:57:51 +02:00
SChernykh 6e68714c26 CI: fixed libzmq cmake command line 2023-08-18 20:19:59 +02:00
SChernykh 06ff7b661a CI: added Alpine Linux static builds 2023-08-18 19:01:09 +02:00
SChernykh 70a6442b46 CI: reduced MacOS and FreeBSD binary sizes 2023-08-18 15:48:35 +02:00
SChernykh 9e7d394ae7 CI: reduced aarch64 binary sizes 2023-08-18 12:59:37 +02:00
SChernykh 326b2d7a04 Pool block test: check RandomX hash where possible 2023-08-18 12:01:14 +02:00
SChernykh f3045a5e80 Fixed possible thread handle leak 2023-08-17 10:16:51 +02:00
SChernykh b3d72cbfcb Update googletest 2023-08-16 14:55:48 +02:00
SChernykh 76c4573c39 CI: cleanup build warnings
Tests: fixed "unused const variable" warning
CMakeLists.txt: fixed deprecation warnings
2023-08-16 14:20:23 +02:00
SChernykh 741bec9874 CI: optimized msys2 binary sizes more 2023-08-16 12:03:48 +02:00
SChernykh 46aed06523 CI: optimized msys2 binary sizes 2023-08-15 22:19:48 +02:00
SChernykh 7630c1a883 CI: added msys2-clang Windows build 2023-08-15 19:53:22 +02:00
SChernykh 2877e5dfc1 Sync test: log stratum data when finished 2023-08-15 11:43:05 +02:00
SChernykh 05b88a48a3 CI: update to clang 17 2023-08-15 10:57:05 +02:00
SChernykh c74b567fe4 Update stratum_dummy.py 2023-08-15 08:00:11 +02:00
SChernykh a6b6cb0f09 TCPServer: tweaked ASAN support 2023-08-14 22:24:42 +02:00
SChernykh 86e9af6fd7 Sync test: submit more fake shares 2023-08-14 21:57:38 +02:00
SChernykh 8776f7dfbb Fixed MacOS sync test 2023-08-14 18:36:05 +02:00
SChernykh 929f908a86 Sync test: submit fake shares to test stratum 2023-08-14 17:10:36 +02:00
SChernykh 229d7b052a Create CONSOLE_COMMANDS.MD 2023-08-14 13:12:06 +02:00
SChernykh a5896f7ae8 Updated docs 2023-08-14 11:28:25 +02:00
SChernykh 114c2cee93 Updated dependencies
- cppzmq 4.10.0
- curl 8.2.1
- libuv 1.46
- latest libzmq
- latest miniupnp
- latest rapidjson
2023-08-13 21:05:39 +02:00
SChernykh 7f413ec994 Re-enabled CI jobs 2023-08-07 12:18:58 +02:00
SChernykh bd30a68e7d Fixed cppcheck error 2023-08-07 07:28:44 +02:00
SChernykh f4a18726b5 P2PServer: support future major protocol changes 2023-08-04 15:52:28 +02:00
SChernykh 50e284357c Disabled failing jobs 2023-08-01 16:16:56 +02:00
SChernykh 2ddb03e2be CI: tweaked memory leak output formatting 2023-07-19 16:15:48 +02:00
SChernykh ebae616138 CI: fixed error checking in sync test 2023-07-19 15:36:16 +02:00
SChernykh 0f88640575 CI: added sync test with memory leak detection 2023-07-19 13:59:57 +02:00
SChernykh 75cc82ae0c P2PServer: removed protocol version check for fastest peer 2023-07-12 12:48:52 +02:00
SChernykh 32dc235aa5 SideChain: fix for out of order blocks 2023-07-12 00:25:37 +02:00
SChernykh 6ffe1d81c2 P2PServer: ignore protocol versions higher than supported 2023-07-10 20:13:37 +02:00
SChernykh 5b245e64d3 Fixed a typo 2023-07-10 16:54:01 +02:00
SChernykh a067361d74 P2PServer: prefetch 2 blocks ahead during sync 2023-07-10 15:44:18 +02:00
SChernykh a7f66c8883 SideChain: filter duplicates from missing blocks 2023-07-10 14:11:22 +02:00
SChernykh e03e7d831e P2PServer: tweaked switching to the fastet peer when syncing 2023-07-10 11:40:48 +02:00
SChernykh 1219ed0dd6 P2PServer: check protocol version when choosing fastest peer 2023-07-07 23:49:43 +02:00
SChernykh fe2ff95f19 P2PServer: use BLOCK_NOTIFY to speed up syncing 2023-07-07 16:48:28 +02:00
SChernykh d72f0ce40c P2PServer: fixed some excess block requests 2023-07-07 14:52:47 +02:00
SChernykh df43e2c126 SideChain: tweaked precalc logic 2023-07-07 14:21:52 +02:00
SChernykh d8ecc1174d P2PServer: refactored BLOCK_NOTIFY logic
- Limit how many block requests can be in flight
- Don't send requests for the same block twice
2023-07-07 12:14:24 +02:00
SChernykh 3e269b49d4 Tweaked log level for BLOCK_NOTIFY 2023-07-05 19:06:49 +02:00
SChernykh 72c9f3b0db Fixed ping time calculation 2023-07-05 15:29:54 +02:00
SChernykh 2f5b0db786 P2PServer: request blocks coming from BLOCK_NOTIFY 2023-07-05 11:42:34 +02:00
SChernykh 8d9f16c387 P2PServer: sanity check message id 2023-07-04 16:47:14 +02:00
SChernykh d6cb0ee8a0 P2PServer: avoid unnecessary block broadcasts 2023-07-04 16:06:01 +02:00
SChernykh 5444701c38 Tweaked status code
Don't create stream when it's not needed
2023-07-02 15:33:51 +02:00
SChernykh 396479c2bf Fixed cppcheck errors 2023-07-02 13:10:05 +02:00
SChernykh d78885dcd4 p2pool v3.5
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (macos-11) (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (macos-12) (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
2023-06-30 18:05:12 +02:00
SChernykh ede72ff1d8 Suppress a noisy Coverity warning 2023-06-30 16:18:02 +02:00
SChernykh e5bf27030d Rate limit peer list requests
Send an empty response if the request comes too soon
2023-06-29 18:20:07 +02:00
SChernykh 375bf56e2e Fixed null characters in print_hosts output 2023-06-29 10:52:42 +02:00
SChernykh f79be1b343 Removed unnecessary lock 2023-06-27 17:09:58 +02:00
SChernykh 3554adf0c1 Refactored string conversions
Use `log::Stream` everywhere
2023-06-27 14:29:19 +02:00
SChernykh a32cc9f0f5 Update README.md 2023-06-22 17:21:45 +02:00
SChernykh 3759fd4ac4 Code cleanup 2023-06-22 09:26:05 +02:00
SChernykh ac58e8be2e Updated docs for multiple backup hosts 2023-06-21 11:29:13 +02:00
SChernykh 1c7646f98f ZMQReader: make sure monitor always shuts down 2023-06-20 16:53:03 +02:00
SChernykh 1b9d14e89d Get ping times for all hosts 2023-06-19 17:56:53 +02:00
SChernykh 3c41388eb7 Removed outdated hardfork information 2023-06-18 21:18:10 +02:00
SChernykh a9a2113ea4 Code cleanup 2023-06-18 16:47:31 +02:00
SChernykh b5fa34e1a1 Added support for multiple Monero hosts
Switch to the next host in list when P2Pool thinks current host is stuck or lagging
2023-06-18 12:56:27 +02:00
SChernykh 192f1d722d CI: tweaked cppcheck command line 2023-06-16 13:28:49 +02:00
SChernykh b857664d27 CI: skip external files for cppcheck 2023-06-16 11:08:01 +02:00
SChernykh 19491f0994 Update libcxx_msan.tar.xz 2023-06-15 15:22:52 +02:00
SChernykh 6738b57ba2 CI: use compile command database for cppcheck 2023-06-15 13:15:11 +02:00
SChernykh 30560e6cf8 CI: use compile command database for clang-tidy 2023-06-15 10:36:42 +02:00
SChernykh e1de021fba CI: tweaked cppcheck and clang-tidy command lines 2023-06-14 16:51:15 +02:00
SChernykh 8b4f05dc78 CI: added clang-tidy 2023-06-14 14:40:12 +02:00
SChernykh 950330b5f7 SideChain: recover from incorrect PoW calculation 2023-06-14 11:22:55 +02:00
SChernykh 9927718e25 Tweaked cppcheck command line 2023-06-13 11:53:41 +02:00
SChernykh b7ff4f2c2c Set default JSON parser flags 2023-06-12 15:29:23 +02:00
SChernykh 47c79459a6 Fixed get_miner_data error handling
Second call was a no-op because of `m_getMinerDataPending`
2023-06-10 14:49:33 +02:00
SChernykh 143960937e p2pool v3.4
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (macos-11) (push) Has been cancelled
C/C++ CI / build-macos-aarch64 (macos-12) (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-ubuntu-tsan (push) Has been cancelled
Sync test / sync-test-ubuntu-msan (push) Has been cancelled
Sync test / sync-test-ubuntu-ubsan (push) Has been cancelled
Sync test / sync-test-ubuntu-asan (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows-debug-asan (push) Has been cancelled
2023-05-31 18:11:01 +02:00
SChernykh ee16ce10c1 Tweaked block_seen logic 2023-05-31 17:03:45 +02:00
SChernykh 3988a69946 Added MacOS aarch64 build 2023-05-31 10:42:24 +02:00
SChernykh 738b2e416e ZMQ: log internal listening port 2023-05-30 12:58:03 +02:00
SChernykh b96dfa602b ZMQ: use random port for internal use 2023-05-29 14:37:20 +02:00
SChernykh 9d6f232dd1 Tweaked block_seen logic 2023-05-29 14:13:11 +02:00
SChernykh d808ba6cbf Fixed --rpc-login 2023-05-27 10:52:53 +02:00
SChernykh 818fab8909 Build curl with cmake 2023-05-27 09:21:18 +02:00
SChernykh 1ffaf3a292 Recompiled curl lib for MSVC using cmake 2023-05-26 19:25:18 +02:00
SChernykh 8e11c3dffd Updated libuv 2023-05-26 18:52:49 +02:00
SChernykh a7496dbc02 Updated tests 2023-05-26 15:21:40 +02:00
SChernykh 9e439044de Update rapidjson 2023-05-26 13:25:03 +02:00
SChernykh 536552b9db Update RandomX 2023-05-26 12:50:10 +02:00
SChernykh 183bab110e Refactored log writer 2023-05-26 11:19:39 +02:00
SChernykh beea3e2184 Fixed cppcheck error 2023-05-26 07:48:38 +02:00
SChernykh e0a3add5f2 Refactored is_localhost() 2023-05-26 00:02:15 +02:00
SChernykh fd8e5e4eed Create libcxx_msan.yml 2023-05-25 18:42:03 +02:00
SChernykh 6f7139fe28 CI: added address sanitizer to test sync 2023-05-25 13:11:29 +02:00
SChernykh 57d996491e Update test-sync.yml 2023-05-25 12:08:22 +02:00
SChernykh ba8e0578ed Fixed data race 2023-05-25 11:34:42 +02:00
SChernykh 65b267c497 CI: run cppcheck every day 2023-05-25 11:16:22 +02:00
SChernykh 512064de61 CI: run sync test every 3 hours 2023-05-25 10:29:38 +02:00
SChernykh 2cdb8b5323 P2PServer: fixed use after free on shutdown 2023-05-25 10:11:24 +02:00
SChernykh d08ac60fd9 CI: set difficulties for fake stratum clients
Client 1: autodiff
Client 2: fixed 1000 diff
Client 3: fixed 10M diff
2023-05-25 09:44:44 +02:00
SChernykh fbc0159453 Added UB sanitizer 2023-05-25 09:02:47 +02:00
SChernykh 3d526cebbc Enabled MemorySanitizer 2023-05-25 07:32:33 +02:00
SChernykh 2d10a6a270 CI: added test sync with clang's memory sanitizer 2023-05-24 15:13:37 +02:00
SChernykh 5f7ce28682 TCPServer: fixed send callback arguments 2023-05-24 13:46:05 +02:00
SChernykh 9d0f835186 Update includes.txt 2023-05-24 11:12:13 +02:00
SChernykh 3fdadf3eb5 Fixed cppcheck errors 2023-05-23 20:11:00 +02:00
SChernykh cd57ab6ad9 Fixed UV_THREADPOOL_SIZE setting
putenv can't use stack buffer
2023-05-23 19:14:15 +02:00
SChernykh eab8a51bb7 SideChain: tweaked m_seenBlocks cleanup logic 2023-05-22 15:30:57 +02:00
SChernykh dbb4efb98a Added version console command 2023-05-20 15:51:36 +02:00
SChernykh a83d6deec1 Check node ping at startup 2023-05-18 10:33:27 +02:00
SChernykh f212de64f5 P2PServer: fixed peer list request logic 2023-05-18 09:39:04 +02:00
SChernykh 6a4583f758 Sync test: keep running for 2 minutes more 2023-05-18 00:28:49 +02:00
SChernykh 325f2dc22f Sync test: run with TSAN on Ubuntu 2023-05-17 23:06:54 +02:00
SChernykh 7134187dc9 Sync test: added stratum connections 2023-05-17 20:35:51 +02:00
SChernykh b20db0a117 P2PServer: always send peer list request to new peers 2023-05-17 11:13:25 +02:00
SChernykh 3c7fcf65a9 Fixed DNS TXT parsing 2023-05-12 15:41:02 +02:00
SChernykh 4fa344a0f7 Refactored DNS TXT resolver code 2023-05-12 10:37:58 +02:00
SChernykh 9aa748e628 Fixed FreeBSD build 2023-05-11 10:32:37 +02:00
SChernykh bba4f8d0c5 Fixed headers for res_query 2023-05-11 09:21:10 +02:00
SChernykh be8b38e5cf Changed BLOCK_FOUND wording 2023-05-11 08:07:05 +02:00
SChernykh db9e5ba332 P2PServer: prefer DNS TXT records to load seed nodes 2023-05-10 22:07:35 +02:00
SChernykh 689fa14cfd Fixed cppcheck errors 2023-05-10 10:35:23 +02:00
SChernykh fa924171c7 Statistics webserver: added missing Stratum data 2023-05-10 10:02:17 +02:00
SChernykh 8a222d5e75 TCPServer: check if loop thread is running before waiting for it 2023-05-01 20:13:57 +02:00
SChernykh fcb62894a5 p2pool v3.3
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
2023-04-30 16:04:32 +02:00
SChernykh c94b627808 TCPServer: use /64 prefix to ban IPv6 peers 2023-04-27 10:28:32 +02:00
SChernykh 754eb78a05 Update libzmq 2023-04-26 11:11:05 +02:00
SChernykh 045929ca7c Update miniupnp 2023-04-25 13:52:10 +02:00
SChernykh 98b2d2057c SideChain: fixed data race 2023-04-24 20:23:45 +02:00
SChernykh 98a9eb4f18 Console: fixed data race 2023-04-24 20:06:56 +02:00
SChernykh 58d32ffd1f Removed PSA from html 2023-04-24 13:26:07 +02:00
SChernykh 76c3e89faf StratumServer: update api more often 2023-04-24 12:44:50 +02:00
SChernykh abf48fde02 Stratum API: added block reward share percent 2023-04-24 11:45:02 +02:00
SChernykh c31d5b7d3c Docker: enabled fast sync 2023-04-22 22:54:32 +02:00
SChernykh f455ce398c Updated tests 2023-04-22 21:26:37 +02:00
SChernykh b498084388 SideChain: fixed a rare sync bug
P2Pool could fail to sync if uncles of depth 3 were present at a certain depth in the chain
2023-04-22 19:01:17 +02:00
SChernykh 75c156578c SideChain: tweaked precalculation during sync 2023-04-22 18:00:31 +02:00
SChernykh fd67ec1f86 Fixed typo 2023-04-22 08:36:10 +02:00
SChernykh b1041ea8a8 Update c-cpp.yml 2023-04-21 15:27:33 +02:00
SChernykh 51a075c0df P2PServer: fixed buf_size checks 2023-04-21 14:59:47 +02:00
SChernykh 8bf045974f BlockTemplate code refactoring
- Moved block constants to one place
- Tuned block template max transaction limiter
2023-04-21 11:13:48 +02:00
SChernykh 44d2005ab1 Console: returned stdin check to constructor 2023-04-20 10:59:32 +02:00
SChernykh 21f827112d Create SYSTEMD.MD 2023-04-20 08:10:45 +02:00
SChernykh 5f18eed14d Fixed compilation error 2023-04-19 22:44:38 +02:00
SChernykh 7a83fd2f30 Console: check stdin handle early at startup 2023-04-19 21:09:28 +02:00
SChernykh 6e258bb210 Refactored TCPServer to reduce code duplication 2023-04-19 16:37:32 +02:00
SChernykh 72adfd3126 Console: added local api 2023-04-18 17:01:00 +02:00
SChernykh 196b27f3b2 Console: read commands via localhost TCP 2023-04-18 16:19:12 +02:00
SChernykh ce192670a3 CI: actually check for successful sync 2023-04-18 00:15:12 +02:00
SChernykh 14ab9f462a Fixed command line parsing 2023-04-17 23:28:03 +02:00
SChernykh 93365973a7 Merge pull request #253 from hinto-janai/master
Add `--version`
2023-04-17 20:02:01 +02:00
hinto.janai 950ecd6bbc add --version 2023-04-17 10:55:53 -04:00
SChernykh 8420f5f1b1 TCPServer: reduced write buffer reallocations 2023-04-17 16:22:46 +02:00
SChernykh 80352f6b30 Fixed API path 2023-04-14 12:41:34 +02:00
SChernykh 6ef166ba33 Fixed cppcheck errors 2023-04-14 12:38:14 +02:00
SChernykh 9368b96129 Update README.md 2023-04-14 10:41:59 +02:00
SChernykh 025f0bdd0b Update RandomX 2023-04-05 15:04:27 +02:00
SChernykh 2d76846d3c Removed unused <iostream> 2023-04-05 14:47:44 +02:00
SChernykh f6cc7abac9 Fixed cppcheck error 2023-04-05 14:13:48 +02:00
SChernykh 572d2251d7 HTML: added PPLNS window duration 2023-04-05 13:47:51 +02:00
SChernykh 7dd9fb9b47 Update README.md 2023-04-02 11:52:39 +02:00
SChernykh 92827035e0 p2pool v3.2
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON upnp:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
2023-03-31 18:30:34 +02:00
SChernykh 5f7b8c3371 Fixed cppcheck false positives 2023-03-31 13:35:23 +02:00
SChernykh 03eddddc0e Cache: save data from previous Monero block too
To improve caching of stale/outdated sidechain blocks.
2023-03-31 12:59:11 +02:00
SChernykh 080fbaa26c Util: adder PerfTimer 2023-03-30 19:09:15 +02:00
SChernykh f6a285de87 API: added PPLNS window size to pool stats 2023-03-28 13:53:52 +02:00
SChernykh 55e4ea0277 API: added sidechain diff and height to pool stats 2023-03-28 11:40:43 +02:00
SChernykh bb80fe12a0 Added a check for unstable hardware 2023-03-28 10:27:27 +02:00
SChernykh 5c67f0df20 P2PServer: truncate too long peers list in api 2023-03-27 12:15:33 +02:00
SChernykh 3697c079fa Fixed cppcheck error 2023-03-27 11:47:48 +02:00
SChernykh 2e6041dcf5 P2PServer: add local api data 2023-03-27 11:16:57 +02:00
SChernykh 645de31fe3 SideChain: stricter checks in get_difficulty 2023-03-24 13:26:30 +01:00
SChernykh eef90da7ae SideChain: stricter checks of alternative chains 2023-03-24 11:50:39 +01:00
SChernykh c0586a5089 Added --no-igd as an alias for --no-upnp
For compatibility with monerod command line parameters
2023-03-21 19:31:18 +01:00
SChernykh b30018bb38 SideChain::update_depths() - reduced log level 2023-03-21 16:22:11 +01:00
SChernykh 6c45573976 Faster block verification 2023-03-21 14:13:47 +01:00
SChernykh b6c1b1a6d7 P2PServer: log time it took to relay a block 2023-03-21 11:22:48 +01:00
SChernykh d41a441e98 UPnP: remove port mapping on shutdown 2023-03-21 10:23:17 +01:00
SChernykh 86b6cf2d65 UPnP: handle port mapping conflicts 2023-03-20 22:13:12 +01:00
SChernykh cf11993cb1 Update miniupnp 2023-03-20 15:56:21 +01:00
SChernykh fe7ef30650 Don't port forward Stratum port by default
Added a command line parameter to enable it
2023-03-20 14:04:19 +01:00
SChernykh bb4c7f0298 Run UPnP discovery in the background 2023-03-20 11:56:41 +01:00
SChernykh a7db46d69b Fixed command line help output 2023-03-20 10:04:43 +01:00
SChernykh ce81c2769c Added get_hashing_blobs test with full mempool 2023-03-20 09:46:09 +01:00
SChernykh d4a57370ef Disable cmd params depending on compile flags 2023-03-20 09:17:59 +01:00
SChernykh 634039e551 Fixed static build 2023-03-19 23:55:22 +01:00
SChernykh a83edceae3 Merge pull request #243 from hinto-janai/master
README: update gupax link
2023-03-19 23:04:11 +01:00
SChernykh 19cc044cab Added UPnP port forwarding 2023-03-19 23:02:09 +01:00
SChernykh 79ad29e99a Fixed pool_block.deserialize test 2023-03-19 20:54:09 +01:00
hinto.janai f96e291681 README: update gupax link 2023-03-19 15:05:02 -04:00
SChernykh 6685a22118 CI test-sync: removed unnecessary dependencies 2023-03-19 19:32:20 +01:00
SChernykh a84a0bd8dc Added miniupnp submodule 2023-03-19 19:13:29 +01:00
SChernykh c2d8c806d2 Removed fork code, only v2 is left 2023-03-19 17:19:25 +01:00
SChernykh 387860aa4a Post-fork test data 2023-03-19 11:38:43 +01:00
SChernykh de7bdba95f TCPServer: don't spam logs with 127.0.0.1 bans 2023-03-17 16:59:01 +01:00
SChernykh 6baf5247cb Fixed parallel_run logic on single CPU systems 2023-03-17 16:01:52 +01:00
SChernykh 146d29b627 Don't let user connect to a node without ZMQ 2023-03-10 15:02:07 +01:00
SChernykh c1a1249be1 Code cleanup 2023-03-09 10:59:52 +01:00
SChernykh 8e7a797586 Merge pull request #238 from twlee79/feature/namedpipe
Allow named pipe as stdin
2023-03-09 10:44:54 +01:00
SChernykh 14a1918fda Merge pull request #239 from hx507/master
Disable LTO on NixOS builds
2023-03-09 09:29:45 +01:00
git_unspecified 54e755efdd Fix nix build 2023-03-09 02:12:37 -06:00
T W Lee 3df7430663 allow named pipe as stdin, fixes after review 2023-03-09 14:38:20 +13:00
T W Lee c71d89c95a allow named pipe as stdin 2023-03-08 02:35:49 +13:00
SChernykh 1b5860eec8 Fixed cppcheck errors 2023-03-06 14:52:47 +01:00
SChernykh 4741880044 StratumServer: added address sanitizer checks 2023-03-06 14:30:13 +01:00
SChernykh 02a0cb174a StratumServer: show a warning for invalid shares 2023-03-02 13:19:25 +01:00
SChernykh e53fd7a062 Tests: fixed block_template test volatility
Hashes should stay the same from now on.
2023-03-01 09:20:09 +01:00
SChernykh a76d8049c0 p2pool v3.1
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:OFF vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
C/C++ CI / build-openbsd (map[architecture:x86-64 host:ubuntu-22.04 name:openbsd version:7.2]) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
2023-02-28 18:11:54 +01:00
SChernykh 0ce1558f54 Fixed data races 2023-02-27 19:35:28 +01:00
SChernykh 2807f9a51c TCPServer: disabled debug check in release builds 2023-02-27 19:14:03 +01:00
SChernykh 03a3423da0 StratumServer: fixed data race 2023-02-27 18:58:56 +01:00
SChernykh 12a011a9ff TCPServer: removed unnecessary mutex 2023-02-27 15:59:42 +01:00
SChernykh 7a1afc7a95 Fixed cppcheck error 2023-02-26 20:12:00 +01:00
SChernykh 262b4f2a2e Updated dependencies 2023-02-26 19:16:13 +01:00
SChernykh fadc5055b2 Updated --no-autodiff description 2023-02-21 09:17:42 +01:00
SChernykh 1c908c261d TCPServer: refactored memory allocation 2023-02-17 08:47:52 +01:00
SChernykh 39216df8eb CI: added openbsd build 2023-02-16 15:16:24 +01:00
SChernykh ed59579a9d Don't reset m_cumulativeFoundSharesDiff 2023-02-13 09:41:11 +01:00
SChernykh 2aa7389c3f Fix: never reset m_cumulativeHashes
Hashrates in stratum status can be wrong if `m_cumulativeHashes` decreases.
2023-02-10 17:55:26 +01:00
SChernykh 02970e2f8f Update RandomX 2023-02-07 14:14:36 +01:00
SChernykh 2e00ac402a Github CI: added timeouts to all checks 2023-02-07 11:13:13 +01:00
SChernykh c94dd46294 Increased timeout for FreeBSD build 2023-02-07 11:00:14 +01:00
SChernykh df802c3b26 Added an option to compile without LTO 2023-02-07 10:04:37 +01:00
SChernykh 8430a506cc Update RandomX 2023-02-06 10:01:28 +01:00
SChernykh 46a6196c92 Disabled -fassociative-math on old GCC 2023-02-02 22:22:49 +01:00
SChernykh e64a0acfb3 p2pool v3.0
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-freebsd (map[architecture:x86-64 host:ubuntu-22.04 name:freebsd version:12.4]) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
2023-01-31 18:17:18 +01:00
SChernykh 14f7a1cb61 Merge branch 'hardfork' 2023-01-31 18:01:06 +01:00
SChernykh 1cfacf4118 Code cleanup and fixes 2023-01-28 09:58:32 +01:00
SChernykh 975679ef87 Show actual worker difficulty in workers command 2023-01-27 22:09:17 +01:00
SChernykh dfa27016fd Update RandomX 2023-01-27 18:50:21 +01:00
SChernykh 25d083ef25 Show Monero node in status 2023-01-27 17:42:00 +01:00
SChernykh c989bdb0ea Tweaked compiler flags to reduce binary size 2023-01-27 15:49:20 +01:00
SChernykh cb9e98dc88 Update c-cpp.yml 2023-01-27 11:30:34 +01:00
SChernykh c7ba11c607 Retry getaddrinfo with IPv4 only after an error 2023-01-27 10:29:04 +01:00
SChernykh 8876af53d8 SideChain: fixed potential division by 0 2023-01-26 21:42:15 +01:00
SChernykh 70f78ebfd1 cmake required version fixes 2023-01-26 20:19:57 +01:00
SChernykh be434329d1 Removed dl dependency 2023-01-26 15:46:43 +01:00
SChernykh 67f091b843 CI: added FreeBSD build 2023-01-26 12:56:46 +01:00
SChernykh 33a592ee52 Fixed v2 signaling 2023-01-25 14:43:55 +01:00
SChernykh a574e68bb7 StratumServer: check for bans before checking shares 2023-01-25 11:36:52 +01:00
SChernykh 001c9e937d Fixed use of destroyed object 2023-01-24 08:19:13 +01:00
SChernykh f01bd88edd Fixed PPLNS window calculation 2023-01-24 07:59:36 +01:00
SChernykh 8700edb330 Miner: added m_sharesFailed to api data 2023-01-23 16:17:17 +01:00
SChernykh 9b686673ae Fixed m_sharesFailed initialization 2023-01-23 13:13:08 +01:00
SChernykh c841a2d2a9 Set new testnet hardfork date 2023-01-22 16:24:36 +01:00
SChernykh c8248b2d33 Merge pull request #230 from hinto-janaiyo/master
README: Update Gupax info
2023-01-22 09:57:34 +01:00
SChernykh 5e373b5304 Miner: count failed shares 2023-01-22 09:28:23 +01:00
hinto-janaiyo d73b506d09 readme: update gupax info 2023-01-22 02:44:47 +00:00
SChernykh d332f6cf23 Fixed PPLNS window display in status 2023-01-21 23:09:57 +01:00
SChernykh 1c4806e0d7 Fixed m_txkeySecSeed in block template update 2023-01-21 22:48:51 +01:00
SChernykh f5ac485ac8 TCPServer: optimized internal write buffers 2023-01-20 17:03:59 +01:00
SChernykh 595196b5ec Reduced transaction time-to-include delay
Based on data from https://rucknium.me/posts/monero-pool-transaction-delay/
> 95 percent all transactions arrived at all five Monero nodes within a five-second interval.
2023-01-20 13:14:58 +01:00
SChernykh 85d177d394 Miner: update extra_nonce on each new block 2023-01-19 11:22:22 +01:00
SChernykh 4ee8890166 Fixed status command output 2023-01-19 00:04:35 +01:00
SChernykh 5e8858c40e Fixed warning level 2023-01-18 20:57:45 +01:00
SChernykh 420cb71990 Fixed min difficulty setting 2023-01-18 16:16:35 +01:00
SChernykh 451778d704 Optimized RNG usage 2023-01-17 16:24:15 +01:00
SChernykh c855bb769a PoolBlock: removed unnecessary mutex 2023-01-17 13:20:09 +01:00
SChernykh f95d56d1eb Fixed wrong type in uv_walk 2023-01-17 08:15:53 +01:00
SChernykh fe5e209eb1 Don't limit min difficulty on testnet 2023-01-16 18:34:48 +01:00
SChernykh f206e4b334 Testnet fork on January 21st 2023-01-16 15:36:21 +01:00
SChernykh 5bd518da4b Optimized BlockTemplate::update() 2023-01-16 11:17:41 +01:00
SChernykh ec8e40907d Fixed a crash in status command 2023-01-15 22:20:06 +01:00
SChernykh e828709090 Optimized SideChain::get_outputs_blob() 2023-01-15 22:00:44 +01:00
SChernykh d4329ae594 Show file:line where panic() was called from 2023-01-14 12:37:08 +01:00
SChernykh 2c4c2b8469 Fixed a rare crash on exit 2023-01-13 18:25:04 +01:00
SChernykh 14f667de74 Support dynamic PPLNS window in status 2023-01-13 17:43:56 +01:00
SChernykh 578baeae96 API: added pplnsWeight to pool stats 2023-01-13 16:01:35 +01:00
SChernykh 1ad3fdfd46 Added more errors checks to p2pool_api 2023-01-13 15:16:06 +01:00
SChernykh 5eaf5d1f51 Update README.md 2023-01-13 10:29:12 +01:00
SChernykh 8e7df958b8 Use extra_nonce to signal hardfork readiness 2023-01-12 10:19:29 +01:00
SChernykh 4f2ad9a93c Optimized get_shares 2023-01-10 22:17:17 +01:00
SChernykh 850eb8e6e0 Fixed submit_block 2023-01-09 22:27:06 +01:00
SChernykh 47f551c046 Randomize output order for P2Pool payouts 2023-01-09 20:07:11 +01:00
SChernykh ae6747c82d Initialize tx key from previous blocks 2023-01-09 16:14:33 +01:00
SChernykh 1bd04c2840 Initialize tx key from random seed 2023-01-09 11:28:47 +01:00
SChernykh 11e4c459c9 pub/sec tx key cleanup 2023-01-09 01:15:06 +01:00
SChernykh 647319b731 Added missing check to update_chain_tip 2023-01-09 00:33:37 +01:00
SChernykh e0913f9068 Speed up calc_sidechain_hash 2023-01-08 23:29:54 +01:00
SChernykh af0fa872ae Set sidechain extra (duplicate shares fix) 2023-01-08 21:12:09 +01:00
SChernykh 1ce8f28105 Added sidechain extra 2023-01-08 17:07:28 +01:00
SChernykh a525f34fec Speed up calc_miner_tx_hash a lot
Cache keccak state and update it for new extra_nonce in O(1) time instead of O(N). It reduces the number `keccakf` calls from 30-150 to just 2-3. Time to generate 10,000 hashing blobs is reduced from 0.75s to 0.03s.
2023-01-08 14:17:44 +01:00
SChernykh 632f3faac5 Refactored keccak interface
- Allow calculating keccak hash in steps
- Only allow 32 and 200 byte final hashes
2023-01-08 13:06:20 +01:00
SChernykh 4f34c4466a Dynamic PPLNS window 2023-01-08 00:47:03 +01:00
SChernykh ccc5117172 Track shares that failed to be added 2023-01-07 15:50:02 +01:00
SChernykh b346b93285 Updated copyright 2023-01-04 13:07:55 +01:00
SChernykh 2b61c1d90f p2pool v2.7
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Successful in 3m12s
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Successful in 1m58s
C/C++ CI / build-ubuntu-static-libs (push) Successful in 3m27s
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Successful in 3m41s
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
2023-01-03 15:53:03 +01:00
SChernykh baf5a64c51 Add high fee transactions immediately 2023-01-02 14:32:13 +01:00
SChernykh 260564cff1 Check for NO_COLOR before logging starts 2023-01-01 22:12:16 +01:00
SChernykh 248f74d948 Updated libzmq 2023-01-01 15:55:50 +01:00
SChernykh 724a9e49df Updated curl to 7.87.0 2023-01-01 15:26:35 +01:00
SChernykh 726224b253 Support NO_COLOR environment variable 2023-01-01 11:47:13 +01:00
SChernykh 421e087d81 Fixed UV thread pool size 2022-12-26 19:52:15 +01:00
SChernykh a1ec97a221 Fixed submit_block error logging 2022-12-25 16:23:57 +01:00
SChernykh d151ed9354 Miner: fixed share counter reset logic 2022-12-22 21:53:04 +01:00
SChernykh 7502481f26 Fixed cppcheck issues 2022-12-22 21:00:59 +01:00
SChernykh 76e7e4956d Miner: fixed share counting during initial sync 2022-12-22 20:53:23 +01:00
SChernykh 15d25bca27 Fixed data race 2022-12-22 20:30:20 +01:00
SChernykh dffc8bcea0 Fixed cppcheck issues 2022-12-22 14:08:49 +01:00
SChernykh a61966ed61 Don't count shares that were found during sync 2022-12-22 11:48:50 +01:00
SChernykh e6d77a40e2 Check block major version in deserialize() 2022-12-19 10:29:29 +01:00
SChernykh edcb933874 Call get_miner_data again after startup is done
Startup sequence can take a while, so miner data can change - new transactions added, or a new block found by the network.
2022-12-18 11:46:18 +01:00
SChernykh be18ad4177 Made payout messages more visible 2022-12-18 11:06:38 +01:00
SChernykh 07a5b191bb Fixes for different BSD variants 2022-12-17 12:56:32 +01:00
SChernykh da12b329be Check the block id returned by BLOCK_RESPONSE 2022-12-14 14:24:09 +01:00
SChernykh 3902612c4b P2PServer: show more data for connected peers 2022-12-09 11:31:05 +01:00
SChernykh 9bce415523 Added alternative command line parameter names 2022-12-03 21:21:02 +01:00
SChernykh 3e4f877ec0 Display software name in peers list 2022-12-02 15:43:20 +01:00
SChernykh 1b601343ff Updated recommended command lines 2022-11-30 14:19:44 +01:00
SChernykh 77ee46e153 Updated RandomX 2022-11-30 10:40:25 +01:00
SChernykh 357c1a20df Updated recommended monerod command line 2022-11-29 11:33:55 +01:00
SChernykh 67bbfea87d p2pool v2.6
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Failing after 16m43s
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
2022-11-28 12:44:30 +01:00
SChernykh 220c6939b1 Ignore shares from peers who have lagging monerod
More than 10 seconds lag is unacceptable
2022-11-28 08:29:38 +01:00
SChernykh fd27ea0e8f Console: check for arguments when required 2022-11-25 21:58:25 +01:00
SChernykh 4bb1982806 Added BlockTemplate tests 2022-11-24 21:38:15 +01:00
SChernykh 9283677a2b Sync test: log more data in the end 2022-11-24 11:06:18 +01:00
SChernykh d4180a5084 Fixed Coverity issue 2022-11-24 08:43:13 +01:00
SChernykh 2721b16c46 Miner: fixed data race 2022-11-24 08:04:53 +01:00
SChernykh f1ff6a21ee Revert "Broadcast uncle blocks at the same height"
This reverts commit 530079b8a5.
2022-11-23 17:59:28 +01:00
SChernykh 530079b8a5 Broadcast uncle blocks at the same height
To reduce orphan block rate
2022-11-23 17:55:11 +01:00
SChernykh 2ca428bbbb BlockTemplate: non-ambiguous transaction order
Different nodes could pick different transactions with the same fee/byte which hurted compact broadcasts efficiency
2022-11-22 23:05:17 +01:00
SChernykh 8a27a8cce4 Added a safety check to block template update 2022-11-22 15:23:32 +01:00
SChernykh 7eec4d742c P2PServer: removed an unnecessary lock 2022-11-22 09:57:50 +01:00
SChernykh 3f66975e1b Optimized transaction picking algorithm 2022-11-21 17:09:56 +01:00
SChernykh b7f8c973f4 Refined transaction picking algorithm 2022-11-21 08:08:31 +01:00
SChernykh 98e51feb46 Updated libzmq 2022-11-18 20:23:14 +01:00
SChernykh 68fccd2edb Updated FAQ 2022-11-17 10:51:26 +01:00
SChernykh 72e414b2b7 Fixed struct alignment 2022-11-16 18:48:46 +01:00
SChernykh 79a31ce57c SideChain: reduce lock scope in get_outputs_blob 2022-11-16 14:23:13 +01:00
SChernykh 488ed8e562 Added more 128 bit calculations 2022-11-16 10:36:46 +01:00
SChernykh b3bce1651b SideChain: use full 128 bits in get_difficulty 2022-11-15 16:39:39 +01:00
SChernykh e9a2e4b076 Added html 2022-11-15 14:16:34 +01:00
SChernykh cc2f031a32 Fixed a race when stopping logger 2022-11-15 11:07:50 +01:00
SChernykh d0eea1bf91 Fixed libuv init/shutdown sequence 2022-11-14 23:35:59 +01:00
SChernykh 53ba29b288 Optimized crypto cache memory allocation 2022-11-13 17:30:47 +01:00
SChernykh c5f3a03d1e Improved peers display 2022-11-10 19:56:14 +01:00
SChernykh da9cdf7df3 Send our P2Pool version to other peers 2022-11-10 14:31:02 +01:00
SChernykh 8a7f1b1b3a Log shares found by other nodes 2022-11-10 08:22:31 +01:00
SChernykh aa14620a50 Merge branch 'compact_broadcast' 2022-11-10 07:56:30 +01:00
SChernykh 1fa6a7c11a Fixed mouse wheel scrolling on Windows 2022-11-09 23:46:10 +01:00
SChernykh 25806b67a2 Added protocol version negotiation
Protocol version 1.1: compact block broadcasts
2022-11-09 22:56:12 +01:00
SChernykh 47ff7e228e Added code to deserialize compact blobs 2022-11-09 16:21:31 +01:00
SChernykh c135787620 Prepare compact blob for block broadcasts
Reference transactions by index in the parent block instead of storing full 32 bytes per transaction
2022-11-09 12:40:45 +01:00
SChernykh bbc3d44526 P2PServer: tidy up PEER_LIST_RESPONSE messages 2022-11-08 16:36:09 +01:00
SChernykh 2e747beda6 Added sidechain height to SHARE FOUND log 2022-11-08 14:27:03 +01:00
SChernykh b9a9be2795 Update robin-hood-hashing 2022-11-04 10:35:25 +01:00
SChernykh 19414b061b Refactored BackgroundJobTracker 2022-11-04 10:20:32 +01:00
SChernykh 74b5ab1798 Force update block template after 30 seconds
To get new transactions in
2022-11-04 07:47:07 +01:00
SChernykh 83cda110aa P2PServer: tweaked invalid timestamp messages 2022-11-03 21:19:48 +01:00
SChernykh 6f87546492 Update README.md 2022-11-03 19:55:25 +01:00
SChernykh 1f7c89a95c Fixed Coverity issues 2022-11-03 19:24:15 +01:00
SChernykh 0df11d24f5 P2PServer: tweaked invalid timestamp logic 2022-11-03 16:14:56 +01:00
SChernykh a6c27a1e3f P2PServer: checks timestamps only for new blocks 2022-11-03 15:20:38 +01:00
SChernykh 0a5fa12ce5 Update wallet_tests.cpp 2022-11-03 14:29:57 +01:00
SChernykh c090b0cf62 P2PServer: tweaked invalid timestamp logic 2022-11-03 13:52:29 +01:00
SChernykh 45660e3d96 Show wallet address in error messages and status 2022-11-03 11:38:43 +01:00
SChernykh 732190bb11 P2PServer: sanity check for timestamps 2022-11-03 08:51:06 +01:00
SChernykh b667f88d0e Updated cppzmq 2022-11-02 15:10:16 +01:00
SChernykh 255d312ae0 SideChain: log blocks with the same id 2022-11-02 12:49:12 +01:00
SChernykh cc92ae7998 Retry get_block_headers_range RPC call if it fails 2022-11-02 11:36:29 +01:00
SChernykh ae9905e4c7 CI: removed Ubuntu 18.04 2022-11-02 09:45:59 +01:00
SChernykh 38469c26ff Updated curl to 7.86.0 2022-11-02 08:47:54 +01:00
SChernykh 07b460147e P2PServer: added missing time check 2022-11-01 16:07:13 +01:00
SChernykh 6cf1b13500 p2pool v2.5
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-18.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
2022-10-31 17:39:33 +01:00
SChernykh 4a8d4ab8d9 Updated github actions 2022-10-28 14:32:49 +02:00
SChernykh 65a9574e52 Added --p2p-external-port command line parameter 2022-10-28 14:06:26 +02:00
SChernykh 6eacb677a4 Update README.md 2022-10-20 10:36:52 +02:00
SChernykh d081c8ea74 TCPServer: fixed data race during shutdown 2022-10-18 18:41:58 +02:00
SChernykh 0342e7ffb5 Enabled parallel compilation 2022-10-13 21:41:08 +02:00
SChernykh c029e5c39d Added macro for debug builds 2022-10-13 11:21:40 +02:00
SChernykh a917a9493c Randomize extra_nonce
To guarantee that hashing blobs will be different between different p2pool nodes, even if they mine to the same wallet address and don't have transactions to shuffle within the block template.
2022-10-11 11:33:58 +02:00
SChernykh 02405bb8ff Workaround for duplicate sidechain IDs
Place transactions in the block template in random order, so two different p2pool nodes mining to the same wallet will get different sidechain IDs with high probability if there's more than 2-3 transactions in mempool.
2022-10-10 21:50:33 +02:00
SChernykh d8bb85a1d8 Fix: api didn't always save total hashes 2022-10-09 18:17:01 +02:00
SChernykh fd6b2360aa Fix: uv_close was called from wrong thread 2022-10-07 16:02:08 +02:00
SChernykh 3e655961e9 Merge pull request #206 from SChernykh/reduce_memory
Reduced memory usage
2022-10-06 20:01:55 +03:00
SChernykh 077837054b Optimized TxOutput struct 2022-10-04 21:03:56 +02:00
SChernykh 45674ef554 Better cache cleanup 2022-10-04 20:04:41 +02:00
SChernykh eabf856dbd Removed redundant m_sideChainData 2022-10-04 15:49:58 +02:00
SChernykh 32ea0f2cf6 Clear crypto cache more often 2022-10-04 14:37:55 +02:00
SChernykh 47f40c0be3 Fixed curl include directory 2022-10-03 20:05:33 +02:00
SChernykh 6a66615f37 Removed redundant m_mainChainData 2022-10-03 18:42:32 +02:00
SChernykh 314a1ba39b p2pool v2.4
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-18.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (map[os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
2022-09-30 17:52:33 +02:00
SChernykh 2daa7f9fea Fixed memory leak 2022-09-28 22:43:38 +02:00
SChernykh f0d576e1b0 Reduced memory usage for each PoolBlock 2022-09-28 16:50:30 +02:00
SChernykh be76c58264 Fixed MSYS2 build 2022-09-26 01:02:26 +02:00
SChernykh 8245f232d4 Updated dependencies 2022-09-25 19:45:52 +02:00
SChernykh 7468af0779 TCPServer: fix incoming connection counting 2022-09-22 11:28:38 +02:00
SChernykh 38a6d3e549 Limit max in/out peers to 450
To avoid hitting default open files limit (1024)
2022-09-20 10:39:55 +02:00
SChernykh 3022588e35 Run tests in debug config on Windows 2022-09-14 18:30:59 +02:00
SChernykh b81f1c4975 Require monerod v0.18 2022-09-14 14:45:10 +02:00
SChernykh ed78e9df6e More reliable file load/save 2022-09-13 18:48:00 +02:00
SChernykh f044149004 P2PServer fix: reset ping time on disconnect 2022-09-13 16:14:54 +02:00
SChernykh f126eb7611 P2PServer: added more logging 2022-09-13 11:12:08 +02:00
SChernykh afa9cf371e P2PServer: sync from the fastest peer if possible 2022-09-13 10:51:15 +02:00
SChernykh f813cf6d36 Fix: possible use after free on shutdown
Console commands could access destroyed objects
2022-09-08 16:16:00 +02:00
SChernykh 3dcd3dbb7f Update README.md 2022-09-08 13:45:06 +02:00
SChernykh d80a06bc8e Added more error logging 2022-09-08 09:18:30 +02:00
SChernykh 947178f10a StratumServer: improved warning message 2022-09-07 08:59:04 +02:00
SChernykh e92cc7d50c Fix: don't use proxy for incoming connections 2022-09-06 15:59:05 +02:00
SChernykh 989a28a8ca TCPServer small fixes 2022-09-05 15:14:10 +02:00
SChernykh e4dd46b498 Added --no-dns command line parameter 2022-09-04 18:10:14 +02:00
SChernykh c49e8d4770 Merge branch 'proxy' 2022-09-04 09:57:32 +02:00
SChernykh 86156f3fec SOCKS5 proxy support 2022-09-03 22:35:38 +02:00
SChernykh fec826b10e Changed spammy warning to level 5 2022-09-01 10:09:23 +02:00
SChernykh 229b07391b CI: build for aarch64 on all Ubuntu versions 2022-08-31 09:49:45 +02:00
SChernykh e157477b6d Create COMMAND_LINE.MD 2022-08-30 23:22:55 +02:00
SChernykh d40bb61da8 p2pool v2.3
C/C++ CI / build-ubuntu (map[c:gcc-12 cpp:g++-12 os:ubuntu-22.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-20.04]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-macos (macos-12) (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
Sync test / sync-test-macos (push) Has been cancelled
Sync test / sync-test-windows (push) Has been cancelled
Sync test / sync-test-ubuntu (push) Has been cancelled
2022-08-30 18:01:45 +02:00
SChernykh 4733d42932 TCPServer: more informative error messages 2022-08-27 10:52:02 +02:00
SChernykh e6030dcc3f Update googletest 2022-08-26 15:50:31 +02:00
SChernykh 6615fa67f5 API: fixed error messages 2022-08-26 09:39:44 +02:00
SChernykh dc4b88d08e API: use unique temp file names 2022-08-25 09:52:58 +02:00
SChernykh cc2abe3c30 Update rapidjson 2022-08-24 18:18:31 +02:00
SChernykh 70640b65ea Updated dependencies 2022-08-24 18:14:47 +02:00
SChernykh 4599d81a59 API: save to temp file first and then rename it 2022-08-24 17:28:53 +02:00
SChernykh 3ea5b575b7 JSON RPC: added more error checks 2022-08-24 15:17:23 +02:00
SChernykh b9eb66e2b3 Added a test for mini chain 2022-08-23 21:37:55 +02:00
SChernykh bde5b19c77 CI: added sync test 2022-08-23 19:49:41 +02:00
SChernykh cc60ab3d63 StratumServer: added scoring system for clients
Ban clients only after a few bad shares without good shares compensating them.
2022-08-22 11:07:11 +02:00
SChernykh 42f7e6f486 CI: fixed MSVC analysis 2022-08-19 22:16:48 +02:00
SChernykh 5f68b5923d CI: added Ubuntu 22.04 2022-08-18 16:43:19 +02:00
SChernykh 85abbdd699 Fixed NixOS files 2022-08-18 16:07:59 +02:00
SChernykh 3802886722 Fixed "unknown command" message 2022-08-17 19:37:18 +02:00
SChernykh d4e27a27cb Tweaked SideChain::get_missing_blocks() 2022-08-17 16:44:40 +02:00
SChernykh e882b91b06 Reduced lock contention in Cache::get_derivation() 2022-08-16 18:15:41 +02:00
SChernykh 4c8dbee79d More fine-grained locks in crypto cache 2022-08-15 18:39:28 +02:00
SChernykh 1438175477 CI: macos-10.15 is deprecated 2022-08-15 16:09:41 +02:00
SChernykh 30861bbf91 Speedup SideChain::get_outputs_blob() 2022-08-15 13:48:21 +02:00
SChernykh ea6a19a260 Fixed data race 2022-08-06 11:15:09 +02:00
SChernykh fc81fa8745 JSON RPC: added more error checking 2022-08-06 10:03:10 +02:00
SChernykh 948436e57e Fixed coverity issue 2022-08-05 15:27:39 +02:00
SChernykh 3dde71f1ff Fixed processing of long console commands 2022-08-05 09:09:14 +02:00
SChernykh be0e220fe4 Merge pull request #190 from bladedoyle/monero_18
support monero v0.18.0.0 and minor fixes
2022-07-18 11:38:48 +02:00
Blade Doyle 2e9a209a78 support monero v0.18.0.0 and minor fixes 2022-07-17 08:03:29 -07:00
SChernykh 3ce4f06b6c Update CMakeLists.txt 2022-07-14 20:57:22 +02:00
SChernykh 555414cd51 SideChain: improved precalculation coverage 2022-07-14 19:29:41 +02:00
SChernykh c33033b2f4 Code cleanup 2022-07-14 14:28:06 +02:00
SChernykh 3c697c2d7e Fixed potential deadlock
Can't lock `m_minerLock` inside SideChain update
2022-07-14 13:15:35 +02:00
SChernykh 0e7c1aa481 SideChain: stricter checks for number of threads 2022-07-14 11:39:19 +02:00
SChernykh 7d5ff13f75 Fixed cppcheck warnings 2022-07-14 11:23:56 +02:00
SChernykh 02a8a512dc SideChain: precalculate tx pubkeys for faster sync 2022-07-14 10:28:25 +02:00
SChernykh 4733f46a28 Added uv_cond_init_checked 2022-07-14 09:02:08 +02:00
SChernykh 945de348f3 Rewrote get_view_tag without std::find_if 2022-07-12 09:50:49 +02:00
SChernykh 20dd9d7adc More efficient view tags caching 2022-07-11 16:42:26 +02:00
SChernykh c5bd184bbc P2PServer: don't deserialize the same block twice 2022-07-10 10:24:03 +02:00
SChernykh ae161fac49 Merge pull request #181 from bladedoyle/more_docker_compose_configure
add more configurations; add statistics webserver
2022-07-10 09:15:11 +02:00
Blade Doyle 8eb780a8b5 add more configurations; add statistics webserver 2022-07-09 16:54:43 -07:00
SChernykh 1c33cc9f3d p2pool v2.2.1
C/C++ CI / build-ubuntu (map[c:gcc cpp:g++ os:ubuntu-18.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-10.15) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-latest]) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Failing after 16m37s
2022-07-08 17:47:28 +02:00
SChernykh 9d692d5194 ConsoleCommands: check if console is available 2022-07-07 08:32:37 +02:00
SChernykh a7da7f932c Update libuv to Version 1.44.1 (Stable) 2022-07-06 20:22:02 +02:00
SChernykh 2e4f7adee4 TCPServer: added more checks during disconnects 2022-07-06 14:17:09 +02:00
SChernykh dcb822f812 ConsoleCommands: read from stdin using libuv 2022-07-05 22:08:18 +02:00
SChernykh 5da286fed4 JSON RPC: added HTTP headers 2022-07-05 14:54:04 +02:00
SChernykh 4ec0fe8d96 Fixed JSON RPC handling during shutdown 2022-07-05 14:34:22 +02:00
SChernykh 340a3e85c8 Fixed autodiff when running for a long time
16-bit wrap around wasn't processed correctly
2022-07-05 10:02:18 +02:00
SChernykh 64baf660bb JSON RPC: fixed shutdown on connect error 2022-07-05 08:36:16 +02:00
SChernykh 4f24f18b27 Updated Monero network upgrade info 2022-07-01 09:23:28 +02:00
SChernykh c5ea4dca67 p2pool v2.2
C/C++ CI / build-ubuntu (map[c:gcc cpp:g++ os:ubuntu-18.04]) (push) Has been cancelled
C/C++ CI / build-ubuntu-static-libs (push) Has been cancelled
C/C++ CI / build-ubuntu (map[c:gcc-11 cpp:g++-11 os:ubuntu-latest]) (push) Has been cancelled
C/C++ CI / build-ubuntu-aarch64 (push) Has been cancelled
C/C++ CI / build-windows-msys2 (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\ os:2019 rx:ON vs:Visual Studio 16 2019]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:OFF vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-windows-msbuild (map[msbuild:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\amd64\ os:2022 rx:ON vs:Visual Studio 17 2022]) (push) Has been cancelled
C/C++ CI / build-macos (macos-10.15) (push) Has been cancelled
C/C++ CI / build-macos (macos-11) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
cppcheck / cppcheck-windows (push) Has been cancelled
cppcheck / cppcheck-ubuntu (push) Has been cancelled
Microsoft C++ Code Analysis / Analyze (push) Has been cancelled
2022-06-30 17:58:40 +02:00
SChernykh deaf47155f Miner: reset share counter when synchronized 2022-06-30 12:13:17 +02:00
SChernykh a1d1420ec3 Miner: display shares found in status 2022-06-30 10:15:51 +02:00
SChernykh a133a25cc3 Update c-cpp.yml 2022-06-29 19:17:43 +02:00
SChernykh 65e15b5205 Turned off more unused curl stuff 2022-06-29 18:40:39 +02:00
SChernykh ac123939e5 Fixed MSVC builds 2022-06-29 12:38:28 +02:00
SChernykh 2cafc570a8 Updated dependencies 2022-06-29 08:36:51 +02:00
SChernykh 9e5d5cecd4 Added get_tx_keys tests 2022-06-28 18:00:01 +02:00
SChernykh deb8d59130 Fixed cppcheck error 2022-06-28 10:58:41 +02:00
SChernykh 14bbf96feb Enforce deterministic tx keys starting from v15 2022-06-28 10:44:16 +02:00
SChernykh ee1c5a0a56 Update RandomX 2022-06-27 16:44:03 +02:00
SChernykh a281db1cbb Fixed unaligned read 2022-06-27 16:20:45 +02:00
SChernykh b25e5449c8 Fixed rare "low diff share" errors 2022-06-26 17:07:19 +02:00
SChernykh b267c19a45 Limit autodiff to 4M for max compatibility 2022-06-26 17:06:21 +02:00
SChernykh 0bda37057a Merge pull request #176 from kpcyrd/install-on-archlinux
README: Update install instructions for Arch Linux
2022-06-20 23:00:27 +02:00
SChernykh 2aa8d2bdcc Code cleanup 2022-06-20 22:37:33 +02:00
kpcyrd eebcbb5cc2 README: Update install instructions for Arch Linux 2022-06-20 22:27:23 +02:00
SChernykh acf37ff10f Added json parser tests 2022-06-20 10:50:30 +02:00
SChernykh 56c239a368 Merge pull request #175 from bladedoyle/docker_compose_configure
Add docker-compose configuration menu
2022-06-20 07:30:14 +02:00
Blade Doyle ae7386e7be Add docker-compose configuration menu 2022-06-20 01:55:48 +00:00
SChernykh 9ddf510716 Merge pull request #174 from bladedoyle/add_libcurl
Add libcurl to p2pool Dockerfile
2022-06-16 00:52:19 +02:00
Blade Doyle d79fefe546 Add libcurl to p2pool Dockerfile; adjust a few monerod options 2022-06-15 21:58:37 +00:00
SChernykh 921cbb0b69 ConsoleCommands: don't exit on EOF 2022-06-15 07:54:53 +02:00
SChernykh 7f1b849394 Fixed new cppcheck issues 2022-06-13 07:30:59 +02:00
SChernykh 9f4388843a Fixed error messages 2022-06-10 07:48:47 +02:00
SChernykh 37fba30c79 JSON RPC: fixed error checking 2022-06-08 18:58:32 +02:00
SChernykh 8f1fd55e2f Fixed more memory leaks in TCPServer 2022-06-07 22:25:27 +02:00
SChernykh 8af9e9b27d Fixed memory leaks 2022-06-07 19:40:13 +02:00
SChernykh 8b681d6efb Added memory hooks for CURL 2022-06-07 16:02:08 +02:00
SChernykh 75b9a0228b Updated Termux build instructions 2022-06-07 15:34:28 +02:00
SChernykh cbc00e6416 Use gcc-11 for build-ubuntu-static-libs 2022-06-07 14:37:26 +02:00
SChernykh a0778c8d7b CURL error checking 2022-06-06 17:08:36 +02:00
SChernykh 0c4dc82c65 Merge pull request #169 from SChernykh/curl
Change llhttp to libcurl
2022-06-06 15:56:25 +02:00
SChernykh a35d4b2701 Change llhttp to libcurl 2022-06-06 15:08:37 +02:00
SChernykh 05b0973a23 More reliable p2pool shutdown logic 2022-06-03 18:28:10 +02:00
SChernykh 09f46beeb4 SideChain: added more checks to is_longer_chain() 2022-06-03 17:28:46 +02:00
SChernykh b4c7eea4d9 Updated CodeQL action to v2 2022-06-02 11:22:43 +02:00
SChernykh 8159ecfce4 Merge pull request #167 from bladedoyle/issue150
Fix for Issue #150 - xmrig container not building
2022-06-01 21:10:14 +02:00
Blade Doyle 662e2b5ba0 Fix for Issue #150 - xmrig container not building 2022-06-01 11:03:29 -07:00
SChernykh 5ca9f968aa Update RandomX 2022-06-01 16:18:52 +02:00
SChernykh 6ef34bb3f5 Enabled more compiler warnings 2022-06-01 16:13:18 +02:00
SChernykh 9a5be0a321 p2pool v2.1 2022-05-31 18:20:21 +02:00
SChernykh c203f6eb0a Fixed a new cppcheck issue 2022-05-31 16:51:09 +02:00
SChernykh b713f4e702 CI: added Linux aarch64 build 2022-05-31 16:38:28 +02:00
SChernykh 111087d96a Fixed block reward share calculation 2022-05-28 22:27:46 +02:00
SChernykh 9e7666d12f Fixed data races 2022-05-28 21:46:50 +02:00
SChernykh cb147773b5 Updated cppcheck workflow on Linux 2022-05-26 21:19:01 +02:00
SChernykh d84bef8f14 Added block reward share percent to miner api 2022-05-26 11:08:16 +02:00
SChernykh 32bb318af4 Fixed cppcheck workflow on Windows 2022-05-25 20:05:17 +02:00
SChernykh 055b5e2256 Updated dependencies 2022-05-25 12:54:40 +02:00
SChernykh c1754d122f Update RandomX 2022-05-24 15:42:37 +02:00
SChernykh 6d121122f8 Fixed compiler warnings in tests 2022-05-24 15:18:09 +02:00
SChernykh bfa8334aeb Fixed executable stack 2022-05-23 21:41:17 +02:00
SChernykh 0e222afd6a Exit if server startup fails 2022-05-23 15:50:25 +02:00
SChernykh b191962d32 Handle startup errors without calling abort() 2022-05-23 09:37:11 +02:00
SChernykh 1cf13e142a SideChain: fixed alternative chain detection 2022-05-16 15:59:48 +02:00
SChernykh 8f1f81749d StratumServer: reset cumulative hashes too 2022-05-16 14:36:11 +02:00
SChernykh 72d70eba16 SideChain: added "synchronized" log message 2022-05-16 01:48:37 +02:00
SChernykh ae3612f595 Fixed worker diff display when autodiff is off 2022-05-15 18:13:36 +02:00
SChernykh 37b6457054 Show worker hashrate only when autodiff is on 2022-05-15 01:15:21 +02:00
SChernykh 9579be5c7d Optimized SideChain::miner_count() 2022-05-12 22:18:08 +02:00
SChernykh d05d47fa75 Fixed compilation 2022-05-12 16:10:55 +02:00
SChernykh bd88c04e9e SideChain: mutex locks refactoring 2022-05-12 15:24:02 +02:00
SChernykh eb3a3872eb Fixed missing blocks download logic 2022-05-12 08:49:34 +02:00
SChernykh 5cea7be405 Allow only one pending get_miner_data 2022-05-12 01:09:59 +02:00
SChernykh 516c382fe4 Update keccak.cpp 2022-05-11 16:13:00 +02:00
SChernykh 710e55422a Ignore duplicate get_miner_data 2022-05-11 16:10:10 +02:00
SChernykh 3406cf78b4 Don't return stale chain tip to other peers 2022-05-11 15:07:54 +02:00
SChernykh 8fa354796c Reload peer list when there are no connections 2022-05-11 14:09:28 +02:00
SChernykh 6c6ef1c1b8 Restart ZMQ connection if it looks dead 2022-05-11 13:50:47 +02:00
SChernykh c3c326c680 Suppress MSVC warnings 2022-05-11 10:55:36 +02:00
SChernykh 92e20485b2 Log: don't allow side effects in LOG() calls 2022-05-10 21:41:53 +02:00
SChernykh edd782ac23 Fixed custom worker names 2022-05-10 14:01:10 +02:00
SChernykh a4d84e318d TCPServer: refactored Client constructor 2022-05-09 19:13:34 +02:00
SChernykh 08ee599f79 Use the same compilation flags for tests 2022-05-09 17:57:31 +02:00
SChernykh 134f2d68a3 Fixed data races 2022-05-09 16:10:55 +02:00
SChernykh d23c46ff84 Added bsr() function to util 2022-05-09 13:02:06 +02:00
SChernykh 820c5db5e8 Log: check for logrotate only once per loop 2022-05-09 09:58:43 +02:00
SChernykh 990916ab62 StratumServer: added autodiff
Autodiff is enabled by default, target time is 30 seconds. It can be disabled with `--no-autodiff` command line option.
2022-05-08 19:03:00 +02:00
SChernykh d4e362cd76 TCPServer: optimized Client struct size 2022-05-07 12:35:31 +02:00
SChernykh 1dd06cc509 Removed std::string to avoid memory allocation 2022-05-07 11:00:29 +02:00
SChernykh 2e2bd1d137 Added log padding 2022-05-06 20:04:01 +02:00
SChernykh 0818d91f4f StratumServer: added console command workers 2022-05-06 13:19:56 +02:00
SChernykh 6e1f34b168 Termux build instructions 2022-05-05 15:53:04 +02:00
SChernykh 1a35177633 Fixed unsafe usage of log::Stream buffers 2022-05-05 14:38:56 +02:00
SChernykh c45689b02b Fixed pthread_cancel detection 2022-05-03 21:03:06 +02:00
SChernykh 8f27d940e3 Don't ban localhost 2022-05-03 13:11:55 +02:00
SChernykh 6b4640c413 Fixes for Termux 2022-05-03 07:32:47 +02:00
SChernykh 8aebcdc580 p2pool v2.0 2022-04-30 17:50:27 +02:00
SChernykh e23a2e77a8 Updated dependencies 2022-04-30 12:10:09 +02:00
SChernykh 0f9362e14e More tests for derive_view_tag 2022-04-29 22:25:22 +02:00
SChernykh ab974b9684 Monero network upgrade information 2022-04-29 14:35:06 +02:00
SChernykh 54acfee036 Merge pull request #144 from SChernykh/view_tags
v15 hardfork changes
2022-04-27 19:56:42 +02:00
SChernykh a78ddb50d5 Fixed logger thread timing logic 2022-04-24 16:22:22 +02:00
SChernykh b2f86a5f6b Ban peers with stuck or lagging monerod 2022-04-23 11:29:17 +02:00
SChernykh 2a77695832 Fixed data races in miner 2022-04-09 18:25:12 +02:00
SChernykh 21d8cb917b Fixed data race in logger 2022-04-09 10:41:20 +02:00
SChernykh 2c70bf8616 View tags support
See http://github.com/monero-project/monero/pull/8061
2022-04-09 00:56:42 +02:00
SChernykh 7522111bb7 Fixed data races 2022-04-09 00:38:15 +02:00
SChernykh 7b5b910f3f Undefined behaviour fixes 2022-04-08 22:49:08 +02:00
SChernykh afb52e4235 Check return value (Coverity fix) 2022-04-07 19:33:39 +02:00
SChernykh 93cd9a659a Code cleanup 2022-04-07 19:11:20 +02:00
SChernykh 9e287ab4f0 Logger fixes
- Fixed a race condition when stopping the logger
- Flush log file only once per batch of log lines
2022-04-07 16:55:35 +02:00
SChernykh 094209f311 P2PServer: optimized update_peer_connections() 2022-04-07 16:48:01 +02:00
SChernykh dee66c3f32 Added varint unit tests 2022-04-06 16:34:16 +02:00
SChernykh 32533e3c96 FreeBSD build 2022-04-05 19:36:37 +02:00
SChernykh a073923a82 Updated dependencies 2022-04-05 11:32:39 +02:00
SChernykh 3484b24caa Updated dependencies 2022-04-04 19:56:42 +02:00
SChernykh 1b3c1eb850 P2PServer: increased peer timeout to 15 minutes 2022-03-30 22:47:10 +02:00
SChernykh 7fe032915f Ignore SIGPIPE 2022-03-30 21:53:52 +02:00
SChernykh 5b9b73abcc p2pool v1.9 2022-03-30 20:15:47 +02:00
SChernykh a2afa29052 Updated copyright 2022-03-30 14:42:26 +02:00
SChernykh a2d3dbad5e Use old bock template when update fails 2022-03-30 10:11:35 +02:00
SChernykh e50cf060cb Miner: fixed share counter initialization 2022-03-30 08:34:22 +02:00
SChernykh 915988d694 Added logging for the extra_nonce fix 2022-03-30 07:59:59 +02:00
SChernykh 345c231a9a Update config.json 2022-03-28 19:12:21 +02:00
SChernykh a7aed2f221 Fixed miner tx creation 2022-03-28 11:28:56 +02:00
SChernykh 292e2580e5 Make sure dataset init doesn't block start 2022-03-24 20:55:35 +01:00
SChernykh 028a5d0c88 Fixed memory leak after loading block cache 2022-03-24 18:30:23 +01:00
SChernykh 8b27faad6d BlockCache: fixed collisions of same height blocks 2022-03-24 16:03:12 +01:00
SChernykh cdc3206ee8 Optimized keccak 2022-03-24 12:52:57 +01:00
SChernykh 0c2b7d6010 More time handling fixes 2022-03-23 15:49:24 +01:00
SChernykh ef15c3b54f Show sidechain ID in status 2022-03-23 14:17:40 +01:00
SChernykh f4bcdc7fe9 Use steady_clock to time peer list requests 2022-03-23 11:37:05 +01:00
SChernykh aada1bb5cc Use chrono::steady_clock for internal timestamps 2022-03-23 11:30:38 +01:00
SChernykh 796850d8c5 Update CMakeLists.txt 2022-03-18 14:53:30 +01:00
SChernykh ab0bc0488e Removed libsodium as it's not used in compilation 2022-03-18 14:43:23 +01:00
SChernykh f3af02111d Update README.md 2022-03-18 10:31:06 +01:00
SChernykh c21d052d7a Refactored RNG usage across the code 2022-03-17 16:14:29 +01:00
SChernykh 62b1690780 Added an option to disable RandomX for the build 2022-03-15 17:11:45 +01:00
SChernykh 52050bbcfb Update difficulty_type_tests.cpp 2022-03-10 19:11:49 +01:00
SChernykh 0db57e5047 p2pool v1.8 2022-02-27 19:56:47 +01:00
SChernykh e7919514d4 TCPServer: fixed uninitialized variables 2022-02-25 15:31:35 +01:00
SChernykh 7ab21c6afd TCPServer: reduced memory usage 2022-02-23 17:07:50 +01:00
SChernykh 2209e0cc70 P2PServer: relaxed peer list request restriction 2022-02-22 11:06:12 +01:00
SChernykh a73b4616a4 Fixed Coverity issues 2022-02-22 00:38:08 +01:00
SChernykh 9593311332 Added bans console command 2022-02-21 19:59:57 +01:00
SChernykh 9a09d15bea P2PServer: use high_resolution_clock for ping time 2022-02-21 18:46:53 +01:00
SChernykh f082488e4b TCPServer: use steady_clock for bans 2022-02-21 18:41:36 +01:00
SChernykh c56773d4d6 Update cppcheck.yml 2022-02-21 16:59:32 +01:00
SChernykh 752e2381d6 P2PServer: added more protocol checks 2022-02-21 16:54:53 +01:00
SChernykh 03f829e18c Fixed formatting 2022-02-21 10:05:47 +01:00
Hayden Cardwell 06b66c99db Cleanup/Re-work of README 2022-02-21 09:55:14 +01:00
SChernykh 0b0ad9ff82 Fix tests compilation 2022-02-21 09:32:32 +01:00
SChernykh de9f13d393 Check for unknown command line parameters 2022-02-21 08:02:36 +01:00
SChernykh 272d206741 stats_mod api: updated min payout value 2022-02-20 17:08:27 +01:00
SChernykh c9493ec7fa Merge pull request #123 from bladedoyle/mini
Support mini pool.  Cleanup
2022-02-20 16:16:10 +01:00
Blade Doyle 5ef4134955 Support mini pool. Cleanup 2022-02-19 15:27:37 -08:00
SChernykh 8045c40026 Check for proper --local-api usage 2022-02-18 16:21:28 +01:00
SChernykh d4a1b14820 Use monerod peers to find p2pool nodes 2022-02-17 22:10:52 +01:00
SChernykh cc6ce4a366 Reset stratum share counters after initial sync 2022-02-17 11:19:11 +01:00
SChernykh 25e5f80a81 Merge pull request #121 from hayden-cardwell/master
Add a link to SethForPrivacy's Linux guide
2022-02-17 09:48:00 +01:00
Hayden Cardwell d4b339b1a3 Add a link to SethForPrivacy's Linux guide
Added a link to SethForPrivacy's guide within the Linux instructions, to potentially assist those who may need a bit more hand holding, or followed his previous guide to deploy a node.
2022-02-16 18:14:51 -06:00
SChernykh 4bdd524d84 Merge pull request #120 from SChernykh/tmp
MacOS CI: build and static link libuv and libzmq
2022-02-16 12:20:05 +01:00
SChernykh b78fe02405 MacOS CI: build and static link libuv and libzmq 2022-02-16 11:27:34 +01:00
SChernykh dfa0c7ffb1 Merge pull request #119 from SamsungGalaxyPlayer/patch-3
Add monero.com to list of compatible wallets
2022-02-15 21:33:00 +01:00
Justin Ehrenhofer ec97a14da7 Add monero.com to list of compatible wallets
Monero.com used the 4.2.8 Cake Wallet base, so all versions of that app are compatible
2022-02-15 10:06:35 -06:00
SChernykh 3a2e9e8b94 Merge pull request #117 from SamsungGalaxyPlayer/patch-1
Remove outdated note to "current" version
2022-02-15 17:03:45 +01:00
Justin Ehrenhofer 069c96aa1d Remove outdated note to "current" version 2022-02-15 09:55:05 -06:00
SChernykh 42370bf11e p2pool v1.7 2022-02-14 19:29:55 +01:00
SChernykh dc506bb1b9 Update README.md 2022-02-14 14:08:36 +01:00
SChernykh ec2f4467fb Added --mini command line option to connect to p2pool-mini 2022-02-14 13:57:59 +01:00
SChernykh 9f449320b5 StartumServer: disconnect and ban inactive clients 2022-02-08 15:00:08 +01:00
SChernykh 8767ef9e19 Display payout amount when a block is found 2022-01-29 17:09:43 +01:00
SChernykh cf184295b4 Updated version 2022-01-26 19:42:49 +01:00
SChernykh 0cd9876a46 Updated dependencies 2022-01-25 00:05:38 +01:00
SChernykh 1e4e4bd08e Added miner statistics to data api 2022-01-24 10:42:21 +01:00
SChernykh a640e41d74 Improved RNG initialization 2022-01-24 00:37:39 +01:00
SChernykh f90e00edea Moved "how to mine" up in the readme 2022-01-23 15:55:57 +01:00
SChernykh 38ffd73b54 Fixed new Coverity issue 2022-01-23 13:03:56 +01:00
SChernykh c10a5ce323 Miner code cleanup 2022-01-23 11:03:26 +01:00
SChernykh e2931f94b5 Added embedded miner 2022-01-22 23:30:19 +01:00
SChernykh 95c268be4c Update msvc-analysis.yml 2022-01-20 13:41:38 +01:00
SChernykh 4ac4f8f860 Update README.md
XMR block reward has decreased, so minimum payout is now ~0.0003 XMR
2022-01-20 13:22:34 +01:00
SChernykh 248fcee174 Update version 2022-01-09 17:19:20 +01:00
SChernykh 89bcceb986 Added p2pool mini seed nodes and default port 2021-12-30 11:10:18 +01:00
SChernykh 2b01350add Added outpeers and inpeers console commands 2021-12-26 15:28:33 +01:00
SChernykh f1b6212c82 P2PServer: add connection limits
#87 Added `--out-peers` and `--in-peers` command line options.
2021-12-26 14:59:45 +01:00
SChernykh 7d961ab3b9 Merge pull request #89 from bladedoyle/monero_p2pool_support
Monero latest release supports p2pool
2021-12-24 22:40:54 +01:00
Blade Doyle 862e7d965b Monero latest release supports p2pool 2021-12-24 11:38:53 -08:00
SChernykh da2d9f7e2e Update README.md 2021-12-07 19:11:51 +01:00
SChernykh d8bba4dc82 Updated version mismatch error message 2021-12-07 16:25:23 +01:00
SChernykh 3a8a24a5ee Updated dependencies 2021-12-07 16:09:21 +01:00
SChernykh eaf29872cb Update version 2021-12-01 18:24:36 +01:00
SChernykh 74f553274f Update c-cpp.yml
Use macos-10.15 instead of "latest".
2021-11-23 14:08:38 +01:00
SChernykh d0f1e6eb2e Merge pull request #78 from SChernykh/calcpow
Added "calc_pow" RPC support
2021-11-21 09:20:01 +01:00
SChernykh f9def6cb73 Added "calc_pow" RPC support 2021-11-21 09:12:21 +01:00
SChernykh 2f659c8ecf Update c-cpp.yml 2021-11-11 22:59:04 +01:00
SChernykh 2d559ca764 Merge pull request #71 from bladedoyle/docker-compose
docker-compose project for Monero P2Pool and all requirements
2021-11-11 22:00:29 +01:00
Blade Doyle 1328ea6aef docker-compose project for Monero P2Pool and all requirements 2021-11-11 12:52:03 -08:00
SChernykh 07cfb54bdc JSONRPCRequest: fixed undefined behavior in the error handler 2021-11-10 16:26:01 +01:00
SChernykh 5dd8d11b72 TCPServer: removed unused field 2021-11-09 15:48:59 +01:00
SChernykh dbab191bfc C/C++ CI: use GCC 11 for the ubuntu-latest build 2021-11-08 16:03:43 +01:00
SChernykh e44baad73c Update version 2021-11-05 15:39:20 +01:00
SChernykh bb7a5b4d6d Cleanup 2021-11-02 17:18:02 +01:00
SChernykh 64116643c2 Fixed block broadcasts 2021-11-01 19:36:11 +01:00
SChernykh 1e4c6ef5f4 Added block verification test 2021-11-01 18:53:34 +01:00
SChernykh 61edc6ed70 Reduce cache flush frequency to once per minute 2021-11-01 11:29:59 +01:00
SChernykh d283f91eb0 Update README.md 2021-11-01 11:07:00 +01:00
SChernykh dff2413cae TCPServer: make write buffers global
Reduced memory usage per connection.
2021-10-31 20:29:35 +01:00
SChernykh 998c2ba72f Fixed msys2 build crash 2021-10-31 20:29:35 +01:00
SChernykh b56d027dd5 Include P2P peer list into miner count 2021-10-31 20:29:35 +01:00
SChernykh eaed654012 Check for missing data from monerod on each new block
It helps in these cases:
- monerod was down/unavailable for a while and then restarted
- monerod was out of sync and then jumped several block heights ahead
2021-10-31 12:20:29 +01:00
SChernykh 981b161cc9 SideChain: faster processing of repeated broadcasts 2021-10-31 11:06:00 +01:00
SChernykh f59e9171e8 SideChain: use a separate lock for m_seenBlocks 2021-10-31 10:26:13 +01:00
SChernykh b45540ca08 TCPServer: clean up old IP bans 2021-10-29 14:54:36 +02:00
SChernykh 806e1ca0a3 SideChain: faster check for low-diff spam blocks 2021-10-29 11:39:15 +02:00
SChernykh 113e39817d Cleanup old Monero blocks data 2021-10-29 11:14:28 +02:00
SChernykh 0869326f39 SideChain: count miners in the last 48 hours 2021-10-29 10:37:12 +02:00
SChernykh 75d62c0303 SideChain: cleanup m_seenBlocks when pruning old blocks 2021-10-29 10:34:53 +02:00
SChernykh da4686b88f ZMQReader: start after initial RPC calls are finished 2021-10-28 20:05:40 +02:00
SChernykh a008eac8c6 ZMQReader: more reliable connect() 2021-10-28 19:28:33 +02:00
SChernykh 3d60ae8c32 Fix: don't start until monerod is fully synchronized 2021-10-28 18:47:28 +02:00
SChernykh 88f346414a Fixed race condition when using --no-color 2021-10-28 10:36:50 +02:00
SChernykh 2071a24a9f Update version 2021-10-27 17:27:48 +02:00
SChernykh 1c0da4513f Added --no-color command line option
`--no-color` disables colors in console output
2021-10-27 16:48:17 +02:00
SChernykh 6a002cda46 Create msvc-analysis.yml 2021-10-27 16:06:36 +02:00
SChernykh c21c9615a3 Fixed optimization flags for gcc/clang 2021-10-26 20:13:51 +02:00
SChernykh c0c210664a Show uptime in status 2021-10-26 17:55:47 +02:00
SChernykh 6859d11445 Disable console quick-edit mode on Windows
Prevent user from accidentally selecting text in console and freezing all output
2021-10-26 17:42:00 +02:00
SChernykh 111324b6e0 Added console command to show connected peers 2021-10-24 16:04:30 +02:00
SChernykh 148b9dd294 Switch to faster unordered_map/set 2021-10-22 18:34:20 +02:00
SChernykh 04d18cdf1d P2PServer: fixed m_timer leak 2021-10-21 19:19:22 +02:00
SChernykh 352ad81a0a StratumServer: faster processing of regular shares 2021-10-21 19:09:36 +02:00
SChernykh d26902468d P2PServer: peer list tweaks
- Increase outgoing connections to 10
- Stricter handling of peer list responses
2021-10-21 15:55:00 +02:00
SChernykh 0382027d70 Fixed wrong error message 2021-10-21 10:12:57 +02:00
SChernykh 966b499e5c ZMQReader: keep trying to connect on startup 2021-10-21 00:22:53 +02:00
SChernykh 9885f82e9e Limit user name length to 64 characters
Also avoid creating temporary strings (`" user " + client->m_customUser`) when logging user name
2021-10-19 21:09:08 +02:00
SChernykh 32a58d1534 Merge pull request #58 from WeebDataHoarder/master
Display stratum user on SHARE FOUND and "client found mainchain block" log entries
2021-10-19 20:10:53 +02:00
WeebDataHoarder bc341918f6 Decode custom user from stratum client, display stratum client+user on SHARE FOUND and client mainchain found message 2021-10-19 19:33:15 +02:00
263 changed files with 107279 additions and 20645 deletions
+2
View File
@@ -0,0 +1,2 @@
**/build
**/docker-compose
+705 -48
View File
@@ -2,63 +2,447 @@ name: C/C++ CI
on:
push:
branches: [ master ]
branches: ["master"]
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
branches: [ master ]
jobs:
build-ubuntu:
build-alpine-static:
runs-on: ${{ matrix.os }}
timeout-minutes: 240
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, ubuntu-18.04]
config:
- {arch: x86_64, branch: latest-stable, flags: "-ffunction-sections"}
- {arch: aarch64, branch: latest-stable, flags: "-ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
- {arch: riscv64, branch: latest-stable, flags: "-ffunction-sections"}
steps:
- name: Setup Alpine Linux
uses: jirutka/setup-alpine@v1
with:
arch: ${{ matrix.config.arch }}
branch: ${{ matrix.config.branch }}
- name: Install dependencies
shell: alpine.sh --root {0}
run: |
apk add git cmake gcc g++ make linux-headers xz
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build libcurl
shell: alpine.sh {0}
run: |
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -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}
run: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j$(nproc)
- name: Build libzmq
shell: alpine.sh {0}
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5" -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
make -j$(nproc)
- name: Build p2pool
shell: alpine.sh {0}
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 }}
make -j$(nproc) p2pool
- name: Run RandomX tests
shell: alpine.sh {0}
run: |
cd build
./p2pool --test
make -j$(nproc) randomx-tests
external/src/RandomX/randomx-tests
- name: Build tests
shell: alpine.sh {0}
run: |
cd tests
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_LIBS=ON -DARCH_ID=${{ matrix.config.arch }}
make -j$(nproc) p2pool_tests
- name: Run tests
shell: alpine.sh {0}
run: |
cd tests/build
unxz *.xz
./p2pool_tests
- name: List directory
run: |
cd build
ls -la
file p2pool
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-alpine-static-${{ matrix.config.arch }}
path: build/p2pool
build-ubuntu:
timeout-minutes: 60
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: ubuntu-22.04, c: gcc-9, cpp: g++-9, flags: ""}
- {os: ubuntu-22.04, c: gcc-10, cpp: g++-10, flags: ""}
- {os: ubuntu-22.04, c: gcc-11, cpp: g++-11, flags: ""}
- {os: ubuntu-22.04, c: gcc-12, cpp: g++-12, flags: ""}
- {os: ubuntu-24.04, c: gcc-13, cpp: g++-13, flags: ""}
- {os: ubuntu-24.04, c: gcc-14, cpp: g++-14, flags: ""}
steps:
- name: Install dependencies
run: sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev xz-utils ${{ matrix.config.c }} ${{ matrix.config.cpp }}
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
- name: Build p2pool
run: |
mkdir build
cd build
cmake ..
make -j2
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run RandomX tests
run: |
cd build
./p2pool --test
make -j$(nproc) randomx-tests
external/src/RandomX/randomx-tests
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake ..
make -j2
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cpp }} -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool_tests
- name: Run tests
run: cd tests/build && ./p2pool_tests
run: |
cd tests/build
unxz *.xz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: p2pool-${{ matrix.os }}
name: p2pool-${{ matrix.config.os }}-${{ matrix.config.c }}
path: build/p2pool
build-ubuntu-static-libs:
timeout-minutes: 60
runs-on: ubuntu-22.04
strategy:
matrix:
config:
- {flags: "-fuse-linker-plugin -ffunction-sections"}
steps:
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y git build-essential cmake libgss-dev gcc-12 g++-12 xz-utils
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build libcurl
run: |
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j$(nproc)
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc)
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run RandomX tests
run: |
cd build
./p2pool --test
make -j$(nproc) randomx-tests
external/src/RandomX/randomx-tests
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool_tests
- name: Run tests
run: |
cd tests/build
unxz *.xz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-ubuntu-static-libs
path: build/p2pool
build-ubuntu-aarch64:
timeout-minutes: 60
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: ubuntu-22.04-arm, flags: "-fuse-linker-plugin -ffunction-sections -mfix-cortex-a53-835769 -mfix-cortex-a53-843419"}
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y git build-essential cmake xz-utils
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build libcurl
run: |
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j$(nproc)
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc)
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=aarch64 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run RandomX tests
run: |
cd build
./p2pool --test
make -j$(nproc) randomx-tests
external/src/RandomX/randomx-tests
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=aarch64 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool_tests
- name: Run tests
run: |
cd tests/build
unxz *.xz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-${{ matrix.config.os }}-aarch64
path: build/p2pool
build-ubuntu-riscv64:
timeout-minutes: 60
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: ubuntu-22.04, flags: "-fuse-linker-plugin -ffunction-sections"}
steps:
- name: Setup Alpine Linux
uses: jirutka/setup-alpine@v1
with:
arch: riscv64
branch: latest-stable
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y git build-essential cmake gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu xz-utils
sudo cp /usr/riscv64-linux-gnu/lib/* /home/runner/rootfs/alpine-latest-riscv64/lib
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build libcurl
run: |
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS="-Os -flto=auto ${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DOPENSSL_INCLUDE_DIR=../grpc/third_party/boringssl-with-bazel/src/include
make -j$(nproc)
cd lib && mkdir .libs && cp libcurl.a .libs
- name: Build libuv
run: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j$(nproc)
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os -flto=auto ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc)
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=riscv64 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run self-test
shell: alpine.sh {0}
run: build/p2pool --test
- name: Build RandomX tests
run: |
cd build
make -j$(nproc) randomx-tests
- name: Run RandomX tests
shell: alpine.sh {0}
run: build/external/src/RandomX/randomx-tests
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../../cmake/riscv64_toolchain.cmake -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=riscv64 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool_tests
- name: Prepare test data
run: |
cd tests/build
unxz *.xz
- name: Run tests
shell: alpine.sh {0}
run: |
cd tests/build
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-${{ matrix.config.os }}-riscv64
path: build/p2pool
build-windows-msys2:
timeout-minutes: 60
runs-on: windows-latest
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"}
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
@@ -66,118 +450,391 @@ jobs:
uses: eine/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-libuv
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-cmake make git
- 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: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j$(nproc)
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_FLAGS='-Os ${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='-Os ${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DZMQ_HAVE_IPC=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 .. -G "Unix Makefiles"
make -j2
cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DSTATIC_LIBS=ON -DOPENSSL_NO_ASM=ON -DWITH_LTO=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run RandomX tests
run: |
cd build
./p2pool.exe --test
make -j$(nproc) randomx-tests
external/src/RandomX/randomx-tests.exe
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -G "Unix Makefiles"
make -j2
cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DCMAKE_C_COMPILER=${{ matrix.config.c }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections" -DSTATIC_LIBS=ON -DOPENSSL_NO_ASM=ON
make -j$(nproc) p2pool_tests
- name: Run tests
run: |
cd tests/build
unxz *.xz
./p2pool_tests.exe
- name: Archive binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: p2pool-msys2.exe
name: p2pool-msys2-${{ matrix.config.c }}.exe
path: build/p2pool.exe
build-windows-msbuild:
timeout-minutes: 60
runs-on: windows-${{ matrix.config.os }}
strategy:
matrix:
config:
- {vs: Visual Studio 16 2019, os: 2019, msbuild: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin\\amd64\\"}
- {vs: Visual Studio 17 2022, os: 2022, msbuild: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\Msbuild\\Current\\Bin\\amd64\\"}
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "ON", upnp: "ON", grpc: "ON", tls: "ON"}
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "ON", upnp: "ON", grpc: "OFF", tls: "ON"}
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "OFF", upnp: "ON", grpc: "OFF", tls: "ON"}
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "OFF", upnp: "OFF", grpc: "OFF", tls: "ON"}
- {vs: Visual Studio 17 2022, os: 2022, vspath: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", rx: "OFF", upnp: "OFF", grpc: "OFF", tls: "OFF"}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Apply patch
run: |
git apply --verbose --ignore-whitespace --directory=external/src/grpc/third_party/boringssl-with-bazel patches/boringssl/win7.patch
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -G "${{ matrix.config.vs }}"
& "${{ matrix.config.msbuild }}msbuild" /m /p:Configuration=Release p2pool.vcxproj
cmake .. -G "${{ matrix.config.vs }}" -DCMAKE_SYSTEM_VERSION="10.0" -DWITH_RANDOMX=${{ matrix.config.rx }} -DWITH_UPNP=${{ matrix.config.upnp }} -DWITH_GRPC=${{ matrix.config.grpc }} -DWITH_TLS=${{ matrix.config.tls }} -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Release p2pool.vcxproj
- name: Check Windows 7 compatibility
shell: cmd
run: |
call "${{ matrix.config.vspath }}\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
dumpbin /IMPORTS build/Release/p2pool.exe > 1.txt
findstr /R /C:"^ *[0-9A-F][0-9A-F]* [a-zA-Z][a-zA-Z0-9]*$" 1.txt > 2.txt
python tests/src/check_win7.py 2.txt
- name: Run RandomX tests
if: matrix.config.rx == 'ON'
run: |
build/Release/p2pool.exe --test
cd build/external/src/RandomX
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Release randomx-tests.vcxproj
Release/randomx-tests.exe
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -G "${{ matrix.config.vs }}"
& "${{ matrix.config.msbuild }}msbuild" /m /p:Configuration=Release p2pool_tests.vcxproj
cmake .. -G "${{ matrix.config.vs }}" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_WITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
& "${{ matrix.config.vspath }}\\MSBuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Debug p2pool_tests.vcxproj
- name: Run tests
shell: cmd
run: |
cd tests/build/Release
./p2pool_tests.exe
cd tests/build/Debug
7z x *.xz
call "${{ matrix.config.vspath }}\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
p2pool_tests.exe
- name: Archive binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: p2pool-msbuild-${{ matrix.config.os }}.exe
name: p2pool-vs-${{ matrix.config.os }}-randomx-${{ matrix.config.rx }}-upnp-${{ matrix.config.upnp }}-grpc-${{ matrix.config.grpc }}-tls-${{ matrix.config.tls }}.exe
path: build/Release/p2pool.exe
build-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, macos-11]
timeout-minutes: 60
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake libuv zmq libpgm
- name: Build libcurl
run: |
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -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: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j4
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-Os -flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
make -j4
- name: Build p2pool
run: |
mkdir build
cd build
cmake ..
make -j3
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_ASM_FLAGS='-target x86_64-apple-macos10.13' -DSTATIC_LIBS=ON
make -j4 p2pool
- name: Run RandomX tests
run: |
cd build
./p2pool --test
make -j4 randomx-tests
external/src/RandomX/randomx-tests
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake ..
make -j3
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_CXX_FLAGS='-flto -target x86_64-apple-macos10.13 -Wno-overriding-t-option' -DCMAKE_ASM_FLAGS='-target x86_64-apple-macos10.13' -DSTATIC_LIBS=ON
make -j4 p2pool_tests
- name: Run tests
run: |
cd tests/build
unxz *.xz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: p2pool-${{ matrix.os }}
name: p2pool-macos-13
path: build/p2pool
build-macos-aarch64:
timeout-minutes: 30
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build libcurl
run: |
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-Os -target arm64-apple-macos-11" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -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: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -target arm64-apple-macos-11' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j3
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='-Os -target arm64-apple-macos-11' -DCMAKE_CXX_FLAGS='-Os -target arm64-apple-macos-11' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
make -j3
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-target arm64-apple-macos-11" -DCMAKE_CXX_FLAGS="-target arm64-apple-macos-11" -DSTATIC_LIBS=ON -DWITH_LTO=OFF -DARCH_ID=aarch64
make -j3 p2pool
- name: Run RandomX tests
run: |
cd build
./p2pool --test
make -j3 randomx-tests
external/src/RandomX/randomx-tests
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="-target arm64-apple-macos-11" -DCMAKE_CXX_FLAGS="-target arm64-apple-macos-11" -DSTATIC_LIBS=ON -DWITH_LTO=OFF -DARCH_ID=aarch64
make -j3 p2pool_tests
- name: Run tests
run: |
cd tests/build
unxz *.xz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-macos-11-aarch64
path: build/p2pool
build-freebsd:
timeout-minutes: 60
runs-on: ${{ matrix.os.host }}
strategy:
matrix:
os:
- name: freebsd
architecture: x86-64
version: '13.3'
host: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Delete unused files
run: |
rm -rf .git
rm -rf external/lib
- name: Build p2pool
uses: cross-platform-actions/action@v0.24.0
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
memory: 12G
cpu_count: 4
shell: bash
run: |
sudo pkg install -y cmake
cd external/src/curl
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Os -flto" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -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
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j4
cd ../../libzmq
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Os -flto' -DCMAKE_CXX_FLAGS='-Os -flto' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
make -j4
cd ../../../..
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DSTATIC_LIBS=ON
make -j4 p2pool
./p2pool --test
make -j4 randomx-tests
external/src/RandomX/randomx-tests
cd ../tests
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DSTATIC_LIBS=ON
make -j4 p2pool_tests
unxz *.xz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }}
path: build/p2pool
build-openbsd:
timeout-minutes: 60
runs-on: ${{ matrix.os.host }}
strategy:
matrix:
os:
- name: openbsd
architecture: x86-64
version: '7.4'
host: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Delete unused files
run: |
rm -rf .git
rm -rf external/lib
- name: Build p2pool
uses: cross-platform-actions/action@v0.24.0
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
memory: 12G
cpu_count: 4
shell: bash
run: |
sudo pkg_add -I cmake libuv zeromq curl
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4 p2pool
cd ../tests
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4 p2pool_tests
unxz *.xz
./p2pool_tests
- name: Archive binary
uses: actions/upload-artifact@v4
with:
name: p2pool-${{ matrix.os.name }}-${{ matrix.os.version }}
path: build/p2pool
+40
View File
@@ -0,0 +1,40 @@
name: clang-tidy
on:
push:
branches: ["master"]
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
jobs:
clang-tidy:
runs-on: ubuntu-22.04
steps:
- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
sudo apt-get install -y clang-tidy-21
clang-tidy-21 --verify-config
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: cmake p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-21 -DCMAKE_CXX_COMPILER=clang++-21 -DDEV_CLANG_TIDY=ON -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
- name: Run clang-tidy
run: |
cd src
clang-tidy-21 *.cpp -p ../build -checks=-clang-diagnostic-undefined-internal,-clang-analyzer-optin.performance.Padding,-clang-diagnostic-nan-infinity-disabled -warnings-as-errors=* -header-filter=^[^\.]
+16 -19
View File
@@ -13,16 +13,21 @@ name: "CodeQL"
on:
push:
branches: [ master ]
branches: ["master"]
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '44 11 * * 0'
jobs:
analyze:
name: Analyze
timeout-minutes: 180
runs-on: ubuntu-latest
permissions:
actions: read
@@ -40,16 +45,16 @@ jobs:
steps:
- name: Install dependencies
run: |
sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev
sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -57,21 +62,13 @@ jobs:
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- run: |
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
+91
View File
@@ -0,0 +1,91 @@
name: Code coverage
on:
push:
branches: ["master"]
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
jobs:
coverage:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev lcov xz-utils
- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21 all
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build tests
run: |
cd tests
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DDEV_DEBUG=ON -DWITH_COVERAGE=ON -DCMAKE_C_COMPILER=clang-21 -DCMAKE_CXX_COMPILER=clang++-21 -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool_tests
- name: Run tests
run: |
cd tests/build
unxz *.xz
LLVM_PROFILE_FILE="p2pool_tests.profraw" ./p2pool_tests
- name: Merge profile data
run: |
cd tests/build
llvm-profdata-21 merge -sparse ./p2pool_tests.profraw -o ./p2pool_tests.profdata
- name: Export profile data
run: |
cd tests/build
llvm-cov-21 export ./p2pool_tests -format=lcov -instr-profile=./p2pool_tests.profdata > coverage.info
- name: Run genhtml
run: |
cd tests/build
genhtml --demangle-cpp -o coverage coverage.info
- name: Checkout GitHub Pages repository
uses: actions/checkout@v4
with:
repository: SChernykh/SChernykh.github.io
token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
path: gh-pages
- name: Copy coverage report to GitHub Pages repo
run: |
rm -rf gh-pages/p2pool-coverage
cp -r tests/build/coverage gh-pages/p2pool-coverage
- name: Commit and push coverage report
run: |
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add p2pool-coverage
git commit -m "Update p2pool coverage report"
git push
- name: Archive coverage data
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: p2pool-coverage
path: tests/build/coverage
+69 -13
View File
@@ -2,41 +2,83 @@ name: cppcheck
on:
push:
branches: [ master ]
branches: ["master"]
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
branches: [ master ]
schedule:
- cron: '57 0 * * *'
jobs:
cppcheck-ubuntu:
timeout-minutes: 240
runs-on: ubuntu-latest
steps:
- name: Install cppcheck
run: sudo apt update && sudo apt install cppcheck
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
- name: Checkout cppcheck
run: |
git clone https://github.com/danmar/cppcheck cppcheck-main
- name: Build cppcheck
run: |
cd cppcheck-main
make -j$(nproc) cppcheck
- name: cmake p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSTATIC_LIBS=ON -DWITH_GRPC=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
python ../cppcheck/remove_external.py compile_commands.json
- name: Run cppcheck
run: |
cd cppcheck
./run.sh
- name: Archive full error list
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: errors_full-linux
path: cppcheck/errors_full.txt
- name: Archive checkers report
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: checkers_report-linux
path: cppcheck/checkers_report.txt
cppcheck-windows:
timeout-minutes: 60
runs-on: windows-latest
steps:
- name: Install cppcheck
run: choco install cppcheck
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
- name: Checkout cppcheck
run: |
git clone https://github.com/danmar/cppcheck cppcheck-main
- name: Build cppcheck
run: |
cd cppcheck-main
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild.exe" -v:m /m /p:Configuration=Release /p:Platform=x64
- name: Setup cmake
uses: lukka/get-cmake@latest
@@ -45,9 +87,23 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019"
cmake .. -G "Visual Studio 17 2022" -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
- name: Run cppcheck
run: |
cd cppcheck
./run.cmd
- name: Archive full error list
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: errors_full-windows
path: cppcheck/errors_full.txt
- name: Archive checkers report
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: checkers_report-windows
path: cppcheck/checkers_report.txt
+70
View File
@@ -0,0 +1,70 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# Find more information at:
# https://github.com/microsoft/msvc-code-analysis-action
name: Microsoft C++ Code Analysis
on:
push:
branches: ["master"]
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
schedule:
- cron: '40 10 * * 0'
env:
# Path to the CMake build directory.
build: '${{ github.workspace }}/build'
config: 'Release'
jobs:
analyze:
name: Analyze
timeout-minutes: 240
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure CMake
run: cmake -B ${{ env.build }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
# Build is not required unless generated source files are used
# - name: Build CMake
# run: cmake --build ${{ env.build }}
- name: Initialize MSVC Code Analysis
uses: microsoft/msvc-code-analysis-action@96315324a485db21449515180214ecb78c16a1c5
# Provide a unique ID to access the sarif output path
id: run-analysis
with:
cmakeBuildDirectory: ${{ env.build }}
buildConfiguration: ${{ env.config }}
# Ruleset file that will determine what checks will be run
ruleset: NativeRecommendedRules.ruleset
ignoredPaths: ${{ github.workspace }}/external
# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
# Upload SARIF file as an Artifact to download and view
- name: Upload SARIF as an Artifact
uses: actions/upload-artifact@v4
with:
name: sarif-file
path: ${{ steps.run-analysis.outputs.sarif }}
+28
View File
@@ -0,0 +1,28 @@
name: source-snapshot
on:
push:
branches: ["master"]
pull_request:
jobs:
source-snapshot:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Compress source code
run: |
mkdir build
XZ_OPT=-e9 tar --exclude=".git" --exclude="build" -f build/p2pool_source.tar.xz -c ../p2pool --xz
- name: Archive source code
uses: actions/upload-artifact@v4
with:
name: p2pool_source.tar.xz
path: build/p2pool_source.tar.xz
+424
View File
@@ -0,0 +1,424 @@
name: Sync test
on:
push:
branches: ["master"]
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
schedule:
- cron: '47 0/3 * * *'
jobs:
sync-test-ubuntu-tsan:
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y git build-essential cmake gcc-12 g++-12
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build libcurl
run: |
cd external/src/curl
cmake . -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -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=gcc-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j$(nproc)
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DWITH_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 .. -DDEV_TEST_SYNC=ON -DDEV_WITH_TSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DCMAKE_CXX_FLAGS='-fsanitize=thread -Og -fno-omit-frame-pointer -g' -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run p2pool
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
sudo sysctl vm.mmap_rnd_bits=28
TSAN_OPTIONS="suppressions=../tests/src/tsan_sup.txt halt_on_error=1 history_size=4" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
- name: Check p2pool.log
run: |
cd build
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
uses: actions/upload-artifact@v4
with:
name: p2pool_ubuntu_data_tsan
path: |
build/*.log
build/data/
sync-test-ubuntu-msan:
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y git build-essential cmake ninja-build
- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20 all
- name: Build libcxx_msan
run: |
git clone --depth=1 https://github.com/llvm/llvm-project -b release/20.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
ninja -C build cxx cxxabi
cd build
mkdir /tmp/libcxx_msan
cp -r include /tmp/libcxx_msan
cp -r lib /tmp/libcxx_msan
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- 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
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
make -j$(nproc)
- name: Build libzmq
run: |
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"
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"
make -j$(nproc) p2pool
- name: Run p2pool
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py 1 &
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
- name: Check p2pool.log
run: |
cd build
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
uses: actions/upload-artifact@v4
with:
name: p2pool_ubuntu_data_msan
path: |
build/*.log
build/data/
sync-test-ubuntu-ubsan:
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev gcc-12 g++-12
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_UBSAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWITH_LTO=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run p2pool
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
sudo sysctl vm.mmap_rnd_bits=28
UBSAN_OPTIONS="suppressions=../tests/src/ubsan_sup.txt halt_on_error=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
- name: Check p2pool.log
run: |
cd build
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
uses: actions/upload-artifact@v4
with:
name: p2pool_ubuntu_data_ubsan
path: |
build/*.log
build/data/
sync-test-ubuntu-asan:
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y git build-essential cmake libuv1-dev libzmq3-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev gcc-12 g++-12
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_C_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fsanitize=address -Og -g" -DWITH_LTO=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
make -j$(nproc) p2pool
- name: Run p2pool
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
sudo sysctl vm.mmap_rnd_bits=28
ASAN_OPTIONS="detect_stack_use_after_return=1 atexit=1" ./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
- name: Check p2pool.log
run: |
cd build
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
uses: actions/upload-artifact@v4
with:
name: p2pool_ubuntu_data_asan
path: |
build/*.log
build/data/
sync-test-macos:
timeout-minutes: 60
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: macos-13, flags: ""}
- {os: macos-14, flags: "-target arm64-apple-macos-11"}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build libcurl
run: |
cd external/src/curl
cmake . -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS="${{ matrix.config.flags }}" -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DCURL_DISABLE_INSTALL=ON -DCURL_ENABLE_EXPORT_TARGET=OFF -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_BINDLOCAL=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_DISABLE_TESTS=ON -DUSE_NGHTTP2=OFF -DBUILD_EXAMPLES=OFF -DP2POOL_BORINGSSL=ON -DCURL_DISABLE_SRP=ON -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: |
cd external/src/libuv
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF
make -j4
- name: Build libzmq
run: |
cd external/src/libzmq
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LIBSODIUM=OFF -DWITH_LIBBSD=OFF -DBUILD_TESTS=OFF -DWITH_DOCS=OFF -DENABLE_DRAFTS=OFF -DBUILD_SHARED=OFF
make -j4
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER="$(brew --prefix llvm@15)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@15)/bin/clang++" -DCMAKE_AR="$(brew --prefix llvm@15)/bin/llvm-ar" -DCMAKE_RANLIB="$(brew --prefix llvm@15)/bin/llvm-ranlib" -DCMAKE_C_FLAGS='${{ matrix.config.flags }}' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }}' -DWITH_LTO=OFF -DSTATIC_LIBS=ON -DDEV_TEST_SYNC=ON -DDEV_DEBUG=ON
make -j4 p2pool
- name: Run p2pool
run: |
cd build
mkdir data
python3 ../tests/src/stratum_dummy.py 1 &
python3 ../tests/src/stratum_dummy.py 2 &
python3 ../tests/src/stratum_dummy.py 3 &
./p2pool --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
- name: Check p2pool.log
run: |
cd build
grep 'Synchronization finished successfully' p2pool.log
- name: Archive p2pool.log
uses: actions/upload-artifact@v4
with:
name: p2pool_${{ matrix.config.os }}_data
path: |
build/*.log
build/data/
sync-test-windows-debug-asan:
timeout-minutes: 60
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_WITH_ASAN=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=Debug p2pool.vcxproj
- name: Run p2pool
shell: cmd
run: |
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat" amd64
cd build/Debug
mkdir data
start python ../../tests/src/stratum_dummy.py 1
start python ../../tests/src/stratum_dummy.py 2
start python ../../tests/src/stratum_dummy.py 3
p2pool.exe --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
- name: Check p2pool.log
run: |
cd build/Debug
findstr /C:"Synchronization finished successfully" p2pool.log
- name: Archive p2pool.log
uses: actions/upload-artifact@v4
with:
name: p2pool_windows_data_debug_asan
path: |
build/Debug/*.log
build/Debug/data/
sync-test-windows-leaks:
timeout-minutes: 60
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Build p2pool
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_VERSION="10.0" -DDEV_TEST_SYNC=ON -DDEV_TRACK_MEMORY=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild" -v:m /m /p:Configuration=RelWithDebInfo p2pool.vcxproj
- name: Run p2pool
run: |
cd build/RelWithDebInfo
mkdir data
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 1"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 2"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 3"
./p2pool.exe --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node.richfowler.net --rpc-port 18089 --zmq-port 18084 --rpc-ssl --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg ${{ secrets.MM_PARAMS }} --mini --out-peers 200 --data-api data --local-api --loglevel 6
- name: Check p2pool.log
run: |
cd build/RelWithDebInfo
Remove-Item p2pool.cache -Force
findstr /C:"Synchronization finished successfully" p2pool.log
- name: Archive p2pool.log
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: p2pool_windows_data_leaks
path: |
build/RelWithDebInfo/p2pool.*
build/RelWithDebInfo/data/
+1
View File
@@ -1,2 +1,3 @@
.vscode
build
logs
+13 -3
View File
@@ -10,12 +10,22 @@
[submodule "external/src/cppzmq"]
path = external/src/cppzmq
url = https://github.com/SChernykh/cppzmq
[submodule "external/src/libsodium"]
path = external/src/libsodium
url = https://github.com/SChernykh/libsodium
[submodule "external/src/libuv"]
path = external/src/libuv
url = https://github.com/SChernykh/libuv
[submodule "external/src/libzmq"]
path = external/src/libzmq
url = https://github.com/SChernykh/libzmq
[submodule "external/src/robin-hood-hashing"]
path = external/src/robin-hood-hashing
url = https://github.com/SChernykh/robin-hood-hashing
[submodule "external/src/curl"]
path = external/src/curl
url = https://github.com/SChernykh/curl
[submodule "external/src/miniupnp"]
path = external/src/miniupnp
url = https://github.com/SChernykh/miniupnp
[submodule "external/src/grpc"]
path = external/src/grpc
url = https://github.com/SChernykh/grpc
branch = v1.61.x
+387 -50
View File
@@ -1,22 +1,105 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.10)
project(p2pool)
option(STATIC_LINUX_BINARY "Build static Linux binary" OFF)
include(cmake/standard.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
message(STATUS "Build environment:
System processor: ${CMAKE_SYSTEM_PROCESSOR}
C compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_ID})
CXX compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_ID})
")
if (${CMAKE_VERSION} VERSION_GREATER "3.5.2")
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT p2pool)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
option(STATIC_BINARY "Build static binary" OFF)
option(STATIC_LIBS "Link libuv and libzmq statically" OFF)
option(WITH_RANDOMX "Include the RandomX library in the build. If this is turned off, p2pool will rely on monerod for verifying RandomX hashes" ON)
option(WITH_LTO "Use link-time compiler optimization (if linking fails for you, run cmake with -DWITH_LTO=OFF)" ON)
option(WITH_UPNP "Include UPnP support. If this is turned off, p2pool will not be able to configure port forwarding on UPnP-enabled routers." ON)
option(WITH_GRPC "Include gRPC support. If this is turned off, p2pool will not be able to merge mine with Tari." ON)
option(WITH_TLS "Include TLS support. If this is turned off, p2pool will not support Stratum TLS connections, and lack many other security features. It's recommended to keep it ON!" ON)
option(WITH_MERGE_MINING_DONATION "Merge mine donations to the author. This doesn't affect your hashrate or payouts in any way - only unused merge mining capacity will be utilised. If you merge mine yourself, your settings will take priority." ON)
option(DEV_TEST_SYNC "[Developer only] Sync test, stop p2pool after sync is complete" OFF)
option(DEV_WITH_TSAN "[Developer only] Compile with thread sanitizer" OFF)
option(DEV_WITH_MSAN "[Developer only] Compile with memory sanitizer" OFF)
option(DEV_WITH_UBSAN "[Developer only] Compile with undefined behavior sanitizer" OFF)
option(DEV_WITH_ASAN "[Developer only] Compile with address sanitizer" OFF)
option(DEV_CLANG_TIDY "[Developer only] Compile for clang-tidy" OFF)
option(DEV_TRACK_MEMORY "[Developer only] Track memory allocations" OFF)
option(DEV_DEBUG "[Developer only] Compile a debug build" OFF)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT p2pool)
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
include(cmake/msvc_libs.cmake)
endif()
add_subdirectory(external/src/RandomX)
set(LIBS randomx)
if (WITH_GRPC)
add_definitions(-DWITH_GRPC)
include(cmake/grpc.cmake)
add_subdirectory(external/src/Tari)
elseif (WITH_TLS)
add_subdirectory(cmake/ssl)
include_directories(external/src/grpc/third_party/boringssl-with-bazel/src/include)
endif()
if (WITH_RANDOMX)
add_definitions(-DWITH_RANDOMX)
add_subdirectory(external/src/RandomX)
set(LIBS ${LIBS} randomx)
endif()
if (WITH_UPNP)
add_definitions(-DWITH_UPNP)
add_subdirectory(external/src/miniupnp/miniupnpc)
set(LIBS ${LIBS} libminiupnpc-static)
endif()
if (WITH_MERGE_MINING_DONATION)
add_definitions(-DWITH_MERGE_MINING_DONATION)
endif()
if (DEV_TEST_SYNC)
add_definitions(-DDEV_TEST_SYNC)
endif()
if (DEV_WITH_TSAN)
add_definitions(-DDEV_WITH_TSAN)
endif()
if (DEV_WITH_MSAN)
add_definitions(-DDEV_WITH_MSAN)
endif()
if (DEV_WITH_UBSAN)
add_definitions(-DDEV_WITH_UBSAN)
endif()
if (DEV_WITH_ASAN)
add_definitions(-DDEV_WITH_ASAN)
endif()
if (DEV_CLANG_TIDY)
add_definitions(-DDEV_CLANG_TIDY)
endif()
if (DEV_TRACK_MEMORY)
add_definitions(-DDEV_TRACK_MEMORY)
endif()
if (DEV_DEBUG)
add_definitions(-DDEV_DEBUG)
endif()
include(cmake/flags.cmake)
set(HEADERS
external/src/crypto/sha256.h
external/src/cryptonote/crypto-ops.h
external/src/llhttp/llhttp.h
external/src/hardforks/hardforks.h
src/block_cache.h
src/block_template.h
src/common.h
@@ -27,6 +110,9 @@ set(HEADERS
src/keccak.h
src/log.h
src/mempool.h
src/merge_mining_client.h
src/merge_mining_client_json_rpc.h
src/merkle.h
src/p2p_server.h
src/p2pool.h
src/p2pool_api.h
@@ -37,7 +123,6 @@ set(HEADERS
src/side_chain.h
src/stratum_server.h
src/tcp_server.h
src/tcp_server.inl
src/util.h
src/uv_util.h
src/wallet.h
@@ -45,11 +130,10 @@ set(HEADERS
)
set(SOURCES
external/src/crypto/sha256.c
external/src/cryptonote/crypto-ops-data.c
external/src/cryptonote/crypto-ops.c
external/src/llhttp/api.c
external/src/llhttp/http.c
external/src/llhttp/llhttp.c
external/src/hardforks/hardforks.cpp
src/block_cache.cpp
src/block_template.cpp
src/console_commands.cpp
@@ -60,6 +144,9 @@ set(SOURCES
src/main.cpp
src/memory_leak_debug.cpp
src/mempool.cpp
src/merge_mining_client.cpp
src/merge_mining_client_json_rpc.cpp
src/merkle.cpp
src/p2p_server.cpp
src/p2pool.cpp
src/p2pool_api.cpp
@@ -68,69 +155,319 @@ set(SOURCES
src/pow_hash.cpp
src/side_chain.cpp
src/stratum_server.cpp
src/tcp_server.cpp
src/util.cpp
src/wallet.cpp
src/zmq_reader.cpp
)
include_directories(src)
include_directories(external/src)
include_directories(external/src/cryptonote)
include_directories(external/src/libuv/include)
include_directories(external/src/cppzmq)
include_directories(external/src/libzmq/include)
include_directories(external/src/llhttp)
include_directories(external/src/RandomX/src)
include_directories(external/src/rapidjson/include)
if (WIN32)
set(LIBS ${LIBS} ws2_32 iphlpapi userenv psapi)
elseif (NOT APPLE)
set(LIBS ${LIBS} pthread gss dl)
if (AMD64)
set(SOURCES ${SOURCES} src/keccak_bmi.cpp)
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
set_source_files_properties(src/keccak_bmi.cpp PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -mbmi")
endif()
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
find_library(ZMQ_LIBRARY_DEBUG NAMES libzmq-v142-mt-sgd-4_3_5 PATHS "external/lib/libzmq/Debug")
find_library(ZMQ_LIBRARY NAMES libzmq-v142-mt-s-4_3_5 PATHS "external/lib/libzmq/Release")
find_library(UV_LIBRARY_DEBUG NAMES uv_a PATHS "external/lib/libuv/Debug")
find_library(UV_LIBRARY NAMES uv_a PATHS "external/lib/libuv/Release")
elseif (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
if (WITH_RANDOMX)
set(HEADERS ${HEADERS} src/miner.h)
set(SOURCES ${SOURCES} src/miner.cpp)
else()
set(HEADERS ${HEADERS} external/src/RandomX/src/cpu.hpp)
set(SOURCES ${SOURCES} external/src/RandomX/src/cpu.cpp)
endif()
if (WITH_GRPC)
set(HEADERS ${HEADERS} src/merge_mining_client_tari.h)
set(SOURCES ${SOURCES} src/merge_mining_client_tari.cpp)
endif()
if (WITH_TLS)
add_definitions(-DWITH_TLS)
set(HEADERS ${HEADERS} src/tls.h)
set(SOURCES ${SOURCES} src/tls.cpp)
endif()
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${HEADERS})
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${SOURCES})
include(CheckFunctionExists)
if (STATIC_BINARY)
add_definitions(-DCURL_STATICLIB)
check_function_exists(__nss_module_disable_loading HAVE_NSS_MODULE_DISABLE_LOADING)
if (HAVE_NSS_MODULE_DISABLE_LOADING)
add_definitions(-DHAVE_NSS_MODULE_DISABLE_LOADING)
endif()
endif()
if (NOT ((CMAKE_CXX_COMPILER_ID MATCHES MSVC) OR STATIC_BINARY OR STATIC_LIBS))
include(FindCURL)
endif()
if (CURL_INCLUDE_DIRS)
include_directories(${CURL_INCLUDE_DIRS})
else()
include_directories(external/src/curl/include)
endif()
if ((CMAKE_CXX_COMPILER_ID MATCHES MSVC) OR STATIC_BINARY OR STATIC_LIBS)
set(UV_INCLUDE_DIR external/src/libuv/include)
set(ZMQ_INCLUDE_DIR external/src/libzmq/include)
else()
find_path(UV_INCLUDE_DIR NAMES uv.h PATH_SUFFIXES "include")
find_path(ZMQ_INCLUDE_DIR NAMES zmq.h PATH_SUFFIXES "include")
endif()
include_directories(src)
include_directories(external/src)
include_directories(external/src/crypto)
include_directories(external/src/cryptonote)
include_directories(${UV_INCLUDE_DIR})
include_directories(external/src/cppzmq)
include_directories(${ZMQ_INCLUDE_DIR})
if (WITH_RANDOMX)
include_directories(external/src/RandomX/src)
endif()
include_directories(external/src/rapidjson/include)
include_directories(external/src/robin-hood-hashing/src/include)
if (WITH_UPNP)
include_directories(external/src/miniupnp/miniupnpc/include)
endif()
if (WIN32)
set(LIBS ${LIBS} ws2_32 iphlpapi userenv psapi dnsapi dbghelp advapi32)
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(LIBS ${LIBS} bcrypt)
endif()
add_definitions(-DCURL_STATICLIB)
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-D_WIN32_WINNT=0x0600)
elseif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
set(LIBS ${LIBS} pthread)
elseif (NOT APPLE)
set(LIBS ${LIBS} pthread)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
find_library(ZMQ_LIBRARY_DEBUG NAMES zmq libzmq.a)
find_library(ZMQ_LIBRARY NAMES zmq libzmq.a)
find_library(UV_LIBRARY_DEBUG NAMES uv libuv.a)
find_library(UV_LIBRARY NAMES uv libuv.a)
find_library(SODIUM_LIBRARY sodium)
if (WIN32)
find_library(CURL_LIBRARY_DEBUG NAMES libcurl.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 NAMES curl)
endif()
endif()
endif()
find_library(PGM_LIBRARY pgm)
find_library(NORM_LIBRARY norm)
if (PGM_LIBRARY)
set(LIBS ${LIBS} ${PGM_LIBRARY})
if(APPLE)
find_library(FOUNDATION_LIB Foundation)
find_library(CORE_FOUNDATION_LIB CoreFoundation)
find_library(SYSTEM_CONFIGURATION_LIB SystemConfiguration)
set(LIBS ${LIBS} ${FOUNDATION_LIB} ${CORE_FOUNDATION_LIB} ${SYSTEM_CONFIGURATION_LIB})
endif()
if (NORM_LIBRARY)
set(LIBS ${LIBS} ${NORM_LIBRARY})
add_definitions(-DZMQ_STATIC)
include(CheckIncludeFile)
check_include_file(asm/hwcap.h HAVE_HWCAP)
if(HAVE_HWCAP)
add_definitions(-DHAVE_HWCAP)
endif()
if (SODIUM_LIBRARY)
set(LIBS ${LIBS} ${SODIUM_LIBRARY})
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("int main(){ return __builtin_clzll(1);}" HAVE_BUILTIN_CLZLL)
check_cxx_source_compiles("#include <intrin.h>\n#pragma intrinsic(_BitScanReverse64)\nint main(){unsigned long r;_BitScanReverse64(&r,1);return static_cast<int>(r);}" HAVE_BITSCANREVERSE64)
check_cxx_source_compiles("#include <sched.h>\nint main(){sched_param param;return sched_setscheduler(0, SCHED_IDLE, &param);}" HAVE_SCHED)
include(CheckCSourceCompiles)
set(CMAKE_REQUIRED_LIBRARIES "resolv")
check_c_source_compiles("int main() { return 0; }" HAVE_RESOLV_LIB)
if (NOT HAVE_RESOLV_LIB)
set(CMAKE_REQUIRED_LIBRARIES)
endif()
add_definitions(/DZMQ_STATIC)
check_c_source_compiles("
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#include <stdio.h>
#include <memory.h>
int main(int argc, char* argv[])
{
if (argc < 2) {
return 1;
}
res_init();
uint8_t answer[4096];
const int anslen = res_query(argv[1], ns_c_in, ns_t_txt, answer, sizeof(answer));
if (anslen > (int) sizeof(answer)) {
return 1;
}
ns_msg handle;
ns_initparse(answer, anslen, &handle);
for (int rrnum = 0, n = ns_msg_count(handle, ns_s_an); rrnum < n; ++rrnum) {
ns_rr rr;
if ((ns_parserr(&handle, ns_s_an, rrnum, &rr) == 0) && (ns_rr_type(rr) == ns_t_txt)) {
for (const uint8_t* data = ns_rr_rdata(rr), *e = data + ns_rr_rdlen(rr); data < e;) {
const int k = *(data++);
if (k && (data + k <= e)) {
char buf[256];
memcpy(buf, data, k);
buf[k] = 0;
puts(buf);
}
data += k;
}
}
}
return 0;
}" HAVE_RES_QUERY)
check_c_source_compiles("
#define _GNU_SOURCE
#include <pthread.h>
int main()
{
pthread_setname_np(pthread_self(), \"Main\");
return 0;
}" HAVE_PTHREAD_SETNAME_NP)
set(CMAKE_REQUIRED_LIBRARIES)
if (HAVE_BUILTIN_CLZLL)
add_definitions(-DHAVE_BUILTIN_CLZLL)
endif()
if (HAVE_BITSCANREVERSE64)
add_definitions(-DHAVE_BITSCANREVERSE64)
endif()
if (HAVE_SCHED)
add_definitions(-DHAVE_SCHED)
endif()
if (HAVE_RES_QUERY)
add_definitions(-DHAVE_RES_QUERY)
if (HAVE_RESOLV_LIB)
set(LIBS ${LIBS} resolv)
endif()
endif()
if (HAVE_PTHREAD_SETNAME_NP)
add_definitions(-DHAVE_PTHREAD_SETNAME_NP)
endif()
check_c_source_compiles("#include <gnu/libc-version.h>\nint main() { return (gnu_get_libc_version() && gnu_get_libc_release()) ? 0 : 1; }" HAVE_GLIBC)
if (HAVE_GLIBC)
add_definitions(-DHAVE_GLIBC)
endif()
add_definitions("-DRAPIDJSON_PARSE_DEFAULT_FLAGS=kParseTrailingCommasFlag")
if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
add_definitions(-DNDEBUG)
endif()
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES})
if (STATIC_LINUX_BINARY)
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${CMAKE_PROJECT_NAME})
if (STATIC_BINARY OR STATIC_LIBS)
if ((CMAKE_BUILD_TYPE STREQUAL "Release") AND (NOT (DEV_WITH_TSAN OR DEV_WITH_MSAN OR DEV_WITH_UBSAN OR DEV_WITH_ASAN)))
if (WIN32)
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} "${CMAKE_PROJECT_NAME}.exe")
else()
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${CMAKE_PROJECT_NAME})
endif()
endif()
set(STATIC_LIBS "")
if (WITH_RANDOMX)
set(STATIC_LIBS randomx)
endif()
if (WITH_UPNP)
set(STATIC_LIBS ${STATIC_LIBS} libminiupnpc-static)
endif()
if (WIN32)
set(STATIC_LIBS ${STATIC_LIBS} ws2_32 iphlpapi userenv psapi dnsapi dbghelp)
if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) OR (CMAKE_CXX_COMPILER_ID MATCHES Clang))
set(STATIC_LIBS ${STATIC_LIBS} bcrypt pthread)
endif()
elseif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
set(STATIC_LIBS ${STATIC_LIBS} pthread)
elseif (APPLE)
find_library(FOUNDATION_LIB Foundation)
find_library(CORE_FOUNDATION_LIB CoreFoundation)
find_library(SYSTEM_CONFIGURATION_LIB SystemConfiguration)
set(STATIC_LIBS ${STATIC_LIBS} ${FOUNDATION_LIB} ${CORE_FOUNDATION_LIB} ${SYSTEM_CONFIGURATION_LIB})
else()
set(STATIC_LIBS ${STATIC_LIBS} pthread)
endif()
if (HAVE_RES_QUERY AND HAVE_RESOLV_LIB)
set(STATIC_LIBS ${STATIC_LIBS} resolv)
endif()
if (WITH_GRPC)
set(STATIC_LIBS ${STATIC_LIBS} Tari_gRPC grpc grpc++ libprotobuf)
elseif(WITH_TLS)
set(STATIC_LIBS ${STATIC_LIBS} ssl crypto)
endif()
if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9))
set(STATIC_LIBS ${STATIC_LIBS} stdc++fs)
endif()
target_link_libraries(${CMAKE_PROJECT_NAME}
"${CMAKE_SOURCE_DIR}/external/src/libsodium/src/libsodium/.libs/libsodium.a"
"${CMAKE_SOURCE_DIR}/external/src/libzmq/build/lib/libzmq.a"
"${CMAKE_SOURCE_DIR}/external/src/libuv/build/libuv_a.a"
randomx
pthread
"${CMAKE_SOURCE_DIR}/external/src/libuv/build/libuv.a"
"${CMAKE_SOURCE_DIR}/external/src/curl/lib/libcurl.a"
${STATIC_LIBS}
)
else()
target_link_libraries(${CMAKE_PROJECT_NAME} debug ${ZMQ_LIBRARY_DEBUG} debug ${UV_LIBRARY_DEBUG} optimized ${ZMQ_LIBRARY} optimized ${UV_LIBRARY} ${LIBS})
if (WITH_GRPC)
set(LIBS ${LIBS} Tari_gRPC grpc grpc++ libprotobuf)
elseif(WITH_TLS)
set(LIBS ${LIBS} ssl crypto)
endif()
if ((CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9))
set(LIBS ${LIBS} stdc++fs)
endif()
target_link_libraries(${CMAKE_PROJECT_NAME} debug ${ZMQ_LIBRARY_DEBUG} debug ${UV_LIBRARY_DEBUG} debug ${CURL_LIBRARY_DEBUG} optimized ${ZMQ_LIBRARY} optimized ${UV_LIBRARY} optimized ${CURL_LIBRARY} ${LIBS})
endif()
message(STATUS "Summary of build options:
C compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_ID})
CXX compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_ID})
C_FLAGS: ${CMAKE_C_FLAGS}
CXX_FLAGS: ${CMAKE_CXX_FLAGS}
")
+53
View File
@@ -0,0 +1,53 @@
FROM ubuntu:20.04
RUN set -e && \
apt-get update -q -y --no-install-recommends && \
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
git \
build-essential \
ca-certificates \
cmake \
libuv1-dev \
libzmq3-dev \
libsodium-dev \
libpgm-dev \
libnorm-dev \
libgss-dev \
libcurl4-openssl-dev
ADD . /usr/src/p2pool
WORKDIR /usr/src/p2pool
RUN git submodule update --init --recursive && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc)
# ---
FROM ubuntu:20.04
COPY --from=0 /usr/src/p2pool/build/p2pool /
RUN set -e && \
apt-get update -q -y --no-install-recommends && \
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
libzmq5 \
libuv1 \
libcurl4 \
&& \
apt-get clean
RUN groupadd -r p2pool -g 1000 && \
useradd -u 1000 -r -g p2pool -s /sbin/nologin -c "p2pool user" p2pool
RUN mkdir -p /home/p2pool/.p2pool && \
chown p2pool.p2pool /home/p2pool /home/p2pool/.p2pool
USER p2pool
EXPOSE 3333
EXPOSE 37889
EXPOSE 37888
VOLUME /home/p2pool/.p2pool
WORKDIR /home/p2pool/.p2pool
ENTRYPOINT ["/p2pool"]
+300 -132
View File
@@ -2,17 +2,38 @@
Decentralized pool for Monero mining.
Mining on the mainnet has started! You can check the pool status at https://p2pool.io/
Pool status and monitoring pages can be found at https://p2pool.io/, https://p2pool.io/mini/ and https://p2pool.observer/, https://mini.p2pool.observer/
### Build status
These are 3rd-party pages. If they are down, it doesn't mean there is a problem with P2Pool itself - it keeps mining always thanks to its decentralized nature.
![C/C++ CI](https://github.com/SChernykh/p2pool/actions/workflows/c-cpp.yml/badge.svg)
![CodeQL](https://github.com/SChernykh/p2pool/actions/workflows/codeql-analysis.yml/badge.svg)
![cppcheck](https://github.com/SChernykh/p2pool/actions/workflows/cppcheck.yml/badge.svg)
### Build Status
![C/C++ CI](https://github.com/SChernykh/p2pool/actions/workflows/c-cpp.yml/badge.svg)
![test-sync](https://github.com/SChernykh/p2pool/actions/workflows/test-sync.yml/badge.svg)
![CodeQL](https://github.com/SChernykh/p2pool/actions/workflows/codeql-analysis.yml/badge.svg)
![msvc-analysis](https://github.com/SChernykh/p2pool/actions/workflows/msvc-analysis.yml/badge.svg)
![cppcheck](https://github.com/SChernykh/p2pool/actions/workflows/cppcheck.yml/badge.svg)
<a href="https://scan.coverity.com/projects/schernykh-p2pool">
<img alt="Coverity Scan Build Status"
src="https://scan.coverity.com/projects/23659/badge.svg"/>
</a>
![clang-tidy](https://github.com/SChernykh/p2pool/actions/workflows/clang-tidy.yml/badge.svg)
# Contents
- [Pool mining vs Solo mining vs P2Pool mining](#pool-mining-vs-solo-mining-vs-p2pool-mining)
- [Features](#features)
- [How payouts work in P2Pool](#how-payouts-work-in-p2pool)
- [Default P2Pool parameters](#default-p2pool-parameters)
- [Monero version support](#monero-version-support)
- [How to mine on P2Pool](#how-to-mine-on-p2pool)
- [General Considerations](#general-considerations)
- [GUI for P2Pool](#gui-for-p2pool)
- [Merge mining](#merge-mining)
- [GNU/Linux](#gnulinux)
- [Windows](#windows)
- [Build instructions](#build-instructions)
- [Reproducible builds](#reproducible-builds)
- [Donations](#donations)
## Pool mining vs Solo mining vs P2Pool mining
@@ -22,42 +43,237 @@ Here's the comparison table of the different ways of mining. While pool mining i
|-|-|-|-|-|-|-|-|
|Centralized pool|Regular|0-3%|0.001-0.01 XMR|Yes|Less stable due to pool server outages|Pool admin controls your mined funds, what you mine and can execute network attacks|Only miner software is required
|Solo|Rare|0%|0.6 XMR or more|No|As stable as your Monero node|100% under your control|Monero node + optional miner
|**P2Pool**|Regular|0%|less than 0.0004 XMR|No|As stable as your Monero node|100% under your control|Monero node + P2Pool node + miner
|**P2Pool**|Regular|0%|~0.00027 XMR|No|Very stable: node failover and multiple Monero nodes are supported|100% under your control|Monero node(s) + P2Pool node(s) + optional miner(s)
## Features
* Decentralized: no central server that can be shutdown/blocked. P2Pool uses a separate blockchain to merge mine with Monero. Pool admin can't go rogue or be pressured to do an attack on the network because there is no pool admin!
* Permissionless: there is no one to decide who can mine on the pool and who can't.
* Trustless: there is no pool wallet, funds are never in custody. All pool blocks pay out to miners immediately.
* Trustless: there is no pool wallet, funds are never in custody. All pool blocks pay out to miners directly.
* PPLNS payout scheme
* **0% fee**
* **0 XMR payout fee**
* **Less than 0.0004 XMR minimal payout**
* **~0.00027 XMR minimal payout**
* Fast block times, down to 1 second
* Uncle blocks are supported to avoid orphans - all your shares will be accounted for!
* Configurable PPLNS window size and block time
* Advanced mempool picking algorithm, it creates blocks with better reward than what monerod solo mining does
* Password protected private pools
* Highly reliable configurations are supported (multiple P2Pool nodes mining to the same wallet, each P2Pool node can use multiple Monero nodes and switch on the fly if an issue is detected)
## How PPLNS works in P2Pool
## How payouts work in P2Pool
First you need to find a pool share. This share will stay in PPLNS window for 2160 pool blocks (6 hours). The moment P2Pool finds a Monero block and you have at least 1 pool share in PPLNS window, you'll get a payout! Monero block reward is split between all miner wallets in PPLNS window. Each miner gets a part of block reward proportional to the total difficulty of his/her shares in PPLNS window.
First you need to find a pool share. This share will stay in [PPLNS](https://en.wikipedia.org/wiki/Mining_pool#Pay-per-last-N-shares) window for up to 2160 pool blocks (6 hours, auto adjustable to balance payout sizes and frequency). The moment P2Pool finds a Monero block and you have at least 1 pool share in PPLNS window, you'll get a payout! Monero block reward is split between all miner wallets in PPLNS window. Each miner gets a part of block reward proportional to the total difficulty of his/her shares in PPLNS window.
**NOTE** If P2Pool doesn't have enough hashrate to find Monero blocks faster than every 6 hours on average (~15 MH/s), **not all your pool shares will result in a payout**. Even if pool hashrate is higher, bad luck can sometimes result in a share going through PPLNS window without a payout. But in the long run it will be compensated by other shares receiving multiple payouts - your payouts will average out to what you'd get with regular pool mining.
## Default P2Pool parameters
* Block time: 10 seconds
* PPLNS window: 2160 blocks (6 hours)
* Minimum payout = Monero block reward/2160, currently ~0.0004 XMR
* PPLNS window: up to 2160 blocks (6 hours, auto adjustable to balance payout sizes and frequency)
* Minimum payout = Monero block reward/2160, ~0.00027 XMR
## Monero version support
- The latest Monero network upgrade happened on August 13th, 2022 (block 2,688,888).
- The latest P2Pool network upgrade happened on October 12th, 2024 at 20:00 UTC.
In order to continue mining on P2Pool, you must update both Monero and P2Pool software to the latest available versions as soon as they are released.
|Monero protocol version|Required Monero software version|Required P2Pool version
|-|-|-|
|v15, v16 (active after August 13th, 2022)|v0.18.0.0 or newer, v0.18.4.1 is recommended|v4.0 or newer
## How to mine on P2Pool
### General Considerations
- In order to mine on P2Pool, a synced Monero node using monerod v0.18.0.0 or newer is required. If you don't currently have one, you can download the [official Monero binaries](https://www.getmonero.org/downloads/), start `monerod` on your PC and wait until it's fully synced. Advanced Monero node setup instructions are [here](https://sethforprivacy.com/guides/run-a-monero-node-advanced/).
- It is highly recommended that you create a separate restricted user account (in your OS) for mining. While P2Pool has been battle-tested for a long time now, any software may have unknown bugs/vulnerabilities.
- You have to use a primary wallet address (the one starting with `4`) for mining. Subaddresses and integrated addresses are not supported, just like with monerod solo mining.
- You can add the `--mini` parameter to your P2Pool command to connect to the **p2pool-mini** sidechain. Note that it will also change the default p2p port from 37889 to 37888.
- Check that ports 18080 (Monero p2p port) and 37889/37888 (P2Pool/P2Pool mini p2p port) are open in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine.
- You can connect multiple miners to the same P2Pool node. The more the better!
- The steps below assume that you run everything on the same machine. If it's not the case, change `127.0.0.1` to appropriate IP addresses for your setup.
- It is highly recommended to create a new mainnet wallet for P2Pool mining because **wallet addresses are public on P2Pool**.
**Wallet software compatible with P2Pool payouts**
- [Official Monero CLI and GUI v0.18.0.0 and newer](https://www.getmonero.org/downloads/)
- [Monerujo v3.0.2 "Fluorine Fermi" and newer](https://www.monerujo.io/)
- [Cake Wallet v4.4.5 and newer](https://cakewallet.com/)
- [Monero.com by Cake Wallet](https://monero.com/)
- [Feather Wallet v2.1.0 and newer](https://featherwallet.org/)
- [MyMonero](https://mymonero.com/)
### GUI for P2Pool
- [Gupax](https://github.com/hinto-janai/gupax) project aims to provide an easy to use cross-platform GUI to configure and run P2Pool & [XMRig](https://github.com/xmrig/xmrig).
### Merge mining
Merge mining is available in P2Pool since the fork that happened on October 12th, 2024. Version 4.0 or newer is required to use it.
Blockchains that will support [Merge mining RPC API](https://github.com/SChernykh/p2pool/blob/master/docs/MERGE_MINING.MD#proposed-rpc-api):
- [Townforge](https://townforge.net/) supports it in their [tmp-mm branch](https://git.townforge.net/townforge/townforge/src/branch/tmp-mm) (not released yet)
- [DarkFi](https://dark.fi/) is going to support it, but it's [not ready yet](https://github.com/darkrenaissance/darkfi/issues/244)
```
p2pool.exe --wallet YOUR_MONERO_WALLET_ADDRESS --merge-mine IP:port YOUR_WALLET_ADDRESS_ON_ANOTHER_BLOCKCHAIN
```
Blockchains that support merge mining already: [Tari](https://www.tari.com/)
Tari uses their own gRPC API and requires a different command line:
```
./p2pool --wallet YOUR_MONERO_WALLET_ADDRESS --merge-mine tari://TARI_NODE_IP:18102 TARI_WALLET_ADDRESS
```
and on the Tari side
```
./minotari_node --grpc-enabled --mining-enabled
```
TARI_NODE_IP is 127.0.0.1 if you run both on the same machine (recommended).
Merge mining is available on Tari's mainnet:
- Download [Tari suite](https://github.com/tari-project/tari/releases/latest) for your OS
- Run Minotari node and wait until in synchronizes
- Run Minotari console wallet to create a Tari wallet
- Copy the "Tari Address one-sided" from the "Receive" tab of the wallet
- Paste it into the P2Pool command line above
- Everything is ready now to start merge mining Monero and Tari!
Note that Tari will be mined in solo mode (only full Tari blocks can be mined for now). This doesn't affect P2Pool payouts - they will stay the same.
### GNU/Linux
1. Download the latest P2Pool binaries [here](https://github.com/SChernykh/p2pool/releases/latest).
- Alternatively, grab the latest source code for P2Pool and [build it](#build-instructions).
2. Download the latest XMRig (linux-static-x64) binary [here](https://github.com/xmrig/xmrig/releases/latest).
3. Prepare enough huge pages (each of monerod/P2Pool/XMRig needs them):
```
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
```
**Note:**
The `--zmq-pub` option is required for P2Pool to work properly.
`--out-peers 32 --in-peers 64` is needed to (1) have many connections to other nodes and (2) limit incoming connection count because it can grow uncontrollably and cause problems when it goes above 1000 (open files limit in Linux). If your network connection's **upload** bandwidth is less than **10 Mbit**, use `--out-peers 8 --in-peers 16` instead.
`--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)
`--enable-dns-blocklist` is needed to ban known bad nodes
6. Start P2Pool with the following command/options:
```
./p2pool --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS
```
7. Wait until the initial P2Pool sync is finished (shouldn't take more than 5-10 minutes).
8. Start XMRig with the following command/options:
```
./xmrig -o 127.0.0.1:3333
```
- Note that you don't need to specify your wallet address for XMRig. **Wallet addresses set in XMRig config will be ignored!**
- To set a custom fixed difficulty for your miner (for example, 10000), instead start XMRig with the following options:
```
./xmrig -u x+10000 -o 127.0.0.1:3333
```
9. XMRig should connect and start mining!
**Additional Information:**
- For a more in-depth beginner friendly walk-through with the option of using Docker, please see SethForPrivacy's guide at: https://sethforprivacy.com/guides/run-a-p2pool-node/
- You can check the p2pool.log for any warnings or errors using the following command:
```
grep -E 'WARNING|ERROR' p2pool.log
```
- P2Pool has verbose logging by default, you can reduce it by using "loglevel N" command where N is between 0 and 6. Default loglevel is 3.
- You can use `logrotate` with a config like this to control logfile growth:
```
<path-to-logfile>
{
rotate 7
daily
missingok
delaycompress
nocreate
}
```
### Windows
**Note:** *Windows SmartScreen may block incoming connections by files that are "Downloaded from the Internet". You can allow 'p2pool.exe' and 'monerod.exe' by double-clicking them, clicking "More Info", then click "Run Anyway" and then closing them immediately so you can run them from the command line. Advanced users can use the PowerShell cmdlet `Unblock-File` to remove this flag.*
1. Download the latest P2Pool binaries [here](https://github.com/SChernykh/p2pool/releases/latest).
- Alternatively, grab the latest source code for P2Pool and [build it](#build-instructions).
2. Download the latest XMRig binary [here](https://github.com/xmrig/xmrig/releases/latest).
3. Expand the P2Pool binaries into an appropriate location (`%USERPROFILE%/bin` or `C:/bin/` are good options)
4. Expand XMRig binary into an appropriate location (the same folder as P2Pool is fine).
5. Prepare huge pages to work properly (each of monerod/P2Pool/XMRig needs them):
- On Windows 10 or above, run XMRig at least once as Administrator (right-click Run As Administrator)
- On earlier versions of Windows, you'll need to run XMRig as Administrator at least once per login.
6. Create "Monero" folder inside extracted P2Pool folder and copy Monero binaries there.
7. Open a command prompt and navigate to the folder where you extracted P2Pool.
**Note:** *When running the below commands, Windows Firewall may prompt to allow connections, click "Allow" if prompted.*
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
```
**Note:**
The `--zmq-pub` option is required for P2Pool to work properly.
`--out-peers 32 --in-peers 64` is needed to (1) have many connections to other nodes and (2) limit incoming connection count because it can grow uncontrollably and cause problems when it goes above 1000 (open files limit in Linux). If your network connection's **upload** bandwidth is less than **10 Mbit**, use `--out-peers 8 --in-peers 16` instead.
`--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)
`--enable-dns-blocklist` is needed to ban known bad nodes
9. Start P2Pool with the following command/options:
```
.\p2pool.exe --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS --mini
```
10. Wait until the initial P2Pool sync is finished (shouldn't take more than 5-10 minutes).
11. Start XMRig with the following command/options:
```
.\xmrig.exe -o 127.0.0.1:3333
```
- Note that you don't need to specify your wallet address for XMRig. **Wallet addresses set in XMRig config will be ignored!**
- To set a custom fixed difficulty for your miner (for example, 10000), instead start XMRig with the following options:
```
xmrig.exe -u x+10000 -o 127.0.0.1:3333
```
12. XMRig should connect and start mining!
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
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
ECHO Wait until the daemon shows fully synced before continuing. This can take some time.
PAUSE
%~dp0\xmrig.exe -o 127.0.0.1
```
## Build instructions
Only 64-bit builds are supported, in particular ARMv7 or older CPUs are not supported. The reason is that RandomX hashing algorithm is too slow in 32-bit mode, and P2Pool needs to check new blocks very fast to keep up with other nodes.
### Prerequisites
- cmake >= 3.10
- C++ compiler with C++17 support. GCC-8, Clang-13 and MSVC-2019 have been tested and confirmed to work, older compilers may fail to build P2Pool.
### Ubuntu 20.04
p2pool binary:
Run the following commands to install the necessary prerequisites, clone this repo, and build P2Pool locally on Ubuntu 20.04:
```
sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev
sudo apt update && sudo apt install git build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev
git clone --recursive https://github.com/SChernykh/p2pool
cd p2pool
mkdir build && cd build
@@ -65,23 +281,15 @@ cmake ..
make -j$(nproc)
```
monerod binary compatible with p2pool:
```
sudo apt update && sudo apt install git build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-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 ccache doxygen graphviz
git clone --recursive https://github.com/SChernykh/monero
cd monero
git checkout p2pool-api-v0.17
git submodule sync && git submodule update --init --force --recursive
make release-static -j$(nproc)
```
### [Arch Linux](https://archlinux.org/packages/extra/x86_64/p2pool/)
### Arch Linux [AUR](https://wiki.archlinux.org/title/Arch_User_Repository)
Make the package: [p2pool-git](https://aur.archlinux.org/packages/p2pool-git/)
```
pacman -S p2pool
```
### [Nix/NixOS](https://nixos.org)
This is a flake only project. So you have to use [nixUnstable with nix flakes](https://nixos.wiki/wiki/Flakes) to build or install p2pool.
This is a flake only project. So you have to use [nixUnstable with nix flakes](https://nixos.wiki/wiki/Flakes) to build or install P2Pool.
The commands below use the new flake specific reference-format, so be sure to also set `ca-references` in `--experimental-features`.
Because this project has submodules which are not fixed in _nixUnstable_ yet you have to use the `nix/master` branch:
@@ -91,39 +299,17 @@ nix shell github:nixos/nix/master
Run the binary:
```
nix run git+https://github.com/SChernykh/p2pool?ref=master
nix run git+https://github.com/SChernykh/p2pool?ref=master&submodules=1
```
Run the binary with arguments:
```
nix run git+https://github.com/SChernykh/p2pool?ref=master -- --help
```
### macOS
p2pool binary:
```
brew update && brew install git cmake libuv zmq libpgm
git clone --recursive https://github.com/SChernykh/p2pool
cd p2pool
mkdir build && cd build
cmake ..
make -j$(sysctl -n hw.logicalcpu)
```
monerod binary compatible with p2pool:
```
git clone --recursive https://github.com/SChernykh/monero
cd monero
git checkout p2pool-api-v0.17
git submodule sync && git submodule update --init --force --recursive
brew update && brew bundle --file=contrib/brew/Brewfile
make -j$(sysctl -n hw.logicalcpu)
nix run git+https://github.com/SChernykh/p2pool?ref=master&submodules=1 -- --help
```
### Windows
p2pool binary (Visual Studio Community 2019 build):
P2Pool binary (Visual Studio Community 2019 build):
*NOTE: You need to have the "Desktop Development with C++" module installed.*
```
git clone --recursive https://github.com/SChernykh/p2pool
@@ -136,93 +322,65 @@ then open generated build\p2pool.sln in Visual Studio and build it there
Alternatively, you can select "Clone a repository" within the GUI, then select "Build" from the menu.
monerod binary compatible with p2pool:
### macOS
Run the following commands to install the necessary prerequisites, clone this repo, and build P2Pool locally on your Mac:
```
git clone --recursive https://github.com/SChernykh/monero
cd monero
git checkout p2pool-api-v0.17
git submodule sync && git submodule update --init --force --recursive
brew update && brew install git cmake libuv zmq libpgm curl
git clone --recursive https://github.com/SChernykh/p2pool
cd p2pool
mkdir build && cd build
cmake ..
make -j$(sysctl -n hw.logicalcpu)
```
then follow the instructions from https://github.com/monero-project/monero/#on-windows
## How to mine on P2Pool
### FreeBSD
This guide assumes that you run everything on the same machine. If it's not the case, change `127.0.0.1` to appropriate IP addresses for your setup. It's highly recommended to create a new mainnet wallet for mining because **wallet addresses are public on p2pool**.
**Wallet software compatible with p2pool payouts**
- Official Monero CLI and GUI v0.17.2.3 and newer
- Monerujo v2.1.0 "Vertant" and newer
- Cake Wallet v4.2.7 and newer
- MyMonero
**General Considerations**
- Create a separate restricted user account for mining. p2pool is relatively new and may still have serious bugs/vulnerabilities!
- You have to use the primary wallet address for mining. Subaddresses and integrated addresses are not supported, just like with monerod solo mining.
- Check that ports 18080 (Monero p2p port) and 37889 (p2pool p2p port) are open in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine.
- You can connect multiple miners to the same p2pool node. The more the better!
Step-by-step guide:
### GNU/Linux
- Download binaries from https://github.com/SChernykh/p2pool/releases/latest
- Alternatively, grab the latest source code for both p2pool and monerod and build them (see above, also notice that the branch name for monerod changed, you'll need to checkout p2pool-api-v0.17)
- Prepare enough huge pages (each of monerod/p2pool/xmrig needs them): `sudo sysctl vm.nr_hugepages=3072`
- Get xmrig (linux-static-x64) binary from https://github.com/xmrig/xmrig/releases/latest
- Check that ports 18080 (Monero p2p port) and 37889 (p2pool p2p port) are open in your firewall to ensure better connectivity
- Run `./monerod --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist` **don't forget --zmq-pub parameter in the command line**
- Double check that it shows **Monero 'Oxygen Orion' (v0.17.2.3-7dbb0d1fc)** on startup. Wait until it's synchronized.
- Run `./p2pool --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS`
- p2pool has _very_ verbose logging by default, it will spam a lot, no I mean A LOT in both console and in p2pool.log. Logs help testing immensely!
- You can use `logrotate` with a config like this to control logfile growth:
```
<path-to-logfile>
{
rotate 7
daily
missingok
delaycompress
nocreate
}
```
- Wait until initial p2pool sync is finished, it shouldn't take more than 5-10 minutes, once completed xmrig should be able to connect to the stratum server on port 3333.
- Run `./xmrig -o 127.0.0.1:3333`. Note that you don't need to specify wallet address for xmrig. **Wallet address set in xmrig config will be ignored!**
- To set custom fixed difficulty for your miner (for example, 10000), run `./xmrig -u x+10000 -o 127.0.0.1:3333`
- xmrig should connect and start mining
- Also check p2pool.log for any warnings and errors: `grep -E 'WARNING|ERROR' p2pool.log`
### Windows
*NOTE: Windows SmartScreen may block incoming connections by files that are "Downloaded from the Internet". You can allow 'p2pool.exe' and 'monerod.exe' by double-clicking them, clicking "More Info", then click "Run Anyway" and then closing them immediately so you can run them from the command line. Advanced users can use the PowerShell cmdlet `Unblock-File` to remove this flag.*
- Download p2pool binaries from https://github.com/SChernykh/p2pool/releases/latest
- Download xmrig binary from https://github.com/xmrig/xmrig/releases/latest *(xmrig-6.15.0-gcc-win64.zip is the current version)*
- Expand the p2pool binaries into an appropriate location (`%USERPROFILE%/bin` or `C:/bin/` are good options)
- Expand xmrig binary into appropriate location (same folder as p2pool is fine)
- Prepare huge pages (each of monerod/p2pool/xmrig needs them):
- On Windows 10 or above, run xmrig at least once as Administrator (right-click Run As Administrator)
- On earlier versions of Windows, you'll need to run it as admin at least once per login.
- Open a command prompt and navigate to the folder where you extracted p2pool.
- *When running these commands, Windows Firewall may prompt to allow connections, click "Allow"*
- Run `.\Monero\monerod.exe --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist` *NOTE: don't forget --zmq-pub parameter in the command line*
- Double check that it shows **Monero 'Oxygen Orion' (v0.17.2.3-7dbb0d1fc)** on startup. Wait until it's synchronized.
- Run `.\p2pool.exe --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS`
- Wait until initial p2pool sync is finished, it shouldn't take more than 5-10 minutes, once completed xmrig should be able to connect to the stratum server on port 3333.
- Run `.\xmrig.exe -o 127.0.0.1:3333`. Note that you don't need to specify wallet address for xmrig. **Wallet address set in xmrig config will be ignored!**
- To set custom fixed difficulty for your miner (for example, 10000), run `xmrig.exe -u x+10000 -o 127.0.0.1:3333`
- Windows Quickstart: Create a batch (.bat) file with the following contents and place it in your p2pool directory along with xmrig.exe.
Run the following commands to install the necessary prerequisites, clone this repo, and build P2Pool locally on FreeBSD:
```
@ECHO OFF
start cmd /k %~dp0\Monero\monerod.exe --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --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
ECHO Wait until the daemon shows fully synced before continuing. This can take some time.
PAUSE
%~dp0\xmrig.exe -u x+30000 -o 127.0.0.1
pkg install git cmake libuv libzmq4 curl
git clone --recursive https://github.com/SChernykh/p2pool
cd p2pool
mkdir build && cd build
cmake ..
make
```
### Android (Termux)
Run the following commands to install the necessary prerequisites, clone this repo, and build P2Pool locally in Termux:
```
pkg install git build-essential cmake libuv libzmq libcurl
git clone --recursive https://github.com/SChernykh/p2pool
cd p2pool
mkdir build && cd build
cmake ..
make -j$(nproc)
```
## Reproducible builds
Starting from v4.9, P2Pool uses [reproducible builds](https://en.wikipedia.org/wiki/Reproducible_builds) to create the release binaries. This allows verification that no vulnerabilities or backdoors have been introduced during the compilation process, and that the compiled binaries correspond to the source code.
It removes the need for trust that the author or maintainer of the code is not malicious/compromised, and that the build server is not compromised.
Anyone can run the same build script on the same source code, and get the same release binaries in the end, confirming their authenticity.
Prerequisites: Ubuntu with Docker and Git installed.
Example of building v4.9 release binaries:
```
git clone --branch v4.9 --recursive https://github.com/SChernykh/p2pool
p2pool/scripts/release/build_all.sh v4.9
```
The binaries will be created in `p2pool/scripts/release` folder. First time you run it, it will take up to several hours to first build the Docker image with all the necessary tools in it. Wait until all builds are finished and then run
```
cd p2pool/scripts/release
./gen_sums.sh
```
to generate the hash sums and compare them with the official release's hash sums.
## Donations
If you'd like to support further development of Monero P2Pool, you're welcome to send any amount of XMR to the following address:
@@ -230,3 +388,13 @@ If you'd like to support further development of Monero P2Pool, you're welcome to
```
44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg
```
Starting from v4.6, P2Pool will also have an ability to merge mine donations for the author.
Note that this will not affect your hashrate or payouts in any way. P2Pool will always (100% of the time) keep mining to your configured Monero wallet address, but it might also use the available merge mining capacity to donate to the author.
If you merge mine yourself, your settings will take priority.
The merge mining donation runs without a donation server - there is no "phoning home" to a server, everything is done through the P2Pool's network in a decentralized way.
To opt out of this, build P2Pool with `-DWITH_MERGE_MINING_DONATION=OFF` in cmake command line. Due to the architecture of the decentralized P2Pool network, your node will still relay donation messages to other nodes even if you opted out (but it will not process them).
+9
View File
@@ -0,0 +1,9 @@
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_ASM_COMPILER aarch64-linux-gnu-as)
set(CMAKE_STRIP aarch64-linux-gnu-strip)
+134 -27
View File
@@ -1,50 +1,157 @@
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(WARNING_FLAGS "-Wall -Wextra -Werror")
set(OPTIMIZATION_FLAGS "-Ofast -s")
set(GENERAL_FLAGS "-pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
if (ARMv8)
set(GENERAL_FLAGS "${GENERAL_FLAGS} -mfix-cortex-a53-835769 -mfix-cortex-a53-843419")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
if (DEV_WITH_TSAN)
set(GENERAL_FLAGS "${GENERAL_FLAGS} -fno-omit-frame-pointer -fsanitize=thread")
endif()
if (DEV_WITH_UBSAN)
set(GENERAL_FLAGS "${GENERAL_FLAGS} -fno-omit-frame-pointer -fsanitize=undefined")
endif()
if (DEV_WITH_ASAN)
set(GENERAL_FLAGS "${GENERAL_FLAGS} -fno-omit-frame-pointer -fsanitize=address")
endif()
set(WARNING_FLAGS "-Wall -Wextra -Wcast-qual -Wlogical-op -Wundef -Wformat=2 -Wpointer-arith -Werror -Wno-error=inline -Wno-error=unused-function -Wno-error=strict-overflow")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.5.0)
set(WARNING_FLAGS "${WARNING_FLAGS} -Wstrict-overflow=2")
endif()
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15))
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-cpp")
endif()
if (DISABLE_WARNINGS)
set(WARNING_FLAGS "-w")
endif()
if (DEV_WITH_TSAN OR DEV_WITH_UBSAN OR DEV_WITH_ASAN OR DEV_DEBUG OR (CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
add_definitions(-DDEBUG_BUILD)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(OPTIMIZATION_FLAGS "-O0")
else()
set(OPTIMIZATION_FLAGS "-Og")
endif()
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -g3 -ftrapv")
else()
set(OPTIMIZATION_FLAGS "-O3 -ffast-math -s")
endif()
if (WITH_LTO AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -flto=auto -fuse-linker-plugin")
endif()
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -fno-associative-math")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GENERAL_FLAGS} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "")
set(CMAKE_C_FLAGS_RELEASE "")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "")
set(CMAKE_C_FLAGS_MINSIZEREL "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GENERAL_FLAGS} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_RELEASE "")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
set(CMAKE_CXX_FLAGS_MINSIZEREL "")
if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
else()
if (STATIC_LINUX_BINARY)
if (STATIC_BINARY)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif()
endif()
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(GENERAL_FLAGS "/MP /EHa")
set(WARNING_FLAGS "/Wall /WX /sdl")
set(SECURITY_FLAGS "/GS /guard:cf")
set(OPTIMIZATION_FLAGS "/O2 /Oi /Ob2 /Ot /DNDEBUG /GL")
set(OPTIMIZATION_FLAGS "/O2 /Oi /Ob2 /Ot /Oy /DNDEBUG /GL")
set(CMAKE_C_FLAGS_DEBUG "${WARNING_FLAGS} ${SECURITY_FLAGS} /Od /Ob0 /Zi /MTd /fsanitize=address")
set(CMAKE_CXX_FLAGS_DEBUG "${WARNING_FLAGS} ${SECURITY_FLAGS} /Od /Ob0 /Zi /MTd /fsanitize=address")
if (DISABLE_WARNINGS)
set(WARNING_FLAGS "/W0")
endif()
set(CMAKE_C_FLAGS_RELEASE "${WARNING_FLAGS} ${SECURITY_FLAGS} ${OPTIMIZATION_FLAGS} /MT")
set(CMAKE_CXX_FLAGS_RELEASE "${WARNING_FLAGS} ${SECURITY_FLAGS} ${OPTIMIZATION_FLAGS} /MT")
if (DEV_DEBUG OR (CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
add_definitions(-DDEBUG_BUILD)
endif()
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${WARNING_FLAGS} ${SECURITY_FLAGS} /Ob1 /Ot /Zi /MT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${WARNING_FLAGS} ${SECURITY_FLAGS} /Ob1 /Ot /Zi /MT")
set(CMAKE_C_FLAGS_DEBUG "${GENERAL_FLAGS} ${WARNING_FLAGS} ${SECURITY_FLAGS} /Od /Ob0 /Zi /MTd")
set(CMAKE_CXX_FLAGS_DEBUG "${GENERAL_FLAGS} ${WARNING_FLAGS} ${SECURITY_FLAGS} /Od /Ob0 /Zi /MTd")
if (DEV_WITH_ASAN)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /fsanitize=address")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /fsanitize=address")
endif()
set(CMAKE_C_FLAGS_RELEASE "${GENERAL_FLAGS} ${WARNING_FLAGS} ${SECURITY_FLAGS} ${OPTIMIZATION_FLAGS} /MT")
set(CMAKE_CXX_FLAGS_RELEASE "${GENERAL_FLAGS} ${WARNING_FLAGS} ${SECURITY_FLAGS} ${OPTIMIZATION_FLAGS} /MT")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${GENERAL_FLAGS} ${WARNING_FLAGS} ${SECURITY_FLAGS} /Ob1 /Ot /Zi /MT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GENERAL_FLAGS} ${WARNING_FLAGS} ${SECURITY_FLAGS} /Ob1 /Ot /Zi /MT")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
set(WARNING_FLAGS "-Wall -Wextra -Wno-undefined-internal -Werror")
set(OPTIMIZATION_FLAGS "-Ofast -funroll-loops -fmerge-all-constants")
if (WIN32)
set(GENERAL_FLAGS "")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
else()
set(GENERAL_FLAGS "-pthread")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
if (ARMv8)
set(GENERAL_FLAGS "${GENERAL_FLAGS} -mfix-cortex-a53-835769")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
set(WARNING_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-undefined-internal -Wno-unknown-warning-option -Wno-nan-infinity-disabled -Wunreachable-code-aggressive -Wmissing-prototypes -Wmissing-variable-declarations -Werror")
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20))
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-cpp")
endif()
if (DISABLE_WARNINGS)
set(WARNING_FLAGS "-w")
endif()
if (DEV_WITH_MSAN OR DEV_DEBUG OR (CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
add_definitions(-DDEBUG_BUILD)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(OPTIMIZATION_FLAGS "-O0")
else()
set(OPTIMIZATION_FLAGS "-Og")
endif()
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -g3 -ftrapv")
else()
set(OPTIMIZATION_FLAGS "-O3 -ffast-math -funroll-loops -fmerge-all-constants")
endif()
if (WITH_LTO AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -flto")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GENERAL_FLAGS} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "")
set(CMAKE_C_FLAGS_RELEASE "")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "")
set(CMAKE_C_FLAGS_MINSIZEREL "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GENERAL_FLAGS} ${WARNING_FLAGS} ${OPTIMIZATION_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_RELEASE "")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
set(CMAKE_CXX_FLAGS_MINSIZEREL "")
if (STATIC_BINARY)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
endif()
endif()
@@ -0,0 +1,7 @@
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME FreeBSD)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
@@ -0,0 +1,7 @@
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME FreeBSD)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
+40
View File
@@ -0,0 +1,40 @@
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_SHARED_LIBS OFF CACHE BOOL "Build protobuf Shared Libraries")
set(protobuf_DISABLE_RTTI ON CACHE BOOL "Remove runtime type information in the binaries")
set(utf8_range_ENABLE_TESTS OFF CACHE BOOL "Build test suite")
set(utf8_range_ENABLE_INSTALL OFF CACHE BOOL "Configure installation")
set(RE2_BUILD_TESTING OFF CACHE BOOL "enable testing for RE2")
set(gRPC_BUILD_CODEGEN OFF CACHE BOOL "Build codegen")
set(gRPC_DOWNLOAD_ARCHIVES OFF CACHE BOOL "Download archives for empty 3rd party directories")
set(gRPC_BUILD_GRPC_CPP_PLUGIN OFF CACHE BOOL "Build grpc_cpp_plugin")
set(gRPC_BUILD_GRPC_CSHARP_PLUGIN OFF CACHE BOOL "Build grpc_csharp_plugin")
set(gRPC_BUILD_GRPC_NODE_PLUGIN OFF CACHE BOOL "Build grpc_node_plugin")
set(gRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN OFF CACHE BOOL "Build grpc_objective_c_plugin")
set(gRPC_BUILD_GRPC_PHP_PLUGIN OFF CACHE BOOL "Build grpc_php_plugin")
set(gRPC_BUILD_GRPC_PYTHON_PLUGIN OFF CACHE BOOL "Build grpc_python_plugin")
set(gRPC_BUILD_GRPC_RUBY_PLUGIN OFF CACHE BOOL "Build grpc_ruby_plugin")
set(gRPC_MSVC_STATIC_RUNTIME ON CACHE BOOL "Link gRPC with static msvc runtime libraries")
set(CARES_STATIC ON CACHE BOOL "Build as a static library")
set(CARES_SHARED OFF CACHE BOOL "Build as a shared library")
set(CARES_INSTALL OFF CACHE BOOL "Create installation targets (chain builders may want to disable this)")
set(CARES_BUILD_TOOLS OFF CACHE BOOL "Build tools")
if ((CMAKE_C_COMPILER_ID MATCHES MSVC) OR (CMAKE_CXX_COMPILER_ID MATCHES MSVC))
include_directories(external/src/common)
endif()
add_definitions(-DPROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0)
add_subdirectory(external/src/grpc)
include_directories(external/src/grpc/third_party/abseil-cpp)
include_directories(external/src/grpc/third_party/boringssl-with-bazel/src/include)
include_directories(external/src/grpc/third_party/protobuf/src)
include_directories(external/src/grpc/include)
@@ -0,0 +1,9 @@
set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER /usr/local/bin/aarch64-apple-darwin24.5-clang)
set(CMAKE_CXX_COMPILER /usr/local/bin/aarch64-apple-darwin24.5-clang++)
set(CMAKE_ASM_COMPILER /usr/local/bin/aarch64-apple-darwin24.5-as)
set(CMAKE_STRIP /usr/local/bin/aarch64-apple-darwin24.5-strip)
+9
View File
@@ -0,0 +1,9 @@
set(CMAKE_SYSTEM_NAME Darwin)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_C_COMPILER /usr/local/bin/x86_64-apple-darwin24.5-clang)
set(CMAKE_CXX_COMPILER /usr/local/bin/x86_64-apple-darwin24.5-clang++)
set(CMAKE_ASM_COMPILER /usr/local/bin/x86_64-apple-darwin24.5-as)
set(CMAKE_STRIP /usr/local/bin/x86_64-apple-darwin24.5-strip)
+73
View File
@@ -0,0 +1,73 @@
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION 10.0)
add_definitions(-D_DISABLE_VECTOR_ANNOTATION)
add_definitions(-D_DISABLE_STRING_ANNOTATION)
set(BUILD_TESTING OFF CACHE BOOL "")
set(LIBUV_BUILD_SHARED OFF CACHE BOOL "")
set(WITH_LIBSODIUM OFF CACHE BOOL "")
set(WITH_LIBBSD OFF CACHE BOOL "")
set(BUILD_TESTS OFF CACHE BOOL "")
set(ZMQ_HAVE_IPC OFF CACHE BOOL "")
set(WITH_DOCS OFF CACHE BOOL "")
set(ENABLE_DRAFTS OFF CACHE BOOL "")
set(BUILD_SHARED OFF CACHE BOOL "")
set(ENABLE_CLANG OFF CACHE BOOL "")
set(CURL_TARGET_WINDOWS_VERSION "0x0600" CACHE STRING "")
set(BUILD_CURL_EXE OFF CACHE BOOL "")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
set(CURL_DISABLE_INSTALL ON CACHE BOOL "")
set(CURL_ENABLE_EXPORT_TARGET OFF CACHE BOOL "")
set(CURL_DISABLE_HEADERS_API ON CACHE BOOL "")
set(CURL_DISABLE_BINDLOCAL ON CACHE BOOL "")
set(BUILD_LIBCURL_DOCS OFF CACHE BOOL "")
set(BUILD_MISC_DOCS OFF CACHE BOOL "")
set(ENABLE_CURL_MANUAL OFF CACHE BOOL "")
set(CURL_ZLIB OFF CACHE BOOL "")
set(CURL_BROTLI OFF CACHE BOOL "")
set(CURL_ZSTD OFF CACHE BOOL "")
set(CURL_DISABLE_ALTSVC ON CACHE BOOL "")
set(CURL_DISABLE_COOKIES ON CACHE BOOL "")
set(CURL_DISABLE_DOH ON CACHE BOOL "")
set(CURL_DISABLE_GETOPTIONS ON CACHE BOOL "")
set(CURL_DISABLE_HSTS ON CACHE BOOL "")
set(CURL_DISABLE_LIBCURL_OPTION ON CACHE BOOL "")
set(CURL_DISABLE_MIME ON CACHE BOOL "")
set(CURL_DISABLE_NETRC ON CACHE BOOL "")
set(CURL_DISABLE_NTLM ON CACHE BOOL "")
set(CURL_DISABLE_PARSEDATE ON CACHE BOOL "")
set(CURL_DISABLE_PROGRESS_METER ON CACHE BOOL "")
set(CURL_DISABLE_SHUFFLE_DNS ON CACHE BOOL "")
set(CURL_DISABLE_SOCKETPAIR ON CACHE BOOL "")
set(CURL_DISABLE_VERBOSE_STRINGS ON CACHE BOOL "")
set(CURL_DISABLE_WEBSOCKETS ON CACHE BOOL "")
set(HTTP_ONLY ON CACHE BOOL "")
set(CURL_ENABLE_SSL OFF CACHE BOOL "")
set(USE_LIBIDN2 OFF CACHE BOOL "")
set(CURL_USE_LIBPSL OFF CACHE BOOL "")
set(CURL_USE_LIBSSH2 OFF CACHE BOOL "")
set(ENABLE_UNIX_SOCKETS OFF CACHE BOOL "")
set(CURL_DISABLE_TESTS ON CACHE BOOL "")
set(USE_NGHTTP2 OFF CACHE BOOL "")
set(BUILD_EXAMPLES OFF CACHE BOOL "")
set(CURL_DISABLE_SRP ON CACHE BOOL "")
set(CURL_STATIC_CRT ON CACHE BOOL "")
if (WITH_TLS)
set(P2POOL_BORINGSSL ON CACHE BOOL "")
set(OPENSSL_INCLUDE_DIR "../grpc/third_party/boringssl-with-bazel/src/include" CACHE STRING "")
endif()
add_subdirectory(external/src/curl)
add_subdirectory(external/src/libuv)
add_subdirectory(external/src/libzmq)
set(CURL_LIBRARY_DEBUG libcurl_static)
set(CURL_LIBRARY libcurl_static)
set(UV_LIBRARY_DEBUG uv_a)
set(UV_LIBRARY uv_a)
set(ZMQ_LIBRARY_DEBUG libzmq-static)
set(ZMQ_LIBRARY libzmq-static)
+8
View File
@@ -0,0 +1,8 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_PROCESSOR riscv64)
set(CMAKE_C_COMPILER /usr/bin/riscv64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/riscv64-linux-gnu-g++)
set(CMAKE_STRIP /usr/bin/riscv64-linux-gnu-strip)
+9
View File
@@ -0,0 +1,9 @@
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR riscv64)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_ASM_COMPILER riscv64-linux-gnu-as)
set(CMAKE_STRIP riscv64-linux-gnu-strip)
+31
View File
@@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.12)
project(P2Pool_SSL LANGUAGES C CXX)
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /MT")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -w")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -w")
endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio")
if(CMAKE_VERSION VERSION_LESS 3.13)
message(WARNING "Disabling SSL assembly support because CMake version ${CMAKE_VERSION} is too old (less than 3.13)")
set(OPENSSL_NO_ASM ON)
else()
include(CheckLanguage)
check_language(ASM_NASM)
if(NOT CMAKE_ASM_NASM_COMPILER)
message(WARNING "Disabling SSL assembly support because NASM could not be found")
set(OPENSSL_NO_ASM ON)
endif()
endif()
endif()
add_subdirectory(../../external/src/grpc/third_party/boringssl-with-bazel BoringSSL)
+21
View File
@@ -0,0 +1,21 @@
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
if(NOT ARCH_ID)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "")
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCH_ID)
endif()
if (ARCH_ID MATCHES "^(aarch64|arm64|armv8-a)$")
set(ARMv8 1)
endif()
if (ARCH_ID MATCHES "^(x86_64|x86-64|amd64)$")
set(AMD64 1)
endif()
@@ -0,0 +1,8 @@
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_VERSION 6.0)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
+8 -3
View File
@@ -1,9 +1,14 @@
../src/
../external/src/
../external/src/crypto/
../external/src/cryptonote/
../external/src/libuv/
../external/src/cppzmq/
../external/src/libzmq/
../external/src/llhttp/
../external/src/RandomX/src/
../external/src/rapidjson/include
../external/src/miniupnp/miniupnpc/include/
../external/src/randomx/src/
../external/src/rapidjson/include/
../external/src/robin-hood-hashing/src/include/
../external/src/grpc/include/
../external/src/grpc/third_party/abseil-cpp/
../external/src/grpc/third_party/protobuf/src/
+15
View File
@@ -0,0 +1,15 @@
import sys
import json
f = open(sys.argv[1])
data = json.load(f)
f.close()
v = []
for el in data:
if not ("/external/" in el['file']):
v.append(el)
f = open(sys.argv[1], 'w')
json.dump(v, f, indent=2)
f.close()
+13 -2
View File
@@ -1,8 +1,19 @@
@echo off
"C:\Program Files\cppcheck\cppcheck.exe" --project=..\build\p2pool.vcxproj --project-configuration="Release|x64" -DZMQ_STATIC --platform=win64 --std=c++14 --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
findstr /V /C:"external\src" errors_full.txt > errors_filtered.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 -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
findstr /C:"There were critical errors" checkers_report.txt > checkers_report_filtered.txt
for /f %%i in ("errors_filtered.txt") do set size=%%~zi
if %size% gtr 0 (
type errors_filtered.txt
exit 1
)
for /f %%i in ("checkers_report_filtered.txt") do set size2=%%~zi
if %size2% gtr 0 (
type checkers_report_filtered.txt
exit 1
)
+12 -2
View File
@@ -1,7 +1,17 @@
#!/bin/bash
cppcheck ../src -DZMQ_STATIC --platform=unix64 --std=c++14 --enable=all --inconclusive --inline-suppr --template="{file}:{line}:{id}{inconclusive: INCONCLUSIVE} {message}" -I ../src/ -I ../external/src/ -I ../external/src/cryptonote/ -I ../external/src/libuv/ -I ../external/src/cppzmq/ -I ../external/src/libzmq/ -I ../external/src/llhttp/ -I ../external/src/RandomX/src/ -I ../external/src/rapidjson/include --suppressions-list=suppressions.txt --output-file=errors_full.txt
grep -v 'external' errors_full.txt | grep -v 'unmatchedSuppression' > errors_filtered.txt
../cppcheck-main/cppcheck --project=../build/compile_commands.json -D__cppcheck__ -DSIZE_MAX=UINT64_MAX -DRAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN -DRAPIDJSON_64BIT=1 -D__SSE2__=1 -D__BYTE_ORDER__=1 -D__ORDER_LITTLE_ENDIAN__=1 -D__linux__=1 -D__x86_64 -D_M_AMD64 -D_M_X64 --platform=unix64 --std=c++17 --enable=all --inconclusive --inline-suppr --template="{file}:{line}:{id}{inconclusive: INCONCLUSIVE} {message}" --suppressions-list=suppressions.txt --output-file=errors_full.txt --max-ctu-depth=3 --check-level=exhaustive --checkers-report=checkers_report.txt
grep -v 'external' errors_full.txt > errors_filtered0.txt
grep -v ':checkersReport' errors_filtered0.txt > errors_filtered.txt
grep 'There were critical errors' checkers_report.txt > checkers_report_filtered.txt
if [ -s errors_filtered.txt ]; then
cat errors_filtered.txt
exit 1
fi
if [ -s checkers_report_filtered.txt ]; then
cat checkers_report_filtered.txt
exit 1
fi
+1 -3
View File
@@ -1,6 +1,4 @@
unmatchedSuppression
missingIncludeSystem
unusedFunction
useStlAlgorithm
functionStatic
functionConst
unmatchedSuppression
+57
View File
@@ -0,0 +1,57 @@
# Monero P2Pool Docker Compose
Run your own <b>Monero Node + P2Pool + XMRig</b> in Docker
## Instructions
#### Install docker and docker-compose
[Install Docker](https://docs.docker.com/engine/install/)
[Install Docker Compose](https://docs.docker.com/compose/install/)
Note: The docker compose plugin uses the command "docker compose" while the pip installed command is "docker-compose".
#### Clone the P2Pool project
```
git clone --recursive https://github.com/SChernykh/p2pool
```
#### Configure your Monero address for mining rewards
```
cd p2pool/docker-compose
./configure
```
Make sure to set your own monero **Wallet Address**. The default is to donate mining to P2Pool development.
#### Build the docker containers
```
docker compose build --no-cache
```
#### Run the node, pool, and CPU miner (or updated configuration)
```
docker compose up
```
#### Optional
* Open ports 18080 (Monero p2p port) and 37889 (P2Pool p2p port) or 37888 (P2Pool-mini p2p port) in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine
* An XMRig CPU miner is included by default, but you can connect additional miners to this same p2pool node using port 3333 (or alternate if configured) when you set it as "exposed" in the configuration
* Configure your kernel for maximum mining performance: [XMRig RandomX Optimization Guide](https://xmrig.com/docs/miner/randomx-optimization-guide)
* Many optional configurations and customizations are available by running './configure'
#### Other usefull commands
* You can **run everything in the background** by adding the "-d" argument to the "docker compose up" command: ```docker compose up -d```
* You can **stop everything** with CTRL-C or ```docker compose down```
* You can **update** by building new images with the ```--no-cache``` option. Example: ```docker compose build --no-cache``` or just update Monero with: ```docker compose build --no-cache monero``` followed by ```docker compose up```
* You can see logs when running in the background for with the "docker compose logs" command: ```docker compose logs -f```
* You can pause mining with: ```docker compose pause xmrig``` and resume mining with: ```docker compose unpause xmrig```
* You can disable mining with: ```docker compose stop xmrig``` and re-enable mining with: ```docker compose start xmrig```
* You can view your Server Statistics using a web browser if you enabled that feature in the configuration at: http://localhost:3380 (or alternate port as configured)
#### Uninstall
Change to p2pool/docker-compose directory <br />
Stop and remove all containers: ```docker compose down``` <br />
Remove the p2pool data: ```docker volume rm p2pool``` <br />
Remove the p2pool-mini data: ```docker volume rm p2pool-mini``` <br />
Remove the monero data: ```docker volume rm monero```
+14
View File
@@ -0,0 +1,14 @@
FROM python:3.10.5-bullseye
WORKDIR /app
ADD requirements.txt /app/
RUN /usr/local/bin/pip3 install -r requirements.txt
ADD configure.py /app/
ADD defaults /app/
ADD current_config.jinja2 /app/
ADD docker-compose.jinja2 /app/
ENTRYPOINT ["/usr/local/bin/python3"]
CMD ["/app/configure.py"]
+951
View File
@@ -0,0 +1,951 @@
#!/bin/env python3
import sys
import time
import json
from jinja2 import Template
import npyscreen
# Help text in a box at the bottom of the screen
class HelpBoxBase(npyscreen.BoxTitle):
def splitlines(self):
all_help = []
for fld, msg in self.help_msgs.items():
if fld[-1] != ":":
fld += ":"
message = [m.lstrip() for m in msg if m != ""]
helpline = f"{fld:<28}{'. '.join(message)}"
all_help.append(helpline)
all_help.append("")
return all_help
def display_help_message(self, field):
self.set_values(
self.help_msgs.get(field, "No help availabe for {}".format(field))
)
self.clear()
self.display()
class P2PoolHelpBox(HelpBoxBase):
help_msgs = {
"Wallet Address:": [
"Your monero wallet address for receiving mining reqards",
"",
"Note: You have to use a primary wallet address for mining",
" Subaddresses and integrated addresses are not supported!",
],
"P2Pool Sidechain:": [
"Which P2Pool sidechain to mine on",
" use main for faster miners",
" use mini for slower miners",
],
"Enable Server Statistics": [
"Provide access to your P2Pool server statictics via a web interface",
],
"Statistics Port:": [
"Port number (or IP:Port) to expose web access to your P2Pool server",
"statictics",
],
"Expose Stratum Port": [
"Expose the P2Pool stratum port to your network so external miners",
"can connect",
"Note: You may choose to open this port in your hosts firewall and/or",
" router to allow miners outside your network to connect",
],
"Stratum Port:": [
"Port number (or IP:Port) to expose P2Pool stratum to your network to",
"allow external miners to connect",
"Note: You may choose to open this port in your hosts firewall and/or",
" router to allow miners outside your network to connect",
],
"P2Pool Log Level:": [
"Verbosity of the log; (Less) 0 - 6 (More)",
],
"Enable Autodiff": [
"Use automatic difficulty adjustment for miners connected to stratum",
],
"Enable Light Mode": [
"Don't allocate RandomX dataset, saves 2GB of RAM",
],
"Disable Cache": [
"Disable p2pool.cache (not recommended)",
],
"Additional P2Pool Options:": [
"Additional options to pass to p2pool commandline",
"",
"Note: Advanced - Only add options if you know what you are doing",
" See ouput of 'p2pool --help' for available options",
],
"Next": [
"Next configuration menu",
],
"Save": [
"Save current configuration and exit",
],
"Cancel": [
"Exit without saving",
],
}
class MoneroHelpBox(HelpBoxBase):
help_msgs = {
"Configure Monero Node": [
"Configure and run a Monero Node",
"",
"Note: You must either configure a local node or specify a public node",
],
"Monero Version:": [
"Version of Monero to build; 'latest' for the most recent release",
"",
"Note: Must be v0.17.3.0 or later for p2pool support",
" See: https://github.com/monero-project/monero/tags",
],
"Prune Blockchain": [
"Prune the Monero node to limit the size of the blockchain on disk",
],
"Monero Log Level:": [
"Verbosity of the log; (Less) 0 - 4 (More)",
"",
"Note: settings above 0 are very noisy",
],
"Expose RPC Port": [
"Expose restricted RPC API port to your network so external services",
"(wallets for example) can connect. Port 18083 (ZMQ-pub) will also be exposed.",
"Note: You may choose to open this port in your hosts firewall and/or",
" router to allow services outside your network to connect",
],
"RPC Port:": [
"TCP port to listen on for RPC connections",
],
"RPC Login:": [
"Specify username[:password] required to connect to the RPC API",
],
"Limit Data Rates": [
"Set a limit value for incoming and outgoing data transfer",
],
"Rate Limit Up:": [
"Set outgoing data transfer limit [kB/s]",
],
"Rate Limit Down:": [
"Set incoming data transfer limit [kB/s]",
],
"Sync Pruned Blocks": [
"Accept pruned blocks instead of pruning yourself to save",
"network transfer",
],
"Fast Block Sync": [
'Sync up most of the way by using embedded, "known" (old) block',
"hashes without calculating the block hash to verify the proof of work",
"",
"Note: Faster initial sync by trusting the monerod binary",
],
"Public Node:": [
"Public Monero Node to Use",
"",
"Note: The public node must have both Monero RPC and zmq-pub ports",
" available",
],
"Node Login:": [
"Specify username[:password] required to connect to public monero",
"node RPC API (if required)",
],
"Additional monerod Options:": [
"Additional options to pass to monerod commandline",
"",
"Note: Advanced - Only add options if you know what you are doing",
" See 'https://monerodocs.org/interacting/monerod-reference/'",
],
"Prev": [
"Previous configuration menu",
],
"Next": [
"Next configuration menu",
],
"Save": [
"Save current configuration and exit",
],
"Cancel": [
"Exit without saving",
],
}
class XMRigHelpBox(HelpBoxBase):
help_msgs = {
"Configure XMRig CPU Miner": [
"Configure and run an XMRig CPU Miner",
"",
"Note: You must either configure am XMRig CPU Miner or expose the",
" P2Pool stratum port and connect an external miner, or both",
],
"Username:": [
"Set a username for the miner",
],
"Use Fixed Difficulty": [
"Used a fixed minig difficulty",
"",
"Note: Allows you to see XMRig submitting shares below P2Pool threshold",
],
"Fixed Difficulty:": [
"Set a fixed mining difficulty",
"",
"Note: Allows you to see XMRig submitting shares below P2Pool threshold",
],
"CPU Use %:": [
"Maximum CPU threads count (in percentage) hint for autoconfig",
"Note: Applies to cores only. If you have HyperThreading enabled you",
" should divide this value by 2 (use 0-50%). Reference:",
" https://github.com/xmrig/xmrig/issues/1670#issuecomment-644433778",
],
"CPU Priority:": [
"Set process priority (0 idle, 2 normal to 5 highest)",
],
"Additional XMRig Options:": [
"Additional options to pass to xmrig",
"",
"Note: Advanced - Only add options if you know what you are doing",
" See 'https://xmrig.com/docs/miner/command-line-options'",
],
"Prev": [
"Previous configuration menu",
],
"Save": [
"Save current configuration and exit",
],
"Cancel": [
"Exit without saving",
],
}
##
# Custom (integer) values for title slider
class IntegerSlider(npyscreen.Slider):
def translate_value(self):
from_val = int(str(self.value).split(".")[0])
out_of_val = int(str(self.out_of).split(".")[0])
if from_val >= 1000:
from_val = str(from_val / 1000).split(".")[0] + "K"
out_of_val = str(out_of_val / 1000).split(".")[0] + "K"
return "{}/{}".format(from_val, out_of_val)
class TitleIntegerSlider(npyscreen.TitleSlider):
_entry_type = IntegerSlider
##
# Patched updateDependents for FormControlCheckbox
class PatchedFormControlCheckbox(npyscreen.FormControlCheckbox):
def updateDependents(self):
if self.value:
for w in self._visibleWhenSelected:
try:
w.fc_visible
except AttributeError:
w.fc_visible = {}
w.fc_visible[self.name] = True
for w in self._notVisibleWhenSelected:
try:
w.fc_visible
except AttributeError:
w.fc_visible = {}
w.fc_visible[self.name] = False
else:
for w in self._visibleWhenSelected:
try:
w.fc_visible
except AttributeError:
w.fc_visible = {}
w.fc_visible[self.name] = False
for w in self._notVisibleWhenSelected:
try:
w.fc_visible
except AttributeError:
w.fc_visible = {}
w.fc_visible[self.name] = True
for w in self._visibleWhenSelected + self._notVisibleWhenSelected:
w.hidden = False in w.fc_visible.values()
w.editable = not False in w.fc_visible.values()
self.parent.display()
def set_value(self, value):
self.value = value
self.display()
def display(self):
self.updateDependents()
super()
class PrevButton(npyscreen.Button):
def whenToggled(self):
self.value = False
self.parent.prev_form()
class NextButton(npyscreen.Button):
def whenToggled(self):
self.value = False
self.parent.next_form()
class SaveButton(npyscreen.Button):
def whenToggled(self):
self.find_parent_app().save_and_exit()
class CancelButton(npyscreen.Button):
def whenToggled(self):
self.find_parent_app().cancel_and_exit()
##
# Config Forms Base Class
class ConfigFormBase(npyscreen.FormBaseNew):
name_size = 20
indent = 5
current_config = None
defaults = None
ALLOW_RESIZE = False
def while_editing(self, arg):
self.help.display_help_message(arg.name)
self.display()
def get_default_config(self):
# Return defaults
if self.defaults is None:
with open("defaults") as defaults_file:
self.defaults = json.load(defaults_file)
return self.defaults
def get_current_config(self):
# Return current config
if self.current_config is None:
# Read current config
with open("/docker-compose/current_config") as current_config:
self.current_config = json.load(current_config)
return self.current_config
def reset_defaults(self, arg):
# Set config to default values
ok = npyscreen.notify_ok_cancel(
"Set current form values to defaults", title="Reset to Defaults"
)
if not ok:
return
defaults = self.get_default_config()
self.set_config(defaults)
##
# P2Pool Configuration Form
class P2PoolConfigForm(ConfigFormBase):
def create(self):
# Add Hot-Key Controls
self.add_handlers({"^D": self.reset_defaults})
# Add P2Pool Configuration
self.add(
npyscreen.TitleText,
name="## P2Pool Configuration",
editable=False,
begin_entry_at=50,
)
self.wallet_address = self.add(
npyscreen.TitleText,
name="Wallet Address:",
value="",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.nextrely += 1
self.sidechain = self.add(
npyscreen.TitleSelectOne,
name="P2Pool Sidechain:",
values=["main", "mini"],
scroll_exit=True,
max_height=2,
value=[
0,
],
begin_entry_at=self.name_size,
relx=self.indent,
)
self.nextrely += 1
self.enable_statistics = self.add(
PatchedFormControlCheckbox,
name="Enable Server Statistics",
value=True,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.statistics_port = self.add(
npyscreen.TitleText,
name="Statistics Port:",
value="3334",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.enable_statistics.addVisibleWhenSelected(self.statistics_port)
self.nextrely += 1
self.expose_stratum_port = self.add(
PatchedFormControlCheckbox,
name="Expose Stratum Port",
value=True,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.stratum_port = self.add(
npyscreen.TitleText,
name="Stratum Port:",
value="3333",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.expose_stratum_port.addVisibleWhenSelected(self.stratum_port)
self.nextrely += 1
self.p2pool_log_level = self.add(
TitleIntegerSlider,
name="P2Pool Log Level:",
out_of=6,
value=3,
lowest=0,
step=1,
width=43,
begin_entry_at=20,
label=True,
block_color=None,
relx=self.indent,
)
self.nextrely += 1
self.autodiff = self.add(
PatchedFormControlCheckbox,
name="Enable Autodiff",
value=True,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.nextrely += 1
self.light_mode = self.add(
PatchedFormControlCheckbox,
name="Enable Light Mode",
value=False,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.nextrely += 1
self.no_cache = self.add(
npyscreen.Checkbox,
name="Disable Cache",
value=False,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.nextrely += 1
self.p2pool_extra = self.add(
npyscreen.TitleText,
name="Additional P2Pool Options:",
value="",
begin_entry_at=self.name_size + 10,
relx=self.indent,
)
self.nextrely += 1
self.nextrely += 1
# Add "Next", "Save", and "Cancel" buttons
self.next_button = self.add(NextButton, name="Next", relx=1)
self.nextrely -= 1
self.save_button = self.add(SaveButton, name="Save", relx=8)
self.nextrely -= 1
self.cancel_button = self.add(CancelButton, name="Cancel", relx=15)
self.nextrely += 1
# Add Help Box
self.help = self.add(
P2PoolHelpBox,
name="Commands: ^D: Load Defaults - ^C: Exit Without Saving",
values=[""],
editable=False,
)
# Start with current config
self.set_config(self.get_current_config())
def next_form(self):
self.find_parent_app().switchForm("MONERO")
def set_config(self, config):
self.wallet_address.set_value(config["wallet_address"])
self.sidechain.set_value(config["sidechain"])
self.enable_statistics.set_value(config["enable_statistics"])
self.statistics_port.set_value(config["statistics_port"])
self.expose_stratum_port.set_value(config["expose_stratum_port"])
self.stratum_port.set_value(config["stratum_port"])
self.p2pool_log_level.set_value(config["p2pool_log_level"])
self.autodiff.set_value(config["enable_autodiff"])
self.light_mode.set_value(config["light_mode"])
self.no_cache.value = config["no_cache"]
self.p2pool_extra.set_value(config["p2pool_options"])
self.DISPLAY()
def get_config(self):
config = {
"wallet_address": self.wallet_address.value,
"sidechain": self.sidechain.value,
"enable_statistics": self.enable_statistics.value,
"statistics_port": self.statistics_port.value,
"expose_stratum_port": self.expose_stratum_port.value,
"stratum_port": self.stratum_port.value,
"p2pool_log_level": self.p2pool_log_level.value,
"enable_autodiff": self.autodiff.value,
"light_mode": self.light_mode.value,
"no_cache": self.no_cache.value,
"p2pool_options": self.p2pool_extra.value,
}
return config
##
# Monero Configuration Form
class MoneroConfigForm(ConfigFormBase):
def create(self):
# Add Hot-Key Controls
self.add_handlers({"^D": self.reset_defaults})
# Add Monero Configuration
self.add(
npyscreen.TitleText,
name="## Monero Node Configuration",
editable=False,
begin_entry_at=50,
)
self.configure_monero_node = self.add(
PatchedFormControlCheckbox,
name="Configure Monero Node",
value=True,
relx=self.indent,
)
self.nextrely += 1
self.monero_git_tag = self.add(
npyscreen.TitleText,
name="Monero Version:",
value="latest",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.monero_git_tag)
self.prune_node = self.add(
PatchedFormControlCheckbox,
name="Prune Blockchain",
value=True,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.prune_node)
self.monero_log_level = self.add(
TitleIntegerSlider,
name="Monero Log Level:",
out_of=4,
value=0,
lowest=0,
step=1,
width=43,
begin_entry_at=20,
label=True,
block_color=None,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.monero_log_level)
self.nextrely += 1
self.expose_rpc_port = self.add(
PatchedFormControlCheckbox,
name="Expose RPC Port",
value=False,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.expose_rpc_port)
self.rpc_port = self.add(
npyscreen.TitleText,
name="RPC Port:",
value="18081",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.rpc_port)
self.expose_rpc_port.addVisibleWhenSelected(self.rpc_port)
self.rpc_login = self.add(
npyscreen.TitleText,
name="RPC Login:",
value="",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.expose_rpc_port.addVisibleWhenSelected(self.rpc_login)
self.configure_monero_node.addVisibleWhenSelected(self.rpc_login)
self.nextrely += 1
self.limit_data_rates = self.add(
PatchedFormControlCheckbox,
name="Limit Data Rates",
value=False,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.limit_data_rates)
self.rate_limit_up = self.add(
npyscreen.TitleText,
name="Rate Limit Up:",
value="2048",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.limit_data_rates.addVisibleWhenSelected(self.rate_limit_up)
self.configure_monero_node.addVisibleWhenSelected(self.rate_limit_up)
self.rate_limit_down = self.add(
npyscreen.TitleText,
name="Rate Limit Down:",
value="8192",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.limit_data_rates.addVisibleWhenSelected(self.rate_limit_down)
self.configure_monero_node.addVisibleWhenSelected(self.rate_limit_down)
self.nextrely += 1
self.sync_pruned_blocks = self.add(
npyscreen.Checkbox,
name="Sync Pruned Blocks",
value=False,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.sync_pruned_blocks)
self.prune_node.addVisibleWhenSelected(self.sync_pruned_blocks)
self.fast_sync = self.add(
npyscreen.Checkbox,
name="Fast Block Sync",
value=True,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.fast_sync)
self.nextrely += 1
self.public_node = self.add(
npyscreen.TitleText,
name="Public Node:",
value="",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addInvisibleWhenSelected(self.public_node)
self.node_login = self.add(
npyscreen.TitleText,
name="Node Login:",
value="",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_monero_node.addInvisibleWhenSelected(self.node_login)
self.nextrely += 1
self.monero_extra = self.add(
npyscreen.TitleText,
name="Additional monerod Options:",
value="",
begin_entry_at=self.name_size + 10,
relx=self.indent,
)
self.configure_monero_node.addVisibleWhenSelected(self.monero_extra)
self.nextrely += 1
self.nextrely += 1
# Add "Prev", "Next", "Save", and "Cancel" buttons
self.prev_button = self.add(PrevButton, name="Prev", relx=1)
self.nextrely -= 1
self.next_button = self.add(NextButton, name="Next", relx=8)
self.nextrely -= 1
self.save_button = self.add(SaveButton, name="Save", relx=15)
self.nextrely -= 1
self.cancel_button = self.add(CancelButton, name="Cancel", relx=22)
self.nextrely += 1
# Add Help Box
self.help = self.add(
MoneroHelpBox,
name="Commands: ^D: Load Defaults - ^C: Exit Without Saving",
values=[""],
editable=False,
)
# Start with current config
self.set_config(self.get_current_config())
def prev_form(self):
self.find_parent_app().switchForm("MAIN")
def next_form(self):
self.find_parent_app().switchForm("XMRIG")
def set_config(self, config):
self.configure_monero_node.set_value(config["configure_monero"])
self.monero_git_tag.set_value(config["monero_version"])
self.prune_node.value = config["prune_blockchain"]
self.monero_log_level.set_value(config["monero_log_level"])
self.expose_rpc_port.set_value(config["expose_rpc_port"])
self.rpc_port.set_value(config["rpc_port"])
self.rpc_login.set_value(config["rpc_login"])
self.limit_data_rates.set_value(config["limit_data_rates"])
self.rate_limit_up.set_value(config["rate_limit_up"])
self.rate_limit_down.set_value(config["rate_limit_down"])
self.sync_pruned_blocks.value = config["sync_pruned_blocks"]
self.fast_sync.value = config["fast_sync"]
self.monero_extra.set_value(config["monero_options"])
self.public_node.set_value(config["public_monero_node"])
self.node_login.set_value(config["monero_node_login"])
self.DISPLAY()
def get_config(self):
config = {
"configure_monero": self.configure_monero_node.value,
"monero_version": self.monero_git_tag.value,
"prune_blockchain": self.prune_node.value,
"monero_log_level": self.monero_log_level.value,
"expose_rpc_port": self.expose_rpc_port.value,
"rpc_port": self.rpc_port.value,
"rpc_login": self.rpc_login.value,
"limit_data_rates": self.limit_data_rates.value,
"rate_limit_up": self.rate_limit_up.value,
"rate_limit_down": self.rate_limit_down.value,
"sync_pruned_blocks": self.sync_pruned_blocks.value,
"fast_sync": self.fast_sync.value,
"monero_options": self.monero_extra.value,
"public_monero_node": self.public_node.value,
"monero_node_login": self.node_login.value,
}
return config
##
# XMRig Configuration Form
class XMRigConfigForm(ConfigFormBase):
def create(self):
# Add Hot-Key Controls
self.add_handlers({"^D": self.reset_defaults})
# Hidden caryover from P2Pool form
self.autodiff = self.add(
PatchedFormControlCheckbox,
name="Enable Autodiff",
value=True,
begin_entry_at=self.name_size,
relx=self.indent,
)
self.autodiff.hide = True
self.autodiff.editable = False
self.nextrely -= 1
# Add XMRig Configuration
self.add(
npyscreen.TitleText,
name="## XMRig Miner Configuration",
editable=False,
begin_entry_at=50,
)
self.configure_xmrig_miner = self.add(
PatchedFormControlCheckbox,
name="Configure XMRig CPU Miner",
value=True,
relx=self.indent,
)
self.nextrely += 1
self.username = self.add(
npyscreen.TitleText,
name="Username:",
value="",
begin_entry_at=self.name_size,
relx=self.indent,
)
self.configure_xmrig_miner.addVisibleWhenSelected(self.username)
self.nextrely += 1
self.use_fixed_difficulty = self.add(
PatchedFormControlCheckbox,
name="Use Fixed Difficulty",
value=True,
relx=self.indent,
)
self.configure_xmrig_miner.addVisibleWhenSelected(self.use_fixed_difficulty)
self.autodiff.addInvisibleWhenSelected(self.use_fixed_difficulty)
self.fixed_difficulty = self.add(
TitleIntegerSlider,
name="Fixed Difficulty:",
out_of=2000000,
value=500000,
lowest=50000,
step=50000,
width=51,
begin_entry_at=20,
label=True,
relx=self.indent,
)
self.configure_xmrig_miner.addVisibleWhenSelected(self.fixed_difficulty)
self.use_fixed_difficulty.addVisibleWhenSelected(self.fixed_difficulty)
self.autodiff.addInvisibleWhenSelected(self.fixed_difficulty)
self.nextrely += 1
self.cpu_threads = self.add(
TitleIntegerSlider,
name="CPU Use %:",
out_of=100,
value=100,
lowest=1,
step=10,
width=48,
begin_entry_at=20,
label=True,
relx=self.indent,
)
self.configure_xmrig_miner.addVisibleWhenSelected(self.cpu_threads)
self.nextrely += 1
self.cpu_priority = self.add(
TitleIntegerSlider,
name="CPU Priority:",
out_of=5,
value=2,
lowest=0,
step=1,
width=48,
begin_entry_at=20,
label=True,
relx=self.indent,
)
self.configure_xmrig_miner.addVisibleWhenSelected(self.cpu_priority)
self.nextrely += 1
self.xmrig_extra = self.add(
npyscreen.TitleText,
name="Additional XMRig Options:",
value="",
begin_entry_at=self.name_size + 10,
relx=self.indent,
)
self.configure_xmrig_miner.addVisibleWhenSelected(self.xmrig_extra)
self.nextrely += 1
self.nextrely += 1
# Add "Prev", "Save", and "Cancel" buttons
self.prev_button = self.add(PrevButton, name="Prev", relx=1)
self.nextrely -= 1
self.save_button = self.add(SaveButton, name="Save", relx=8)
self.nextrely -= 1
self.cancel_button = self.add(CancelButton, name="Cancel", relx=15)
self.nextrely += 1
# Add Help Box
self.help = self.add(
XMRigHelpBox,
name="Commands: ^D: Load Defaults - ^C: Exit Without Saving",
values=[""],
editable=False,
)
# Start with current config
self.set_config(self.get_current_config())
def prev_form(self):
self.find_parent_app().switchForm("MONERO")
def next_form(self):
self.find_parent_app().switchForm(None)
def beforeEditing(self):
# Cary autodiff value from P2Pool config form
enable_autodiff = self.find_parent_app().get_p2pool_config()["enable_autodiff"]
self.autodiff.set_value(enable_autodiff)
def set_config(self, config):
self.configure_xmrig_miner.set_value(config["configure_xmrig"])
self.username.set_value(config["xmrig_username"])
self.use_fixed_difficulty.set_value(config["use_fixed_difficulty"])
self.fixed_difficulty.set_value(config["fixed_difficulty"])
self.cpu_threads.set_value(config["cpu_percent"])
self.cpu_priority.set_value(config["cpu_priority"])
self.xmrig_extra.set_value(config["xmrig_options"])
self.DISPLAY()
def get_config(self):
config = {
"configure_xmrig": self.configure_xmrig_miner.value,
"xmrig_username": self.username.value,
"use_fixed_difficulty": self.use_fixed_difficulty.value,
"fixed_difficulty": self.fixed_difficulty.value,
"cpu_percent": self.cpu_threads.value,
"cpu_priority": self.cpu_priority.value,
"xmrig_options": self.xmrig_extra.value,
}
return config
##
# Our P2Pool configuration App
class ConfigApp(npyscreen.NPSAppManaged):
current_config = None
defaults = None
def onStart(self):
self.p2pool_form = self.addForm(
"MAIN",
P2PoolConfigForm,
name="P2Pool for docker-compose: P2Pool Configuration",
minimum_lines=35,
minimum_columns=80,
)
self.monero_form = self.addForm(
"MONERO",
MoneroConfigForm,
name="P2Pool for docker-compose: Monero Configuration",
minimum_lines=35,
minimum_columns=80,
)
self.xmrig_form = self.addForm(
"XMRIG",
XMRigConfigForm,
name="P2Pool for docker-compose: XMRig Configuration",
minimum_lines=35,
minimum_columns=80,
)
def get_p2pool_config(self):
return self.p2pool_form.get_config()
def get_config(self):
p2pool_config = self.p2pool_form.get_config()
monero_config = self.monero_form.get_config()
xmrig_config = self.xmrig_form.get_config()
return p2pool_config | monero_config | xmrig_config
def save_and_exit(self):
# Get config from all forms
config = self.get_config()
# Save "current config" values file
with open("current_config.jinja2", "r") as current_config:
template = current_config.read()
rendered = Template(template).render(config)
with open("/docker-compose/current_config", "w") as current_config:
current_config.write(rendered)
# Render and save docker-compose file
with open("docker-compose.jinja2", "r") as compose_file:
template = compose_file.read()
rendered = Template(template).render(config, trim_blocks=True)
with open("/docker-compose/docker-compose.yml", "w") as compose_file:
compose_file.write(rendered)
npyscreen.notify("Saved current settings", title="Saved")
self.switchForm(None)
self.saved = True
def cancel_and_exit(self):
self.switchForm(None)
self.saved = False
##
if __name__ == "__main__":
try:
time.sleep(1) # Give docker a second to initialize the terminal
App = ConfigApp()
App.run()
print("\n\n")
if App.saved:
print("Configuration Saved")
else:
print("Configuration Aborted")
sys.exit(1)
except KeyboardInterrupt:
print("Configuration Aborted")
sys.exit(1)
+35
View File
@@ -0,0 +1,35 @@
{
"wallet_address": {{ wallet_address | tojson(indent=2) }},
"configure_monero": {{ configure_monero | tojson(indent=2) }},
"configure_xmrig": {{ configure_xmrig | tojson(indent=2) }},
"sidechain": {{ sidechain | tojson(indent=2) }},
"enable_statistics": {{ enable_statistics | tojson(indent=2) }},
"statistics_port": {{ statistics_port | tojson(indent=2) }},
"expose_stratum_port": {{ expose_stratum_port | tojson(indent=2) }},
"stratum_port": {{ stratum_port | tojson(indent=2) }},
"p2pool_log_level": {{ p2pool_log_level | int | tojson(indent=2) }},
"enable_autodiff": {{ enable_autodiff | tojson(indent=2) }},
"light_mode": {{ light_mode | tojson(indent=2) }},
"no_cache": {{ no_cache | tojson(indent=2) }},
"p2pool_options": {{ p2pool_options | tojson(indent=2) }},
"monero_version": {{ monero_version | tojson(indent=2) }},
"prune_blockchain": {{ prune_blockchain | tojson(indent=2) }},
"monero_log_level": {{ monero_log_level | int | tojson(indent=2) }},
"expose_rpc_port": {{ expose_rpc_port | tojson(indent=2) }},
"rpc_port": {{ rpc_port | tojson(indent=2) }},
"rpc_login": {{ rpc_login | tojson(indent=2) }},
"limit_data_rates": {{ limit_data_rates | tojson(indent=2) }},
"rate_limit_up": {{ rate_limit_up | tojson(indent=2) }},
"rate_limit_down": {{ rate_limit_down | tojson(indent=2) }},
"sync_pruned_blocks": {{ sync_pruned_blocks | tojson(indent=2) }},
"fast_sync": {{ fast_sync | tojson(indent=2) }},
"monero_options": {{ monero_options | tojson(indent=2) }},
"public_monero_node": {{ public_monero_node | tojson(indent=2) }},
"monero_node_login": {{ monero_node_login | tojson(indent=2) }},
"xmrig_username": {{ xmrig_username | tojson(indent=2) }},
"use_fixed_difficulty": {{ use_fixed_difficulty | tojson(indent=2) }},
"fixed_difficulty": {{ fixed_difficulty | int | tojson(indent=2) }},
"cpu_percent": {{ cpu_percent | int | tojson(indent=2) }},
"cpu_priority": {{ cpu_priority | int | tojson(indent=2) }},
"xmrig_options": {{ xmrig_options | tojson(indent=2) }}
}
+35
View File
@@ -0,0 +1,35 @@
{
"wallet_address": "44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg",
"configure_monero": true,
"configure_xmrig": true,
"sidechain": [0],
"enable_statistics": true,
"statistics_port": "3380",
"expose_stratum_port": false,
"stratum_port": "3333",
"p2pool_log_level": 3,
"enable_autodiff": true,
"light_mode": false,
"no_cache": false,
"p2pool_options": "",
"monero_version": "latest",
"prune_blockchain": true,
"monero_log_level": 0,
"expose_rpc_port": false,
"rpc_port": "18081",
"rpc_login": "",
"limit_data_rates": false,
"rate_limit_up": "2048",
"rate_limit_down": "8192",
"sync_pruned_blocks": false,
"fast_sync": true,
"monero_options": "",
"public_monero_node": "",
"monero_node_login": "",
"xmrig_username": "p2pool",
"use_fixed_difficulty": true,
"fixed_difficulty": 500000,
"cpu_percent": 100,
"cpu_priority": 2,
"xmrig_options": ""
}
+187
View File
@@ -0,0 +1,187 @@
---
version: '3.4'
networks:
p2pool:
driver: bridge
volumes:
p2pool:
{% if sidechain[0] == 0 %}
name: p2pool
{% else %}
name: p2pool-mini
{% endif %}
{% if configure_monero == True %}
monero:
name: monero
{% endif %}
services:
p2pool:
image: p2pool:latest
build: ../
container_name: p2pool-p2pool
networks:
- p2pool
privileged: true
ports:
{% if sidechain[0] == 0 %}
- 37888:37888/tcp
{% else %}
- 37889:37889/tcp
{% endif %}
{% if expose_stratum_port == True %}
- {{ stratum_port }}:3333/tcp
{% endif %}
volumes:
- p2pool:/home/p2pool/.p2pool:rw
- /dev/null:/home/p2pool/.p2pool/p2pool.log:rw
- /dev/hugepages:/dev/hugepages:rw
{% if configure_monero == True %}
depends_on:
- monero
{% endif %}
restart: unless-stopped
command: >-
{% if configure_monero == True %}
--host monero
{% else %}
--host {{ public_monero_node }}
--rpc-login {{ monero_node_login }}
{% endif %}
--wallet {{ wallet_address }}
--loglevel {{ p2pool_log_level | int }}
{% if sidechain[0] == 1 %}
--mini
{% endif %}
{% if enable_autodiff == False %}
--no-autodiff
{% endif %}
{% if enable_statistics == True %}
--local-api
--data-api /home/p2pool/.p2pool
{% endif %}
{% if light_mode == True %}
--light-mode
{% endif %}
{% if no_cache == True %}
--no-cache
{% endif %}
{% if rpc_login != "" %}
--rpc-login {{ rpc_login }}
{% endif %}
{% if p2pool_options != "" %}
{{ p2pool_options }}
{% endif %}
{% if enable_statistics == True %}
statistics:
image: statistics:latest
build:
context: statistics
container_name: p2pool-statistics
networks:
- p2pool
ports:
- {{ statistics_port }}:80/tcp
volumes:
- p2pool:/data:ro
depends_on:
- p2pool
restart: unless-stopped
{% endif %}
{% if configure_monero == True %}
monero:
image: monero:latest
build:
context: monero
args:
- MONERO_GIT_TAG={{ monero_version }}
container_name: p2pool-monero
networks:
- p2pool
ports:
- 18080:18080/tcp
{% if expose_rpc_port == True %}
- {{ rpc_port }}:18081/tcp
- 18083:18083/tcp
{% endif %}
volumes:
- monero:/home/monero/.bitmonero:rw
- /dev/null:/home/monero/.bitmonero/bitmonero.log:rw
- /dev/hugepages:/dev/hugepages:rw
restart: unless-stopped
command: >-
--zmq-pub tcp://0.0.0.0:18083
--disable-dns-checkpoints
--enable-dns-blocklist
--out-peers 16
--in-peers 32
--add-priority-node=nodes.hashvault.pro:18080
--add-priority-node=p2pmd.xmrvsbeast.com:18080
--non-interactive
--p2p-bind-ip=0.0.0.0
--p2p-bind-port=18080
--rpc-bind-ip=0.0.0.0
--rpc-bind-port=18081
--restricted-rpc
--confirm-external-bind
--log-level={{ monero_log_level | int }}
{% if prune_blockchain == True %}
--prune-blockchain
{% if sync_pruned_blocks == True %}
--sync-pruned-blocks
{% endif %}
{% endif %}
{% if rpc_login != "" %}
--rpc-login {{ rpc_login }}
{% endif %}
{% if limit_data_rates == True %}
--limit-rate-up {{ rate_limit_up }}
--limit-rate-down {{ rate_limit_down }}
{% endif %}
{% if fast_sync == True %}
--fast-block-sync=1
{% else %}
--fast-block-sync=0
{% endif %}
{% if monero_options != "" %}
{{ monero_options }}
{% endif %}
{% endif %}
{% if configure_xmrig == True %}
xmrig:
image: xmrig:latest
build: xmrig
container_name: p2pool-xmrig
networks:
- p2pool
privileged: true
volumes:
- /dev:/dev:ro
- /lib/modules:/lib/modules:ro
- /dev/hugepages:/dev/hugepages:rw
depends_on:
- p2pool
restart: unless-stopped
command: >-
--randomx-1gb-pages
-o p2pool:3333
{% if enable_autodiff == False and use_fixed_difficulty == True %}
-u {{ xmrig_username }}+{{ fixed_difficulty | int }}
{% else %}
-u {{ xmrig_username }}
{% endif %}
--cpu-max-threads-hint={{ cpu_percent | int }}
--cpu-priority={{ cpu_priority | int }}
{% if xmrig_options != "" %}
{{ xmrig_options }}
{% endif %}
{% endif %}
+3
View File
@@ -0,0 +1,3 @@
npyscreen==4.10.5
MarkupSafe==2.0.1
jinja2==3.1.6
Vendored Executable
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
echo ""
echo ""
echo "Verifying Requirements:"
DOCKER_VER=$(docker version -f "{{.Server.Version}}" 2> /dev/null)
if [ -z "$DOCKER_VER" ]; then
echo "Docker not found; install it: https://docs.docker.com/engine/install/"
exit 1
fi
MIN_DOCKER_VER=19.0.3
if { echo "$MIN_DOCKER_VER"; echo "$DOCKER_VER"; } | sort --version-sort --check=quiet; then
echo "Docker Found; OK"
else
echo "Docker version less than $MIN_DOCKER_VER; upgrade it: https://docs.docker.com/engine/install/"
exit 1
fi
docker compose version 2>&1 > /dev/null
COMPOSE_PLUGIN_RC=$?
docker-compose --version 2>&1 > /dev/null
COMPOSE_CLI_RC=$?
if [ "$COMPOSE_PLUGIN_RC" -eq 0 ] || [ "$COMPOSE_CLI_RC" -eq 0 ]; then
echo "Docker Compose found; OK"
if [ "$COMPOSE_PLUGIN_RC" -eq 0 ]; then
COMPOSE_COMMAND="docker compose"
else
COMPOSE_COMMAND="docker-compose"
fi
else
echo "Docker Compose not found; install it: https://docs.docker.com/compose/install/compose-plugin/"
exit 1
fi
echo ""
echo ""
echo "Building and Running P2Pool docker-compose Configuration"
docker build -t p2pool_config:latest cfg
docker run -it --rm -v $PWD:/docker-compose --user $(id -u):$(id -g) p2pool_config:latest
CONFIGURE_RC=$?
echo ""
echo ""
if [ "$CONFIGURE_RC" -eq 0 ]; then
echo "P2Pool is configured. Start the project with: $COMPOSE_COMMAND up --build -d"
else
exit 1
fi
+37
View File
@@ -0,0 +1,37 @@
{
"wallet_address": "44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg",
"configure_monero": true,
"configure_xmrig": true,
"sidechain": [
0
],
"enable_statistics": true,
"statistics_port": "3380",
"expose_stratum_port": false,
"stratum_port": "3333",
"p2pool_log_level": 3,
"enable_autodiff": true,
"light_mode": false,
"no_cache": false,
"p2pool_options": "",
"monero_version": "latest",
"prune_blockchain": true,
"monero_log_level": 0,
"expose_rpc_port": false,
"rpc_port": "18081",
"rpc_login": "",
"limit_data_rates": false,
"rate_limit_up": "2048",
"rate_limit_down": "8192",
"sync_pruned_blocks": false,
"fast_sync": true,
"monero_options": "",
"public_monero_node": "",
"monero_node_login": "",
"xmrig_username": "p2pool",
"use_fixed_difficulty": true,
"fixed_difficulty": 500000,
"cpu_percent": 100,
"cpu_priority": 2,
"xmrig_options": ""
}
+147
View File
@@ -0,0 +1,147 @@
---
version: '3.4'
networks:
p2pool:
driver: bridge
volumes:
p2pool:
name: p2pool
monero:
name: monero
services:
p2pool:
image: p2pool:latest
build: ../
container_name: p2pool-p2pool
networks:
- p2pool
privileged: true
ports:
- 37888:37888/tcp
volumes:
- p2pool:/home/p2pool/.p2pool:rw
- /dev/null:/home/p2pool/.p2pool/p2pool.log:rw
- /dev/hugepages:/dev/hugepages:rw
depends_on:
- monero
restart: unless-stopped
command: >-
--host monero
--wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg
--loglevel 3
--local-api
--data-api /home/p2pool/.p2pool
statistics:
image: statistics:latest
build:
context: statistics
container_name: p2pool-statistics
networks:
- p2pool
ports:
- 3380:80/tcp
volumes:
- p2pool:/data:ro
depends_on:
- p2pool
restart: unless-stopped
monero:
image: monero:latest
build:
context: monero
args:
- MONERO_GIT_TAG=latest
container_name: p2pool-monero
networks:
- p2pool
ports:
- 18080:18080/tcp
volumes:
- monero:/home/monero/.bitmonero:rw
- /dev/null:/home/monero/.bitmonero/bitmonero.log:rw
- /dev/hugepages:/dev/hugepages:rw
restart: unless-stopped
command: >-
--zmq-pub tcp://0.0.0.0:18083
--disable-dns-checkpoints
--enable-dns-blocklist
--out-peers 16
--in-peers 32
--add-priority-node=nodes.hashvault.pro:18080
--add-priority-node=p2pmd.xmrvsbeast.com:18080
--non-interactive
--p2p-bind-ip=0.0.0.0
--p2p-bind-port=18080
--rpc-bind-ip=0.0.0.0
--rpc-bind-port=18081
--restricted-rpc
--confirm-external-bind
--log-level=0
--prune-blockchain
--fast-block-sync=1
xmrig:
image: xmrig:latest
build: xmrig
container_name: p2pool-xmrig
networks:
- p2pool
privileged: true
volumes:
- /dev:/dev:ro
- /lib/modules:/lib/modules:ro
- /dev/hugepages:/dev/hugepages:rw
depends_on:
- p2pool
restart: unless-stopped
command: >-
--randomx-1gb-pages
-o p2pool:3333
-u p2pool
--cpu-max-threads-hint=100
--cpu-priority=2
+59
View File
@@ -0,0 +1,59 @@
# Multistage docker build, requires docker 17.05
# builder stage
FROM ubuntu:20.04 as builder
ARG MONERO_GIT_TAG="latest"
RUN set -e && \
apt-get update -q -y --no-install-recommends && \
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
automake \
autotools-dev \
bsdmainutils \
build-essential \
ca-certificates \
ccache \
cmake \
curl \
git \
libtool \
pkg-config \
gperf
WORKDIR /src
RUN git clone --recursive 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)
# ---
# runtime stage
FROM ubuntu:20.04
COPY --from=0 /src/monero/build/*/release/bin /usr/local/bin/
RUN set -e && \
apt-get update -q -y --no-install-recommends && \
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
ca-certificates \
netcat \
&& \
apt-get clean && \
rm -rf /var/lib/apt
RUN groupadd -r monero -g 1000 && \
adduser --uid 1000 --gid 1000 --system --disabled-password monero && \
mkdir -p /home/monero/.bitmonero && \
chown -R monero:monero /home/monero/.bitmonero
USER monero
WORKDIR /home/monero
EXPOSE 18080 18081 18083
VOLUME /home/monero/.bitmonero
ENTRYPOINT ["/usr/local/bin/monerod"]
+10
View File
@@ -0,0 +1,10 @@
FROM python:slim
COPY app /app
WORKDIR /app
RUN pip install -r requirements.txt
STOPSIGNAL SIGINT
CMD ["/app/p2pool_statistics.py"]
+89
View File
@@ -0,0 +1,89 @@
#!/usr/bin/env python3
import json
from datetime import datetime
from prefixed import Float
import humanfriendly
from flask import Flask, render_template
app = Flask(__name__)
##
# Add some custom jinja filters
def timeago(value):
"""Format a date time to human friendly time ago"""
if value is None:
return ""
if type(value) is int:
dt = datetime.fromtimestamp(value).replace(microsecond=0)
now = datetime.now().replace(microsecond=0)
return humanfriendly.format_timespan(now - dt)
app.jinja_env.filters["timeago"] = timeago
def human_numbers(value):
"""Format a number in human readable format"""
if value is None:
return ""
return "{:!.3h}".format(Float(value))
app.jinja_env.filters["humanize"] = human_numbers
##
# Get Pool Instance Birth Date
def birthdate():
try:
with open("/data/p2pool.blocks") as reader:
first_block = reader.readline().rstrip()
bday_ts = int(first_block.split(" ")[0])
bday = timeago(bday_ts)
return bday
except Exception as e:
return "unknown time"
##
# The App Routes
@app.route("/")
def render():
try:
my_bday = birthdate()
with open("/data/stats_mod", "r") as reader:
stats_mod = json.loads(reader.read())
with open("/data/pool/stats", "r") as reader:
pool_stats = json.loads(reader.read())
with open("/data/network/stats", "r") as reader:
network_stats = json.loads(reader.read())
with open("/data/local/stratum", "r") as reader:
local_stats = json.loads(reader.read())
workers = local_stats["workers"][:30] # limit workers output list
workers_concat = []
for w in workers:
w_list = w.split(",")
w_list[1] = humanfriendly.format_timespan(int(w_list[1]))
w_list[2] = human_numbers(int(w_list[2]))
workers_concat.append(w_list)
workers_concat = sorted(workers_concat, key=lambda x: int(x[3]), reverse=True)
for w in workers_concat:
w[3] = human_numbers(int(w[3]))
return render_template(
"index.html",
my_bday=my_bday,
stats_mod=stats_mod,
pool_stats=pool_stats,
network_stats=network_stats,
local_stats=local_stats,
workers=workers_concat,
)
except Exception as e:
return render_template("oops.html", error=str(e))
##
# main()
if __name__ == "__main__":
app.run(debug=False, host="0.0.0.0", port=80)
@@ -0,0 +1,3 @@
flask
prefixed
humanfriendly
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,189 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="{{url_for('static', filename='bootstrap.min.css')}}">
<title>Monero P2Pool Server Statistics</title>
</head>
<body style="font-size:85%;">
<script src="{{url_for('static', filename='jquery-3.2.1.slim.min.js')}}"></script>
<script src="{{url_for('static', filename='popper.min.js')}}"></script>
<script src="{{url_for('static', filename='bootstrap.min.js')}}"></script>
<div style="text-align:center;">
<img src="{{url_for('static', filename='monero-symbol-480.png')}}" width="75px" height="75px" alt="Monero"/>
<h1 style="color: #FF6600;">P2Pool Server Statistics</h1>
</div>
<div class="card-group">
<div class="col-sm-4 grid-margin stretch-card">
<div class="card">
<div class="card-header text-black mb-1 pb-1" style="text-align: center; background-color: #FF6600;"><h2>Local Pool</h2></div>
<div class="card-body mb-0 pb-0">
<h6 class="card-subtitle text-muted" style="font-size:80%;">(note: stats reset on restart)</h6>
<div class="table-responsive table-hover table-condensed table-striped">
<table class="table">
<tbody>
<tr>
<td>Hashrate 15 Minutes</td>
<td>{{ local_stats["hashrate_15m"]|humanize }}H/s</td>
</tr>
<tr>
<td>Hashrate 1 Hour</td>
<td>{{ local_stats["hashrate_1h"]|humanize }}H/s</td>
</tr>
<tr>
<td>Hashrate 24 Hours</td>
<td>{{ local_stats["hashrate_24h"]|humanize }}H/s</td>
</tr>
<tr>
<td>Shares Found</td>
<td>{{ local_stats["shares_found"] }}</td>
</tr>
<tr>
<td>Shares Failed</td>
<td>{{ local_stats["shares_failed"] }}</td>
</tr>
<tr>
<td>Current Effort</td>
<td>{{ local_stats["current_effort"] }}%</td>
</tr>
<tr>
<td>Average Effort</td>
<td>{{ local_stats["average_effort"] }}%</td>
</tr>
<tr>
<td>Total Hashes</td>
<td>{{ local_stats["total_hashes"]|humanize }}</td>
</tr>
<tr>
<td>Miner Connections</td>
<td>{{ local_stats["incoming_connections"] }}</td>
</tr>
<tr>
<td>Block reward share</td>
<td>{{ local_stats["block_reward_share_percent"] }}%</td>
</tr>
<tr>
<td>Workers
<h6 class="card-subtitle text-muted" style="font-size:80%;">(note: limited to the first 30 workers)</h6>
</td>
<td>
<table style="font-size:65%;">
<tr>
<th>IP:Port</th>
<th>Uptime</th>
<th>Difficulty</th>
<th>Hashrate</th>
<th>Name</th>
</tr>
{% for w in workers %}
<tr>
{% for w_detail in w %}
<td>{{ w_detail }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-sm-4 grid-margin stretch-card">
<div class="card">
<div class="card-header text-black mb-1 pb-1" style="text-align: center; background-color: #FF6600;"><h2>Global Pool</h2></div>
<div class="card-body mb-0 pb-0">
<h6 class="card-subtitle text-muted" style="font-size:80%;">&nbsp;</h6>
<div class="table-responsive table-hover table-condensed table-striped">
<table class="table">
<tbody>
<tr>
<td>Hash Rate</td>
<td>{{ pool_stats["pool_statistics"]["hashRate"]|humanize }}H/s</td>
</tr>
<tr>
<td>Round Hashes</td>
<td>{{ stats_mod["pool"]["roundHashes"]|humanize }}</td>
</tr>
<tr>
<td>Last Block Found</td>
<td>{{ pool_stats["pool_statistics"]["lastBlockFound"] }} <br>
{{ pool_stats["pool_statistics"]["lastBlockFoundTime"]|timeago }} ago</td>
</tr>
<tr>
<td>Payout Method</td>
<td>{{ pool_stats["pool_list"]|join(',') }}<br>2160 block window (~6 hours)</td>
</tr>
</tbody>
</table>
</div>
<h6 class="card-subtitle text-muted" style="font-size:80%;">(since instance birth: {{ my_bday }} ago)</h6>
<div class="table-responsive table-hover table-condensed table-striped">
<table class="table">
<tbody>
<tr>
<td>Total Hashes</td>
<td>{{ pool_stats["pool_statistics"]["totalHashes"]|humanize }}</td>
</tr>
<tr>
<td>Blocks Found</td>
<td>{{ pool_stats["pool_statistics"]["totalBlocksFound"] }}</td>
</tr>
<tr>
<td>Known Miners</td>
<td>{{ pool_stats["pool_statistics"]["miners"] }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-sm-4 grid-margin stretch-card">
<div class="card">
<div class="card-header text-black mb-1 pb-1" style="text-align: center; background-color: #FF6600;"><h2>Monero Network</h2></div>
<div class="card-body mb-0 pb-0">
<h6 class="card-subtitle text-muted" style="font-size:80%;">&nbsp;</h6>
<div class="table-responsive table-hover table-condensed table-striped">
<table class="table">
<tbody>
<tr>
<td>Height</td>
<td>{{ network_stats["height"] }}<br>
{{ network_stats["timestamp"]|timeago }} ago</td>
</tr>
<tr>
<td>Difficulty</td>
<td>{{ network_stats["difficulty"]|humanize }}</td>
</tr>
<tr>
<td>Reward</td>
<td>0.{{ network_stats["reward"] }} Monero</td>
</tr>
<tr>
<td>Head&nbsp;Hash</td>
<td>{{ network_stats["hash"] }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
window.setInterval('refresh()', 30000); // Call refresh function every 30000 milliseconds (30 seconds).
function refresh() {
window .location.reload();
}
</script>
</body>
</html>
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Oops</title>
</head>
<body>
<h2>Ooops, something went wrong:</h2>
{{ error }}
(Maybe you need to wait a few minutes for p2pool to start and sync for the first time?)
</body>
</html>
+37
View File
@@ -0,0 +1,37 @@
FROM ubuntu:20.04
RUN set -e && \
apt-get update -q -y --no-install-recommends && \
DEBIAN_FRONTEND="noninteractive" apt-get install -q -y --no-install-recommends \
git \
build-essential \
ca-certificates \
cmake \
libuv1-dev \
libssl-dev \
libhwloc-dev
WORKDIR /usr/src
RUN git clone https://github.com/xmrig/xmrig.git && \
mkdir xmrig/build && \
cd xmrig/build && \
cmake .. && \
make -j$(nproc)
# ---
FROM ubuntu:20.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 \
libhwloc15 \
&& \
apt-get clean
WORKDIR /
ENTRYPOINT ["/xmrig"]
+93
View File
@@ -0,0 +1,93 @@
## Setting up P2Pool as a service controlled by a RC script (FreeBSD, and possibly other)
In order to use this RC script, it is required to create a `p2pool` user account on the system for this service. An example **passwd(5)** line for this user would be:
```
p2pool:*:818:818::0:0:Monero P2Pool:/var/db/p2pool:/usr/sbin/nologin
```
Also an example **group(5)** line:
```
p2pool:*:818:
```
When creating such an user and a group, make sure the UID and GID aren't being used by any other user/group in the system. The home directory of the user will be used as the data directory of P2Pool; set it to your desired location as needed.
The RC script assumes the P2Pool executable is installed as `/usr/local/bin/p2pool`.
### /usr/local/etc/rc.d/p2pool
```sh
#!/bin/sh
# PROVIDE: p2pool
# REQUIRE: LOGIN FILESYSTEMS
# KEYWORD: shutdown
. /etc/rc.subr
name=p2pool
rcvar=p2pool_enable
load_rc_config $name
: ${p2pool_enable:="NO"} ${p2pool_local_api:="NO"}
[ -z "$p2pool_wallet" ] && exit 1
p2pool_user=p2pool
p2pool_home="`getent passwd ${p2pool_user} | cut -d : -f 6`"
[ -z "$p2pool_home" ] && exit 1
p2pool_env="HOME=$p2pool_home"
p2pool_chdir="$p2pool_home"
procname=/usr/local/bin/p2pool
pidfile="$p2pool_home/p2pool.pid"
command=/usr/sbin/daemon
flags="-p ${pidfile} -f -- ${procname} ${p2pool_flags} --data-dir ${p2pool_home} --wallet ${p2pool_wallet}"
[ -n "${p2pool_api_path}" ] && flags="${flags} --data-api ${p2pool_api_path}"
if checkyesno p2pool_local_api; then
if [ -n "${p2pool_api_path}" ]; then
flags="${flags} --local-api"
else
echo 'Warning: p2pool_local_api="YES" requires p2pool_api_path being set, ignoring' 1>&2
fi
fi
start_precmd="p2pool_prestart"
stop_postcmd="rm -f ${pidfile}"
p2pool_prestart() {
if [ -n "${p2pool_api_path}" ]; then
[ -d "${p2pool_api_path}" ] || mkdir -p "${p2pool_api_path}"
gid="`getent passwd ${p2pool_user} | cut -d : -f 4`"
chown ${p2pool_user}:${gid} "${p2pool_api_path}"
fi
}
run_rc_command "$1"
```
### Configuration variables in /etc/rc.conf (or /etc/rc.conf.local)
* `p2pool_enable` Set to `YES` to enable this service; required.
* `p2pool_wallet` Your wallet address; required.
* `p2pool_api_path` Path to API directory (See p2pool option `--data-api`), this directory will be created automatically if not already exists, on service startup; optional.
* `p2pool_local_api` Set to `YES` to enable creation of `local` path in API directory (See p2pool option `--local-api`), requires `p2pool_api_path` also being set; optional.
* `p2pool_flags` Additional options you want to pass to p2pool; optional.
#### Example
```sh
p2pool_enable="YES"
p2pool_wallet="44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg"
p2pool_api_path="/tmp/p2pool-api"
p2pool_local_api="YES"
p2pool_flags="--host 127.0.0.1 --in-peers 200"
```
## /usr/local/etc/newsyslog.conf.d/p2pool.conf (optional)
You can create this drop-in **newsyslog(8)** configuration file to periodically rotate the P2Pool log file. The drop-in location `/usr/local/etc/newsyslog.conf.d/` assumes that `/etc/newsyslog.conf` contains an `include` directive for searching drop-in configuration files in it.
This example assumes `/var/db/p2pool` as your P2Pool data directory.
```
# log file owner:group mode count size (KiB) when flags pid file signal
/var/db/p2pool/p2pool.log p2pool:p2pool 640 16 65536 @0101T BEJ /var/db/p2pool/p2pool.pid SIGUSR1
```
You should adjust the `count`, `size`, `when` and/or `flags` fields to fit your needs.
+118
View File
@@ -0,0 +1,118 @@
### P2Pool command line options
```
--wallet Wallet address to mine to. Subaddresses and integrated addresses are not supported!
--host IP address of your Monero node, default is 127.0.0.1
--rpc-port monerod RPC API port number, default is 18081
--zmq-port monerod ZMQ pub port number, default is 18083 (same port as in monerod's "--zmq-pub" command line parameter)
--stratum Comma-separated list of IP:port for stratum server to listen on
--p2p Comma-separated list of IP:port for p2p server to listen on
--addpeers Comma-separated list of IP:port of other p2pool nodes to connect to
--stratum-ban-time N Number of seconds to ban misbehaving stratum client, default is 600
--light-mode Don't allocate RandomX dataset, saves 2GB of RAM
--loglevel Verbosity of the log, integer number between 0 and 6
--data-dir Path to store general p2pool files (log, cache, peer data, etc.), default is current directory
--sidechain-config Name of the p2pool sidechain parameters file (only use it if you run your own sidechain)
--data-api Path to the p2pool JSON data (use it in tandem with an external web-server). Not affected by --data-dir setting!
--local-api Enable /local/ path in api path for Stratum Server and built-in miner statistics
--stratum-api An alias for --local-api
--no-cache Disable p2pool.cache
--no-color Disable colors in console output
--no-randomx Disable internal RandomX hasher: p2pool will use RPC calls to monerod to check PoW hashes
--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 450)
--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 450)
--start-mining N Start built-in miner using N threads (any value between 1 and 64)
--mini Connect to p2pool-mini sidechain. Note that it will also change default p2p port from 37889 to 37888
--nano Connect to p2pool-nano sidechain. Note that it will also change default p2p port from 37889 to 37890
--no-autodiff Disable automatic difficulty adjustment for miners connected to stratum (WARNING: incompatible with Nicehash and MRR)
--rpc-login Specify username[:password] required for Monero RPC server
--socks5 Specify IP:port of a SOCKS5 proxy to use for outgoing connections
--no-dns Disable DNS queries, use only IP addresses to connect to peers (seed node DNS will be unavailable too)
--p2p-external-port Port number that your router uses for mapping to your local p2p port. Use it if you are behind a NAT and still want to accept incoming connections
--no-upnp Disable UPnP port forwarding
--no-igd An alias for --no-upnp
--upnp-stratum Port forward Stratum port (it's not forwarded by default)
--merge-mine IP:port and wallet address for another blockchain to merge mine with
--version Print p2pool's version and build details
--tls-cert file Load TLS certificate chain from "file" in the PEM format
--tls-cert-key file Load TLS certificate private key from "file" in the PEM format
--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
```
### Example command line
```
p2pool.exe --host 127.0.0.1 --rpc-port 18081 --zmq-port 18083 --wallet YOUR_WALLET_ADDRESS --stratum 0.0.0.0:3333 --p2p 0.0.0.0:37889
```
### Multiple backup hosts
You can have multiple hosts in command line. If P2Pool detects that the host it's currently using is down or stuck, it will cycle through hosts until it finds a working one. It will not switch back as long as the current host it found is working.
Each new host uses RPC and zmq-pub port numbers from the previous host (or default 18081/18083 if none were specified). Note that `--rpc-login`, `--rpc-ssl` and `--rpc-ssl-fingerprint` are not copied from the previous host, you must specify it for each host that has username/password or RPC-SSL enabled.
In the following example, you have local Monero host running on ports 18081/18083 (RPC/zmq-pub), and several backup hosts running on ports 18089/18084.
```
p2pool.exe --host 127.0.0.1 --host node.monerodevs.org --rpc-port 18089 --zmq-port 18084 --host node2.monerodevs.org --host node.richfowler.net --wallet YOUR_WALLET_ADDRESS
```
### Merge mining
Merge mining is available in P2Pool since the fork that happened on October 12th, 2024. Version 4.0 or newer is required to use it.
- Blockchains that will support [Merge mining RPC API](https://github.com/SChernykh/p2pool/blob/master/docs/MERGE_MINING.MD#proposed-rpc-api)
- [Townforge](https://townforge.net/) supports it in their [tmp-mm branch](https://git.townforge.net/townforge/townforge/src/branch/tmp-mm) (not released yet)
- [DarkFi](https://dark.fi/) is going to support it, but it's [not ready yet](https://github.com/darkrenaissance/darkfi/issues/244)
```
p2pool.exe --wallet YOUR_MONERO_WALLET_ADDRESS --merge-mine IP:port YOUR_WALLET_ADDRESS_ON_ANOTHER_BLOCKCHAIN
```
### Tari merge mining
[Tari](https://www.tari.com/) uses their own gRPC API and requires a different command line:
```
./p2pool --wallet YOUR_MONERO_WALLET_ADDRESS --merge-mine tari://TARI_NODE_IP:18102 TARI_WALLET_ADDRESS
```
and on the Tari side
```
./minotari_node --grpc-enabled --mining-enabled
```
TARI_NODE_IP is 127.0.0.1 if you run both on the same machine (recommended).
Merge mining is available on Tari's mainnet:
- Download [Tari suite](https://github.com/tari-project/tari/releases/latest) for your OS
- Run Minotari node and wait until in synchronizes
- Run Minotari console wallet to create a Tari wallet
- Copy the interactive wallet address from the "Receive" tab of the wallet
- Paste it into the P2Pool command line above
- Everything is ready now to start merge mining Monero and Tari!
Note that Tari will be mined in solo mode (only full Tari blocks can be mined for now). This doesn't affect P2Pool payouts - they will stay the same.
### TLS
Starting from v4.1, P2Pool supports SSL/TLS connections to its Stratum port. Port 443 can also be safely used for Stratum connections since v4.1 - P2Pool will detect HTTP requests and respond to them.
All `--tls...` parameters are optional. If they are not provided, P2Pool will generate a self-signed certificate upon startup.
If you want to use your own certificate, please refer to your certificate provider's documentation (or OpenSSL documentation) on how to generate the appropriate PEM files.
Note that you need to use certificate files and `--tls...` parameters to be able to use certificate pinning in XMRig miners that connect to your P2Pool instance.
`--tls-cert` and `--tls-cert-key` parameters must always be used together.
### RPC-SSL
Starting from v4.4, P2Pool supports RPC-SSL connections to Monero nodes. Add `--rpc-ssl` to P2Pool command line to enable it.
P2Pool supports certificate pinning on RPC-SSL connections via `--rpc-ssl-fingerprint MONERO_NODE_FINGERPRINT_BASE64` parameter. To get your node certificate's fingerprint, run
```
openssl x509 -in rpc_ssl.crt -pubkey -noout -inform pem | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
```
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.
+47
View File
@@ -0,0 +1,47 @@
### P2Pool console commands
Command|Description
-|-
help|display list of commands
status|display p2pool status
loglevel **N**|set log level (**N** can be between 0 and 6)
addpeers **L**|**L** is a comma-separated list of IP:port of other p2pool nodes to connect to
droppeers|disconnect all currently connected peers
peers|show all currently connected peers (p2p)
workers|show all currently connected workers (stratum)
bans|show all banned IPs
hosts|show Monero hosts which were configured in the command line
next_host|switch to the next Monero host configured in the command line
outpeers **N**|set maximum number of outgoing connections (values above 50 are not recommended)
inpeers **N**|set maximum number of incoming connections (values above 50 are not recommended)
start_mining **T**|start mining (**T** is the number of threads to use, must be between 1 and 64)
stop_mining|stop mining
exit|terminate p2pool
version|show p2pool version
### Non-interactive console access
It's possible to send console commands via a local TCP connection. For this, you need to enable the API: `--data-api api --local-api`.
A sample Python script that sends console commands to P2Pool via TCP:
```
import sys
import socket
import json
with open('api/local/console', 'r') as file:
data = json.load(file)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', data['tcp_port']))
command = data['cookie'];
command += sys.argv[1];
command += '\n';
s.sendall(command.encode('utf-8'))
s.close()
```
Run it in P2Pool's directory: `python3 ./p2pool_cmd.py status`
+124
View File
@@ -0,0 +1,124 @@
## Merge mining tx_extra tag format
- TX_EXTRA_MERGE_MINING_TAG (1 byte)
- A single byte of value `3`
- Size (in bytes) of the following fields (1 byte)
- Technically a Varint, but it's always a single byte in practice
- Merkle tree parameters (1 or multiple bytes - 64-bit value encoded as varint)
- Merkle root hash (32 bytes)
## Merkle tree parameters
A 64-bit value encoding the total number of aux chains hashed into the Merkle root hash, and an aux nonce that defines the order of aux chains when building the Merkle tree.
Bit|Description
-|-
0...2|`N-1` - number of bits used to store `n_aux_chains` (value 0 means 1 bit, ..., value 7 means 8 bits)
3...`N`+2|`n_aux_chains-1` (value 0 means 1 chain, and so on)
`N`+3...`N`+34|`aux_nonce` (32-bit value)
`N`+35...63|reserved (current implementations must set these bits to all 0 when writing and ignore these bits when reading)
`N` must be the smallest number of bits enough to represent `n_aux_chains-1`
Reference code: `PoolBlock::encode_merkle_tree_data` and `PoolBlock::decode_merkle_tree_data` in `pool_block.h`
## Merkle tree construction's first step (Monero-specific)
If `n_aux_chains` is not a power of 2, their hashes are combined starting from the end of the list of hashes until there are a power of 2 hashes left. Then they're processed normally.
Example 1: 6 hashes `H0, H1, H2, H3, H4, H5` will be transformed into 4 hashes `H0, H1, H(H2|H3), H(H4|H5)` where `H` is the hash function and `|` is concatenation.
Example 2: 5 hashes `H0, H1, H2, H3, H4` will be transformed into 4 hashes `H0, H1, H2, H(H3|H4)`
## The order of hashes in the Merkle tree
Each of the aux chains must provide a 32-byte value `unique_id` that singles it out from any other chain. Genesis block's hash is a good choice for this value, but it can be anything else really.
`unique_id` is used to enforce the order in which aux hashes are added to the Merkle tree. This prevents an attack where miners can mine two versions of the same chain (for example when double spending) without any additional cost.
Forked chains can choose whether to keep their `unique_id` or change it. If they keep it, it will be impossible to merge mine with the chain they forked from beause they will always be assigned the same slot in the Merkle tree.
A deterministic pseudo-random function `SHA256(unique_id|nonce|"m") % N` is applied to determine which slot is used by which chain. `nonce` is brute-forced until all `N` chains are assigned different slots. This limits `N` to no more than 15-16 in practice.
Reference code: `get_aux_slot` and `find_aux_nonce` in `merkle.cpp`
## Proposed RPC API
P2Pool must be able to get mining jobs from merge mined chains and submit PoW solutions to them. All RPC calls here are sent as HTTP POST requests with `Content-Type: application/json`.
### merge_mining_get_chain_id
Gets a unique ID that identifies this merge mined chain and separates it from other chains.
Example request: `{"jsonrpc":"2.0","id":"0","method":"merge_mining_get_chain_id"}`
Response: a JSON containing these fields:
Field|Description
-|-
`chain_id`|A unique 32-byte hex-encoded value that identifies this merge mined chain.
Example response 1: `{"jsonrpc":"2.0","id":"0","result":{"chain_id":"0f28c4960d96647e77e7ab6d13b85bd16c7ca56f45df802cdc763a5e5c0c7863"}}`
Example response 2: `{"jsonrpc":"2.0","id":"0","error":"something went wrong"}`
### merge_mining_get_aux_block
Gets a blob of data (usually a new block for the merge mined chain) and its hash to be used for merge mining.
Example request: `{"jsonrpc":"2.0","id":"0","method":"merge_mining_get_aux_block","params":{"address":"MERGE_MINED_CHAIN_ADDRESS","aux_hash":"f6952d6eef555ddd87aca66e56b91530222d6e318414816f3ba7cf5bf694bf0f","height":3000000,"prev_id":"ad505b0be8a49b89273e307106fa42133cbd804456724c5e7635bd953215d92a"}}`
Request: a JSON containing these fields:
Field|Description
-|-
`address`|A wallet address on the merge mined chain
`aux_hash`|Merge mining job that is currently being used
`height`|Monero height
`prev_id`|Hash of the previous Monero block
Response: a JSON containing these fields:
Field|Description
-|-
`aux_blob`|A hex-encoded blob of data. Merge mined chain defines the contents of this blob. It's opaque to P2Pool and will not be changed by it.
`aux_diff`|Mining difficulty (decimal number).
`aux_hash`|A 32-byte hex-encoded hash of the `aux_blob`. Merge mined chain defines how exactly this hash is calculated. It's opaque to P2Pool.
If `aux_hash` is the same as in the request, all other fields will be ignored by P2Pool, so they don't have to be included in the response. Moreover, empty response will be interpreted as a response having the same `aux_hash` as in the request. This enables an efficient polling.
Example response 1: `{"jsonrpc":"2.0","id":"0","result":{"aux_blob":"4c6f72656d20697073756d","aux_diff":123456,"aux_hash":"f6952d6eef555ddd87aca66e56b91530222d6e318414816f3ba7cf5bf694bf0f"}}`
Example response 2: `{"jsonrpc":"2.0","id":"0","result":{}}`
### merge_mining_submit_solution
Submits a PoW solution for the merge mined chain's block. Note that when merge mining with Monero, the PoW solution is always a Monero block template with merge mining data included in it.
Example request: `{"jsonrpc":"2.0","id":"0","method":"merge_mining_submit_solution","params":{"aux_blob":"4c6f72656d20697073756d","aux_hash":"f6952d6eef555ddd87aca66e56b91530222d6e318414816f3ba7cf5bf694bf0f","blob":"...","merkle_proof":["hash1","hash2","hash3"],"path":3,"seed_hash":"22c3d47c595ae888b5d7fc304235f92f8854644d4fad38c5680a5d4a81009fcd"}}`
Request: a JSON containing these fields:
Field|Description
-|-
`aux_blob`|Blob of data returned by `merge_mining_get_aux_block`.
`aux_hash`|A 32-byte hex-encoded hash of the `aux_blob` - the same value that was returned by `merge_mining_get_aux_block`.
`blob`|Monero block template that has enough PoW to satisfy difficulty returned by `merge_mining_get_aux_block`. It also must have a merge mining tag in tx_extra of the coinbase transaction.
`merkle_proof`|A proof that `aux_hash` was included when calculating Merkle root hash from the merge mining tag
`path`|A path bitmap (32-bit unsigned integer) that complements `merkle_proof`
`seed_hash`|A 32-byte hex-encoded key that is used to [initialize RandomX dataset](https://github.com/tevador/RandomX/blob/master/doc/specs.md#7-dataset)
Note that `merkle_proof` only contains a vector of 32-byte hashes for `aux_hash` to be combined with. It can be verified by running this pseudo-code and functions from `merkle.cpp` (adapt it to your codebase):
`verify_merkle_proof(aux_hash, merkle_proof, get_aux_slot(unique_id, aux_nonce, n_aux_chains), n_aux_chains, merkle_root_hash)`
`aux_nonce` and `n_aux_chains` can be extracted from the Merkle tree parameters (see above).
`merkle_root_hash` can be extracted from the merge mining tag (see above).
`merkle_proof` can also be verified by `verify_merkle_proof(aux_hash, merkle_proof, path, merkle_root_hash)`
Response: a JSON containing these fields:
Field|Description
-|-
`status`|Block submit status
Example response 1: `{"jsonrpc":"2.0","id":"0","result":{"status":"accepted"}}`
Example response 2: `{"jsonrpc":"2.0","id":"0","error":{"code":-1,"message":"Block not accepted"}}`
+49
View File
@@ -0,0 +1,49 @@
## Setting up P2Pool as a systemd service (Linux)
With this config, P2Pool will run as a service with redirected I/O. It uses `p2pool` user which you should setup beforehand.
You can execute console commands by running `echo "status" > /run/p2pool/p2pool.control`
### p2pool.service
```
[Unit]
Description=p2pool daemon
After=network-online.target systemd-modules-load.service monerod.service
Wants=network-online.target systemd-modules-load.service monerod.service
Requires=p2pool.socket
[Service]
Type=exec
Sockets=p2pool.socket
StandardInput=socket
StandardOutput=journal
StandardError=journal
# /usr/local/bin/p2pool.sh simply invokes the p2pool executable with your chosen command-line options.
ExecStart=/usr/local/bin/p2pool.sh
TimeoutStopSec=60
# Run as p2pool:p2pool
User=p2pool
Group=p2pool
WorkingDirectory=/var/lib/p2pool
[Install]
WantedBy=multi-user.target
```
### p2pool.socket
```
# FIFO socket for controlling p2pool daemon
[Unit]
Description=Command FIFO for p2pool daemon
[Socket]
ListenFIFO=/run/p2pool/p2pool.control
DirectoryMode=0755
SocketMode=0666
SocketUser=p2pool
SocketGroup=p2pool
RemoveOnStop=true
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

+317
View File
@@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>P2Pool - 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>';
if ((i + 1 < pool_blocks.length) && (pool_blocks[i + 1].totalHashes > 0)) {
let value = (pool_blocks[i].totalHashes - pool_blocks[i + 1].totalHashes) * 100.0 / pool_blocks[i].difficulty;
total_effort += value;
++num_blocks_with_effort;
set_effort(effort, value);
}
else {
effort.innerHTML = "N/A";
}
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</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://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 --disable-dns-checkpoints --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>37888</span> (P2Pool mini port) in your firewall to ensure better connectivity
<li>Run <span>./p2pool --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS</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 mini can be found <a href="https://mini.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 (P2Pool/P2Pool mini) 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://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 by adding <span style="color:#808080;">--mini</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 --disable-dns-checkpoints --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/" 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>
Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

+317
View File
@@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>P2Pool mini - 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>';
if ((i + 1 < pool_blocks.length) && (pool_blocks[i + 1].totalHashes > 0)) {
let value = (pool_blocks[i].totalHashes - pool_blocks[i + 1].totalHashes) * 100.0 / pool_blocks[i].difficulty;
total_effort += value;
++num_blocks_with_effort;
set_effort(effort, value);
}
else {
effort.innerHTML = "N/A";
}
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 mini</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://mini.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 --disable-dns-checkpoints --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>37888</span> (P2Pool mini port) in your firewall to ensure better connectivity
<li>Run <span>./p2pool --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS --mini</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 mini can be found <a href="https://mini.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 (P2Pool/P2Pool mini) 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://mini.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 by adding <span style="color:#808080;">--mini</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 --disable-dns-checkpoints --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/mini/" 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>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+51
View File
@@ -0,0 +1,51 @@
cmake_minimum_required(VERSION 3.10)
project(Tari_gRPC)
set(HEADERS
proto/gRPC/base_node.pb.h
proto/gRPC/block.pb.h
proto/gRPC/network.pb.h
proto/gRPC/sidechain_types.pb.h
proto/gRPC/transaction.pb.h
proto/gRPC/types.pb.h
proto/gRPC/base_node.grpc.pb.h
proto/gRPC/block.grpc.pb.h
proto/gRPC/network.grpc.pb.h
proto/gRPC/sidechain_types.grpc.pb.h
proto/gRPC/transaction.grpc.pb.h
proto/gRPC/types.grpc.pb.h
proto.h
)
set(SOURCES
proto/gRPC/base_node.pb.cc
proto/gRPC/block.pb.cc
proto/gRPC/network.pb.cc
proto/gRPC/sidechain_types.pb.cc
proto/gRPC/transaction.pb.cc
proto/gRPC/types.pb.cc
proto/gRPC/base_node.grpc.pb.cc
proto/gRPC/block.grpc.pb.cc
proto/gRPC/network.grpc.pb.cc
proto/gRPC/sidechain_types.grpc.pb.cc
proto/gRPC/transaction.grpc.pb.cc
proto/gRPC/types.grpc.pb.cc
)
include_directories(../grpc/third_party/protobuf/src)
include_directories(../grpc/include)
include_directories(../grpc/third_party/abseil-cpp)
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W0 /Zi /Od /Ob0 /MP /MTd")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /GL /MT /GS /guard:cf")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W0 /O1 /Ob2 /Oi /Os /Oy /MP /GL /MT /GS /guard:cf")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /W0 /Ob1 /Ot /Zi /MP /MT")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -w")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -w")
endif()
add_library(Tari_gRPC ${HEADERS} ${SOURCES})
+30
View File
@@ -0,0 +1,30 @@
#pragma once
#ifdef _MSC_VER
#pragma warning(push, 0)
#pragma warning(disable : 4866)
#endif
#include "proto/gRPC/base_node.pb.h"
#include "proto/gRPC/block.pb.h"
#include "proto/gRPC/network.pb.h"
#include "proto/gRPC/sidechain_types.pb.h"
#include "proto/gRPC/transaction.pb.h"
#include "proto/gRPC/types.pb.h"
#include "proto/gRPC/base_node.grpc.pb.h"
#include "proto/gRPC/block.grpc.pb.h"
#include "proto/gRPC/network.grpc.pb.h"
#include "proto/gRPC/sidechain_types.grpc.pb.h"
#include "proto/gRPC/transaction.grpc.pb.h"
#include "proto/gRPC/types.grpc.pb.h"
#include <grpc/grpc.h>
#include <grpcpp/channel.h>
#include <grpcpp/client_context.h>
#include <grpcpp/create_channel.h>
#include <grpcpp/security/credentials.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+561
View File
@@ -0,0 +1,561 @@
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
import "types.proto";
import "transaction.proto";
import "block.proto";
import "network.proto";
import "sidechain_types.proto";
package tari.rpc;
// The gRPC interface for interacting with the base node.
service BaseNode {
// Lists headers in the current best chain
rpc ListHeaders(ListHeadersRequest) returns (stream BlockHeaderResponse);
// Get header by hash
rpc GetHeaderByHash(GetHeaderByHashRequest) returns (BlockHeaderResponse);
// Returns blocks in the current best chain. Currently only supports querying by height
rpc GetBlocks(GetBlocksRequest) returns (stream HistoricalBlock);
// Returns the block timing for the chain heights
rpc GetBlockTiming(HeightRequest) returns (BlockTimingResponse);
// Returns the network Constants
rpc GetConstants(BlockHeight) returns (ConsensusConstants);
// Returns Block Sizes
rpc GetBlockSize (BlockGroupRequest) returns (BlockGroupResponse);
// Returns Block Fees
rpc GetBlockFees (BlockGroupRequest) returns (BlockGroupResponse);
// Get Version
rpc GetVersion(Empty) returns (StringValue);
// Check for new updates
rpc CheckForUpdates(Empty) returns (SoftwareUpdate);
// Get coins in circulation
rpc GetTokensInCirculation(GetBlocksRequest) returns (stream ValueAtHeightResponse);
// Get network difficulties
rpc GetNetworkDifficulty(HeightRequest) returns (stream NetworkDifficultyResponse);
// Get the block template
rpc GetNewBlockTemplate(NewBlockTemplateRequest) returns (NewBlockTemplateResponse);
// Construct a new block from a provided template
rpc GetNewBlock(NewBlockTemplate) returns (GetNewBlockResult);
// Construct a new block from a provided template
rpc GetNewBlockWithCoinbases(GetNewBlockWithCoinbasesRequest) returns (GetNewBlockResult);
// Construct a new block from a provided template
rpc GetNewBlockTemplateWithCoinbases(GetNewBlockTemplateWithCoinbasesRequest) returns (GetNewBlockResult);
// Construct a new block and header blob from a provided template
rpc GetNewBlockBlob(NewBlockTemplate) returns (GetNewBlockBlobResult);
// Submit a new block for propagation
rpc SubmitBlock(Block) returns (SubmitBlockResponse);
// Submit a new mined block blob for propagation
rpc SubmitBlockBlob(BlockBlobRequest) returns (SubmitBlockResponse);
// Submit a transaction for propagation
rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionResponse);
// Get the base node sync information
rpc GetSyncInfo(Empty) returns (SyncInfoResponse);
// Get the base node sync information
rpc GetSyncProgress(Empty) returns (SyncProgressResponse);
// Get the base node tip information
rpc GetTipInfo(Empty) returns (TipInfoResponse);
// Search for blocks containing the specified kernels
rpc SearchKernels(SearchKernelsRequest) returns (stream HistoricalBlock);
// Search for blocks containing the specified commitments
rpc SearchUtxos(SearchUtxosRequest) returns (stream HistoricalBlock);
// Fetch any utxos that exist in the main chain
rpc FetchMatchingUtxos(FetchMatchingUtxosRequest) returns (stream FetchMatchingUtxosResponse);
// get all peers from the base node
rpc GetPeers(GetPeersRequest) returns (stream GetPeersResponse);
rpc GetMempoolTransactions(GetMempoolTransactionsRequest) returns (stream GetMempoolTransactionsResponse);
rpc TransactionState(TransactionStateRequest) returns (TransactionStateResponse);
// This returns the node's network identity
rpc Identify (Empty) returns (NodeIdentity);
// Get Base Node network connectivity status
rpc GetNetworkStatus(Empty) returns (NetworkStatusResponse);
// List currently connected peers
rpc ListConnectedPeers(Empty) returns (ListConnectedPeersResponse);
// Get mempool stats
rpc GetMempoolStats(Empty) returns (MempoolStatsResponse);
// Get VNs
rpc GetActiveValidatorNodes(GetActiveValidatorNodesRequest) returns (stream GetActiveValidatorNodesResponse);
rpc GetShardKey(GetShardKeyRequest) returns (GetShardKeyResponse);
// Get templates
rpc GetTemplateRegistrations(GetTemplateRegistrationsRequest) returns (stream GetTemplateRegistrationResponse);
rpc GetSideChainUtxos(GetSideChainUtxosRequest) returns (stream GetSideChainUtxosResponse);
rpc GetNetworkState(GetNetworkStateRequest) returns (GetNetworkStateResponse);
}
message GetAssetMetadataRequest {
bytes asset_public_key = 1;
}
message GetAssetMetadataResponse {
string name = 2;
string description =3;
string image = 4;
bytes owner_commitment = 5;
OutputFeatures features = 6;
uint64 mined_height = 7;
bytes mined_in_block = 8;
}
message ListAssetRegistrationsRequest {
uint64 offset = 2;
uint64 count = 3;
}
message ListAssetRegistrationsResponse {
bytes asset_public_key = 1;
bytes unique_id = 2;
bytes owner_commitment = 3;
uint64 mined_height = 4;
bytes mined_in_block = 5;
OutputFeatures features = 6;
bytes script = 7;
}
message GetTokensRequest {
bytes asset_public_key = 1;
// Optionally get a set of specific unique_ids
repeated bytes unique_ids = 2;
}
message GetTokensResponse {
bytes unique_id = 1;
bytes asset_public_key = 2;
bytes owner_commitment = 3;
bytes mined_in_block = 4;
uint64 mined_height = 5;
OutputFeatures features = 6;
bytes script = 7;
}
message SubmitBlockResponse {
bytes block_hash = 1;
}
message BlockBlobRequest{
bytes header_blob = 1;
bytes body_blob = 2;
}
/// return type of GetTipInfo
message TipInfoResponse {
MetaData metadata = 1;
bool initial_sync_achieved = 2;
BaseNodeState base_node_state = 3;
bool failed_checkpoints = 4;
}
enum BaseNodeState{
START_UP = 0;
HEADER_SYNC = 1;
HORIZON_SYNC = 2;
CONNECTING = 3;
BLOCK_SYNC = 4;
LISTENING = 5;
SYNC_FAILED = 6;
}
/// return type of GetNewBlockTemplate
message NewBlockTemplateResponse {
NewBlockTemplate new_block_template = 1;
bool initial_sync_achieved = 3;
MinerData miner_data = 4;
}
/// return type of NewBlockTemplateRequest
message NewBlockTemplateRequest{
PowAlgo algo = 1;
//This field should be moved to optional once optional keyword is standard
uint64 max_weight = 2;
}
/// return type of NewBlockTemplateRequest
message GetNewBlockTemplateWithCoinbasesRequest{
PowAlgo algo = 1;
//This field should be moved to optional once optional keyword is standard
uint64 max_weight = 2;
repeated NewBlockCoinbase coinbases = 3;
}
/// request type of GetNewBlockWithCoinbasesRequest
message GetNewBlockWithCoinbasesRequest{
NewBlockTemplate new_template = 1;
repeated NewBlockCoinbase coinbases = 2;
}
message NewBlockCoinbase{
string address = 1;
uint64 value = 2;
bool stealth_payment= 3;
bool revealed_value_proof= 4;
bytes coinbase_extra =5;
}
// Network difficulty response
message NetworkDifficultyResponse {
uint64 difficulty = 1;
uint64 estimated_hash_rate = 2;
uint64 height = 3;
uint64 timestamp = 4;
uint64 pow_algo = 5;
uint64 sha3x_estimated_hash_rate = 6;
uint64 monero_randomx_estimated_hash_rate = 7;
uint64 tari_randomx_estimated_hash_rate = 10;
uint64 num_coinbases = 8;
repeated bytes coinbase_extras = 9;
}
// A generic single value response for a specific height
message ValueAtHeightResponse {
uint64 circulating_supply = 1;
uint64 spendable_supply = 2;
uint64 height = 3;
}
// A generic uint value
message IntegerValue {
uint64 value = 1;
}
// A generic String value
message StringValue {
string value = 1;
}
/// GetBlockSize / GetBlockFees Request
/// Either the starting and ending heights OR the from_tip param must be specified
message BlockGroupRequest {
// The height from the chain tip (optional)
uint64 from_tip = 1;
// The starting height (optional)
uint64 start_height = 2;
// The ending height (optional)
uint64 end_height = 3;
/// The type of calculation required (optional)
/// Defaults to median
/// median, mean, quartile, quantile
CalcType calc_type = 4;
}
/// GetBlockSize / GetBlockFees Response
message BlockGroupResponse {
repeated double value = 1;
CalcType calc_type = 2;
}
enum CalcType {
MEAN = 0;
MEDIAN = 1;
QUANTILE = 2;
QUARTILE = 3;
}
// The request used for querying a function that requires a height, either between 2 points or from the chain tip
// If start_height and end_height are set and > 0, they take precedence, otherwise from_tip is used
message HeightRequest {
// The height from the chain tip (optional)
uint64 from_tip = 1;
// The starting height (optional)
uint64 start_height = 2;
// The ending height (optional)
uint64 end_height = 3;
}
// The return type of the rpc GetBlockTiming
message BlockTimingResponse {
uint64 max = 1;
uint64 min = 2;
double avg = 3;
}
// Request that returns a header based by hash
message GetHeaderByHashRequest {
// The hash of the block header
bytes hash = 1;
}
message BlockHeaderResponse {
// The block header
BlockHeader header = 1;
// The number of blocks from the tip of this block (a.k.a depth)
uint64 confirmations = 2;
// The block reward i.e mining reward + fees
uint64 reward = 3;
// Achieved difficulty
uint64 difficulty = 4;
// The number of transactions contained in the block
uint32 num_transactions = 5;
}
// The request used for querying headers from the base node. The parameters `from_height` and `num_headers` can be used
// to page through the current best chain.
message ListHeadersRequest {
// The height to start at. Depending on sorting, will either default to use the tip or genesis block, for `SORTING_DESC`
// and `SORTING_ASC` respectively, if a value is not provided. The first header returned will be at this height
// followed by `num_headers` - 1 headers in the direction specified by `sorting`. If greater than the current tip,
// the current tip will be used.
uint64 from_height = 1;
// The number of headers to return. If not specified, it will default to 10
uint64 num_headers = 2;
// The ordering to return the headers in. If not specified will default to SORTING_DESC. Note that if `from_height`
// is not specified or is 0, if `sorting` is SORTING_DESC, the tip will be used as `from_height`, otherwise the
// block at height 0 will be used.
Sorting sorting = 3;
}
// The request used for querying blocks in the base node's current best chain. Currently only querying by height is
// available. Multiple blocks may be queried.e.g. [189092,100023,122424]. The order in which they are returned is not
// guaranteed.
message GetBlocksRequest {
repeated uint64 heights = 1;
}
// The return type of the rpc GetBlocks. Blocks are not guaranteed to be returned in the order requested.
message GetBlocksResponse {
repeated HistoricalBlock blocks = 1;
}
enum Sorting {
SORTING_DESC = 0;
SORTING_ASC = 1;
}
message MetaData {
// The current chain height, or the block number of the longest valid chain, or `None` if there is no chain
uint64 best_block_height = 1;
// The block hash of the current tip of the longest valid chain, or `None` for an empty chain
bytes best_block_hash = 2;
// The current geometric mean of the pow of the chain tip, or `None` if there is no chain
bytes accumulated_difficulty = 5;
// This is the min height this node can provide complete blocks for. A 0 here means this node is archival and can provide complete blocks for every height.
uint64 pruned_height = 6;
uint64 timestamp = 7;
}
message SyncInfoResponse {
uint64 tip_height = 1;
uint64 local_height = 2;
repeated bytes peer_node_id = 3;
}
message SyncProgressResponse {
uint64 tip_height = 1;
uint64 local_height = 2;
SyncState state = 3;
string short_desc = 4;
uint64 initial_connected_peers = 5;
}
enum SyncState {
STARTUP = 0;
HEADER_STARTING = 1;
HEADER = 2;
BLOCK_STARTING = 3;
BLOCK = 4;
DONE = 5;
}
// This is the message that is returned for a miner after it asks for a new block.
message GetNewBlockResult{
// This is the header hash of the completed block
bytes block_hash = 1;
// This is the completed block
Block block = 2;
bytes merge_mining_hash =3;
bytes tari_unique_id =4;
MinerData miner_data = 5;
bytes vm_key = 6;
}
// This is the message that is returned for a miner after it asks for a new block.
message GetNewBlockBlobResult{
// This is the header hash of the completed block
bytes block_hash = 1;
// This is the completed block's header
bytes header = 2;
// This is the completed block's body
bytes block_body = 3;
bytes merge_mining_hash =4;
bytes utxo_mr = 5;
bytes tari_unique_id =6;
}
// This is mining data for the miner asking for a new block
message MinerData{
PowAlgo algo = 1;
uint64 target_difficulty = 2;
uint64 reward = 3;
// bytes merge_mining_hash =4;
uint64 total_fees = 5;
}
// This is the request type for the Search Kernels rpc
message SearchKernelsRequest{
repeated Signature signatures = 1;
}
// This is the request type for the Search Utxo rpc
message SearchUtxosRequest{
repeated bytes commitments = 1;
}
message FetchMatchingUtxosRequest {
repeated bytes hashes = 1;
}
message FetchMatchingUtxosResponse {
TransactionOutput output = 1;
}
// This is the request type of the get all peers rpc call
message GetPeersResponse{
Peer peer = 1;
}
message GetPeersRequest{}
message SubmitTransactionRequest {
Transaction transaction = 1;
}
message SubmitTransactionResponse {
SubmitTransactionResult result =1;
}
enum SubmitTransactionResult {
NONE = 0;
ACCEPTED = 1;
NOT_PROCESSABLE_AT_THIS_TIME = 2;
ALREADY_MINED = 3;
REJECTED = 4;
}
message GetMempoolTransactionsRequest {
}
message GetMempoolTransactionsResponse {
Transaction transaction = 1;
}
message TransactionStateRequest {
Signature excess_sig = 1;
}
message TransactionStateResponse {
TransactionLocation result =1;
}
enum TransactionLocation {
UNKNOWN = 0;
MEMPOOL = 1;
MINED = 2;
NOT_STORED = 3;
}
message MempoolStatsResponse {
uint64 unconfirmed_txs = 2;
uint64 reorg_txs = 3;
uint64 unconfirmed_weight = 4;
}
message GetActiveValidatorNodesRequest {
uint64 height = 1;
}
message GetActiveValidatorNodesResponse {
bytes shard_key = 1;
bytes public_key = 2;
}
message GetShardKeyRequest {
uint64 height = 1;
bytes public_key = 2;
}
message GetShardKeyResponse {
bytes shard_key = 1;
bool found = 2;
}
message GetTemplateRegistrationsRequest {
bytes start_hash = 1;
uint64 count = 2;
}
message GetTemplateRegistrationResponse {
bytes utxo_hash = 1;
TemplateRegistration registration = 2;
}
message BlockInfo {
uint64 height = 1;
bytes hash = 2;
bytes next_block_hash = 3;
}
message GetSideChainUtxosRequest {
bytes start_hash = 1;
uint64 count = 2;
}
message GetSideChainUtxosResponse {
BlockInfo block_info = 1;
repeated TransactionOutput outputs = 2;
}
message GetNetworkStateRequest {
}
message GetNetworkStateResponse {
// metadata
MetaData metadata = 1;
// has the base node synced
bool initial_sync_achieved = 2;
//current state of the base node
BaseNodeState base_node_state = 3;
// do we have failed checkpoints
bool failed_checkpoints = 4;
// The block reward of the next tip
uint64 reward = 5;
// estimate sha3x hash rate
uint64 sha3x_estimated_hash_rate = 6;
// estimate randomx hash rate
uint64 monero_randomx_estimated_hash_rate = 7;
uint64 tari_randomx_estimated_hash_rate = 10;
// number of connections
uint64 num_connections = 8;
//liveness results
repeated LivenessResult liveness_results = 9;
}
message LivenessResult{
// node id
bytes peer_node_id = 1;
// time to discover
uint64 discover_latency = 2;
// Dial latency
uint64 ping_latency = 3;
}
+27
View File
@@ -0,0 +1,27 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: block.proto
#include "block.pb.h"
#include "block.grpc.pb.h"
#include <functional>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/impl/channel_interface.h>
#include <grpcpp/impl/client_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/rpc_service_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace tari
} // namespace rpc
+57
View File
@@ -0,0 +1,57 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: block.proto
// Original file comments:
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GRPC_block_2eproto__INCLUDED
#define GRPC_block_2eproto__INCLUDED
#include "block.pb.h"
#include <functional>
#include <grpcpp/generic/async_generic_service.h>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/proto_utils.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/status.h>
#include <grpcpp/support/stub_options.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace rpc
} // namespace tari
#endif // GRPC_block_2eproto__INCLUDED
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+142
View File
@@ -0,0 +1,142 @@
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package tari.rpc;
import "transaction.proto";
// The BlockHeader contains all the metadata for the block, including proof of work, a link to the previous block
// and the transaction kernels.
message BlockHeader {
// The hash of the block
bytes hash = 1;
// Version of the block
uint32 version = 2;
// Height of this block since the genesis block (height 0)
uint64 height = 3;
// Hash of the block previous to this in the chain.
bytes prev_hash = 4;
// Timestamp at which the block was built.
uint64 timestamp = 5;
// This is the UTXO merkle root of the outputs in the blockchain
bytes output_mr = 6;
// This is the merkle root of all outputs in this block
bytes block_output_mr = 7;
// This is the MMR root of the kernels
bytes kernel_mr = 8;
// This is the Merkle root of the inputs in this block
bytes input_mr = 9;
// Total accumulated sum of kernel offsets since genesis block. We can derive the kernel offset sum for *this*
// block from the total kernel offset of the previous block header.
bytes total_kernel_offset = 10;
// Nonce increment used to mine this block.
uint64 nonce = 11;
// Proof of work metadata
ProofOfWork pow = 12;
// Kernel MMR size
uint64 kernel_mmr_size = 13;
// Output MMR size
uint64 output_mmr_size = 14;
// Sum of script offsets for all kernels in this block.
bytes total_script_offset = 15;
// Merkle root of validator nodes
bytes validator_node_mr = 16;
// Validator size
uint64 validator_node_size = 17;
}
// The proof of work data structure that is included in the block header.
message ProofOfWork {
// The algorithm used to mine this block
// 0 = Monero
// 1 = Sha3X
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.
bytes pow_data = 4;
}
//This is used to request the which pow algo should be used with the block template
message PowAlgo {
// The permitted pow algorithms
enum PowAlgos {
POW_ALGOS_RANDOMXM = 0; // Accessible as `grpc::pow_algo::PowAlgos::RandomxM`
POW_ALGOS_SHA3X = 1; // Accessible as `grpc::pow_algo::PowAlgos::Sha3x`
POW_ALGOS_RANDOMXT = 2; // Accessible as `grpc::pow_algo::PowAlgos::RandomxT`
}
// The pow algo to use
PowAlgos pow_algo = 1;
}
// A Minotari block. Blocks are linked together into a blockchain.
message Block {
// The BlockHeader contains all the metadata for the block, including proof of work, a link to the previous block
// and the transaction kernels.
BlockHeader header = 1;
// The components of the block or transaction. The same struct can be used for either, since in Mimblewimble,
// blocks consist of inputs, outputs and kernels, rather than transactions.
AggregateBody body = 2;
}
// The representation of a historical block in the blockchain. It is essentially identical to a protocol-defined
// block but contains some extra metadata that clients such as Block Explorers will find interesting.
message HistoricalBlock {
// The number of blocks that have been mined since this block, including this one. The current tip will have one
// confirmation.
uint64 confirmations = 1;
// The underlying block
Block block = 2;
}
// The NewBlockHeaderTemplate is used for the construction of a new mine-able block. It contains all the metadata for the block that the Base Node is able to complete on behalf of a Miner.
message NewBlockHeaderTemplate {
// Version of the block
uint32 version = 1;
// Height of this block since the genesis block (height 0)
uint64 height = 2;
// Hash of the block previous to this in the chain.
bytes prev_hash = 3;
// Total accumulated sum of kernel offsets since genesis block. We can derive the kernel offset sum for *this*
// block from the total kernel offset of the previous block header.
bytes total_kernel_offset = 4;
// Proof of work metadata
ProofOfWork pow = 5;
// Sum of script offsets for all kernels in this block.
bytes total_script_offset = 7;
}
// The new block template is used constructing a new partial block, allowing a miner to added the coinbase utxo and as a final step the Base node to add the MMR roots to the header.
message NewBlockTemplate {
// The NewBlockHeaderTemplate is used for the construction of a new mineable block. It contains all the metadata for
// the block that the Base Node is able to complete on behalf of a Miner.
NewBlockHeaderTemplate header = 1;
// This flag indicates if the inputs, outputs and kernels have been sorted internally, that is, the sort() method
// has been called. This may be false even if all components are sorted.
AggregateBody body = 2;
// Sometimes the mempool has not synced to the latest tip, this flag indicates if the mempool is out of sync.
// In most cases the next call to get_new_block_template will return a block with the mempool in sync.
bool is_mempool_in_sync = 3;
}
+27
View File
@@ -0,0 +1,27 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: network.proto
#include "network.pb.h"
#include "network.grpc.pb.h"
#include <functional>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/impl/channel_interface.h>
#include <grpcpp/impl/client_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/rpc_service_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace tari
} // namespace rpc
+57
View File
@@ -0,0 +1,57 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: network.proto
// Original file comments:
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GRPC_network_2eproto__INCLUDED
#define GRPC_network_2eproto__INCLUDED
#include "network.pb.h"
#include <functional>
#include <grpcpp/generic/async_generic_service.h>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/proto_utils.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/status.h>
#include <grpcpp/support/stub_options.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace rpc
} // namespace tari
#endif // GRPC_network_2eproto__INCLUDED
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+97
View File
@@ -0,0 +1,97 @@
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package tari.rpc;
import "google/protobuf/timestamp.proto";
message NodeIdentity {
bytes public_key = 1;
repeated string public_addresses = 2;
bytes node_id = 3;
}
message Peer {
/// Public key of the peer
bytes public_key =1;
/// NodeId of the peer
bytes node_id =2;
/// Peer's addresses
repeated Address addresses = 3;
/// Last connection attempt to peer
uint64 last_connection = 4;
/// Flags for the peer.
uint32 flags = 5;
uint64 banned_until= 6;
string banned_reason= 7;
uint64 offline_at = 8;
/// Features supported by the peer
uint32 features = 9;
/// used as information for more efficient protocol negotiation.
repeated bytes supported_protocols = 11;
/// User agent advertised by the peer
string user_agent = 12;
}
enum ConnectivityStatus {
Initializing = 0;
Online = 1;
Degraded = 2;
Offline = 3;
}
message NetworkStatusResponse {
ConnectivityStatus status = 1;
uint32 avg_latency_ms = 2;
uint32 num_node_connections = 3;
}
message Address{
bytes address =1;
string last_seen = 2;
uint32 connection_attempts = 3;
AverageLatency avg_latency = 5;
}
message AverageLatency {
uint64 latency = 1;
}
message ListConnectedPeersResponse {
repeated Peer connected_peers = 1;
}
message SoftwareUpdate {
bool has_update = 1;
string version = 2;
string sha = 3;
string download_url = 4;
}
message GetIdentityRequest { }
message GetIdentityResponse {
bytes public_key = 1;
string public_address = 2;
bytes node_id = 3;
}
+27
View File
@@ -0,0 +1,27 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: sidechain_types.proto
#include "sidechain_types.pb.h"
#include "sidechain_types.grpc.pb.h"
#include <functional>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/impl/channel_interface.h>
#include <grpcpp/impl/client_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/rpc_service_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace tari
} // namespace rpc
+57
View File
@@ -0,0 +1,57 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: sidechain_types.proto
// Original file comments:
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GRPC_sidechain_5ftypes_2eproto__INCLUDED
#define GRPC_sidechain_5ftypes_2eproto__INCLUDED
#include "sidechain_types.pb.h"
#include <functional>
#include <grpcpp/generic/async_generic_service.h>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/proto_utils.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/status.h>
#include <grpcpp/support/stub_options.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace rpc
} // namespace tari
#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
+77
View File
@@ -0,0 +1,77 @@
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
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;
}
}
message ValidatorNodeRegistration {
bytes public_key = 1;
Signature signature = 2;
}
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;
}
message ConfidentialOutputData {
bytes claim_public_key = 1;
}
message TemplateType {
oneof template_type {
WasmInfo wasm = 1;
FlowInfo flow = 2;
ManifestInfo manifest = 3;
}
}
message WasmInfo {
uint32 abi_version = 1;
}
message FlowInfo {
}
message ManifestInfo {
}
message BuildInfo {
string repo_url = 1;
bytes commit_hash = 2;
}
+27
View File
@@ -0,0 +1,27 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: transaction.proto
#include "transaction.pb.h"
#include "transaction.grpc.pb.h"
#include <functional>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/impl/channel_interface.h>
#include <grpcpp/impl/client_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/rpc_service_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace tari
} // namespace rpc
+57
View File
@@ -0,0 +1,57 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: transaction.proto
// Original file comments:
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GRPC_transaction_2eproto__INCLUDED
#define GRPC_transaction_2eproto__INCLUDED
#include "transaction.pb.h"
#include <functional>
#include <grpcpp/generic/async_generic_service.h>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/proto_utils.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/status.h>
#include <grpcpp/support/stub_options.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace rpc
} // namespace tari
#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
+184
View File
@@ -0,0 +1,184 @@
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package tari.rpc;
import "types.proto";
import "sidechain_types.proto";
// The transaction kernel tracks the excess for a given transaction. For an explanation of what the excess is, and
// why it is necessary, refer to the
// [Mimblewimble TLU post](https://tlu.tarilabs.com/protocols/mimblewimble-1/sources/PITCHME.link.html?highlight=mimblewimble#mimblewimble).
// The kernel also tracks other transaction metadata, such as the lock height for the transaction (i.e. the earliest
// this transaction can be mined) and the transaction fee, in cleartext.
message TransactionKernel {
// Options for a kernel's structure or use
uint32 features = 1;
/// Fee originally included in the transaction this proof is for (in MicroMinotari)
uint64 fee = 2;
// This kernel is not valid earlier than lock_height blocks
// The max lock_height of all *inputs* to this transaction
uint64 lock_height = 3;
// Remainder of the sum of all transaction commitments. If the transaction
// is well formed, amounts components should sum to zero and the excess
// is hence a valid public key.
bytes excess = 6;
// The signature proving the excess is a valid public key, which signs
// the transaction fee.
Signature excess_sig = 7;
// The hash of the kernel, as it appears in the MMR
bytes hash = 8;
// Version
uint32 version = 9;
// Optional burned commitment
bytes burn_commitment = 10;
}
// A transaction input.
//
// Primarily a reference to an output being spent by the transaction.
message TransactionInput {
// The features of the output being spent. We will check maturity for all outputs.
OutputFeatures features = 1;
// The commitment referencing the output being spent.
bytes commitment = 2;
// Hash of the input, as it appears in the MMR
bytes hash = 3;
// The serialised script
bytes script = 4;
// The script input data, if any
bytes input_data = 5;
// A signature with k_s, signing the script, input data, and mined height
ComAndPubSignature script_signature = 7;
// The offset public key, K_O
bytes sender_offset_public_key = 8;
// The hash of the output this input is spending
bytes output_hash = 9;
// Covenant
bytes covenant = 10;
// Version
uint32 version = 11;
// The encrypted data
bytes encrypted_data = 12;
// The minimum value of the commitment that is proven by the range proof (in MicroMinotari)
uint64 minimum_value_promise = 13;
// The metadata signature for output this input is spending
ComAndPubSignature metadata_signature = 14;
// The rangeproof hash for output this input is spending
bytes rangeproof_hash = 15;
}
// Output for a transaction, defining the new ownership of coins that are being transferred. The commitment is a
// blinded value for the output while the range proof guarantees the commitment includes a positive value without
// overflow and the ownership of the private key.
message TransactionOutput {
// Options for an output's structure or use
OutputFeatures features = 1;
// The homomorphic commitment representing the output amount
bytes commitment = 2;
// A proof that the commitment is in the right range
RangeProof range_proof = 3;
// The hash of the output, as it appears in the MMR
bytes hash = 4;
// Tari script serialised script
bytes script = 5;
// Tari script offset public key, K_O
bytes sender_offset_public_key = 6;
// Metadata signature with the homomorphic commitment private values (amount and blinding factor) and the sender
// offset private key
ComAndPubSignature metadata_signature = 7;
// Covenant
bytes covenant = 8;
// Version
uint32 version = 9;
// Encrypted Pedersen commitment openings (value and mask) for the output
bytes encrypted_data = 10;
// The minimum value of the commitment that is proven by the range proof (in MicroMinotari)
uint64 minimum_value_promise = 11;
}
// Options for UTXOs
message OutputFeatures {
// Version
uint32 version = 1;
// The type of output, eg Coinbase, all of which have different consensus rules
uint32 output_type = 2;
// The maturity of the specific UTXO. This is the min lock height at which an UTXO can be spend. Coinbase UTXO
// require a min maturity of the Coinbase_lock_height, this should be checked on receiving new blocks.
uint64 maturity = 3;
// Additional arbitrary info in coinbase transactions supplied by miners
bytes coinbase_extra = 4;
// Features that are specific to a side chain
SideChainFeature sidechain_feature = 5;
// The type of range proof used in the output
uint32 range_proof_type = 6;
}
// The components of the block or transaction. The same struct can be used for either, since in Mimblewimble,
// cut-through means that blocks and transactions have the same structure. The inputs, outputs and kernels should
// be sorted by their Blake2b-256bit digest hash
message AggregateBody {
// List of inputs spent by the transaction.
repeated TransactionInput inputs = 1;
// List of outputs the transaction produces.
repeated TransactionOutput outputs = 2;
// Kernels contain the excesses and their signatures for transaction
repeated TransactionKernel kernels = 3;
}
// A transaction which consists of a kernel offset and an aggregate body made up of inputs, outputs and kernels.
message Transaction {
bytes offset = 1;
AggregateBody body = 2;
bytes script_offset = 3;
}
message UnblindedOutput {
// Value of the output
uint64 value = 1;
// Spending key of the output
bytes spending_key = 2;
// Options for an output's structure or use
OutputFeatures features = 3;
// Tari script serialised script
bytes script = 4;
// Tari script input data for spending
bytes input_data = 5;
// Tari script private key
bytes script_private_key = 7;
// Tari script offset pubkey, K_O
bytes sender_offset_public_key = 8;
// UTXO signature with the script offset private key, k_O
ComAndPubSignature metadata_signature = 9;
// The minimum height the script allows this output to be spent
uint64 script_lock_height = 10;
// Covenant
bytes covenant = 11;
// Encrypted data
bytes encrypted_data = 12;
// The minimum value of the commitment that is proven by the range proof (in MicroMinotari)
uint64 minimum_value_promise = 13;
// The range proof
RangeProof range_proof = 14;
}
+27
View File
@@ -0,0 +1,27 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: types.proto
#include "types.pb.h"
#include "types.grpc.pb.h"
#include <functional>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/impl/channel_interface.h>
#include <grpcpp/impl/client_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/rpc_service_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace tari
} // namespace rpc
+57
View File
@@ -0,0 +1,57 @@
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: types.proto
// Original file comments:
// Copyright 2020. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GRPC_types_2eproto__INCLUDED
#define GRPC_types_2eproto__INCLUDED
#include "types.pb.h"
#include <functional>
#include <grpcpp/generic/async_generic_service.h>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/proto_utils.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/status.h>
#include <grpcpp/support/stub_options.h>
#include <grpcpp/support/sync_stream.h>
namespace tari {
namespace rpc {
} // namespace rpc
} // namespace tari
#endif // GRPC_types_2eproto__INCLUDED
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

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