项目作者: blockchain-etl

项目描述 :
ETL for moving Ethereum data to Neo4j database
高级语言: Shell
项目地址: git://github.com/blockchain-etl/ethereum-etl-neo4j.git
创建时间: 2020-03-23T10:43:38Z
项目社区:https://github.com/blockchain-etl/ethereum-etl-neo4j

开源协议:MIT License

下载


EthereumETL for Neo4j

ETL for moving Ethereum data to a Neo4j database.

  1. Create a new VM using the official Neo4j image:
  1. gcloud compute instances create ethereum-neo4j-instance-0 \
  2. --image neo4j-enterprise-1-3-5-7-apoc \
  3. --image-project launcher-public \
  4. --machine-type n1-standard-2 \
  5. --boot-disk-size 2000GB \
  6. --tags neo4j \
  7. --zone us-central1-a \
  8. --boot-disk-type pd-ssd
  9. # Create a firewall rule:
  10. gcloud compute firewall-rules create allow-neo4j-bolt-https \
  11. --allow tcp:7473,tcp:7687 --source-ranges 0.0.0.0/0 --target-tags neo4j
  1. ssh to the instance and clone https://github.com/blockchain-etl/ethereum-etl-neo4j:
  1. gcloud auth login
  2. git clone https://github.com/blockchain-etl/ethereum-etl-neo4j
  3. cd ethereum-etl-neo4j
  1. Run the import (may take up to 24 hours). If you change the END_DATE make sure to also update the disk size
    for the instance:
  1. export PROJECT=<your-project>
  2. export END_DATE=2020-03-24
  3. nohup bash batch-import.sh &
  4. tail -f nohup.out
  5. # Monitor the logs
  1. Create the indexes:
  1. nohup bash setup-indexes.sh &
  2. sudo systemctl restart neo4j
  1. Open the Neo4j console at https://:7473/browser/ and run some queries:
  1. MATCH (address: Address)
  2. RETURN address
  3. LIMIT 10
  1. MATCH (a1:Address { address_string: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045' })-[r]-(a2)
  2. RETURN *

Notes: