hyperlane-monorepo icon indicating copy to clipboard operation
hyperlane-monorepo copied to clipboard

Validator checkpoint_latest_index.json is not set if the checkpoint latest index is 0

Open tkporter opened this issue 1 year ago • 0 comments
trafficstars

Problem

The logic here https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/3d4e6436d526b94a76afd613f70199dc2f0579e8/rust/hyperlane-base/src/types/gcs_storage.rs#L146 results in the checkpoint_latest_index.json only being updated if self.latest_index() is > 0. It's possible for self.latest_index() to be 0 if only a single message has been inserted into the merkle tree

Solution

Some better condition

tkporter avatar Aug 06 '24 09:08 tkporter