pybitcash / bitcash

BitCash: Python Bitcoin Cash Library (fork of ofek's Bit)
https://bitcash.dev
MIT License
97 stars 39 forks source link

APIs out of date #140

Closed ssmycelium closed 5 months ago

ssmycelium commented 6 months ago

I suspect I'm having some issues around get_unspents, so I'm trying to track that down.

I do see rest.bitcoin.com, which no longer exists: https://github.com/pybitcash/bitcash/blob/master/bitcash/network/APIs/BitcoinDotComAPI.py#L37

And rest.bch.actorforth.org appears to be very behind on the blockchain: https://rest.bch.actorforth.org/v2/#/blockchain/getBlockchainInfo

I'm seeing block 831,715, (February 8th) when blockchair says the newest is 841,527 (as of April 16th).

I'll keep adding to this as I find more.

merc1er commented 6 months ago

Thanks for reporting this. I am asking the ActorForth team if they can investigate.

merc1er commented 6 months ago

Actorforth is now back in sync: https://rest.bch.actorforth.org/v2/#/blockchain/getBlockchainInfo.

Block 841821 at time of writing, which is on par with Blockchair.

However, chaingraph, which is the primary API for fetching UTXOs seems to be out of sync. They are aware and reportedly working on a fix. I will report back when this is fixed.

merc1er commented 6 months ago

A cURL command to check the status of chaingraph:

curl 'https://demo.chaingraph.cash/v1/graphql' -H 'Content-Type: application/json' -H 'Accept: application/json' --data-binary '{"query":"query GetBlockHeights {\n  block(order_by: {height: desc}, limit: 1) {\n    height\n  }\n}\n"}'

Or at https://try.chaingraph.cash:

query GetBlockHeight {
  block(order_by: {height: desc}, limit: 1) {
    height
  }
}
merc1er commented 6 months ago

Chaingraph is still slightly behind as of now.

merc1er commented 6 months ago

@ssmycelium this should now be resolved. Could you please confirm?

ssmycelium commented 5 months ago

@merc1er thank you! Unfortunately, my main use of bitcash was a very trivial portion that I ended up writing a couple basic httpx calls. I don't have any simple way to confirm this now. I'm sure it's working now.