jtgrassie / monero-pool

A Monero mining pool server written in C
BSD 3-Clause "New" or "Revised" License
344 stars 125 forks source link

log: add addr, round hr, net dif, height to MINED #93

Closed gavinbarnard closed 3 years ago

gavinbarnard commented 3 years ago

Logging changes, use case to scrape logs for effort data when block is found.

2021-07-26 23:55:36 TRACE src/pool.c:3275: Miner submitted nonce=98345, result=c6136bb90ec8468bcbfa85ff90d5939e9f19eec3cc571e7240e478aea7e22c00, host=127.0.0.1:46828, address=5BXAsDboVYEQ, rig_id=monero_pool_int_test
2021-07-26 23:56:08 TRACE src/pool.c:3275: Miner submitted nonce=98520, result=7cdf6c66475d403140f1d49ac35f080f3c3c77a41ce1815187db5c7f80a52e00, host=127.0.0.1:46828, address=5BXAsDboVYEQ, rig_id=monero_pool_int_test
2021-07-26 23:56:08 TRACE src/pool.c:3275: Miner submitted nonce=34017, result=720d1089a6e7e387c4c1d5ff153c13b0194667189de1ce5498fce688ac620100, host=127.0.0.1:46828, address=5BXAsDboVYEQ, rig_id=monero_pool_int_test
2021-07-26 23:56:08 TRACE src/pool.c:3275: Miner submitted nonce=34160, result=260d640d1147853376924766ff4914aa35d77de00928a3da250853b4e63d2200, host=127.0.0.1:46828, address=5BXAsDboVYEQ, rig_id=monero_pool_int_test
2021-07-26 23:56:20 INFO  src/pool.c:3466: +++ MINED A BLOCK +++ address=55hKAMnUWXaW, round=609000, diff=600000, height=2756
2021-07-26 23:57:13 INFO  src/pool.c:3466: +++ MINED A BLOCK +++ address=55hKAMnUWXaW, round=631107, diff=600000, height=2757
2021-07-26 23:59:29 INFO  src/pool.c:3466: +++ MINED A BLOCK +++ address=55hKAMnUWXaW, round=660352, diff=600000, height=2758
2021-07-26 23:59:36 INFO  src/pool.c:3466: +++ MINED A BLOCK +++ address=55hKAMnUWXaW, round=300000, diff=600000, height=2759
2021-07-27 00:00:33 INFO  src/pool.c:3466: +++ MINED A BLOCK +++ address=5BXAsDboVYEQ, round=327764, diff=600000, height=2760
jtgrassie commented 3 years ago

Quick question, might it be better to make this more explanatory?

55hKAMnUWXaW 300000 / 600000 2604
address=55hKAMnUWXaW, round=300000, net=600000, height=2604

That's how the other log messages are when we output useful/interesting data.

gavinbarnard commented 3 years ago

Quick question, might it be better to make this more explanatory?

55hKAMnUWXaW 300000 / 600000 2604
address=55hKAMnUWXaW, round=300000, net=600000, height=2604

That's how the other log messages are when we output useful/interesting data.

This makes sense, I'll update with field names