ExocoreNetwork / exocore

5 stars 9 forks source link

Implement AVS to Key-Type Registry #104

Open coderabbitai[bot] opened 2 weeks ago

coderabbitai[bot] commented 2 weeks ago

There is a need to create an AVS to key-type registry to help identify and validate the necessity of supplying or omitting keys based on the AVS address. This registry will simplify the conditional logic in the function, as discussed in PR#95. The implementation of this registry should ensure that keys are only supplied where necessary, improving the robustness and security of the module.

MaxMustermann2 commented 2 weeks ago

For more context, an operator should provide their (consensus or BLS or other) key when they are opting into a provided AVS. If a key is not required, the operator should not supply one when sending such a transaction.

Currently, this is implemented in #95 solely when the AVSAddress is equal to the ctx.ChainID(), that is, for the dogfood-as-an-AVS case. It needs to be generalized to support each AVS by using the registry which should provide the key-type (BLS / consensus / other / not needed) corresponding to the supplied AVS address (or its chain id). The operator module should, during AVS opt-in, validate that it is accurately supplied or omitted and store the key.

CC @mikebraver @trestinlsd