首页 > 解决方案 > 如何增加 GassLimit(以太坊 PoA)?

问题描述

当我增加 genesis 文件中的 gassLimit 时,气体估计也会增加,并且在混音中会出现相同的错误。

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Returned error: gas required exceeds allowance (155994124492630992) or always failing transaction

我想运行智能合约的一些功能。一些函数成功运行,因为一些函数给出了上述错误。我认为这个错误与gassLimit有关,但是当我增加创世文件中的gaslimit时,同样的错误就会出现。

如果我正在寻找正确的方向,请告诉我。

下面是我的创世文件

{
  "config": {
    "chainId": 2222,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "clique": {
      "period": 5,
      "epoch": 30000
    }
  },
  "nonce": "0x0",
  "timestamp": "0x615edaad",
  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000c348016c306cac0d1f86eefbbdff2bbcbb3667e50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "gasLimit": "0x38D7EA4C67FFFFF",
  "difficulty": "0x1",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x0000000000000000000000000000000000000000",
  "alloc": {
    "0000000000000000000000000000000000000000": {
      "balance": "0x1"
    },
    "91a7df8b1820ab79d3a5b3c4fd35d4ef38b105f8": {
      "balance": "0x200000000000000000000000000000000000000000000000000000000000000"
    },
    "c348016c306cac0d1f86eefbbdff2bbcbb3667e5": {
      "balance": "0x200000000000000000000000000000000000000000000000000000000000000"
    }
  },
  "number": "0x0",
  "gasUsed": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "baseFeePerGas": null
}

标签: ethereumremixgo-ethereum

解决方案


推荐阅读