lk-chain

module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: GPL-3.0

README

LK-Chain

License

Supporting golang implementation of the Ethereum protocol.

Building the source

Building lk-chain requires Go (version 1.9.2).
System Centos 7.
Install git lfs before, and then clone this project.
To build the full suite of utilities:

./build.sh all

or, to clean build path:

./build.sh clean

Executables

The LK-Chain project comes with several wrappers/executables found in the pack/lk-chain/bin directory.

Command Description
ethermint Ethereum protocol
tendermint Tendermint Core is Byzantine Fault Tolerant (BFT) middleware

Running LK-Chain

Going through all the possible command line flags is out of scope here (please consult our CLI Wiki page), but we've enumerated a few common parameter combos to get you up to speed quickly on how you can run your own Ethermint and Tendermint instance.

Full node on the main LK-Chain network
# go to sbin path.
cd pack/lk-chain/sbin

# init the node data in the first time.
./start.sh init DataPath

# start the node
./start.sh start DataPath

# if you want to stop the instance
./start.sh stop
Configuration

ethermint Configuration:

  • --rpcport 44000
  • --lkrpc_addr 0.0.0.0:45000

tendermint Configuration:

  • --rpc.laddr tcp://0.0.0.0:41000
Programatically interfacing LK-Chain nodes

The IPC interface is enabled by default and exposes all the APIs supported by Ethermint, whereas the HTTP and WS interfaces need to manually be enabled and only expose a subset of APIs due to security reasons. These can be turned on/off and configured as you'd expect.

You can use ethermint like geth console:

[root@localhost sbin]# ../bin/ethermint attach http://127.0.0.1:44000
Welcome to the Geth JavaScript console!

 modules: admin:1.0 eth:1.0 net:1.0 personal:1.0 rpc:1.0 web3:1.0

> eth.blockNumber
65719

or request a JSON-RPC API,like this:

// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' -H 'Content-Type:application/json' http://127.0.0.1:44000

// Result
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x0234c8a3397aab58" // 158972490234375000
}

Ethermint HTTP based JSON-RPC API options:

  • --rpc Enable the HTTP-RPC server
  • --rpcaddr HTTP-RPC server listening interface (default: "localhost")
  • --rpcport HTTP-RPC server listening port (default: 8545)
  • --rpcapi API's offered over the HTTP-RPC interface (default: "eth,net,web3")
  • --rpccorsdomain Comma separated list of domains from which to accept cross origin requests (browser enforced)
  • --ws Enable the WS-RPC server
  • --wsaddr WS-RPC server listening interface (default: "localhost")
  • --wsport WS-RPC server listening port (default: 8546)
  • --wsapi API's offered over the WS-RPC interface (default: "eth,net,web3")
  • --wsorigins Origins from which to accept websockets requests
  • --ipcdisable Disable the IPC-RPC server

Find more JSON-RPC APIs on file doc/json-rpc.md.

Directories

