iceland2k14 / solominer

Solo Mining in python for BTC Block Reward, Pure luck
MIT License
80 stars 31 forks source link

What is displayed in the log to assert a block was confirmed / contrib by the mighty little miner :D #20

Open mikejnpc opened 1 year ago

mikejnpc commented 1 year ago

Hey Iceland,... i am just wondering what is the confirmation , when something has fallen under your controi ? I realize its a luck aspect and the mice waits for the moment to steal the cheese..

well i see it all...but what does a victory look like... hehe

2023-01-14 12:44:33,645 [] Working to solve block with height 771898 2023-01-14 12:47:10,902 [] New block 1a56a6a5d95c9162376967689dce96fbee5d5e2a0000e6880000000000000000 detected on network 2023-01-14 12:47:10,902 [] Best difficulty will trying to solve block 771898 was 0.01902143088857751 2023-01-14 12:47:10,902 [] Bitcoin Miner restarted 2023-01-14 12:47:10,902 [] New block 1a56a6a5d95c9162376967689dce96fbee5d5e2a0000e6880000000000000000 detected on network 2023-01-14 12:47:10,902 [] Best difficulty will trying to solve block 771898 was 0.00506732082392347 2023-01-14 12:47:10,902 [] Bitcoin Miner restarted 2023-01-14 12:47:10,902 [] New block 1a56a6a5d95c9162376967689dce96fbee5d5e2a0000e6880000000000000000 detected on network 2023-01-14 12:47:10,902 [] Best difficulty will trying to solve block 771898 was 0.009443092288027487 2023-01-14 12:47:10,902 [] Bitcoin Miner restarted 2023-01-14 12:47:10,903 [] New block 1a56a6a5d95c9162376967689dce96fbee5d5e2a0000e6880000000000000000 detected on network 2023-01-14 12:47:10,903 [] Best difficulty will trying to solve block 771898 was 0.03310630232032641 2023-01-14 12:47:10,903 [] Bitcoin Miner restarted 2023-01-14 12:47:21,128 [] Working to solve block with height 771899 2023-01-14 12:47:21,139 [] Working to solve block with height 771899 2023-01-14 12:47:21,214 [] Working to solve block with height 771899 2023-01-14 12:47:26,770 [*] Working to solve block with height 771898

Working on solving block height 771898 2023-01-14 12:47:57,879 [] New hash: 00000006971133bad835942f0813408f8276ac2a3e4823116fbda2f758881e5a for block 771899 2023-01-14 12:48:31,045 [] New hash: 0000000ee1c002473d7d1a21336b721e9757334fe6ce445fb7e44d65e065bad4 for block 771899 2023-01-14 12:51:19,087 [] New hash: 00000006208c909db6b8eabb991fe4f709c88199a33a2289c3165442ec40d3e7 for block 771899 2023-01-14 12:57:23,701 [] New hash: 000000046e68816be28c84e33c2ea7e64a91ba368a769473e24e568b26da2862 for block 771898 2023-01-14 12:59:08,660 [] New hash: 0000000445016021856577afd3e337480b24a1216d93e15b337e09d8acc5015b for block 771899 2023-01-14 13:00:21,537 [] New hash: 00000003bf3e43725c557b62e5a1bc7d96f809be23c4565dae6e948e3e5f35fc for block 771899 2023-01-14 13:01:24,403 [] A new block 4dd79c28b46f536a6d85999eab5941d8eb7573ed0006e77c0000000000000000 was found in the network 2023-01-14 13:01:24,403 [] Best difficulty when trying to solve block 771898 was 0.22566832150914773 2023-01-14 13:01:24,403 [] Bitcoin Miner restarted 2023-01-14 13:01:24,404 [] A new block 4dd79c28b46f536a6d85999eab5941d8eb7573ed0006e77c00000000000000000 was found in the network 2023-01-14 13:01:24,404 [] A new block 4dd79c28b46f536a6d85999eab5941d8eb7573ed0006e77c00000000000000000 was found in the network 2023-01-14 13:01:24,404 [] 77190 2023-01-14 13:01:24,403 [] A new block 4dd79c28b46f536a6d85999eab5941d8eb7573ed0006e77c0000000000000000 was found in the network 2023-01-14 13:01:24,403 [] Best difficulty when trying to solve block 771898 was 0.22566832150914773 2023-01-14 13:01:24,403 [] Bitcoin Miner restarted 2023-01-14 13:01:24,404 [] A new block 4dd79c28b46f536a6d85999eab5941d8eb7573ed0006e77c00000000000000000 was found in the network 2023-01-14 13:01:24,404 [] A new block 4dd79c28b46f536a6d85999eab5941d8eb7573ed0006e77c00000000000000000 was found in the network 2023-01-14 13:01:24,404 [] The best difficulty when trying to solve block 771899 was 0.26687705011105006 2023-01-14 13:01:24,404 [] Bitcoin Miner restarted 2023-01-14 13:01:24,404 [] The best difficulty when trying to solve block 771899 was 0.16320815395083416 2023-01-14 13:01:24,404 [] Bitcoin Miner restarted 2023-01-14 13:01:24,404 [] A new block 4dd79c28b46f536a6d85999eab5941d8eb7573ed0006e77c00000000000000000 was found in the network 2023-01-14 13:01:24,404 [] Best difficulty when trying to solve block 771899 was 0.06719600962373114 2023-01-14 13:01:24,404 [] Bitcoin Miner restarted 2023-01-14 13:01:34,605 ​​[] Work on 771900 height block solution 2023-01-14 13:01:34,624 [] Working on a block height of 771900

