SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.08k stars 128 forks source link

p2pool peer "is ahead on mainchain" #115

Closed tczee36 closed 2 years ago

tczee36 commented 2 years ago

Hello im back,

run into a weird bug on using my p2pool.

my p2pool is attached to a remote monerod node, but p2pool's log is showing the following:

2022-02-13 23:38:27.3857 SideChain verified block at height = 1374907, depth = 0, id = 772fa427e2aa3effd434db38c7bf7893b8b919ddeec3b5c4bbc22d78ed7305c5, mainchain height = 2558957
2022-02-13 23:38:27.3857 P2PServer Trying to broadcast a block 772fa427e2aa3effd434db38c7bf7893b8b919ddeec3b5c4bbc22d78ed7305c5 ahead on mainchain (mainchain height 2558957, current height is 2558276)
2022-02-13 23:38:27.3858 SideChain new chain tip: next height = 1374908, next difficulty = 1300791931, main chain height = 2558957
2022-02-13 23:38:27.3859 BlockTemplate base  reward = 0.703381772395 XMR, 40 transactions, fees = 0.001300520000 XMR, weight = 115578
2022-02-13 23:38:27.3863 BlockTemplate final reward = 0.704682292395 XMR, weight = 118402, outputs = 72, 40 of 40 transactions included
2022-02-13 23:38:27.3899 P2PServer peer 98.28.252.84:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:27.3979 P2PServer peer 198.211.120.53:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:27.4321 P2PServer peer 84.195.108.87:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:27.4321 P2PServer peer 62.210.244.4:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:27.4504 P2PServer peer 91.200.124.137:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:27.7694 P2PServer peer 189.36.128.26:37899 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:28.0460 P2PServer peer 177.105.248.130:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.8084 P2PServer peer 188.192.63.99:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.8086 SideChain add_external_block: block is built on top of an unknown mainchain block a69145e9727da1671f957c8e993497859fc8abf083b73c7cb0582f0f2c6a50eb, mainchain reorg might've happened
2022-02-13 23:38:45.8100 SideChain add_external_block: couldn't get mainchain difficulty for height = 2558957
2022-02-13 23:38:45.8101 SideChain add_block: height = 1374908, id = 8a79344631eb23df36afd2b3c89be4b70884b055fa40e6b04471f84d66803ae8, mainchain height = 2558957, verified = 0
2022-02-13 23:38:45.8139 SideChain verified block at height = 1374908, depth = 0, id = 8a79344631eb23df36afd2b3c89be4b70884b055fa40e6b04471f84d66803ae8, mainchain height = 2558957
2022-02-13 23:38:45.8139 P2PServer Trying to broadcast a block 8a79344631eb23df36afd2b3c89be4b70884b055fa40e6b04471f84d66803ae8 ahead on mainchain (mainchain height 2558957, current height is 2558276)
2022-02-13 23:38:45.8140 SideChain new chain tip: next height = 1374909, next difficulty = 1300430409, main chain height = 2558957
2022-02-13 23:38:45.8141 BlockTemplate base  reward = 0.703381772395 XMR, 40 transactions, fees = 0.001300520000 XMR, weight = 115578
2022-02-13 23:38:45.8143 BlockTemplate final reward = 0.704682292395 XMR, weight = 118402, outputs = 72, 40 of 40 transactions included
2022-02-13 23:38:45.8160 P2PServer peer 198.211.120.53:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.8259 P2PServer peer 98.28.252.84:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.8263 P2PServer peer 91.200.124.137:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.8310 P2PServer peer 84.195.108.87:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.8896 P2PServer peer 202.130.123.154:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.9205 P2PServer peer 62.210.244.4:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:45.9471 P2PServer peer 221.176.214.214:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:46.1272 P2PServer peer 189.36.128.26:37899 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?
2022-02-13 23:38:46.3181 P2PServer peer 177.105.248.130:37889 is ahead on mainchain (height 2558957, your height 2558276). Is your monerod stuck or lagging?

i checked the monerod node, its not lagging and fully updated to the latest block height.

everything is fixed when i restart p2pool

what could be the reason for the lagging error? my network? or something else.

thanks

SChernykh commented 2 years ago

What command line do you use for monerod?

tczee36 commented 2 years ago

this monerod node is used as a public node and as well as for p2pool usage

./monerod --data-dir ~/blockchain/ --prune-blockchain --zmq-pub tcp://0.0.0.0:18083 --disable-dns-checkpoints --enable-dns-blocklist --rpc-bind-ip 0.0.0.0 --rpc-bind-port 18081 --restricted-rpc --public-node --confirm-external-bind

SChernykh commented 2 years ago

