This is a continuation of my personal work from here. This project will parse the entire blockchain into a graph database, in this case dgraph.
- btcd
- dgraph
- Go 1.6 or above
git clone https://github.com/btcsuite/btcd $GOPATH/src/github.com/btcsuite/btcd
cd $GOPATH/src/github.com/btcsuite/btcd
git pull && glide install
go install . ./cmd/...
glide install
go build
./reckoner parse > triples
wc -l triples
tail triples
gzip triples
cayley init -db bolt
cayley load --quads ./triples.gz -db bolt -format nquad -ignoremissing -ignoredup
# Pull blocks 0 to 1000 from the BTCD daemon
$ btcer parse -s 0 -e 1000 | gzip > blocktriples
# Assign UIDs to subjects
$ dgraphassigner --rdfgzips blocktriples.gzip --uids ~/dgraph/uids/
# Load into dgraph
$ dgraphloader --rdfgzips blocktriples.gzip --uids ~/dgraph/uasync.final/ --postings ~/dgraph/p0/
# Run dgraph
$ dgraph --mutations ~/dgraph/m --postings ~/dgraph/p --uids ~/dgraph/u
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D