• Stars
    star
    167
  • Rank 226,635 (Top 5 %)
  • Language
    Go
  • License
    GNU Lesser Genera...
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Efficient Blockchain Powered By Proof Of Stake Voting Consensus

TomoChain

Build Status codecov Join the chat at https://gitter.im/tomochain/tomochain

About TomoChain

TomoChain is an innovative solution to the scalability problem with the Ethereum blockchain. Our mission is to be a leading force in building the Internet of Value, and its infrastructure. We are working to create an alternative, scalable financial system which is more secure, transparent, efficient, inclusive, and equitable for everyone.

TomoChain relies on a system of 150 Masternodes with a Proof of Stake Voting consensus that can support near-zero fee, and 2-second transaction confirmation times. Security, stability, and chain finality are guaranteed via novel techniques such as double validation, staking via smart-contracts, and "true" randomization processes.

Tomochain supports all EVM-compatible smart-contracts, protocols, and atomic cross-chain token transfers. New scaling techniques such as sharding, private-chain generation, and hardware integration will be continuously researched and incorporated into Tomochain's masternode architecture. This architecture will be an ideal scalable smart-contract public blockchain for decentralized apps, token issuances, and token integrations for small and big businesses.

More details can be found at our technical white paper

Read more about us on:

Building the source

Tomochain provides a client binary called tomo for both running a masternode and running a full-node. Building tomo requires both a Go (1.7+) and C compiler; install both of these.

Once the dependencies are installed, just run the below commands:

$ git clone https://github.com/tomochain/tomochain tomochain
$ cd tomochain
$ make tomo

Alternatively, you could quickly download our pre-complied binary from our github release page

Running tomo

Running a tomo masternode

Please refer to the official documentation on how to run a node if your goal is to run a masternode. The recommanded ways of running a node and applying to become a masternode are explained in detail there.

Attaching to the Tomochain test network

We published our test network 2.0 with full implementation of PoSV consensus at https://stats.testnet.tomochain.com. If you'd like to experiment with smart contract creation and DApps, you might be interested to give these a try on our Testnet.

In order to connect to one of the masternodes on the Testnet, just run the command below:

$ tomo attach https://rpc.testnet.tomochain.com

This will open the JavaScript console and let you query the blockchain directly via RPC.

Running tomo locally

Download genesis block

$GENESIS_PATH : location of genesis file you would like to put

export GENESIS_PATH=path/to/genesis.json
  • Testnet
curl -L https://raw.githubusercontent.com/tomochain/tomochain/master/genesis/testnet.json -o $GENESIS_PATH
  • Mainnet
curl -L https://raw.githubusercontent.com/tomochain/tomochain/master/genesis/mainnet.json -o $GENESIS_PATH

Create datadir

  • create a folder to store tomochain data on your machine
export DATA_DIR=/path/to/your/data/folder 
mkdir -p $DATA_DIR/tomo

Initialize the chain from genesis

tomo init $GENESIS_PATH --datadir $DATA_DIR

Initialize / Import accounts for the nodes's keystore

If you already had an existing account, import it. Otherwise, please initialize new accounts

export KEYSTORE_DIR=path/to/keystore
Initialize new accounts
tomo account new \
  --password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT] \
  --keystore $KEYSTORE_DIR
Import accounts
tomo  account import [PRIVATE_KEY_FILE_OF_YOUR_ACCOUNT] \
     --keystore $KEYSTORE_DIR \
     --password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT]
List all available accounts in keystore folder
tomo account list --datadir ./  --keystore $KEYSTORE_DIR

Start a node

Environment variables
  • $IDENTITY: the name of your node
  • $PASSWORD: the password file to unlock your account
  • $YOUR_COINBASE_ADDRESS: address of your account which generated in the previous step
  • $NETWORK_ID: the networkId. Mainnet: 88. Testnet: 89
  • $BOOTNODES: The comma separated list of bootnodes. Find them here
  • $WS_SECRET: The password to send data to the stats website. Find them here
  • $NETSTATS_HOST: The stats website to report to, regarding to your environment. Find them here
  • $NETSTATS_PORT: The port used by the stats website (usually 443)
Let's start a node
tomo  --syncmode "full" \    
    --datadir $DATA_DIR --networkid $NETWORK_ID --port 30303 \   
    --keystore $KEYSTORE_DIR --password $PASSWORD \    
    --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 8545 --rpcvhosts "*" \   
    --rpcapi "db,eth,net,web3,personal,debug" \    
    --gcmode "archive" \   
    --ws --wsaddr 0.0.0.0 --wsport 8546 --wsorigins "*" --unlock "$YOUR_COINBASE_ADDRESS" \   
    --identity $IDENTITY \  
    --mine --gasprice 2500 \  
    --bootnodes $BOOTNODES \   
    --ethstats $IDENTITY:$WS_SECRET@$NETSTATS_HOST:$NETSTATS_PORT 
    console
