1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 06:18:06 +00:00
Commit Graph

725 Commits

Author SHA1 Message Date
Noel Maersk
3c3a58475e ui+api: ask for pool name/description/algorithm when adding pool from NCurses/API.
Closes #116.

This is trivial and shouldn't be so hard: it required modifying
functions in both sgminer.c (for NCurses stuff) and api.c. There is
much code repetition, since the NCurses interface is hard-coded in.
Removing it would simplify things greatly.
2014-04-11 15:06:36 +03:00
Bllacky
942c6714fa Update miner.h
Variable declaration. VS seems to like size_t instead of int for certain variables.
2014-04-10 18:39:38 +03:00
Noel Maersk
3ddf6baad9 core: rename default_algorithm to opt_algorithm.
... So it's easier to find when refactoring the configuration system
later on.
2014-04-07 22:09:05 +03:00
Noel Maersk
0793c96074 Merge remote-tracking branch 'mrbrdo/poolalgo' into poolalgo
Conflicts (resolved):
	ocl.h
	sgminer.c
2014-04-07 22:05:33 +03:00
Noel Maersk
b6218e20c1 config: rename --pool-priority to --priority, --coin to --description.
There are now get_current_pool() and current_pool(), which is confusing.
Moved them closer together, so it's at least obvious.
2014-04-07 21:14:17 +03:00
Noel Maersk
cc735db550 misc: don't violate reserved identifier naming convention.
Closes https://github.com/veox/sgminer/issues/177
2014-04-03 19:12:35 +03:00
Jan Berdajs
c2131df6aa add support for setting algorithm/nfactor for each pool separately, and fix bugged OpenCL thread cleanup (thread shutdown) 2014-03-31 21:05:20 +02:00
troky
bcb78ed91b Added --coin pool parameter. 2014-03-26 11:10:41 +01:00
Martin Danielsen
01b3f70b63 A new --no-client-reconnect command that disables the 'client.reconnect' function.
It looks like there's an exploit that abuses said command, but it is still not clear exactly how.

There's also an additional message when the reconnect happens: "WARNING: POTENTIAL CLIENT.EXPLOIT!", but it requires you to be actively monitoring your log to catch it, and in which case you already get a "Reconnect requested from Pool 0 to 127.0.0.1" message.

Note that disabling 'client.reconnect' might affect some pools that rely on the feature, like pools that you lease your rig to.

Oh and this is dry-coded. :)
2014-03-24 15:12:40 +02:00
Noel Maersk
87801c2578 opencl: rename cgpu_info->kname to cgpu_info->kernelname. 2014-03-17 21:57:00 +02:00
Noel Maersk
3787f47155 misc: add comment on what cgpu_info->{,k}name are. 2014-03-17 21:57:00 +02:00
Noel Maersk
c9ccf551d7 opencl: remove cl_kernels structure definition and mention.
No longer used.

TODO: check if clState would benefit from having kernel name.
2014-03-17 21:57:00 +02:00
Noel Maersk
1333ed576d core: simplify kernel selection code.
WIP!

Use a string instead of a state-machine-ey kernel selection mechanism
where kernel names have to be predefined. This should allow just dropping
new kernels into dir `kernel` without bloating the code in three other
places.

Is in dire need of a cleanup, function parameter check, edge case check -
all the usual testing.

In particular, checking these definitions/keywords:

* enum cl_kernels
* kname
* [c]gpu[s]->kernel (and similar)
* memory cleanup after strdup()?..
* chosen_kernel
* queue_scrypt_kernel
* strbuf
* initCl
2014-03-17 21:56:43 +02:00
troky
49aef7100f Reverting "poolname" to "name". 2014-03-15 19:08:24 +02:00
Noel Maersk
8079d054d6 Merge branch 'nfactor'
Conflicts (resolved):
	Makefile.am
	winbuild/sgminer.vcxproj.filters
2014-03-14 17:46:54 +02:00
Noel Maersk
c6a27709f8 core: use global algorithm structure instead of opt_nfactor.
Also squashed:

config: add log messages to set_algo() and set_nfactor().

algorithm: use set_algorithm_nfactor() when setting default nfactor in set_algorithm().

Otherwise algorithm->n defaults to 0.

P.S. Did I already mention how this could have been C++?..
2014-03-07 02:27:06 +02:00
Noel Maersk
92b7770212 config: add --algorithm option and documentation.
Doc in `doc/configuration.md` (has to be started sometime, no?).

Configuration function has to be lamely-named set_algo(), because
set_algorithm() is already declared in algorithm.h (prevent namespace
conflict).

algorithm has to be added as global variable due to the way the
callback is done (by CCAN/opt, which in itself is nice).

This can be cleaned up significantly by (at least) introducing a
global configuration struct, but there is no reason to do it now
just for this - better a wholesale manana.
2014-03-07 02:27:00 +02:00
Noel Maersk
8e4fb3c554 pool: abstract get_pool_name()
The introduction of get_pool_name() warrants a separate function
so opt_incognito does not litter everywhere.
2014-02-28 22:15:39 +02:00
Teemu Suikki
73bb1504e9 Scrypt-nfactor support!
Added new configuration parameter "nfactor", which defaults to 10 (normal scrypt).
Use 11 for vertcoin.

Kernels modified accordingly.
2014-02-23 04:44:17 +02:00
Noel Maersk
44aed3570e Merge branch 'build-msvs2010-upd' into build-msvs2010-merge
Test in separate branch before merging into master.

