See slack thread for context: https://chainlink-core.slack.com/archives/C05G9M9SBKR/p1689175479236369
Some chains e.g. BSC (and others?) try to manage state bloat by pruning logs older than a certain threshold. This does not happen on Eth mainnet and was not factored into the design of OCR. Nonetheless, we need to work around it, since it's becoming an increasingly severe problem.
We propose to implement the following:
Remove the need for logs to read config by storing the config in state. This is an optimization from a different time, and we have some options.
We propose to add a boolean persistConfig
to the contract constructor. If unset, no state will be persisted in the contract and it will work exactly as it currently does (this can be used on chains that support long log lookbacks e.g. Eth mainnet).