bhchain

module
v0.0.0-...-25b3476 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2021 License: Apache-2.0

README

Bhchain

This is the repo of the Bhex Chain's main program. Everything starts from this repo. You are in the right place if you want to run the validator/settlement, learn how the chain works or contribute codes.

Bhex Chain is powered by bluehelix, the next-generation decentralized custody and clearing technology.

GitHub GitHub go.mod Go version LoC

Introduction of Code's Dependencies

Although the code has been design to one command to run, but it do rely others repo:

  • bhchain (This Repo) : where compile the bhcd and bhcli, which are the main program of this chain and the cli to interactive with its RPC. This Repo forks from Cosmos SDK.
  • chainnode : it is a library that imported by both Bhchain and Bhsettle. This library contains the logic the interaction with others chain(btc,doge,heco and etc.)
  • tendermint: tendermint forks from offical repo. Just use as it.
  • settle: this will compile the bhsettle program, which deployed in the core node., that play a role in the multi parity signature process. It utilised the P2P network underlaid by tendermint and depends the dsign library on cryptographic algorithm.
  • dsign: it is a library that provide multi parties signature generation function both for ed25519 curve and secp256k1 curve.
  • ed25519: it is a library forked from the golang internal, exposed some internal functions for design.

How-to run your own BHEX Chain Full node

1. Building

git clone https://github.com/bluehelix-chain/bhchain
cd bhchain

#build bhcd for running node
go build ./cmd/bhcd

#build bhcli for cli tool
go build ./cmd./bhcli

2. Configure Genesis.json

Hit following command to generate config and your tendermint private key set.

./bhcd init

Fetch config from https://github.com/bluehelix-chain/build/blob/master/mainnet/chainconfig/config/

Replace three files app.toml, config.toml and genesis.json of your local home directory at ~/.bhexchain/config/

3. Run the full node

Use following command to start fetch block from other blockchain node.

./bhcd start