I see alot of restarts..... and alot of attempts... and not sure what a victory would resemble .... can you please show that? ...... and thank you.

GitHappens2Me commented 1 year ago

A bit late to the Party but I can give you some idea on what the output will look like. If you look in the Code, you will find:


logg('[*] Block {} solved.'.format(work_on+1))
logg('[*] Block hash: {}'.format(hash))
logg('[*] Blockheader: {}'.format(blockheader))            
payload = bytes('{"params": ["'+address+'", "'+ctx.job_id+'", "'+ctx.extranonce2 \
                +'", "'+ctx.ntime+'", "'+nonce+'"], "id": 1, "method": "mining.submit"}\n', 'utf-8')
logg('[*] Payload: {}'.format(payload))
ctx.sock.sendall(payload)
ret = ctx.sock.recv(1024)
logg('[*] Pool response: {}'.format(ret))

logg() is responsible for logging into the miner.log file. So the output will look something like this:

[*] Block 871899 solved.
[*] Block hash: 000000000000000000000000e5a1bc7d96f809be23c4565dae6e948e3e5f35fc
[*] Payload: <the byte representation of the block>
[*] Pool response: <the Response from the mining Pool> 
mikejnpc commented 1 year ago

awesome .. thank you for that :)

if you have a modded version that works ... would be even better :)

On Fri, Jun 2, 2023 at 10:18 AM GitHappens2Me @.***> wrote:

A bit late to the Party but I can give you some idea on what the output will look like. If you look in the Code, you will find:

logg('[] Block {} solved.'.format(work_on+1)) logg('[] Block hash: {}'.format(hash)) logg('[] Blockheader: {}'.format(blockheader)) payload = bytes('{"params": ["'+address+'", "'+ctx.job_id+'", "'+ctx.extranonce2 \ +'", "'+ctx.ntime+'", "'+nonce+'"], "id": 1, "method": "mining.submit"}\n', 'utf-8') logg('[] Payload: {}'.format(payload)) ctx.sock.sendall(payload) ret = ctx.sock.recv(1024) logg('[*] Pool response: {}'.format(ret))

logg() is responsible for logging into the miner.log file. So the output will look something like this:

[] Block 871899 solved. [] Block hash: 000000000000000000000000e5a1bc7d96f809be23c4565dae6e948e3e5f35fc [] Payload: [] Pool response:

— Reply to this email directly, view it on GitHub https://github.com/iceland2k14/solominer/issues/20#issuecomment-1574066278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJLDXRYJ7TBPDLAEGEWHKK3XJIN6XANCNFSM6AAAAAAT3NEQDU . You are receiving this because you authored the thread.Message ID: @.***>