Giter Site home page Giter Site logo

schernykh / p2pool Goto Github PK

View Code? Open in Web Editor NEW
978.0 46.0 123.0 212.52 MB

Decentralized pool for Monero mining

License: GNU General Public License v3.0

CMake 3.24% C++ 87.98% Batchfile 0.14% Shell 0.08% Nix 0.12% Dockerfile 0.54% Python 5.99% Jinja 0.84% HTML 1.07%
blockchain monero pool mining p2pool p2p monero-mining

p2pool's Introduction

Monero P2Pool

Decentralized pool for Monero mining.

Pool status and monitoring pages can be found at https://p2pool.io/, https://p2pool.io/mini/ and https://p2pool.observer/, https://mini.p2pool.observer/

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.

Build Status

C/C++ CI test-sync

CodeQL msvc-analysis cppcheck Coverity Scan Build Status clang-tidy

Contents

Pool mining vs Solo mining vs P2Pool mining

Here's the comparison table of the different ways of mining. While pool mining is the easiest to setup, it centralizes Monero network and pool admin gets full power over your hashrate and your unpaid funds. Solo mining is 100% independent and the best for the network. P2Pool mining has all the advantages of solo mining, but also makes regular payouts possible.

Pool type Payouts Fee Min. payout Centralized? Stability Control Setup
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% ~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 directly.
  • PPLNS payout scheme
  • 0% fee
  • 0 XMR payout fee
  • ~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 payouts work in P2Pool

First you need to find a pool share. This share will stay in PPLNS 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: 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 March 18th, 2023 at 21:00 UTC.

In order to continue mining on P2Pool, you must update both Monero and P2Pool software to the latest available versions as soon as they are released.

Monero protocol version Required Monero software version Required P2Pool version
v15, v16 (active after August 13th, 2022) v0.18.0.0 or newer, v0.18.3.1 is recommended v3.0 or newer

How to mine on P2Pool

General Considerations

  • In order to mine on P2Pool, a synced Monero node using monerod v0.18.0.0 or newer is required. If you don't currently have one, you can download the official Monero binaries, start monerod on your PC and wait until it's fully synced. Advanced Monero node setup instructions are here.
  • 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

GUI for P2Pool

  • Gupax project aims to provide an easy to use cross-platform GUI to configure and run P2Pool & XMRig.

GNU/Linux

  1. Download the latest P2Pool binaries here.
    • Alternatively, grab the latest source code for P2Pool and build it.
  2. Download the latest XMRig (linux-static-x64) binary here.
  3. Prepare enough huge pages (each of monerod/P2Pool/XMRig needs them):
sudo sysctl vm.nr_hugepages=3072
  1. 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.
  2. 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

  1. Start P2Pool with the following command/options:
