Giter Site home page Giter Site logo

thaifi's Introduction

ThaiChain

ThaiFi is a blockchain service that allows developers to build their own DeFi using smart contract. ThaiFi also compatible with the Ethereum Virtual Machine (EVM), which means it’s capable of running dapps ported over from Ethereum.

How to Run A Fullnode on ThaiFi

Fullnodes Functions

  • Stores the full blockchain history on disk and can answer the data request from the network.
  • Receives and validates the new blocks and transactions.
  • Verifies the states of every accounts.

Minimum Requirements

The hardware must meet certain requirements to run a full node.

  • VPS running recent versions of Mac OS X or Linux.
  • 500 GB of free disk space
  • 4 cores of CPU and 8 gigabytes of memory (RAM).
  • A broadband Internet connection with upload/download speeds of at least 1 megabyte per second

Settings

Sync Mode

Fast Sync

The default sync mode. Synchronizes a full node doing a fast synchronization by downloading the entire state database, requesting the headers first, and filling in block bodies and receipts afterward. Once the fast sync reaches the best block of the Ethereum network, it switches to full sync mode.

Full Sync

Synchronizes a full node starting at genesis, verifying all blocks and executing all transactions. This mode is a bit slower than the fast sync mode but comes with increased security.

Steps to Run a ThaiFi Fullnode

$ git clone https://github.com/ThaiFi/thaifi.git
# Enter the folder thaifi was cloned into
cd thaifi
# Write genesis state locally
$ docker run -it --rm  -v $PWD:/tfi -w /tfi ethereum/client-go --datadir /tfi/node init genesis.json
# Start your fullnode
$ docker run -it --restart=always  -p 30333:30333 --name tfi-node -v $PWD:/tfi -w /tfi ethereum/client-go \ 
--datadir /tfi/node --nousb --config ./config.toml  -cache 4096 --port 30333
 

Start your fullnode or a validator node

$ git clone https://github.com/ThaiFi/thaifi.git
## Enter the folder thaifi was cloned into
cd thaifi
## Write genesis state locally
$ docker run -it --rm  -v $PWD:/tfi -w /tfi ethereum/client-go --datadir /tfi/node init genesis.json
## generate  password
$ echo "[Your Password]" > password.txt
## create new account
$ docker run -it --rm -v $PWD:/tfi -w /tfi ethereum/client-go --datadir /tfi/node --password password.txt account new
## Start your fullnode
$ docker run -itd --restart=always -p 30003:30333 --name tfi-node -v $PWD:/tfi -w /tfi ethereum/client-go \
--datadir /tfi/node --networkid 17 -cache 4096 --port 30333 --mine --unlock [account] --password password.txt \
--syncmode=full --gcmode=archive --nousb

thaifi's People

Contributors

dome avatar

Stargazers

 avatar

Watchers

 avatar  avatar

thaifi's Issues

Block sealing failed

I cannot mine. Can you guide me with this?

$ git clone https://github.com/ThaiFi/thaifi.git
## Enter the folder thaifi was cloned into
cd thaifi
## Write genesis state locally
$ docker run -it --rm  -v $PWD:/tfi -w /tfi ethereum/client-go --datadir /tfi/node init genesis.json
## generate  password
$ echo "_____" > password.txt
## create new account
$ docker run -it --rm -v $PWD:/tfi -w /tfi ethereum/client-go --datadir /tfi/node --password password.txt account new

Your new key was generated

Public address of the key:   0x511d216B0bFD362f6287f4D86f8204Cc2177B261
...
## Start your fullnode
$ docker run -itd --restart=always -p 30003:30333 --name tfi-node -v $PWD:/tfi -w /tfi ethereum/client-go \
--datadir /tfi/node --networkid 17 -cache 4096 --port 30333 --mine --unlock [account] --password password.txt \
--syncmode=full --gcmode=archive --nousb

INFO [01-08|05:15:01.619] Starting peer-to-peer node instance=Geth/v1.9.26-unstable-165f53fc-20210107/linux-amd64/go1.15.6

ERROR[01-08|05:15:01.746] Failed to enumerate USB devices hub=ledger vendor=11415 failcount=3 err="failed to initialize libusb: libusb: unknown error [code -99]"

ERROR[01-08|05:15:01.746] Failed to enumerate USB devices hub=trezor vendor=4617 failcount=3 err="failed to initialize libusb: libusb: unknown error [code -99]"

ERROR[01-08|05:15:01.746] Failed to enumerate USB devices hub=trezor vendor=21324 failcount=3 err="failed to initialize libusb: libusb: unknown error [code -99]"

INFO [01-08|05:15:02.279] New local node record seq=5 id=10777a46171d0844 ip=127.0.0.1 udp=30333 tcp=30333

INFO [01-08|05:15:02.280] Started P2P networking self=enode://96d44d2700f3c1d576d21ebc3eacf2650255bbbf0ae991ed4a45ca0a6b873c224c2d8bd92e97cb1e76ef8277e0ec8fcb7a25dc96fb81a21fb7da1b9a4983fe8f@127.0.0.1:30333

INFO [01-08|05:15:02.283] IPC endpoint opened url=/tfi/node/geth.ipc

INFO [01-08|05:15:02.935] Unlocked account address=0x511d216B0bFD362f6287f4D86f8204Cc2177B261

INFO [01-08|05:15:02.936] Transaction pool price threshold updated price=1000000000

INFO [01-08|05:15:02.936] Transaction pool price threshold updated price=1000000000

INFO [01-08|05:15:02.936] Etherbase automatically configured address=0x511d216B0bFD362f6287f4D86f8204Cc2177B261

INFO [01-08|05:15:02.936] Commit new mining work number=8390 sealhash="bb9789…c86b56" uncles=0 txs=0 gas=0 fees=0 elapsed="93.8µs"

WARN [01-08|05:15:02.936] Block sealing failed err="unauthorized signer

Thank you

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.