Conflicts (resolved):
	api.c
	util.c
2014-02-22 17:05:07 +02:00
Con Kolivas
90cc93c6cc Add the ability to display a hexadecimal 32 bit unsigned integer to the API. 2014-02-16 14:42:30 +02:00
Con Kolivas
95ac0c4356 Export the flush_queue function for use by drivers. 2014-02-16 14:41:02 +02:00
ckolivas
8592226ad2 Add a get and queue helper work function. 2014-02-16 14:37:16 +02:00
Con Kolivas
011512561a Add a call to a driver specific zero stats function when zero stats is called to allow each driver to reset its own stats as well if desired. 2014-02-16 14:24:06 +02:00
Con Kolivas
c31de2601b Store when the last getwork was retrieved and display it in the API summary. 2014-02-16 14:14:40 +02:00
ckolivas
d1e2bfaf7f Make submit_tested_work return a bool about whether it meets the work target or not. 2014-02-16 14:10:31 +02:00
ckolivas
a58ef1b8c7 Provide a helper function for determining dev runtime and use it in the hashmeters used. 2014-02-16 14:09:51 +02:00
Con Kolivas
cc2aa215a8 Clear pool work on a stratum reconnect message. 2014-02-16 13:57:20 +02:00
Kano
b6c6ec5c83 api add data type AVG float 3 decimal 2014-02-16 13:49:26 +02:00
Noel Maersk
a1724e34e5 api: add missing extern declaration (for consistency). 2014-02-13 12:30:59 +02:00
Noel Maersk
c09a5b4406 core: remove num_processors (unused). 2014-02-08 15:41:31 +02:00
Markus Peloquin
bf8e37ce19 Support building in cygwin.
Revised the compiler platform macros. Building goes like
$ AMDAPPSDKROOT= CPPFLAGS=-I/usr/include/ncurses ./configure
2014-02-07 22:31:40 -08:00
Noel Maersk
dff7876b7a Merge branch 'master' into build-msvs2010-upd 2014-02-07 21:45:26 +02:00
Noel Maersk
23eb242a5f kernel: make psw usable, reorder cases alphabetically.
Closes https://github.com/veox/sgminer/issues/30
2014-02-01 16:01:37 +02:00
Brandon Tuomela
bda1070259 kernel: add psw kernel. 2014-02-01 15:51:03 +02:00
Noel Maersk
b97a641ed9 Merge branch 'master' into build-msvs2010-upd
Conflicts (resolved):
	sgminer.c
2014-02-01 00:25:56 +02:00
Perry Huang
8bd980dbbd Add API_KHS endpoint.
Fix multiplying before double cast.

Add endpoint to response.

Fix API response function.

Fix var name.

Add KHS to API summary.
2014-01-31 02:57:23 -06:00
Sanjin Trošelj
7ac101f365 VS2010 build: Prepare miner.h
Cherry-picked by veox.
2014-01-28 00:22:19 +02:00
Noel Maersk
64fc8324b8 pools: initial implementation of pool state machines.
moved enable_pool(), disable_pool() and other functions related to
state. These could probably be factored out altogether.

Pool state default is now "enabled" - it was previosly "disabled",
but there was an unconditional function call to enable all pools
in main() previously. It was factored out by joe's earlier commits,
so not visible in this one.
2014-01-27 02:28:58 +02:00
Noel Maersk
1ebcb07302 Merge branch 'master' into pools 2014-01-27 00:54:16 +02:00
Noel Maersk
cae071b837 Merge branch 'kernels' 2014-01-27 00:48:25 +02:00
Noel Maersk
e269656959 Merge branch 'pools-joe' 2014-01-26 23:57:18 +02:00
Noel Maersk
048c82b9b2 pools: rename 'pool->enabled' to 'pool->state'. 2014-01-26 20:02:00 +02:00
Noel Maersk
22b78e91f6 tui: Refactor status line printing.
Default pool name is now URL and port instead of "Pool N" (which
is confusing).

Status line displays user-defined name.
2014-01-26 19:44:39 +02:00
Noel Maersk
6417bcce61 Merge remote-tracking branch 'joe/pool_options' into pools 2014-01-26 16:51:38 +02:00
Joe4782
b1eb2ab8f8 Implemented the 'remove-pool' config option for json file pools 2014-01-26 01:26:00 +00:00
Joe4782
1d81196238 Added a 'disable-pool' option to the json configuration, to allow pools to be started up disabled 2014-01-25 20:33:45 +00:00
Martin Danielsen
d11df698d1 --rawintensity option, by request of Dead2.
This setting allows to set the GPU intensity value directly without any modifiers, it does not
get any more raw than this! Look at the xintensity description raw for examples of regular
intensity values. You can also set this value through the ncurses interface by pressing:
G -> A -> select device id -> enter value.

Minor xintensity code cleanup as well.

Conflicts:
	driver-opencl.c
	miner.h
	sgminer.c
2014-01-22 18:24:43 +02:00
Noel Maersk
5f326d64f5 kernel: allow choosing Alexey Karimov's kernels.
Am I the only one who gets a segfault?..
2014-01-21 10:36:55 +02:00
Noel Maersk
7950c10374 kernel: integrate Zuikkis' kernel, selectable with --kernel=zuikkis.
Kernel ckolivas is still the default. Needs documentation, too.

https://github.com/veox/sgminer/issues/4
2014-01-20 23:38:39 +02:00