./p2pool --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS
  1. Wait until the initial P2Pool sync is finished (shouldn't take more than 5-10 minutes).
  2. 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
  1. 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.
    • Alternatively, grab the latest source code for P2Pool and build it.
  2. Download the latest XMRig binary here.
  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.

  1. 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

  1. Start P2Pool with the following command/options:
.\p2pool.exe --host 127.0.0.1 --wallet YOUR_WALLET_ADDRESS --mini
  1. Wait until the initial P2Pool sync is finished (shouldn't take more than 5-10 minutes).
  2. 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
    
  1. XMRig should connect and start mining!
  2. (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.

Please see the relevant instructions for your platform:

Ubuntu 20.04

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 libcurl4-openssl-dev libidn2-0-dev
git clone --recursive https://github.com/SChernykh/p2pool
cd p2pool
mkdir build && cd build
cmake ..
make -j$(nproc)
pacman -S p2pool

This is a flake only project. So you have to use nixUnstable with nix 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:

nix shell github:nixos/nix/master

Run the binary:

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&submodules=1 -- --help

Windows

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
cd p2pool
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019"

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.

macOS

Run the following commands to install the necessary prerequisites, clone this repo, and build P2Pool locally on your Mac:

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)

FreeBSD

Run the following commands to install the necessary prerequisites, clone this repo, and build P2Pool locally on FreeBSD:

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)

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:

44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg

p2pool's People

Contributors

badtigrou avatar bladedoyle avatar felixonmars avatar gador avatar gingeropolous avatar haosgames avatar hayden-cardwell avatar hinto-janai avatar hyc avatar karce avatar kpcyrd avatar quickbasic avatar schernykh avatar tonux599 avatar twlee79 avatar weebdatahoarder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p2pool's Issues

Connect to p2pool on the same network but not on the same computer.

Hey, just a little issue here, i have correctly setup p2pool and monero daemon on my laptop and now i want to mine from another computer on the same network, but when i do:

sudo ./xmrig -o 127.0.0.1:3333

It works on the laptop i'm running the node/p2pool but it doesn't work from my other computers on the same network, could you help me?

Unknown Error

I keep seeing this error after a block is found, is this something to be concerned about?

P2Pool submit_block: daemon returned error: 'unknown error', template id = 0, nonce = 0, extra_nonce = 0
status

monrod.exe errors

image
I am running into two errors when issuing the command: monerod.exe --zmq-pub tcp://127.0.0.1:18083

2021-09-20 19:54:20.936 F Error starting server: Failed to bind IPv4 (set to required)
2021-09-20 19:54:20.948 E Exception in main! Failed to initialize p2p server.

Any suggestions on fixing this?

Does not yet build on M1 Mac

Cmake says "-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZMQ_LIBRARY
linked by target "p2pool" in directory /Users/williamwinter/Downloads/p2pool
ZMQ_LIBRARY_DEBUG
linked by target "p2pool" in directory /Users/williamwinter/Downloads/p2pool

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly."

Can't get miner to connect to p2pool

Hello,
I've tried disabling firewalls and also tested telnet connection to port 3333 and it works... not sure why I'm getting this error. Anyone seen this before?
image

Custom difficulty setting? low hashrate

2021-09-26 07:23:11.9384 SideChain status Main chain height = 2457685
Main chain hashrate = 2.696 GH/s Side chain height = 218674 Side chain hashrate = 73.259 MH/s
### Your hashrate (pool-side) = 32.440 KH/s PPLNS window = 2160 blocks (+75 uncles, 0 orphans)
Your shares = 1 blocks (+0 uncles, 0 orphans) Your shares position = [.........................1....]
Block reward share = 0.044% (0.000377939906 XMR)

Hello,

Im moving from monero pool to p2pool, the instructions for setup works good. Thanks!

Ran into a problem with low hashrate.

  • My hashrate on monero pool is around 43-44kh, very stable. (14.5kh per miner)
  • Ran p2pool on my node for about 24hours non stop, only getting around 32.44KH (shown above)

The current difficulty setting is left default :
[2021-09-26 00:26:53.881] net new job from 192.168.1.121:3333 diff 748M algo rx/0 height 2457686

Is the low hashrate a result of low difficulty target?

Any tips on calculating what difficulty to set?

thanks!

How a noob will know that p2pool features mentioned are available

Hi,
Thanks for your efforts to make this pool open for all who dont want to pay pool fee in other pools but This is important to satisfy all. Everyone need to know who is getting what from this pool?

As mentioned I am noob and
Screenshot (4)
Screenshot (5)
wonder that all other pools specially 2miners.com shows detailed miner stats but I dont see anything about reward distribution and miner statics on p2pool website. Why should I check p2pool logs to find details if stats are available on pool website. P2pool should include below in pool website.

1- All Miners with their Incomplete Wallet Address like 2miners.com
2- All miners with their hashrate and shares they got from the mined blocks.

Please properly document the fact that p2pool is not meant to be run as root

I understand the fact that it was mentioned that it's strongly recommended to run p2pool under its own user due to the fact that it might have vulnerabilities which can be exploited but, even so, I still went ahead and tried running it under the root user on my arch linux installation.
The executable would just stop immediately afterwards and not do anything, not even a single line in the log about why it wouldn't proceed. No errors and no warnings whatsoever.
It took me a day to figure out that maybe I should create a non-root user and try it over there.
Seriously, this was truly annoying. This type of stuff should be mentioned outright from the start.

building from source on raspbian

I'm trying to build from source according to instructions for Ubuntu 20.04:

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/monero-project/monero/
cd monero
git checkout release-v0.17
git submodule sync && git submodule update --init --force --recursive
make release-static -j$(nproc)

but fails with this:

[ 13%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testminiwget.dir/upnpreplyparse.c.o
[ 14%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testminiwget.dir/minixml.c.o
[ 14%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testigddescparse.dir/minisoap.c.o
CMake Error: failed to create symbolic link 'libminiupnpc.so.17': function not implemented
CMake Error: cmake_symlink_library: System Error: Function not implemented
CMake Error: failed to create symbolic link 'libminiupnpc.so': function not implemented
CMake Error: cmake_symlink_library: System Error: Function not implemented
make[3]: *** [external/miniupnp/miniupnpc/CMakeFiles/libminiupnpc-shared.dir/build.make:295: external/miniupnp/miniupnpc/libminiupnpc.so.2.2.1] Error 1
make[3]: *** Deleting file 'external/miniupnp/miniupnpc/libminiupnpc.so.2.2.1'
make[3]: Leaving directory '/mnt/monero/build/Linux/release-v0.17/release'
make[2]: *** [CMakeFiles/Makefile2:1107: external/miniupnp/miniupnpc/CMakeFiles/libminiupnpc-shared.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 14%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testigddescparse.dir/connecthostport.c.o
[ 14%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testminiwget.dir/igd_desc_parse.c.o
[ 14%] Building C object external/miniupnp/miniupnpc/CMakeFiles/libminiupnpc-static.dir/listdevices.c.o
[ 14%] Building C object external/miniupnp/miniupnpc/CMakeFiles/libminiupnpc-static.dir/addr_is_reserved.c.o
[ 15%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testminiwget.dir/connecthostport.c.o
[ 15%] Linking C static library libminiupnpc.a
[ 15%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testminiwget.dir/portlistingparse.c.o
make[3]: Leaving directory '/mnt/monero/build/Linux/release-v0.17/release'
[ 15%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testigddescparse.dir/portlistingparse.c.o
[ 15%] Built target libminiupnpc-static
[ 15%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testminiwget.dir/receivedata.c.o
[ 15%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testminiwget.dir/addr_is_reserved.c.o
[ 15%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testigddescparse.dir/receivedata.c.o
[ 15%] Building C object external/miniupnp/miniupnpc/CMakeFiles/testigddescparse.dir/addr_is_reserved.c.o
[ 16%] Linking C executable testminiwget
[ 18%] Linking C executable testigddescparse
make[3]: Leaving directory '/mnt/monero/build/Linux/release-v0.17/release'
[ 18%] Built target testminiwget
make[3]: Leaving directory '/mnt/monero/build/Linux/release-v0.17/release'
[ 18%] Built target testigddescparse
make[2]: Leaving directory '/mnt/monero/build/Linux/release-v0.17/release'
make[1]: *** [Makefile:141: all] Error 2
make[1]: Leaving directory '/mnt/monero/build/Linux/release-v0.17/release'
make: *** [Makefile:107: release-static] Error 2

Any ideas how to solve this?
Thanks

sometimes blocks don't accounted

Hello. @ 1st, thanks for this project!
I began mining and suddenly noticed that not all blocks were registered and payed out. For ex this block @ height 2480250 doesn't exist in https://p2pool.observer/ 's stats, but does here: https://p2pool.io/#blocks
image
image
As you can see the block '2480250' doesn't exist nor at global stats nor at my address page:
image

So @ 1st I pressed F5 and still couldn't see any changes. Then I checked my balance out, same sh...t.
It's so strange because I had a share of that block and it was really mined and wasn't marked as orphan or uncle:

NOTICE  2021-10-27 15:26:12.6607 StratumServer SHARE FOUND: mainchain height 2480208, diff 551164384, client 127.0.0.1:58315 user Ryzen, effort 53.382%
NOTICE  2021-10-27 16:18:02.3482 SideChain add_external_block: block 3612824a619dadb714c0f27c648837be8ee7cf4580b4d8cf100677e9a05957d0 has enough PoW for Monero network, submitting it
NOTICE  2021-10-27 16:18:02.3482 P2Pool submit_block: height = 2480229, external blob (3289 bytes)
NOTICE  2021-10-27 16:18:02.4732 P2Pool BLOCK FOUND: main chain block at height 2480229 was mined by this p2pool
-----------------------------------------------------------------------------------------------
| ######   #        #######   #####   #    #      #######  #######  #     #  #     #  ######  |
| #     #  #        #     #  #     #  #   #       #        #     #  #     #  ##    #  #     # |
| #     #  #        #     #  #        #  #        #        #     #  #     #  # #   #  #     # |
| ######   #        #     #  #        ###         #####    #     #  #     #  #  #  #  #     # |
| #     #  #        #     #  #        #  #        #        #     #  #     #  #   # #  #     # |
| #     #  #        #     #  #     #  #   #       #        #     #  #     #  #    ##  #     # |
| ######   #######  #######   #####   #    #      #        #######   #####   #     #  ######  |
-----------------------------------------------------------------------------------------------
NOTICE  2021-10-27 16:18:03.6607 P2Pool submit_block: BLOCK ACCEPTED at height 2480229 and difficulty = 324788464698
NOTICE  2021-10-27 16:58:10.5513 SideChain add_external_block: block 1b9a158606234ea69bf93b4c9b8226cc3e2aebaab476d4e2e27f106c400bfa12 has enough PoW for Monero network, submitting it
NOTICE  2021-10-27 16:58:10.5513 P2Pool submit_block: height = 2480250, external blob (5301 bytes)
NOTICE  2021-10-27 16:58:11.5669 P2Pool BLOCK FOUND: main chain block at height 2480250 was mined by this p2pool
-----------------------------------------------------------------------------------------------
| ######   #        #######   #####   #    #      #######  #######  #     #  #     #  ######  |
| #     #  #        #     #  #     #  #   #       #        #     #  #     #  ##    #  #     # |
| #     #  #        #     #  #        #  #        #        #     #  #     #  # #   #  #     # |
| ######   #        #     #  #        ###         #####    #     #  #     #  #  #  #  #     # |
| #     #  #        #     #  #        #  #        #        #     #  #     #  #   # #  #     # |
| #     #  #        #     #  #     #  #   #       #        #     #  #     #  #    ##  #     # |
| ######   #######  #######   #####   #    #      #        #######   #####   #     #  ######  |
-----------------------------------------------------------------------------------------------
NOTICE  2021-10-27 16:58:12.8794 P2Pool submit_block: BLOCK ACCEPTED at height 2480250 and difficulty = 325161736360
NOTICE  2021-10-27 17:36:34.7349 SideChain status
Main chain height         = 2480270
Main chain hashrate       = 2.719 GH/s
Side chain height         = 480113
Side chain hashrate       = 53.109 MH/s
Your hashrate (pool-side) = 23.882 KH/s
PPLNS window              = 2160 blocks (+65 uncles, 5 orphans)
Your shares               = 1 blocks (+0 uncles, 0 orphans)
Your shares position      = [..........1...................]

(sorry i couldn't post this on time due to technical issues with this platform and I can't find a spoiler tag here)
As you can see only one share is in pplns that was found @ 2021-10-27 15:26:12.6607, but only one block at height 2480229 was payed out, and next block at height 2480250 was ignored though my pplns-window is still opened. Can you explain what happened? I've been watching my stats with p2pool for last two weeks every day and didn't notice such things...
By the way there were several missed blocks at that time. So it could have been more than once.
Thanks, i really appreciate your work!

Update from RPC v3.5 to RPC v3.8

[SOLVED]
Solution: so recompiling did the trick :D
[SOLVED]

Hi everyone,

I'm getting this message P2Pool monerod RPC v3.5 is incompatible, update to RPC >= v3.8 when runing ./p2pool --host 127.0.0.1 --wallet [here I input my main address] and right after the p2pool process stops.

I also noticed that when the p2pool process reports that RPC message, monerod reports back monerod[actual PID of the program]: 2021-09-14 18:20:59.395 E Invalid ZMQ/Sub message monerod[actual PID of the program]: 2021-09-14 18:20:59.397 E Invalid ZMQ/Sub message (yeah, twice).

I'm following the readme steps (build p2pool and monero with all its utilities).

Any clue on how I can do such an update?

Some information regarding my setup:

  • The node is synched and I can see my balance with monero-cli-wallet
  • I run the node with (I can use the node for transactions without a problem): monerod --rpc-bind-ip 0.0.0.0 --rpc-bind-port 18081 --confirm-external-bind --zmq-pub tcp://127.0.0.1:18083 --data-dir [the proper uri for my datadir] --non-interactive
  • From the output of monerod --version it says I'm running on Monero 'Oxygen Orion' (v0.17.2.3-04bfd948a)
  • The OS is Ubuntu Server 20.04.2 LTS (Focal Fossa) and Linux Kernel is 5.4.0-84-generic

Here is what I've tried so far:
Using an RCP call to check if there are monerod updates curl http://127.0.0.1:18081/update -d '{"command":"check"}' -H 'Content-Type: application/json' it returns:

{
  "auto_uri": "",
  "hash": "",
  "path": "",
  "status": "OK",
  "untrusted": false,
  "update": false,
  "user_uri": "",
  "version": ""
}

Also tried forcing the download of a newer version with curl http://127.0.0.1:18081/update -d '{"command":"download"}' -H 'Content-Type: application/json' but I get the exact same output as before, I understand if a new version is available it should be shown as a value in the key "version" (from the monero docs about daemon rpc calls)

Maybe this is way too noob but did not know where to ask.

Node running but wallet remains to 0 XMR

Hello,

I have followed the information to install the whole system on an Ubuntu 20.04 test rig as documented in the README.md. Everything is running for a few days and seems working ok, however, the wallet balance remains to 0.00000....

I am using the wallet-cli provided in the monerod 'Oxygen Orion' (v0.17.2.3-9c82593b5) package and created a new primary "41iVXmvSC..." key for this purpose

Monerod is synchronised, however I have some network errors :
2021-09-12 10:25:04.358 [P2P6] ERROR net contrib/epee/include/net/abstract_tcp_server2.inl:777 Setting timer on a shut down object
2021-09-12 10:25:04.829 [P2P3] WARNING net.p2p src/p2p/net_node.inl:2408 [162.218.65.99:18081 OUT] Failed to invoke COMMAND_PING to 162.218.65.99:18081(-3, LEVIN_ERROR_CONNECTION_DESTROYED)
2021-09-12 10:25:07.115 [P2P3] WARNING net.p2p src/p2p/net_node.inl:2408 [162.218.65.101:18081 OUT] Failed to invoke COMMAND_PING to 162.218.65.101:18081(-3, LEVIN_ERROR_CONNECTION_DESTROYED)
2021-09-12 10:25:09.340 [P2P5] WARNING net.p2p src/p2p/net_node.inl:2408 [162.218.65.102:18080 OUT] Failed to invoke COMMAND_PING to 162.218.65.102:18080(-3, LEVIN_ERROR_CONNECTION_DESTROYED)
2021-09-12 10:25:09.921 [P2P6] ERROR net contrib/epee/include/net/abstract_tcp_server2.inl:777 Setting timer on a shut down object
2021-09-12 10:25:11.392 [P2P2] WARNING net.p2p src/p2p/net_node.inl:2408 [162.218.65.103:18081 OUT] Failed to invoke COMMAND_PING to 162.218.65.103:18081(-3, LEVIN_ERROR_CONNECTION_DESTROYED)
2021-09-12 10:25:11.678 [P2P9] WARNING net.p2p src/p2p/net_node.inl:2408 [180.149.231.92:18080 OUT] Failed to invoke COMMAND_PING to 180.149.231.92:18080(-3, LEVIN_ERROR_CONNECTION_DESTROYED)

monerod.log head :
head -n100 ~/.bitmonero/bitmonero.log
2021-09-12 10:32:20.016 7f7ba51477c0 INFO logging contrib/epee/src/mlog.cpp:273 New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.ssl:FATAL,net.p2p:FATAL,net.cn:FATAL,daemon.rpc:FATAL,global:INFO,verify:FATAL,serialization:FATAL,daemon.rpc.payment:ERROR,stacktrace:INFO,logging:INFO,msgwriter:INFO
2021-09-12 10:32:20.020 7f7ba51477c0 INFO global src/daemon/main.cpp:294 Monero 'Oxygen Orion' (v0.17.2.3-9c82593b5)
2021-09-12 10:32:20.020 7f7ba51477c0 INFO msgwriter src/common/scoped_message_writer.h:102 Forking to background...
2021-09-12 10:32:20.021 7f7ba51477c0 WARNING daemon src/daemon/executor.cpp:61 Monero 'Oxygen Orion' (v0.17.2.3-9c82593b5) Daemonised
2021-09-12 10:32:20.021 7f7ba51477c0 INFO global src/daemon/protocol.h:53 Initializing cryptonote protocol...
2021-09-12 10:32:20.021 7f7ba51477c0 INFO global src/daemon/protocol.h:58 Cryptonote protocol initialized OK
2021-09-12 10:32:20.022 7f7ba51477c0 INFO global src/daemon/core.h:63 Initializing core...
2021-09-12 10:32:20.022 7f7ba51477c0 INFO global src/cryptonote_core/cryptonote_core.cpp:515 Loading blockchain from folder /home/jef/.bitmonero/lmdb ...
2021-09-12 10:32:20.120 7f7ba51477c0 INFO global src/cryptonote_core/cryptonote_core.cpp:690 Loading checkpoints
2021-09-12 10:32:20.120 7f7ba51477c0 INFO global src/daemon/core.h:73 Core initialized OK
2021-09-12 10:32:20.120 7f7ba51477c0 INFO global src/daemon/p2p.h:63 Initializing p2p server...
2021-09-12 10:32:20.130 7f7ba51477c0 INFO global src/daemon/p2p.h:68 p2p server initialized OK
2021-09-12 10:32:20.130 7f7ba51477c0 INFO global src/daemon/rpc.h:63 Initializing core RPC server...
2021-09-12 10:32:20.130 7f7ba51477c0 INFO global contrib/epee/include/net/http_server_impl_base.h:79 Binding on 127.0.0.1 (IPv4):18081
2021-09-12 10:32:20.357 7f7ba51477c0 INFO global src/daemon/rpc.h:69 core RPC server initialized OK on port: 18081
2021-09-12 10:32:20.358 7f7ba51477c0 INFO global src/daemon/rpc.h:74 Starting core RPC server...
2021-09-12 10:32:20.358 [SRV_MAIN] INFO global src/daemon/rpc.h:79 core RPC server started ok
2021-09-12 10:32:20.358 [SRV_MAIN] INFO global src/daemon/p2p.h:78 Starting p2p net loop...
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732 **********************************************************************
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732 The daemon will start synchronizing with the network. This may take a long time to complete.
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732 You can set the level of process detailization through "set_log <level|categories>" command,
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732 where is between 0 (no details) and 4 (very verbose), or custom category based levels (eg, *:WARNING).
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732 Use the "help" command to see the list of available commands.
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732 Use "help " to see a command's documentation.
2021-09-12 10:32:21.358 [P2P1] INFO global src/cryptonote_core/cryptonote_core.cpp:1732 **********************************************************************
2021-09-12 10:32:21.448 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:2460
2021-09-12 10:32:21.448 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:2460 **********************************************************************
2021-09-12 10:32:21.448 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:2460 You are now synchronized with the network. You may now start monero-wallet-cli.
2021-09-12 10:32:21.448 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:2460
2021-09-12 10:32:21.448 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:2460 Use the "help" command to see the list of available commands.
2021-09-12 10:32:21.448 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:2460 **********************************************************************
2021-09-12 10:32:21.919 [P2P0] INFO stacktrace src/common/stack_trace.cpp:133 Exception: boost::wrapexceptboost::bad_weak_ptr
2021-09-12 10:32:21.919 [P2P0] INFO stacktrace src/common/stack_trace.cpp:134 Unwound call stack:
2021-09-12 10:32:21.930 [P2P0] INFO stacktrace src/common/stack_trace.cpp:172 [1] 0x117) [0x563bdc310fa7]:__wrap___cxa_throw+0x117) [0x563bdc310fa7]...

P2pool is launched in background with :

screen -d -m -S p2poolnode bash -c 'cd ~/p2pool/build/ && ./p2pool --host 127.0.0.1 --wallet 41iVX....(my-primary-wllet-address)'

The only errors got on p2pool.log are some warnings like below :

WARNING 2021-09-12 02:53:47.2001 SideChain add_external_block: block is built on top of an unknown mainchain block 649e0d3930fcb46acd08721e26702611464835b1cce9608417ee8db3087d4c50, mainchain reorg might've happened
WARNING 2021-09-12 03:54:17.1445 SideChain add_external_block: block is built on top of an unknown mainchain block eb0b2c9d24dd2c39660385b6d5d39f63055ca9ee5c6c534e190254e8a50f8379, mainchain reorg might've happened

in addition of a few banned nodes.

XMrig gets the jobs.

p2pool.log head :

NOTICE 2021-09-12 09:52:43.4110 Log started
NOTICE 2021-09-12 09:52:43.4120 SideChain network type = mainnet
NOTICE 2021-09-12 09:52:43.4120 SideChain using default config
NOTICE 2021-09-12 09:52:43.4120 SideChain pool name = mainnet test 2
NOTICE 2021-09-12 09:52:43.4120 SideChain block time = 10 seconds
NOTICE 2021-09-12 09:52:43.4120 SideChain min diff = 100000
NOTICE 2021-09-12 09:52:43.4120 SideChain PPLNS window = 2160 blocks
NOTICE 2021-09-12 09:52:43.4120 SideChain uncle penalty = 20%
NOTICE 2021-09-12 09:52:43.4120 SideChain generating consensus ID
NOTICE 2021-09-12 09:52:44.2123 SideChain consensus ID = 22af7ee7************************************************4407f918
NOTICE 2021-09-12 09:52:44.3455 RandomX_Hasher allocated 2592 MB
NOTICE 2021-09-12 09:52:44.3458 ConsoleCommands started
NOTICE 2021-09-12 09:52:44.3465 ZMQReader worker thread ready
NOTICE 2021-09-12 09:52:44.3638 P2Pool new miner data

major_version = 14
height = 2447695
prev_id = 061978a46c430ace2be355fb84a6000402083ed61bf5e9684c6f722c2c0a57e7
seed_hash = f4f2e6e0dee85a9e212c5decf4c8f0b656a9fd6d175a64de43920a108603a526
difficulty = 339905258163
median_weight = 300000
already_generated_coins = 17991377793683898561
transactions = 22

NOTICE 2021-09-12 09:52:44.3638 BlockTemplate base reward = 0.868542251635 XMR, mempool: 22 transactions, fees = 0.000400060000 XMR, weight = 38677
NOTICE 2021-09-12 09:52:44.3638 RandomX_Hasher new seed f4f2e6e0dee85a9e212c5decf4c8f0b656a9fd6d175a64de43920a108603a526
NOTICE 2021-09-12 09:52:44.3644 BlockTemplate final reward = 0.868942311635 XMR, weight = 38803, outputs = 1, 22 of 22 transactions included
NOTICE 2021-09-12 09:52:44.3647 P2Pool parsed block header for height 2447360
NOTICE 2021-09-12 09:52:44.3648 P2Pool parsed block header for height 2445312
NOTICE 2021-09-12 09:52:44.3648 RandomX_Hasher old seed ac962271f046b247084d26db52a7f0378ddf6879a55e704930a3aff8772e72a3
NOTICE 2021-09-12 09:52:44.7970 RandomX_Hasher cache updated
NOTICE 2021-09-12 09:52:44.7970 RandomX_Hasher running 6 threads to update dataset
NOTICE 2021-09-12 09:52:45.2315 RandomX_Hasher old cache updated
NOTICE 2021-09-12 09:52:45.3124 P2Pool parsed 720 block headers for heights 2446975 - 2447694
NOTICE 2021-09-12 09:52:45.3124 P2Pool median timestamp updated to 1631437083
NOTICE 2021-09-12 09:52:45.3126 StratumServer listening on [::]:3333
NOTICE 2021-09-12 09:52:45.3127 StratumServer listening on 0.0.0.0:3333
NOTICE 2021-09-12 09:52:45.3127 StratumServer event loop started
NOTICE 2021-09-12 09:52:45.3143 BlockCache loading cached blocks
NOTICE 2021-09-12 09:52:47.0449 BlockCache loaded 4608 cached blocks
NOTICE 2021-09-12 09:52:47.0449 P2PServer loading peers from seeds.p2pool.io
NOTICE 2021-09-12 09:52:47.2861 P2PServer added 13.69.194.86:37889 from seeds.p2pool.io
NOTICE 2021-09-12 09:52:47.2861 P2PServer added 65.21.227.114:37889 from seeds.p2pool.io
NOTICE 2021-09-12 09:52:47.2861 P2PServer added 168.119.137.28:37889 from seeds.p2pool.io
NOTICE 2021-09-12 09:52:47.2863 P2PServer peer list loaded (105 peers)
NOTICE 2021-09-12 09:52:47.2863 P2PServer listening on [::]:37889
NOTICE 2021-09-12 09:52:47.2863 P2PServer listening on 0.0.0.0:37889
NOTICE 2021-09-12 09:52:47.2864 P2PServer event loop started
NOTICE 2021-09-12 09:52:47.5155 SideChain add_external_block: height = 102776, id = 572db0e40c0c84c1e00c0a53fae97cd77ccd4d005c9cbfea09d513e8580ff017, mainchain height = 2447695
NOTICE 2021-09-12 09:52:47.5600 SideChain add_block: height = 102776, id = 572db0e40c0c84c1e00c0a53fae97cd77ccd4d005c9cbfea09d513e8580ff017, mainchain height = 2447695, verified = 0
...

I understand that this rig is probably solo mining. Any clue to investigate further ?

Thanks for this great project and for your help.

Best regards,

Please provide a Detailed Guide for Noobs

Hi,
It would be better if you post a detailed guide setting up P2Pool on Windows from download binaries to setting up and then monitor. We don't know how to build and set up. Moreover, will appreciate if provide hints on setting up custom diff on xmrig and xmrig proxy. Thanks

miner statistics showing 0 hash rate at p2pool.observer

Several times when I look at the p2pool.observer, my hash rate is showing zero, but then I check my monerod, p2pool and workers, and all are working fine. I can see on the logs the jobs been allocated and the hash rate of the workers.

Also I checked and my IP isn't banned. Any ideas?

Include shares in JSON API

Hi,

I am trying to write a script that notifies me whenever my node finds a new share, but it appears that the JSON API enabled with --data-api does not expose information about shares.
Specifically, I would like the values of the "Your shares", "Your shares position" and "Block reward share" lines in the status output to be accessible in some way.

Since I run p2pool in docker, this would also allow me to access that info without first attaching to the container (and sometimes accidentally killing it instead of detaching).

Thanks!

README.md : information consistency

in the "How to test" section of the file, it is stated :

Check that ports 18080 (Monero p2p port) and 37889 (p2pool p2p port) are open in your firewall to ensure better connectivity

later in the code example :

Run ./monerod --zmq-pub tcp://127.0.0.1:18083 don't forget --zmq-pub parameter in the command line

I propose to align the port numbers on the same value.

Best regards,

p2pool stops processing

I am running Seth's docker containers as per his guide and have this morning updated the docker images to the latest available and restarted both the monero and the p2pool containers.

Unfortunately now it seems that p2pool starts and then just stops. Last message in the p2pool log says:

P2Pool get_miner_data RPC response is invalid, skipping it 

Xmrig can't connect to p2pool and asking for a status from p2pool shows:

2021-09-21 20:11:54.5566 SideChain status
Main chain height         = 0
Main chain hashrate       = 0 H/s
Side chain height         = 1
Side chain hashrate       = 10.000 KH/s
PPLNS window              = 0 blocks (+0 uncles, 0 orphans)
Your shares               = 0 blocks (+0 uncles, 0 orphans)
Block reward share        = 0.000% (0.000000000000 XMR)
2021-09-21 20:11:54.5566 Util no background jobs running

Monerod seems to be running ok, syncing with the monero network and monero cli wallets connected to the node work as expected.

What else can I do to trouble shoot?

Allow DNS resolution of `--host` flag

In order to simplify setups, it would be very nice if we could specify the host via DNS.

Not only does this simplify using your own remote node, it also greatly simplifies any Docker setup as you can simply connect p2pool and monerod via container name no matter what IP address it gets.

As an example, if --host allowed DNS resolution, the following compose file would be all you need to spin up monerod and p2pool with almost no other configuration:

https://github.com/sethsimmons/p2pool-docker/blob/main/examples/docker-compose.yml

Thanks in advance!

New User - Can't start mining on the pool

I need some support for mining in the pool. I already followed the Windows instructions and I have the Monerod.exe, p2pool.exe, and XMRig running. Looks like I am mining (I have mined with XMRig in other pools before. However I don't get any Monero. Is there something I'm doing wrong?
I have attached a screenshot of my PC. If someone can give support will be very appreciated.

Monero Mining

Need a --rpc-login option for monerod rpc

It seems that the current implementation does not let the user run p2pool with a monerod rpc which has restricted access by password / login. Would be very useful (at least for me)...

Ubuntu Compile Errors

Please help !
`CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
UV_LIBRARY
linked by target "p2pool" in directory /home/f/a/monero/p2pool
UV_LIBRARY_DEBUG
linked by target "p2pool" in directory /home/f/a/monero/p2pool
ZMQ_LIBRARY
linked by target "p2pool" in directory /home/f/a/monero/p2pool
ZMQ_LIBRARY_DEBUG
linked by target "p2pool" in directory /home/f/a/monero/p2pool

-- Configuring incomplete, errors occurred!
`

Possible to add a "--no-color" option?

Thank you for your work!

I have been running p2pool in sethsimmons docker of this repository, as I am running on Unraid. It appears with Unraid specifically the color codes in the output cause issues (as documented in the XMRig docker), and I was hoping it would be possible to add an option to toggle the colors off for the text output? I have no idea how difficult this might be. Otherwise the output just looks like this:

[0;36m2021-10-27 01:23:52.0455�[0m �[0;90mSideChain �[0madd_block: height = 474611, id = 2580549ebf9e7d83d4e5aa48b804414f059a6236626f4bcc9b9223a80c600a1b, mainchain height = 2479830, verified = 0�[0m

Error: failed to get random outputs to mix: failed to get random outs (Withdrawl issue)

Hello,

Environment:
P2Pool version monerod fully synced
Ubuntu 20.04

Issue:
Using monero-wallet-cli (latest version) to send produces the "Error: failed to get random outputs to mix: failed to get random outs".

I saw another post on reddit explaining local node has no cap, but i still get the same error.
https://www.reddit.com/r/Monero/comments/6w68ze/please_help_error_failed_to_get_random_outputs_to/

I know this is due to tiny dust amounts in my wallet, but is there a way to not accumulate dust balances?

My current solution is to group dust transactions into small amounts and combine them into bigger amount. This will be more inconvenient in the future as the dust payouts will get even smaller.

Thanks

Do not provide jobs to stratum clients until synchronized to highest known side-chain height

In the current implementation, p2pool will provide jobs immediately on startup to stratum clients, even if it is still syncing with the side-chain. This causes clients to get job spam and false shares to be "found" and logged with a diff of 100000 or 111111.

It would be ideal if p2pool paused job sending to stratum clients until fully synced with highest known side-chain height.

Example false shares found while p2pool was starting/syncing/verifying blocks:

NOTICE  2021-09-08 12:37:31.6415 StratumServer SHARE FOUND: mainchain height 2444927, diff 100000, effort 10.001%
NOTICE  2021-09-08 12:38:43.1568 StratumServer SHARE FOUND: mainchain height 2444928, diff 100000, effort 60.006%
NOTICE  2021-09-08 12:38:43.8692 StratumServer SHARE FOUND: mainchain height 2444928, diff 100000, effort 10.001%
NOTICE  2021-09-08 12:39:27.8570 StratumServer SHARE FOUND: mainchain height 2444929, diff 100000, effort 90.009%
NOTICE  2021-09-08 12:40:35.9209 StratumServer SHARE FOUND: mainchain height 2444930, diff 100000, effort 90.009%
NOTICE  2021-09-08 12:40:42.9515 StratumServer SHARE FOUND: mainchain height 2444930, diff 100000, effort 20.002%
NOTICE  2021-09-08 13:08:58.2760 StratumServer SHARE FOUND: mainchain height 2444942, diff 100000, effort 110.002%
NOTICE  2021-09-08 13:09:14.0703 StratumServer SHARE FOUND: mainchain height 2444942, diff 100000, effort 110.002%
NOTICE  2021-09-08 13:09:27.6229 StratumServer SHARE FOUND: mainchain height 2444942, diff 100000, effort 100.001%
NOTICE  2021-09-08 16:25:32.0452 StratumServer SHARE FOUND: mainchain height 2445024, diff 100000, effort 100.001%
NOTICE  2021-09-08 16:25:47.8264 StratumServer SHARE FOUND: mainchain height 2445024, diff 100000, effort 10.001%
NOTICE  2021-09-08 16:26:02.2404 StratumServer SHARE FOUND: mainchain height 2445024, diff 100000, effort 110.002%
NOTICE  2021-09-08 17:37:23.8036 StratumServer SHARE FOUND: mainchain height 2445071, diff 100000, effort 100.001%
NOTICE  2021-09-08 17:37:43.1492 StratumServer SHARE FOUND: mainchain height 2445071, diff 100000, effort 130.004%
NOTICE  2021-09-08 17:37:58.6347 StratumServer SHARE FOUND: mainchain height 2445071, diff 100000, effort 30.003%
NOTICE  2021-09-09 13:13:05.2804 StratumServer SHARE FOUND: mainchain height 2445633, diff 100000, effort 100.001%
NOTICE  2021-09-09 13:13:19.0744 StratumServer SHARE FOUND: mainchain height 2445633, diff 100000, effort 110.002%
NOTICE  2021-09-09 13:13:24.8260 StratumServer SHARE FOUND: mainchain height 2445633, diff 111111, effort 117.004%
NOTICE  2021-09-09 13:13:36.1705 StratumServer SHARE FOUND: mainchain height 2445633, diff 100000, effort 110.002%
NOTICE  2021-09-09 13:13:52.7460 StratumServer SHARE FOUND: mainchain height 2445633, diff 100000, effort 110.002%
NOTICE  2021-09-09 13:13:52.7495 StratumServer SHARE FOUND: mainchain height 2445633, diff 100000, effort 0.000%
NOTICE  2021-09-09 13:13:52.7528 StratumServer SHARE FOUND: mainchain height 2445633, diff 100000, effort 0.000%

RandomX_Hasher couldn't allocate RandomX cache

Hi,
I'm on Mac OSX and the Start of P2Pool I have the following error

Screenshot_2021-09-23 00 48 25_f9Qdg3

Is this linked to Huge Pages? I see "Prepare enough huge pages : sudo sysctl vm.nr_hugepages=3072" in the README.md but I don't know how.
The command "sudo sysctl vm.nr_hugepages=3072" give me -> "sysctl: unknown oid 'vm.nr_hugepages' "
Thanks for your help

P2Pool set up

Hi there
As I understood from README of this repo the setup structure of P2Pool is Monero node + P2Pool node + miner.

  • Can I use any public remote node with open port 18081 to P2Pool connecting?
  • For multiply workers with the same wallet address would it be better to split in few remote nodes or it does not matter since pool is decentralized?
    Thank you

For XMRig Config.json

Now, We must change the config.json.

question: \xmrig.exe -u -o 127.0.0.1 cannot run well

We need to set pools.url as '127.0.0.1:333' in config.json (I use xrmig 6.15.2)

I think we need to tell everyone in README

Illegal instruction on raspberry pi4

my environment is:
Raspberry pi4 8Gb
Os gentoo linux
All the packages required are installed

I compiled the code with:
make -j4
and I also tried as test
make release-static-linux-armv8
without errors.
the issue faces when I start the monero deamon:

2021-10-23 13:08:07.401 I Monero 'Oxygen Orion' (v0.17.2.3-7dbb0d1fc)
2021-10-23 13:08:07.401 I Initializing cryptonote protocol...
2021-10-23 13:08:07.401 I Cryptonote protocol initialized OK
2021-10-23 13:08:07.403 I Initializing core...
2021-10-23 13:08:07.403 I Loading blockchain from folder /root/.bitmonero/lmdb ...
Illegal instruction

I also tried the options -DAES_NO=ON, MONERO_USE_SOFTWARE_AES=1 and MONERO_RANDOMX_UMASK=8 with same Illegal instruction error.
After that, I tested the official monero version, master and also release-v0.17, and eithers run fine beginning the db sync.
How can I resolve the issue?

Question about the dependencies

I saw in the build instructions for ubuntu it is mentioned to install libuv, libsodium etc via the package installer.
I asked myself why this is the case, because those libs are in the project as submodule.

issues when running two monerod instances

I am trying to run two instance of monerod: One for mining with p2pool, another to give myself access to my node.

The instance for mining is run on 127.0.0.1 so that it is only visible for the p2pool program running on that machine: ./monerod --zmq-pub tcp://127.0.0.1:18083
The second instance is set to be exposed to the local network so that I can send query to it from e.g. monerujo: ./monerod --confirm-external-bind --rpc-bind-ip=192.168.1.101 --rpc-login [my login]/]my password] --rpc-bind-port 19081 --data-dir /home/[myuser]/.bitmonero --p2p-bind-port 19080 --no-zmq

Note that read/write access are properly set and that both instances are run on two different linux users.

When running p2pool --host 127.0.0.1 --rpc-port 18081 -zmq-port 18083 --stratum 192.168.1.101:3333 --p2p 127.0.0.1:37889 --wallet [my wallet]

I get several errors that appear time to time on the monero nodes:
Example:
2021-10-01 00:48:35.146 E failed to find transaction input in key images. img=<8a6829a3fc003429a770cf88e6222cd5a0af5bd2d9a88f4b37533d5d103a6c17>
2021-10-01 00:48:35.146 E transaction id =

And also:
2021-10-01 00:48:41.486 E Transaction not found in pool

When this happens I also get errors in p2pool console and logfile. Sorry I erased the logs so I do not have the exact error, but it is related to the synchronisation: p2pool is not able to update the block height and stay stuck at some height lower than what is reported by monerod.

The only way to get back to a proper functioning of p2pool is to:

  • delete p2pool.cache
  • stop the monero node exposed to the local network

What am I missing?

Trying to build on Slackware 14.2 (x64) box failed.

I had to patch CMakeLists.txt to accept the cmake version installed.

-if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.6.0") 
+if (${CMAKE_VERSION} VERSION_GREATER "3.5.1") 

And I ended up with this:

[ 61%] Building CXX object CMakeFiles/p2pool.dir/src/block_cache.cpp.o
In file included from /.../p2pool/src/common.h:282:0,
                 from /.../p2pool/src/block_cache.cpp:18:
/.../p2pool/src/util.h:125:13: error: specialization of ‘template<class _Tp> struct std::hash’ in different namespace [-fpermissive]
 struct std::hash<p2pool::hash>
             ^
In file included from /usr/include/c++/5.5.0/bits/basic_string.h:5574:0,
                 from /usr/include/c++/5.5.0/string:52,
                 from /usr/include/c++/5.5.0/stdexcept:39,
                 from /usr/include/c++/5.5.0/array:38,
                 from /usr/include/c++/5.5.0/tuple:39,
                 from /usr/include/c++/5.5.0/functional:55,
                 from /.../p2pool/src/common.h:41,
                 from /.../p2pool/src/block_cache.cpp:18:
/usr/include/c++/5.5.0/bits/functional_hash.h:58:12: error:   from definition of ‘template<class _Tp> struct std::hash’ [-fpermissive]
     struct hash;
            ^
CMakeFiles/p2pool.dir/build.make:182: recipe for target 'CMakeFiles/p2pool.dir/src/block_cache.cpp.o' failed
make[2]: *** [CMakeFiles/p2pool.dir/src/block_cache.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/p2pool.dir/all' failed
make[1]: *** [CMakeFiles/p2pool.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

P2pool server requirements? And separating P2pool + node to different VMs

Hello SChernykh,

im back. 2 Questions

  1. What is the recommended specification to run a p2pool + server.
    CPU cores ? RAM size?

  2. I read somewhere you said its possible to run p2pool and monerod node on different systems, how would this work?
    Would the miners point to the p2pool IP or the monerod node IP?

Thanks

p2pool does not bind any specified p2p or stratum ports

Hey there,

Trying to get p2pool spun up, but for some reason it does not bind any p2p or stratum ports, despite me clearly specifying them.

Attempted command line options:

./p2pool --wallet MoneroAddress --rpc-port 18085 --stratum 0.0.0.0:3333 --p2p 0.0.0.0:37889

./p2pool --wallet MoneroAddress --rpc-port 18085 --stratum "0.0.0.0:3333" --p2p "0.0.0.0:37889"

Netstat shows no p2p or stratum ports bound:

netstat -tulpn | grep p2pool
tcp        0      0 127.0.0.1:37891         0.0.0.0:*               LISTEN      3268027/./p2pool

XMRig cannot connect:

[2021-09-03 18:53:38.868]  net      node.sethforprivacy.com:3333 connect error: "connection refused"

Connection is refused when tested via telnet:

telnet 5.9.120.18 3333
Trying 5.9.120.18...
telnet: Unable to connect to remote host: Connection refused

Firewall is allowing both ports:

ufw status
Status: active

To                         Action      From
--                         ------      ----
3333/tcp                   ALLOW       Anywhere
3333/tcp (v6)              ALLOW       Anywhere (v6)

Version info:

OS -- Ubuntu 20.04.3 LTS
p2pool -- 661d596
monerod -- v0.17.1.9-30bc57550

monero#p2pool-api-v0.17 fails with boost 1.77

Hi!

trying to build the fork against the boost 1.77 is currently yielding the following

#37 21.49 /src/src/common/i18n.cpp: In function 'std::string i18n_get_language()':
#37 21.49 /src/src/common/i18n.cpp:74:8: error: 'transform' is not a member of 'std'
#37 21.49    74 |   std::transform(language.begin(), language.end(), language.begin(), tolower);
#37 21.49       |        ^~~~~~~~~

mj recently provided a fix for it though: monero-project/monero#7902

I believe that if we rebase the fork with release-v0.17 we should be good (latest commit there seems to be from 10 days ago, fix is 7 ago)

thanks!

monerod sync Error

Hi,
I am syncing monerod through powershell command and completed about 85% then it starts giving below error.
"Failed to get top block hash to check for new block's parent: MDB_NOTFOUND: No matching key/data pair found" as well as its blocking all peers one by one.
Please advise to solve it.
Sc-1

Payout issue

I have been running p2pool for a few days now, mining with 20-25khs and i realized I used the pool wallet for this line here. "/p2pool --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 --addpeers 65.21.227.114:37889"

My question is how do you allow other people to mine on your node? I was hoping to this up for my friends and me. I originally put it in the pool wallet but all the funds just went there regardless of XMRIG's wallet.

Anything I should look into?

Thanks!

Buil for old OSX

The last Release is built for OSX 10.15 and cannot be used on 10.13.
when I build it myself from the source I have an error "couldn't allocate RandomX cache, aborting. Abort trap: 6"
what does it correspond to?

How to contribute?

Hey i realy like the project and would like to help/contribute.
Is there a short guide how to contribute or a list of TODOs?
I could help refactoring the code in some places.

Todo?

I would appreciate if there would be a list of things to do for people who would be willing to contribute :)
I think there would be much more contributions, if people would know what the Creator wants to be done. ^^

Adding background run option for headless servers

Hello,

I propose to add the option like the "--detach" in monerod to run p2pool in background. This is useful for the headless machines to avoid dependency on the ssh session.

Actually, I am using "screen" function to run p2pool in background.

Best regards,

Jef

Can't be compiled.

Hi, I've tried to compile monerod on multiple Linux distros but no success.
I got this:
Screenshot 2021-09-29 at 11 16 30

Lag on M1 Mac

Hi,
Everything builds ok now, but p2Pool causes my Mac to lag out to the point of hardly being usable. Also then with XMRIG run too it only ever shows 'No results' when I press S key.

Is there some sort of diagnostic file I can send you?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.