Skip to content
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

Stratum messages out of order for some pools #84

Closed
skot opened this issue Jan 10, 2024 · 0 comments
Closed

Stratum messages out of order for some pools #84

skot opened this issue Jan 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@skot
Copy link
Owner

skot commented Jan 10, 2024

This is a follow on to #80 and #50

It seems that some pools, like Braiins do not like having mining.subscribe come before mining.configure. They send "error":[21,"ConfigurationOutOfOrder"

I (2391) stratum_api: tx: {"id": 1, "method": "mining.subscribe", "params": ["bitaxe BM1366"]}
I (2451) stratum_api: Received result {"id":1,"result":[[["mining.set_difficulty","1"],["mining.notify","1"]],"00",6],"error":null}
I (2451) stratum_api: tx: {"id": 2, "method": "mining.configure", "params": [["version-rolling"], {"version-rolling.mask": "ffffffff"}]}
I (2511) stratum_api: Received result {"id":2,"result":null,"error":[21,"ConfigurationOutOfOrder",null]}
I (2521) stratum_api: tx: {"id": 3, "method": "mining.suggest_difficulty", "params": [1000]}

This should be a simple fix by just reordering STRATUM_V1_subscribe() and STRATUM_V1_configure_version_rolling() in main/tasks/stratum_task.c

The problem is when we do that, Braiins sends a result {"id":null,"method":"mining.set_version_mask","params":["1fffe000"]} which causes STRATUM_V1_parse() in components/stratum/stratum_api.c to crash.

So, the TODO here is;

  • reorder STRATUM_V1_subscribe() and STRATUM_V1_configure_version_rolling() in main/tasks/stratum_task.c so that STRATUM_V1_configure_version_rolling() comes first
  • figure out how to parse and handle the version mask in STRATUM_V1_parse() in components/stratum/stratum_api.c
@skot skot added the bug Something isn't working label Jan 10, 2024
@skot skot closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants