move syncing root keys from early/ to lib