This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Description
I think that it might make our life easier if we extracted signing behavior entirely with something like this:
struct Signed<T> {
payload: T,
validator_index: ValidatorIndex,
signature: ValidatorSignature,
}
impl<T: Encode> Signed<T> {
fn sign(payload: T, context: SigningContext, index: ValidatorIndex, key: PrivateKey) -> Signed<T> { ... }
fn validate(&self, context: SigningContext, key: PublicKey) -> bool { ... }
}
Originally posted by @coriolinus in #1270