Check status in monerod, it stopped syncing for some reason. The second possibility is that ZMQ in monerod stopped updating. What's the monerod version you use? v0.17.3.0?

tczee36 commented 2 years ago

the monerod is running 0.17.3.0-release

some log from monerod

2022-02-11 22:08:51.244 W ge_frombytes_vartime failed at 415                                                                                                                                 
2022-02-12 01:41:38.138 E Invalid ZMQ/Sub message                                                                                                                                            
2022-02-12 02:42:02.461 I Host 192.99.154.164 unblocked.                                                                                                                                     
2022-02-12 05:59:53.682 I Host 94.23.147.238 unblocked.                                                                                                                                      
status                                                                                                                                                                                       
Height: 2557661/2557661 (100.0%) on mainnet, not mining, net hash 3.13 GH/s, v14, 17(out)+69(in) connections, uptime 2d 12h 59m 51s                                                          
2022-02-12 06:42:41.364 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2557664                                                                                                                 
2022-02-12 06:42:41.366 I id:   <d9fea0a837d906448387356bdfcd694f427016e0d4bd2ad628e6493aca981d1d>                                                                                           
2022-02-12 06:42:41.366 I PoW:  <4484d2e1bb287085d2fe9feb8b0b5a4b27459231b50086e68b39260000000000>                                                                                           
2022-02-12 06:42:41.366 I difficulty:   374913441256                                                                                                                                         
2022-02-12 06:52:09.447 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2548912                                                                                                                 
2022-02-12 06:52:09.449 I id:   <848502093bfe03d200a9adbfd95b06d895be8698f16492b2894050fdf1ca942c>                                                                                           
2022-02-12 06:52:09.449 I PoW:  <f5c285d0a0ca03fe0b041dc42dc702486cc8e675e524925ca041d40100000000>                                                                                           
2022-02-12 06:52:09.449 I difficulty:   413596870603                                                                                                                                         
2022-02-12 10:04:00.752 I Host 71.104.24.10 unblocked.                                                                                                                                       
status                                                                                                                                                                                       
Height: 2558124/2558124 (100.0%) on mainnet, not mining, net hash 2.85 GH/s, v14, 14(out)+64(in) connections, uptime 3d 4h 15m 36s                                                           
2022-02-12 22:18:42.989 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:19:14.626 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:20:12.204 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:21:05.492 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:21:19.028 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:21:37.051 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:22:23.094 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:22:38.897 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:23:14.809 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:23:41.039 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:24:08.761 E Transaction not found in pool                                                                                                                                      
2022-02-12 22:39:43.694 I Host 89.191.97.191 blocked.                                                                                                                                        
2022-02-13 00:24:23.319 E Invalid ZMQ/Sub message                                                                                                                                            
2022-02-13 01:13:48.416 I Host 192.99.154.164 blocked.                                                                                                                                       
2022-02-13 03:02:25.817 I Host 51.89.181.95 blocked.                                                                                                                                         
2022-02-13 03:31:55.359 I Host 85.206.163.148 unblocked.                                                                                                                                     
2022-02-13 03:46:56.185 W There were 53 blocks in the last 60 minutes, there might be large hash rate changes, or we might be partitioned, cut off from the Monero network or under attack, o
r your computer's time is off. Or it could be just sheer bad luck.                                                                                                                           
2022-02-13 03:48:26.205 W There were 53 blocks in the last 60 minutes, there might be large hash rate changes, or we might be partitioned, cut off from the Monero network or under attack, o
r your computer's time is off. Or it could be just sheer bad luck.                                                                                                                           
2022-02-13 03:58:58.078 W There were 72 blocks in the last 90 minutes, there might be large hash rate changes, or we might be partitioned, cut off from the Monero network or under attack, o
r your computer's time is off. Or it could be just sheer bad luck.
2022-02-13 04:58:06.137 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2558389                                                                                                        [61/1910]
2022-02-13 04:58:06.138 I id:   <5a20ea3645b0b584020327d2df10d14b2dab895ccab02bd578bd3f9552d939cf>                                                                                           
2022-02-13 04:58:06.138 I PoW:  <5d84f6356f1f95402e7c7c723a7ae34633189c005403a28eeb2cd10100000000>                                                                                           
2022-02-13 04:58:06.138 I difficulty:   375055069405                                                                                                                                         
2022-02-13 05:49:12.344 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2558409                                                                                                                 
2022-02-13 05:49:12.345 I id:   <c264494fb240ebf111a093d3d1812aa1bd2c93aeea6941e311adac450255ac87>                                                                                           
2022-02-13 05:49:12.345 I PoW:  <32f05b957e97cae6f56b7f0ca559d5fabecb5fbb10680c15c589ee0100000000>                                                                                           
2022-02-13 05:49:12.345 I difficulty:   379382784535                                                                                                                                         
2022-02-13 05:52:30.224 I ###### REORGANIZE on height: 2558409 of 2558409 with cum_difficulty 171721077289726147                                                                             
2022-02-13 05:52:30.225 I  alternative blockchain size: 2 with cum_difficulty 171721455388202987                                                                                             
2022-02-13 05:52:31.576 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2558409                                                                                                                 
2022-02-13 05:52:31.576 I id:   <8b17dc79319f72707198181e3a16001b97e98a03e1be824005a389d41f976c28>                                                                                           
2022-02-13 05:52:31.576 I PoW:  <b4876839fd93eafd8979723219408f46193965f550fb19470d84610200000000>                                                                                           
2022-02-13 05:52:31.576 I difficulty:   379382784535                                                                                                                                         
2022-02-13 05:52:32.613 I REORGANIZE SUCCESS! on height: 2558409, new blockchain size: 2558411                                                                                               
2022-02-13 06:15:00.515 E Verification failure                                                                                                                                               
2022-02-13 08:31:59.412 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2558492                                                                                                                 
2022-02-13 08:31:59.413 I id:   <f255450d96170eb30b7eb9f1ecdc85867eeed2c4e0eea5e89fd3e1fb8fafac4b>                                                                                           
2022-02-13 08:31:59.413 I PoW:  <5c094966183c253b04563ee26c8e0c0e4da8f31228996f0f12339c0000000000>                                                                                           
2022-02-13 08:31:59.413 I difficulty:   386231711025                                                                                                                                         
2022-02-13 08:34:39.257 I ###### REORGANIZE on height: 2558492 of 2558492 with cum_difficulty 171753228606492867                                                                             
2022-02-13 08:34:39.258 I  alternative blockchain size: 2 with cum_difficulty 171753614962438140                                                                                             
2022-02-13 08:34:40.634 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2558492                                                                                                                 
2022-02-13 08:34:40.635 I id:   <990e5985ec70cd278467bd2d7e0db41587c5a1f48a954cb480e85988f4376c3a>                                                                                           
2022-02-13 08:34:40.635 I PoW:  <ef3fcc9a5cd13016b1a27d0c916443a97cf98cbd0e51e4d91007960000000000>                                                                                           
2022-02-13 08:34:40.635 I difficulty:   386231711025                                                                                                                                         
2022-02-13 08:34:41.641 I REORGANIZE SUCCESS! on height: 2558492, new blockchain size: 2558494                                                                                               
2022-02-13 09:12:47.997 I Host 51.255.233.156 blocked.
2022-02-13 12:09:54.814 W There were 22 blocks in the last 90 minutes, there might be large hash rate changes, or we might be partitioned, cut off from the Monero network or under attack, o
r your computer's time is off. Or it could be just sheer bad luck.
2022-02-13 12:11:27.347 W There were 22 blocks in the last 90 minutes, there might be large hash rate changes, or we might be partitioned, cut off from the Monero network or under attack, o
r your computer's time is off. Or it could be just sheer bad luck.
2022-02-13 13:01:08.417 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2558604
2022-02-13 13:01:08.418 I id:   <b9ce0181e2b76b65f6bb8587feab3b197de748a66774009ca5d7efff3702128c>
2022-02-13 13:01:08.418 I PoW:  <6f93efc0d96266221a85c18bcde3c2ed73735197ae0cbe98fc50960200000000>
2022-02-13 13:01:08.418 I difficulty:   392334843558
2022-02-13 19:50:01.289 I ----- BLOCK ADDED AS ALTERNATIVE ON HEIGHT 2558821
2022-02-13 19:50:01.293 I id:   <924f76153aca992949c768ab38c666d0da5d45527ee493b8cdb3ca0e4814b280>
2022-02-13 19:50:01.293 I PoW:  <76a8fce4985864cf029880a2dfdb8440988eca9759fcf4480ff72f0100000000>
2022-02-13 19:50:01.293 I difficulty:   389172197115
2022-02-13 22:58:45.167 W ge_frombytes_vartime failed at 415
2022-02-13 23:19:18.270 I Host 89.191.97.191 unblocked.
2022-02-13 23:20:37.912 I Host 89.191.97.191 blocked.
SChernykh commented 2 years ago

@westz36 Do you still have this problem? If not, I'll close this issue. The only error I see in your log is

2022-02-12 01:41:38.138 E Invalid ZMQ/Sub message

which means monerod didn't recognize what p2pool sent. Are you sure it's the latest monerod version?