--datadir
flag
classic
by accident
geth --classic --datadir /multi-geth/ --networkid 15468 init /multi-geth/CustomGenesis.json
INFO [06-26|21:00:37.970] Maximum peer count ETH=50 LES=0 total=50
INFO [06-26|21:00:37.970] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"
ERROR[06-26|21:00:37.971] Failed to enumerate USB devices hub=ledger vendor=11415 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:37.971] Failed to enumerate USB devices hub=trezor vendor=21324 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:37.971] Failed to enumerate USB devices hub=trezor vendor=4617 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:37.971] Failed to enumerate USB devices hub=ledger vendor=11415 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:37.971] Failed to enumerate USB devices hub=trezor vendor=21324 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:37.971] Failed to enumerate USB devices hub=trezor vendor=4617 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
INFO [06-26|21:00:37.987] Allocated cache and file handles database=/multi-geth/geth/chaindata cache=16.00MiB handles=16
INFO [06-26|21:00:37.994] Writing custom genesis block
INFO [06-26|21:00:37.994] Persisted trie from memory database nodes=1 size=149.00B time=61.443µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [06-26|21:00:37.995] Successfully wrote genesis state database=chaindata hash=384132…99d573
INFO [06-26|21:00:37.995] Allocated cache and file handles database=/multi-geth/geth/lightchaindata cache=16.00MiB handles=16
INFO [06-26|21:00:38.003] Writing custom genesis block
INFO [06-26|21:00:38.003] Persisted trie from memory database nodes=1 size=149.00B time=72.686µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [06-26|21:00:38.004] Successfully wrote genesis state database=lightchaindata hash=384132…99d573
geth --classic --datadir /multi-geth/ --networkid 15468
INFO [06-26|21:00:45.106] Maximum peer count ETH=50 LES=0 total=50
INFO [06-26|21:00:45.106] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"
ERROR[06-26|21:00:45.106] Failed to enumerate USB devices hub=ledger vendor=11415 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:45.106] Failed to enumerate USB devices hub=trezor vendor=21324 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:45.106] Failed to enumerate USB devices hub=trezor vendor=4617 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:45.106] Failed to enumerate USB devices hub=ledger vendor=11415 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:45.106] Failed to enumerate USB devices hub=trezor vendor=21324 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-26|21:00:45.106] Failed to enumerate USB devices hub=trezor vendor=4617 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
WARN [06-26|21:00:45.121] Found deprecated node list file /multi-geth/static-nodes.json, please use the TOML config file instead.
INFO [06-26|21:00:45.122] Starting peer-to-peer node instance=MultiGeth/v1.9.3-unstable-e8ef65a0-20190620/linux-amd64/go1.10.4
INFO [06-26|21:00:45.122] Allocated trie memory caches clean=256.00MiB dirty=256.00MiB
INFO [06-26|21:00:45.122] Allocated cache and file handles database=/multi-geth/geth/chaindata cache=512.00MiB handles=524288
INFO [06-26|21:00:45.150] Opened ancient database database=/multi-geth/geth/chaindata/ancient
INFO [06-26|21:00:45.554] Persisted trie from memory database nodes=12356 size=1.79MiB time=46.47947ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
Fatal: Error starting protocol stack: database contains incompatible genesis (have 384132fde57e40159f7d012dfae4538b67c264794d421cf61f710d7c2899d573, new d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3)
lightchaindata
--classic
:)CustomGenesis.json
. If you want to create a custom private network that is the same as ETC, just specify the config to be the same. But you don't use --classic
with custom genesis.
"config"
section in your CustomGenesis.json
to something like this:{
"config": {
"networkId": 15468,
"chainId": 15468,
"homesteadBlock": 0,
"eip7FBlock": null,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"disposalBlock": 0,
"constantinopleBlock": null,
"ECIP1017EraRounds": 5000000,
"eip160FBlock": 0,
"ethash": {},
"trustedCheckpoint": null
},
}
{
"name":"Homestead",
"block":0,
"requiredHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"features":[
{
"id":"difficulty",
"options":{
"type":"homestead"
}
},
{
"id":"gastable",
"options":{
"type":"homestead"
}
}
]
},
{
"name":"GasReprice",
"block":0,
"requiredHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"features":[
{
"id":"gastable",
"options":{
"type":"eip150"
}
}
]
},
{
"name":"The DAO Hard Fork",
"block":0,
"requiredHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"features":[]
},
{
"name":"Diehard",
"block":0,
"requiredHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"features":[
{
"id":"eip155",
"options":{
"chainID":15468
}
},
{
"id":"gastable",
"options":{
"type":"eip160"
}
},
{
"id":"difficulty",
"options":{
"length":2000000,
"type":"ecip1010"
}
}
]
},
{
"name":"Gotham",
"block":0,
"requiredHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"features":[
{
"id":"reward",
"options":{
"era":2000000,
"type":"ecip1017"
}
}
]
},
{
"name":"Defuse Difficulty Bomb",
"block":0,
"requiredHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
"features":[
{
"id":"difficulty",
"options":{
"type":"defused"
}
}
]
},
{
"name":"Atlantis",
"block":100,
"features":[
{
"id":"difficulty",
"options":{
"type":"atlantis"
}
}
]
}
],
"config"
contains all of them (except ECIP1010 difficulty pause, because later we did difficulty disposal which made ECIP1010 useless):homesteadBlock
.eip150Block
.eip155Block
and eip160FBlock
.ECIP1017EraRounds
.disposalBlock
.byzantiumBlock
! :)era
for the ECIP1017
era
for ECIP1017 is via config ECIP1017EraRounds
.
I have created a POA network with the help of this "https://hackernoon.com/setup-your-own-private-proof-of-authority-ethereum-network-with-geth-9a0a3750cda8" and now I want to create a dockerfile for my private network and I am new in all this.
This is my Dockerfile :
FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y wget software-properties-common \
&& rm -rf /var/lib/apt/lists/*
WORKDIR "/project/devnet"
RUN add-apt-repository -y ppa:ethereum/ethereum
ARG binary
RUN apt-get update \
&& apt-get install -y ethereum
CMD nohup exec geth --datadir node1/ --syncmode 'full' --port 20211 --rpc --rpcaddr '190.0.0.178' --rpcport 8505 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://91a11f746dff781da2ae561b9d90b4fc5761cbe84cd2377c81832142483cbde14b22ea81bedwqwfwefwfwefw9d86b0575ba7a3e6194cc0ed1c@127.0.0.1:0?discport=20210' --networkid 2021 --gasprice '1' --"allow-insecure-unlock" -unlock '0x29D7f50eF6006F4dFba068b66b853e7a0a9ee0da' --password node1/password.txt --mine &
EXPOSE 8505
EXPOSE 20211
Hello! I'm having trouble mining in my private ethereum blockchain. I created an account, unlocked it using personal.unlockAccount(eth.coinbase)
.
After unlocking it, i run miner.start()
and simply the output of the blockchain is :
INFO [01-14|23:01:16.102] Commit new mining work number=1 sealhash=fcfb5f…ebee20 uncles=0 txs=0 gas=0 fees=0 elapsed=117.395µs
INFO [01-14|23:01:22.755] Generating DAG in progress epoch=0 percentage=0 elapsed=5.895s
INFO [01-14|23:01:28.625] Generating DAG in progress epoch=0 percentage=1 elapsed=11.765s
INFO [01-14|23:01:34.208] Generating DAG in progress epoch=0 percentage=2 elapsed=17.348s
INFO [01-14|23:01:40.062] Generating DAG in progress epoch=0 percentage=3 elapsed=23.202s
INFO [01-14|23:01:46.582] Generating DAG in progress epoch=0 percentage=4 elapsed=29.722s
INFO [01-14|23:01:52.439] Generating DAG in progress epoch=0 percentage=5 elapsed=35.579s
My account balance is always the same, 0:
Here is my genesis.json configuration file:
{
"config": {
"chainId": 987,
"homesteadBlock": 0,
"eip150Block":0,
"eip155Block": 0,
"eip158Block": 0
},
"difficulty": "0x400",
"gasLimit": "0x8000000",
"alloc": {
}
}