From: Ralphred Date: Tue, 18 Feb 2025 21:47:04 +0000 (+0000) Subject: new file: net-misc/xmrig/files/xmrig.initd X-Git-Url: https://git.liquid.me.uk/?a=commitdiff_plain;h=2b15631dd7f7d5cf71bd5dd924adad674ad8098c;p=local new file: net-misc/xmrig/files/xmrig.initd new file: net-misc/xmrig/files/xmrigd.1.initd new file: net-misc/xmrig/files/xmrigd.confd new file: net-misc/xmrig/xmrig-6.21.1.ebuild modified: net-p2p/monero/files/monerod.conf modified: net-p2p/monero/files/monerod.confd modified: net-p2p/monero/files/monerod.initd new file: net-p2p/p2pool/files/p2pool.confd new file: net-p2p/p2pool/files/p2pool.initd new file: net-p2p/p2pool/p2pool-4.3.ebuild --- diff --git a/net-misc/xmrig/Manifest b/net-misc/xmrig/Manifest new file mode 100644 index 0000000..3f01e33 --- /dev/null +++ b/net-misc/xmrig/Manifest @@ -0,0 +1,5 @@ +DIST xmrig-6.21.1.tar.gz 2416545 BLAKE2B 72ecdfc8c999aee91aef4f540211c5d5a6f1992c76211162a623e89391cedfcc2d5540f291d9915ee4180b83f58ef7f2eb1e3aff8dee49c72f41f90878d7ef62 SHA512 a9267708e61084db7116381adb2256a04c30eba0c84b571764cc73ccafc9276f55b6665529eb7b9c1785d582d0d280ced6ee7ca88a5e98f9bbdef2a9176a9794 +DIST xmrig-6.21.3.tar.gz 2426720 BLAKE2B 11563169e51402313399109860e04dd13dfc9911504db571968d6a97112990ebb68a3019da836a4ac19a589c94ab4b5f2ebcbadce59452c278ea923e8abf475a SHA512 91e92f61e385b75715b0b00fcb772bf997f3db19ef47f43c4bda3662aec6276273551ac915a7a6eeef253deb8da5b0ec0b45e02f0b84211ab8f0f5a37f34c87e +DIST xmrig-6.22.0.tar.gz 2428500 BLAKE2B 3f675f909a5875c85a22eed8a89022d4895a1a6e7ec258ec87c624c5150487376b065bef4f50c0bafb062e07003ad3910c34634ec2266c458d7284014181daf3 SHA512 12eac61ea8b33a2932a0fdbd7a4ccbbf4f046578ecfd67adad4e7729f9de740060d11025d7ab6f17d7e19586ee59f041e761e3bb42c6fd766ea7029c15d97b42 +DIST xmrig-6.22.1.tar.gz 2434991 BLAKE2B 69ca78c3f0c8adefb8b33a58e4e55739810fd3ce61ea636d8e1d29fe92f786eafa6368b77f3e5d9123964dc72be78b2df2a468ea9c56a649faf66a16c05c8b77 SHA512 4ebeaea8d4439f0f682a46c25a86ebc0e6129eb6a89d1c8036c05973e61b385c62200dc7ed702f4f6f52d2ad546953d0d941447ba1e3db54fec1adaecba20ea6 +DIST xmrig-6.22.2.tar.gz 2435360 BLAKE2B c9b81ee93a008639709751b3924461d29216f8daa4beb3db96d983812efa5083926624aaea14d20692c3a3740a1ca178383b8b7cce0c1ad78a16f0299f891561 SHA512 4e25364737456711b09d5ed68e0d26b74cc2f4f4408ff5d02e0063bf67d6f38db5fe9af5d099dc4fd4b3f668baf2023cb816c049d38588ba1b54a8a2c0393269 diff --git a/net-misc/xmrig/files/xmrig-6.12.2-nonotls.patch b/net-misc/xmrig/files/xmrig-6.12.2-nonotls.patch new file mode 100644 index 0000000..f58c7e2 --- /dev/null +++ b/net-misc/xmrig/files/xmrig-6.12.2-nonotls.patch @@ -0,0 +1,23 @@ +From ee98bfe01a94d021d81ed4c2bb11ec91c0bd81c8 Mon Sep 17 00:00:00 2001 +From: Matt Smith +Date: Sun, 7 Jun 2020 13:20:04 +0100 +Subject: [PATCH] Don't suffix binary with -notls + +--- + cmake/OpenSSL.cmake | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/cmake/OpenSSL.cmake b/cmake/OpenSSL.cmake +index 89805301..c01c940a 100644 +--- a/cmake/OpenSSL.cmake ++++ b/cmake/OpenSSL.cmake +@@ -54,6 +54,4 @@ else() + src/base/net/http/HttpServer.h + ) + endif() +- +- set(CMAKE_PROJECT_NAME "${CMAKE_PROJECT_NAME}-notls") + endif() +-- +2.27.0 + diff --git a/net-misc/xmrig/files/xmrig.initd b/net-misc/xmrig/files/xmrig.initd new file mode 100755 index 0000000..6ce04de --- /dev/null +++ b/net-misc/xmrig/files/xmrig.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run + +depend() { + need net + need xmrigdaemon +} + +start() { + ebegin "Starting XMRig Virtual Service" + eend $? +} + +stop() { + ebegin "Stopping XMRig Virtual Service" + einfo "Looking for any XMRig daemons to stop" + for file in /etc/init.d/xmrigd.*;do rc-service $basename ${file} --nodeps stop 2>/dev/null;done + eend $? +} + +start_pre() { + [[ -e /etc/init.d/${RC_SVCNAME}d.$(nproc) ]] && exit + ewarn "${RC_SVCNAME}d.$(nproc) does not exist" + einfo "Preparing xmrigd service files" + for x in $(seq 2 $(nproc));do + ln -s /etc/init.d/xmrigd.1 /etc/init.d/xmrigd.${x} + done + eend $? +} diff --git a/net-misc/xmrig/files/xmrig.service b/net-misc/xmrig/files/xmrig.service new file mode 100644 index 0000000..5b5c4c3 --- /dev/null +++ b/net-misc/xmrig/files/xmrig.service @@ -0,0 +1,35 @@ +[Unit] +Description=XMRig Monero Miner +After=network-online.target +AssertFileNotEmpty=/etc/xmrig/config.json + +[Service] +ExecStartPre=+/usr/bin/randomx_boost.sh +ExecStartPre=+/usr/bin/enable_1gb_pages.sh +ExecStartPre=/usr/bin/xmrig --config=/etc/xmrig/config.json --dry-run +ExecStart=/usr/bin/xmrig --config=/etc/xmrig/config.json +StandardOutput=journal +StandardError=journal +DynamicUser=true +Nice=19 +CPUSchedulingPolicy=idle +PrivateTmp=true +ProtectHome=true +ProtectSystem=strict +NoNewPrivileges=true +# PrivateDevices=true # https://github.com/systemd/systemd/issues/13857 +CapabilityBoundingSet= +#ProtectClock=true # https://github.com/systemd/systemd/issues/20835 +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX +RestrictNamespaces=true +PrivateUsers=true +ConfigurationDirectory=xmrig + +[Install] +WantedBy=multi-user.target + diff --git a/net-misc/xmrig/files/xmrigd.1.initd b/net-misc/xmrig/files/xmrigd.1.initd new file mode 100755 index 0000000..54fe4c1 --- /dev/null +++ b/net-misc/xmrig/files/xmrigd.1.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +name="${RC_SVCNAME/xmr/XMR} Cypto Miner Daemon" +description="Mines crypto curreny" +pidfile="/var/run/xmrig.pid" +command=/usr/bin/xmrig +command_args="${XMRIG_ARGS} ${RC_SVCNAME/xmrigd./--threads=}" +supervisor=supervise-daemon +command_user="${XMRIG_USR}:${XMRIG_GRP}" +respawn_max="3" +respawn_period="40" + +depend() { + need net + provide xmrigdaemon +} + +start_pre() { + einfo "Looking for any other XMRig daemons to stop" + for file in /etc/init.d/xmrigd.*;do [[ $RC_SVCNAME != $(basename $file) ]] && rc-service $basename ${file} stop --nodeps 2>/dev/null;done +} + +stop_post() { + echo "stopped stopped miner speed 10s/60s/15m 0 0 0 H/s max 0 H/s">>/var/log/xmrig.log +} diff --git a/net-misc/xmrig/files/xmrigd.confd b/net-misc/xmrig/files/xmrigd.confd new file mode 100644 index 0000000..1f43c2c --- /dev/null +++ b/net-misc/xmrig/files/xmrigd.confd @@ -0,0 +1,3 @@ +XMRIG_ARGS="-o 10.0.0.254:3333 --log-file=/var/log/xmrig.log --verbose" +XMRIG_USR=root +XMRIG_GRP=root diff --git a/net-misc/xmrig/xmrig-6.21.1.ebuild b/net-misc/xmrig/xmrig-6.21.1.ebuild new file mode 100644 index 0000000..b6cc3de --- /dev/null +++ b/net-misc/xmrig/xmrig-6.21.1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic systemd toolchain-funcs + +DESCRIPTION="RandomX, CryptoNight, KawPow, AstroBWT, and Argon2 CPU/GPU miner" +HOMEPAGE="https://xmrig.com https://github.com/xmrig/xmrig" + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/xmrig/xmrig/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 arm64" +fi + +LICENSE="Apache-2.0 GPL-3+ MIT" +SLOT="0" +IUSE="cpu_flags_x86_sse4_1 donate hwloc opencl +ssl" + +DEPEND=" + dev-libs/libuv:= + hwloc? ( >=sys-apps/hwloc-2.5.0:= ) + opencl? ( virtual/opencl ) + ssl? ( dev-libs/openssl:= ) +" +RDEPEND=" + ${DEPEND} + !arm64? ( sys-apps/msr-tools ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-6.12.2-nonotls.patch +) + +src_prepare() { + if ! use donate ; then + sed -i 's/1;/0;/g' src/donate.h || die + fi + + cmake_src_prepare +} + +src_configure() { + # JIT broken with FORTIFY_SOURCE=3 + # Bug #913420 + if tc-enables-fortify-source; then + filter-flags -D_FORTIFY_SOURCE=3 + append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 + fi + + local mycmakeargs=( + -DWITH_SSE4_1=$(usex cpu_flags_x86_sse4_1) + -DWITH_HWLOC=$(usex hwloc) + -DWITH_TLS=$(usex ssl) + -DWITH_OPENCL=$(usex opencl) + -DWITH_CUDA=OFF + ) + + cmake_src_configure +} + +src_install() { + default + keepdir /etc/xmrig + systemd_dounit "${FILESDIR}"/xmrig.service + dobin "${BUILD_DIR}/xmrig" + dobin "${S}/scripts/enable_1gb_pages.sh" + dobin "${S}/scripts/randomx_boost.sh" +} diff --git a/net-p2p/monero/Manifest b/net-p2p/monero/Manifest index f3852be..f9cccb6 100644 --- a/net-p2p/monero/Manifest +++ b/net-p2p/monero/Manifest @@ -1,18 +1 @@ -AUX monero-0.17.1.7-linkjobs.patch 1541 BLAKE2B e8aff4f66664f47c03fee44fe3354828cadf48b70724b3a9c5a1b257dacb1f3a8f61de391074ec2251c926298e25949bd3022e38323aef5d1ee232c9c727ea69 SHA512 e2e1307510c63b9069c0c4b3770637346b909e4445dcdb8d2b2dc7a67758f1b9984cbbee3cab9feafc1df929a1d2cdddff34cf577cd45090114086fdbfdc7544 -AUX monero-0.17.1.7-unbundle-dependencies.patch 3705 BLAKE2B 115a7b27ac0ee32d57f8d4f77b6d5219edb7e7152f058c9cd7039176031883f5b12e19b65cbda0312a72248313ef4d44ac5069ae3357ac3af9aaf3f7b197cb26 SHA512 c3a36596edd70fabcb66e9503bb1d5f6481ad768466a1e9efa42c268e8a3b05b993a3310b209da91b87590a01ee344bd3835e60c339287771f330812d45a86b6 -AUX monero-0.17.2.0-boost-176.patch 778 BLAKE2B ba799a7a0d6c13765cf0825114a857095ef9390dea98069b0a26540680dc8bd54b3b9bbe3e5099e8260996e60960a97e4cc33ea32aaf611b80cf7c2ce22d98ad SHA512 c67ab4d4e7449d3690663647aa14411cce90ded9c9aa8bcd600ddbd3cd7633b3f5ec346c3c3c587951e9b1c380c99490764d70421ee0a9abb0fcc470e1f76c48 -AUX monero-0.17.3.0-unbundle-dependencies.patch 3809 BLAKE2B bc629c1061fad475ec26d040aef3615dab3a01bc4fc6c4f9e34834d61abce0e1cca4e61cd7a55884ced5c803c50035d7657d58a53803c0bd3bbd0ef0da10dd56 SHA512 cddd5e831ecea0ce1a0bb863431fa3853b8fd8235e1368c1b1db2751bf66d6850cdfd48f45a98d87a0b7192021297837f82c64386ef7a1393b711820c7de4714 -AUX monerod.conf 301 BLAKE2B 48e8545ac02afbb8edd32d1457afcd52c30380ba03e526c982eb91ce9fa0c5733fdbc9547fd7a01f525176122bc201f5e8f5bc88125bbaf6bf762c0f5df7a220 SHA512 ca7fa3003f8e87c66e3a1986555327e1ce767d694daa506a8889aea8fe8b646cfece54bee1a1d029c66e32aa7845501059c2810bb030c445f3dfa46c43704d41 -AUX monerod.confd 213 BLAKE2B 25a6f44d2d1bdbc21990e18e19239ce8b75a9d0228978c352e142e939b5db3f2c6ceed22f39ac7ad956e377fc9a062616d4d6677c7f0ba05d7683593867cb01b SHA512 68eb1575297a992023a14db60239ac0b031b2a10cfd207252aba16d709d721fd89451aba05635c3f5a5351109317f32ca3acc66c1203098a1f13e91007b33073 -AUX monerod.initd 527 BLAKE2B 7af13d433bb025b86c52fbabdcd24d8940baf889ae931b7492f5766357f861d92cc53e6bcbf276f0bcd46827ca48fa188dea2052bc0d1727ad5ab02259701167 SHA512 796c99f4ec060e289433d9ac6df6550aea75f37ab06eca7470014ff576e4686559c123f749be452af4c4ebd84236238cbba33259fba2d3a05d8f25517bde4e5a -AUX monerod.service 329 BLAKE2B e4390612e1e37cb47164967cc086eb32b1dac61ceba621d376ae87220245284d83dd0895e786daf1652ff40c0161f713cd4f124ae7b2d57306208d5886c8aeb3 SHA512 38eb172bcd46c98a5aaa8f7c0d8bf011c183fd4d09f9d38c14679a4a0ee628d58c6dde6cce181745b053576e3b8907038d75ec3bcb3b0bb03e62c606573038b3 -DIST monero-0.17.2.0.tar.gz 10622184 BLAKE2B c439e447f524a08a7ee79420873b7cf393f5cd3269460944aac30a315ac7c273c12fd809d86d41445bfc7e8c2feb0538d4e9fc1dadeb55f7e09f2920778f07a7 SHA512 85b764f1fc25127e7ca4ada67b1d832a9604c4cf65b160d689650e7ca7bbc36b73d8b26c5409fabdaad7369684997447cd812d1c521fad19d24f5b35f4789a1e -DIST monero-0.17.2.3.tar.gz 10640501 BLAKE2B 15c7b92e7d00788214953c09af96d578e79c65ba9263d2a9ea19cfb9cc65e77d15770b873a10b77aae9e908dce74162d3577ed241600ebd57098b860bfd8f114 SHA512 7f3363c2cb66fa90a47a4cbb03b367182afa63af21d40bf07ea57cd91e4805684ec4795c0390bc966626a3b7b3c0a47167036873f5d1ea4b487a3d02bf01aaa4 -DIST monero-0.17.3.0.tar.gz 10659302 BLAKE2B fe73172e490f119a3d3730e3c11afd386e54fa22e12ac69d6f5e420d5409ba8201289feb01041520b374768325ea82132108972f68ef59114f414451232daea6 SHA512 97a40f594aaa6f588a3ad982142a0ea4f4410d208dd5ff43b09c70baadd32f87e92eac97abd800f25298e8d0613ae85f68605f586ceccf9dc078fcb189d7511a -DIST monero-0.17.3.2.tar.gz 10685156 BLAKE2B f313ec0e5e224797448a43ad46d4e990174eec6cdceec6dc9a25d62f014a775172e103d05a33558404bd84a8443ba6ada0c27f81a3a83fe630d16cbad97602f5 SHA512 2d34e0525b2ca1d7bddb8ea51776b49fec4fb866a1c1239c347460ed3369af2f430be32da45666f16c369cebef099f285971c0e806d75d60354f195c5f93891d -EBUILD monero-0.17.2.0.ebuild 2957 BLAKE2B 3fa353b8dfc213ff02a5f124506b5a77cce6377699f6300b688b4beb05d510c4cedbfc62bb849066b1ad6187012c05d19afdf17f22b1049ac671cea6d7c397ba SHA512 fef4ea14e996f9014271adbd896e8eeaffb3824d24682a9cc7309f855d0cbb58b73234887e6169b4a96a6fea01ec7cdf5881c93fd9c72104e5ce508081324a1a -EBUILD monero-0.17.2.3.ebuild 2957 BLAKE2B 3fa353b8dfc213ff02a5f124506b5a77cce6377699f6300b688b4beb05d510c4cedbfc62bb849066b1ad6187012c05d19afdf17f22b1049ac671cea6d7c397ba SHA512 fef4ea14e996f9014271adbd896e8eeaffb3824d24682a9cc7309f855d0cbb58b73234887e6169b4a96a6fea01ec7cdf5881c93fd9c72104e5ce508081324a1a -EBUILD monero-0.17.3.0.ebuild 2879 BLAKE2B 553f1ff48b03bfbda99fe0d165b954e7dd1a028347eb4081499f42c5d0be8f9d46397040d6ed63b2c2d6c5346a69219499b91a8bf86727096cf7501b140fc958 SHA512 56a1ff0dfa45d617b47d160359701698f2bb0edc924dcc5e516631cb579e2482263dad4c2347551af6cca39271beacabf3cfb513674f0dadcf036251d201f1eb -EBUILD monero-0.17.3.2.ebuild 2934 BLAKE2B a9db5d6028fa4460fb71c473e2c6e043ce795fb2561027d090c2ae04f8762f8cfc587d8d22eda6276136cb2cd293ce96978515f278c30e2d3a73951b41e2ea4a SHA512 43717d94f48655830046dac0a88f5e43d287294ddee60cb92022d62290b3d7f7177639f362309865be8116fc74b0e887600f4e9412353a31ef60d97635a5d397 -EBUILD monero-9999.ebuild 2910 BLAKE2B 5d5bf8340279b2be61eccc0ccd925c2b9563d9fa33e1dafa29711621c88e0020af26afa035817e01af0f1af4d247da345e7cb227ea37fdccaf8789d868235675 SHA512 aa0ec0f1be6a3337428da58bea5a475fbc9ba14fed27339e00ef2eeec2c2aacd25a6b51d054016e5a338cbc25449fef73350dbdd0e9fc4d908fd21cb564532d6 -MISC metadata.xml 1131 BLAKE2B ce2528cd7a73dd991d234aa4d58b5e4aab039cb51746c04af63f243c7d00c701b7cc5236df48c42f5d58c309624c36d11c532095ea6719f14dceb6542e4e7630 SHA512 a05eb919706ddae56a82a5ac71c6484e2bfd8d14f9d736e83b7099e4a7d1bf92b22ed96e9e4929ce67349971c60521ae3b5bcd1139725fbd5323d65e33283736 +DIST monero-0.18.3.4.tar.gz 14039924 BLAKE2B cb60f1db4f482bac3b3f5fa606bf1c78103b14f927d4636e5fda4aa96dcc08a9f990355ceb1cdc8c253245a0a2a1c98cf4fd7101d13d78ac6e7d1450192fc2db SHA512 f2708bf7698410c1509ae41148c298e352b3401e1df900b7152c25cb5ceb2f5bde68274fd37b1a328e932be50bdf93fe364561c520a15e3df7de2cdbd20d1be8 diff --git a/net-p2p/monero/files/monero-0.17.1.7-linkjobs.patch b/net-p2p/monero/files/monero-0.17.1.7-linkjobs.patch deleted file mode 100644 index d0f59a6..0000000 --- a/net-p2p/monero/files/monero-0.17.1.7-linkjobs.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 12a78e5e745556c29e45b7716a8b038ecfbff800 Mon Sep 17 00:00:00 2001 -From: Matt Smith -Date: Wed, 5 Aug 2020 18:39:44 +0100 -Subject: [PATCH] cmake: Use job pool feature to limit concurrent jobs - -Add two new options, MONERO_PARALLEL_COMPILE_JOBS and -MONERO_PARALLEL_LINK_JOBS to try and prevent running out of memory when -building everything. - -Requires >= cmake 3.0.0, and the use of the Ninja generator. - -Useful links: - -* https://cmake.org/cmake/help/latest/prop_gbl/JOB_POOLS.html -* https://reviews.llvm.org/D6304 ---- - CMakeLists.txt | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f63c07a35d..3729a6b659 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -55,6 +55,20 @@ else() - message(STATUS "ccache deselected") - endif() - -+if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "ninja") -+ set(MONERO_PARALLEL_COMPILE_JOBS "" CACHE STRING "The maximum number of concurrent compilation jobs.") -+ if (MONERO_PARALLEL_COMPILE_JOBS) -+ set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${MONERO_PARALLEL_COMPILE_JOBS}) -+ set(CMAKE_JOB_POOL_COMPILE compile_job_pool) -+ endif () -+ -+ set(MONERO_PARALLEL_LINK_JOBS "" CACHE STRING "The maximum number of concurrent link jobs.") -+ if (MONERO_PARALLEL_LINK_JOBS) -+ set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${MONERO_PARALLEL_LINK_JOBS}) -+ set(CMAKE_JOB_POOL_LINK link_job_pool) -+ endif () -+endif() -+ - enable_language(C ASM) - - function (die msg) diff --git a/net-p2p/monero/files/monero-0.17.2.0-boost-176.patch b/net-p2p/monero/files/monero-0.17.2.0-boost-176.patch deleted file mode 100644 index 07a584a..0000000 --- a/net-p2p/monero/files/monero-0.17.2.0-boost-176.patch +++ /dev/null @@ -1,24 +0,0 @@ -From c28d2f7c110c0a2161fa02d6c20df94a60a41965 Mon Sep 17 00:00:00 2001 -From: loqs -Date: Sun, 23 May 2021 20:29:17 +0100 -Subject: [PATCH] Fix boost 1.76.0 compatibility - -Add missing header boost/mpl/contains.hpp -monero-project/monero/issues/7728 ---- - contrib/epee/include/storages/portable_storage.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/contrib/epee/include/storages/portable_storage.h b/contrib/epee/include/storages/portable_storage.h -index 1e68605abf5..801bb2c3465 100644 ---- a/contrib/epee/include/storages/portable_storage.h -+++ b/contrib/epee/include/storages/portable_storage.h -@@ -40,6 +40,8 @@ - #include "span.h" - #include "int-util.h" - -+#include -+ - namespace epee - { - namespace serialization diff --git a/net-p2p/monero/files/monero-0.17.3.0-unbundle-dependencies.patch b/net-p2p/monero/files/monero-0.17.3.2-unbundle-dependencies.patch similarity index 100% rename from net-p2p/monero/files/monero-0.17.3.0-unbundle-dependencies.patch rename to net-p2p/monero/files/monero-0.17.3.2-unbundle-dependencies.patch diff --git a/net-p2p/monero/files/monero-0.18.3.3-miniupnp-api-18.patch b/net-p2p/monero/files/monero-0.18.3.3-miniupnp-api-18.patch new file mode 100644 index 0000000..d281f60 --- /dev/null +++ b/net-p2p/monero/files/monero-0.18.3.3-miniupnp-api-18.patch @@ -0,0 +1,30 @@ +diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl +index 30e3d31b9..c49783e1c 100644 +--- a/src/p2p/net_node.inl ++++ b/src/p2p/net_node.inl +@@ -2989,7 +2989,12 @@ namespace nodetool + UPNPUrls urls; + IGDdatas igdData; + char lanAddress[64]; ++#if MINIUPNPC_API_VERSION > 17 ++ char wanAddress[64]; ++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof(wanAddress)); ++#else + result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); ++#endif + freeUPNPDevlist(deviceList); + if (result > 0) { + if (result == 1) { +@@ -3057,7 +3062,12 @@ namespace nodetool + UPNPUrls urls; + IGDdatas igdData; + char lanAddress[64]; ++#if MINIUPNPC_API_VERSION > 17 ++ char wanAddress[64]; ++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof(wanAddress)); ++#else + result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); ++#endif + freeUPNPDevlist(deviceList); + if (result > 0) { + if (result == 1) { diff --git a/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch b/net-p2p/monero/files/monero-0.18.3.3-unbundle-dependencies.patch similarity index 75% rename from net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch rename to net-p2p/monero/files/monero-0.18.3.3-unbundle-dependencies.patch index ea7f804..6cd7e7c 100644 --- a/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch +++ b/net-p2p/monero/files/monero-0.18.3.3-unbundle-dependencies.patch @@ -1,8 +1,6 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 41f82e26c..3eb2b2e78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -312,7 +312,7 @@ endif() +@@ -458,7 +458,7 @@ # elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*") # set(BSDI TRUE) @@ -10,8 +8,8 @@ index 41f82e26c..3eb2b2e78 100644 +include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external ) if(APPLE) - include_directories(SYSTEM /usr/include/malloc) -@@ -995,7 +995,6 @@ if(SODIUM_LIBRARY) + cmake_policy(SET CMP0042 NEW) +@@ -1201,7 +1201,6 @@ set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}") endif() @@ -19,17 +17,17 @@ index 41f82e26c..3eb2b2e78 100644 add_subdirectory(contrib) add_subdirectory(src) -diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt -index a8916a7d0..05ab35c82 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt -@@ -37,19 +37,7 @@ +@@ -37,21 +37,7 @@ find_package(Miniupnpc REQUIRED) -message(STATUS "Using in-tree miniupnpc") +-set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE) -add_subdirectory(miniupnp/miniupnpc) -set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") +-set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON) -if(MSVC) - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267") -elseif(NOT MSVC) @@ -44,16 +42,14 @@ index a8916a7d0..05ab35c82 100644 find_package(Unbound) -@@ -81,4 +69,3 @@ endif() +@@ -69,4 +55,3 @@ add_subdirectory(db_drivers) add_subdirectory(easylogging++) add_subdirectory(qrcodegen) -add_subdirectory(randomx EXCLUDE_FROM_ALL) -diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt -index 3b33fe90a..ba354a0e8 100644 --- a/src/crypto/CMakeLists.txt +++ b/src/crypto/CMakeLists.txt -@@ -55,6 +55,7 @@ list(APPEND crypto_sources CryptonightR_template.S) +@@ -55,6 +55,7 @@ endif() include_directories(${RANDOMX_INCLUDE}) @@ -61,18 +57,16 @@ index 3b33fe90a..ba354a0e8 100644 set(crypto_headers) -@@ -116,6 +117,3 @@ endif() - +@@ -97,6 +98,3 @@ # cheat because cmake and ccache hate each other set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE C) + set_property(SOURCE CryptonightR_template.S PROPERTY XCODE_EXPLICIT_FILE_TYPE sourcecode.asm) - -# Must be done last, because it references libraries in this directory -add_subdirectory(wallet) -diff --git a/src/crypto/wallet/crypto.h b/src/crypto/wallet/crypto.h -index a4c5d5a07..5c6b96cd8 100644 --- a/src/crypto/wallet/crypto.h +++ b/src/crypto/wallet/crypto.h -@@ -29,7 +29,6 @@ +@@ -30,7 +30,6 @@ #pragma once #include @@ -80,21 +74,17 @@ index a4c5d5a07..5c6b96cd8 100644 namespace crypto { namespace wallet { -diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt -index ff2afba4b..26b0f4523 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt -@@ -72,7 +72,7 @@ target_link_libraries(device - ${HIDAPI_LIBRARIES} +@@ -73,7 +73,7 @@ cncrypto + cryptonote_format_utils_basic ringct_basic - wallet-crypto + monero-crypto ${OPENSSL_CRYPTO_LIBRARIES} ${Boost_SERIALIZATION_LIBRARY} PRIVATE -diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl -index 65db2615c..3ace310f6 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -60,9 +60,9 @@ diff --git a/net-p2p/monero/files/monero-0.18.3.4-boost-1.85.patch b/net-p2p/monero/files/monero-0.18.3.4-boost-1.85.patch new file mode 100644 index 0000000..1e4793b --- /dev/null +++ b/net-p2p/monero/files/monero-0.18.3.4-boost-1.85.patch @@ -0,0 +1,585 @@ +From 65568d3a884857ce08d1170f5801a6891a5c187c Mon Sep 17 00:00:00 2001 +From: jeffro256 +Date: Fri, 23 Aug 2024 12:15:17 -0500 +Subject: [PATCH] build: fix build with Boost 1.85 and remove instances of + viewkey logging [RELEASE] + +1. Use std::is_standard_layout and std::is_trivially_copyable instead of std::is_pod for KV byte-wise serialization, which fixes compile issue for Boost UUIDs +2. Removed reimplementation of std::hash for boost::uuids::uuid +3. Removed << operator overload for crypto::secret_key +4. Removed instances in code where private view key was dumped to the log in plaintext + +Release version of #9450, containing C++14 modified assertions +--- + CMakeLists.txt | 2 ++ + .../serialization/keyvalue_serialization.h | 18 ++++++++------- + contrib/epee/include/span.h | 23 +++++++++++-------- + contrib/epee/include/string_tools.h | 3 +++ + src/crypto/crypto.h | 14 ++++++++--- + .../cryptonote_format_utils.cpp | 4 ++-- + src/cryptonote_core/cryptonote_tx_utils.cpp | 4 ++-- + src/cryptonote_protocol/block_queue.cpp | 13 ++--------- + src/device/device_default.cpp | 8 ++++--- + src/lmdb/util.h | 4 ++-- + src/simplewallet/simplewallet.cpp | 6 ++--- + src/wallet/api/wallet.cpp | 8 +++---- + src/wallet/wallet2.cpp | 18 +++++++-------- + src/wallet/wallet_rpc_server.cpp | 4 ++-- + tests/benchmark.cpp | 2 +- + tests/core_tests/multisig.cpp | 10 ++++---- + tests/functional_tests/make_test_signature.cc | 2 +- + tests/unit_tests/crypto.cpp | 2 +- + tests/unit_tests/multisig.cpp | 2 +- + tests/unit_tests/serialization.cpp | 2 +- + 20 files changed, 80 insertions(+), 69 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8fb03ba1ff..7b77c37393 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1077,6 +1077,8 @@ if(STATIC) + endif() + find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options locale) + add_definitions(-DBOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION) ++add_definitions(-DBOOST_NO_AUTO_PTR) ++add_definitions(-DBOOST_UUID_DISABLE_ALIGNMENT) # This restores UUID's std::has_unique_object_representations property + + set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES}) + if(NOT Boost_FOUND) +diff --git a/contrib/epee/include/serialization/keyvalue_serialization.h b/contrib/epee/include/serialization/keyvalue_serialization.h +index 06d74329f1..fbbddc7d2f 100644 +--- a/contrib/epee/include/serialization/keyvalue_serialization.h ++++ b/contrib/epee/include/serialization/keyvalue_serialization.h +@@ -98,16 +98,18 @@ public: \ + #define KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(varialble, val_name) \ + epee::serialization::selector::serialize_t_val_as_blob(this_ref.varialble, stg, hparent_section, val_name); + +-#define KV_SERIALIZE_VAL_POD_AS_BLOB_N(varialble, val_name) \ +- static_assert(std::is_pod::value, "t_type must be a POD type."); \ +- KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(varialble, val_name) ++#define KV_SERIALIZE_VAL_POD_AS_BLOB_N(variable, val_name) \ ++ static_assert(std::is_trivially_copyable(), "t_type must be a trivially copyable type."); \ ++ static_assert(std::is_standard_layout(), "t_type must be a standard layout type."); \ ++ KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(variable, val_name) + +-#define KV_SERIALIZE_VAL_POD_AS_BLOB_OPT_N(varialble, val_name, default_value) \ ++#define KV_SERIALIZE_VAL_POD_AS_BLOB_OPT_N(variable, val_name, default_value) \ + do { \ +- static_assert(std::is_pod::value, "t_type must be a POD type."); \ +- bool ret = KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(varialble, val_name); \ ++ static_assert(std::is_trivially_copyable(), "t_type must be a trivially copyable type."); \ ++ static_assert(std::is_standard_layout(), "t_type must be a standard layout type."); \ ++ bool ret = KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(variable, val_name) \ + if (!ret) \ +- epee::serialize_default(this_ref.varialble, default_value); \ ++ epee::serialize_default(this_ref.variable, default_value); \ + } while(0); + + #define KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(varialble, val_name) \ +@@ -118,7 +120,7 @@ public: \ + #define KV_SERIALIZE(varialble) KV_SERIALIZE_N(varialble, #varialble) + #define KV_SERIALIZE_VAL_POD_AS_BLOB(varialble) KV_SERIALIZE_VAL_POD_AS_BLOB_N(varialble, #varialble) + #define KV_SERIALIZE_VAL_POD_AS_BLOB_OPT(varialble, def) KV_SERIALIZE_VAL_POD_AS_BLOB_OPT_N(varialble, #varialble, def) +-#define KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(varialble) KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(varialble, #varialble) //skip is_pod compile time check ++#define KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(varialble) KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(varialble, #varialble) //skip is_trivially_copyable and is_standard_layout compile time check + #define KV_SERIALIZE_CONTAINER_POD_AS_BLOB(varialble) KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(varialble, #varialble) + #define KV_SERIALIZE_OPT(variable,default_value) KV_SERIALIZE_OPT_N(variable, #variable, default_value) + +diff --git a/contrib/epee/include/span.h b/contrib/epee/include/span.h +index 23bd51f8c2..01dc387d6d 100644 +--- a/contrib/epee/include/span.h ++++ b/contrib/epee/include/span.h +@@ -133,17 +133,14 @@ namespace epee + return {src.data(), src.size()}; + } + +- template +- constexpr bool has_padding() noexcept +- { +- return !std::is_standard_layout() || alignof(T) != 1; +- } +- + //! \return Cast data from `src` as `span`. + template + span to_byte_span(const span src) noexcept + { +- static_assert(!has_padding(), "source type may have padding"); ++ static_assert(!std::is_empty(), "empty value types will not work -> sizeof == 1"); ++ static_assert(std::is_standard_layout(), "type must have standard layout"); ++ static_assert(std::is_trivially_copyable(), "type must be trivially copyable"); ++ static_assert(alignof(T) == 1, "type may have padding"); + return {reinterpret_cast(src.data()), src.size_bytes()}; + } + +@@ -153,7 +150,9 @@ namespace epee + { + using value_type = typename T::value_type; + static_assert(!std::is_empty(), "empty value types will not work -> sizeof == 1"); +- static_assert(!has_padding(), "source value type may have padding"); ++ static_assert(std::is_standard_layout(), "value type must have standard layout"); ++ static_assert(std::is_trivially_copyable(), "value type must be trivially copyable"); ++ static_assert(alignof(value_type) == 1, "value type may have padding"); + return {reinterpret_cast(src.data()), src.size() * sizeof(value_type)}; + } + +@@ -162,7 +161,9 @@ namespace epee + span as_byte_span(const T& src) noexcept + { + static_assert(!std::is_empty(), "empty types will not work -> sizeof == 1"); +- static_assert(!has_padding(), "source type may have padding"); ++ static_assert(std::is_standard_layout(), "type must have standard layout"); ++ static_assert(std::is_trivially_copyable(), "type must be trivially copyable"); ++ static_assert(alignof(T) == 1, "type may have padding"); + return {reinterpret_cast(std::addressof(src)), sizeof(T)}; + } + +@@ -171,7 +172,9 @@ namespace epee + span as_mut_byte_span(T& src) noexcept + { + static_assert(!std::is_empty(), "empty types will not work -> sizeof == 1"); +- static_assert(!has_padding(), "source type may have padding"); ++ static_assert(std::is_standard_layout(), "type must have standard layout"); ++ static_assert(std::is_trivially_copyable(), "type must be trivially copyable"); ++ static_assert(alignof(T) == 1, "type may have padding"); + return {reinterpret_cast(std::addressof(src)), sizeof(T)}; + } + +diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h +index 31c55b97ba..7de73cbf5a 100644 +--- a/contrib/epee/include/string_tools.h ++++ b/contrib/epee/include/string_tools.h +@@ -91,6 +91,7 @@ namespace string_tools + std::string pod_to_hex(const t_pod_type& s) + { + static_assert(std::is_standard_layout(), "expected standard layout type"); ++ static_assert(alignof(t_pod_type) == 1, "type may have padding"); + return to_hex::string(as_byte_span(s)); + } + //---------------------------------------------------------------------------- +@@ -98,6 +99,8 @@ namespace string_tools + bool hex_to_pod(const boost::string_ref hex_str, t_pod_type& s) + { + static_assert(std::is_standard_layout(), "expected standard layout type"); ++ static_assert(alignof(t_pod_type) == 1, "type may have padding"); ++ static_assert(std::is_trivially_copyable(), "type must be trivially copyable"); + return from_hex::to_buffer(as_mut_byte_span(s), hex_str); + } + //---------------------------------------------------------------------------- +diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h +index d8cd6c6a01..ee1cac04a6 100644 +--- a/src/crypto/crypto.h ++++ b/src/crypto/crypto.h +@@ -171,7 +171,9 @@ namespace crypto { + /* Generate a value filled with random bytes. + */ + template +- typename std::enable_if::value, T>::type rand() { ++ T rand() { ++ static_assert(std::is_standard_layout(), "cannot write random bytes into non-standard layout type"); ++ static_assert(std::is_trivially_copyable(), "cannot write random bytes into non-trivially copyable type"); + typename std::remove_cv::type res; + generate_random_bytes_thread_safe(sizeof(T), (uint8_t*)&res); + return res; +@@ -314,8 +316,14 @@ namespace crypto { + inline std::ostream &operator <<(std::ostream &o, const crypto::public_key &v) { + epee::to_hex::formatted(o, epee::as_byte_span(v)); return o; + } +- inline std::ostream &operator <<(std::ostream &o, const crypto::secret_key &v) { +- epee::to_hex::formatted(o, epee::as_byte_span(v)); return o; ++ /* Do NOT overload the << operator for crypto::secret_key here. Use secret_key_explicit_print_ref ++ * instead to prevent accidental implicit dumping of secret key material to the logs (which has ++ * happened before). For the same reason, do not overload it for crypto::ec_scalar either since ++ * crypto::secret_key is a subclass. I'm not sorry that it's obtuse; that's the point, bozo. ++ */ ++ struct secret_key_explicit_print_ref { const crypto::secret_key &sk; }; ++ inline std::ostream &operator <<(std::ostream &o, const secret_key_explicit_print_ref v) { ++ epee::to_hex::formatted(o, epee::as_byte_span(unwrap(unwrap(v.sk)))); return o; + } + inline std::ostream &operator <<(std::ostream &o, const crypto::key_derivation &v) { + epee::to_hex::formatted(o, epee::as_byte_span(v)); return o; +diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp +index 8be23583b5..e6e424c719 100644 +--- a/src/cryptonote_basic/cryptonote_format_utils.cpp ++++ b/src/cryptonote_basic/cryptonote_format_utils.cpp +@@ -292,7 +292,7 @@ namespace cryptonote + bool r = hwdev.generate_key_derivation(tx_public_key, ack.m_view_secret_key, recv_derivation); + if (!r) + { +- MWARNING("key image helper: failed to generate_key_derivation(" << tx_public_key << ", " << ack.m_view_secret_key << ")"); ++ MWARNING("key image helper: failed to generate_key_derivation(" << tx_public_key << ", )"); + memcpy(&recv_derivation, rct::identity().bytes, sizeof(recv_derivation)); + } + +@@ -303,7 +303,7 @@ namespace cryptonote + r = hwdev.generate_key_derivation(additional_tx_public_keys[i], ack.m_view_secret_key, additional_recv_derivation); + if (!r) + { +- MWARNING("key image helper: failed to generate_key_derivation(" << additional_tx_public_keys[i] << ", " << ack.m_view_secret_key << ")"); ++ MWARNING("key image helper: failed to generate_key_derivation(" << additional_tx_public_keys[i] << ", )"); + } + else + { +diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp +index dc9d6612f6..8f044154b1 100644 +--- a/src/cryptonote_core/cryptonote_tx_utils.cpp ++++ b/src/cryptonote_core/cryptonote_tx_utils.cpp +@@ -144,7 +144,7 @@ namespace cryptonote + crypto::key_derivation derivation = AUTO_VAL_INIT(derivation); + crypto::public_key out_eph_public_key = AUTO_VAL_INIT(out_eph_public_key); + bool r = crypto::generate_key_derivation(miner_address.m_view_public_key, txkey.sec, derivation); +- CHECK_AND_ASSERT_MES(r, false, "while creating outs: failed to generate_key_derivation(" << miner_address.m_view_public_key << ", " << txkey.sec << ")"); ++ CHECK_AND_ASSERT_MES(r, false, "while creating outs: failed to generate_key_derivation(" << miner_address.m_view_public_key << ", " << crypto::secret_key_explicit_print_ref{txkey.sec} << ")"); + + r = crypto::derive_public_key(derivation, no, miner_address.m_spend_public_key, out_eph_public_key); + CHECK_AND_ASSERT_MES(r, false, "while creating outs: failed to derive_public_key(" << derivation << ", " << no << ", "<< miner_address.m_spend_public_key << ")"); +@@ -484,7 +484,7 @@ namespace cryptonote + crypto::generate_ring_signature(tx_prefix_hash, boost::get(tx.vin[i]).k_image, keys_ptrs, in_contexts[i].in_ephemeral.sec, src_entr.real_output, sigs.data()); + ss_ring_s << "signatures:" << ENDL; + std::for_each(sigs.begin(), sigs.end(), [&](const crypto::signature& s){ss_ring_s << s << ENDL;}); +- ss_ring_s << "prefix_hash:" << tx_prefix_hash << ENDL << "in_ephemeral_key: " << in_contexts[i].in_ephemeral.sec << ENDL << "real_output: " << src_entr.real_output << ENDL; ++ ss_ring_s << "prefix_hash:" << tx_prefix_hash << ENDL << "in_ephemeral_key: " << crypto::secret_key_explicit_print_ref{in_contexts[i].in_ephemeral.sec} << ENDL << "real_output: " << src_entr.real_output << ENDL; + i++; + } + +diff --git a/src/cryptonote_protocol/block_queue.cpp b/src/cryptonote_protocol/block_queue.cpp +index 4e65eafa4f..e5a4c0c99a 100644 +--- a/src/cryptonote_protocol/block_queue.cpp ++++ b/src/cryptonote_protocol/block_queue.cpp +@@ -40,15 +40,6 @@ + #undef MONERO_DEFAULT_LOG_CATEGORY + #define MONERO_DEFAULT_LOG_CATEGORY "cn.block_queue" + +-namespace std { +- static_assert(sizeof(size_t) <= sizeof(boost::uuids::uuid), "boost::uuids::uuid too small"); +- template<> struct hash { +- std::size_t operator()(const boost::uuids::uuid &_v) const { +- return reinterpret_cast(_v); +- } +- }; +-} +- + namespace cryptonote + { + +@@ -472,7 +463,7 @@ bool block_queue::has_spans(const boost::uuids::uuid &connection_id) const + float block_queue::get_speed(const boost::uuids::uuid &connection_id) const + { + boost::unique_lock lock(mutex); +- std::unordered_map speeds; ++ std::unordered_map> speeds; + for (const auto &span: blocks) + { + if (span.blocks.empty()) +@@ -480,7 +471,7 @@ float block_queue::get_speed(const boost::uuids::uuid &connection_id) const + // note that the average below does not average over the whole set, but over the + // previous pseudo average and the latest rate: this gives much more importance + // to the latest measurements, which is fine here +- std::unordered_map::iterator i = speeds.find(span.connection_id); ++ const auto i = speeds.find(span.connection_id); + if (i == speeds.end()) + speeds.insert(std::make_pair(span.connection_id, span.rate)); + else +diff --git a/src/device/device_default.cpp b/src/device/device_default.cpp +index d70ece229c..c770a6e221 100644 +--- a/src/device/device_default.cpp ++++ b/src/device/device_default.cpp +@@ -317,13 +317,15 @@ namespace hw { + { + // sending change to yourself; derivation = a*R + r = generate_key_derivation(txkey_pub, sender_account_keys.m_view_secret_key, derivation); +- CHECK_AND_ASSERT_MES(r, false, "at creation outs: failed to generate_key_derivation(" << txkey_pub << ", " << sender_account_keys.m_view_secret_key << ")"); ++ CHECK_AND_ASSERT_MES(r, false, "at creation outs: failed to generate_key_derivation(" << txkey_pub << ", )"); + } + else + { + // sending to the recipient; derivation = r*A (or s*C in the subaddress scheme) +- r = generate_key_derivation(dst_entr.addr.m_view_public_key, dst_entr.is_subaddress && need_additional_txkeys ? additional_txkey.sec : tx_key, derivation); +- CHECK_AND_ASSERT_MES(r, false, "at creation outs: failed to generate_key_derivation(" << dst_entr.addr.m_view_public_key << ", " << (dst_entr.is_subaddress && need_additional_txkeys ? additional_txkey.sec : tx_key) << ")"); ++ const crypto::secret_key &tx_privkey{dst_entr.is_subaddress && need_additional_txkeys ? additional_txkey.sec : tx_key}; ++ r = generate_key_derivation(dst_entr.addr.m_view_public_key, tx_privkey, derivation); ++ CHECK_AND_ASSERT_MES(r, false, "at creation outs: failed to generate_key_derivation(" ++ << dst_entr.addr.m_view_public_key << ", " << crypto::secret_key_explicit_print_ref{tx_privkey} << ")"); + } + + if (need_additional_txkeys) +diff --git a/src/lmdb/util.h b/src/lmdb/util.h +index c6c75bc004..392ff20390 100644 +--- a/src/lmdb/util.h ++++ b/src/lmdb/util.h +@@ -127,7 +127,7 @@ namespace lmdb + /*! + A LMDB comparison function that uses `std::memcmp`. + +- \toaram T is `!epee::has_padding` ++ \toaram T has standard layout and an alignment of 1 + \tparam offset to `T` within the value. + + \return The result of `std::memcmp` over the value. +@@ -135,7 +135,7 @@ namespace lmdb + template + inline int compare(MDB_val const* left, MDB_val const* right) noexcept + { +- static_assert(!epee::has_padding(), "memcmp will not work"); ++ static_assert(std::is_standard_layout() && alignof(T) == 1, "memcmp will not work"); + if (!left || !right || left->mv_size < sizeof(T) + offset || right->mv_size < sizeof(T) + offset) + { + assert("invalid use of custom comparison" == 0); +diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp +index b9e30f9d94..011b1c7613 100644 +--- a/src/simplewallet/simplewallet.cpp ++++ b/src/simplewallet/simplewallet.cpp +@@ -1979,7 +1979,7 @@ bool simple_wallet::rpc_payment_info(const std::vector &args) + crypto::public_key pkey; + crypto::secret_key_to_public_key(m_wallet->get_rpc_client_secret_key(), pkey); + message_writer() << tr("RPC client ID: ") << pkey; +- message_writer() << tr("RPC client secret key: ") << m_wallet->get_rpc_client_secret_key(); ++ message_writer() << tr("RPC client secret key: ") << crypto::secret_key_explicit_print_ref{m_wallet->get_rpc_client_secret_key()}; + if (!m_wallet->get_rpc_payment_info(false, payment_required, credits, diff, credits_per_hash_found, hashing_blob, height, seed_height, seed_hash, next_seed_hash, cookie)) + { + fail_msg_writer() << tr("Failed to query daemon"); +@@ -8026,9 +8026,9 @@ bool simple_wallet::submit_transfer(const std::vector &args_) + std::string get_tx_key_stream(crypto::secret_key tx_key, std::vector additional_tx_keys) + { + ostringstream oss; +- oss << epee::string_tools::pod_to_hex(tx_key); ++ oss << epee::string_tools::pod_to_hex(unwrap(unwrap(tx_key))); + for (size_t i = 0; i < additional_tx_keys.size(); ++i) +- oss << epee::string_tools::pod_to_hex(additional_tx_keys[i]); ++ oss << epee::string_tools::pod_to_hex(unwrap(unwrap(additional_tx_keys[i]))); + return oss.str(); + } + +diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp +index fc4f891281..2ed14bfbd5 100644 +--- a/src/wallet/api/wallet.cpp ++++ b/src/wallet/api/wallet.cpp +@@ -881,7 +881,7 @@ std::string WalletImpl::integratedAddress(const std::string &payment_id) const + + std::string WalletImpl::secretViewKey() const + { +- return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_view_secret_key); ++ return epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().m_view_secret_key))); + } + + std::string WalletImpl::publicViewKey() const +@@ -891,7 +891,7 @@ std::string WalletImpl::publicViewKey() const + + std::string WalletImpl::secretSpendKey() const + { +- return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().m_spend_secret_key); ++ return epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().m_spend_secret_key))); + } + + std::string WalletImpl::publicSpendKey() const +@@ -1878,9 +1878,9 @@ std::string WalletImpl::getTxKey(const std::string &txid_str) const + { + clearStatus(); + std::ostringstream oss; +- oss << epee::string_tools::pod_to_hex(tx_key); ++ oss << epee::string_tools::pod_to_hex(unwrap(unwrap(tx_key))); + for (size_t i = 0; i < additional_tx_keys.size(); ++i) +- oss << epee::string_tools::pod_to_hex(additional_tx_keys[i]); ++ oss << epee::string_tools::pod_to_hex(unwrap(unwrap(additional_tx_keys[i]))); + return oss.str(); + } + else +diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp +index ad8c361909..90b5731695 100644 +--- a/src/wallet/wallet2.cpp ++++ b/src/wallet/wallet2.cpp +@@ -4613,7 +4613,7 @@ boost::optional wallet2::get_keys_file_data(const epee: + original_address = get_account_address_as_str(m_nettype, false, m_original_address); + value.SetString(original_address.c_str(), original_address.length()); + json.AddMember("original_address", value, json.GetAllocator()); +- original_view_secret_key = epee::string_tools::pod_to_hex(m_original_view_secret_key); ++ original_view_secret_key = epee::string_tools::pod_to_hex(unwrap(unwrap(m_original_view_secret_key))); + value.SetString(original_view_secret_key.c_str(), original_view_secret_key.length()); + json.AddMember("original_view_secret_key", value, json.GetAllocator()); + } +@@ -7077,7 +7077,7 @@ void wallet2::commit_tx(pending_tx& ptx) + cryptonote::COMMAND_RPC_SUBMIT_RAW_TX::request oreq; + cryptonote::COMMAND_RPC_SUBMIT_RAW_TX::response ores; + oreq.address = get_account().get_public_address_str(m_nettype); +- oreq.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); ++ oreq.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); + oreq.tx = epee::string_tools::buff_to_hex_nodelimer(tx_to_blob(ptx.tx)); + { + const boost::lock_guard lock{m_daemon_rpc_mutex}; +@@ -10075,7 +10075,7 @@ bool wallet2::light_wallet_login(bool &new_address) + tools::COMMAND_RPC_LOGIN::request request; + tools::COMMAND_RPC_LOGIN::response response; + request.address = get_account().get_public_address_str(m_nettype); +- request.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); ++ request.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); + // Always create account if it doesn't exist. + request.create_account = true; + m_daemon_rpc_mutex.lock(); +@@ -10102,7 +10102,7 @@ bool wallet2::light_wallet_import_wallet_request(tools::COMMAND_RPC_IMPORT_WALLE + MDEBUG("Light wallet import wallet request"); + tools::COMMAND_RPC_IMPORT_WALLET_REQUEST::request oreq; + oreq.address = get_account().get_public_address_str(m_nettype); +- oreq.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); ++ oreq.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); + m_daemon_rpc_mutex.lock(); + bool r = invoke_http_json("/import_wallet_request", oreq, response, rpc_timeout, "POST"); + m_daemon_rpc_mutex.unlock(); +@@ -10121,7 +10121,7 @@ void wallet2::light_wallet_get_unspent_outs() + + oreq.amount = "0"; + oreq.address = get_account().get_public_address_str(m_nettype); +- oreq.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); ++ oreq.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); + // openMonero specific + oreq.dust_threshold = boost::lexical_cast(::config::DEFAULT_DUST_THRESHOLD); + // below are required by openMonero api - but are not used. +@@ -10273,7 +10273,7 @@ bool wallet2::light_wallet_get_address_info(tools::COMMAND_RPC_GET_ADDRESS_INFO: + tools::COMMAND_RPC_GET_ADDRESS_INFO::request request; + + request.address = get_account().get_public_address_str(m_nettype); +- request.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); ++ request.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); + m_daemon_rpc_mutex.lock(); + bool r = invoke_http_json("/get_address_info", request, response, rpc_timeout, "POST"); + m_daemon_rpc_mutex.unlock(); +@@ -10290,7 +10290,7 @@ void wallet2::light_wallet_get_address_txs() + tools::COMMAND_RPC_GET_ADDRESS_TXS::response ires; + + ireq.address = get_account().get_public_address_str(m_nettype); +- ireq.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); ++ ireq.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); + m_daemon_rpc_mutex.lock(); + bool r = invoke_http_json("/get_address_txs", ireq, ires, rpc_timeout, "POST"); + m_daemon_rpc_mutex.unlock(); +@@ -10520,7 +10520,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image, + const account_keys& ack = get_account().get_keys(); + crypto::key_derivation derivation; + bool r = crypto::generate_key_derivation(tx_public_key, ack.m_view_secret_key, derivation); +- CHECK_AND_ASSERT_MES(r, false, "failed to generate_key_derivation(" << tx_public_key << ", " << ack.m_view_secret_key << ")"); ++ CHECK_AND_ASSERT_MES(r, false, "failed to generate_key_derivation(" << tx_public_key << ", " << crypto::secret_key_explicit_print_ref{ack.m_view_secret_key} << ")"); + + r = crypto::derive_public_key(derivation, out_index, ack.m_account_address.m_spend_public_key, in_ephemeral.pub); + CHECK_AND_ASSERT_MES(r, false, "failed to derive_public_key (" << derivation << ", " << out_index << ", " << ack.m_account_address.m_spend_public_key << ")"); +@@ -10528,7 +10528,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image, + crypto::derive_secret_key(derivation, out_index, ack.m_spend_secret_key, in_ephemeral.sec); + crypto::public_key out_pkey_test; + r = crypto::secret_key_to_public_key(in_ephemeral.sec, out_pkey_test); +- CHECK_AND_ASSERT_MES(r, false, "failed to secret_key_to_public_key(" << in_ephemeral.sec << ")"); ++ CHECK_AND_ASSERT_MES(r, false, "failed to secret_key_to_public_key(" << crypto::secret_key_explicit_print_ref{in_ephemeral.sec} << ")"); + CHECK_AND_ASSERT_MES(in_ephemeral.pub == out_pkey_test, false, "derived secret key doesn't match derived public key"); + + crypto::generate_key_image(in_ephemeral.pub, in_ephemeral.sec, calculated_key_image); +diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp +index b1419949f8..3c548de135 100644 +--- a/src/wallet/wallet_rpc_server.cpp ++++ b/src/wallet/wallet_rpc_server.cpp +@@ -1247,9 +1247,9 @@ namespace tools + res.tx_hash_list.push_back(epee::string_tools::pod_to_hex(cryptonote::get_transaction_hash(ptx.tx))); + if (req.get_tx_keys) + { +- res.tx_key_list.push_back(epee::string_tools::pod_to_hex(ptx.tx_key)); ++ res.tx_key_list.push_back(epee::string_tools::pod_to_hex(unwrap(unwrap(ptx.tx_key)))); + for (const crypto::secret_key& additional_tx_key : ptx.additional_tx_keys) +- res.tx_key_list.back() += epee::string_tools::pod_to_hex(additional_tx_key); ++ res.tx_key_list.back() += epee::string_tools::pod_to_hex(unwrap(unwrap(additional_tx_key))); + } + } + +diff --git a/tests/benchmark.cpp b/tests/benchmark.cpp +index 6a845d61a4..660783dd91 100644 +--- a/tests/benchmark.cpp ++++ b/tests/benchmark.cpp +@@ -109,7 +109,7 @@ namespace + template + bool compare(const T& lhs, const T& rhs) noexcept + { +- static_assert(!epee::has_padding(), "type might have padding"); ++ static_assert(std::is_standard_layout() && alignof(T) == 1, "type might have padding"); + return std::memcmp(std::addressof(lhs), std::addressof(rhs), sizeof(T)) == 0; + } + +diff --git a/tests/core_tests/multisig.cpp b/tests/core_tests/multisig.cpp +index 966c761163..1d3a6a3a10 100644 +--- a/tests/core_tests/multisig.cpp ++++ b/tests/core_tests/multisig.cpp +@@ -227,13 +227,13 @@ bool gen_multisig_tx_validation_base::generate_with(std::vector()); + EXPECT_TRUE(is_formatted()); + EXPECT_TRUE(is_formatted()); +- EXPECT_TRUE(is_formatted()); + EXPECT_TRUE(is_formatted()); + EXPECT_TRUE(is_formatted()); + EXPECT_TRUE(is_formatted()); ++ EXPECT_TRUE(is_formatted()); + } + + TEST(Crypto, null_keys) +diff --git a/tests/unit_tests/multisig.cpp b/tests/unit_tests/multisig.cpp +index 3b3c4197c0..71416aaf33 100644 +--- a/tests/unit_tests/multisig.cpp ++++ b/tests/unit_tests/multisig.cpp +@@ -80,7 +80,7 @@ static void make_wallet(unsigned int idx, tools::wallet2 &wallet) + wallet.generate("", "", spendkey, true, false); + ASSERT_TRUE(test_addresses[idx].address == wallet.get_account().get_public_address_str(cryptonote::TESTNET)); + wallet.decrypt_keys(""); +- ASSERT_TRUE(test_addresses[idx].spendkey == epee::string_tools::pod_to_hex(wallet.get_account().get_keys().m_spend_secret_key)); ++ ASSERT_TRUE(test_addresses[idx].spendkey == epee::string_tools::pod_to_hex(unwrap(unwrap(wallet.get_account().get_keys().m_spend_secret_key)))); + wallet.encrypt_keys(""); + } + catch (const std::exception &e) +diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp +index 0fdd832856..fdf6032722 100644 +--- a/tests/unit_tests/serialization.cpp ++++ b/tests/unit_tests/serialization.cpp +@@ -1103,7 +1103,7 @@ TEST(Serialization, portability_signed_tx) + ASSERT_TRUE(ptx.selected_transfers.front() == 2); + // ptx.{key_images, tx_key} + ASSERT_TRUE(ptx.key_images == "<6c3cd6af97c4070a7aef9b1344e7463e29c7cd245076fdb65da447a34da3ca76> "); +- ASSERT_TRUE(epee::string_tools::pod_to_hex(ptx.tx_key) == "0100000000000000000000000000000000000000000000000000000000000000"); ++ ASSERT_TRUE(epee::string_tools::pod_to_hex(unwrap(unwrap(ptx.tx_key))) == "0100000000000000000000000000000000000000000000000000000000000000"); + // ptx.dests + ASSERT_TRUE(ptx.dests.size() == 1); + ASSERT_TRUE(ptx.dests[0].amount == 1400000000000); diff --git a/net-p2p/monero/files/monerod.conf b/net-p2p/monero/files/monerod.conf index d019576..a431e3a 100644 --- a/net-p2p/monero/files/monerod.conf +++ b/net-p2p/monero/files/monerod.conf @@ -4,5 +4,161 @@ # See 'monerod --help' for all available options. data-dir=/var/lib/monero -log-file=/var/log/monero/monero.log -log-level=0 +#prune-blockchain=1 + +## for p2pool +zmq-pub=tcp://:18083 +zmq-rpc-bind-ip= + +## p2p settings +p2p-bind-ip=0.0.0.0 # Interface for p2p network protocol (IPv4) +p2p-bind-port=18080 # Port for p2p network protocol (IPv4) +p2p-external-port=18080 # External port for p2p network protocol (if port forwarding used with NAT) +p2p-bind-ipv6-address=:: # Interface for p2p network protocol (IPv6) +p2p-bind-port-ipv6=18080 # Port for p2p network protocol (IPv6) +p2p-use-ipv6=1 # Enable IPv6 for p2p +public-node=1 # Advertises the RPC-restricted port over p2p peer lists + +## rpc settings +rpc-bind-ip= # Specify IP to bind RPC server +rpc-bind-port=18081 # Port for RPC server +rpc-restricted-bind-ip=0.0.0.0 # Specify IP to bind restricted RPC server +rpc-restricted-bind-port=18089 # Port for restricted RPC server +rpc-bind-ipv6-address= # Specify IPv6 address to bind RPC server +rpc-restricted-bind-ipv6-address=:: # Specify IPv6 address to bind restricted RPC server +rpc-use-ipv6=1 # Allow IPv6 for RPC +confirm-external-bind=1 # Confirm rpc-bind-ip value when NOT a loopback IP + +## logging +log-file=/dev/null # See /etc/conf.d/monerod for details +#log-level=0,stacktrace:FATAL # Specify log level (& only log fatal stacktraces) +max-log-file-size=104857600 # Specify maximum log file size [B] (100M) +max-log-files=5 # Specify maximum log file count + +## misc +max-concurrency=2 # Specify nproc threads for a parallel jobs +prep-blocks-threads=2 # Max number of threads to use preparing block hashes +fast-block-sync=1 # Sync up most of the way by using embedded, known block hashes. +no-igd=1 # Disable UPnP port mapping + +## from the p2pool page +add-priority-node=nodes.hashvault.pro:18080 +add-priority-node=p2pmd.xmrvsbeast.com:18080 +disable-dns-checkpoints=1 +enable-dns-blocklist=1 +out-peers=32 +in-peers=64 + +limit-rate-up=4096 # set limit-rate-up [kB/s] +limit-rate-down=12288 # set limit-rate-down [kB/s] + + + +#All Settings: +# --log-file arg Specify log file +# --log-level arg +# --max-log-file-size arg (=104850000) Specify maximum log file size [B] +# --max-log-files arg (=50) Specify maximum number of rotated log files to be saved (no limit by setting to 0) +# --max-concurrency arg (=0) Max number of threads to use for a parallel job +# --public-node Allow other users to use the node as a remote (restricted RPC mode, view-only commands) and advertise it over P2P +# --zmq-rpc-bind-ip arg (=127.0.0.1) IP for ZMQ RPC server to listen on +# --zmq-rpc-bind-port arg Port for ZMQ RPC server to listen on +# --zmq-pub arg Address for ZMQ pub - tcp://ip:port or ipc://path +# --no-zmq Disable ZMQ RPC server +# --data-dir arg Specify data directory +# --test-drop-download For net tests: in download, discard ALL blocks instead checking/saving them (very fast) +# --test-drop-download-height arg (=0) Like test-drop-download but discards only after around certain height +# --testnet Run on testnet. The wallet must be launched with --testnet flag. +# --stagenet Run on stagenet. The wallet must be launched with --stagenet flag. +# --regtest Run in a regression testing mode. +# --keep-fakechain Don't delete any existing database when in fakechain mode. +# --fixed-difficulty arg (=0) Fixed difficulty used for testing. +# --enforce-dns-checkpointing checkpoints from DNS server will be enforced +# --prep-blocks-threads arg (=4) Max number of threads to use when preparing block hashes in groups. +# --fast-block-sync arg (=1) Sync up most of the way by using embedded, known block hashes. +# --show-time-stats arg (=0) Show time-stats when processing blocks/txs and disk synchronization. +# --block-sync-size arg (=0) How many blocks to sync at once during chain synchronization (0 = adaptive). +# --check-updates arg (=notify) Check for new versions of monero: [disabled|notify|download|update] +# --fluffy-blocks Relay blocks as fluffy blocks (obsolete, now default) +# --no-fluffy-blocks Relay blocks as normal blocks +# --test-dbg-lock-sleep arg (=0) Sleep time in ms, defaults to 0 (off), used to debug before/after locking mutex. Values 100 to 1000 are good for tests. +# --offline Do not listen for peers, nor connect to any +# --disable-dns-checkpoints Do not retrieve checkpoints from DNS +# --block-download-max-size arg (=0) Set maximum size of block download queue in bytes (0 for default) +# --sync-pruned-blocks Allow syncing from nodes with only pruned blocks +# --max-txpool-weight arg (=648000000) Set maximum txpool weight in bytes. +# --block-notify arg Run a program for each new block, '%s' will be replaced by the block hash +# --prune-blockchain Prune blockchain +# --reorg-notify arg Run a program for each reorg, '%s' will be replaced by the split height, '%h' will be replaced by the new blockchain height, +# '%n' will be replaced by the number of new blocks in the new chain, and '%d' will be replaced by the number of blocks discarded from the old chain +# --block-rate-notify arg Run a program when the block rate undergoes large fluctuations. This might be a sign of large amounts of hash rate going on and off the Monero +# network, and thus be of potential interest in predicting attacks. %t will be replaced by the number of minutes for the observation window, %b by the +# number of blocks observed within that window, and %e by the number of blocks that was expected in that window. It is suggested that this notification is +# used to automatically increase the number of confirmations required before a payment is acted upon. +# --keep-alt-blocks Keep alternative blocks on restart +# --extra-messages-file arg Specify file for extra messages to include into coinbase transactions +# --start-mining arg Specify wallet address to mining for +# --mining-threads arg Specify mining threads count +# --bg-mining-enable enable background mining +# --bg-mining-ignore-battery if true, assumes plugged in when unable to query system power status +# --bg-mining-min-idle-interval arg Specify min lookback interval in seconds for determining idle state +# --bg-mining-idle-threshold arg Specify minimum avg idle percentage over lookback interval +# --bg-mining-miner-target arg Specify maximum percentage cpu use by miner(s) +# --db-sync-mode arg Specify sync option, using format [safe|fast|fastest]:[sync|async]:[[blocks]|[bytes]]. +# --db-salvage Try to salvage a blockchain database if it seems corrupted +# --p2p-bind-ip arg (=0.0.0.0) Interface for p2p network protocol (IPv4) +# --p2p-bind-ipv6-address arg (=::) Interface for p2p network protocol (IPv6) +# --p2p-bind-port arg Port for p2p network protocol (IPv4) +# --p2p-bind-port-ipv6 arg Port for p2p network protocol (IPv6) +# --p2p-use-ipv6 Enable IPv6 for p2p +# --p2p-ignore-ipv4 Ignore unsuccessful IPv4 bind for p2p +# --p2p-external-port arg (=0) External port for p2p network protocol (if port forwarding used with NAT) +# --allow-local-ip Allow local ip add to peer list, mostly in debug purposes +# --add-peer arg Manually add peer to local peerlist +# --add-priority-node arg Specify list of peers to connect to and attempt to keep the connection open +# --add-exclusive-node arg Specify list of peers to connect to only. If this option is given the options add-priority-node and seed-node are ignored +# --seed-node arg Connect to a node to retrieve peer addresses, and disconnect +# --tx-proxy arg Send local txes through proxy: ,[,max_connections][,disable_noise] i.e. "tor,127.0.0.1:9050,100,disable_noise" +# --anonymous-inbound arg ,<[bind-ip:]port>[,max_connections] i.e. "x.onion,127.0.0.1:18083,100" +# --ban-list arg Specify ban list file, one IP address per line +# --hide-my-port Do not announce yourself as peerlist candidate +# --no-sync Don't synchronize the blockchain with other peers +# --enable-dns-blocklist Apply realtime blocklist from DNS +# --no-igd Disable UPnP port mapping +# --igd arg (=delayed) UPnP port mapping (disabled, enabled, delayed) +# --out-peers arg (=-1) set max number of out peers +# --in-peers arg (=-1) set max number of in peers +# --tos-flag arg (=-1) set TOS flag +# --limit-rate-up arg (=2048) set limit-rate-up [kB/s] +# --limit-rate-down arg (=8192) set limit-rate-down [kB/s] +# --limit-rate arg (=-1) set limit-rate [kB/s] +# --pad-transactions Pad relayed transactions to help defend against traffic volume analysis +# --rpc-bind-port arg Port for RPC server +# --rpc-restricted-bind-port arg Port for restricted RPC server +# --restricted-rpc Restrict RPC to view only commands and do not return privacy sensitive data in RPC calls +# --bootstrap-daemon-address arg URL of a 'bootstrap' remote daemon that the connected wallets can use while this daemon is still not fully synced. +# Use 'auto' to enable automatic public nodes discovering and bootstrap daemon switching +# --bootstrap-daemon-login arg Specify username:password for the bootstrap daemon login +# --rpc-bind-ip arg (=127.0.0.1) Specify IP to bind RPC server +# --rpc-bind-ipv6-address arg (=::1) Specify IPv6 address to bind RPC server +# --rpc-restricted-bind-ip arg Specify IP to bind restricted RPC server +# --rpc-restricted-bind-ipv6-address Specify IPv6 address to bind restricted RPC server +# --rpc-use-ipv6 Allow IPv6 for RPC +# --rpc-ignore-ipv4 Ignore unsuccessful IPv4 bind for RPC +# --rpc-login arg Specify username[:password] required for RPC server +# --confirm-external-bind Confirm rpc-bind-ip value is NOT a loopback (local) IP +# --rpc-access-control-origins arg Specify a comma separated list of origins to allow cross origin resource sharing +# --rpc-ssl arg (=autodetect) Enable SSL on RPC connections: enabled|disabled|autodetect +# --rpc-ssl-private-key arg Path to a PEM format private key +# --rpc-ssl-certificate arg Path to a PEM format certificate +# --rpc-ssl-ca-certificates arg Path to file containing concatenated PEM format certificate(s) to replace system CA(s). +# --rpc-ssl-allowed-fingerprints arg List of certificate fingerprints to allow +# --rpc-ssl-allow-chained Allow user (via --rpc-ssl-certificates) chain certificates +# --disable-rpc-ban Do not ban hosts on RPC errors +# --rpc-ssl-allow-any-cert Allow any peer certificate +# --rpc-payment-address arg Restrict RPC to clients sending micropayment to this address +# --rpc-payment-difficulty arg (=1000) Restrict RPC to clients sending micropayment at this difficulty +# --rpc-payment-credits arg (=100) Restrict RPC to clients sending micropayment, yields that many credits per payment +# --rpc-payment-allow-free-loopback Allow free access from the loopback address (ie, the local host) + + diff --git a/net-p2p/monero/files/monerod.confd b/net-p2p/monero/files/monerod.confd index 94515dc..ba747c7 100644 --- a/net-p2p/monero/files/monerod.confd +++ b/net-p2p/monero/files/monerod.confd @@ -1,6 +1,12 @@ # Copyright 2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -monerod_args="--config-file /etc/monero/monerod.conf --non-interactive" + +MONEROD_CONFIG="/etc/monero/monerod.conf" +monerod_args="--config-file ${MONEROD_CONFIG} --non-interactive" monerod_user=monero monerod_group=monero + +## We can use the coloured output from monerod to populate monerod.log and monerod_err.log instead of the default logfile as specified in /etc/monero/monerod.conf +output_log="/var/log/monero/monerod.log" +error_log="/var/log/monero/monerod_err.log" diff --git a/net-p2p/monero/files/monerod.initd b/net-p2p/monero/files/monerod.initd index c94e6ff..ce7796d 100644 --- a/net-p2p/monero/files/monerod.initd +++ b/net-p2p/monero/files/monerod.initd @@ -5,7 +5,10 @@ pidfile=/var/run/monerod.pid command=/usr/bin/monerod command_args="${monerod_args}" -start_stop_daemon_args="-u ${monerod_user} -b -m -p ${pidfile}" +supervisor=supervise-daemon +command_user="${monerod_user}:${monerod_group}" +respawn_max="3" +respawn_period="40" name="Monero P2P Daemon" description="Connects to the Monero P2P network" @@ -16,6 +19,22 @@ depend() { } start_pre() { - checkpath --directory --owner ${monerod_user}:${monerod_group} --mode 0755 \ - /var/lib/monero /var/log/monero + #set the defaults + data_dir="/var/lib/monero" + log_file="/var/log/monero/monero.log" + #attempt to update defaults from $MONEROD_CONFIG + grep -q "^data-dir=" "${MONEROD_CONFIG}" && data_dir=$(awk '/^data-dir=/{print$1}' "${MONEROD_CONFIG}"|sed 's/data-dir=//') + grep -q "^log-file=" "${MONEROD_CONFIG}" && log_file=$(awk '/^log-file=/{print$1}' "${MONEROD_CONFIG}"|sed 's/log-file=//') + checkpath -o ${monerod_user}:${monerod_group} -d ${data_dir} + + if [ -c "${log_file}" ] ;then + checkpath -d $(dirname "${output_log}") + checkpath -d $(dirname "${error_log}") + checkpath -o ${monerod_user}:${monerod_group} -f "${output_log}" + checkpath -o ${monerod_user}:${monerod_group} -f "${error_log}" + else + checkpath -d $(dirname "${log_file}") + checkpath -o ${monerod_user}:${monerod_group} -f "${log_file}" + fi + } diff --git a/net-p2p/monero/metadata.xml b/net-p2p/monero/metadata.xml index 45b9047..29d5abe 100644 --- a/net-p2p/monero/metadata.xml +++ b/net-p2p/monero/metadata.xml @@ -1,13 +1,9 @@ - + - telans@posteo.de - James Beddek - - - cantcuckthis@danwin1210.de - Dex Conner + efe.izbudak@metu.edu.tr + Efe İzbudak Monero is a private, secure, untraceable, decentralised digital @@ -18,6 +14,9 @@ Build the Monero daemon used to connect to the P2P network. + + Enable Trezor hardware wallet support. + Build tools used to manipulate the blockchain as it is stored on disk. diff --git a/net-p2p/monero/monero-0.17.2.0.ebuild b/net-p2p/monero/monero-0.17.2.0.ebuild deleted file mode 100644 index 2dc4118..0000000 --- a/net-p2p/monero/monero-0.17.2.0.ebuild +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake systemd - -DESCRIPTION="The secure, private, untraceable cryptocurrency" -HOMEPAGE="https://github.com/monero-project/monero" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/monero-project/monero.git" - EGIT_SUBMODULES=() -else - SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~x86" -fi - -LICENSE="BSD MIT" -SLOT="0" -IUSE="+daemon readline +tools +wallet-cli +wallet-rpc" -REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )" -RESTRICT="test" - -DEPEND=" - acct-group/monero - acct-user/monero - dev-libs/boost:=[nls] - dev-libs/libsodium:= - dev-libs/openssl:= - dev-libs/randomx - dev-libs/rapidjson - dev-libs/supercop - net-dns/unbound:=[threads] - net-libs/czmq:= - net-libs/miniupnpc - readline? ( sys-libs/readline:0= ) -" -RDEPEND="${DEPEND}" -BDEPEND="virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}/${PN}-0.17.1.7-unbundle-dependencies.patch" - "${FILESDIR}/${PN}-0.17.2.0-boost-176.patch" -) - -src_configure() { - local mycmakeargs=( - # TODO: Update CMake to install built libraries (help wanted) - -DBUILD_SHARED_LIBS=OFF - -DMANUAL_SUBMODULES=ON - -DMONERO_PARALLEL_LINK_JOBS=1 - -DUSE_DEVICE_TREZOR=OFF - ) - - cmake_src_configure -} - -src_compile() { - local targets=() - use daemon && targets+=(daemon) - use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage}) - use wallet-cli && targets+=(simplewallet) - use wallet-rpc && targets+=(wallet_rpc_server) - cmake_build ${targets[@]} -} - -src_install() { - einstalldocs - - # Install all binaries. - find "${BUILD_DIR}/bin/" -type f -executable -print0 | - while IFS= read -r -d '' line; do - dobin "$line" - done - - if use daemon; then - dodoc utils/conf/monerod.conf - - # data-dir - keepdir /var/lib/monero - fowners monero:monero /var/lib/monero - fperms 0755 /var/lib/monero - - # log-file dir - keepdir /var/log/monero - fowners monero:monero /var/log/monero - fperms 0755 /var/log/monero - - # /etc/monero/monerod.conf - insinto /etc/monero - doins "${FILESDIR}/monerod.conf" - - # OpenRC - newconfd "${FILESDIR}/monerod.confd" monerod - newinitd "${FILESDIR}/monerod.initd" monerod - - # systemd - systemd_dounit "${FILESDIR}/monerod.service" - fi -} - -pkg_postinst() { - if use daemon; then - elog "Start the Monero P2P daemon as a system service with" - elog "'rc-service monerod start'. Enable it at startup with" - elog "'rc-update add monerod default'." - elog - elog "Run monerod status as any user to get sync status and other stats." - elog - elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored" - elog "in /var/lib/monero by default. You may want to enable pruning by adding" - elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain" - elog "or move the data directory to another disk." - fi -} diff --git a/net-p2p/monero/monero-0.17.2.3.ebuild b/net-p2p/monero/monero-0.17.2.3.ebuild deleted file mode 100644 index 2dc4118..0000000 --- a/net-p2p/monero/monero-0.17.2.3.ebuild +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake systemd - -DESCRIPTION="The secure, private, untraceable cryptocurrency" -HOMEPAGE="https://github.com/monero-project/monero" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/monero-project/monero.git" - EGIT_SUBMODULES=() -else - SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~x86" -fi - -LICENSE="BSD MIT" -SLOT="0" -IUSE="+daemon readline +tools +wallet-cli +wallet-rpc" -REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )" -RESTRICT="test" - -DEPEND=" - acct-group/monero - acct-user/monero - dev-libs/boost:=[nls] - dev-libs/libsodium:= - dev-libs/openssl:= - dev-libs/randomx - dev-libs/rapidjson - dev-libs/supercop - net-dns/unbound:=[threads] - net-libs/czmq:= - net-libs/miniupnpc - readline? ( sys-libs/readline:0= ) -" -RDEPEND="${DEPEND}" -BDEPEND="virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}/${PN}-0.17.1.7-unbundle-dependencies.patch" - "${FILESDIR}/${PN}-0.17.2.0-boost-176.patch" -) - -src_configure() { - local mycmakeargs=( - # TODO: Update CMake to install built libraries (help wanted) - -DBUILD_SHARED_LIBS=OFF - -DMANUAL_SUBMODULES=ON - -DMONERO_PARALLEL_LINK_JOBS=1 - -DUSE_DEVICE_TREZOR=OFF - ) - - cmake_src_configure -} - -src_compile() { - local targets=() - use daemon && targets+=(daemon) - use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage}) - use wallet-cli && targets+=(simplewallet) - use wallet-rpc && targets+=(wallet_rpc_server) - cmake_build ${targets[@]} -} - -src_install() { - einstalldocs - - # Install all binaries. - find "${BUILD_DIR}/bin/" -type f -executable -print0 | - while IFS= read -r -d '' line; do - dobin "$line" - done - - if use daemon; then - dodoc utils/conf/monerod.conf - - # data-dir - keepdir /var/lib/monero - fowners monero:monero /var/lib/monero - fperms 0755 /var/lib/monero - - # log-file dir - keepdir /var/log/monero - fowners monero:monero /var/log/monero - fperms 0755 /var/log/monero - - # /etc/monero/monerod.conf - insinto /etc/monero - doins "${FILESDIR}/monerod.conf" - - # OpenRC - newconfd "${FILESDIR}/monerod.confd" monerod - newinitd "${FILESDIR}/monerod.initd" monerod - - # systemd - systemd_dounit "${FILESDIR}/monerod.service" - fi -} - -pkg_postinst() { - if use daemon; then - elog "Start the Monero P2P daemon as a system service with" - elog "'rc-service monerod start'. Enable it at startup with" - elog "'rc-update add monerod default'." - elog - elog "Run monerod status as any user to get sync status and other stats." - elog - elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored" - elog "in /var/lib/monero by default. You may want to enable pruning by adding" - elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain" - elog "or move the data directory to another disk." - fi -} diff --git a/net-p2p/monero/monero-0.17.3.0.ebuild b/net-p2p/monero/monero-0.17.3.0.ebuild deleted file mode 100644 index 656c93e..0000000 --- a/net-p2p/monero/monero-0.17.3.0.ebuild +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake systemd - -DESCRIPTION="The secure, private, untraceable cryptocurrency" -HOMEPAGE="https://github.com/monero-project/monero" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/monero-project/monero.git" - EGIT_SUBMODULES=() -else - SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~x86" -fi - -LICENSE="BSD MIT" -SLOT="0" -IUSE="+daemon readline +tools +wallet-cli +wallet-rpc" -REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )" -RESTRICT="test" - -DEPEND=" - acct-group/monero - acct-user/monero - dev-libs/boost:=[nls] - dev-libs/libsodium:= - dev-libs/openssl:= - dev-libs/randomx - dev-libs/rapidjson - dev-libs/supercop - net-dns/unbound:=[threads] - net-libs/czmq:= - net-libs/miniupnpc - readline? ( sys-libs/readline:0= ) -" -RDEPEND="${DEPEND}" -BDEPEND="virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}/${PN}-0.17.3.0-unbundle-dependencies.patch" -) - -src_configure() { - local mycmakeargs=( - # TODO: Update CMake to install built libraries (help wanted) - -DBUILD_SHARED_LIBS=OFF - -DMANUAL_SUBMODULES=ON - -DUSE_DEVICE_TREZOR=OFF - ) - - cmake_src_configure -} - -src_compile() { - local targets=() - use daemon && targets+=(daemon) - use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage}) - use wallet-cli && targets+=(simplewallet) - use wallet-rpc && targets+=(wallet_rpc_server) - cmake_build ${targets[@]} -} - -src_install() { - einstalldocs - - # Install all binaries. - find "${BUILD_DIR}/bin/" -type f -executable -print0 | - while IFS= read -r -d '' line; do - dobin "$line" - done - - if use daemon; then - dodoc utils/conf/monerod.conf - - # data-dir - keepdir /var/lib/monero - fowners monero:monero /var/lib/monero - fperms 0755 /var/lib/monero - - # log-file dir - keepdir /var/log/monero - fowners monero:monero /var/log/monero - fperms 0755 /var/log/monero - - # /etc/monero/monerod.conf - insinto /etc/monero - doins "${FILESDIR}/monerod.conf" - - # OpenRC - newconfd "${FILESDIR}/monerod.confd" monerod - newinitd "${FILESDIR}/monerod.initd" monerod - - # systemd - systemd_dounit "${FILESDIR}/monerod.service" - fi -} - -pkg_postinst() { - if use daemon; then - elog "Start the Monero P2P daemon as a system service with" - elog "'rc-service monerod start'. Enable it at startup with" - elog "'rc-update add monerod default'." - elog - elog "Run monerod status as any user to get sync status and other stats." - elog - elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored" - elog "in /var/lib/monero by default. You may want to enable pruning by adding" - elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain" - elog "or move the data directory to another disk." - fi -} diff --git a/net-p2p/monero/monero-0.17.3.2.ebuild b/net-p2p/monero/monero-0.18.3.4-r1.ebuild similarity index 83% rename from net-p2p/monero/monero-0.17.3.2.ebuild rename to net-p2p/monero/monero-0.18.3.4-r1.ebuild index a3816f1..239eec4 100644 --- a/net-p2p/monero/monero-0.17.3.2.ebuild +++ b/net-p2p/monero/monero-0.18.3.4-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake systemd @@ -19,14 +19,14 @@ fi LICENSE="BSD MIT" SLOT="0" -IUSE="+daemon readline +tools +wallet-cli +wallet-rpc" +IUSE="+daemon hw-wallet readline +tools +wallet-cli +wallet-rpc" REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )" RESTRICT="test" DEPEND=" acct-group/monero acct-user/monero - dev-libs/boost:=[nls] + /dev/null|awk '{print $11}'|grep -q "${P2POOL_LOGFILE}";then + rm "${directory}/p2pool.log" 2>/dev/null + ln -s "${P2POOL_LOGFILE}" "${directory}/p2pool.log" + fi + [ -c "${P2POOL_LOGFILE}" ] || checkpath -o ${P2POOL_USR}:${P2POOL_GRP} -f "${P2POOL_LOGFILE}" + fi +} diff --git a/net-p2p/p2pool/metadata.xml b/net-p2p/p2pool/metadata.xml new file mode 100644 index 0000000..7fe8cbc --- /dev/null +++ b/net-p2p/p2pool/metadata.xml @@ -0,0 +1,11 @@ + + + + + adam.pimentel46@gmail.com + Adam Pimentel + + + SChernykh/p2pool + + diff --git a/net-p2p/p2pool/p2pool-4.3.ebuild b/net-p2p/p2pool/p2pool-4.3.ebuild new file mode 100644 index 0000000..def6ca5 --- /dev/null +++ b/net-p2p/p2pool/p2pool-4.3.ebuild @@ -0,0 +1,80 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +#TODO: enable/fix GRPC/TLS dependency and add it as USE flag (https://github.com/SChernykh/p2pool/issues/313) +# These features build fine in cmake outside of portage, I can't figure out how to link them here for the life of me. +# It's probably better to just re-write the CMakeLists.txt to dynamicially link with gRPC + +EAPI=8 + +inherit cmake verify-sig + +DESCRIPTION="Decentralized pool for Monero mining" +HOMEPAGE="https://p2pool.io" +SRC_URI=" + https://github.com/SChernykh/p2pool/releases/download/v${PV}/p2pool_source.tar.xz -> ${P}.tar.xz + verify-sig? ( https://github.com/SChernykh/p2pool/releases/download/v${PV}/sha256sums.txt.asc -> ${P}_shasums.asc ) +" + +LICENSE="BSD GPL-3+ ISC LGPL-3+ MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +#IUSE="grpc tls" + +DEPEND=" + dev-libs/openssl + net-libs/czmq + dev-libs/libuv + net-misc/curl +" +BDEPEND=" + verify-sig? ( sec-keys/openpgp-keys-schernykh ) +" + +src_unpack() { + if use verify-sig; then + local VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/SChernykh.asc + pushd "${DISTDIR}" > /dev/null || die + verify-sig_verify_message ${P}_shasums.asc - | \ + tr \\r \\n | \ + tr '[:upper:]' '[:lower:]' | \ + sed -n '/p2pool_source/,$p' | \ + grep -m 1 sha256: | \ + sed "s/sha256: \(.*\)/\1 ${P}.tar.xz/" | \ + verify-sig_verify_unsigned_checksums - sha256 ${P}.tar.xz + assert + popd || die + fi + unpack ${P}.tar.xz + mv -T "${WORKDIR}"/${PN} "${WORKDIR}"/${P} || die +} + +src_configure() { + local mycmakeargs=( + -DSTATIC_BINARY=OFF + -DSTATIC_LIBS=OFF + -DWITH_GRPC=OFF #$(usex grpc) + -DWITH_TLS=OFF #$(usex tls) + ) + cmake_src_configure +} + +src_install(){ + dobin "${BUILD_DIR}/p2pool" +} + +pkg_postinst() { + #Some important wisdom taken from P2Pool documentation + ewarn "P2Pool for Monero is now installed." + ewarn "You can run it by doing 'p2pool --host 127.0.0.1 --wallet YOUR_PRIMARY_ADDRESS'" + ewarn "Where 127.0.0.1 is the address of a local monero node (e.g. monerod)" + ewarn "" + ewarn "Once configured, point your RandomX miner (e.g. XMRig) at p2pool" + ewarn "For example 'xmrig -o 127.0.0.1:3333'" + ewarn "" + ewarn "You MUST use your primary address when using p2pool, just like solo mining." + ewarn "If you want privacy, create a new mainnet wallet for P2Pool mining." + ewarn "" + ewarn "Rewards will not be visible unless you use a wallet that supports P2Pool." + ewarn "See https://p2pool.io/#help and https://github.com/SChernykh/p2pool for more information." +}