Skip to content

Commit

Permalink
Ban Serai from setting keys
Browse files Browse the repository at this point in the history
They were already banned form publishing `Batch`s, yet the ability to set keys
enabled changing how certain functionality in the coordinator operated.
Removing this malleability ensures operation as expected.
  • Loading branch information
kayabaNerve committed Nov 19, 2023
1 parent b018fc4 commit 25c02c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions substrate/validator-sets/pallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,11 @@ pub mod pallet {
Call::__Ignore(_, _) => unreachable!(),
};

// Don't allow the Serai set to set_keys, as they have no reason to do so
if network == &NetworkId::Serai {
Err(InvalidTransaction::Custom(0))?;
}

let session = Session(pallet_session::Pallet::<T>::current_index());

let set = ValidatorSet { session, network: *network };
Expand Down

0 comments on commit 25c02c1

Please sign in to comment.