Pages:
Author

Topic: How to read/parse blockchain and get bitcoin addresses having balance. (Read 2007 times)

jr. member
Activity: 36
Merit: 3
Try this https://github.com/normanvolt/blockchain-parser
No installation, no dependencies needed. Just pure Python and the script by the link.
full member
Activity: 198
Merit: 130
Some random software engineer
Can you reupload allbalances.txt ? old link is not working. Thanks.

ill try to upload tonight.

I've generated a dump for all balances on the other post: https://bitcointalksearch.org/topic/m.32209481.
Did you take a look at it ?
If so, what do you think ?
sr. member
Activity: 434
Merit: 270
Can you reupload allbalances.txt ? old link is not working. Thanks.

ill try to upload tonight.
sr. member
Activity: 434
Merit: 270
its a old one, but if you still want it here is it.

Code:
https://transfer.sh/jfQfE/balances.zip
hero member
Activity: 826
Merit: 500
probably this python software
https://github.com/chainside/btcpy
is any help!
hero member
Activity: 826
Merit: 500
thanks a lot for replying!!!
sr. member
Activity: 434
Merit: 270
anybody had success above segwit blocks?
using blockparser
theoritically yes,
practically no

remove all blocks after which segit is implemeted.,
remove bitcoind
install bitcoin-core version bitcoin-core-0.11.2
start bitcoind
run blockparser again

else


remove all blocks after which segit is implemeted.,
remove bitcoind
install bitcoin-core version bitcoin-core-0.11.2
start bitcoind with resync
run blockparser again

edit:
practically no
means i have not tried it yet., but its the solution/correct way to do it., thats what i have been told.
ill try it this week.
good luck

hero member
Activity: 826
Merit: 500
anybody had success above segwit blocks?
sr. member
Activity: 434
Merit: 270
i want make sure, if blockchain is secure enough
You do not have skills and knowledge for such checks ans assumptions  Grin


i know, not yet, but i am trying/willing to learn.



edit: 12th oct 2017

i have used blockaparser on 50% blocks.

which gave me 4 gb allbalnce.txt file.,

i used 7zip to zip it.,

if anyone is intersted here it is.,

https://transfer.sh/DLIpD/blockparser-allBalances.txt.7z

ill try to parse the complete block when i get free time., and try to keep this thread updated.
sr. member
Activity: 770
Merit: 305
i want make sure, if blockchain is secure enough
You do not have skills and knowledge for such checks ans assumptions  Grin
sr. member
Activity: 434
Merit: 270
Waste of time, what is the point? It would take you longer or about the same amount of time to steal coins this way than it would to mine Bitcoins using the same equipment. People have tried this time and time again and the results are the same, they give up because it is a fruitless pursuit. There is always someone that thinks they know better than the system and they fail in the end, so please try again.
what makes you think, my method is same as others., remember everyone is unique Tongue

So you admit you are trying to steal bitcoins?  Good luck with that.
I don't know, why you need to be able to parse the blockchain yourself though. Why not explore ready made lists of bitcoin addresses.
https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html

But yeah. many have tried and noticed bitcoin is more secure than they thought. Would be interesting to know what is your angle of attack Smiley

When reading your post I assumed you are just interested in the blockchain and exploring it out of interest.
Because I have been doing the same.
there are some quite interesting addresses. Examples here:
http://www.theopenledger.com/9-most-famous-bitcoin-addresses/


i m more of like whitehat .
i want make sure, if blockchain is secure enough, so that i can invest some big chunk of money in bitcoins.



full member
Activity: 378
Merit: 197
Waste of time, what is the point? It would take you longer or about the same amount of time to steal coins this way than it would to mine Bitcoins using the same equipment. People have tried this time and time again and the results are the same, they give up because it is a fruitless pursuit. There is always someone that thinks they know better than the system and they fail in the end, so please try again.
what makes you think, my method is same as others., remember everyone is unique Tongue

So you admit you are trying to steal bitcoins?  Good luck with that.
I don't know, why you need to be able to parse the blockchain yourself though. Why not explore ready made lists of bitcoin addresses.
https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html

But yeah. many have tried and noticed bitcoin is more secure than they thought. Would be interesting to know what is your angle of attack Smiley

When reading your post I assumed you are just interested in the blockchain and exploring it out of interest.
Because I have been doing the same.
there are some quite interesting addresses. Examples here:
http://www.theopenledger.com/9-most-famous-bitcoin-addresses/
sr. member
Activity: 434
Merit: 270
What would be the the steps or cmd line to use that?

I've been trying to compile the parser but having trouble with g++-4.4, what all did you install to get it to get it to work. I'm stuck at unable to locate the g++-4.4

i do this for all my centos systems.,

