1
i need all block headers hash (about 500k records), i tried to get from electrum wallet files, but when i convert the file to Ascii, it doesn't have full list. please help.
1
i need all block headers hash (about 500k records), i tried to get from electrum wallet files, but when i convert the file to Ascii, it doesn't have full list. please help.
1
It seems that since v3.1.0, Electrum does not download any more the complete blockchain_headers, but only the pieces it needs to track transactions. And installing a previous version doesn't seem to work either.
So the more direct approach is probably to download the hashes from a web like https://blockchair.com/bitcoin/blocks.
It is limited to 1 million cells for free, but as you only need "Hash" column, just:
deselect all checkboxes but "Hash", and click on "Export" selecting then "csv". Open this file with your spreadsheet app.
If you need another column, repeat the step but just with it, and Export again to a (2) file.
Open the file from (2), copy the column, and paste it next to the first column in file from (1).
as the results are both ordered by time, rows coincide and you already have the desired data!
PS: As for Electrum, it is need to install a previous version below v3. With a version 2.6.4 it seems to work and produce a complete blockchain_headers file. There's a Python script to convert it to a .csv file.
thanks ,the code works. In the output i see only 0's till 500k lines. looks like the electrum file doesn't contain the whole list – Vinay M – 2019-08-06T23:39:24.580
You're rigth: It seems that since v3.1.0, Electrum does not download any more the complete blockchain_headers. I've modified the answer: you may use a previous version that downloads the complete blockchain. You need the last data? Because probably I have some from a year ago or so... – circulosmeos – 2019-08-07T16:32:02.997
Electrum blockchain_headers file is not usable any more: I've changed the answer with another approach that fits your needs. – circulosmeos – 2019-08-08T12:08:19.103
Thank you so much for helping me out . It was helpful. I have one more question - i have installed bitcoind and its downloading blocks. could you please tell me how to retrieve the balance, has,tx...etc ? – Vinay M – 2019-08-08T23:47:02.407
Sorry, I do not know bitcoind: but you can post a new question and someone else will help you! :-) – circulosmeos – 2019-08-09T06:42:46.173
What do you mean by "convert the file to ascii"? Do you just displaying its contents as text? If so, that won't work because block headers are ascii text, they are blobs of binary data. – Andrew Chow – 2019-08-02T16:02:58.783
i took the file "blockchain_headers" from electrum wallet and converted to ASCII format and opened in text editer in windows i see the latest block hashes but initial blocks data showing as 0's. – Vinay M – 2019-08-02T17:10:45.083
I don't know how to resolve your problem with the wallet files, but if you have a full node, you can get all hash block with the rpc framework – vincenzopalazzo – 2019-08-04T17:15:12.627