Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.
/ yiimp Public archive
forked from tpruvot/yiimp

Lightning Network : V0 Testnet #21

Open
wants to merge 116 commits into
base: AllBranchesMerged
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
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
d6ce1e3
Merge pull request #1 from tpruvot/next
phm87 Aug 21, 2018
5e20aff
Create ln.sh
phm87 Aug 21, 2018
a73f992
Testnet purposes ONLY (work in progress)
phm87 Aug 21, 2018
b5585b2
Update defaultconfig.php
phm87 Aug 21, 2018
b55e07b
Create 2018-08-lightning-testnet.sql
phm87 Aug 21, 2018
1aa2d9f
Update SiteController.php
phm87 Aug 21, 2018
6820f00
Create ln.php
phm87 Aug 21, 2018
8a168dc
Update defaultconfig.php
phm87 Aug 21, 2018
f0c26f1
Update rc.local
phm87 Aug 29, 2018
3f3c2a4
new column 'work' into workers table
phm87 Sep 1, 2018
4e6b66c
YAAMP_LN_WORKERS & YAAMP_LN_FACTOR
phm87 Sep 1, 2018
2a27149
accounting per worker: to verify & enhance!
phm87 Sep 1, 2018
c6ac57d
LN invoices for mainet: to verify&enhance
phm87 Sep 1, 2018
a97e19d
LN webpage restricted to admin
phm87 Sep 1, 2018
684ebb1
LN webpage only for admin
phm87 Sep 1, 2018
e6a8e9d
invoice per userid
phm87 Sep 1, 2018
64edc94
Update defaultconfig.php
phm87 Sep 1, 2018
6afcad3
Update payment.php
phm87 Sep 2, 2018
b2e7d21
Update defaultconfig.php
phm87 Sep 2, 2018
7fecdd4
Display /site/ln for visitors if testnet
phm87 Sep 2, 2018
66fd97b
Update main.php
phm87 Sep 2, 2018
79104c9
Update main.php
phm87 Sep 2, 2018
4ff7228
Update defaultconfig.php
phm87 Sep 2, 2018
43e7a3d
Update CronjobController.php
phm87 Sep 2, 2018
893ea21
Update index.php
phm87 Sep 2, 2018
81e7d52
Update index.php
phm87 Sep 3, 2018
0f3dc2f
Update defaultconfig.php
phm87 Sep 3, 2018
a1e1fec
Update payment.php
phm87 Sep 3, 2018
4d2ed2b
Update CronjobController.php
phm87 Sep 3, 2018
7c5c2e6
DB: add workerid
phm87 Sep 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ web/serverconfig.php
web/assets/
*.rej
*.orig
.idea/*
web/yaamp/.idea/
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)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/tpruvot/yiimp.svg?branch=next)](https://travis-ci.org/tpruvot/yiimp)

#yiimp - yaamp fork

Required:
Expand Down
4 changes: 3 additions & 1 deletion rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ STRATUM_DIR=/var/stratum
screen -dmS main $WEB_DIR/main.sh
screen -dmS loop2 $WEB_DIR/loop2.sh
screen -dmS blocks $WEB_DIR/blocks.sh
#screen -dmS ln $WEB_DIR/ln.sh
screen -dmS debug tail -f $LOG_DIR/debug.log

# Stratum instances (skipped/exit if no .conf)
Expand Down Expand Up @@ -49,7 +50,8 @@ screen -dmS jha $STRATUM_DIR/run.sh jha
#screen -dmS dmd-gr $STRATUM_DIR/run.sh dmd-gr
screen -dmS myr-gr $STRATUM_DIR/run.sh myr-gr
screen -dmS lbry $STRATUM_DIR/run.sh lbry
screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2
screen -dmS allium $STRATUM_DIR/run.sh allium
#screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2
screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2
screen -dmS zero $STRATUM_DIR/run.sh lyra2z

Expand Down
14 changes: 14 additions & 0 deletions sql/2018-08-lightning-testnet.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE `invoices` (
`id` int(11) NOT NULL,
`userid` int(11) NOT NULL,
`workerid` int(11) NOT NULL,
`bolt11` varchar(1000) NOT NULL,
`amount` int(11) NOT NULL,
`paid` int(11) NOT NULL,
`shop` text,
`description` text NOT NULL,
`status` varchar(80) DEFAULT NULL,
`exectime` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `workers` ADD `work` DOUBLE NOT NULL DEFAULT '0.0' AFTER `algo`;
File renamed without changes.
File renamed without changes.
162 changes: 162 additions & 0 deletions stratum/algos/aergo.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
#include "aergo.h"
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>

#include <sha3/sph_blake.h>
#include <sha3/sph_bmw.h>
#include <sha3/sph_groestl.h>
#include <sha3/sph_jh.h>
#include <sha3/sph_keccak.h>
#include <sha3/sph_skein.h>
#include <sha3/sph_luffa.h>
#include <sha3/sph_cubehash.h>
#include <sha3/sph_shavite.h>
#include <sha3/sph_simd.h>
#include <sha3/sph_echo.h>
#include <sha3/sph_hamsi.h>
#include <sha3/sph_fugue.h>
#include <sha3/sph_shabal.h>
#include <sha3/sph_whirlpool.h>
#include <sha3/sph_haval.h>
#include "gost.h"

#include "common.h"

void aergo_hash(const char* input, char* output, uint32_t len)
{
uint32_t hash[16];

sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_skein512_context ctx_skein;
sph_luffa512_context ctx_luffa;
sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo;
sph_hamsi512_context ctx_hamsi;
sph_fugue512_context ctx_fugue;
sph_shabal512_context ctx_shabal;
sph_gost512_context ctx_gost;
sph_whirlpool_context ctx_whirlpool;
sph_haval256_5_context ctx_haval;

sph_echo512_init(&ctx_echo);
sph_echo512(&ctx_echo, input, len);
sph_echo512_close(&ctx_echo, hash);

sph_simd512_init(&ctx_simd);
sph_simd512(&ctx_simd, hash, 64);
sph_simd512_close(&ctx_simd, hash);

sph_blake512_init(&ctx_blake);
sph_blake512(&ctx_blake, hash, 64);
sph_blake512_close(&ctx_blake, hash);

sph_bmw512_init(&ctx_bmw);
sph_bmw512(&ctx_bmw, hash, 64);
sph_bmw512_close(&ctx_bmw, hash);

sph_whirlpool_init(&ctx_whirlpool);
sph_whirlpool(&ctx_whirlpool, hash, 64);
sph_whirlpool_close(&ctx_whirlpool, hash);

sph_groestl512_init(&ctx_groestl);
sph_groestl512(&ctx_groestl, hash, 64);
sph_groestl512_close(&ctx_groestl, hash);

sph_gost512_init(&ctx_gost);
sph_gost512(&ctx_gost, hash, 64);
sph_gost512_close(&ctx_gost, hash);

sph_skein512_init(&ctx_skein);
sph_skein512(&ctx_skein, hash, 64);
sph_skein512_close(&ctx_skein, hash);

sph_bmw512_init(&ctx_bmw);
sph_bmw512(&ctx_bmw, hash, 64);
sph_bmw512_close(&ctx_bmw, hash);

sph_jh512_init(&ctx_jh);
sph_jh512(&ctx_jh, hash, 64);
sph_jh512_close(&ctx_jh, hash);

sph_luffa512_init(&ctx_luffa);
sph_luffa512(&ctx_luffa, hash, 64);
sph_luffa512_close(&ctx_luffa, hash);

sph_keccak512_init(&ctx_keccak);
sph_keccak512(&ctx_keccak, hash, 64);
sph_keccak512_close(&ctx_keccak, hash);

sph_gost512_init(&ctx_gost);
sph_gost512(&ctx_gost, hash, 64);
sph_gost512_close(&ctx_gost, hash);

sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512(&ctx_cubehash, hash, 64);
sph_cubehash512_close(&ctx_cubehash, hash);

sph_echo512_init(&ctx_echo);
sph_echo512(&ctx_echo, hash, 64);
sph_echo512_close(&ctx_echo, hash);

sph_simd512_init(&ctx_simd);
sph_simd512(&ctx_simd, hash, 64);
sph_simd512_close(&ctx_simd, hash);

sph_hamsi512_init(&ctx_hamsi);
sph_hamsi512(&ctx_hamsi, hash, 64);
sph_hamsi512_close(&ctx_hamsi, hash);

sph_fugue512_init(&ctx_fugue);
sph_fugue512(&ctx_fugue, hash, 64);
sph_fugue512_close(&ctx_fugue, hash);

sph_shavite512_init(&ctx_shavite);
sph_shavite512(&ctx_shavite, hash, 64);
sph_shavite512_close(&ctx_shavite, hash);

sph_shabal512_init(&ctx_shabal);
sph_shabal512(&ctx_shabal, hash, 64);
sph_shabal512_close(&ctx_shabal, hash);

sph_haval256_5_init(&ctx_haval);
sph_haval256_5(&ctx_haval,(const void*) hash, 64);
sph_haval256_5_close(&ctx_haval, hash);

sph_shavite512_init(&ctx_shavite);
sph_shavite512(&ctx_shavite, hash, 64);
sph_shavite512_close(&ctx_shavite, hash);

sph_gost512_init(&ctx_gost);
sph_gost512(&ctx_gost, hash, 64);
sph_gost512_close(&ctx_gost, hash);

sph_echo512_init(&ctx_echo);
sph_echo512(&ctx_echo, hash, 64);
sph_echo512_close(&ctx_echo, hash);

sph_blake512_init(&ctx_blake);
sph_blake512(&ctx_blake, hash, 64);
sph_blake512_close(&ctx_blake, hash);

sph_jh512_init(&ctx_jh);
sph_jh512(&ctx_jh, hash, 64);
sph_jh512_close(&ctx_jh, hash);

sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512(&ctx_cubehash, hash, 64);
sph_cubehash512_close(&ctx_cubehash, hash);

sph_simd512_init(&ctx_simd);
sph_simd512(&ctx_simd, hash, 64);
sph_simd512_close(&ctx_simd, hash);

memcpy(output, hash, 32);
}
17 changes: 17 additions & 0 deletions stratum/algos/aergo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

#ifndef AERGO_H
#define AERGO_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

void aergo_hash(const char* input, char* output, uint32_t len);

#ifdef __cplusplus
}
#endif

#endif
46 changes: 46 additions & 0 deletions stratum/algos/allium.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <memory.h>

#include "sha3/sph_blake.h"
#include "sha3/sph_groestl.h"
#include "sha3/sph_skein.h"
#include "sha3/sph_keccak.h"
#include "sha3/sph_cubehash.h"

#include "Lyra2.h"

void allium_hash(const char* input, char* output, uint32_t len)
{
uint32_t hashA[8], hashB[8];

sph_blake256_context ctx_blake;
sph_keccak256_context ctx_keccak;
sph_cubehash512_context ctx_cubehash;
sph_skein256_context ctx_skein;
sph_groestl256_context ctx_groestl;

sph_blake256_init(&ctx_blake);
sph_blake256(&ctx_blake, input, 80);
sph_blake256_close(&ctx_blake, hashA);

sph_keccak256_init(&ctx_keccak);
sph_keccak256(&ctx_keccak, hashA, 32);
sph_keccak256_close(&ctx_keccak, hashB);

LYRA2(hashA, 32, hashB, 32, hashB, 32, 1, 8, 8);

sph_cubehash256_init(&ctx_cubehash);
sph_cubehash256(&ctx_cubehash, hashA, 32);
sph_cubehash256_close(&ctx_cubehash, hashB);

LYRA2(hashA, 32, hashB, 32, hashB, 32, 1, 8, 8);

sph_skein256_init(&ctx_skein);
sph_skein256(&ctx_skein, hashA, 32);
sph_skein256_close(&ctx_skein, hashB);

sph_groestl256_init(&ctx_groestl);
sph_groestl256(&ctx_groestl, hashB, 32);
sph_groestl256_close(&ctx_groestl, hashA);

memcpy(output, hashA, 32);
}
16 changes: 16 additions & 0 deletions stratum/algos/allium.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef ALLIUM_H
#define ALLIUM_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

void allium_hash(const char* input, char* output, uint32_t len);

#ifdef __cplusplus
}
#endif

#endif
File renamed without changes.
File renamed without changes.
Loading