Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drewstone opened this issue May 29, 2022 · 0 comments
Open
Labels
p3 🔵 Issues should be resolved eventually task ✔️

Comments

@drewstone
Copy link
Contributor

drewstone commented May 29, 2022

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:

@dutterbutter dutterbutter added p3 🔵 Issues should be resolved eventually task ✔️ labels Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 🔵 Issues should be resolved eventually task ✔️
Projects
Status: Not Started 🕧
Development

No branches or pull requests

2 participants