How-to protect your node not be hacked

  1. Backup your config and data regularly
  2. Do not expose any port to the public network except p2p port (default 26656)
  3. If your are running settle node, please make sure you backed up All of your private data regularly. (suggest backup per hrs, and keep at least 5 days' backup)
  4. Make sure all of your ssh login will be audited, and the management privilege should be distributed very carefully.
1. Home Page

https://www.bhexchain.com

2. Quick Start

https://docs.bhexchain.com/guide/quick-start.html

3. RUN&CONFIG

https://docs.bhexchain.com/guide/node.html#id7

4. Documentation

ENGLISH https://docs.bhexchain.com/en 中文 https://docs.bhexchain.com

5. Dex

https://hdex.bhexchain.com/swap

6. Wallet

android & iOS https://wallet.bhexchain.com

7.Chain Explorer

https://explorer.bhexchain.com/index

Directories

Path Synopsis
Package base58 provides an API for working with modified base58 and Base58Check encodings.
Package base58 provides an API for working with modified base58 and Base58Check encodings.
Package baseapp contains data structures that provide basic data storage functionality and act as a bridge between the ABCI interface and the SDK abstractions.
Package baseapp contains data structures that provide basic data storage functionality and act as a bridge between the ABCI interface and the SDK abstractions.
Package bhexapp implements a full fledged Cosmos SDK application used for executing simulation test suites.
Package bhexapp implements a full fledged Cosmos SDK application used for executing simulation test suites.
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/client/context ALIASGEN: github.com/bluehelix-chain/bhchain/client/flags ALIASGEN: github.com/bluehelix-chain/bhchain/client/keys ALIASGEN: github.com/bluehelix-chain/bhchain/client/lcd ALIASGEN: github.com/bluehelix-chain/bhchain/client/rest ALIASGEN: github.com/bluehelix-chain/bhchain/client/rpc ALIASGEN: github.com/bluehelix-chain/bhchain/client/tx ALIASGEN: github.com/bluehelix-chain/bhchain/client/utils ALIASGEN: github.com/bluehelix-chain/bhchain/client/input
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/client/context ALIASGEN: github.com/bluehelix-chain/bhchain/client/flags ALIASGEN: github.com/bluehelix-chain/bhchain/client/keys ALIASGEN: github.com/bluehelix-chain/bhchain/client/lcd ALIASGEN: github.com/bluehelix-chain/bhchain/client/rest ALIASGEN: github.com/bluehelix-chain/bhchain/client/rpc ALIASGEN: github.com/bluehelix-chain/bhchain/client/tx ALIASGEN: github.com/bluehelix-chain/bhchain/client/utils ALIASGEN: github.com/bluehelix-chain/bhchain/client/input
lcd
rpc
cmd
keys/hd
Package hd provides basic functionality Hierarchical Deterministic Wallets.
Package hd provides basic functionality Hierarchical Deterministic Wallets.
mock
nolint
nolint
services
p2p/event
Package event deals with subscriptions to real-time events.
Package event deals with subscriptions to real-time events.
p2p/mclock
Package mclock is a wrapper for a monotonic clock source
Package mclock is a wrapper for a monotonic clock source
module
Package module contains application module patterns and associated "manager" functionality.
Package module contains application module patterns and associated "manager" functionality.
rest
Package rest provides HTTP types and primitives for REST requests validation and responses handling.
Package rest provides HTTP types and primitives for REST requests validation and responses handling.
Package version is a convenience utility that provides SDK consumers with a ready-to-use version command that produces apps versioning information based on flags passed at compile time.
Package version is a convenience utility that provides SDK consumers with a ready-to-use version command that produces apps versioning information based on flags passed at compile time.
x
crisis
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/crisis/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/crisis/types
nolint
custodianunit
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/auth/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/auth/types
nolint
custodianunit/types
nolint noalias
nolint noalias
distribution
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/distribution/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/distribution/types ALIASGEN: github.com/bluehelix-chain/bhchain/x/distribution/client
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/distribution/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/distribution/types ALIASGEN: github.com/bluehelix-chain/bhchain/x/distribution/client
nolint
distribution/types
nolint nolint
nolint nolint
nolint
genaccounts
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/genaccounts/internal/types Package genaccounts contains specialized functionality for initializing accounts from genesis including: - genesis CU validation, - initchain processing of genesis accounts, - export processing (to genesis) of accounts, - server command for adding accounts to the genesis file.
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/genaccounts/internal/types Package genaccounts contains specialized functionality for initializing accounts from genesis including: - genesis CU validation, - initchain processing of genesis accounts, - export processing (to genesis) of accounts, - server command for adding accounts to the genesis file.
genutil
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/genutil/types Package genutil contains a variety of genesis utility functionality for usage within a blockchain application.
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/genutil/types Package genutil contains a variety of genesis utility functionality for usage within a blockchain application.
gov
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/gov/types nolint:deadcode unused
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/gov/types nolint:deadcode unused
gov/types
nolint
nolint
mint
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/mint/internal/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/mint/internal/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/mint/internal/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/mint/internal/types
mint/internal/keeper
nolint:deadcode unused
nolint:deadcode unused
mock
Package mock provides utility methods to ease writing tests.
Package mock provides utility methods to ease writing tests.
params
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/params/subspace ALIASGEN: github.com/bluehelix-chain/bhchain/x/params/types nolint: deadcode unused
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/params/subspace ALIASGEN: github.com/bluehelix-chain/bhchain/x/params/types nolint: deadcode unused
simulation
Package simulation implements a simulation framework for any state machine built on the SDK which utilizes custodianunit.
Package simulation implements a simulation framework for any state machine built on the SDK which utilizes custodianunit.
slashing
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/slashing/types nolint nolint:deadcode unused
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/slashing/types nolint nolint:deadcode unused
nolint
staking
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/staking/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/staking/types ALIASGEN: github.com/bluehelix-chain/bhchain/x/staking/exported
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/staking/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/staking/types ALIASGEN: github.com/bluehelix-chain/bhchain/x/staking/exported
staking/types
nolint
nolint
supply
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/supply/internal/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/supply/internal/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/supply/internal/keeper ALIASGEN: github.com/bluehelix-chain/bhchain/x/supply/internal/types
transfer
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/bank/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/bluehelix-chain/bhchain/x/bank/types

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL