Make BEEFY client keystore generic over BEEFY AuthorityId type (#2258)

This is the significant step to make BEEFY client able to handle both
ECDSA and (ECDSA, BLS) type signature. The idea is having BEEFY Client
generic on crypto types makes migration to new types smoother.

This makes the BEEFY Keystore generic over AuthorityId and extends its
tests to cover the case when the AuthorityId is of type (ECDSA,
BLS12-377)

---------

Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Robert Hambrock <roberthambrock@gmail.com>
This commit is contained in:
authored and GitHub committed 2024-02-08 16:08:51 +00:00
1 parent bc5a758c0c
commit 0a94124d24
22 files changed
+742 -231

No files matched your search

+8 -8
View File
@@ -15,21 +15,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::vec;
use codec::Encode;
use sp_consensus_beefy::{
check_equivocation_proof, generate_equivocation_proof, known_payloads::MMR_ROOT_ID,
Keyring as BeefyKeyring, Payload, ValidatorSet, KEY_TYPE as BEEFY_KEY_TYPE,
};
use sp_runtime::DigestItem;
use std::vec;
use frame_support::{
assert_err, assert_ok,
dispatch::{GetDispatchInfo, Pays},
traits::{Currency, KeyOwnerProofSystem, OnInitialize},
};
use sp_consensus_beefy::{
check_equivocation_proof,
known_payloads::MMR_ROOT_ID,
test_utils::{generate_equivocation_proof, Keyring as BeefyKeyring},
Payload, ValidatorSet, KEY_TYPE as BEEFY_KEY_TYPE,
};
use sp_runtime::DigestItem;
use crate::{mock::*, Call, Config, Error, Weight, WeightInfo};