Closed alicedb2 closed 9 months ago
https://github.com/monero-ecosystem/PiNode-XMR/commit/29b438f7698c80b7362f52abc87d4d447802bb7f
Thanks for flagging this.
I'm currently testing a fix which applies our start method for the OnionBlockExplorer to P2Pool.
It uses the variable bootstatus.sh
which is set 1 - 7 by Monerod starting to flag what Monerod RPC port or RPC login credentials may be required.
Open to other ideas?
Great!
Speaking of BOOT_STATUS
, could we list them somewhere? Only way I could figure out their meaning was to grep all scripts:
pinodexmr@PiNodeXMR:~$ grep -R "BOOT_STATUS=" *
bootStatusSetIdle.sh:BOOT_STATUS=2" > /home/pinodexmr/bootstatus.sh
bootstatus.sh:BOOT_STATUS=3
execScripts/moneroTorPrivate.sh:BOOT_STATUS=4" > /home/pinodexmr/bootstatus.sh
execScripts/moneroMiningNode.sh:BOOT_STATUS=5" > /home/pinodexmr/bootstatus.sh
execScripts/moneroPrivate.sh:BOOT_STATUS=3" > /home/pinodexmr/bootstatus.sh
execScripts/moneroPublicRPCPay.sh:BOOT_STATUS=6" > /home/pinodexmr/bootstatus.sh
execScripts/moneroTorPublic.sh:BOOT_STATUS=9" > /home/pinodexmr/bootstatus.sh
execScripts/moneroPublicFree.sh:BOOT_STATUS=7" > /home/pinodexmr/bootstatus.sh
execScripts/moneroI2PPrivate.sh:BOOT_STATUS=8" > /home/pinodexmr/bootstatus.sh
Would it make sense to maybe use a bit/hexmask instead of a sequential integer so that we can also keep track of the configuration state of other things like p2pool/standalone tor/atomic swaps and so on?
(sorry, off-topic, maybe that's something to be discussed elsewhere)
Commit https://github.com/monero-ecosystem/PiNode-XMR/commit/481b2ef7dcf0dfbae17902bc1af6ae1ab6caaa2b has merged the upgraded P2Pool start file and included key for index numbers for Monerod configuration for what's going on.
Tested with: tor Public and Private Clearnet Public and Private Monerod Idle - Now gives systemd failure (auto-restart), with "Error: Monerod not running" printed in P2Pool log
Going forwards, I see why on the face of it a hex key rather than integers may make sense but the BOOT_STATUS number index is entirely driven by the configuration status of Monerod. Monerod sets the BOOT_STATUS number and the other integrated projects - blockexplorer, P2Pool etc - use that reference number to know how and with what parameters to talk to Monerod. There are currently only 7 major configurations, and internal minor configurations are handled by options flags sourced at time of script execution by pulling in variables from the /home/pinodexmr/variables directory, for if a user has set a custom RPC/P2P port etc.
2 = Idle, Monero not running (Set whenever ANY stop button is pressed)
3 = private node 4 = tor private 5 = solo mining 6 = Public RPC pay 7 = Public free 8 = I2P 9 = tor public
I'll add the above key to the other files in which it's used to hopefully clarify what's going on. As always though I'm open to changing it if there is a better method.
Closing this particular issue but can re-open for P2Pool.sh related problems. BOOT_STATUS discussion could be a new issue.
I run a private monero node together with a p2pool node. I had to modify
execScripts/p2pool.sh
because p2pool was complaining about rpc authentication errors. I was getting a constant stream of the following two lines in p2pool.log :and p2pool was failing to synchronize complaining about invalid shares and a p2pool block height of 0.
I added the following lines at the beginning of
execScripts/p2pool.sh
and appended
--rpc-login
to the commandFor reference, the private monero node is running under the following command