Is there a way to retrieve a full list of the blockhashes of Ethereum blockchain without downloading a full copy blockchain?

(The naive approach I have in mind is to download the blockchain, use some interface to retrieve the blockhashes of the blocks based on their indices and write them into a file). Is there a better approach?



You could use something like Infura (http://infura.io) and the RPC to pull each block by blockNumber using eth_getBlockByNumber. If you want to pull all 3,600,000 (or more) blocks, it's going to take a very long time.

Even if you did install a full node and sync the chain and used the RPC directly against a local node it might take quite some time as well.

May I ask, just out of curiosity, why you want the block hashes (as opposed to say the full blocks or the list of transaction which seems more useful)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.