conflux-rust icon indicating copy to clipboard operation
conflux-rust copied to clipboard

Didn't seem to receive mining bonus

Open justinpan0 opened this issue 7 years ago • 4 comments

System Config:

Microsoft Windows [Build 17134]
Windows Subsystem for Linux

console log for the past 2 minutes:

2019-04-08T22:58:01.575270400-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230434432 26151 26149 19375 0 2339908 0
2019-04-08T22:58:06.584616-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230435088 26152 26150 19375 0 2339914 0
2019-04-08T22:58:11.602708700-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230437736 26153 26151 19375 0 2339928 0
2019-04-08T22:58:16.613143500-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230437736 26153 26151 19375 0 2339943 0
2019-04-08T22:58:21.539654400-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230438392 26155 26153 19375 0 2339957 0
2019-04-08T22:58:26.539251400-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230438720 26156 26154 19375 0 2339972 0
2019-04-08T22:58:31.547013600-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230439048 26157 26155 19375 0 2339983 0
2019-04-08T22:58:36.572629400-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230439048 26157 26155 19375 0 2340001 0
2019-04-08T22:58:41.578057600-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463200 26158 26156 19375 0 2340016 0
2019-04-08T22:58:46.585643600-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463200 26158 26156 19375 0 2340016 0
2019-04-08T22:58:51.640608900-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463528 26159 26157 19375 0 2340016 0
2019-04-08T22:58:56.623148400-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463528 26159 26157 19375 0 2340016 0
2019-04-08T22:59:01.633678-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463528 26159 26157 19375 0 2340016 0
2019-04-08T22:59:06.750339600-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463528 26159 26157 19375 0 2340016 0
2019-04-08T22:59:11.549894-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463856 26160 26158 19375 0 2340016 0
2019-04-08T22:59:16.586198200-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463856 26160 26158 19375 0 2340016 0
2019-04-08T22:59:21.560062100-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463856 26160 26158 19375 0 2340016 0
2019-04-08T22:59:26.567145500-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230463856 26160 26158 19375 0 2340016 0
2019-04-08T22:59:31.577901100-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230464184 26161 26159 19375 0 2340016 0
2019-04-08T22:59:36.633956900-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230464512 26162 26160 19375 0 2340016 0
2019-04-08T22:59:41.696795200-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230480216 26163 26161 19375 0 2340016 0
2019-04-08T22:59:46.630989200-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230480216 26163 26161 19375 0 2340016 0
2019-04-08T22:59:51.625480400-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230480216 26163 26161 19375 0 2340016 0
2019-04-08T22:59:56.626987200-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230481200 26166 26165 19375 0 2340016 0
2019-04-08T23:00:01.550719300-04:00 INFO cfxcore::sync::synchronization_graph - Before gc cache_size=1230481528 26167 26165 19375 0 2340016 0

default.toml:

public_address="[my public ip address]:32323" 
port=32323
udp_port=32323

start_mining=true
mining_author="37be1438b30f0b99a620ae219bc7a59dc1a88cec"

jsonrpc_tcp_port=12536
jsonrpc_http_port=12537

I have been running the full node for two days but I did not seem to notice any increase from Conflux Wallet Web app. Other functions such as transfer and deploy smart contract worked fine.

justinpan0 avatar Apr 09 '19 04:04 justinpan0

It's possible that your node never actually caught up with the rest of the network, in which case you most likely won't receive mining reward for your mined blocks. Recently, the pending tx pool is empty, so you also won't earn tx fees.

You can send an RPC request to your node to check what epoch it's on:

$ curl -X POST --data '{"jsonrpc":"2.0","method":"cfx_epochNumber","params":[],"id":1}' -H "Content-Type: application/json" http://[your ip]:12537
{"jsonrpc":"2.0","result":"0x26969","id":1}

(The latest epoch is 158057/0x26969.)

I am having the same issue. I suppose it's either due to a bug in the sync code, or due to hardware constraints (the config says the node is optimized for 16Gb RAM).

Thegaram avatar Apr 23 '19 00:04 Thegaram

The sync code did have some bugs which I have fixed some recently. There is still a known issue unsolved so far. That is when sync the blocks which contains lots of transactions, the cpu will soon get bottlenecked due to the verification of transaction signature. Based on my measurement, the largest throughput of transaction verification is about 10k tps in aws vm server, this in turn translates to about 20 blocks to sync per 5 seconds. So the catch-up can be slow in this situation. The current sync implementation may also make message handling thread blocked on transaction verification, so it cannot receive messages in time and hence incur many network disconnection/re-connection. We will fix this issue soon.

sparkmiw avatar Apr 23 '19 03:04 sparkmiw

I can confirm that a node with 16GB RAM can catch up fairly quickly with the testnet and start receiving mining rewards. I've also had cases where my syncing node stopped abruptly with the message "Killed" -- this might correspond to the bug mentioned.

Thegaram avatar Apr 24 '19 07:04 Thegaram

@zimengpan does this still bother you. Our codebase has evolved much and if this issue has disappeared, I would like to close it.

sparkmiw avatar May 14 '19 07:05 sparkmiw