hyperlane-monorepo
hyperlane-monorepo copied to clipboard
Validator checkpoint_latest_index.json is not set if the checkpoint latest index is 0
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