Giter Club home page Giter Club logo

ckb-explorer's Introduction

About CKB

CKB is the layer 1 of Nervos Network, a public/permissionless blockchain. CKB uses Proof of Work and improved Nakamoto concensus to achieve maximized performance on average hardware and internet condition, without sacrificing decentralization and security which are the core value of blockchain.

CKB Explorer

CKB Explorer is a Nervos CKB blockchain explorer built with React and Ruby on Rails.

It supports searching block, transaction, address and includes two parts: frontend and backend server (this project).

CKB Explorer Server

License TravisCI Codecov Discord

A blockchain explorer service of Nervos CKB.

Prerequisites

Initial Project

$ cd ckb-explorer/
$ cp .env.example .env # (in this config file, please modify the items according to your local environment)
$ touch .env.local # (overwrite `.env` config if you need in `.env.local`, such as DB_USERNAME, DB_PASSWORD...)
$ touch config/settings.local.yml # (overwrite `config/settings.yml` to config available hosts)
$ bin/setup

Create & Setup database

bundle exec rake db:create                     # (create db for development and test)
bundle exec rake db:schema:load                # (run migration for development db)
bundle exec rake db:schema:load RAILS_ENV=test # (run migration for test db)

Running Test

$ bundle exec rails test

Run Project

$ bundle exec rails s

# start sync process
$ ruby lib/ckb_block_node_processor.rb

Deploy

We suggest using Docker Compose to deploy the CKB Explorer Service.

Build Docker Image

$ docker compose build .

Start Services

The service is composed of 4 processes:

  • web: for serving the API
  • worker: for processing background job
  • blocksyncer: for synchronizing the data from CKB chain
  • scheduler: for scheduling some timer tasks

You can see these processes in the Procfile file. The web & worker process can be scaled horizontally. And the blocksyncer and scheduler process are both singleton, so you can only start one instance for each process.

$ docker compose up -d

How to Contribute

CKB Explorer Server is an open source project and your contribution is very much appreciated. Please check out CONTRIBUTING.md for guidelines about how to proceed.

API Documentation

API reference has been migrated to CKB Explorer on ReadMe

Note: Obsolete API documentation.

License

CKB Explorer is released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/licenses/MIT.

ckb-explorer's People

Contributors

shaojunda avatar duanyytop avatar keith-cy avatar zmcnotafraid avatar rabbitz avatar shiningray avatar iamyates avatar classicalliu avatar wuyuyue avatar dependabot[bot] avatar github-actions[bot] avatar quake avatar mine77 avatar ashchan avatar marshluca avatar keroro520 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.