-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWS
3263 lines (2952 loc) · 158 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Version 2.10.4 - December 29, 2012
- Change the pool stratum socket buffer to be dynamically allocated to
accomodate any size coinbase and keep receiving data in recv line for up to 60s
if no end of line has been received.
- Differentiate socket full from sock full.
- Allow stratum to startup without notify but check it is valid before creating
stratum work.
- Do not try to generate stratum work unless the notify command has succeeded.
- Reset total diff1 shares when zeroing stats as well to show correct work
utility.
Version 2.10.3 - December 26, 2012
- Do not give the share submission failure message on planned stratum
disconnects.
- Parse anything in the stratum socket if it's full without waiting. Empty the
socket even if a connection is not needed in case there are share returns.
- Provide a mechanism to zero all the statistics from the menu.
- Display the current pool diff in the status line.
- Display block diff in status line.
- Generalise the code for solving a block to enable block solve detection with
scrypt mining.
- Generate the output hash for scrypt as well and use the one function to set
share_diff.
- Use the flip80 function in regeneratehash and the correct sized hash array.
- Use one size for scratchbuf as a macro in scrypt.c
- Stage work outside of the stgd lock to prevent attempted recursive locking in
clone_available.
- share_diff needs to be performed on a BE version of the output hash to work,
leading to false best_share values as spotted by luke-Jr.
- Remove the unused sha224 functions.
- Use the flip functions in hashtest.
- Simplify the setting of the nonce data field in work on submitting nonces.
- Scrypt code does not enter the hashtest function.
- Go back to cloning available work under staged lock.
- Updated links to AMD APP SDK
- Updated link to ADL SDK
- scrypt_diff uses a uint64_t as well.
- Correct target for stratum support with scrypt mining.
- libztex: fixed a typo
- libztex: check returnvalue of libusb_claim_interface() and release the
interface in case of early exit
Version 2.10.2 - December 19, 2012
- Stop all work from the current pool if it's a stratum pool once it is
disconnected since it will be invalid upon reconnecting.
- Discard all staged work from stratum pools as well as the shares upon
disconnection since all the work becomes invalid.
- Use correct cbreak after 15 second delay when no pool is found alive.
- MMQ missing firmware -> ERR not DEBUG
- Allow stratum to work with scrypt.
- MMQ ensure delta clock can never exceed limits
- MMQ lowercase new string constants
- MMQ add api pgaset for clock
- API V1.23 - new pgaset command, to be used soon
- Protect the best_share/best_diff values under control lock.
- MMQ style police
- MMQ count work check timeout failures
- MMQ allow partial work replies and count them
- Check a stratum pool hasn't gone dead while being a backup pool and missed
having its idle flag cleared.
- MMQ overheat: remove clockdown (doesn't help) + ensure no lost shares
- API-README grammar
- API-README explain custom page extensions in miner.php
- miner.php add a sample group pool report
- miner.php allow where,group,having on cumstom pages
Version 2.10.1 - December 14, 2012
- Check for EWOULDBLOCK when supported in send and recv as well.
- Use the raw send() command instead of curl_easy_send since curl raw socket
usage introduces random bugs on windows.
- Use raw recv() command in place of curl_easy_recv since the curl
implementation introduces random bugs on windows builds when the recv fails.
- miner.php when displaying a single rig, add prev/next rig buttons if they
exist, next to refresh
- miner.php allow custom page joins for STATS
- API show if pool has GBT (so people know not to use that pool)
- miner.php - include windows easyphp link
- driver-ztex: use the correct size for the swap array
- API stats - display pool byte transfer stats
- Pool store data transfer stats
- README ModMiner dependency
- Benchmark incorrect work size
- ChangeLog refer to NEWS
- MMQ handle over temp differently and hash longer
- driver-ztex: search the complete noncerange based on the actual speed
- README - update ModMiner details
- API-README update
- api use a dynamic io buffer, truncated before it reaches the current ~64k
limit
Version 2.10.0 - December 10, 2012
- Include prctl header for thread renaming to work.
- Set tv_idle time if a pool is not active when input from the menu.
- usb display message when device is in use/another cgminer
- libztex: avoid the use of libusb_error_name()
- minor unlikely zero pointer test
- BeaverCreek doesn't like BFI INT patching.
- Only stratum pools that are idle need to be kicked via cnx_needed.
- mmq - abbreviate the temperature numbers
- Do not do any setup if opt_api_listen is disabled in api.c.
- usbutils.c uninitialised usbstat for non-primary mmqs
- Only set the lagging flag for select_pool() on failed getwork if we're not in
opt_fail_only mode.
- libztex: in case the selectFpga() failed set the selected fpga to unknown
- Modified windows-build.txt to update git instructions.
- libztex: use a function for the twice called firmware reset code
- libztex: removed an unused struct member (ztex->valid)
- driver-ztex: support for broken fpga on a multifpga board
- Set the pool lagging flag on startup to avoid it being shown initially, and
only unset it once the maximum number of staged work items has been reached.
- Avoid recursive locking of the stgd lock.
- Return value of keep_sockalive is no longer used.
- Remove dependency on mstcpip.h for windows build by making curl version >=
7.25.0 mandatory on windows builds, and use curl functions for keepalive
whenever possible instead.
- Make main() the getwork scheduler once everything is set up, so that all app
exits use the kill_work and quit paths.
- ztex: more style and whitespace fixes
- libztex: silenced another warning
- Set successful connect to true on auth stratum to allow summary on exit from
single stratum pool.
- Only consider work stale for stratum of different job_id if it's not a share.
- Increment version preempting changed version signifying different codebase to
2.9
- Hash_pop should signal further waiters on its own pthread conditional in case
there are multiple waiters.
- Check the job_id has not changed on stratum work when deciding if the work is
stale as might occur across disconnections.
- Perform pool_resus on getwork pool that generates work in getwork_thread.
- Set pool lagging message for getwork pool that falls to zero staged in getwork
thread.
- Stage extra work when the primary pool is a getwork pool without rolltime.
- Do not try to clean up twice if kill message is given.
- Only recalculate total_staged in getwork thread if required.
- Include the correct config header in libztex and include it before other
includes.
- Implement a completely new getwork scheduler. Stage all work from the one
thread, making it possible to serialise all requests minimising the number of
getworks requested or local work generated. Use a pthread conditional to wake up
the thread whenever work is removed to generate enough work to stay above the
watermark set by opt_queue. Remove all remnants of the old queueing mechanism,
deleting the now defunct queued count.
- libztex: fixed some warnings and removed some whitespaces
- libztex: silenced some warnings
- Remove all references to the now unused workio_cmd structure.
- Remove the old workio command queue thread, replacing it with a kill
conditional to exit the program.
- Remove getwork command from workio_cmd queues and do them directly from
queue_request.
- Begin tearing down the old workio command queues by removing submit commands
from there and submit them asynchronously via their own threads.
- Update windows build instructions.
- Set pool probed to true on successful authorisation with stratum to avoid it
being pinged later with pool_getswork.
- driver-ztex: libztex_setFreq() must be called before ztex_releaseFpga()
- driver-ztex: changed two pairs of malloc()/memset() to calloc()
- libztex: Read bitstream file in 2kb blocks with simpler and faster code
- Added the binary versions of ztex_ufm1_15d4.ihx and ztex_ufm1_15y1.ihx
- Trivial space removal.
- libztex: Add firmware download support for ZTEX 1.15d and 1.15x
- libztex: Factor out local version of libusb_get_string_descriptor_ascii()
- Shut up some boring old cpu warnings.
- Style changes.
- Allow pool active to be called on stratum or disabled pools in the watchpool
thread if the pool has not been probed.
- libztex: Make log messages say bitstream when refering to bitstreams
- libztex: Don't return error when a bitstream was already configured
- libztex: Read bitstream file in 64kb blocks with simpler and faster code
- libztex: Verify that the mining firmware is not a dummy firmware
- libztex: Match mining firmware ZTEX descriptor against the dummy firmware
- Combine shared padding into one char.
- libztex: Start download sequence only after reading in the new firmware
- libztex: Download mining firmware to all devices with dummy firmware
- lock (most of) the threaded statistics updates
- README stats don't add up
- usbutils.c remove compiler warning
- Make need connection return true if a pool is idle.
- API add Best Share to summary
- Check on creating new GBT work if the structures are up to date and update
them as required rather than regularly.
- Update windows build instructions.
- Enable backup stratum connections for getwork when the primary pool doesn't
have longpoll aka solo mining.
- Check for correct absence of opt_fail_only in cnx_needed.
- Remove unused variable.
- The specification for stratum has been elaborated to say that a changed diff
applies only to new work so do not retarget when submitting shares.
- Use a variable length string array in submit_upstream_work to cope with
massive GBT submissions.
- API lock access to some summary statistics (and copy them)
- Suspend stratum connections to backup pools when there is no requirement to
potentially grab work from them.
- Fix missing export for RenameThread.
- enumerate the mining threadnames
- MMQ avoid possible number overrun crashes
- mmq usb v0.4 + api usb stats
- setting the name of the threads for linux,freebsd,openbsd and osx code is
borrowed from bitcoins util.c, so it is already tested
- Don't show broken WU value with scrypt mining.
- Style police.
- Remove unused getwork times in getswork.
- Fix readme wordwrap.
Version 2.9.6 - December 2, 2012
- Make gen_stratum_work more robust by using a dynamically allocated array for
the header in case bogus data is sent by the pool to avoid overflowing a static
array.
- scrypt_diff now returns a uint64_t
- Support monitoring and reporting much higher diffs for scrypt mining,
truncating irrelevant zeroes from displayed hash.
- Pass ostate values around in scrypt to be able to extract full hashes if
needed later on.
- Since we will be using calloc_str to put a string into it, convert the
function to calloc_strcat which does it automatically.
- Revert "Handle crash exceptions by trying to restart cgminer unless the
--no-restart option is used."
- Count longpoll and GBT decodes as queued work since the count otherwise
remains static.
- Use the string helper functions to create gbt blocks of any length.
- Provide helper functions calloc_str and realloc_strcat to create and extend
arbitrary length arrays based on string length.
Version 2.9.5 - November 25, 2012
- fixes target calc for mips openwrt
- openwrt needs roundl
- Get rid of unused last_work in opencl thread data.
- Do away with the flaky free_work api in the driver code which would often lose
the work data in opencl and simply flush it before exiting the opencl scanhash.
- Use base_work for comparison just for cleanness in __copy_work
- Remove all static work structs, using the make and free functions.
- Add pool no. to stale share detected message.
- Add info about which pool share became stale while resubmitting.
-b Copy the work on opencl_free_work
- Add an extra slot in the max backlog for ztex to minimise dupes.
- Do not use or count the getworks submitted which are simply testing that pools
are still up. This was increasing share leakage and making stats not reflect
real work.
- Track all dynamically allocated memory within the work struct by copying work
structs in a common place, creating freshly allocated heap ram for all arrays
within the copied struct. Clear all work structs from the same place to ensure
memory does not leak from arrays within the struct. Convert the gbt coinbase and
stratum strings within the work struct to heap ram. This will allow arbitrary
lengths without an upper limit for the strings, preventing the overflows that
happen with GBT.
- libztex: Work around ZTEX USB firmware bug exposed by the FreeBSD libusb
- opencl: Use new dev_error function for REASON_DEV_NOSTART
Version 2.9.4 - November 18, 2012
- Provide rudimentary support for the balancing failover strategies with stratum
and GBT by switching pools silently on getwork requests.
- Convert remaining modminer and bfl uses of usleep to nmsleep.
- Convert libztex to nmsleep where possible.
- Convert unreliable usleep calls to nmsleep calls in ztex driver.
- Support workid for block submission on GBT pools that use it.
- Provide rudimentary support for literal ipv6 addresses when parsing stratum
URLs.
- Work around libcurl cflags not working on hacked up mingw installations on
windows.
- Only increase gpu engine speed by a larger step if the temperature is below
hysteresis instead of increasing it to max speed.
- Convert pool not responding and pool alive message on backup pools to verbose
level only since they mean a single failed getwork.
- Update work block on the longpoll work item before calling restart threads to
ensure all work but the longpoll work item gets discarded when we call
discard_stale from restart_threads.
- Do not attempt to remove the stratum share hash after unsuccessful submission
since it may already be removed by clear_stratum_shares.
- Check against a double for current pool diff.
- Support for fractional diffs and the classic just-below-1 share all FFs diff
target.
Version 2.9.3 - November 11, 2012
- Make header larger on gen stratum work to accomodate \0 at the end.
Version 2.9.2 - November 11, 2012
- Use stratum block change from backup pools as an alternative to longpoll for
pools that don't support LP.
- Check share target diff for best_share to be calculated when solo mining.
- Round some more static string arrays to 4 byte boundaries.
- There is no need for the static arrays to be larger than required, so long as
they're 4 byte aligned to appease ARM.
- Store the full stratum url information in rpc_url for correct configuration
file saving.
- Put in a hack to prevent dud work from sneaking into test_work_current being
seen as a new block.
- Reset the work->longpoll flag where it will affect stratum work items as well.
- Check for both coinbase/append and submit/coinbase support before using GBT
protocol.
- First pass through testing for GBT should not set probed to true since we are
about to probe again.
- Hash1 is only used by the deprecated cpu mining code and never changes so
remove it from the work struct and bypass needing to process the value for all
other mining.
- Get a work item once per minute for all getwork and GBT pools to test they're
still alive and to maintain a current GBT template.
- Get a fresh block template with GBT pools on switching to them.
Version 2.9.1 - November 6, 2012
- Reset work flags to prevent GBT shares from being submitted as stratum ones
after switching.
Version 2.9.0 - November 6, 2012
- Add endian swap defines for where missing.
- Only retarget stratum shares to new pool diff if diff has dropped.
- Remove resetting of probed variable when detecting GBT.
- Count lost stratum share submits and increase message priority to warning.
- Only retrieve a new block template for GBT pools that are the current pool.
- Show which pool untracked share messages have come from.
- Add management for dead GBT pools.
- Count lost shares with stratum as submit stale lost.
- Discard record of stratum shares sent and report lost shares on disconnection
since they will never be reported back.
- Swab, don't just swap the bytes in the GBT target.
- Change status window message for GBT connected pools versus LP.
- Generate a gbt work item from longpoll when required to set new block and
message appropriately.
- Use existing pool submit_old bool from gbt data.
- Retrieve a new block template if more than 30 seconds has elapsed since the
last one to keep the data current and test the pool is still alive.
- Update GBT longpollid every time we request a new longpoll.
- Manage appropriate response codes for share submission with GBT.
- Allow the longpoll thread to start with GBT and only set the longpollid once.
- Correct last few components of GBT block generation courtesy of Luke-jr.
- Use correct length for offsetting extra nonce and remaining data.
- Flip all 80 bytes in the flip function which was wrongly named flip256 for its
purpose.
- Calculate midstate for gbt work and remove now unused variable.
- Use a standard function for flipping bytes.
- Insert the extra nonce and remaining data in the correct position in the
coinbase.
- Remove txn size debugging and enlarge gbt block string to prevent overflow.
- Remove varint display debugging.
- Build varint correctly for share submission and sleep 5 seconds before
retrying submit.
- Make gbt_coinbase large enough for submissions, swap bytes correctly to make a
header from GBT and encode the number of transactions in share submission.
- Store the fixed size entries as static variables in GBT in binary form,
byteswapping as is required.
- 32 bit hex encoded variables should be in LE with GBT.
- Target and prevblockhash need to be reversed from GBT variables.
- Construct block for submission when using GBT.
- Use same string for debug as for submission and make string larger to cope
with future GBT messages.
- Skip trying to decipher LP url if we have GBT support.
- Store all the transaction hashes in pool->txn_hashes instead of separating
txn0 and correct generation of merkle root, fixing memory overwrites.
- Hook into various places to generate GBT work where appropriate.
- Create extra work fields when generating GBT work.
- Generate header from correct hashing generation of the merkle root for GBT.
- Generate the merkle root for gbt work generation.
- Create a store of the transactions with GBT in the minimum size form required
to generate work items with a varied coinbase.
- Create a function that generates a GBT coinbase from the existing pool
variables.
- Extract and store the various variables GBT uses when decoding gbt work.
- Check for invalid json result in work_decode.
- Decode work in separate functions for getwork vs gbt.
- Check for the coinbase/append mutable in GBT support to decide whether to use
it or not.
- Add a gbt mutex within the pool struct for protecting the gbt values.
- Convert work decode function to prepare for decoding block templates.
- Check for GBT support on first probing the pool and convert to using the GBT
request as the rpc request for that pool.
- Make the rpc request used with getwork a pool variable to allow it to be
converted to/from gbt requests.
- Changes to build prototypes to support building on FreeBSD 9.1-RC2 amd64
- Free old stratum_work data before replacing it
- There is no need for addrinfo any more.
- server and client sockaddr_in are no longer used in struct pool.
- Merge pull request #322 from luke-jr/bugfix_stratum_tmpwork
- Set sshare id and swork_id within the sshare mutex to avoid multiple share
submits with the same id.
- Initialize temporary stratum work
Version 2.8.7 - October 29, 2012
- Fail on select() failing in stratum thread without needing to attempt
recv_line.
- Add share to stratum database before sending it again in case we get a
response from the pool before it's added.
Version 2.8.6 - October 29, 2012
- Shorten the initiate stratum connect timeout to 30 seconds.
- Shorten the stratum timeout on read to 90 seconds to detect unresponsive pool.
- Display best share difficulty on exit.
- Make stratum socket fail more robust on windows by disabling the send buffer.
- Reuse the same curl handle forcing a new connection instead of risking
derefencing.
- Add information about submission failure to stratum send.
- Only add stratum share to database if we succeeded in submitting it, with a
debug output saying it succeeded.
- Use keepalive with stratum sockets to improve its ability to detect broken
connections.
- Show only the URL in the status bar to avoid long prefixes making for extra
long lines.
- Display compact status in menu and update README to reflect current menu
entries.
- Add a compact display mode that does not list per device statistics in the
status window.
- Add blank spaces after best share displayed.
- Round a few static string arrays up to 4 byte boundaries for ARM.
- Display best share diff for scrypt as well.
- Show the best diff share as "best share" and add info to the README.
- Display the best diff share submitted so far.
- Redundant check.
- The work struct pointer in struct pc_data in findnonce is never freed yet
there is no need to allocate it separately so make struct work a static part of
the struct pc_data. s
Version 2.8.5 - October 23, 2012
- Handle crash exceptions by trying to restart cgminer unless the --no-restart
option is used.
- Switch queued count when choosing a different pool from a failed stratum pool
in getwork thread.
- Put a mandatory 5s wait between reattempting a getwork on failure to avoid
hammering requests.
- The ATI stream / AMD APP SDK environment variables appear to only interfere
with win32 builds so bypass them.
- Make sure to check pool stratum curl exists under lock before attempting any
recv to not risk dereferencing upon attempting to reinitiate stratum.
- Avoid redefining macros and align to 4 byte boundaries.
- API - add Stratum information to pools
- update FPGA-README for MMQ
Version 2.8.4 - October 18, 2012
- Time for dynamic is in microseconds, not ms.
- x86_64 builds of mingw32 are not supported directly and should just configure
as generic mingw32 builds since they're NOT 64 bit.
- Cope with both ATI stream and AMD APP SDK roots being set when building.
- Use 3 significant digits when suffix string is used and values are >1000.
- MMQ new initialisation (that works) and clocking control
- Get rid of unused warning for !scrypt.
- Use select on stratum send to make sure the socket is writeable.
- Cope with dval being zero in suffix_string and display a single decimal place
when significant digits is not specified but the value is greater than 1000.
- Pad out the suffix string function with zeroes on the right.
- Failure to calloc in bin2hex is a fatal failure always so just check for that
failure within the function and abort, simplifying the rest of the code.
- Provide locking around the change of the stratum curl structures to avoid
possible races.
- Bump opencl kernel version numbers.
- Remove atomic ops from opencl kernels given rarity of more than once nonce on
the same wavefront and the potential increased ramspeed requirements to use the
atomics.
- Clear the pool idle flag in stratum when it comes back to life.
- Display correct share hash and share difficulty with scrypt mining.
- Use explicit host to BE functions in scrypt code instead of hard coding
byteswap everywhere.
- Show work target diff for scrypt mining.
- Ease the checking on allocation of padbuffer8 in the hope it works partially
anyway on an apparently failed call.
- Watch for buffer overflows on receiving data into the socket buffer.
- Round target difficulties down to be in keeping with the rounding of detected
share difficulties.
- Dramatically simplify the dynamic intensity calculation by oversampling many
runs through the opencl kernel till we're likely well within the timer
resolution on windows.
- String alignment to 4 byte boundaries and optimisations for bin<->hex
conversions.
- In opencl_free_work, make sure to still flush results in dynamic mode.
- Align static arrays to 4 byte boundaries to appease ARM builds for stratum.
Version 2.8.3 - October 12, 2012
- Left align values that are suffix_string generated.
- Share_diff should not be converting the work data to hex.
- Off by one error.
- Prevent overflows of the port char array in extract_sockaddr.
- Disable stratum detection with scrypt.
- Use the suffix string function when displaying device hashrates.
- Be consistent with the get_statline function.
- Use the suffix string function for displaying hashrate with 4 significant
digits.
- Display the actual share diff next to the pool required diff, using a suffix
creation function to prevent values of >1000 being shown in their entirety.
- Fix 4 * 0 being 0 that would break dynamic intensity mode.
- Fix wrong byteswap macro being used on mingw32 which was breaking target
generation on stratum.
Version 2.8.2 - October 11, 2012
- Reinstate the history on dynamic intensity mode to damp fluctuations in
intensity but use an upper limit on how much the value can increase at any time
to cope with rare overflows.
- Create a fix-protocol option which prevents cgminer from switching to stratum
if it's detected.
- Simplify target generation code.
- Add support for client.get_version for stratum.
- Use a 64 bit unsigned integer on the diff target to generate the hex target.
- Update reconnect message to show whole address including port.
- Look for null values and parse correct separate array entries for url and port
with client reconnect commands for stratum.
- The command for stratum is client.reconnect, not mining.reconnect.
- Only copy the stratum url to the rpc url if an rpc url does not exist.
- Implement rudimentary mining.reconnect support for stratum.
- Ignore the value of stratum_active on calling initiate_stratum and assume
we're always trying to reinitiate it, and set the active flag to false in that
function.
- stratum auth can be unset if we fail to authorise on subsequent calls to
auth_stratum which undoes the requirement of setting it in one place so set it
in pool_active.
Version 2.8.1 - October 8, 2012
- Use the stratum url as the rpc url advertised if we switch to it.
- Count an invalid nonce count as a hardware error on opencl.
- Count each stratum work item as local work.
- Cope with one stratum pool being the only active pool when it dies by sleeping
for 5 seconds before retrying to get work from it instead of getting work
indefinitely.
- Detect stratum outage based on either select timing out or receiving an empty
buffer and properly re-establish connection by disabling the stratum_active
flag, coping with empty buffers in parse_stratum.
Version 2.8.0 - October 7, 2012
- Major upgrade - support for the stratum mining protocol.
- Fix various modminer warnings on mingw.
- Fix sign warning on windows build for bitforce.
- Cast socketfail to integer since SOCKET is an unsigned int on windows.
- Use strtod not strtol for bitforce temp backup.
- Cope with broken drivers returning nonsense values for bitforce temperatures.
- Minor warning fixes.
- Use the stratum thread to detect when a stratum pool has died based on no
message for 2 minutes.
- Only set the stratum auth flag once and once the stratum thread is started,
use that to set/unset the stratum active flag.
- Only hand off to stratum from getwork if we succeed in initiating the
protocol.
- Target should only be 32 bytes copied.
- Use a static array for work submission data instead of stack memory.
- Clear the buffer data before sprinting to it.
- Clear work stratum strings before setting them and add them to debug output.
- Drop stratum connect failed message to verbose level only since it's a regular
probing message.
- TCP Keepalive in curl is only in very recent versions and not required with
regular messages on stratum anyway.
- Move stratum sockets to curl infrastructure with locking around send+recv to
begin support for proxies and ssl.
- Make detect stratum fail if a proxy has been set up.
- Stratum does not currently have any proxy support so do not try to switch to
stratum if a proxy has been specified.
- Windows doesn't work with MSG_PEEK on recv so move to a continuously updating
buffer for incoming messages.
- Alloca is unreliable on windows so use static arrays in util.c stratum code.
- Begin support for mingw stratum build.
- Add space to reject reason.
- Parse the reject reason where possible from stratum share submission.
- Pass json error value to share result function to be able to parse reject
reason in stratum.
- Don't try to parse unneeded parameters in response to mining.subscribe.
- Remove the sshare hash entry if we failed to send it.
- Change notify message to info level to avoid spamming repeatedly when a pool
is down.
- Check the stratum pool difference has not changed compared to the work diff
when testing whether a share meets the target or not and retarget if necessary.
- Bit error in target calculation for stratum.
- Set work_block in gen_stratum_work for when work is reused to avoid thinking
it's all stale.
- Offset the current block detection to the prev block hash.
- We should be testing for id_val, not id in parse stratum response.
- Make target on stratum scale to any size by clearing sequential bits according
to diff.
- Correct target calculation in gen_stratum_work.
- If a share result has an error code but still has an id, it is likely a
reject, not an error.
- Initiate stratum the first time in pool_active only, allowing us to switch to
it on getting a failed getwork and detecting the presence of stratum on the url
at that time.
- Use 5 second timeout on sock full for now as a temporary workaround.
- If no stratum url is set by the end of the detect stratum routine, copy the
sockaddr url.
- Make all buffers slightly larger to prevent overflow.
- Make the stratum recv buffer larger than the recvsize.
- Userpass needs to be copied to user and pass earlier to allow stratum
authorisation to work with it.
- Store a sockaddr url of the stripped url used in determining sockaddr to not
confuse it with the stratum url and fix build warnings.
- Decrease the queued count with stratum work once it's staged as well.
- Allow the stratum retry to initiate and auth stratum in pool_alive to make
sure the stratum thread is started.
- Avoid duplicating pool->rpc_url and setting pool->stratum_url twice to itself.
- Detect if a getwork based pool has the X-Stratum header on startup, and if so,
switch to the stratum based pool.
- Comment update.
- Minor message change.
- Create a work item from a "clean" request from stratum allowing the new block
to be detected and the appropriate block change message to be given.
- Use statically allocated stratum strings in struct work to cope with the
inability to safely deallocate dynamically allocated ram.
- Use the current pool when deciding whether to reuse work from a stratum source
rather than the work's previous pool.
- Copy the stratum url to the rpc url to avoid none being set.
- Provide locking around stratum send operations to avoid races.
- Submit shares from stratum through the abstracted submit share function
detecting what message they belong to and showing the data from the associated
work, and then deleting it from the hash.
- Use a more robust mechanism to obtain a \n terminated string over a socket.
- Abstract out share submit as a function to be useable by stratum.
- Rename parse_stratum to parse_method as it is only for stratum messages that
contain methods.
- Display stratum as mechanism in status line when current pool is running it.
- Count each stratum notify as a getwork equivalent.
- Correct nonce submitted with share.
- Extranonce2 should be added before coinbase2.
- We should be hashing the binary coinbase, not the hex one.
- Fix endianness of nonce submitted for stratum.
- Check that stratum is already active in initiate_stratum to avoid
de-authorising ourselves by subscribing again.
- Begin implementing a hash database of submissions and attempt sending results.
- Copy parameters from stratum work required for share submission.
- Set lagging flag on first adding a pool to prevent pool slow warning at
startup.
- Fix work->target being a 32 byte binary in gen_stratum_work.
- Store and display stripped url in its own variable.
- Create machinery to divert work requests to stratum.
- Generate the work target in gen_stratum_work, setting default diff to 1 in
case it is not yet set.
- Generate work data, midstate and hash1 in gen_stratum_work.
- Generate header created from stratum structures in gen_stratum_work.
- Generate merkle root hash in gen_stratum_work.
- Generate the coinbase for generation of stratum based work.
- The number of transactions is variable so make merkle a variable length
dynamically allocated array and track how many there are for stratum.
- Rename nonce2 to n2size reflecting that it's a size variable and not the
actual nonce.
- Provide rudimentary support for stratum clean work command in the stratum
thread.
- Cope with pools being removed in the stratum thread.
- Use the pool sock value directly in the stratum thread in case it changes
after reconnecting.
- Create a stratum thread per pool that has stratum that monitors the socket and
serves received data.
- Check return value of stratum_parse.
- Complete authorisation in stratum.
- Implement stratum parsing of notify parameters and storing them in the pool
stratum work structure.
- Create helper functions for duplicating json strings to avoid keeping json
references in use.
- Append \n in the sock_send function instead of adding it when constructing
json in stratum.
- Don't keep any json references around with stratum structures.
- Create parse_stratum function that hands off stratum parameters to other
functions to manage pool stratum work struct variables. Implement mining
difficulty setting.
- Create helper functions for checking when a socket is ready to read on and
receive a single line at a time. Begin stratum authorisation process.
- Provide a helper function for reading a single \n terminated string from a
socket.
- Create a stratum work structure to store current work variables.
- Test specifically for stratum being active in pool_active.
- Detect stratum in common place when adding urls, and use a bool to tell us
when it's active.
- Fix warnings.
- Extract and store various parameters on stratum init confirming successful
mining notify.
- Use existing socket macros and close the socket on failure in init stratum.
- Initiate stratum and grab first json result.
- Get detailed addressinfo from the parsed URL for future raw socket usage when
possible. IPV4 only for now.
- Prepare for getaddrinfo call.
- Add data structures to pool struct for socket communications.
- Put all socket definitions in util.h to allow reusing by added socket
functions to be used in util.c.
Version 2.7.7 - October 7, 2012
- Fix unused warnings on ming build.
- Fix sign warning in ocl.c
- fds need to be zeroed before set in modminer.
- Put scrypt warning on separate line to avoid 0 being shown on windows as
bufsize.
- Display correct pool number when block is found.
- Prevent corrupt values returned from the opencl code from trying to read
beyond the end of the buffer by masking the value to a max of 15.
- Icarus USB write failure is also a comms error
- api.c DEBUG message has no paramter
- Icarus catch more USB errors and close/reopen the port
- API-README update cgminer verison number
- hashmeter fix stats kh/s on 32bit windows
Version 2.7.6 - September 24, 2012
- Reorder libztex header include order to fix missing struct definition.
- Display share difficulty on log with a shortened hash display on submission.
- API stats add some pool getwork difficulty stats
- Ignore any pings pushed to the worker threads if the thread is still paused to
prevent it being enabled and disabled repeatedly.
- README - FAQ - usermod group - shouldn't remove other groups
- Test for sequential getwork failures on a pool that might actually be up but
failing to deliver work as we may end up hammering it repeatedly by mistake.
- reduce windows compile warnings
- util.c - bug - proxy - no data end condition
- As we average gpu time over 5 work intervals for dynamic GPU intensity, there
is no need to maintain a rolling average and it avoids the potential long term
corruption of a single overflow value.
- Test for the now-automatically exported variable AMDAPPSDKROOT when looking
for the presence of the OpenCL headers.
- API don't change 'Diff1 Shares' - backward compatability FTW
- miner.php highlighting correctly handling difficulty
- API - Add last share difficulty for devices and pool
- Store and report Accepted,Rejected,Stale difficulty in the summary and API
- WorkTime - display prevblock for scrypt
- api.c remove compile warnings
- Calculate work difficulty for each getwork and display with WorkTime debug
- remove MMQ unused variable warning
- FPGA - allow long or short device names in detect code + style police
- WorkTime - multiple nonce per work and identify the work source
- Optional WorkTime details with each Accepted/Rejected work item
- Icarus - ignore hardware errors in timing mode
- miner.php oops - mistype
- miner.php by default don't display IP/Port numbers in error messages
- api.c all STATUS messages automatically escaped
- api.c add missing escape for comma in MSG_PGAUNW
- API add display of and setting queue,scantime,expiry
- HW: dont submit bad shares
- save individual pool proxy settings to config
- --default-config - allow command line to define the default configuration file
for loading and saving
- API-README update for pools proxy info
- README URL proxy must use quote so show in the example
- bug: remove proxy: from the front of the proxy used
- CURL support for individual proxy per pool and all proxy types
- README spelling/etc
- README - FPGA device FAQ
- HW: error counter auto for all devices - ztex code not fixed
- API pgaidentify - unsupported message should be a warning
- API/BFL identify a device - currently only BFL to flash the led
- BFL add throttle count to internal stats + API
- BFL: missing device id in log message
- miner.php correct to new Diff1 Work field names
- API add device diff1 work
- API-README update
- api.c Correct diff1 field name
- count device diff1 shares
- API-README more debug parameter information
- API allow full debug settings control
Version 2.7.5 - August 31, 2012
- Adjust opencl intensity when adjusting thread count to prevent it getting
pegged at a value below the minimum threads possible.
- miner.h max_hashes -> int64_t
- Keep the local block number in the blocks structs stored and sort them by
number to guarantee we delete the oldest when ageing the block struct entries.
- Use correct sdk version detection for SDK 2.7
- Revert "Pick worksize 256 with Cypress if none is specified."
- Test for lagging once more in queue_request to enable work to leak to backup
pools.
- There is no need to try to switch pools in select_pool since the current pool
is actually not affected by the choice of pool to get work from.
- Only clear the pool lagging flag if we're staging work faster than we're using
it.
- needed flag is currently always false in queue_request. Remove it for now.
- thr is always NULL going into queue_request now.
Version 2.7.4 - August 23, 2012
- Perform select_pool even when not lagging to allow it to switch back if needed
to the primary.
- Simplify macros in output kernels avoiding apparent loops and local variables.
- Carry the needed bool over the work command queue.
- Move the decision to queue further work upstream before threads are spawned
based on fine grained per-pool stats and increment the queued count immediately.
- Track queued and staged per pool once again for future use.
- OpenCL 1.0 does not have native atomic_add and extremely slow support with
atom_add so detect opencl1.0 and use a non-atomic workaround.
- Pools: add RollTime info to API 'stats' and 'Stats' button in miner.php
Version 2.7.3 - August 22, 2012
- Minimise the number of getwork threads we generate.
Version 2.7.2 - August 22, 2012
- Pick worksize 256 with Cypress if none is specified.
- Give warning with sdk2.7 and phatk as well.
- Whitelist sdk2.7 for diablo kernel as well.
- Only keep the last 6 blocks in the uthash database to keep memory usage
constant. Storing more is unhelpful anyway.
- BFL Flash - always distribute source
- Increase kernel versions signifying changed APIs.
- BFL flash - include source in builds and more FPGA-README
- Check we haven't staged work while waiting for a curl entry before proceeding.
- Use atomic ops to never miss a nonce on opencl kernels, including nonce==0,
also allowing us to make the output buffer smaller.
- Remove compile errors/warnings and document compile/usage in FPGA-README
- bitforce-firmware-flash.c by Luke-jr
- Ignore the submit_fail flag when deciding whether to recruit more curls or not
since we have upper bounds on how many curls can be recruited, this test is
redundant and can lead to problems.
- API-README update cgminer version number
- API-README fix groups P: example mistake
- API-README add COIN and other edits
- gpu->hit should be reset on new work as well.
- Do not add time to dynamic opencl calculations over a getwork.
- miner.php allow 'coin' is custom pages
Version 2.7.1 - August 21, 2012
- Update windows build instructions courtesy of sharky.
- Increase max curls to number of mining threads + queue * 2, accounting for up
and downstream comms.
- Queue enough requests to get started.
- There is no point trying to clone_work in get_work() any more since we clone
on every get_work_thread where possible.
- There is no point subtracting 1 from maxq in get_work_thread.
- Only set lagging flag once there are no staged work items.
- select_pool does not switch back to the primary once lagging is disabled.
- miner.php allow page title to be defined in myminer.php
- Free work before retrying in get_work_thread.
- Increment total work counter under mutex lock.
- Increment the queued count after the curl is popped in case there's a delay
waiting on curls and we think we've queued work when in fact we're waiting
- API new command 'coin' with mining information
- Do the dynamic timing in opencl code over a single pass through scanhash to
make sure we're only getting opencl times contributing to the measured inte
- Increase curl reaping time to 5 minutes since comms between curl requests can
be 2 mins apart with lots of rolltime.
- No need for extra variable in hash_push.
- Remove short options -r and -R to allow them to be reused and remove readme
entries for deprecated options.
- Avoid attempting to recursively lock the console mutex by disabling warnings
in gpu_fanpercent when fanspeed monitoring fails on windows. Debugged by l
- Deprecate the opt_fail_pause parameter, leaving a null placeholder for
existing configurations.
- Don't pause after failed getwork, set lagging flag and reassess.
- Add message to share if it's a resubmit.
- We should not be pausing in trying to resubmit shares.
- Get rid of the extending fail pause on failed connects since we discard work
after a period.
- get_work always returns true so turn it into a void function.
- get_work never returns false so get rid of fail pause loop.
- Get rid of pause and retry from get_upstream_work so we only do it from one
place.
- Deprecate the opt_retries feature as no one wants cgminer to automatically
abort. Leave a null placeholder for configurations that still have it.
- Reinstate fix ADL gpu-map not working when there are more ADL devices than
openCL patch by Nite69. Add virtual adl mapping for when none is specified o
- miner.php show summary Diff1 Shares total
- miner.php fix Work Utility totals
- miner.php format new Work Utility and Diff1 Shares
- API V1.17 show Work Utility and Diff1 Shares
Version 2.7.0 - August 18, 2012
- Introduce a new statistic, Work Utility, which is the number of difficulty 1
shares solved per minute. This is useful for measuring a relative rate of work
that is independent of reject rate and target difficulty.
- Implement a new pool strategy, BALANCE, which monitors work performed per pool
as a rolling average every 10 minutes to try and distribute work evenly over all
the pools. Do this by monitoring diff1 solutions to allow different difficulty
target pools to be treated equally, along with solo mining. Update the
documentation to describe this strategy and more accurately describe the
load-balance one.
- Getwork fail was not being detected. Remove a vast amount of unused variables
and functions used in the old queue request mechanism and redefine the getfail
testing.
- Don't try to start devices that don't support scrypt when scrypt mining.
- 0 is a valid return value for read so only break out if read returns -1.
- Consider us lagging only once our queue is almost full and no staged work.
- Simplify the enough work algorithm dramatically.
- Only queue from backup pools once we have nothing staged.
- Don't keep queueing work indefinitely if we're in opt failover mode.
- Make sure we don't opt out of queueing more work if all the queued work is
from one pool.
- Set lagging flag if we're on the last of our staged items.
- Reinstate clone on grabbing work.
- Grab clones from hashlist wherever possible first.
- Cull all the early queue requests since we request every time work is popped
now.
- Keep track of staged rollable work item counts to speed up clone_available.
- Make expiry on should_roll to 2/3 time instead of share duration since some
hardware will have very fast share times.
- Do the cheaper comparison first.
- Check that we'll get 1 shares' worth of work time by rolling before saying we
should roll the work.
- Simplify all those total_secs usages by initialising it to 1 second.
- Overlap queued decrementing with staged incrementing.
- Artificially set the pool lagging flag on pool switch in failover only mode as
well.
- Artificially set the pool lagging flag on work restart to avoid messages about
slow pools after every longpoll.
- Factor in opt_queue value into enough work queued or staged.
- Roll work whenever we can on getwork.
- Queue requests for getwork regardless and test whether we should send for a
getwork from the getwork thread itself.
- Get rid of age_work().
- 0 is a valid return value for read so only break out if read returns -1.
- Offset libusb reads/writes by length written as well in ztex.
- Cope with timeouts and partial reads in ztex code.
- fpga serial I/O extra debug (disabled by default)
Version 2.6.5 - August 15, 2012
- Don't try to get bitforce temperature if we're polling for a result to
minimise the chance of interleaved responses.
- Set memory clock based on memdiff if present from with engine changes,
allowing it to parallel manual changes from the menu as well.
- Increase the timeout on bitforce as per Paul Sheppard's suggestion to account
for throttling + work time + excess.
- Fix ADL gpu-map not working when there are more ADL devices than openCL.
Initial patch supplied by Nite69. Modified to suit.
- Windows' timer resolution is limited to 15ms accuracy. This was breaking
dynamic intensity since it tries to measure below this. Since we are repeatedly
sampling similar timeframes, we can average the gpu_us result over 5 different
values to get very fine precision.
- Fix harmless unused warnings in scrypt.h.
- api.c typo
- API allow display/change failover-only setting
- Check we are not lagging as well as there is enough work in getwork.
- Minimise locking and unlocking when getting counts by reusing shared mutex
lock functions.
- Avoid getting more work if by the time the getwork thread is spawned we find
ourselves with enough work.
- The bitforce buffer is cleared and hw error count incremented on return from a
failed send_work already so no need to do it within the send_work function.
- miner.php allow a custom page section to select all fields with '*' - e.g. to
create a STATS section on a custom page
- Escape " and \ when writing json config file
- miner.php optional single rig totals (on by default)
Version 2.6.4 - August 7, 2012
- Convert the serial autodetect functions to use int instead of char to
enumerate devices.
- Make the serial open timeout for BFL generically 1 second on windows.
- Deuglify windows autodetect code for BFL.
- There is no point zeroing temperature in BFL if we fail to get a response, and
we should register it as a HW error, suggesting throttling.
- Update SCRYPT README with information about HW errors.
- Use the scrypt CPU code to confirm results from OCL code, and mark failures as
HW errors, making it easier to tune scrypt parameters.
- We may as well leave one curl still available per pool instead of reaping the
last one.
- Need to recheck the pool->curls count on regaining the pool lock after the
pthread conditional wait returns.
- Display reaped debug message outside mutex lock to avoid recursive locking.
- Add specific information when ADL detects error -10 saying the device is not
enabled.
- api.c update API start message and include port number
- miner.php ignore arg when readonly
- miner.php allow pool inputs: delete, addpool, poolpriority
Version 2.6.3 - August 5, 2012
- Count likely throttling episodes on bitforce devices as hardware errors.
- Style cleanups.
- Use FTD2XX.DLL on Windows to autodetect BitFORCE SHA256 devices.
- Make pool_disabled the first in the enums == 0, fixing the pool enabled count
which compares if value is not enabled before enabling it.
- Correct writing of scrypt parameters to config file based on command line
parameters only.
- Use different variables for command line specified lookup gap and thread