Giter Site home page Giter Site logo

pev's Introduction

PEC

Private Ethereum Chain

Create a private Ethereum chain

Create the Genesis block: Save a file called myGenesis.json with below content:

{ "nonce": "0x0000000000000042", "timestamp": "0x0", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x0", "gasLimit": "0x8000000", "difficulty": "0x400", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x3333333333333333333333333333333333333333", "alloc": { } }

Use below command to init a private chain geth --identity "yiduo" --rpc --rpcport "8000" --rpccorsdomain "*" --datadir "C:\chains\VPSChain" --port "30303" --nodiscover --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3" --autodag --networkid 100 init "./myGenesis.json"

use below command to start the private chain: geth --datadir "/Users/daisy/mychains/dev" --identity "yiduo" --rpc --rpcapi "db,eth,net,web3,personal,miner" --rpccorsdomain "*" --networkid 100 console

Below is the explain for the parameters: --nodiscover other people cannot find your private chain --maxpeers n the n can be 0,1,2… to set the peers number that can connect to your private --rpc enable the RPC interface on your node. --rpcapi “db,eth,net,web3” set what API that are allowed to be accessed over RPC --rpcport “8080” set the geth port --rpccorsdomain “*” this dictates what URLs can connect to your node in order to perform PRC client tasks. --datadir “/workspace” set the data directory that your private chain data will be stored in. --port “30303” set the “network listening port”, which you will use to connect with other peers manually

--identity “yourId” set up an identity for your node

pev's People

Contributors

jaler-wang avatar

Watchers

 avatar  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.