Skip to content

Synchronize blockchain data to message queue

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE
GPL-3.0
COPYING
LGPL-3.0
COPYING.LESSER
Notifications You must be signed in to change notification settings

jdcloud-bds/bds-etc

bds-etc

logo

Introduction

bds-etc is one of the independent modules in open source project of block chain data service (BDS) - provides full node service.

bds-etc Based on the v6.0.9 version of etclabscore/go-ethereum,bds-etc redeveloped to support sending new block data directly to message middleware service of kafka to facilitate upstream services to subscribe and consume.

Architecture

Architecture

Environmental Deployment

Install ETC

Environment Initialization

build

Install steps

  1. Compile
  make cmd/geth

or, to build the full suite of utilities:

  make build
  1. Run full node and support sending messages to Kafka
  geth --rpc --datadir <data directory> --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3 --cache 4096 --rpc-addr=<rpcaddress> --kafka.endpoint <kafka rest proxy, default "http://localhost:8082/topics/etc">

Install confluent and kafka

Install kafka

See kafka

Modify config/server.properties
  • message.max.bytes=1048576000

Install confluent

see confluent `` Unzip the confluent package and run Confluent REST Proxy

Modify /etc/kafka-rest/kafka-rest.properties
  • max.request.size = 1048576000
  • buffer.memory = 1048576000
  • send.buffer.bytes = 1048576000

Install BDS

See BDS

Database

Database we now support SQL Server, PostgreSQL, you can choose one as a data storage method.

SQL Server

Buy JCS For SQL Server

PostgreSQL

Buy JCS For PostgreSQL

Install Grafana

See Grafana Official

New funtion

  1. The new function of sending messages to Kafka is added(every time a new block is synchronized by full node, the data of the block is sent to kafka and the data structure is customized).
  2. Sendblock and sendbatchblock are newly added as RPC interfaces to trigger full node to send data for a specific block.

Source Code Change History

bds-etc

Contributing

Contributing guide

License

Apache License 2.0

Project Demonstration

Blockchain Data Service