Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method not found. Code:-32601 #966

Closed
KushalKochar opened this issue Sep 10, 2018 · 0 comments
Closed

Method not found. Code:-32601 #966

KushalKochar opened this issue Sep 10, 2018 · 0 comments

Comments

@KushalKochar
Copy link

KushalKochar commented Sep 10, 2018

Hi,

I have setup two indexer (1 for BTC and 1 for BCH). BTC works fine on both main net and test net.

BCH indexer gives me error (Method not found. Code:-32601) for almost all api for e.g. (/insight-api/addrs/txs).

At the same time the same api call to get block details (/insight-api/block/0000000000000000013d158bdcf920e005272cda96d48ff60f1846344ce74f25) give me perfect result.

When I try (/insight-api/sync), I get the result:

{
"status": "finished",
"blockChainHeight": 547253,
"syncPercentage": 100,
"height": 547253,
"error": null,
"type": "bitcore node"
}

Using following config :

RUN git clone https://github.com/bitpay/bitcore.git
RUN cd bitcore
RUN npm install
RUN cd ..

RUN bitcore create ctnode
WORKDIR /ctnode
RUN bitcore install insight-api
.
.
.
WORKDIR /ctnode/node_modules/bitcore-node/bin
RUN wget https://download.bitcoinabc.org/0.18.0/linux/bitcoin-abc-0.18.0-x86_64-linux-gnu.tar.gz
RUN tar -xzf bitcoin-abc-0.18.0-x86_64-linux-gnu.tar.gz
RUN ln -sf bitcoin-abc-0.18.0/bin/bitcoind bitcoind

Generate default bitcoin.conf if none is yet existing

if [ ! -f ${BITCOIND_CONFIG} ]; then
echo "server=1" >> ${BITCOIND_CONFIG}
# echo "whitelist=127.0.0.1" >> ${BITCOIND_CONFIG}
echo "txindex=1" >> ${BITCOIND_CONFIG}
echo "addressindex=1" >> ${BITCOIND_CONFIG}
echo "timestampindex=1" >> ${BITCOIND_CONFIG}
echo "usecashaddr=0" >> ${BITCOIND_CONFIG}
echo "upnp=0" >> ${BITCOIND_CONFIG}
echo "spentindex=1" >> ${BITCOIND_CONFIG}
echo "zmqpubrawtx=tcp://127.0.0.1:28332" >> ${BITCOIND_CONFIG}
echo "zmqpubhashblock=tcp://127.0.0.1:28332" >> ${BITCOIND_CONFIG}
echo "rpcallowip=127.0.0.1" >> ${BITCOIND_CONFIG}
echo "rpcuser=bitcoin" >> ${BITCOIND_CONFIG}
echo "rpcpassword=local321" >> ${BITCOIND_CONFIG}
echo "rpcworkqueue=128" >> ${BITCOIND_CONFIG}
echo "maxuploadtarget=${BITCOIND_MAX_UPLOAD_TARGET}" >> ${BITCOIND_CONFIG}
echo "uacomment=bitcore" >> ${BITCOIND_CONFIG}

echo "Created initial bitcoin.conf in directory '${BITCOIND_DATA_DIR}'"

fi

Generate default bitcore-node.json configuration if none is yet existing

if [ ! -f ${BITCORE_NODE_CONFIG} ]; then
echo "{" >> ${BITCORE_NODE_CONFIG}
echo " "network": "${BITCOIND_NET}"," >> ${BITCORE_NODE_CONFIG}
echo " "port": 3001," >> ${BITCORE_NODE_CONFIG}
echo " "services": [" >> ${BITCORE_NODE_CONFIG}
echo " "web"," >> ${BITCORE_NODE_CONFIG}
echo " "bitcoind"," >> ${BITCORE_NODE_CONFIG}
# echo " "bitcore-wallet-service"," >> ${BITCORE_NODE_CONFIG}
echo " "insight-api"" >> ${BITCORE_NODE_CONFIG}
echo " ]," >> ${BITCORE_NODE_CONFIG}
echo " "servicesConfig": {" >> ${BITCORE_NODE_CONFIG}
echo " "bitcoind": {" >> ${BITCORE_NODE_CONFIG}
echo " "spawn": {" >> ${BITCORE_NODE_CONFIG}
echo " "datadir": "${BITCOIND_DATA_DIR}"," >> ${BITCORE_NODE_CONFIG}
echo " "exec": "/ctnode/node_modules/bitcore-node/bin/bitcoind"" >> ${BITCORE_NODE_CONFIG}
echo " }" >> ${BITCORE_NODE_CONFIG}
echo " }," >> ${BITCORE_NODE_CONFIG}
echo " "web": {" >> ${BITCORE_NODE_CONFIG}
echo " "jsonRequestLimit": "200kb"" >> ${BITCORE_NODE_CONFIG}
echo " }," >> ${BITCORE_NODE_CONFIG}
echo " "insight-api": {" >> ${BITCORE_NODE_CONFIG}
echo " "disableRateLimiter": true," >> ${BITCORE_NODE_CONFIG}
echo " "rateLimiterOptions": {" >> ${BITCORE_NODE_CONFIG}
echo " "whitelist": ["::ffff:127.0.0.1"]" >> ${BITCORE_NODE_CONFIG}
echo " }", >> ${BITCORE_NODE_CONFIG}
echo " "routePrefix": "insight-api"," >> ${BITCORE_NODE_CONFIG}
echo " "enableCache": true" >> ${BITCORE_NODE_CONFIG}
echo " }" >> ${BITCORE_NODE_CONFIG}
echo " }" >> ${BITCORE_NODE_CONFIG}
echo "}" >> ${BITCORE_NODE_CONFIG}

Error on the console logs :

"POST /insight-api/addrs/txs" 400 29 1.559 "PostmanRuntime/7.3.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant