Giter VIP home page Giter VIP logo

indexd-server's People

Contributors

chiguireitor avatar deweller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indexd-server's Issues

Version of npm/node

I tried installing this with the latest npm/node on my debian server but get an error. Any idea which version of node is preferred?

$ node --version
v12.13.0
$ npm --version
6.13.0
$ npm install
...snip...
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/user/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/home/user/.nvm/versions/node/v12.13.0/bin/node" "/home/user/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/code/indexd-server/node_modules/leveldown
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2019-11-17T02_11_40_417Z-debug.log

indexdRPCError since recent update

Hello,

since a recent update, we got an indexdRPCError and our blockchain server do not work anymore, details:

[2018-09-20 08:49:08][ERROR] API Exception: {'args': ('Cannot communicate with mainnet indexd server at `http://localhost:8432/a/***concerned_wallet***/utxos`.',), 'message': 'Cannot communicate with mainnet indexd server at` http://localhost:8432/a/***concerned_wallet***/utxos`.', 'type': 'IndexdRPCError'}

counterparty_1           | Traceback (most recent call last):
counterparty_1           |   File "/usr/local/lib/python3.5/dist-packages/jsonrpc/manager.py", line 108, in _get_responses
counterparty_1           |     result = method(*request.args, **request.kwargs)
counterparty_1           |   File "/counterparty-lib/counterpartylib/lib/api.py", line 509, in create_method
counterparty_1           |     return compose_transaction(self.db, name=tx, params=transaction_args, **common_args)
counterparty_1           |   File "/counterparty-lib/counterpartylib/lib/api.py", line 374, in compose_transaction
counterparty_1           |     extended_tx_info=extended_tx_info)
counterparty_1           |   File "/counterparty-lib/counterpartylib/lib/transaction.py", line 461, in construct
counterparty_1           |     unspent = backend.get_unspent_txouts(source, unconfirmed=allow_unconfirmed_inputs)
counterparty_1           |   File "/counterparty-lib/counterpartylib/lib/backend/__init__.py", line 158, in get_unspent_txouts
counterparty_1           |     unspent = BACKEND().get_unspent_txouts(source)
counterparty_1           |   File "/counterparty-lib/counterpartylib/lib/backend/indexd.py", line 258, in get_unspent_txouts
counterparty_1           |     return indexd_rpc_call('/a/'+source+'/utxos')
counterparty_1           |   File "/counterparty-lib/counterpartylib/lib/backend/indexd.py", line 296, in indexd_rpc_call
counterparty_1           |     raise IndexdRPCError('Cannot communicate with {} indexd server at `{}`.'.format(network, util.clean_url_for_log(url)))
counterparty_1           | counterpartylib.lib.backend.indexd.IndexdRPCError: Cannot communicate with mainnet indexd server at `http://localhost:8432/a/***concerned_wallet***/utxos`.

Could someone have direction to sort out this problem please?

Thanks

Resource temporarily unavailable

I'm getting the following error using the example code when starting indexd:
/root/.bitcoin/chainstate/LOCK: Resource temporarily unavailable

I'm on centos 7, same configuration has worked for me on an ubuntu server a while back. Anyone got an idea?

spinSleepTime and minUptime values

https://stackoverflow.com/questions/24921154/nodejs-forever-package-minuptime-and-spinsleeptime-warnings has an explanation on these values.
I wonder if we should set these, and if we do whether spinSleepTime 60s is better than leaving restarts to Docker in which case we should document this for those who run it outside of Docker.

Edit: for those who want to test various options: https://github.com/CounterpartyXCP/indexd-server/blob/master/docker/start.sh forever --optionN=valueN ./index.js

Lower RPCCONCURRENT or increase rpcworkqueue in Fednode?

Got this in Core 0.15.1 debug.log (testnet) upon indexd-server startup. I'm using default parameters in bitcoin.conf.

2017-10-28 14:08:36 WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting

I'm not sure what's a "reasonable" setting here.

I'd have to do some testing and comparisons to see (for example) how much worse is RPCCONCURRENT=4 vs 8 vs 16 vs 32...

We could do similar tests with rpcworkqueue, although personally I'd prefer to keep RPCCONCURRENT as low as possible, than adjust rpcworkqueue to a higher value.

unlimited / infinity error on new addresses

