{"repo":"blkchain/blkchain","free":true,"listed":false,"github":"https://github.com/blkchain/blkchain","clone":"git clone https://github.com/blkchain/blkchain.git","description":"Fast import of the blockchain into PostgreSQL.","language":"Go","stars":84,"topics":["bitcoin","blockchain","postgresql","golang"],"license":null,"category":"blockchain-web3","readme_excerpt":"Fast Bitcoin Blockchain Postgres Import Introduction This is Go code aimed at importing the blockchain into Postgres as fast as possible. Licensed under the Apache License, Version 2.0 This code can import the entire blockchain from a Bitcoin Core node into a PostgreSQL database in 21 hours on fairly basic hardware. Once the data is imported, the tool can append new blocks as they appear on the network by connecting to a Core node. You can then run this primitive (but completely private) Block Explorer against this database. This project was started mostly for fun and learning and to find out whether putting the blockchain into PostgreSQL is (1) possible and (2) useful. We think \"yes\" on both, but you can draw your own conclusions. Quick Overview The source of the data is the Bitcoin Core store. You need a Core instance to download the entire blockchain, then the cmd/import tool will be able to read the data directly (not via RPC) by accessing the LevelDb and the blocks files as well as the UTXO set. (The Core program cannot run while this happens, but this is only necessary during the initial bulk import of the data). You should be able to build go build cmd/import/import.go then run it with (Core should not be running): This will read all blocks and upload them to Postgres. The block descriptors are first read from leveldb block index, which contains file names and offsets to actual block data. Using the block index lets us read blocks in order which is essential for the co","default_branch":null,"files":null,"tree":[],"storefront":"/r/blkchain","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/blkchain/blkchain/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}