bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

Bitcored v5.0 switch from Bcoin to other node

Open got3nks opened this issue 9 years ago • 18 comments

I upgraded to Bitcore 5 beta4,

To switch underlying Bitcoin implementations, you can point Bitcore to any full node which supports the Bitcoin P2P protocol, even another fork of Bitcoin. And since you won't need to fork Bitcore's codebase to do it, switching implementations is easier than ever. You can choose which Bitcoin transaction validation rules you want to use, whether Segwit or different block sizes.

How do I disable the built-in Bcoin node and make Bitcore point to my Bitcoin Cash node instead?

I'm currently running a Bitcoin Cash full node with this configuration:

server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcallowip=127.0.0.1
rpcuser=...
rpcpassword=...

got3nks avatar Aug 30 '17 19:08 got3nks

I think I found out how, https://github.com/bitpay/bitcore-node/blob/master/bitcore-node.json.sample

    "p2p": {
      "peers": [
        { "ip": { "v4": "127.0.0.1" } }
      ]
    }

[2017-08-31T23:04:58.398Z] info: Connected to peer: 127.0.0.1, network: livenet, version: 70015, subversion: /Bitcoin ABC:0.14.6(EB8.0)/, status: ready, port: 8333, best height: 484334

got3nks avatar Aug 30 '17 20:08 got3nks

@got3nks Did this disable the Bcoin node as well or just point Bcore to your Cash node?

realcheese avatar Oct 13 '17 00:10 realcheese

I think the built-in Bcoin node is automatically disabled if you point your Bitcore configuration to use your Cash node.

got3nks avatar Oct 13 '17 11:10 got3nks

@got3nks Besides placing the above config under servicesConfig, did you remove bitcoind from servicesConfig as well as services?

realcheese avatar Nov 16 '17 19:11 realcheese

Version 5.0 does not have any bitcoind entry under servicesConfig or services by default.

got3nks avatar Dec 13 '17 15:12 got3nks

Hi @got3nks. I have use bitcore 5.0.0-beta.44, can You help me Bitcore configuration to use Bitcoin Cash node? thanks

achakhalyan avatar Apr 09 '18 07:04 achakhalyan

Hi All. I have find how can start bitcoin-abc via bitcore-node.

  1. will download bitcoin-abc from [https://www.bitcoinabc.org/may15hardfork]
  2. install bitcore-node and create Your node bitcore-node create -d mynode
  3. change bitcore-node.json following case. { "network": "livenet", "port": 3001, "services": [ "bitcoind", "insight-api", "insight-ui", "web" ], "servicesConfig": { "bitcoind": { "spawn": { "datadir": "<bitcoin-data-dir>", "exec": "/btcABC/bitcoin-abc-0.16.2/bin/bitcoind" } } } }
  4. bitcore-node start

achakhalyan avatar Apr 23 '18 11:04 achakhalyan

Can you run this AND have a node running bitcoin at the same time?

shamoons avatar May 06 '18 18:05 shamoons

Here is my install steps,you can check it. https://github.com/m24927605/BCH_Node_InsightAPI https://github.com/m24927605/BCH_Bitcore_v5.x_InsightAPI https://github.com/m24927605/bitcore-node-v8-node.git

m24927605 avatar Jun 15 '18 06:06 m24927605

thanks very nice

On Fri, Jun 15, 2018 at 10:38 AM, Michael [email protected] wrote:

Here is my install steps,you can check it. https://github.com/m24927605/BCH_Node_InsightAPI

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitpay/bitcore/issues/1471#issuecomment-397528126, or mute the thread https://github.com/notifications/unsubscribe-auth/AHwh1czl58X65XKb93px4ilfEMJEjsF9ks5t81aAgaJpZM4PH5O_ .

achakhalyan avatar Jun 15 '18 08:06 achakhalyan

@chakhalyan1 @m24927605 Have you tried it? Does it work?

hxzqlh avatar Jun 15 '18 08:06 hxzqlh

@hxzqlh yeah,I run my install steps today,and it work.

m24927605 avatar Jun 15 '18 09:06 m24927605

@m24927605 Is bitcoin cash addr api also ok? I have tried following your guidance, but bch address is also not worked:

bcc@a0bd3708b81c:~/mynode$ curl localhost:3001/insight-api/addr/1Gyz4vuYixD1BPDMCqBb8Hbm514v6YyNuU
Method not found. Code:-32601

bcc@a0bd3708b81c:~/mynode$ curl localhost:3001/insight-api/addr/qz7cgzl5mavucstffsr8qf8mp2v60zncqv7tn3nler
Invalid address: Non-base58 character. Code:1

hxzqlh avatar Jun 15 '18 10:06 hxzqlh

for me also was worked. but before comment

On Fri, Jun 15, 2018 at 2:23 PM, Allen [email protected] wrote:

@m24927605 https://github.com/m24927605 Is bitcoin cash addr api also ok? In my previous experiences, bch address not work as below.

bcc@a0bd3708b81c:~/mynode$ curl localhost:3001/insight-api/addr/1Gyz4vuYixD1BPDMCqBb8Hbm514v6YyNuU Method not found. Code:-32601

bcc@a0bd3708b81c:~/mynode$ curl localhost:3001/insight-api/addr/qz7cgzl5mavucstffsr8qf8mp2v60zncqv7tn3nler Invalid address: Non-base58 character. Code:1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitpay/bitcore/issues/1471#issuecomment-397579488, or mute the thread https://github.com/notifications/unsubscribe-auth/AHwh1X7A8ZAe6UWmBTfxwbwcVaJt9MT8ks5t84shgaJpZM4PH5O_ .

achakhalyan avatar Jun 15 '18 10:06 achakhalyan

@hxzqlh @chakhalyan1 Hi! Did you ever get the /addr methods working? I finally got my bch bitcore node running -- /block-index/1000 works but other methods don't.

psiofxt avatar Jun 27 '18 03:06 psiofxt

@psiofxt unfortunately, the /addrapi didn‘t work,it said "Method Not Found" such thing~

hxzqlh avatar Jun 29 '18 08:06 hxzqlh

@psiofxt You can try this fork for BCH that I'm working on. It's still in development and has some minor issues (check 'issues'), but it works for most of the api calls in bitcore.

osagga avatar Jul 01 '18 18:07 osagga

这是我的安装步骤,您可以查看它。 https://github.com/m24927605/BCH_Node_InsightAPI https://github.com/m24927605/BCH_Bitcore_v5.x_InsightAPI https://github.com/m24927605/bitcore-node-v8-node.git

According to your steps, I have successfully installed, But there is still a problem,When I access the /addr insight interface, I return Method not found. Code:-32601,Do you know what the problem is?

qazxcvio avatar Nov 09 '18 07:11 qazxcvio