Last active
February 24, 2017 21:46
-
-
Save parkan/5b99978279b5c58ca0fdff0c18ed6d88 to your computer and use it in GitHub Desktop.
Creating a privatenet with geth-1.5.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CCCoinGenesis.json: | |
{ | |
"nonce": "0x00000000000000cc", | |
"timestamp": "0x0", | |
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"extraData": "0x0", | |
"gasLimit": "0x8000000", | |
"difficulty": "0x400", | |
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"coinbase": "0x3333333333333333333333333333333333333333" | |
} | |
$ geth --identity "CCCoinNet" --maxpeers 0 --rpc --datadir ~/mine/cccoin-deploy/data --dev --rpcport 8645 --verbosity 6 --nodiscover init CCCoinNetGenesis.json | |
$ geth --identity "CCCoinNet" --maxpeers 0 --rpc --datadir ~/mine/cccoin-deploy/data --dev --rpcport 8645 --verbosity 6 --nodiscover --rpcapi "db,eth,net,web3,personal" | |
$ geth attach ~/mine/cccoin-deploy/data/geth.ipc | |
> personal.newAccount("") | |
"0xwhatever" | |
edit CCCoinGenesis.json: | |
{ | |
"nonce": "0x00000000000000cc", | |
"timestamp": "0x0", | |
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"extraData": "0x0", | |
"gasLimit": "0x8000000", | |
"difficulty": "0x400", | |
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"coinbase": "0x3333333333333333333333333333333333333333" | |
"alloc": { | |
"0xwhatever": { "balance": "20000000000000000000" } | |
} | |
} | |
$ geth --identity "CCCoinNet" --maxpeers 0 --rpc --datadir ~/mine/cccoin-deploy/data --dev --rpcport 8645 --verbosity 6 --nodiscover init CCCoinNetGenesis.json | |
$ geth --identity "CCCoinNet" --maxpeers 0 --rpc --datadir ~/mine/cccoin-deploy/data --dev --rpcport 8645 --verbosity 6 --nodiscover --rpcapi "db,eth,net,web3,personal" --unlock "0xwhatever" // then hit Enter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment