Coder Social home page Coder Social logo

Comments (13)

jamesyoungdigital avatar jamesyoungdigital commented on July 23, 2024 1

That's not a bad idea, you can get a fair amount of balance queries with blockchain.info, I've hammered away on that one before. I added a simple query to a bitcoin tool that uses their https://blockchain.info/rawaddr/'+a API. You can put in a hash160 or 1Btc... address I think. A drop in like this works for me using Python 3:

def get_balance(address):

    if blocked:
        try:
            response = requests.get("https://blockchain.info/rawaddr/{}".format(address))
            balance = response.json()['final_balance']
            return int(balance)
        except:
            return -1

    try:
        response = requests.get("https://bitaps.com/api/address/" + str(address))
        return int(response.json()['balance']) 
    except:
        return -1

Another idea is to try and parse the chainstate every now and then; the chainstate in the bitcoin full node directory only has addresses with balances, I checked that with my brainwallet address and it worked out. I saw my balance and freaked out. Haha.

Does this really use all CPU power? For instance, on a machine with 128 CPUs and 8 threads per CPU?

from plutus.

sky777 avatar sky777 commented on July 23, 2024

Confirmed, my IP was blocked. I changed the IP and all is good, but we need to understand why the ip was blocked in the first place.

from plutus.

MisterTeo avatar MisterTeo commented on July 23, 2024

Me too. I have static ip, and I'm blocked.

from plutus.

PsyShark avatar PsyShark commented on July 23, 2024

According to my assumptions on bitaps.com protection against DDoS attacks is triggered. On my processor (8700k), I get a response from bitaps.com that reports too many requests per second.

from plutus.

sky305 avatar sky305 commented on July 23, 2024

Sounds like we need to put a rate-limit on it, as it seems if an IP Is blocked it's blocked forever.

from plutus.

sky305 avatar sky305 commented on July 23, 2024

or possibly alternate the API for bitaps.com and blockain.info.

from plutus.

sky305 avatar sky305 commented on July 23, 2024

from plutus.

jamesyoungdigital avatar jamesyoungdigital commented on July 23, 2024

from plutus.

jamesyoungdigital avatar jamesyoungdigital commented on July 23, 2024

Left a pull request in case anyone wants to test the code with 3 balance functions, in case we get blocked from calling the API.

There hasn't been significant testing yet, so please try it out and let me know what happens if you want to try the Plutus in my github repo.

from plutus.

jamesyoungdigital avatar jamesyoungdigital commented on July 23, 2024

Please don't merge pull request. I need to get my head around the globals with multithreading on CPUs. It's not working the way it's supposed to.

Will try to figure it out. Thanks...

from plutus.

sky305 avatar sky305 commented on July 23, 2024

from plutus.

jamesyoungdigital avatar jamesyoungdigital commented on July 23, 2024

from plutus.

Isaacdelly avatar Isaacdelly commented on July 23, 2024

I'm bringing an update within the next week. So just wait a few more days

from plutus.

Related Issues (20)

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.