Fix reporting unused_validators for DVT #424
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We discovered that DVT enabled operator instances report
sw_operator_unused_validator_keys
incorrectly, always as zero ( #421 ).This happens because logic that determines number of unused keys, skips keys that are not in the keystore (regardless whether it's loaded from Hashicorp vault or local filesystem). Within DVT setup, the local keystore contains BLS key shares instead of validator full keys, and the key shares have their derived public key different from a validator key, which leads to all keys that are in deposit data, being skipped because they do not match any of key share public keys.
Because it is not possible to heuristically determine whether the keys loaded are full validator keys or key shares, we propose to add new parameter
RUNS_DVT_SETUP
which will signalize to the unused keys logic that keys not present in keystore should not be skipped. Also, added the logic to override this setting totrue
in relayer setups that are configured to use DVT via--relayer-type
parameter.