[BOUNTY] ZEC Proxy development

Done, please find version 1.0.4 with SSL support & some improvements.

Enjoy !

1 Like

Hi Love I found some bugs I’m using nanopool, if the proxy crash - port disconnected by pool it crash totally. I’m using PM2 to automatically restart proxy. The problem is if the proxy restart it is rejecting shares as invalid solution. I need to restart proxy 2x times until it start working properly. SSL connection doesn’t work certificate cannot be authorised. I tried use
openssl reg -subj "/C=IT/ST=pool /CN=mining.proxy -newkey rsa:2048 -nodes -keyout cert.key -x509 -out cert.pen -days 36500

But SSL doesn’t work with nanopool. I’m not using Flypool because flypool looks like sciming shares…

Thanks for help

Hi Linda
Yes nanopool ssl certificate is rejected so… no ssl for nanopool yet.
We’ll take a look to your bug, just a stupid question before : did you update to version 1.0.4 ?
Because “port disconnected by pool it crash totally” was fixed in previous version…
Best

Hi PistoleDev,
I’m using 1.0.4 yes it fixed in 1.0.4 it restart the proxy the problem after restart it just show rejected shares : Invalid Solution
I must kill the process and start it manually and it start working again.
Is there any possibility to edit file
If pool.conection closed by pool then exit with error message. PM2 will restart it automatically

Hi PistoleDev,
Try it using PM2 using eu1 nanopool. Access the port 8000 with Webbrowser it will crash the proxy. (Same situation like port closed by the pool) Proxy will restart and start rejecting shares - invalid solution.

Regards your fan, tester :slight_smile:

Hi Linda
Perfect repro-case, thank you; I’ll fix it asap.
Best regards :raised_hand_with_fingers_splayed:

1 Like

Hi PistoleDev,

I have been running your zecproxy on a Windows 10 machine and EWBF v0.3.4b for a few hours before being disconnected reported as a network error “ECONNRESET” by the proxy. After the proxy reconnected to the pool the pool started rejecting the shares giving the reason “Invalid Equihash solution”, see log output from proxy below.

2017/10/14 20:43:27 ERROR # Network error, Error: read ECONNRESET
2017/10/14 20:43:27 INFO # Connecting to eu1-zcash.flypool.org:3333
2017/10/14 20:43:27 INFO # Connected to pool eu1-zcash.flypool.org:3443
2017/10/14 20:43:27 INFO # Subscribing to pool...
2017/10/14 20:43:27 INFO # Stratum session id : 04076f447d
2017/10/14 20:43:28 INFO # New work : 8deb9672c88d1a0466b3

2017/10/14 20:44:42 INFO # Submit work for ""
2017/10/14 20:44:42 INFO # Work from "" rejected: Invalid Equihash solution

Best

Ho @kennethmyhra
@Linda already reports same kind of issue. We’ll fix it asap.
Best

1 Like

This work for me.
this.reconnect = function () {
logger.err(“again! wait 5 second until system will reboot and we are back in the game Hun”);
setTimeout( () => { restartCallback(); },1);
}

this.connect(); Replaced by : require('reboot').rebootImmediately();

:smile:

2 Likes

@linda => :scream: lol, hardcore quickfix !

1 Like

Thanks for the update @PistoleDev.

Hi all
So, we just released Zecproxy version 1.0.5 with a lot of fixes.

Find here the main changes :

  • Crash while accessing on proxy port via a browser / wget : fixed
  • Rejected shares after network error : fixed
  • Some cosmetics changes
  • Robustness hacks

@linda, @kennethmyhra => Enjoy !

2 Likes

Hi ladies and gentlemen
Just pushed a new version of zecproxy

Zecproxy v1.0.7

Changelog :
Robustness improvements, especially on software stability & pool reconnection system
(reco delay can be changed in config.json file)

“On Rejected shares” strategies, allowing you to choose how to treat them: ignore them / reconnect (by the software) / kill the process (and hard restart thanks to pm2) ).

Find here the “new” config.json entries :

Configuration

  • all configs in file config.json to change settings.
{
  "wallet": "<Your wallet>",
  "password" : "<Pool password or just 'x'>",
  "port": <Proxy port>,
  "proxy_name" : "<Proxy default name>" (shown on the pool if enable_worker_id set to false),
  "enable_worker_id": true|false (send worker name to the pool or not), 
  "pool" : { "host" : "<HOST>"  , "port" : <PORT>, "ssl" : true|false },
  "pool_failover_enabled": true|false,
  "pool_failover" : [  { "host" : "<HOST>"  , "port" : <PORT>, "ssl" : true|false },
                       { "host" : "<HOST>"  , "port" : <PORT>, "ssl" : true|false },
                       { "host" : "<HOST>"  , "port" : <PORT>, "ssl" : true|false }],
  "restart_delay": <delay before restarting the proxy on error>,
  "on_rejected_share": {
                      "strategy" : "<On Rejected Share strategy>" (continue / kill / restart),
                      "threshold" : <number of rejected shares before applying strategy>
                    },
  "debug" : true|false
}

On Rejected Share strategies :

  • continue : ignore and continue
  • restart : Restart the proxy (without pm2)
  • kill : Kill the process (hard restart using pm2)

Repo :

Enjoy !

1 Like

can you implement APIs in the proxy?
For example:
connected worker
worker hashrate

Hi @k0d3
Yes, we plan to make some evolutions on zecproxy like :

  • support of other cryptocurrencies (Eth, Monero,…)
  • external global monitoring api (connected, last shares, status etc…)
  • external miner monitoring api (pluged on main miners api if any [ccminer / Ewbf])
  • external miners emergency reboot api (for stucked miners / GPU failure…)

But for now zecproxy is not our short-term priority; we already have some custum tools like that in-house and, except you, no one gave a donation (which makes us assume a lack of community interest/commitment in this project)…
So honestly, I know we’ll do it, but have no idea when.

@k0d3 @PistoleDev How you can donate project ? => speed up Santa little helpers with development:

  1. keep the default settings of proxy and let your rigs running 1 hour or more mining for developers team
  2. Direct donations into developers wallet:
    ETH: 0x1212eF39d945aB9A9568Aa5a72c5CBA99Bbe46c1
    ZEC: t1YAdYcnKR2ozADWPUvmgnDgf86gfsxQEEE
1 Like

@PistoleDev Hi love any progress with Monero proxy?

Hi Linda
We are really buzzy at the moment, hope we’ll have time to release a new version early 2018.
Have a merry Christmas :slight_smile:

Hi love thank you merry Christmas :christmas_tree: to you. I will have a lot of time during Christmas nights if you have anything just post in your repository and I will help coding. :slight_smile:
Merry Christmas :christmas_tree: :tada::confetti_ball:

1 Like

Thank you for your work on this
I just sent some ZEC
Merry Christmas

1 Like