From e436e3323ce92adf41e7dced5e21efc5b6bdb2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Thu, 9 Feb 2023 11:46:28 +0100 Subject: [PATCH 1/3] Add call indices to pallets --- pallets/aleph/src/lib.rs | 2 ++ pallets/elections/src/lib.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pallets/aleph/src/lib.rs b/pallets/aleph/src/lib.rs index a7198039b9..d7a43ff627 100644 --- a/pallets/aleph/src/lib.rs +++ b/pallets/aleph/src/lib.rs @@ -210,6 +210,7 @@ pub mod pallet { impl Pallet { /// 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, @@ -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, diff --git a/pallets/elections/src/lib.rs b/pallets/elections/src/lib.rs index 747da8cad9..6fc35bc628 100644 --- a/pallets/elections/src/lib.rs +++ b/pallets/elections/src/lib.rs @@ -228,6 +228,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight((T::BlockWeights::get().max_block, DispatchClass::Operational))] pub fn change_validators( origin: OriginFor, @@ -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, @@ -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, @@ -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, banned: T::AccountId) -> DispatchResult { ensure_root(origin)?; @@ -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, From e73c0146231023891623c02acb3c7500f6320990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Thu, 9 Feb 2023 11:59:08 +0100 Subject: [PATCH 2/3] Snarcos indices --- pallets/snarcos/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pallets/snarcos/src/lib.rs b/pallets/snarcos/src/lib.rs index 765762289d..96b7d48b10 100644 --- a/pallets/snarcos/src/lib.rs +++ b/pallets/snarcos/src/lib.rs @@ -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, @@ -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, @@ -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, @@ -181,6 +184,7 @@ pub mod pallet { ProvingSystem::Marlin => T::WeightInfo::verify_marlin(), } )] + #[pallet::call_index(3)] pub fn verify( _origin: OriginFor, verification_key_identifier: VerificationKeyIdentifier, From b346f0c2dba5c6fd72436effc86f91907bb6ec46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20J=C4=99drzejewski?= Date: Thu, 9 Feb 2023 13:35:24 +0100 Subject: [PATCH 3/3] Change libssl version in cliain. --- bin/cliain/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cliain/Dockerfile b/bin/cliain/Dockerfile index 9c123ed38c..afd520a97e 100644 --- a/bin/cliain/Dockerfile +++ b/bin/cliain/Dockerfile @@ -11,8 +11,8 @@ RUN apt update && \ RUN update-ca-certificates -RUN wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb -RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb +RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb +RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb COPY target/release/cliain /usr/local/bin RUN chmod +x /usr/local/bin/cliain