onemorebsmith / kaspa-stratum-bridge

Bridge/Adapter between the stratum-based miners and a kaspad node
MIT License
67 stars 96 forks source link

Missing blocks/shares? #7

Closed trgm7 closed 2 years ago

trgm7 commented 2 years ago

Hi,

I've noticed that there is missing jobs in the miner log compared to otter stratum adapters. This in turn is causing less blocks to be found. If you look in the pics I've attached, Ive compared it to kstratrum. The adapter seems to skip some blocks or not forward them to the miner? kasap-stratum-brdige kstratum

onemorebsmith commented 2 years ago

Not sure what the issue is since KStratum and I are both subscribing to the same callback from kaspad, but it'll be a moot point. Next release moves to a constant diff, shares-based approach.

onemorebsmith commented 2 years ago

Should be resolved w/ the latest release. Closing

trgm7 commented 2 years ago

After trying the new release, still facing the same problem. It actually seems worse now. Jobs are being received in 10+ second intervals Capture

onemorebsmith commented 2 years ago

Added some debug logging on my side, looks like I'm sending the updates but the block itself is only changing every ~20s or so. The timestamp in the image is from kaspad, when it changes the block has changed.

image

onemorebsmith commented 2 years ago

Switch to woolypooly to see the miner output, they do the same thing. It only reports a new job ever ~10s image

trgm7 commented 2 years ago

Ill give it ago, ill run both for over 24 hours as well

Do you think this is affecting anything?

onemorebsmith commented 2 years ago

I don't believe so. If I had to guess it's the miner choosing not to show the output for frequent jobs like that as to not spam the console. Interested to hear your results though! Appreciate it.

onemorebsmith commented 2 years ago

Any news on this?

trgm7 commented 2 years ago

I had it running for the past 24 hours but had to restart it after roughly 12 hours. I'm not 100% sure but I have a feeling that after a certain period of time blocks aren't being found on any of the miners, Shares are working OK. I have two instances running mining to two different wallet address' over the 24 hours they both mined the same amount of blocks (6 each), now I know for 1.3~gh that is very lucky , ill keep an eye on it over the next 48 hours and see how it behaves. Capture Capture2 Capture3 Capture4

onemorebsmith commented 2 years ago

3 blocks in 24 hours on 1.3GH/s is some crazy luck, nice! I've only been hitting around ~3 blocks/day with 3 GH/s.

Thanks for the update, really appreciate it. Let me know in a bit if you narrow down any issues or see any more weirdness.

trgm7 commented 2 years ago

It has 6! Extremely lucky! I had to close and re-open the stratum after the first 12 hours. 3 blocks were found in the previous instance. Also if it possible to mine to two address' in the same instance? Will let you know how it goes, Thanks for your work!

onemorebsmith commented 2 years ago

Yep, if you're using the 1.0 release it'll use the address sent from the miner. You can actually just delete the mining address out of the config.yaml as it's not used any more.

If you want to validate the address is correct you can look in the log for mapping blah to blah and the authorize data that's printed when the miner connects

onemorebsmith commented 2 years ago

Going to go ahead and close this. Reopen if you see issues