• Resolved UgoDimma

    (@lovecoinz)


    Hey

    I installed bitcoin node on my server following the insteuctions on this page, How to install bitcoin everything seems to be fine as my site was able to connect to it.

    But the wallet address it generates for the users are not recognized on blockchain as valid, I got the following error,

    Version code of address did not match acceptable versions for network: 111 not in [0, 5]

    Here is one of the address it generates https://blockchain.info/address/n1HnvrD7uaMLRb35FtyXVsyRqCDWSAVCMC

    In addition, I uninstalled bitcoind from the server, go to the users profile and still see the address there. I thought as bitcoin node is uninstalled or disabled on the server, that this plugin cannot generate address, and also wipe out the previously generated one?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author dashed-slug.net

    (@dashedslug)

    Hello,

    I have not tested the plugin with Bitcoin unlimited, but is should work with it.

    The issue here is that the plugin has retained deposit addresses from earlier when you might have tested the plugin with testnet. The address you report is not a bitcoin address, but a Bitcoin testnet address. See here for version 111: https://en.bitcoin.it/wiki/List_of_address_prefixes

    Unfortunately there is no easy way currently to generate new addresses from within the plugin, although I do have plans to add this in soon. The upcoming version 3.0.0 lays the ground work for this to be possible, because it introduces a more flexible PHP API that will allow this.

    In the meantime, you should go to your MySQL database (perhaps via phpmyadmin) and delete all your BTC deposit addresses. This will force the plugin to regenerate them. Assuming the table prefix in your db is wp_, here’s how you’d do it:

    DELETE FROM wp_wallets_adds WHERE symbol='BTC';

    Let me know if this resolves your issue.

    kind regards

    Thread Starter UgoDimma

    (@lovecoinz)

    Hey
    I have been trying various options without success yet.

    I pooled down my server, and rebuild it. install fresh wordpress and start all at fresh.

    re-install bitcoin following the instruction at https://bitcoin.org/en/full-node#ubuntu-1610 to be sure all if from the source. But now, the plugin displays the following error

    Bitcoin and Altcoin Wallets error
    The Bitcoin RPC API cannot be contacted.

    You need to make sure that your Bitcoin RPC settings are correctly configured.
    Then edit your .conf file and append the following:

    server=1
    rpcallowip=127.0.0.1/8
    rpcallowip=35.185.xx.xx/24
    rpcport=8332
    walletnotify=curl -s https://domain.com/wallets/api2/notify/BTC/wallet/%s >/dev/null
    blocknotify=curl -s https://domain.com/wallets/api2/notify/BTC/block/%s >/dev/null
    rpcauth=rpcuser:c9a055bc6b9d0b529366da7$fa3d314c07bd6dd6948001de0e9c2d4f2ddb08b8554c687c4348a8dd9951500a
    Finally, start the daemon.
    You are advised to not dismiss this error manually. It will stop showing once the daemon can be contacted.

    I ran the following on my server
    curl --verbose --user rpcuser:rpcpassword --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getinfo","params":[]}' -H 'content-type:text/plain;' https:// 35.185.xx.xx:8332/
    With the following error

    * Could not resolve host: http
    * Closing connection 0
    curl: (6) Could not resolve host: http
    * Trying 35.185.87.30…
    * connect to 35.185.87.30 port 8332 failed: Connection refused
    * Failed to connect to 35.185.87.30 port 8332: Connection refused
    * Closing connection 1
    curl: (7) Failed to connect to 35.185.87.30 port 8332: Connection refused

    I checked my firewall, and it is disabled, I went to my googl vm and enable all the necessary ports, 8332, 24 and even 8 to be sure, still yet, no result.

    I later enabled firewall on the server, enable all the neccessary ports as well, without good result.

    I also, remove rpcuser and rpcpassword from my bitcoin.conf file and also from the plugin without result.
    Checking the status of my bitcoin node with bitcoin-cli getblock and it returned

    {
    “walletname”: “wallet.dat”,
    “walletversion”: 159900,
    “balance”: 0.00000000,
    “unconfirmed_balance”: 0.00000000,
    “immature_balance”: 0.00000000,
    “txcount”: 0,
    “keypoololdest”: 1522230894,
    “keypoolsize”: 1000,
    “keypoolsize_hd_internal”: 1000,
    “paytxfee”: 0.00000000,
    “hdmasterkeyid”: “7b3cfa58f367f875f68af350ceee3ddfe9f28597”
    }

    Which I believe it means working
    Then tried bitcoin-cli getblockchaininfo which also returned

    {
    “chain”: “main”,
    “blocks”: 469482,
    “headers”: 515677,
    “bestblockhash”: “0000000000000000004b0ae1dad098873538f4ecb19ccd3f39592fd446b192e8”,
    “difficulty”: 595921917085.416,
    “mediantime”: 1496463384,
    “verificationprogress”: 0.727302937618417,
    “initialblockdownload”: true,
    “chainwork”: “0000000000000000000000000000000000000000005c9eef8760f1167e431811”,
    “size_on_disk”: 135997343540,
    “pruned”: false,
    “softforks”: [
    {
    “id”: “bip34”,
    “version”: 2,
    “reject”: {
    “status”: true
    }
    },
    {
    “id”: “bip66”,
    “version”: 3,
    “reject”: {
    “status”: true
    }
    },
    {
    “id”: “bip65”,
    “version”: 4,
    “reject”: {
    “status”: true
    }
    }
    ],
    “bip9_softforks”: {
    “csv”: {
    “status”: “active”,
    “startTime”: 1462060800,
    “timeout”: 1493596800,
    “since”: 419328
    },
    “segwit”: {
    “status”: “started”,
    “bit”: 1,
    “startTime”: 1479168000,
    “timeout”: 1510704000,
    “since”: 439488,
    “statistics”: {
    “period”: 2016,
    “threshold”: 1916,
    “elapsed”: 1771,
    “count”: 547,
    “possible”: false
    }
    }
    },
    “warnings”: “”
    }

    Which I believe that the bitcoin node is working as expected.

    Plugin Author dashed-slug.net

    (@dashedslug)

    Hello,

    To clarify, what you just reported is a different error than your original error.

    Your original error had to do with stale testnet addresses in your addresses table.

    Your current error indicates that the plugin does not connect to your RPC port. Since curl cannot connect to your wallet, neither can the plugin. Unless you resolve this, the plugin will not connect. This can be a firewall issue or anything else really.

    Additionally, in your curl command you have left a space after https:// which caused the protocol to be interpreted as a hostname, hence the error Could not resolve host: http. The full command would be:

    curl --verbose --user rpcuser:rpcpassword --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getinfo","params":[]}' -H 'content-type:text/plain;' https://35.185.87.30:8332/

    Unfortunately unless you can resolve this I cannot help you with the plugin. Do let me know once you resolve this. You should do whatever you had done before, when the plugin was connecting.

    kind regards

    Thread Starter UgoDimma

    (@lovecoinz)

    I got it all working now i guess.
    The plugin is now well connected to my bitcoin node on my ubuntu server. generates good addresses.
    But I will still continue to test run this before my site goes up life.

    In mean time, I will now work on resource control as outlined out here https://bitcoin.org/en/full-node#configuration-tuning

    If any question, which definitely must be, I will check back.

    But how does this get resolved?

    I can’t tell exactly as I have done a whole lot of things including

    1. memory upgrade from 3gb to 5gb.
    2. restarting of bitcoin node
    3. Worked on my firewall
    4. Set up the bitcoin daemon to auto-run.
    5. Open some port from my google vm. etc
    6. Thanks again for the kind support on this plugin.

    Plugin Author dashed-slug.net

    (@dashedslug)

    Hello,

    Thanks for the detailed description. I am glad that you got your connectivity issue working, and it’s good to know that the wallet is generating valid addresses.

    Configuring the wallet is outside the scope of this plugin, however it sounds like your wallet is working well, so I am not sure why you are trying to control resource usage. You should be able to control the number of CPU cores used with the par option.

    I would please ask again that in the future you open a new thread for each additional query. This is for the benefit of us, but also for other people who might read these discussions.

    I will leave this thread closed since you say that both of your issues are resolved. If you face another issue with the plugin, please do open a new thread.

    I believe that for general configuration guidance about the Bitcoin core wallet, a better place to ask for help is https://bitcoin.stackexchange.com/ or the Bitcoin core section of bitcoin talk, at https://bitcointalk.org/index.php?board=4.0 I am sure that the folk over there are more knowledgeable on this than I.

    Thanks

    kind regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘It generates wrong bitcoin address’ is closed to new replies.