Looks like state sync dump doesn't work at genesis, because latest final block is non-existent 111...111. State sync at genesis doesn't make sense; however, it leads to very spammy logs all the time at startup:
0.146s ERROR state_sync_dump: Failed to get the latest epoch shard_id=ShardId(1) err=DBNotFoundErr("BLOCK HEADER: 11111111111111111111111111111111")
0.146s ERROR state_sync_dump: Failed to get the current state err=DBNotFoundErr("BLOCK HEADER: 11111111111111111111111111111111") shard_id=ShardId(1)
...
So I just return None if final block sync is 111... or sync hash doesn't exist. Later, the "next state sync state" is set to None anyway, so there are no changes in behaviour.
Looks like state sync dump doesn't work at genesis, because latest final block is non-existent 111...111. State sync at genesis doesn't make sense; however, it leads to very spammy logs all the time at startup:
So I just return None if final block sync is 111... or sync hash doesn't exist. Later, the "next state sync state" is set to None anyway, so there are no changes in behaviour.