Error de OpenZeppelin MintableToken solo en red privada

Empecé una nueva red privada mediante el comando geth.

geth --networkid "198"  --nodiscover --datadir "~/test-geth" --rpc --rpcaddr "0.0.0.0" --rpcport "8545" --rpccorsdomain "*" --rpcvhosts "*" --rpcapi web3,eth,personal,miner,net,txpool,debug --unlock 0,1 --password /home/user/.gethpasswd --mine --minerthreads 1 --targetgaslimit 6721975 --gasprice "100000"

Y desplegué mi token en esta red. "compilación de trufas" y "migración de trufas" se realizaron correctamente. Pero sendTransaction falla cada vez...

Depuré con el depurador de trufas. Aquí está el resultado de "sendTransaction".

MintedCrowdsale.sol:

24:   {
25:     // Potentially dangerous assumption about the type of the token.
26:     require(MintableToken(address(token)).mint(_beneficiary, _tokenAmount));
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

debug(development:0xb76ce508...)> i

Transaction halted with a RUNTIME ERROR.

This is likely due to an intentional halting expression, like assert(), require() or revert(). It can also be due to out-of-gas exceptions. Please inspect your transaction parameters and contract code to determine the meaning of this error.

Pensé que este error puede deberse a la falla de "transferOwnership", pero el depurador de trufas dice que "transferOwnership" tuvo éxito.

Y, curiosamente, no se produce ningún error al usar ganache-cli o Ropsten test net...

Recibo errores solo en la red privada establecida por el comando geth.

Por favor, dígame si alguien tiene algún consejo sobre este tema.

Respuestas (1)

Ahora tengo una solución.

La configuración de mi bloque de génesis era incorrecta.

Esta configuración funciona bien para mí.

{
  "config": {
    "chainId": 198,
    "HomesteadBlock":      0,
    "DAOForkBlock": 0,
    "DAOForkSupport":      true,
    "EIP150Block":         0,
    "EIP155Block":         0,
    "EIP158Block":         0,
    "ByzantiumBlock":      0
  },
  "nonce": "0x0000000000000042",
  "timestamp": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "extraData": "",
  "gasLimit": "0x8000000",
  "difficulty": "0x4000",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x3333333333333333333333333333333333333333",
  "alloc": {}
}

Y, en migraciones/2_deploy_contracts.js

module.exports = function(deployer, network, accounts) {


    const wallet = accounts[0];

provoca un error de límite de gas.

module.exports = function(deployer, network, accounts) {


    const wallet = "<your address>";

está bien