trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
647 stars 644 forks source link

api not working #1054

Closed dev-dantealighieri closed 5 months ago

dev-dantealighieri commented 5 months ago

hi,

i installed blockbook for bitcoin, and it finished synching, now i want to test the endpoints, but its returning same thing for all endpoints, why is that happening?

curl http://localhost:9130/api/v2 | json this request returns the following

{
  "blockbook": {
    "coin": "Bitcoin",
    "host": "ip-xxx",
    "version": "0.4.0",
    "gitCommit": "b5cfbdfd",
    "buildTime": "2024-03-20T07:25:09+00:00",
    "syncMode": true,
    "initialSync": true,
    "inSync": false,
    "bestHeight": 346837,
    "lastBlockTime": "2024-03-21T09:09:34.354752918Z",
    "inSyncMempool": false,
    "lastMempoolTime": "0001-01-01T00:00:00Z",
    "mempoolSize": 0,
    "decimals": 8,
    "dbSize": 45649375816,
    "hasFiatRates": true,
    "about": "Blockbook - blockchain indexer for Trezor Suite https://trezor.io/trezor-suite. Do not use for any other purpose."
  },
  "backend": {
    "chain": "main",
    "blocks": 835640,
    "headers": 835640,
    "bestBlockHash": "000000000000000000006236bc3307b6d180f0b3be67badf6a5af37a1e883972",
    "difficulty": "83947913181361.55",
    "sizeOnDisk": 633874980341,
    "version": "260000",
    "subversion": "/Satoshi:26.0.0/",
    "protocolVersion": "70016"
  }
}

when im trying different endpoints, the result doesnt change ➜ blockbook git:(master) curl http://localhost:9130/api/v2/tx/cd8ec77174e426070d0a50779232bba7312b712e2c6843d82d963d7076c61366

whats the problem here?

thanks, dante

martinboehm commented 5 months ago

Blockbook is still in initial sync with the backend, see "initialSync": true. I takes about 24-36 hours on a reasonably powerful server to complete the sync.

dev-dantealighieri commented 5 months ago

how ken i kontrol which percent it on?

which kommand that i kan use?

dev-dantealighieri commented 5 months ago

@martinboehm

martinboehm commented 5 months ago

You have to wait until it finishes the sync. "bestHeight": 346837 shows where it is and "blocks": 835640 tells how many blocks in total it has to process.

dev-dantealighieri commented 5 months ago

its not using all cores, kan we make it use more cores by adjusting service files or something like that??

i only followed the guide here, didnt do anything else?

how can we make it use all of my resources?

thanks, dante