POA Forum

POA consensus contracts is breaking after running some time

We are running our testnet with POA, but every so often the network stalls with:

WARN miner  Closing the block failed with error Engine(FailedSystemCall("pleas
e ensure the contract and method you\'re calling exist! failed to decode empty bytes. if you\'re using jsonrpc this
 is likely due to jsonrpc returning `0x` in case contract or method don\'t exist")). This is likely an error in cha
in specificiations or on-chain consensus smart contracts.

This was fixed in POA, can someone reference me to the fix?

Hi @frozeman,

Are you using https://github.com/poanetwork/poa-network-consensus-contracts contracts?

Which client are you running? Latest stable OpenEthereum?

last stabel OpenEthereum, yes and yes to the contracts, we forked them a while back. See here: https://github.com/lukso-network/lukso-network-consensus-contracts

OK, do you perform any actions on the consensus contracts at the same block when you see the error?

Looks like your error message tells about some revert in RewardByBlock contract which is responsible for block’s closing.

We recently fixed an issue in that contract in https://github.com/poanetwork/poa-network-consensus-contracts/pull/209

The details of the bug: Critical bug in Core/Sokol related to ballot's finalization

I’m not sure this is your case - it depends on whether you perform the actions described in Critical bug in Core/Sokol related to ballot's finalization (removed validator produces the block in which the transaction of its removal occurs), but if your network has a small number of validators, the bug is very likely in your case.

it doesn’t have 4 validators, its the L14 testnet.

Do I only need to upgrade the reward contract, or all of them?

You only need to remove this line from RewardByBlock: https://github.com/lukso-network/lukso-network-consensus-contracts/blob/902036f6027a619aa4b90fb7eacacdadbd3ecf84/contracts/RewardByBlock.sol#L76

1 Like

Thanks for the quick help.

1 Like