Some explanations on the flags
--verbosity: log level from 1 to 5. Here we're using 4 for debug messages
--datadir: path to your data directory created above.
--keystore: path to your account's keystore created above.
--identity: your full-node's name.
--password: your account's password.
--networkid: our network ID.
--tomo-testnet: required when the networkid is testnet(89).
--port: your full-node's listening port (default to 30303)
--rpc, --rpccorsdomain, --rpcaddr, --rpcport, --rpcvhosts: your full-node will accept RPC requests at 8545 TCP.
--ws, --wsaddr, --wsport, --wsorigins: your full-node will accept Websocket requests at 8546 TCP.
--mine: your full-node wants to register to be a candidate for masternode selection.
--gasprice: Minimal gas price to accept for mining a transaction.
--targetgaslimit: Target gas limit sets the artificial target gas floor for the blocks to mine (default: 4712388)
--bootnode: bootnode information to help to discover other nodes in the network
--gcmode: blockchain garbage collection mode ("full", "archive")
--synmode: blockchain sync mode ("fast", "full", or "light". More detail: https://github.com/tomochain/tomochain/blob/master/eth/downloader/modes.go#L24)           
--ethstats: send data to stats website

To see all flags usage

tomo --help

See your node on stats page

Contributing and technical discussion

Thank you for considering to try out our network and/or help out with the source code. We would love to get your help; feel free to lend a hand. Even the smallest bit of code, bug reporting, or just discussing ideas are highly appreciated.

If you would like to contribute to the tomochain source code, please refer to our Developer Guide for details on configuring development environment, managing dependencies, compiling, testing and submitting your code changes to our repo.

Please also make sure your contributions adhere to the base coding guidelines:

  • Code must adhere to official Go formatting guidelines (i.e uses gofmt).
  • Code comments must adhere to the official Go commentary guidelines.
  • Pull requests need to be based on and opened against the master branch.
  • Any code you are trying to contribute must be well-explained as an issue on our github issue page
  • Commit messages should be short but clear enough and should refer to the corresponding pre-logged issue mentioned above.

For technical discussion, feel free to join our chat at Gitter.

More Repositories

1

tomomaster

VicMaster provides a master professional level UI that brings governance power back to the users. VicMaster allows users to vote for masternodes and apply to become a candidate
Vue
63
star
2

erc20-crawler

Crawl ERC20 token holders, transactions
JavaScript
49
star
3

tomoscan

TomoScan provides a user friendly, details and perfection-oriented user interface for TomoChain block explorer. From a user perspective, TomoScan brings TomoChain’s transparency to users, because all block, transaction, finality, smart contracts, DApp and token information are read from TomoChain and shown to users
Vue
47
star
4

dex-smart-contract

JavaScript
46
star
5

tokens

Token Information
Shell
40
star
6

tomox-sdk

SDK to build a Decentralized Exchange on TomoX protocol
Go
36
star
7

tomox-sdk-ui

SDK UI to build a Decentralized Exchange on TomoX protocol
JavaScript
26
star
8

luaswap-homepage

JavaScript
22
star
9

docs

📖 TomoChain documentation
JavaScript
20
star
10

luaswap-core

Solidity
18
star
11

infrastructure

🏗 TomoChain internal infrastructure
HCL
17
star
12

bug-reports

TomoChain's Bug Report & Support
17
star
13

tomox-market-maker

Simple market maker to create liquidity for TomoX
JavaScript
16
star
14

ico-contracts

Tomocoin ICO Smart Contracts
JavaScript
14
star
15

tmn

🚀 Tomochain masternode kickstarter
Python
12
star
16

tomowallet-web-testnet

Easy way to Transfer/Receive TOMO
Vue
11
star
17

luaswap-interface

TypeScript
11
star
18

tomoissuer

"Fee by any tokens" Registration DApp
Solidity
11
star
19

tomochain-testnet

Building a node to join Tomochain Testnet
Shell
11
star
20

privacy-sc

TomoP Protocols - smart contracts
Solidity
10
star
21

mm-bot

Market Making Bot for TomoDEX
JavaScript
10
star
22

privacyjs

Javascript lib for building transaction in privacy mode - Tomochain
JavaScript
8
star
23

tomobridge

TomoBridge Web Application
Vue
8
star
24

tomoxjs

Javascript SDK for TomoX Relayer
JavaScript
8
star
25

tomorelayer

TomoX Governance DApp
JavaScript
8
star
26

gitbook-archive

8
star
27

tomochain-wp-theme

WordPress theme for tomochain.com
CSS
7
star
28

tomowallet-web

The TomoWallet web version.
JavaScript
7
star
29

crosschain-transfer-demo

Cross-Chain, Zero-Fee Transaction Demo
JavaScript
7
star
30

dex-protocol

Go
6
star
31

privacy-wasm

Binary for improving speed of Bulletproof and ringct on browser, base on tomoP's precompiled contract
Go
6
star
32

tomox-launch-kit

Start an exchange based on TomoX SDK
JavaScript
6
star
33

e2e

End-to-end test for TomoChain's products
JavaScript
5
star
34

tomochain-rosetta-gateway

TomoChain Implementation of Rosetta Blockchain Standard
Go
5
star
35

tomop

Privacy protocol implementation for tomochain
Go
5
star
36

rpc-swagger

TomoChain JSON-RPC APIs
HTML
5
star
37

create-tomochain-masternode

Set up a TomoChain masternode by running one command.
Python
5
star
38

tomox-quickstart

Shell
4
star
39

performance-test-bot

Go
4
star
40

luaswap-api

LuaSwap market data
JavaScript
4
star
41

tomox-notification

JavaScript
4
star
42

luaswap-token-list

The LuaSwap default token list
JavaScript
4
star
43

backups

💾 TomoChain backups configuration
4
star
44

tomostatus

TomoChain Status Page
Vue
4
star
45

proxy

Light-weight TomoChain RPC proxy
Go
4
star
46

luaswap-sdk

TypeScript
4
star
47

tomochain-node-healthcheck

check if tomochain node is slow
JavaScript
4
star
48

token-swap

Calculate token holder from Ethereum ERC20 and Swap to mainnet
JavaScript
4
star
49

luaswap-stats

JavaScript
4
star
50

tomo-filter-accounts-scripts

Find out all manipulated accounts on tomochain system
JavaScript
4
star
51

testcases

Extra-test for TomoChain's products
JavaScript
3
star
52

tomobridgev2

Vue
3
star
53

tomostats

JavaScript
3
star
54

coming-soon

CSS
3
star
55

relayers-info

3
star
56

tomogate

API Gateway for the TomoChain's products
Vue
3
star
57

luaswap-lite

TypeScript
3
star
58

grafana-dashboard-tmpl

3
star
59

blocktime-monitoring

JavaScript
3
star
60

tomojs

Javascript SDK for TomoChain (support TomoX, TomoZ)
JavaScript
3
star
61

luaswap-info

JavaScript
3
star
62

trc21

JavaScript
3
star
63

luaswap-subgraph

TypeScript
3
star
64

maintenance-v2

CSS
3
star
65

tomochain-wp-theme-v2

PHP
3
star
66

graph-node-tomochain

Graph Node indexes data from blockchains such as TomoChain and serves it over GraphQL
Rust
3
star
67

tgelf

Sync log file to gelf
JavaScript
3
star
68

tomoapp.github.io

Tomo Coin Landing
HTML
3
star
69

tomox-relayer-fund-monitor

To run a DEX on TomoX, it requires TOMO to pay service fee. If the fee fund runs out, DEX will stop. This helps to monitor and sends alerts to slack/telegram about DEXs which are going stop due to lack of fee fund
JavaScript
3
star
70

errorpage

CSS
2
star
71

wisepass-dapp

DApp for Wisepass
HTML
2
star
72

trc20

JavaScript
2
star
73

maintenance

🚧 Maintenance page for services' planned downtime
CSS
2
star
74

luaswap-settlement

Solidity
2
star
75

luaswap-relayer

TypeScript
2
star
76

luaswap-snapshot

Vue
2
star
77

tomox-stats

Go
2
star
78

tomodex-landing-page

HTML
2
star
79

luaswap-snapshot-hub

TypeScript
2
star
80

bridgejs

Javascript SDK for TomoBridge
JavaScript
2
star
81

logos

Logo TomoChain Products
2
star
82

privacy-docs

Documentation for tomo privacy
2
star
83

trc721

JavaScript
2
star
84

tomochain-quickstart

Shell
2
star
85

crawlers

JavaScript
2
star
86

luaswap-starter

JavaScript
2
star
87

luaswap-spaces

SCSS
2
star
88

testnet-runner-v2

Shell
2
star
89

wvic-token

Solidity
2
star
90

vrc725

Solidity
2
star
91

tomox-relayer-apis

Normalize TomoX Relayer APIs to be compatible to Coingecko, CMC requirements
JavaScript
2
star
92

dex-leaderboard

2
star
93

luaswap-turns2

HTML
2
star
94

tomochain-private-network

2
star
95

slack-auto-invite

Slack auto invite
JavaScript
2
star
96

dex-deploy

Deployment code for TomoX decentralized exchange
JavaScript
1
star
97

tomox-droplets

Ruby
1
star
98

tomochain-core-update-log

Major updates of tomochain by block
1
star
99

tomochain-local-runner

Shell
1
star
100

pm

Tomochain project management repository
1
star