forked from kanoi/cgminer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NEWS
3520 lines (3194 loc) · 170 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.11.3 - March 17, 2013
- Update the hashmeter at most 5 times per second.
- Usbutils use its own internal read buffer
- Calculate work utility for devices that support target diffs of greater than
1, and update scrypt code to use it.
- usbutils allow read termination match to be a string
- Set default GPU threads to 1 for scrypt.
- Connect backup stratum pools if the primary pool cannot deliver work.
- Use a new algorithm for choosing a thread concurrency when none or no shader
value is specified for scrypt.
- Do not round up the bufsize to the maximum allocable with scrypt.
- Remove the rounding-up of the scrypt padbuffer which was not effectual and
counter-productive on devices with lots of ram, limiting thread concurrencies
and intensities.
- bufsize is an unsigned integer, make it so for debug.
- Update the hashmeter once per second but only display the extra logs every
opt_log_inteval.
- add a dummy ztex to usbutils so cgminer -n lists ztex also
- nDevs required for -n with usb
- USB device list - convert some common error numbers to messages
- USB -n 'known' text only without ---usb-list-all
- USB modify -n and --usb-dump to only show known devices or use new
--usb-list-all option to see all
- Make pool adding while running asynchronous, using the pool test thread
functionality.
- Only curl easy cleanup a stratum curl if it exists.
- Sacrifice the ram of curl handles in stratum disconnects when we have built
with old libcurl to avoid crashes.
- cgminer -n to include a USB device list
- usbutils allow call of usb_all() from other code
- Convert gbt_lock to a cg_lock.
- Add intermediate variants of cglocks that can be up or downgraded to read or
write locks and use them for stratum work generation.
- Move the stratum and GBT data to be protected under a new cg_lock data_lock.
- Convert the ch_lock to cg_lock.
- Convert the control_lock to a cg_lock.
- Remove unused qd_lock.
- Implement cg_lock write biased rwlocks.
- do usb_initialise() after the started message so we see it
- --usb-dump display brief dump if value = 0
- USB add --usb options to limit USB device selection v0.1
Version 2.11.2 - March 9, 2013
- Whitelist AMD APP SDK 2.8 for diablo kernel.
- Cope with the highest opencl platform not having usable devices.
- Fix memory leak with share submission on GPU work structures as discovered by
twobitcoins.
- usb_cleanup() without locking.
- Use curl_easy_cleanup to close any open stratum sockets.
- Show pool number in switch message
- Don't start testing any pools with the watchpool thread if any of the test
threads are still active.
- Set sockd to false should curl setup fail on stratum.
- Close any open sockets when reusing a curl handle and reopen the socket
whenever we're retrying stratum.
- Set pool died on failed testing to allow idle flag and time to be set.
- Remove unused pthread_t typedefs from struct pool.
- Perform pool_resus on all pools that are found alive with the test pool
threads.
- Use pool_unworkable in select_balanced as well.
- Differentiate pool_unusable from pool_unworkable.
- Keep a connection open on higher priority stratum pools to fail back to them.
- Rename threads according to what pool they're associated with as well.
- Set the wrong bool in pool_active
- Start the stratum thread only if we successfully init and authorise it,
otherwise unset the init flag.
- Make the initialisation of the stratum thread more robust allowing the
watchpool thread safe access to it after the stratum thread is started.
- API no longer ignore send() status
- API make the main socket non-static
Version 2.11.1 - March 7, 2013
- Shorten the time before keepalive probes are sent out and how frequently
they're sent with stratum curls.
- Only set stratum auth once to prevent multiple threads being started.
- Display select return value on select fail in stratum thread.
- Clear the socket of anything in the receive buffer if we're going to retry
connecting.
- Allow pools to be resuscitated on first startup by the watchpool thread.
- Check all pools simultaneously at startup switching to the first alive one to
speed up startup.
- Clear just the socket buffer when we don't care what is left in a stratum
socket.
- Clear the stratum socket whenever we are closing it since the buffer is going
to be reused.
- Do not continue work from a stratum pool where the connection has been
interrupted.
- Reset stratum_notify flag on suspend_stratum as well.
- Close any sockets opened if we fail to initiate stratum but have opened the
socket.
- Close any existing stratum socket if we are attempting to restart stratum so
the pool knows the connection has gone.
- Show mechanism of stratum interruption if select times out.
- Make stratum connection interrupted message higher priority to be visible at
normal logging levels.
- Implement client.show_message support for stratum.
- API add 'Network Difficulty' to 'coin'
- Setup BFLSC support
- API use control_lock when switching pools
- Make sure to retry only once with noresume support for stratum.
- Instead of keeping track of when the last work item was generated to keep
stratum connections open, keep them open if any shares have been submitted
awaiting a response.
- usbutils.c copy full size to 'Last Command'
- configure - set USE_USBUTILS when usbutils is required and use it in the code
- Clear last pool work on switching pools if the current pool supports local
work generation or we are in failover only mode.
- make rw locks: mining_thr_lock and devices_lock
- Release MMQ device only once (not 4 times)
- api.c fix MSG overlap
- Hotplug - allow setting interval via --hotplug or API
- curses - fix - put a dev_width inside #ifdef
- usb_cleanup() use correct locking mechanism
- Implement and use usb_cleanup() on shutdown or restart
- miner.php report 'Last Valid Work' as time before request
- API - return Last Valid Work
- api -> drv
- ZTX bug set missing drv_id
Version 2.11.0 - March 2, 2013
- Update kernel file names signifying changes.
- Update a pool's last work time when the work is popped as well as staged.
- API always report failed send() replies
- Update diff stale: total and pools when stratum throws away shares
- Keep stratum connections open for 2 minutes after the last work item was
staged to allow stray shares to be submitted on pool switching.
- Try to extract the sessionid associated with mining.notify on 3rd level array
and submit it along with the userid to support mining resume, failing gracefully
and restarting if the pool rejects it.
- Speed up watchdog interval and therefore display updates to 2 seconds.
- Update copyright dates.
- Cope with misread sessionid on stratum for now.
- Use constants from the array of __constants throughout the diablo kernel.
- Create a __constant array for use within diablo kernel.
- Fix --benchmark generating valid work for cgminer.
- Use the sessionid as passed on stratum connect to attempt to resume a
connection once and then clear it if it fails, to use a new connection.
- Move to storing the nonce1 in the work struct instead of the sessionid for the
now defunct first draft mining.resume protocol.
- Use global constant arrays for all other constants used in scrypt kernel.
- Use global __constants for sha functions in scrypt kernel.
- Use constants for endian swap macros.
- Revise scrypt kernel copyright notice.
- Separate out additions in scrypt kernel.
- Reuse some Vals[] variables that can be assigned to constants earlier in the
poclbm kernel, making for fewer ops.
- Put all constants used in poclbm kernel into __const memory array to speed up
concurrent reads on the wavefront.
- BFL stop 1st init command if no device
- Add a get_queued function for devices to use to retrieve work items from the
queued hashtable.
- Bugfix: Duplicate stratum sessionid when copying work, to avoid double-free
- Bugfix: Missing pool_no parameter to applog for no-stratum-sessionid debug
message
- Add the choice of hash loop to the device driver, defaulting to hash_sole_work
if none is specified.
- Add comments.
- Add a driver specific flush_work for queued devices that may have work items
already queued to abort working on them on the device and discard them.
- Flush queued work on a restart from the hash database and discard the work
structs.
- Create a central point for removal of work items completed by queued device
drivers.
- Create a fill_queue function that creates hashtables of as many work items as
is required by the device driver till it flags the queue full.
- Create the hash queued work variant for use with devices that are fast enough
to require a queue.
- Update copyright year.
- Fix tv_lastupdate being made into tv_end and update the hashmeter on cycle,
not opt_log_interval.
- Fix tv_lastupdate being made into tv_end and update the hashmeter on cycle,
not opt_log_interval.
- Only continue submitting shares with mining.resume support on stratum when the
session id matches.
- Provide support for mining.resume with stratum, currently re-authorising after
successful resumption pending finalising of the protocol process.
- Provide basic framework for restarting stratum depending on whether resume
support exists or not.
- Abstract out the setting up of the stratum curl socket.
- Free sessionid in clean_work and remove redundant setting of strings to NULL
since the whole work struct is zeroed.
- Only clear stratum shares mandatorily on stratum dropouts when the pool does
not support resume.
- Try resubmitting stratum shares every 5 seconds for up to 2 minutes if the
pool session id exists and matches on failure to submit.
- Do as much outside of mutex locking of sshare_lock as possible.
- Remove last reference to struct work used outside the sshare_lock in
submit_work_thread
- Unlock the sshare_lock in submit_work_thread when all references to work and
sshare are complete.
- Add timestamps to stratum_share structs as they're generated and copy the
stratum sessionid if it exists to stratum work generated.
- Store session id for stratum if the pool supports it for future mining.resume
support.
- API.java allow partial reads
- debug_cb buffer type warning
- MMQ rewrite the last of the old scanhash loop and drastically reduce CPU
- hash_sole_work can be static
- Make the numbuf larger to accept larger scrypt parameters.
- Keep the unique id of each work item across copy_work to prevent multiple work
items having the same id.
- Abstract out the main hashing loop to allow us to use a separate loop for
devices that are fast enough to require queued work.
- Provide a noop thread_enable function for drivers that don't support it.
- Provide a noop thread_shutdown function for drivers that don't support it.
- Provide a noop hw_error function for drivers that don't support it.
- Provide a noop prepare_work for drivers that don't support it.
- Provide a noop thread_init for drivers that don't support it.
- Provide a noop can_limit_work for devices that don't support it.
- Provide a noop thread_prepare function for drivers that don't use
thread_prepare.
- Use blank_get_statline_before for GPU devices that don't support adl
monitoring.
- Provide a noop get_stats function for drivers that don't support it.
- Provide a blank get_statline for drivers that don't support it.
- Provide a blank get_statline_before function for drivers that don't have one.
- Fill drivers missing reinit_device with a noop version.
- add 'count' to cumstomsummarypage 'calc'
- hotplug use get_thread() where appropriate
- convert sleep(const) to nmsleep()
- remove empty #ifdef
- call a separate get_devices() with locking, as required
- usbutils - avoid free cgusb twice
- usbutils hotplug v0.1
- Report USB nodev as ZOMBIE on the screen
- Change file modes.
Version 2.10.5 - February 7, 2013
- Fix logic fail on partial writes with stratum send that was leading to corrupt
message submissions.
- Do not consider every call to stratum_resumed a pool recovery unless it was
actually idle.
- Do not enable the pool disable on reject feature unless explicitly enabled
with --disable-rejecting.
- Stratum disconnect shares - count total against stale
- Use sanity checking to prevent a possible overflow with invalid data being
given by the pool for difficulty as reported by luke-Jr.
- Check for calloc failure for completeness in gen_stratum_work.
- Cache the coinbase length to speed up stratum work generation.
- Cache the header length when generating stratum work to avoid calculating it
on every work generation, and to only need one alloc+sprintf, speeding up work
generation.
- Use heap ram for coinbase in gen_stratum_work, zeroing it before use.
- Provide a wrapper for aligning lengths of size_t to 4 byte boundaries.
- Fix memory leak on stratum share submission.
- Zero the best share string memory when zeroing stats.
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