Skip to content

Latest commit

 

History

History
41 lines (20 loc) · 1.7 KB

005.md

File metadata and controls

41 lines (20 loc) · 1.7 KB

Petite Chocolate Falcon

Medium

Incomplete State Reset in Zero-Height Genesis Export Leading to Potential Inconsistencies and Fund Loss

Description

The prepForZeroHeightGenesis function is missing several critical steps that are necessary for a comprehensive state reset when exporting genesis at zero height. The current function lacks the following essential operations:

  • Proper Reinitialization of Validators and Delegations

  • Handling of Fee Distribution State Properly

Impact

The absence of the remaining necessary operations can lead to several issues:

Inconsistent Initial State in Zero-Height Genesis Exports: Validator and delegation states may not be properly reset, resulting in an incorrect starting state.

Carry-Over of Historical Data That Should Be Reset: Delegator rewards and historical rewards may persist incorrectly.

Inconsistent Validator and Delegation States: Delegation resets are incomplete, leading to possible misalignments in validator bonding/unbonding states.

Without addressing these issues, the network restart from a zero-height genesis export could result in unexpected behavior, potential security risks, and a degraded user experience.

Recommendation

  1. Properly Reinitialize Validators and Delegations

Ensure that validator bonding/unbonding heights are properly reset.

Implement delegation period resets to avoid inconsistencies in validator and delegator states.

  1. Comprehensive Handling of Fee Distribution State

Transfer unwithdrawn validator rewards to the community pool only after verification.

Ensure that any unaccounted validator commission is properly redistributed.