23 Commits

Author SHA1 Message Date
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
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
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
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
f98cbf208b mining: fix merkle root calculation and add unit test 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