Title: Big List of bitcoin block hashes Post by: blksith0 on April 28, 2017, 11:07:51 PM Every website only shows me the hashes one-by-one where you click links for Previous/Next Hash.
I don't need every hash, just a decently sized sample set. Does anyone know where I can find a list the block hashes? example: Code: 000000000000000000533392a66404f35b1bdabc2419b6d5ba3b06ed99cb92ff Title: Re: Big List of bitcoin block hashes Post by: pooya87 on April 29, 2017, 04:12:38 AM all those websites that you see have an API page, take a look at their documentation for something called "block hash" and either program something to fetch the data or open the link simply in your browser and use the data manually.
an example from blockchain.info: Blocks for one day: https://blockchain.info/blocks/$time_in_milliseconds?format=json https://blockchain.info/blocks/1493420560000?format=json { "blocks" : [ { "height" : 463810, "hash" : "00000000000000000060762edd15aac13cf9804ab5db39ab7195da2b32fa43d4", "time" : 1493337665, "main_chain" : true }, { "height" : 463811, "hash" : "000000000000000000aaccaa47fc72fddf447a70630bda4ed581070a09adbee7", "time" : 1493338328, "main_chain" : true }, ....snipped... Title: Re: Big List of bitcoin block hashes Post by: blksith0 on April 29, 2017, 04:34:15 AM Niceeeeeeeeeeeeeeeeeeeee.
Title: Re: Big List of bitcoin block hashes Post by: blksith0 on April 30, 2017, 12:53:21 AM Can someone help with the API?
Quote Single Block https://blockchain.info/rawblock/$block_hash https://blockchain.info/block-index/$block_index?format=json Can someone give me an example of using that on a hash? Why does this example not work? https://blockchain.info/rawblock/$000000000000000002165cb091c1cfe27e413cd4cad7d793cde5d5eaff0abbaa Title: Re: Big List of bitcoin block hashes Post by: pooya87 on April 30, 2017, 03:07:16 AM Can someone help with the API? Quote Single Block https://blockchain.info/rawblock/$block_hash https://blockchain.info/block-index/$block_index?format=json Can someone give me an example of using that on a hash? Why does this example not work? https://blockchain.info/rawblock/$000000000000000002165cb091c1cfe27e413cd4cad7d793cde5d5eaff0abbaa because you have a $ before your hash :) https://blockchain.info/rawblock/000000000000000002165cb091c1cfe27e413cd4cad7d793cde5d5eaff0abbaa it is a weird programming language thing, i think it is PHP, $block_hash means block_hash is a variable needs to be replaced. Title: Re: Big List of bitcoin block hashes Post by: Sadlife on April 30, 2017, 03:12:56 AM Quote { "blocks" : [ { "height" : 463810, "hash" : "00000000000000000060762edd15aac13cf9804ab5db39ab7195da2b32fa43d4", "time" : 1493337665, "main_chain" : true }, { "height" : 463811, "hash" : "000000000000000000aaccaa47fc72fddf447a70630bda4ed581070a09adbee7", "time" : 1493338328, "main_chain" : true }, ....snipped... [/tt] Noob question is this the hash code found when a block is solve? What happens if i made an custom block that has fake transactions in it and put this code? Would it result some malleability? Title: Re: Big List of bitcoin block hashes Post by: pooya87 on April 30, 2017, 03:23:08 AM Noob question is this the hash code found when a block is solve? What happens if i made an custom block that has fake transactions in it and put this code? Would it result some malleability? what you quoted is not a code, it is a JSON listing block hashes. and yes these hashes are found when a block is solved. no you can't just mine fake transactions, because if you do then you have to send that block to others, and others don't just take the block of your hand and say ok, thanks. they will verify it to see if it is legit! malleability is a different thing. (this is a simple answer/explanation because i know if i go into details i will embarrass myself since i am not exactly sure about half of it) you can read these though: www.coindesk.com/information/how-bitcoin-mining-works/ https://en.bitcoin.it/wiki/Mining https://en.bitcoin.it/wiki/Proof_of_work Quote Individual blocks must contain a proof of work to be considered valid. This proof of work is verified by other Bitcoin nodes each time they receive a block. Bitcoin uses the hashcash proof-of-work function. Title: Re: Big List of bitcoin block hashes Post by: Sadlife on April 30, 2017, 03:48:33 AM Quote what you quoted is not a code, it is a JSON listing block hashes. and yes these hashes are found when a block is solved. Ah i see, so basically they have to broadcast the founded block to other miners through nodes, there is really more into this crypto currency than meets the eye.no you can't just mine fake transactions, because if you do then you have to send that block to others, and others don't just take the block of your hand and say ok, thanks. they will verify it to see if it is legit! malleability is a different thing. (this is a simple answer/explanation because i know if i go into details i will embarrass myself since i am not exactly sure about half of it) you can read these though: www.coindesk.com/information/how-bitcoin-mining-works/ https://en.bitcoin.it/wiki/Mining https://en.bitcoin.it/wiki/Proof_of_work Individual blocks must contain a proof of work to be considered valid. This proof of work is verified by other Bitcoin nodes each time they receive a block. Bitcoin uses the hashcash proof-of-work function. Thanks for the reference by the way. Title: Re: Big List of bitcoin block hashes Post by: pooya87 on April 30, 2017, 04:04:12 AM Ah i see, so basically they have to broadcast the founded block to other miners through nodes, there is really more into this crypto currency than meets the eye. Thanks for the reference by the way. not just other miners, to the whole bitcoin network which means all the bitcoin nodes. each full node has the whole blockchain and can verify everything. this one is a more detailed answer about blocks that can help you see how things are put together: https://bitcoin.stackexchange.com/a/35700 https://en.bitcoin.it/wiki/Full_node https://bitcoin.org/en/bitcoin-core/features/validation https://bitcoin.stackexchange.com/questions/9248/how-do-nodes-verify-bitcoin-transactions Title: Re: Big List of bitcoin block hashes Post by: Jolly Jocker on April 02, 2022, 10:38:44 AM Is anyone else interested in a list of block hashes (BTC)?
I can make a list available in the next few days, I wrote a little tool to read in.. Code: 0000000004db6bc621f87b60eaf55d0069e415c431bf2c5a3e566b5e6f318998 CNT: 66154 it takes a while.. with more than 730030 entries XD Title: Re: Big List of bitcoin block hashes Post by: pooya87 on April 02, 2022, 10:59:51 AM it takes a while.. with more than 730030 entries XD Why does it take time?There are so many ways to get it in a very short time. For example you could find a block explorer with an API that lets you search and fetch hashes with block height then get them from 0 to 730,030. Or you could download and run a SPV client like Electrum, let it sync for a minute to download the blockchain_headers file which is currently about 55 MB (it also verifies headers) then just read that data file 80 bytes at a time and hash that to get each block hash within seconds. So basically the time it takes for you to construct such a list should be roughly the same as the time it takes you download 55 MB from the internet. Title: Re: Big List of bitcoin block hashes Post by: Jolly Jocker on April 02, 2022, 11:11:29 AM it takes a while.. with more than 730030 entries XD Why does it take time?There are so many ways to get it in a very short time. For example you could find a block explorer with an API that lets you search and fetch hashes with block height then get them from 0 to 730,030. Or you could download and run a SPV client like Electrum, let it sync for a minute to download the blockchain_headers file which is currently about 55 MB (it also verifies headers) then just read that data file 80 bytes at a time and hash that to get each block hash within seconds. So basically the time it takes for you to construct such a list should be roughly the same as the time it takes you download 55 MB from the internet. the tool works in the background, doesn't need any computing power, creates a list for me from 0 - xxxxxx .. so everything is fine... i like to program and that's why i created the tool... Thanks anyway!! :) |