Erik Olof Gunnar Andersson
deaa291675
Revert "Refactor Stratum code for Seamless Failover ( #717 )" ( #754 )
...
This reverts commit 1eeb303672c876939d53328fd8395e3813a97dcf.
2025-03-10 13:30:31 +01:00
Erik Olof Gunnar Andersson
1eeb303672
Refactor Stratum code for Seamless Failover ( #717 )
...
* Refactor stratum code
* No need to abandon work when switching connection
* Bump primary task priority slightly
* Reduce watchdog stack size
* Revert debug changes
* Removed unused code
* Removed unused unit test code
* Handle jobs more aggressively
* Fix merge conflict
2025-03-09 13:55:58 +01:00
Erik Olof Gunnar Andersson
c8671cf69c
Enable Unit Test CI ( #634 )
...
* Enable Unit Test CI
* Remove non-functional entrypoint
* symlink CMakeLists.txt
2025-01-27 18:25:38 +01:00
tdb3
b5d1e366c6
test: fix stratum alternative error test ( #608 )
...
The test now checks for the expected id and reject-reason
Co-authored-by: WantClue <86001033+WantClue@users.noreply.github.com>
2025-01-08 11:47:22 +01:00
tdb3
3bf8997a72
test: add boundary check for implicit response method ( #548 )
...
Test the boundary of STRATUM_RESULT and STRATUM_RESULT_SETUP more completely
2025-01-04 23:57:27 +01:00
tdb3
5e56bcdccc
test: fix failing unit test for large stratum id ( #546 )
...
PR #243 changes the type of id to int64_t,
allowing for ids exceeding a 16-bit integer.
Adjusts an associated unit test to ensure that
16-bit rollover wouldn't occur.
2025-01-04 23:57:05 +01:00
mutatrum
6283480fa1
Parse stratum api reject reason ( #472 )
...
* Parse stratum api reject reason
* Remove superfluous nullcheck
2024-12-09 16:35:13 +01:00
mutatrum
e3edb87b6c
Change stratum message_id to 64bit
2024-06-25 15:34:15 +02:00
MoellerDi
1da7132b6a
fix stratum parsing not always counting rejected shares ( #163 )
...
* fix stratum parsing not counting rejected messages
* add unit tests
2024-05-23 22:53:05 -04:00
Ben
79430f6d3a
reformat entire c project
2023-08-26 12:28:17 -04:00
johnny9
c7de2c0795
bm1397: add multiple midstates using version mask
...
Job packets can have more that 1 midstate. If the stratum supports
version-rolling, calculate additional midstates by incrementing
the version with the version_mask provided by the stratum server.
Currently does 4 midstates for each extranonce2.
2023-07-01 14:23:35 -04:00
Ben
1b75644b67
added back stratum unit tests
2023-07-01 14:23:35 -04:00
Ben
35358e0e44
cleaning and optimizing stratum_task/stratum_api
2023-07-01 14:23:35 -04:00
Ben
c3301aab30
move queue
2023-07-01 14:23:35 -04:00
johnny9
3d6d27b101
stratum: add an additional test to validate bm_job construction
2023-07-01 14:19:51 -04:00
johnny9
d583332f3b
stratum: add additional test for test_nonce_value
2023-07-01 14:19:51 -04:00
johnny9
d23a106a65
mining: add test to check nonce diff
...
Test unconvered issues in the construction of the header
when hashing as well as issues with converting the hash to
a double.
2023-07-01 14:19:51 -04:00
johnny9
278d948f10
mining: fix bm_job construction test
2023-07-01 14:19:51 -04:00
johnny9
e27d9e32c8
Revert "added nonce checking fixes from @johnny9"
...
This reverts commit 2b06b3f4d7e290452fd082fdc1387246677ba860.
2023-07-01 14:19:51 -04:00
Skot Croshere
3bdfd6d32d
setup for running unit tests. press cmd-sft-p "test"
2023-07-01 14:19:51 -04:00
Skot Croshere
de237e1d34
added nonce checking fixes from @johnny9
2023-07-01 14:19:51 -04:00
johnny9
9cf8ee9b3b
miner: generate more bm_jobs using extranonce 2
2023-07-01 14:19:51 -04:00
johnny9
8cf78d58cc
stratum: add methods for extranonce_2 generation
2023-07-01 14:19:51 -04:00
johnny9
e246a84c86
stratum: add mining.set_difficulty message parse
2023-07-01 14:19:51 -04:00
johnny9
24010c3fe8
bm1397: update midstate construction test with proper values
...
Midstate test has been updated with known working values from
a bm1397 job command. Additional adjustment was also made to the
bm_job construction method that changed the endianess of the
merkle root.
2023-07-01 14:19:51 -04:00
johnny9
5d4733ec34
stratum: fix coinbase construction tests
...
The api for construct_coinbase_tx changed and now takes the extranonce
2 as a parameter instead of the length.
2023-07-01 14:19:51 -04:00
johnny9
939aee42ee
mining: add an additional merkle calc test
2023-07-01 14:18:41 -04:00
johnny9
bad72d638a
mining: swap endianess of prevblockhash when computing midstate
2023-07-01 14:18:41 -04:00
johnny9
f80805f53a
stratum_api: add method to check if previous work should be abandoned
2023-07-01 14:18:41 -04:00
johnny9
1118d01ba5
mining: add script for generating verification data for tests
2023-07-01 14:18:41 -04:00
johnny9
bbd2ebe249
mining: fix endianness of the block header version
2023-07-01 14:18:41 -04:00
johnny9
901d2da341
stratum_api: parse the uint32_t values from the mining.notify message
2023-07-01 14:18:41 -04:00
johnny9
ca827ee4b5
mining: construct a job for bm13xx
2023-07-01 14:18:41 -04:00
johnny9
812e4213c1
stratum_api: cleanup notify parsing
...
Split parsing into two steps, one for the method and one for the
params themselves. Currently it is up to the miner task to grab
the parameters in the format it needs.
2023-07-01 14:18:41 -04:00
johnny9
f98cbf208b
mining: fix merkle root calculation and add unit test
2023-07-01 14:18:41 -04:00
johnny9
23e588c94e
utils: add double sha256 method
2023-07-01 14:18:41 -04:00
johnny9
10fc3d017e
mining: add method to construct coinbase tx
2023-07-01 14:18:41 -04:00
johnny9
799d00dc2b
stratum: parse extranonce and extranonce2_len from subscribe result
2023-07-01 14:18:41 -04:00
johnny9
3066edb7f1
Make stratum module testable and introduce first unit test
2023-07-01 14:18:41 -04:00