I am consistently seeing an error thing by indexd

Expected property "limit" of type ? UInt53, got Number Infinity

image

This issue seems to happen when a user first tries to login to counterwallet using a brand new wallet/address with no known transactions.... after a while, an error is thrown... if you continue to re-try the failing request a few mire times, eventually it will start to return the proper balances response

Indexd returned error: 400 Bad Request "Missing RPC response"

I made the following request to counterparty api

{"jsonrpc":"2.0","id":0,"method":"search_raw_transactions","params":{"address":"mqKy9agnNopat7WAsyzkgrJr5z5JisSzbz","unconfirmed":true}}

and sometimes the following error is thrown but sometimes it isnt and correct response is returned

{"id": 0, "jsonrpc": "2.0", "error": {"data": {"args": ["Indexd returned error: 400 Bad Request {"error":"Missing RPC response"}"], "type": "IndexdRPCError", "message": "Indexd returned error: 400 Bad Request {"error":"Missing RPC response"}"}, "code": -32000, "message": "Server error"}}

txindex configuration

Hello,
Is txindex=1 required in bitcoin.conf to get accurate results from the indexd-server or does it purely rely on data from ZMQ?

Thanks.

TypeError: Cannot read property 'height' of undefined

I followed the install instructions using the latest bitcoincore and the indexd branches of counterpartylib and cli

npm:v5.5.1
node:v9.2.0

I start the server as follows

forge@dev-test-xcpd-2:~/indexd-server$ forever index.js
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
Wed, 15 Nov 2017 15:31:43 GMT index Initializing blockchain connection (for testnet)
Wed, 15 Nov 2017 15:31:43 GMT index starting API server
Wed, 15 Nov 2017 15:31:43 GMT index App listening on port 18432

then I call
curl http://127.0.0.1:18432/status

and the following error is thrown

Wed, 15 Nov 2017 15:31:47 GMT express ERR: /status TypeError: Cannot read property 'height' of undefined
    at parallel (/home/forge/indexd-server/lib/express.js:60:42)
    at end (/home/forge/indexd-server/node_modules/run-parallel/index.js:16:15)
    at done (/home/forge/indexd-server/node_modules/run-parallel/index.js:20:10)
    at each (/home/forge/indexd-server/node_modules/run-parallel/index.js:26:7)
    at /home/forge/indexd-server/node_modules/run-parallel/index.js:36:43
    at batch.forEach (/home/forge/indexd-server/node_modules/yajrpc/index.js:72:7)
    at Array.forEach (<anonymous>)
    at dhttp (/home/forge/indexd-server/node_modules/yajrpc/index.js:61:11)
    at done (/home/forge/indexd-server/node_modules/dhttp/index.js:17:19)
    at handle (/home/forge/indexd-server/node_modules/dhttp/index.js:61:7)

/home/forge/indexd-server/lib/express.js:89
      let tipHeight = results.tip.height

Details in install steps

I had to install a ton of extra npm packages: dotenv, express, debug and (after playing with Dockerfile) node-gyp, indexd, leveldown, qup, yajrpc, zmq, bitcoinjs-lib, run-parallel.
These probably can be added to README.md.

With that, and after following the steps from Dockerfile, indexd seems to start. I don't know yet if it does anything, I'm still syncing the blockchain, but I'll verify it works correctly and create a PR with more detail related to the installation procedure.

Another place which I don't understand well is the relationship between Bitcoin Core's ZMQ settings and .env - do the ports from bitcoin.conf need to map to ports from .env, etc.

Ability to prune the database?

Hello,

I was wondering if it's possible to modify the service to >only< store information required for the "utxos" endpoint to function properly. This is the only endpoint i primarily use and was hoping i could prune the database as much as i can.

Thank you!

Method not found

dose it need to full sync to start use search_raw_transactions

curl --user username:password --data-binary '{"jsonrpc":"2.0","id":0,"method":"search_raw_transactions","params":{"address":"mqKy9agnNopat7WAsyzkgrJr5z5JisSzbz","unconfirmed":true}}' -H 'content-type:text/plain;' http://127.0.0.1:8332

{"result":null,"error":{"code":-32601,"message":"Method not found"},"id":0}

status

chainBlock 594351
indexBlock 362541
network "mainnet"
blocksBehind 231810
ready false

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.