pub fn chain_cache_key(
registry: &Registry,
source: &[u8; 32],
chain: &[PluginInstance],
) -> Result<[u8; 32], ChainError>Expand description
The key a cache uses for “source through chain”.
It covers the source hash, and for each step that is not bypassed the plugin id, the plugin’s version and the
parameter values after defaults are filled in. So an explicit default and an omitted one give the same key, bypassed steps and their values
do not matter, and a change to any parameter, to the order, or to a plugin’s version gives a different key. Fields are length-prefixed so
no two different chains can produce the same bytes. Errors are the same as apply_chain’s for the unknown plugin or invalid values, since a
chain that cannot run has no result to cache.