chainflip-io / chainflip-backend

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

`VaultRotationResponse` Does not need to contain the `old_key` and `new_key` #480

Closed kylezs closed 3 years ago

kylezs commented 3 years ago

Currently we have

/// A response of our request to rotate the vault
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)]
pub enum VaultRotationResponse<PublicKey: Into<Vec<u8>>, Transaction: Into<Vec<u8>>> {
    Success {
                // remove
        old_key: PublicKey,
                // remove
        new_key: PublicKey,
        tx: Transaction,
    },
    Failure,
}

However, returning these keys is unnecessary. This response is sent back alongside the ceremony_id. In vault_rotation_response() like here: https://swimlanes.io/u/Ptsk3nVj-

The state chain is able to associate the request with the response.

Some supporting ideas after discussing with @andyjsbell :

morelazers commented 3 years ago

It would be clearer if the swimlane included all the necessary parameters, but I think I understand the gist and agree with the above.

andyjsbell commented 3 years ago

closed with https://github.com/chainflip-io/chainflip-backend/pull/493/