Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Problem with some bitcoin based clients RPC integration #119

Closed
woblit opened this issue Dec 16, 2017 · 7 comments
Closed

Problem with some bitcoin based clients RPC integration #119

woblit opened this issue Dec 16, 2017 · 7 comments
Labels
Milestone

Comments

@woblit
Copy link

woblit commented Dec 16, 2017

I have enabled PPC (Peercoin) on Miningcore. However, MiningCore doesn't seem to be able to make use of the JSON-RPC server offered by the client. I am getting the following in my log:

[Bitcoin Job Manager] Waiting for daemons to come online ...

I have tested connection to the JSON-RPC server using CURL and this is all working correctly.

I have tried this with other Bitcoin based clients, like DEM and this also causes a the same issue in MiningCore.

Any chance there could be a fix to this soon, as it has disabled certain coins from being used.

@oliverw
Copy link
Owner

oliverw commented Dec 16, 2017

Hmm. Could you post your daemon configuration and how you run it plus your pool config?

@woblit
Copy link
Author

woblit commented Dec 16, 2017

The Peercoin.conf is as follows:

rpcuser=RPCUSER
rpcpassword=RPCPASS
rpcallowip=127.0.0.1
rpcallowip=OUTSIDE.SRV.IP.ADDRESS
rpcport=32200
rpcbind=MY.LOCAL.PUBLIC.IP
rpctimeout=60
server=1
gen=0
listen=1

And the pool config is:

{
  "id": "ppc-sha256-1",
  "enabled": true,
  "coin": {
    "type": "PPC",
    "algorithm": "sha256d"
  },
  "address": "PPCADDY",
  "rewardRecipients": [
    {
      "type": "op",
      "address": "PPCADDY",
      "percentage": 2.5
    }
  ],
  "blockRefreshInterval": 1000,
  "jobRebroadcastTimeout": 55,
  "clientConnectionTimeout": 600,
  "banning": {
    "enabled": true,
    "time": 600,
    "invalidPercent": 50,
    "checkThreshold": 50
  },
  "ports": {
    "3272": {
      "listenAddress": "0.0.0.0",
      "difficulty": 1024,
      "varDiff": {
        "minDiff": 512,
        "maxDiff": null,
        "targetTime": 15,
        "retargetTime": 90,
        "variancePercent": 30
      }
    }
  },
  "daemons": [
    {
      "host": "HOSTIP",
      "port": HOSTPORT,
      "user": "RPCUSER",
      "password": "RPCPASS"
    }
  ],
  "paymentProcessing": {
    "enabled": false,
    "minimumPayment": 0.5,
    "payoutScheme": "PPLNS",
    "payoutSchemeConfig": {
      "factor": 2.0
    }
  }
}

Hope this helps. Would be good to be able to use these coins.

@woblit
Copy link
Author

woblit commented Dec 18, 2017

Right, I have gotten to the bottom of what the problem seems to be with some of these altcoin bitcoind based clients. They don't support the API method "getblockchaininfo".

Therefore, the pool server never makes these pools available.

Is there a way round this? Been thinking of writing a proxy in PHP that basically proxies everything, but if getblockchaininfo is requested, then it will try and "hack" the information from other methods and provide it back quickly as the response. Some of the information provided by this seems to be available with other methods.

Anyone else got any ideas?

@oliverw
Copy link
Owner

oliverw commented Dec 18, 2017

@woblit Interesting find. Do they support an rpc method that could be substituted?

@woblit
Copy link
Author

woblit commented Dec 18, 2017

Seemingly not. Have taken a look and nothing else quite provides the info needed. Seems like "Getblockchaininfo" might have been a later edition to the bitcoind API arsenal. Does the pool server need all the info provided by Getblockchaininfo? What is essential?

@oliverw
Copy link
Owner

oliverw commented Dec 18, 2017

@woblit Essential fortunately nothing. Let me point you to the use cases for getblockchaininfo:

  1. Here it is used to log the daemon's blockchain sync progress in case the daemon is not fully synched
  2. Here it is used to update the blockchain stats available via the Miningcore API (mining itself is not affected by this)
  3. Here it is used as a health check which could use any other command as substitute.
  4. Here it is used to detect the chain type (Main, Testnet, Regtest).

All of those could be worked around with some sensible defaults and perhaps some optional configuration fields.

oliverw pushed a commit that referenced this issue Feb 21, 2018
* Ignore redundant ZMQ block hash updates for the same block from multiple daemons
* Disable stratum method _suggest_difficulty_ for now
* Job management change
* Runtime info logging
* Fixed GBX, CRC
* Do not return stale miner performance stats via API
* VarDiff maxDelta support
* Validate Monero PaymentID on login
* Do not send work until login is complete. Fixes #204
* Blake2s hash integration
* Support for Legacy Bitcoin daemons. Fixes #77, #119 
* Verge (XVG) integration
* Neoscrypt fix
* Legacy daemon fix
* improved POW/POS check
* Logging of block submissions
* BlockRewardMultiplier
* Increase Pg Command Timeout
* Added payment audit-trail
* Fixes #194
@calvintam236 calvintam236 added this to the 0.17 milestone Feb 21, 2018
@calvintam236 calvintam236 added bug and removed question labels Feb 21, 2018
@oliverw
Copy link
Owner

oliverw commented Mar 23, 2018

Fixed a couple releases ago through the addition of the "hasLegacyDaemon" configuration property.

@oliverw oliverw closed this as completed Mar 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants