¿Alguien por favor me ayudará? Estoy atascado en esto desde hace horas; hizo el proceso +3 veces, cada vez que eliminó el contenido de datadir. ¡Geth aún no comenzará a minar!
Especificaciones: Geth 1.8.11, en macOS X
Esto es lo que hice:
{
"difficulty" : "0x20000",
"extraData" : "",
"gasLimit" : "0x8000000",
"alloc": {},
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
}
}
Inicializó la cadena privada geth --datadir=/Users/shaikhaalothman/chaindata init /Users/shaikhaalothman/genesis/genesis.json
y luego comenzó gethgeth --datadir=/Users/shaikhaalothman/chaindata
Last login: Mon Jun 25 22:15:52 on ttys000
Shaikhas-MacBook-Pro:~ shaikhaalothman$ geth --datadir=/Users/shaikhaalothman/chaindata init /Users/shaikhaalothman/genesis/genesis.json
INFO [06-25|22:20:29] Maximum peer count ETH=25 LES=0 total=25
INFO [06-25|22:20:29] Allocated cache and file handles database=/Users/shaikhaalothman/chaindata/geth/chaindata cache=16 handles=16
INFO [06-25|22:20:29] Writing custom genesis block
INFO [06-25|22:20:29] Persisted trie from memory database nodes=0 size=0.00B time=11.447µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [06-25|22:20:29] Successfully wrote genesis state database=chaindata hash=0613eb…9a64e7
INFO [06-25|22:20:29] Allocated cache and file handles database=/Users/shaikhaalothman/chaindata/geth/lightchaindata cache=16 handles=16
INFO [06-25|22:20:29] Writing custom genesis block
INFO [06-25|22:20:29] Persisted trie from memory database nodes=0 size=0.00B time=4.588µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [06-25|22:20:29] Successfully wrote genesis state database=lightchaindata hash=0613eb…9a64e7
Shaikhas-MacBook-Pro:~ shaikhaalothman$ geth --datadir=/Users/shaikhaalothman/chaindata
INFO [06-25|22:20:39] Maximum peer count ETH=25 LES=0 total=25
INFO [06-25|22:20:39] Starting peer-to-peer node instance=Geth/v1.8.11-stable-dea1ce05/darwin-amd64/go1.10.3
INFO [06-25|22:20:39] Allocated cache and file handles database=/Users/shaikhaalothman/chaindata/geth/chaindata cache=768 handles=128
INFO [06-25|22:20:39] Initialised chain configuration config="{ChainID: 15 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Constantinople: <nil> Engine: unknown}"
INFO [06-25|22:20:39] Disk storage enabled for ethash caches dir=/Users/shaikhaalothman/chaindata/geth/ethash count=3
INFO [06-25|22:20:39] Disk storage enabled for ethash DAGs dir=/Users/shaikhaalothman/.ethash count=2
INFO [06-25|22:20:39] Initialising Ethereum protocol versions="[63 62]" network=1
INFO [06-25|22:20:39] Loaded most recent local header number=0 hash=0613eb…9a64e7 td=131072
INFO [06-25|22:20:39] Loaded most recent local full block number=0 hash=0613eb…9a64e7 td=131072
INFO [06-25|22:20:39] Loaded most recent local fast block number=0 hash=0613eb…9a64e7 td=131072
INFO [06-25|22:20:39] Regenerated local transaction journal transactions=0 accounts=0
INFO [06-25|22:20:39] Starting P2P networking
INFO [06-25|22:20:41] UDP listener up self=enode://de764357ef765c4cb6fb7aed6e97b895d1f67837ce3764a5dcf138e7f48a5044a81d68d54c18d653a825784bb52e90220ab05f42c176d44cf44b242985bc2118@[::]:30303
INFO [06-25|22:20:41] RLPx listener up self=enode://de764357ef765c4cb6fb7aed6e97b895d1f67837ce3764a5dcf138e7f48a5044a81d68d54c18d653a825784bb52e90220ab05f42c176d44cf44b242985bc2118@[::]:30303
INFO [06-25|22:20:41] IPC endpoint opened url=/Users/shaikhaalothman/chaindata/geth.ipc
INFO [06-25|22:22:27] Updated mining threads threads=1
INFO [06-25|22:22:27] Transaction pool price threshold updated price=18000000000
INFO [06-25|22:22:27] Starting mining operation
INFO [06-25|22:22:27] Commit new mining work number=1 txs=0 uncles=0 elapsed=72.379ms
INFO [06-25|22:23:14] Updated mining threads threads=1
INFO [06-25|22:29:59] Updated mining threads threads=1
Niebla lanzada con comando/applications/mist.app/contents/macos/mist --rpc /Users/shaikhaalothman/chaindata/geth.ipc
Last login: Mon Jun 25 22:20:14 on ttys000
Shaikhas-MacBook-Pro:~ shaikhaalothman$ /applications/mist.app/contents/macos/mist --rpc /Users/shaikhaalothman/chaindata/geth.ipc
[2018-06-25T22:21:00.528] [INFO] Settings - Running in production mode: true
[2018-06-25T22:21:00.616] [INFO] EthereumNode - undefined 'light' 'light'
[2018-06-25T22:21:00.618] [INFO] EthereumNode - Defaults loaded: geth main light
[2018-06-25T22:21:00.784] [INFO] main - Starting in Mist mode
[2018-06-25T22:21:03.580] [INFO] Db - Loading db: /Users/shaikhaalothman/Library/Application Support/Mist/mist.lokidb
[2018-06-25T22:21:03.691] [INFO] Windows - Creating commonly-used windows
[2018-06-25T22:21:03.693] [INFO] Windows - Create secondary window: loading, owner: notset
[2018-06-25T22:21:07.847] [INFO] updateChecker - Check for update...
[2018-06-25T22:21:12.839] [INFO] Windows - Create primary window: main, owner: notset
[2018-06-25T22:21:12.859] [INFO] Windows - Create primary window: splash, owner: notset
[2018-06-25T22:21:19.141] [INFO] (ui: popupWindow) - Web3 not yet initialized, doing so now with HttpProvider.
[2018-06-25T22:21:19.161] [INFO] updateChecker - App is up-to-date.
[2018-06-25T22:21:19.162] [INFO] (ui: splashscreen) - Web3 already initialized, re-using provider.
[2018-06-25T22:21:19.163] [INFO] (ui: popupWindow) - Web3 already initialized, re-using provider.
[2018-06-25T22:21:19.307] [INFO] (ui: splashscreen) - Meteor starting up...
[2018-06-25T22:21:19.308] [INFO] (ui: popupWindow) - Meteor starting up...
[2018-06-25T22:21:19.309] [INFO] (ui: popupWindow) - Meteor starting up...
[2018-06-25T22:21:20.585] [INFO] ClientBinaryManager - Initializing...
[2018-06-25T22:21:20.586] [INFO] ClientBinaryManager - Checking for new client binaries config from: https://raw.githubusercontent.com/ethereum/mist/master/clientBinaries.json
[2018-06-25T22:21:21.038] [INFO] ClientBinaryManager - No "skippedNodeVersion.json" found.
[2018-06-25T22:21:21.040] [INFO] ClientBinaryManager - Initializing...
[2018-06-25T22:21:21.041] [INFO] ClientBinaryManager - Resolving platform...
[2018-06-25T22:21:21.042] [INFO] ClientBinaryManager - Calculating possible clients...
[2018-06-25T22:21:21.044] [INFO] ClientBinaryManager - 1 possible clients.
[2018-06-25T22:21:21.044] [INFO] ClientBinaryManager - Verifying status of all 1 possible clients...
[2018-06-25T22:21:21.045] [INFO] ClientBinaryManager - Verify Geth status ...
[2018-06-25T22:21:21.891] [INFO] ClientBinaryManager - Checking for Geth sanity check ...
[2018-06-25T22:21:21.892] [INFO] ClientBinaryManager - Checking for Geth sanity check ...
[2018-06-25T22:21:21.892] [INFO] ClientBinaryManager - Checking sanity for Geth ...
[2018-06-25T22:21:21.895] [INFO] ClientBinaryManager - Checking sanity for Geth ...
[2018-06-25T22:21:23.210] [INFO] Sockets/node-ipc - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:23.213] [INFO] Sockets/node-ipc - Connected!
[2018-06-25T22:21:23.214] [INFO] NodeSync - Ethereum node connected, re-start sync
[2018-06-25T22:21:23.215] [INFO] NodeSync - Starting sync loop
[2018-06-25T22:21:23.216] [INFO] Sockets/2 - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:23.217] [INFO] Sockets/4 - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:23.218] [INFO] main - Connected via IPC to node.
[2018-06-25T22:21:23.233] [INFO] Sockets/2 - Connected!
[2018-06-25T22:21:23.234] [INFO] Sockets/4 - Connected!
[2018-06-25T22:21:23.444] [INFO] (ui: splashscreen) - Network is privatenet
[2018-06-25T22:21:23.445] [INFO] (ui: splashscreen) - Network is privatenet
[2018-06-25T22:21:27.479] [INFO] NodeSync - Sync has been skipped
[2018-06-25T22:21:27.480] [INFO] NodeSync - Sync loop ended
[2018-06-25T22:21:27.481] [INFO] main - Loading Interface at file:///Applications/Mist.app/Contents/Resources/app.asar/interface/index.html
[2018-06-25T22:21:28.710] [INFO] Sockets/3 - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:28.711] [INFO] Sockets/3 - Connected!
[2018-06-25T22:21:29.392] [INFO] (ui: mist) - Web3 already initialized, re-using provider.
[2018-06-25T22:21:29.644] [INFO] (ui: mist) - Meteor starting up...
[2018-06-25T22:21:29.658] [INFO] (ui: mist) - Initialise Mist Interface
[2018-06-25T22:21:31.209] [INFO] (ui: mist) - Network is privatenet
[2018-06-25T22:21:33.649] [INFO] (ui: mist) - did-navigate wallet https://wallet.ethereum.org/
[2018-06-25T22:21:33.706] [INFO] Sockets/3 - Disconnecting...
[2018-06-25T22:21:33.969] [INFO] Sockets/3 - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:33.970] [INFO] Sockets/3 - Connected!
[2018-06-25T22:21:34.247] [INFO] (ui: mist) - did-navigate browser https://github.com/ethereum/mist/releases
[2018-06-25T22:21:34.249] [INFO] Sockets/3 - Disconnecting...
[2018-06-25T22:21:34.253] [INFO] Sockets/6 - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:34.255] [INFO] Sockets/6 - Connected!
[2018-06-25T22:21:34.314] [INFO] Sockets/3 - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:34.315] [INFO] Sockets/3 - Connected!
[2018-06-25T22:21:34.505] [INFO] Sockets/5 - Connect to {"path":"/Users/shaikhaalothman/chaindata/geth.ipc"}
[2018-06-25T22:21:34.506] [INFO] Sockets/5 - Connected!
[2018-06-25T22:21:36.584] [INFO] (ui: mist) - did-navigate-in-page wallet https://wallet.ethereum.org/
[2018-06-25T22:21:36.701] [INFO] (ui: mist) - dom-ready wallet https://wallet.ethereum.org/
[2018-06-25T22:21:40.442] [INFO] (ui: mist) - did-stop-loading wallet https://wallet.ethereum.org/
[2018-06-25T22:21:41.252] [INFO] (ui: mist) - dom-ready browser https://github.com/ethereum/mist/releases
[2018-06-25T22:21:42.799] [INFO] (ui: mist) - did-stop-loading browser https://github.com/ethereum/mist/releases
Corrí geth attach /Users/shaikhaalothman/chaindata/geth.ipc
, luego configuré miner.setEtherbase("f8ddc84985c88e209a9f345bd6e87e9373cf386c")
y comencé a minar a través deminer.start(1);
Last login: Mon Jun 25 22:20:53 on ttys001
Shaikhas-MacBook-Pro:~ shaikhaalothman$ geth attach /Users/shaikhaalothman/chaindata/geth.ipc
Welcome to the Geth JavaScript console!
instance: Geth/v1.8.11-stable-dea1ce05/darwin-amd64/go1.10.3
modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
> miner.setEtherbase("f8ddc84985c88e209a9f345bd6e87e9373cf386c")
true
> miner.start(1);
null
> miner.start(1);
null
> miner.start(1);
null
>
Estoy fuera de ideas en cuanto a lo que está mal. Si tiene alguna idea... su aporte será apreciado
Creo que está intentando crear una cadena privada (con ID 15) pero solo inicializa los archivos para ella. Luego, inicia Mist, que inicia un nodo geth de producción en lugar de conectarse a un nodo que se ejecuta en su cadena privada. Entre el inicio y el lanzamiento de Mist, podría haber otro comando para iniciar un nodo de minería privado utilizando su bloque de génesis y archivos iniciados a los que puede conectar su cliente Mist.
Cuando estaba configurando mi propia red ethereum privada, estaba usando el siguiente repositorio de github: https://github.com/vertigobr/ethereum
Me ayudó mucho a comprender los requisitos para una configuración adecuada. También hay un artículo que explica todo. Puede encontrarlo aquí: https://medium.com/@andrenit/buildind-an-ethereum-playground-with-docker-part-1-introduction-80be173aaa7a
Si mi comprensión del tema es correcta, es posible que deba iniciar "bootnode" antes de ejecutar cualquier nodo/minero en esa red privada. También tuve problemas con el minero que no hacía su trabajo y la razón era que no podía conectarse con ningún compañero. En mi caso, el problema estaba en la URL de bootnode. Configurarlo correctamente solucionó el error e hizo posible la extracción/implementación de contratos inteligentes.
¡Espero que eso ayude! Incluso si la respuesta no es correcta, ese artículo que compartí es un buen lugar para comenzar. (No soy el autor, solo lo comparto).