Gaia-7001 Post-Mortem

The gaia-7001 testnet halted at block 24570 on Sunday, 7/23/2018 due to a panic in the SDK code. The bug was in the tally function of the governance module which was triggered during the tallying of a governance proposal.

The stack trace of the panic can be found here: https://github.com/cosmos/cosmos-sdk/issues/1787

Essentially, the Governance module expected that stake.IterateDelegations returns only delegations to bonded validators, but it actually returns all delegations, including those to unbonding or revoked validators. It then uses this delegation information to try and get the validator data from a map containing only the bonded validators. Because an unbonded or revoked validator is not in the map, the program panics due to an invalid memory address or nil pointer dereference error.

The bug was quickly resolved and will be merged and fixed for Gaia-7002. Can see the bug fix here: https://github.com/cosmos/cosmos-sdk/pull/1801

3 Likes

Thanks for the report.