yum install autoconf automake gcc-c++ libdb4-cxx libdb4-cxx-devel boost-devel openssl-devel

but when error occures at the time of compiliing, act accordingly.

full member
Activity: 706
Merit: 111
What would be the the steps or cmd line to use that?

I've been trying to compile the parser but having trouble with g++-4.4, what all did you install to get it to get it to work. I'm stuck at unable to locate the g++-4.4
sr. member
Activity: 434
Merit: 270
I have the btc addresses, I need a way to get the hash160 addresses.

this is what i would use .

Code:
bool addrToHash160(
          uint8_t *hash160,
    const uint8_t *addr,
             bool checkHash,
             bool verbose
) {
    static BIGNUM *sum = 0;
    static BN_CTX *ctx = 0;
    if(unlikely(!ctx)) {
        ctx = BN_CTX_new();
        BN_CTX_init(ctx);
        sum = BN_new();
    }

    BN_zero(sum);
    while(1) {
        uint8_t c = *(addr++);
        if(unlikely(0==c)) break;

        uint8_t dg = fromB58Digit(c);
        BN_mul_word(sum, 58);
        BN_add_word(sum, dg);
    }

    uint8_t buf[4 + 2 + kRIPEMD160ByteSize + 4];
    size_t size = BN_bn2mpi(sum, 0);
    if(sizeof(buf)        warning(
            "BN_bn2mpi returned weird buffer size %d, expected %d\n",
            (int)size,
            (int)sizeof(buf)
        );
        return false;
    }

    BN_bn2mpi(sum, buf);

    uint32_t recordedSize =
        (buf[0]<<24)    |
        (buf[1]<<16)    |
        (buf[2]<< 8)    |
        (buf[3]<< 0)
    ;
    if(size!=(4+recordedSize)) {
        warning(
            "BN_bn2mpi returned bignum size %d, expected %d\n",
            (int)recordedSize,
            (int)size-4
        );
        return false;
    }

    uint8_t *bigNumEnd;
    uint8_t *dataEnd = size + buf;
    uint8_t *bigNumStart = 4 + buf;
    uint8_t *checkSumStart = bigNumEnd = (-4 + dataEnd);
    while(0==bigNumStart[0] && bigNumStart
    ptrdiff_t bigNumSize = bigNumEnd - bigNumStart;
    ptrdiff_t padSize = kRIPEMD160ByteSize - bigNumSize;
    if(0        if(0            memcpy(padSize + hash160, bigNumStart, bigNumSize);
        }
        memset(hash160, 0, padSize);
    } else {
        memcpy(hash160, bigNumStart - padSize, kRIPEMD160ByteSize);
    }

    bool hashOK = true;
    if(checkHash) {

        uint8_t data[1+kRIPEMD160ByteSize];
        memcpy(1+data, hash160, kRIPEMD160ByteSize);
        data[0] = getCoinType();

        uint8_t sha[kSHA256ByteSize];
        sha256Twice(sha, data, 1+kRIPEMD160ByteSize);

        hashOK =
            sha[0]==checkSumStart[0]  &&
            sha[1]==checkSumStart[1]  &&
            sha[2]==checkSumStart[2]  &&
            sha[3]==checkSumStart[3];

        if(!hashOK) {
            warning(
                "checksum of address %s failed. Expected 0x%x%x%x%x, got 0x%x%x%x%x.",
                addr,
                checkSumStart[0],
                checkSumStart[1],
                checkSumStart[2],
                checkSumStart[3],
                sha[0],
                sha[1],
                sha[2],
                sha[3]
            );
        }
    }

    return hashOK;
}

ref: https://github.com/znort987/blockparser/blob/master/util.cpp#L596-L699

full member
Activity: 706
Merit: 111
I have the btc addresses, I need a way to get the hash160 addresses.
sr. member
Activity: 434
Merit: 270
Is there any other way to get hash160 addresses besides using this?

you want hash160 or btc address ?
full member
Activity: 706
Merit: 111
Is there any other way to get hash160 addresses besides using this?
sr. member
Activity: 434
Merit: 270
Waste of time, what is the point? It would take you longer or about the same amount of time to steal coins this way than it would to mine Bitcoins using the same equipment. People have tried this time and time again and the results are the same, they give up because it is a fruitless pursuit. There is always someone that thinks they know better than the system and they fail in the end, so please try again.

what makes you think, my method is same as others., remember everyone is unique Tongue

hero member
Activity: 812
Merit: 500
Waste of time, what is the point? It would take you longer or about the same amount of time to steal coins this way than it would to mine Bitcoins using the same equipment. People have tried this time and time again and the results are the same, they give up because it is a fruitless pursuit. There is always someone that thinks they know better than the system and they fail in the end, so please try again.
Pages:
Jump to: