Closed Doy-lee closed 2 months ago
Oh I thought of a way that works in theory. Introduce a ServiceNodeV2
with the new field- pause the contract, add an admin function to walk the list and migrate all ServiceNode
structs -> ServiceNodeV2
, unpause the contract.
The mapping is used to outright reject anyone that tries to register a different BLS key for the same Ed25519 key, but similarly, also, a different Ed25519 key for the same BLS key.
If these make it through the contract, the contract locks up collateral and then the onus of freeing up those funds ends up in the oxen codebase. There are issues in this because the link between L2 and Oxen is more vulnerable than just outright preventing us from getting into the situation in the first place.
--
Note C++ tests are broken because of some renaming that happened in this PR and I believe we are looking to sunset that so I haven't updated them but certainly can if that's non-negotiable.
--
Additionally some small cleanup in the rewards contract
addBLSPublicKey
because there's no other auxiliary contract in our ecosystem that needs to be able to parameterise the caller of that function.