如何增大块的gas limit
发布于 1 个月前 作者 yuni2017 151 次浏览 来自 以太坊

有一种方法是,在genesis.json文件里面配置块的gaslimit

{
  "config": {
        "chainId": 0,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
  "alloc"      : {},
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x2fefd8",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

但是,当块在不断的增高的时候,此时如何设置gasLimit 难道要修改genesis.json,重新初始化创世区块,从0开始吗?

1 回复

私链的话,可以在启动矿工时,使用参数–targetgaslimit来使块的gaslimit向设置的目标增长(不是一次性到位的,要慢慢增长到target)

回到顶部