Path Synopsis
ethereum
go-ethereum
Package ethereum defines interfaces for interacting with Ethereum.
Package ethereum defines interfaces for interacting with Ethereum.
go-ethereum/accounts
Package accounts implements high level Ethereum account management.
Package accounts implements high level Ethereum account management.
go-ethereum/accounts/abi
Package abi implements the Ethereum ABI (Application Binary Interface).
Package abi implements the Ethereum ABI (Application Binary Interface).
go-ethereum/accounts/keystore
Package keystore implements encrypted storage of secp256k1 private keys.
Package keystore implements encrypted storage of secp256k1 private keys.
go-ethereum/accounts/usbwallet
Package usbwallet implements support for USB hardware wallets.
Package usbwallet implements support for USB hardware wallets.
go-ethereum/accounts/usbwallet/internal/trezor
Package trezor contains the wire protocol wrapper in Go.
Package trezor contains the wire protocol wrapper in Go.
go-ethereum/bmt
Package bmt provides a binary merkle tree implementation
Package bmt provides a binary merkle tree implementation
go-ethereum/cmd/bootnode
bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
go-ethereum/cmd/evm
evm executes EVM code snippets.
evm executes EVM code snippets.
go-ethereum/cmd/faucet
faucet is a Ether faucet backed by a light client.
faucet is a Ether faucet backed by a light client.
go-ethereum/cmd/geth
geth is the official command-line client for Ethereum.
geth is the official command-line client for Ethereum.
go-ethereum/cmd/internal/browser
Package browser provides utilities for interacting with users' browsers.
Package browser provides utilities for interacting with users' browsers.
go-ethereum/cmd/p2psim
p2psim provides a command-line client for a simulation HTTP API.
p2psim provides a command-line client for a simulation HTTP API.
go-ethereum/cmd/puppeth
puppeth is a command to assemble and maintain private networks.
puppeth is a command to assemble and maintain private networks.
go-ethereum/cmd/rlpdump
rlpdump is a pretty-printer for RLP data.
rlpdump is a pretty-printer for RLP data.
go-ethereum/cmd/swarm
Command bzzhash computes a swarm tree hash.
Command bzzhash computes a swarm tree hash.
go-ethereum/cmd/utils
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
go-ethereum/common
Package common contains various helper functions.
Package common contains various helper functions.
go-ethereum/common/bitutil
Package bitutil implements fast bitwise operations.
Package bitutil implements fast bitwise operations.
go-ethereum/common/compiler
Package compiler wraps the Solidity compiler executable (solc).
Package compiler wraps the Solidity compiler executable (solc).
go-ethereum/common/hexutil
Package hexutil implements hex encoding with 0x prefix.
Package hexutil implements hex encoding with 0x prefix.
go-ethereum/common/math
Package math provides integer math utilities.
Package math provides integer math utilities.
go-ethereum/common/mclock
package mclock is a wrapper for a monotonic clock source
package mclock is a wrapper for a monotonic clock source
go-ethereum/compression/rle
Package rle implements the run-length encoding used for Ethereum data.
Package rle implements the run-length encoding used for Ethereum data.
go-ethereum/consensus
Package consensus implements different Ethereum consensus engines.
Package consensus implements different Ethereum consensus engines.
go-ethereum/consensus/clique
Package clique implements the proof-of-authority consensus engine.
Package clique implements the proof-of-authority consensus engine.
go-ethereum/consensus/ethash
Package ethash implements the ethash proof-of-work consensus engine.
Package ethash implements the ethash proof-of-work consensus engine.
go-ethereum/contracts/chequebook
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
go-ethereum/contracts/release
Package release contains the node service that tracks client releases.
Package release contains the node service that tracks client releases.
go-ethereum/core
Package core implements the Ethereum consensus protocol.
Package core implements the Ethereum consensus protocol.
go-ethereum/core/asm
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
go-ethereum/core/bloombits
Package bloombits implements bloom filtering on batches of data.
Package bloombits implements bloom filtering on batches of data.
go-ethereum/core/state
Package state provides a caching layer atop the Ethereum state trie.
Package state provides a caching layer atop the Ethereum state trie.
go-ethereum/core/types
Package types contains data types related to Ethereum consensus.
Package types contains data types related to Ethereum consensus.
go-ethereum/core/vm
Package vm implements the Ethereum Virtual Machine.
Package vm implements the Ethereum Virtual Machine.
go-ethereum/core/vm/runtime
Package runtime provides a basic execution model for executing EVM code.
Package runtime provides a basic execution model for executing EVM code.
go-ethereum/crypto/bn256
Package bn256 implements a particular bilinear group at the 128-bit security level.
Package bn256 implements a particular bilinear group at the 128-bit security level.
go-ethereum/crypto/secp256k1
Package secp256k1 wraps the bitcoin secp256k1 C library.
Package secp256k1 wraps the bitcoin secp256k1 C library.
go-ethereum/crypto/sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
go-ethereum/eth
Package eth implements the Ethereum protocol.
Package eth implements the Ethereum protocol.
go-ethereum/eth/downloader
Package downloader contains the manual full chain synchronisation.
Package downloader contains the manual full chain synchronisation.
go-ethereum/eth/fetcher
Package fetcher contains the block announcement based synchronisation.
Package fetcher contains the block announcement based synchronisation.
go-ethereum/eth/filters
Package filters implements an ethereum filtering system for block, transactions and log events.
Package filters implements an ethereum filtering system for block, transactions and log events.
go-ethereum/ethclient
Package ethclient provides a client for the Ethereum RPC API.
Package ethclient provides a client for the Ethereum RPC API.
go-ethereum/ethstats
Package ethstats implements the network stats reporting service.
Package ethstats implements the network stats reporting service.
go-ethereum/event
Package event deals with subscriptions to real-time events.
Package event deals with subscriptions to real-time events.
go-ethereum/event/filter
Package filter implements event filters.
Package filter implements event filters.
go-ethereum/internal/debug
Package debug interfaces Go runtime debugging facilities.
Package debug interfaces Go runtime debugging facilities.
go-ethereum/internal/ethapi
Package ethapi implements the general Ethereum API functions.
Package ethapi implements the general Ethereum API functions.
go-ethereum/internal/guide
Package guide is a small test suite to ensure snippets in the dev guide work.
Package guide is a small test suite to ensure snippets in the dev guide work.
go-ethereum/internal/jsre
Package jsre provides execution environment for JavaScript.
Package jsre provides execution environment for JavaScript.
go-ethereum/internal/jsre/deps
Package deps contains the console JavaScript dependencies Go embedded.
Package deps contains the console JavaScript dependencies Go embedded.
go-ethereum/internal/web3ext
package web3ext contains geth specific web3.js extensions.
package web3ext contains geth specific web3.js extensions.
go-ethereum/les
Package les implements the Light Ethereum Subprotocol.
Package les implements the Light Ethereum Subprotocol.
go-ethereum/les/flowcontrol
Package flowcontrol implements a client side flow control mechanism
Package flowcontrol implements a client side flow control mechanism
go-ethereum/light
Package light implements on-demand retrieval capable state and chain objects for the Ethereum Light Client.
Package light implements on-demand retrieval capable state and chain objects for the Ethereum Light Client.
go-ethereum/log
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
go-ethereum/metrics
Package metrics provides general system and process level metrics collection.
Package metrics provides general system and process level metrics collection.
go-ethereum/miner
Package miner implements Ethereum block creation and mining.
Package miner implements Ethereum block creation and mining.
go-ethereum/mobile
Package geth contains the simplified mobile APIs to go-ethereum.
Package geth contains the simplified mobile APIs to go-ethereum.
go-ethereum/node
Package node sets up multi-protocol Ethereum nodes.
Package node sets up multi-protocol Ethereum nodes.
go-ethereum/p2p
Package p2p implements the Ethereum p2p network protocols.
Package p2p implements the Ethereum p2p network protocols.
go-ethereum/p2p/discover
Package discover implements the Node Discovery Protocol.
Package discover implements the Node Discovery Protocol.
go-ethereum/p2p/discv5
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
go-ethereum/p2p/nat
Package nat provides access to common network port mapping protocols.
Package nat provides access to common network port mapping protocols.
go-ethereum/p2p/netutil
Package netutil contains extensions to the net package.
Package netutil contains extensions to the net package.
go-ethereum/rlp
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
go-ethereum/rpc
Package rpc provides access to the exported methods of an object across a network or other I/O connection.
Package rpc provides access to the exported methods of an object across a network or other I/O connection.
go-ethereum/swarm/api/http
Show nicely (but simple) formatted HTML error pages (or respond with JSON if the appropriate `Accept` header is set)) for the http package.
Show nicely (but simple) formatted HTML error pages (or respond with JSON if the appropriate `Accept` header is set)) for the http package.
go-ethereum/trie
Package trie implements Merkle Patricia Tries.
Package trie implements Merkle Patricia Tries.
go-ethereum/whisper/whisperv2
Package whisper implements the Whisper PoC-1.
Package whisper implements the Whisper PoC-1.
go-ethereum/whisper/whisperv5
Package whisper implements the Whisper protocol (version 5).
Package whisper implements the Whisper protocol (version 5).
go-ethereum/whisper/whisperv6
Package whisper implements the Whisper protocol (version 6).
Package whisper implements the Whisper protocol (version 6).
tendermint
tendermint/benchmarks/proto
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
tendermint/lite
Package lite allows you to securely validate headers without a full node.
Package lite allows you to securely validate headers without a full node.
tendermint/lite/client
Package client defines a provider that uses a rpcclient to get information, which is used to get new headers and validators directly from a node.
Package client defines a provider that uses a rpcclient to get information, which is used to get new headers and validators directly from a node.
tendermint/lite/files
Package files defines a Provider that stores all data in the filesystem
Package files defines a Provider that stores all data in the filesystem
tendermint/p2p
Uses nacl's secret_box to encrypt a net.Conn.
Uses nacl's secret_box to encrypt a net.Conn.
tendermint/p2p/upnp
Taken from taipei-torrent.
Taken from taipei-torrent.
tendermint/rpc/client
package client provides a general purpose interface (Client) for connecting to a tendermint node, as well as higher-level functionality.
package client provides a general purpose interface (Client) for connecting to a tendermint node, as well as higher-level functionality.
tendermint/rpc/client/mock
package mock returns a Client implementation that accepts various (mock) implementations of the various methods.
package mock returns a Client implementation that accepts various (mock) implementations of the various methods.
tendermint/rpc/grpc
Package core_grpc is a generated protocol buffer package.
Package core_grpc is a generated protocol buffer package.
tendermint/rpc/lib
HTTP RPC server supporting calls via uri params, jsonrpc, and jsonrpc over websockets
HTTP RPC server supporting calls via uri params, jsonrpc, and jsonrpc over websockets
tendermint/rpc/lib/server
Commons for HTTP handling
Commons for HTTP handling
tendermint/scripts/wal2json
wal2json converts binary WAL file to JSON.
wal2json converts binary WAL file to JSON.
third_part
abi
Package abi implements the Ethereum ABI (Application Binary Interface).
Package abi implements the Ethereum ABI (Application Binary Interface).
lkcrypto/go-crypto
go-crypto is a customized/convenience cryptography package for supporting Tendermint.
go-crypto is a customized/convenience cryptography package for supporting Tendermint.
lkcrypto/go-crypto/keys/cryptostore
package cryptostore maintains everything needed for doing public-key signing and key management in software, based on the go-crypto library from tendermint.
package cryptostore maintains everything needed for doing public-key signing and key management in software, based on the go-crypto library from tendermint.
lkcrypto/go-crypto/keys/storage/filestorage
package filestorage provides a secure on-disk storage of private keys and metadata.
package filestorage provides a secure on-disk storage of private keys and metadata.
lkcrypto/go-crypto/keys/storage/memstorage
package memstorage provides a simple in-memory key store designed for use in test cases, particularly to isolate them from the filesystem, concurrency, and cleanup issues.
package memstorage provides a simple in-memory key store designed for use in test cases, particularly to isolate them from the filesystem, concurrency, and cleanup issues.

Jump to

Keyboard shortcuts

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