chainflip-io / chainflip-backend

The Chainflip backend repo, including the Chainflip Node and CFE.
50 stars 15 forks source link

Can multiple validators currently use the same Ethereum account? #360

Closed kylezs closed 3 years ago

kylezs commented 3 years ago

AFAIK there is nothing to stop 5 validators using the same ETH address/account. Is this something we want to allow? It makes managing validators (if you run more than one) a little easier, since you only have to top up the ETH of one ETH account. Just raising because I don't know if this has been considered at all.

andyjsbell commented 3 years ago

As far as I am aware this is a problem right? Each validator would have it's own account with the staked flip so in reality they would be reusing the same stake, or am I misunderstanding this...

kylezs commented 3 years ago

Sorry, more context required. It's definitely a problem for staking, and I think we do actually protect against this (or if we don't currently, we should).

The scenario I'm talking about is when broadcasting transactions to the ETH network. We need to sign and pay for gas. This account currently does not have to be linked to the staked address... perhaps it should be? - How would we do that?

andyjsbell commented 3 years ago

Ah right, ok. So you are assuming that we are protecting for this on the SC?

For the broadcasting, I can't see a problem with using another account and allowing that flexibility.

kylezs commented 3 years ago

Yeah I agree, I don't think it matters. The protections around what can be sent in and out of the Smart Contracts remain, because what we're doing is basically: AccountSig(Multisig(tx))

The account that creates the AccountSig pays the gas, but the txdata ( Multisig(tx) ) needs to go through the proper validation on the contract i.e. Multisignature verification.

morelazers commented 3 years ago

I don't think we care if they use the same broadcasting account. We should advise against it, but there's nothing we can do to prevent it.

In the future we might require Validators to "register" their broadcasting account(s)? It's not something I can see a clear cut reason to require now though.

morelazers commented 3 years ago

Closing this - have made a note of the issue and will ensure that it is documented in the Validator guide.