genesis.json文件里面的homesteadBlock、eip155Block、eip158Block是干啥的?
发布于 1 个月前 作者 hadoop002 253 次浏览 来自 以太坊
{
  "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"
}

config配置下面的homesteadBlock、eip155Block、eip158Block三个配置是干啥的?

4 回复

相关协议机制的升级区块所在的高度,签名算法是homestead ->eip155 -> eip158,所以从homesteadBlock之前区块都通过homestead相关算法机制来验证,homesteadBlock 到 eip155Block之间的用eip155算法来验证,依次类推

@maiiz chainId 可以随便填一个数字吗?

@hadoop002 可以,更多关于networkId的讨论可以戳这里

@hadoop002 如果是私有链随便填。如果是主网当然要按主网的协议填

回到顶部