Default to not allowing LocalStorage checkpoint syncers in relayer (#1900)
### Description Open to better names Adds a setting to the relayer, `allow_local_checkpoint_syncers`, which determines whether local storage based checkpoint syncers will be allowed by the metadata builder. Originally, I wanted something a bit more clever, like being able to specify `HYP_RELAYER_VALIDCHECKPOINTSYNCERS=LocalStorage,S3` or something, where I'd like those variants to be matched to the variants found in https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/hyperlane-base/src/types/checkpoint_syncer.rs#L14. But that enum requires values, so things get ugly. One option would be to create a new enum like: ``` enum CheckpointSyncerTypes { LocalStorage, S3, } ``` And another option is to use something like strum's [EnumString](https://docs.rs/strum/latest/strum/derive.EnumString.html) (shoutout to @mattiecnvr). But this still is a bit clunky, so for now just making this a bool and we can figure out something more elegant later if we ever get to a point where we're supporting multiple types of checkpoint syncers ### Drive-by changes none ### Related issues - Fixes https://github.com/hyperlane-xyz/issues/issues/402 ### Backward compatibility _Are these changes backward compatible?_ Yes - although if you ever want to run a relayer that uses local storage now, you'll need to set `HYP_RELAYER_ALLOWLOCALCHECKPOINTSYNCERS=true` _Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling?_ None - we always expect to not be reading from the local fs in deployed relayers ### Testing _What kind of testing have these changes undergone?_ Ran e2e testspull/1910/head
parent
07f91490fc
commit
59a90b1bb6
Loading…
Reference in new issue