Skip to content

[TASK] Implement change handler hook for Signature Bridge maintainer #214

@drewstone

Description

@drewstone

Issue summary
The signature bridge is maintained by a maintainer, currently a uncompressed ECDSA public key. This key can potentially change from external pallets or logic such as through the DKG's operations. Currently the DKG exists as a separate repo and should continue to be. Nonetheless, we should have a way of connecting the SignatureBridge to an external maintainer change handler.

Other information and links
What this might look like:

trait MaintainerUpdater {
	fn update(new_maintainer: Vec<u8>) -> DispatchResult;
}

// in `signature-bridge/src/lib.rs`
impl<T, I> MaintainerUpdater for Pallet<T, I> {
	fn update(new_maintainer: Vec<u8> -> DispatchResult {
		// do validation
		check_valid_maintainer(new_maintainer)?;
		// do update
		Maintainer::<T, I>::set(new_maintainer);
	}
}

On the DKG's side we would then implement the opposite side of this logic.

// in `dkg-metadata/src/lib.rs`
trait Config {
	...
	MaintainerChangeHandler: MaintainerUpdater
}
...
fn change_authorities(...) {
	...
	T::MaintainerChangeHandler::update(new_key)?;
	...
}

Relevant links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3 🔵Issues should be resolved eventuallytask ✔️

    Type

    No type

    Projects

    Status

    Not Started 🕧

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions