No Branch/Tag Specified
arm
asyncnotedecryption
danger
dev
dev-aarch64
dev-mac
dev-old-randomx
divzaddrs
dragonx
duke
freebsd
getfilterednotes
hip39
insync
jahway603
master
mvstuff
onryo
p2p_privacy
ramhash
relaytx
rx-largepages
setbestchain
warmup
witness_cache
wolfssl
wolfssl_win
z_createrawtransaction
z_importwallet
z_signmessage
v0.11.2.z0
v0.11.2.z1
v0.11.2.z2
v0.11.2.z3
v0.11.2.z4
v0.11.2.z5
v0.11.2.z6
v0.11.2.z7
v0.11.2.z8
v0.11.2.z9
v1.0.0
v1.0.0-beta1
v1.0.0-beta2
v1.0.0-rc1
v1.0.0-rc2
v1.0.0-rc3
v1.0.0-rc4
v1.0.1
v1.0.10
v1.0.10-1
v1.0.11
v1.0.11-rc1
v1.0.12
v1.0.12-rc1
v1.0.13
v1.0.13-rc1
v1.0.13-rc2
v1.0.14
v1.0.14-rc1
v1.0.15
v1.0.15-rc1
v1.0.2
v1.0.3
v1.0.4
v1.0.5
v1.0.6
v1.0.7-1
v1.0.8
v1.0.8-1
v1.0.9
v1.1.0
v1.1.0-rc1
v1.1.1
v1.1.1-rc1
v1.1.1-rc2
v1.1.2
v1.1.2-rc1
v2.0.0
v2.0.0-rc1
v2.0.1
v3.0.0
v3.1.0
v3.1.1
v3.10.0
v3.10.1
v3.10.2
v3.2.0
v3.2.1
v3.2.1-alpha
v3.2.1-beta
v3.2.2
v3.2.3
v3.3.0
v3.3.1
v3.3.2
v3.4.0
v3.4.1
v3.5.0
v3.5.1
v3.5.2
v3.6.0
v3.6.1
v3.6.2
v3.6.3
v3.7.0
v3.7.1
v3.8.0
v3.9.0
v3.9.1
v3.9.2
v3.9.3
v3.9.4
Labels
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
Apply labels
Clear labels
0-500 bounty
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
No Label
0-500 bounty
2001-5000 bounty
501-2000 bounty
arm
beginners
bug
build
documentation
feature
high priority
i2p
low priority
medium priority
question
release
testing
tor
wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
This issue currently doesn't have any dependencies.
Reference in new issue
There is no content yet.
Delete Branch '%!s(MISSING)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
We now have a
stratum
branch which needs testing! This code was originally written by Freicoin (with a compatible Mozilla Public License) and then ported to KMD by Decker: https://github.com/DeckerSU/komodo/tree/stratum-dev/srcIt merged very easily with a bit of elbow grease.
New options in
hushd
:For example. to launch HUSH with stratum pool on default (rpcPort + 1000) stratum port 28030, you'll need to execute:
This code is compatible with Hush Smart Chains and it may be easier to test it via HSCs so CPU or low difficulties can be used.
Then point your software miner or ASIC at
stratum+tcp://stratum_ip:28031
. Don't forget to specify username as valid HUSH address, such as RHushEyeDm7XwtaTWtyCbjGQumYyV8vMjn and any non-empty password, such as "x".For example using ccminer:
There should be logging to STDOUT and also debug.log about mining details.
Running hushd with the following options didn't appear to run the stratum server (as seen by nmap scanning 127.0.0.1 and running "ss -lt" ):
./hushd -stratum
Then I tried specifying a port but it does not appear to be starting the stratum server, as seen by the same above nmap and ss checks.
Update: had wrong branch, it's spinning up something as I see the port being used now
@jahway603 does
grep -i stratum
in your debug.log show up anything?@jahway603 I just merged
dev
intostratum
, can you please test and show me what happens in your debug.log ? I am also testingMy stratum-debug.log from docker without creating new user.
I need to setup my miner now.
@odinzu something like CCminer can be used to CPU/GPU mine an HSC with equihash 200,9: https://github.com/tpruvot/ccminer
Also, it's a bit weird seeing hushd running as root, it's definitely more risk, even inside a docker container. I suggest running things as the
hush
user inside docker.@odinzu after a client connects to the stratum port, there should be some stratum-related logging in stdout/stderr and debug.log
I recommend using
-debug=stratum
or you will not see any stratum-related stuff in debug.log:./src/hushd -ac_name=STRATUM -stratum -debug=stratum
So far I am able to see it listen on the correct port and give error responses to invalid stratum requests.
FYI, currently Stratum Protocol support is only compatible with Equihash (200,9), so if you choose a different algorithm for a HSC, that HSC won't be compatible with the current stratum.
I think the easiest way to test this may be by using the old Hush CPU webminer: https://git.hush.is/hush/hushwebminer
I will post instructions about how I use that to test.
@onryo @odinzu this is how you use the the CLI hushwebminer to test stratum:
which creates this in debug.log:
This shows that the pool is correctly noticing that a garbage HUSH address was given, it subscribes and authorizes as well. Promising
When you give it a valid address and wait for enough blocks on a new HSC (I had to wait about 25 blocks), it seems to fully connect:
What I see is that hushwebminer does not like the the returned "work unit" and closes the connection. It seems that one of the responses does not have a
result
key and hushwebminer wants there to be one. It's pretty strict about things. I will try to make it work.I think it's time to test real ASICs against this code.
FYI the
stratum
branch has been merged into thedev
branch and all further stratum testing should happen on thedev
branchYeah, that was mainly for demonstration purposes. Normally, we build a Dockerfile to fresh build this image, rather than commit one image. For testing, it is useful to have.
Soo much back log. I am going to launch Stratum + HSC today with a cpu or webminer.
@odinzu at this point, you can learn a lot from using the webminer to test our stratum, but we really need to test with actually ASICs. The flavor of stratum protocol that our webminer uses is not the same as our stratum code. It starts talking, "subscribes" and gets a work unit, but then the webminer does not know how to understand the responses of our stratum server.
Testing this with an ASIC.
I get a bunch of "zero out of X shares" in the log file (snippit below), but the hash rate is super low as you can see in the screenshot. If I was using a pool, I would see 50K and not 1.7K, so this is not expected behaviour.
Command used was following as it did not spit out the above "accepted" lines until I specified my ASIC miner's IP address on the CLI
@jahway603 thank you, this is valuable feedback.
My guess is that your A9 was "Warming up" just after being turned on, where it starts slow and then ramps up it's hashrate. If you look at the screenshot, all 3 "chains" are about the same hashrate. Each chain corresponds to one "hash board". If you let it run a while, it would probably show a higher hashrate.
Bitmain asics don't do the above, as far as I know, only Innosilicon devices.
The fact that your ASIC can get work from stratum and submit valid shares is really positive.
As for
stratumallowip
, it's good for security to only allow some IP's, but it's also annoying since most people use dynamic IP's that will constantly change, and require restarting hushd with different allowed IP's. To use this code to run a public pool, we will need a way to allow any IP.@jahway603 one way to make life easier is you can do
stratumallowip=192.168.0.0/16
and it will allow that entire LAN class B to access your stratum. This fixes the issue for individual miners with ASICs on a LAN, but we still need a way to say "allow any IP to access stratum", which is currently not possible. Looks like I need to modify the code.I thought that too but look at the same miner (with enough time in-between testing for it to be from a dead start) in the same amount of time
1.7K with hushd stratum VS. 21.46K on coolmine.top's stratum [attached to show the difference]
@jahway603 this may be related to the initial "difficulty" or "diff" that stratum uses. It may be setup to have the "diff" for a GPU instead of an ASIC. Many pools have different ports which start at different difficulties (such as an ASIC port, etc) and also sometimes you can give a parameter to tell it what diff you want.
When a stratum server has too high a diff for a miner, they won't get shares for a while until it comes down, and when a diff is too low, the miner wastes resources by not getting new work jobs fast enough.
Also, you might want to try
-stratumallowip=0.0.0.0/0
which maybe will allow any IP.Yeah, coolmine has different ports for different diffs. I'm familiar with them.
I see there is a function to set this, but not sure how it can be interfaced with at the CLI: https://git.hush.is/hush/hush3/src/branch/dev/src/stratum.cpp#L2039
Any ideas on how to make this user configurable?
@jahway603 it looks like the code looks for a
+
symbol after the address, and uses that number as initial difficulty: https://git.hush.is/hush/hush3/src/branch/dev/src/stratum.cpp#L1241So you would set your username as
address+diff
likeRFoo...+12345
Tested on current dev branch. I have tried adding the + and different values on the ASIC miner username, but the diffs shown at the hushd terminal never change.
@jahway603 our first version of Stratum support was released in 3.9.0, so I will close this issue and we should make specific issues for stratum bugs, like your low hashrate issue. Some people use it just fine, so we know it works correctly for some. Now we can get more bug reports from solo miners using 3.9.0