-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EthereumStratum/2.0.0 implementation to support both ProgPoW and ethash #442
base: master
Are you sure you want to change the base?
EthereumStratum/2.0.0 implementation to support both ProgPoW and ethash #442
Conversation
Author: Wolfgang Frisch <[email protected]> Date: Mon Sep 25 19:24:09 2017 +0200 NiceHash support: working prototype unified nicehash + ethproxy and cleanup by hackmod * rebased and squashed * unified processShare*() * unified nicehash + ethproxy * height field added to support extended getWork() * support mining.extranonce.subscribe for nicehash * fixed crash and cleanup * remove DifficultyNiceHash using DiffFloatToInit() * remove all nicehash specific options * BUG: do not modify shareDiff to show hashrate correctly * check len(params) * Do not terminate connection if miner submits one duplicate share (by nicehashdev, manually applied by hackmod)
* BUG: old behavior always drop stale jobs * sendJob() again after stale share found. * cache stale jobs info. * use cached headHash/seedHash from stales cache
…pable miners for NiceHash
mining.notify does not have block height information. but the fourth paramenter is boolean and can be easily modified to check an addtional block number info. add a fourth block height parameter to support the progPoW algorithm
…locks * check algorithm change and mining.set if it needed
Niice |
well done. |
Great job |
Well done |
} | ||
|
||
// send worker | ||
if err := cs.sendStratumResult(req.Id, splitData[1]); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crashes if wallet is not in 0x000.worker format
easy fix is
sz := len(splitData)
if sz != 2 {
fmt.Printf("incorrectly defined wallet: %v adding workername as \"missing\"\n", splitData[0])
var missingname = "missing"
splitData = append(splitData, missingname)
}
if err := cs.sendStratumResult(req.Id, splitData[1]); err != nil {
return err
}
so if (using pheonixminer) the miner puts the wallet without the format of 0x000.workername the stratum crashes. it tries to split the wallet expecting the . which is not there and bombs. "miner command= ./PhoenixMiner -pool tls://phat.yourpool.net:8002 -wal 0x4bc7b9d{...}66ecad87e5699c1ec02d531 -worker testrig1 -epsw x -mode 1 -log 0 -mport 0 -etha 0 -ftime 55 -retrydelay 1 -tt 79 -tstop 89 -coin eth -nosni -proto 5" 2022/05/12 17:38:26 Stratum miner connected 0x4bc7b9d69d[...][email protected] goroutine 1654 [running]: |
This is a working prototype for EthereumStratum/2.0.0 implementation,
and it supports both ProgPoW and ethash.
(some commits are cherrypicked for a practical reason)
feel free to feedback!
forkBlocks