Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pallets/aleph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ pub mod pallet {
impl<T: Config> Pallet<T> {
/// Sets the emergency finalization key. If called in session `N` the key can be used to
/// finalize blocks from session `N+2` onwards, until it gets overridden.
#[pallet::call_index(0)]
#[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))]
pub fn set_emergency_finalizer(
origin: OriginFor<T>,
Expand All @@ -227,6 +228,7 @@ pub mod pallet {
/// advance of the provided session of the version change.
/// In order to cancel a scheduled version change, a new version change should be scheduled
/// with the same version as the current one.
#[pallet::call_index(1)]
#[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))]
pub fn schedule_finality_version_change(
origin: OriginFor<T>,
Expand Down
5 changes: 5 additions & 0 deletions pallets/elections/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ pub mod pallet {

#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
#[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))]
pub fn change_validators(
origin: OriginFor<T>,
Expand Down Expand Up @@ -262,6 +263,7 @@ pub mod pallet {
}

/// Sets ban config, it has an immediate effect
#[pallet::call_index(1)]
#[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))]
pub fn set_ban_config(
origin: OriginFor<T>,
Expand Down Expand Up @@ -312,6 +314,7 @@ pub mod pallet {
}

/// Schedule a non-reserved node to be banned out from the committee at the end of the era
#[pallet::call_index(2)]
#[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))]
pub fn ban_from_committee(
origin: OriginFor<T>,
Expand All @@ -330,6 +333,7 @@ pub mod pallet {
}

/// Schedule a non-reserved node to be banned out from the committee at the end of the era
#[pallet::call_index(3)]
#[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))]
pub fn cancel_ban(origin: OriginFor<T>, banned: T::AccountId) -> DispatchResult {
ensure_root(origin)?;
Expand All @@ -339,6 +343,7 @@ pub mod pallet {
}

/// Set openness of the elections
#[pallet::call_index(4)]
#[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))]
pub fn set_elections_openness(
origin: OriginFor<T>,
Expand Down
4 changes: 4 additions & 0 deletions pallets/snarcos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ pub mod pallet {
///
/// `key` can come from any proving system - there are no checks that verify it, in
/// particular, `key` can contain just trash bytes.
#[pallet::call_index(0)]
#[pallet::weight(T::WeightInfo::store_key(key.len() as u32))]
pub fn store_key(
_origin: OriginFor<T>,
Expand All @@ -123,6 +124,7 @@ pub mod pallet {
/// Deletes a key stored under `identifier` in `VerificationKeys` map.
///
/// Can only be called by a root account.
#[pallet::call_index(1)]
#[pallet::weight(T::DbWeight::get().writes(1))]
pub fn delete_key(
origin: OriginFor<T>,
Expand All @@ -138,6 +140,7 @@ pub mod pallet {
///
/// Fails if `key.len()` is greater than `MaximumVerificationKeyLength`.
/// Can only be called by a root account.
#[pallet::call_index(2)]
#[pallet::weight(T::WeightInfo::overwrite_key(key.len() as u32))]
pub fn overwrite_key(
origin: OriginFor<T>,
Expand Down Expand Up @@ -181,6 +184,7 @@ pub mod pallet {
ProvingSystem::Marlin => T::WeightInfo::verify_marlin(),
}
)]
#[pallet::call_index(3)]
pub fn verify(
_origin: OriginFor<T>,
verification_key_identifier: VerificationKeyIdentifier,
Expand Down