Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many syntax errors for web/yaamp/core/exchange #16

Open
wants to merge 999 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
999 commits
Select commit Hold shift + click to select a range
94e5b5e
stratum: fix possible issue on client subscribe
tpruvot Sep 17, 2017
778f9ae
cli: maintenance function to fix an invalid user symbol
tpruvot Sep 22, 2017
e67634d
stratum: prevent some negative values
tpruvot Oct 2, 2017
6fb041a
stratum: extra check for job id field (#181)
tpruvot Oct 5, 2017
7d85e36
backend: prevent too long wallet versions
tpruvot Oct 8, 2017
bd7bb9b
sql: bookmarks creation issue with recent mysql
tpruvot Oct 9, 2017
b97c52f
hsr algo (x13 + custom hash)
tpruvot Oct 9, 2017
c6e140e
handle phi algo too
tpruvot Oct 7, 2017
f14ae82
api: use a new constant for api host
tpruvot Oct 17, 2017
3eb8c33
cli: improve coin generated command for confirmed orphans
tpruvot Oct 22, 2017
9ec57d8
stratum: INN / ENT support (#183)
Oct 26, 2017
2bc3ba7
stratum: DSR masternodes (#184)
phm87 Oct 27, 2017
bdad68d
stratum: disable useless client sort
tpruvot Nov 1, 2017
028d661
binance public api (markets)
tpruvot Nov 1, 2017
a1d3ecd
backend: recheck orphaned blocks status in the hour, for LUX
tpruvot Nov 3, 2017
bfd6148
polytimos algo
tpruvot Nov 16, 2017
333beca
stratum: crown systemnode coinbase (#187)
Infernoman Nov 17, 2017
d63483c
yiimp: add polytimos to algo list (#188)
crackfoo Nov 17, 2017
b7a5625
stratum: truncate worker fields if too long
tpruvot Nov 18, 2017
9dabe06
nicehash: disable last api calls if not wanted
tpruvot Nov 18, 2017
b16af0e
polytimos algo list fix
scorpio18 Nov 21, 2017
87c7b8c
stratum: support ONEX/GBX/KZC nodes (#189)
Nov 21, 2017
2b98f02
payments: bulk op to reset a failed currency payout
tpruvot Nov 22, 2017
f7a04ab
markets: disable nova by default, ignore cryptopia scrypt
tpruvot Nov 22, 2017
6ced60c
markets: add stocks.exchange public api
tpruvot Nov 22, 2017
5b30461
tools: update coindb labels api
tpruvot Nov 27, 2017
9d65986
tools: add coincap.io api for missing labels
tpruvot Nov 27, 2017
cbe55a3
Squashed commit for segwit support:
tpruvot Nov 28, 2017
24c2880
explorer: show segwit txs + workaround for some missing ones
tpruvot Nov 30, 2017
66b1504
explorer: show tx indices and truncate blocks with too much
tpruvot Nov 30, 2017
69a8f95
stratum: allow wallet filters in the .conf
tpruvot Nov 30, 2017
ac13a0f
markets: update yobit markets prices with a different base
tpruvot Nov 30, 2017
797dba1
stocks.exchange private api function
tpruvot Dec 2, 2017
94c8db3
dashboard: fix alt balances for multialgo coins
tpruvot Dec 2, 2017
80c53c8
cryptopia: new default min_btc_trade and withdraw_fee_btc
tpruvot Dec 5, 2017
e47e40a
benchs: ignore if already too much data per chip/algo
tpruvot Dec 7, 2017
6c09e5f
yaamp_fee() comment a few unused sql queries (on shares)
tpruvot Dec 8, 2017
ff6b22c
cli: allow to pass args with spaces
tpruvot Dec 10, 2017
258bc24
cli: new bench command to query bench data avgs
tpruvot Dec 10, 2017
6b68660
keccak: use mBTC/GH unit like blake
tpruvot Dec 11, 2017
01c5736
yobit: markets price typo + coinsmarkets server fake bid price
tpruvot Dec 12, 2017
f95177c
stratum: prefer user coin first in yiimp mode
tpruvot Dec 12, 2017
a8e98c1
stratum: ipset function to block botnets
tpruvot Dec 15, 2017
35bfd75
New admin botnets view to list users with many ips
tpruvot Dec 16, 2017
ba7873e
mining html fix (#195)
Dec 16, 2017
39d123a
stratum: reduce client algo & socket struct size
tpruvot Dec 17, 2017
d090779
stratum: prevent double free on bad clients
tpruvot Dec 20, 2017
31163c3
sql: prepare new stratums fields for multiple instances
tpruvot Jan 1, 2018
472b4d7
stratum: fill new port workers and symbol fields
tpruvot Jan 1, 2018
41821ce
sql: also add a stratum start time column
tpruvot Jan 1, 2018
80fa212
update keys.sample.php (#199)
phm87 Jan 1, 2018
dfb2822
cex.io rest-api (public + private)
tpruvot Jan 2, 2018
149e950
coinexchange: check wallet status and disable if offline
tpruvot Jan 3, 2018
c375085
dashboard: show the stratum's uptime
tpruvot Jan 4, 2018
7729b5c
stratum: possibility to change sql port
Jan 6, 2018
ab5e411
kucoin exchange api + balances and icons
tpruvot Jan 7, 2018
1d52379
stratum: use new dash masternodes as default
tpruvot Jan 9, 2018
3836821
stratum: prevent double auth & ignore invalid sockets
tpruvot Jan 9, 2018
9a0aedf
bittrex: update min trade (#203)
crackfoo Jan 10, 2018
d200935
stratum: null ptr check on json arrays
tpruvot Jan 10, 2018
bc68c04
stratum: handle more old masternodes (#204)
tpruvot Jan 10, 2018
d7b980b
home: update project description
tpruvot Jan 11, 2018
accb3b4
kucoin: daily check deposit addresses + typo on manual ticker update
tpruvot Jan 12, 2018
5ae0afb
ui: remove css width % from footer (#206)
ServePeak Jan 13, 2018
fda559b
stratum: hsr sm3 cleanup + rotl32 issue
tpruvot Jan 13, 2018
e569b57
binance: auth rest api function
tpruvot Jan 14, 2018
b760bea
binance: update balances
tpruvot Jan 14, 2018
758e591
stratum: initialize segwit flag
tpruvot Jan 18, 2018
3737f97
lbry: change estimates in mBTC/GH like other sha algos
tpruvot Jan 19, 2018
bc7c183
backend: drop old blocks from the db after 60 days
tpruvot Jan 19, 2018
117c7b3
stratum: pushing more old masternodes (#210)
Jan 19, 2018
1f9bfd0
stratum: handle proxy protocol (#196)
Jan 22, 2018
7aa93d6
decred: listtransactions order is finally like others
tpruvot Jan 23, 2018
e4914a6
stratum: check coin filters early (#211)
Jan 24, 2018
0019ca6
new x16r algo, with stratum factor 256, like timetravel algos
tpruvot Jan 12, 2018
88cfe6f
benchs: ignore some weird device names and x16r algo
tpruvot Jan 24, 2018
a89a0ef
stratum: fix altminer commit
tpruvot Jan 24, 2018
4e5fbb4
cexio: include btc in orders for the balance
tpruvot Jan 24, 2018
88106d8
Add MAG (Magnet) masternode to oldmasternodes (#213)
FredericRezeau Jan 26, 2018
0f04d6d
balances: fill the btc 'onsell' field too (locked)
tpruvot Jan 27, 2018
a79e214
stratum: avoid the use of getinfo
tpruvot Jan 30, 2018
d69d3ce
yescryptR16 algo (#217)
UniMiningNet Jan 31, 2018
0bf982d
sql: add hasgetinfo and no_explorer fields to coins table
tpruvot Feb 2, 2018
4d74f06
stratum: extra check for the haters
tpruvot Feb 7, 2018
30413db
update sample stratum rc.local #225
tpruvot Feb 9, 2018
1e57015
admin: fill servers dropdown with the db #222
phm87 Feb 7, 2018
5468b84
stratum: set PBS as old masternode #220
oddhome Feb 4, 2018
90e78f7
NH: new algos (#229)
phm87 Feb 14, 2018
c99770a
stratum: allow to reopen wiped global logs
tpruvot Feb 16, 2018
e37c636
Update x16r.conf : error with port (#232)
Feb 18, 2018
033d50c
stratum: allow more than 254 transactions in blocks
tpruvot Feb 16, 2018
236650d
stratum: allow to limit txs per block
tpruvot Feb 18, 2018
03f25a7
stratum: DNR v2 masternodes
tpruvot Feb 24, 2018
02c0191
stats: rewrite pool graphes data with json_encode
tpruvot Feb 24, 2018
de4592c
Add a5a algo for Andcoin
Feb 25, 2018
4120ee7
stratum: auto detect 'old' masternodes rpc (#236)
tpruvot Feb 26, 2018
0287896
stratum: add missing keccakc variant
tpruvot Feb 28, 2018
72b738d
explorer: truncate huge txs json for site reliability
tpruvot Feb 28, 2018
2dccc57
markets: handle cryptobridge ticker
tpruvot Feb 28, 2018
a364e30
cli: allow to search users by ip
tpruvot Mar 1, 2018
befb105
stratum: fill fds and server name/url in stratums table
tpruvot Mar 1, 2018
c49c8b3
stratum: fix the major socket leak on bad auth
tpruvot Mar 2, 2018
343ec49
stratum: min diff and anti-flood adjustments
tpruvot Mar 2, 2018
010fd14
stratum: ignore possible dup on new user
tpruvot Mar 2, 2018
8c85b95
stratum: debuglog on/off without code recompile
protopool Mar 6, 2018
1e06755
use memcache object method instead of low level method (#234)
lutangar Mar 6, 2018
6a7bc6d
memcache: fix param order in last commit
tpruvot Mar 6, 2018
569661a
memcache: revert commit for the backend job
tpruvot Mar 6, 2018
46996e3
stratum: disable haproxy ip translation code by default
tpruvot Mar 8, 2018
669ab6b
stratum: ensure all blocks are put in db (#241)
tpruvot Mar 12, 2018
3624f2c
stratum: be more strict with user string fields
tpruvot Mar 13, 2018
8c27bed
stratum: remove useless mysql escape + fix for stats
tpruvot Mar 13, 2018
bd888ff
stratum: function to track mem usage
tpruvot Mar 13, 2018
165e93b
stratum: function to check hex strings validity
tpruvot Mar 14, 2018
f342017
stratum: also check early nonce is hexa
tpruvot Mar 14, 2018
67d3e6a
stratum: warning fix for recent gcc
tpruvot Mar 14, 2018
c56969c
stratum: socket recv timeout config
tpruvot Mar 15, 2018
333acc0
stratum: STAK special coinbase, with SegWit support
FabrizioFanucci Mar 16, 2018
77e2624
stratum: drop STAK unused vars + git file mode fix
tpruvot Mar 16, 2018
1b3f15f
Add yescryptR32 (#247)
exmac Mar 19, 2018
e5dd766
backend: avoid to clear earnings during payouts (#249)
tpruvot Mar 24, 2018
9c438ee
backend: protect also balances from renting clear
tpruvot Mar 24, 2018
2d0a2df
emulate getinfo for wallets who copy bitcoin mistakes (#250)
Tanariel Mar 25, 2018
2ad1385
x12 algo + GCH multi-algos definition
tpruvot Mar 26, 2018
20de9ab
markets: handle cryptohub api, but only manually
tpruvot Mar 26, 2018
afa2e92
markets: avoid useless api queries if exchange is not used
tpruvot Mar 26, 2018
a954c13
x16s algo, shuffle variant (#251)
opensourcerulez Mar 29, 2018
5bb898f
small x16s fixes, and stratum sample
tpruvot Mar 29, 2018
31441a6
markets: handle graviex ticker (#252)
ServePeak Apr 1, 2018
2f6d74d
trading: auto set bittrex and bleutrade withdraw tx fee
tpruvot Apr 3, 2018
580801f
benchs: unique function to format devices labels
tpruvot Apr 10, 2018
60fb627
security: be more strict with algo param
tpruvot Apr 10, 2018
e97ea63
security: protect XSS seekers from their own hacks
tpruvot Apr 10, 2018
5b91a55
stratum: do more checks on stats device names
tpruvot Apr 10, 2018
e6a731c
explorer: add multi-algo support for ARG explorer (#254)
crackfoo Apr 11, 2018
ea59f8a
Fix graviex market url (#257)
ServePeak Apr 19, 2018
99f1fa9
graviex: use the right ticker bid/ask fields
tpruvot Apr 20, 2018
dd9b467
config: new server var to disable autocreation of coins
tpruvot Apr 20, 2018
10be25e
stratum: correctly create blocks with 253-255 transactions (#260)
lnovy Apr 22, 2018
b22b599
explorer: only allow hexa chars in query params
tpruvot Apr 23, 2018
b517afb
dashboard: some cleanup, remove unused state
tpruvot Apr 29, 2018
1bfec2b
stratum: precheck addresses are valid base58
tpruvot May 1, 2018
138b007
stratum: pre-check bad usernames before db add
tpruvot May 1, 2018
078ace3
stratum: log ip of new clients (#262)
crackfoo May 2, 2018
6fe2208
yiimp: log ip in debug message for unknown address (#263)
crackfoo May 2, 2018
8fb9a74
stratum: add vitalium algo (#261)
ServePeak May 2, 2018
adbdad4
backend: prevent php bug on empty masternode payee field (LUX)
tpruvot May 2, 2018
a78ec34
stratum: support for Machinecoin 0.16 mn+segwit (#265)
Nico205 May 4, 2018
fe47cca
stratum: also prepare normal optional mn+segwit
tpruvot May 4, 2018
d4b00a8
Revert "stratum: support for Machinecoin 0.16 mn+segwit (#265)"
tpruvot May 4, 2018
daac1a1
stratum: merge P2SH superblock code to prevent duplicated code
tpruvot May 4, 2018
b43d646
handle allium algo, kind of double lyra2
tpruvot May 6, 2018
d428130
allium: fix pool diff ratio, same as lyra2v2, cf cpuminer-opt
tpruvot May 6, 2018
db7a145
stratum: fix superblock script order
tpruvot May 7, 2018
ed97818
stratum: support for MAC P2SH masternodes too (#266)
Nico205 May 7, 2018
b114a1c
stratum: common p2sh_pack_tx func for p2sh masternodes
tpruvot May 7, 2018
ca974e6
backend: keep blocks history at least 7 days
tpruvot May 8, 2018
f358e72
exchanges: ignore coins 'created' by tradesatoshi
tpruvot May 8, 2018
a98b631
coindb: avoid incapsuda html on cryptopia icons
tpruvot May 8, 2018
495dcbb
stratum: detect if master wallet is p2sh + mn started field
tpruvot May 11, 2018
a3103af
stratum: fix client memory leak in yescrypt
tpruvot May 14, 2018
a9dc8c5
trading: don't send coins to exchange which have late tx already
crackfoo May 16, 2018
8c1964d
lyra2z: prevent filenames with different cases
tpruvot May 18, 2018
f3d9f25
ci: add travis config (#212)
fastman May 18, 2018
2b932a8
stratum: check json version string ptr validity
tpruvot May 21, 2018
afc80e2
stratum: handle ismine check moved in getaddressinfo
tpruvot May 25, 2018
c72dd91
Revert "stratum: handle ismine check moved in getaddressinfo"
tpruvot May 25, 2018
b5e22c5
stratum: DGB getaddressinfo to check master wallet
tpruvot May 25, 2018
ab24ba8
stratum: getaddressinfo doesnt return isvalid
tpruvot May 25, 2018
5fcb58e
api: add mbtc_mh_factor (mBTC/MH) to status api
tpruvot May 28, 2018
c1f2ad7
api: disable rental apis if not enabled
tpruvot May 30, 2018
3343328
rpc: prevent any dump command
tpruvot May 30, 2018
b0a0e53
rpc: also prevent dangerous methods in core btc class
tpruvot May 31, 2018
ba20dc3
stratum: check if blocknotify string param is set
tpruvot Jun 1, 2018
411a6c7
stratum: more string params checks
tpruvot Jun 3, 2018
5e0f1e1
handle phi2 algo
tpruvot Jun 6, 2018
8841bf4
explorer: support for DUO multialgo (#272)
crackfoo Jun 6, 2018
6e87460
stratum: reduce valid ntime range
tpruvot Jun 7, 2018
eee06c9
stratum: add aergo algo (#274)
itamarcps Jun 8, 2018
035d304
checkup: delete images containing cloudcrap scripts
tpruvot Jun 9, 2018
6d52259
history: prefer block algo field in case of algo change
tpruvot Jun 11, 2018
7afdd17
explorer: better check of block PoS type
tpruvot Jun 11, 2018
9dbce85
stratum: dev/charity fees for coins with masternodes (#276)
opensourcerulez Jun 11, 2018
0606c9a
blocks: prevent duplicated blocks in some conditions... (#278)
opensourcerulez Jun 13, 2018
9038f09
coindb: avoid html in retrieved icons
tpruvot Jun 21, 2018
27176b2
phi2 changes to handle lux smart contracts
tpruvot Jun 21, 2018
609f612
stratum: remove duplicated code, merge issue
tpruvot Jun 22, 2018
ae6af25
stratum: ensure share params are all strings
tpruvot Jun 22, 2018
b6f212e
stratum: small clean up :) (#279)
opensourcerulez Jun 22, 2018
ca0c627
stratum: handle p2sh addresses for all coinbase variants
tpruvot Jun 24, 2018
373c739
stratum: add sonoa algo (lol)
tpruvot Jun 24, 2018
e8f1d80
User wallet: disable deletion of current wallet (#280)
DumaxFr Jun 30, 2018
d915066
cli: payout redotx and confirmations
tpruvot Jul 1, 2018
d85425b
exchanges: link gate.io public api
tpruvot Jul 7, 2018
0c542e8
stratum: handle XSH multialgo pow_hash special field (#281)
opensourcerulez Jul 8, 2018
243c7ea
Handle XSH algos in explorer (#282)
opensourcerulez Jul 8, 2018
0f129bd
blocks: avoid delayed coin save + screenlog func
tpruvot Jul 10, 2018
8472298
blocks: log to screen only abnormal delays
tpruvot Jul 11, 2018
72dd143
screenlog: show hour in 24H format
tpruvot Jul 11, 2018
b8e114d
ui: show next payout eta as tooltip
tpruvot Jul 22, 2018
0ac47d7
stratum: handle phi2 smart-contracts refunds
tpruvot Aug 1, 2018
f3b70fd
Add hex algo... (#285)
opensourcerulez Aug 7, 2018
b39da19
hex: x16r like algos dont need GH/s
tpruvot Aug 7, 2018
c25d7b9
markets: bit-z ticker api (#288)
phm87 Aug 10, 2018
d78a932
API: WalletEx: payouts (optional) (#291)
phm87 Aug 21, 2018
c234694
api: fix foreach typo in commit d78a329
tpruvot Aug 22, 2018
d1ba34e
wallet: show USD (#295)
huglester Aug 23, 2018
902da54
add rainforest algo (#297)
tpruvot Aug 29, 2018
1da40e5
blocks: avoid status change to orphan during reindex
tpruvot Aug 29, 2018
f93b3df
rpc: prevent backupwallet method (#298)
phm87 Sep 3, 2018
cc45681
Add Dynamic Argon2d algorithm to YIIMP Stratum Pool (#301)
AmirAbrams Sep 4, 2018
b6aa813
bitz: prevent api error if data field is not present
tpruvot Sep 7, 2018
1c2a513
exchange: handle crex24 public api
tpruvot Sep 10, 2018
c5b1a57
crex24: private api query, update balances
tpruvot Sep 11, 2018
7e229ab
kucoin: some tickers may not have a sell field
tpruvot Sep 15, 2018
ccf4596
rc.local: rename lyra2z screen + add argon2d-dyn (#307)
phm87 Sep 17, 2018
00e5dd0
stratum: update DGB addy check to include multi-alogs (#316)
crackfoo Sep 26, 2018
a66f74f
explorer: add GLT multi-algo (#317)
crackfoo Sep 26, 2018
6420335
txhisto: fix a nullptr if bitcoin wallet not in db
tpruvot Oct 2, 2018
6889836
Add LBK3 algo to yiimp (#319)
ETS5 Oct 3, 2018
8ad6065
Add x22i algo support, based on ccminer-x22i code, cleaned
tpruvot Oct 2, 2018
685747b
stex: use new url of stocksexchange
tpruvot Oct 3, 2018
7c8817f
RIP: cyptohub, hacked...
tpruvot Oct 4, 2018
ca3da8a
screen addition for new algos x22i and lbk3 (#322)
goodthebest Oct 8, 2018
46d40cd
trading: wrong balance fields for Cryptopia (#323)
mantlik Oct 9, 2018
42a6e85
coinbene public api, optional
tpruvot Oct 15, 2018
5a54297
add exosis algo (timetravel type) (#326)
opensourcerulez Oct 22, 2018
933e7a0
Warnings & tests folder (#327)
phm87 Oct 25, 2018
07277d9
exchange: handle escodex public api
oddhome Oct 5, 2018
38a114b
stratum: add diff_min and diff_max optional conf fields
tpruvot Oct 25, 2018
e178cca
Preparation for DigiByte rpcencoding (#289)
tpruvot Nov 10, 2018
1b2d4af
wallet: show worker names if no password/extra
tpruvot Nov 25, 2018
b30ab34
handle blake2b standard algo (not sia)
tpruvot Nov 25, 2018
31124f7
stratum: add blake2b.c to sha3 makefile
tpruvot Nov 30, 2018
94d3ba1
sha256q algo (#332)
pyritepirate Dec 31, 2018
c3ecd27
stratum: handle Tuxcoin DonationSubsidy (#333)
bleach86 Jan 23, 2019
7ad0900
lyra2v3 algo
tpruvot Jan 30, 2019
a36f11d
api: handle cryptobridge public balances
tpruvot Feb 4, 2019
64ee803
api: use new kucoin public api url and disable it
tpruvot Feb 19, 2019
20655e5
api: remove bter.com stuff
tpruvot Feb 19, 2019
a5de1e3
api: kucoin v2 private api changes
tpruvot Feb 19, 2019
2cbdf53
api: kucoin 2.0 fixes, reenable it
tpruvot Feb 20, 2019
47ec59b
stratum: support for founder reward gbt object (#342)
npq7721 Feb 25, 2019
f701887
stratum: fix for auxpow result:null on success
lavajumper Dec 26, 2018
0a5f7c6
Revert "api: handle cryptobridge public balances"
tpruvot Feb 25, 2019
4eb569c
stratum: handle Lyra2zz algo (#345)
RadiantAeon Mar 23, 2019
826fbfb
backend: add db backup folder to config #344
tpruvot Mar 28, 2019
e32b806
exchange: fix livecoin market link (#354)
crackfoo Sep 24, 2019
eec1bef
stratum: x16rv2 algo
tpruvot Sep 24, 2019
52f68f8
stratum: remove hardcoded ntime range
tpruvot Jan 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
*.o
*.a
.deps
.dirstamp
stratum/stratum
stratum/blocknotify
blocknotify/blocknotify
blocknotify-dcr/blocknotify-dcr
bin/stratum
bin/blocknotify
bin/blocknotify-dcr
stratum/config/
log/
*.log
web/images/*
web/yaamp/runtime/*
cookies/
bin/blocknotif
web/serverconfig.php
web/assets/
*.rej
*.orig
.idea/*
web/yaamp/.idea/
*.0
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: cpp
script:
- (cd blocknotify && make)
- (cd stratum/iniparser && make)
- (cd stratum && make)
137 changes: 136 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,137 @@
#yaamp
[![Build Status](https://travis-ci.org/tpruvot/yiimp.svg?branch=next)](https://travis-ci.org/tpruvot/yiimp)

#yiimp - yaamp fork

WARNINGS
- Use at your own risks.
- Usage of this software requires abilities with sysadmin, database admin, coin daemons, and sometimes a bit of programming. Running a production pool can literally be more work than a full-time job.

Required:

linux, mysql, php, memcached, a webserver (lighttpd or nginx recommended)


Config for nginx:

location / {
try_files $uri @rewrite;
}

location @rewrite {
rewrite ^/(.*)$ /index.php?r=$1;
}

location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}


If you use apache, it should be something like that (already set in web/.htaccess):

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php?r=$1 [QSA]


If you use lighttpd, use the following config:

$HTTP["host"] =~ "yiimp.ccminer.org" {
server.document-root = "/var/yaamp/web"
url.rewrite-if-not-file = (
"^(.*)/([0-9]+)$" => "index.php?r=$1&id=$2",
"^(.*)\?(.*)" => "index.php?r=$1&$2",
"^(.*)" => "index.php?r=$1",
"." => "index.php"
)

url.access-deny = ( "~", ".dat", ".log" )
}


For the database, import the initial dump present in the sql/ folder

Then, apply the migration scripts to be in sync with the current git, they are sorted by date of change.

Your database need at least 2 users, one for the web site (php) and one for the stratum connections (password set in config/algo.conf).



The recommended install folder for the stratum engine is /var/stratum. Copy all the .conf files, run.sh, the stratum binary and the blocknotify binary to this folder.

Some scripts are expecting the web folder to be /var/web. You can use directory symlinks...


Add your exchange API public and secret keys in these two separated files:

/etc/yiimp/keys.php - fixed path in code
web/serverconfig.php - use sample as base...

You can find sample config files in web/serverconfig.sample.php and web/keys.sample.php

This web application includes some command line tools, add bin/ folder to your path and type "yiimp" to list them, "yiimp checkup" can help to test your initial setup.
Future scripts and maybe the "cron" jobs will then use this yiic console interface.

You need at least three backend shells (in screen) running these scripts:

web/main.sh
web/loop2.sh
web/block.sh

Start one stratum per algo using the run.sh script with the algo as parameter. For example, for x11:

run.sh x11

Edit each .conf file with proper values.

Look at rc.local, it starts all three backend shells and all stratum processes. Copy it to the /etc folder so that all screen shells are started at boot up.

All your coin's config files need to blocknotify their corresponding stratum using something like:

blocknotify=blocknotify yaamp.com:port coinid %s

On the website, go to http://server.com/site/adminRights to login as admin. You have to change it to something different in the code (web/yaamp/modules/site/SiteController.php). A real admin login may be added later, but you can setup a password authentification with your web server, sample for lighttpd:

htpasswd -c /etc/yiimp/admin.htpasswd <adminuser>

and in the lighttpd config file:

# Admin access
$HTTP["url"] =~ "^/site/adminRights" {
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/yiimp/admin.htpasswd"
auth.require = (
"/" => (
"method" => "basic",
"realm" => "Yiimp Administration",
"require" => "valid-user"
)
)
}

And finally remove the IP filter check in SiteController.php



There are logs generated in the /var/stratum folder and /var/log/stratum/debug.log for the php log.

More instructions coming as needed.


There a lot of unused code in the php branch. Lot come from other projects I worked on and I've been lazy to clean it up before to integrate it to yaamp. It's mostly based on the Yii framework which implements a lightweight MVC.

http://www.yiiframework.com/


Credits:

Thanks to globalzon to have released the initial Yaamp source code.

--

You can support this project donating to tpruvot :

BTC : 1Auhps1mHZQpoX4mCcVL8odU81VakZQ6dR

6 changes: 6 additions & 0 deletions bin/blocknotify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
#
# callback script... replaced by blocknotify binary
#
# blocknotify="blocknotify.sh --host yaamp --port $stratum_port --id $coin->id --block %s --password tu8tu5"

13 changes: 13 additions & 0 deletions bin/kill_stratum
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

PLINE=$(ps -ef | grep "stratum config/$1" | grep -v grep)
if [ $? ]; then
PS=$(echo $PLINE | cut -d ' ' -f 2)
if [ $PS ]; then
kill $PS
echo "killed stratum process $PS"
else
echo "Process not found"
exit 1
fi
fi
8 changes: 8 additions & 0 deletions bin/yiimp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

ROOTDIR=/data/yiimp
DIR=`pwd`

cd "$ROOTDIR/web" && php yaamp/yiic.php "$@"

cd $DIR
17 changes: 17 additions & 0 deletions bin/yiimp_restart_loop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Restart the pseudo cron screens...

LOG_DIR=/work/yiimp/log
WEB_DIR=/var/web

screen -X -S main quit
screen -X -S loop2 quit
screen -X -S blocks quit
screen -X -S debug quit

screen -dmS main $WEB_DIR/main.sh
screen -dmS loop2 $WEB_DIR/loop2.sh
screen -dmS blocks $WEB_DIR/blocks.sh

screen -dmS debug tail -f $LOG_DIR/debug.log

22 changes: 22 additions & 0 deletions blocknotify-dcr/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
OUT_GO=blocknotify-dcr
OUTPUT=blocknotify-dcr
ROOT=`pwd`

all:
rm -f $(OUT_GO)
rm -rf vendor
glide install
ln -s ../vendor vendor/src
rm -f vendor/src/github.com/decred/dcrrpcclient/wallet.go
GOPATH="$(GOPATH):$(ROOT)/vendor" go build

install: all
strip -s $(OUT_GO)
killall -9 $(OUTPUT) || echo ok
mv $(OUT_GO) ../bin/$(OUTPUT)
sh -c "../bin/$(OUTPUT) &"

clean:
rm -f $(OUT_GO)
rm -rf vendor

97 changes: 97 additions & 0 deletions blocknotify-dcr/blocknotify.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright (c) 2015-2017 YiiMP

// Sample blocknotify wrapper tool compatible with decred notifications
// will call the standard bin/blocknotify yiimp tool on new block event.

// Note: this tool is connected directly to dcrd, not to the wallet!

package main

import (
"io/ioutil"
"log"
"os/exec"
"path/filepath"

"bytes" // dcrd > 0.6+
"github.com/decred/dcrd/wire"

"github.com/decred/dcrrpcclient"
// "github.com/decred/dcrutil"
)

const (
processName = "blocknotify" // set the full path if required
stratumDest = "yaamp.com:3252" // stratum host:port
coinId = "1574" // decred database coin id

dcrdUser = "yiimprpc"
dcrdPass = "myDcrdPassword"

debug = false
)

func main() {
// Only override the handlers for notifications you care about.
// Also note most of these handlers will only be called if you register
// for notifications. See the documentation of the dcrrpcclient
// NotificationHandlers type for more details about each handler.
ntfnHandlers := dcrrpcclient.NotificationHandlers{

OnBlockConnected: func(blockHeader []byte, transactions [][]byte) {
// log.Printf("Block bytes: %v %v", blockHeader, transactions)
var bhead wire.BlockHeader
err := bhead.Deserialize(bytes.NewReader(blockHeader))
if err == nil {
str := bhead.BlockHash().String();
args := []string{ stratumDest, coinId, str }
out, err := exec.Command(processName, args...).Output()
if err != nil {
log.Printf("err %s", err)
} else if debug {
log.Printf("out %s", out)
}
if (debug) {
log.Printf("Block connected: %s", str)
}
}
},

}

// Connect to local dcrd RPC server using websockets.
// dcrdHomeDir := dcrutil.AppDataDir("dcrd", false)
// folder := dcrdHomeDir
folder := ""
certs, err := ioutil.ReadFile(filepath.Join(folder, "rpc.cert"))
if err != nil {
certs = nil
log.Printf("%s, trying without TLS...", err)
}

connCfg := &dcrrpcclient.ConnConfig{
Host: "127.0.0.1:9109",
Endpoint: "ws", // websocket

User: dcrdUser,
Pass: dcrdPass,

DisableTLS: (certs == nil),
Certificates: certs,
}

client, err := dcrrpcclient.New(connCfg, &ntfnHandlers)
if err != nil {
log.Fatalln(err)
}

// Register for block connect and disconnect notifications.
if err := client.NotifyBlocks(); err != nil {
log.Fatalln(err)
}
log.Println("NotifyBlocks: Registration Complete")

// Wait until the client either shuts down gracefully (or the user
// terminates the process with Ctrl+C).
client.WaitForShutdown()
}
46 changes: 46 additions & 0 deletions blocknotify-dcr/glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions blocknotify-dcr/glide.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package: github.com/tpruvot/yiimp/blocknotify-dcr
import:
- package: github.com/decred/dcrd
subpackages:
- wire
- package: github.com/decred/dcrjson
# - package: github.com/decred/dcrrpcclient
- package: github.com/decred/dcrutil

Loading