当前位置:首页 » 《资源分享》 » 正文

【以太坊】使用Geth、Truffle、Metamask和Ganache遇到的问题_漆黑梦工厂

17 人参与  2021年09月22日 17:23  分类 : 《资源分享》  评论

点击全文阅读


1. Fatal:Account unlock with HTTP access is forbidden!

描述:
在解锁用户的时候遇到报错

解决方法:
在启动控制后面增加–allow-insecure-unlock
例如geth --datadir=./chaindata/ --rpc console 2>output.log --allow-insecure-unlock

2. Failed to write genesis block: unsupported fork ordering: eip150Block not enabled, but eip155Block enabled at 0
描述:
在初始化创世块时报错
解决方法:
使用更加详细的创世块文件:genesis.json
例如


{
  "config": {
    "chainId": 666,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "ethash": {}
  },
  "nonce": "0x0",
  "timestamp": "0x5ddf8f3e",
  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "gasLimit": "0x47b760",
  "difficulty": "0x00002",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x0000000000000000000000000000000000000000",
  "alloc": { },
  "number": "0x0",
  "gasUsed": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

3. geth客户端启动 一直INFO Looking for peers
描述:
启动时候一直刷屏
解决方法:
1.在启动的指令console后加:--nodiscover,关闭p2p网络的自动发现
例如geth --datadir=./chaindata/ --rpc console --nodiscover --allow-insecure-unlock
或者
2.在启动的指令console后加: 2>output.log,输出到另一个文件中
geth --datadir=./chaindata/ --rpc console 2>output.log --allow-insecure-unlock

4. Unable to attach to remote geth: no known transport for URL scheme "c"
描述:
在window10上运行get attach命令启动交互式JavaScript环境连接到节点的时候,报错Unable to attach to remote geth: no known transport for URL scheme “c”
解决方法:
运行geth attach ipc:\\.\pipe\geth.ipc,通过管道指定geth.ipc,

5. miner.start() 返回null
描述:
miner.start() 返回null
解决方法:
我的情况是实际上已经开始挖矿,查看钱包可以知道ETH在增加,其他情况可以查看:https://www.cnblogs.com/tianlongtc/p/8871472.html

6. Error: etherbase missing: etherbase must be explicitly specified
描述:
启动挖矿时报错
解决方法:
新建一个账户personal.newAccount("xxx")
其中xxx为该账户的密码

7. Metamask 连接私有节点,且导入节点账号
描述:
如题
解决方法:
解决方法


点击全文阅读


本文链接:http://zhangshiyu.com/post/28408.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1