1. Aug 25, 2023
  2. Aug 02, 2023
    • drskalman's avatar
      Support for multiple signature scheme for BEEFY primitves (#14373) · 3fef703e
      drskalman authored
      
      
      * Merged BEEFY primitives with generic signature and keyset commitment support from old pull to current code
      
      * - Add bls-experimental feature to application-crypto and beefy primitives
      - Fix remaining crypto -> ecdsa_crypto
      - code build but not tests
      
      * Make beefy primitive tests compile
      
      * move bls related beefy primitives code and test behind bls-experimental flag
      
      * Make BEEFY clients complies with BEEFY API depending on AuthorityId
      
      * - Rename `BeefyAuthoritySet.root` → `BeefyAuthoritySet.keyset_commitment`.
      - Remove apk proof keyset_commitment from `BeefyAuthoritySet`.
      - Fix failing signed commitment and signature to witness test.
      - Make client compatible with BeefyAPI generic on AuthorityId.
      - `crypto` → `ecdsa_crypto` in BEEFY client and frame.
      
      * Commit Cargo lock remove ark-serialize from BEEFY primitives
      
      * Use Codec instead of Encode + Decode in primitives/consensus/beefy/src/lib.rs
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * - Make `BeefyApi` generic over Signature type.
      - Make new `BeeyApi` functinos also generic over AuthorityId and Signature
      
      * Unmake BeefyAPI generic over Signature. Recover Signature type from AuthId.
      
      * - dont use hex or hex-literal use array-bytes instead in beefy primitives and bls crypto.
      - CamelCase ECDSA and BLS everywhere.
      
      * Move the definition of BEEFY key type from `primitives/beefy` to `crypto.rs` according to new convention.
      
      * - Add bls377_generate_new to `sp-io` and `application_crypto::bls`.
      - Add `bls-experimental` to `sp-io`
      
      Does not compile because PassByCodec can not derive PassBy using customly implemented PassByIner.
      
      * Implement PassBy for `bls::Public` manually
      
      * fix Beefy `KEY_TYPE` in `frame/beefy` tests to come from `sp-core::key_types` enum
      
      * specify both generic for `hex2array_unchecked` in `sp-core/bls.rs`
      
      * Rename `crypto`→`ecdsa_crypto` in `primitives/consensus/beefy/src/test_utils.rs` docs
      
      * remove commented-out code in `primitives/consensus/beefy/src/commitment.rs`
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * Fix inconsistency in panic message in  `primitives/io/src/lib.rs`
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * Remove redundant feature activation in `primitives/io/Cargo.toml`
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * - make `w3f-bls` a dev-dependancy only for beefy primitives.
      
      - clean up comments.
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * export BEEFY KEY_TYPE from primitives/consensus/beefy
      make `frame/consensus/beefy` in dependent of sp_crypto_app
      use consistent naming in the beefy primitive tests.
      
      * - implement `BeefyAuthorityId` for `bls_crypto::AuthorityId`.
      - implement `bls_verify_works` test for BEEFY `bls_crypto`.
      
      * Remove BEEFY `ecdsa_n_bls_crypto` for now for later re-introduction
      
      * Make commitment and witness BEEFY tests not use Keystore.
      
      * put `bls_beefy_verify_works` test under `bls-experimental` flag.
      
      * bump up Runtime `BeefyAPI` to version 3 due to introducing generic AuthorityId.
      
      * reuse code and encapsulate w3f-bls backend in sp-core as most as possible
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * Make comments in primities BEEFY `commitment.rs` and `witness.rs``tests convention conforming
      
      * Use master dep versions
      
      * Trivial change. Mostly to trigger CI
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Fix Cargo.toml
      
      * Trigger CI with cumulus companion
      
      * Trigger CI after polkadot companion change
      
      ---------
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarAndré Silva <[email protected]>
      3fef703e
  3. May 31, 2023
    • Adrian Catangiu's avatar
      pallet-beefy-mmr: fix when using custom hashing (#14273) · b43a1b0b
      Adrian Catangiu authored
      
      
      `Hash` is no longer part of `pallet_mmr::Config`, but this code
      would still build because it assumes we're referring to underlying
      `<pallet_mmr::Config as frame_system::Config>::Hash` which is not
      what we want when using different hashing between `frame_system`
      and `pallet_mmr`.
      
      Disambiguate by using correct `pallet_mmr::Config::Hashing` type.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      b43a1b0b
  4. May 17, 2023
    • Bigna Härdi's avatar
      Add `serde` feature flag to primitives (#13027) · 0e49ed72
      Bigna Härdi authored
      
      
      * add serde_full feature flag
      
      add serde_full to sp_runtime
      
      add space to toml
      
      add serde_full to application-crypto
      
      add serde_full to arithmetic
      
      fix arithmetic
      
      add serde full to beefy
      
      add serde full to consensus
      
      add serde_full to core
      
      add serdefull to finality grandpa
      
      add serde_full to several primitives crates
      
      make rpc no_std compatible
      
      add scale info to runtime
      
      make serializer no_std compatible
      
      add serde full to storage
      
      add full serde to version
      
      add serde full to weights
      
      add all serde_full features
      
      add . to comment
      
      add missing impl-serde
      
      fix no-std build
      
      fix build
      
      add full_crypto to serde_full
      
      serde_full also implements crypto
      
      full_serde does not work with full_crytpo. needs std
      
      no no_std serde impl possible
      
      also for crypto std is necessary
      
      no serde full for application crypto
      
      fix arithmetic
      
      fix tomls
      
      fix some things
      
      impl fmt for Signature
      
      add serialize to Public
      
      add impl_maybe_marker_serde_full
      
      fix sp-application-crypto toml
      
      add serde feature flag
      
      fix clippy
      
      fix toml grandpa
      
      fix grandpa
      
      rename if_std to if_serde
      
      keystore is not no_std compatible
      
      make keystore vrf no_std compatible
      
      fix nopos-elections
      
      fix rpc
      
      fix serializer
      
      fix test-primitives
      
      fix version
      
      add comment
      
      add serde full only import for format string
      
      remove all(serde_full and full_crypot) as serde_full enforces full_crypto
      
      make comment better readable
      
      even better comment
      
      clean up rpc toml
      
      clean up toml
      
      clean up serializer toml
      
      clean up storage toml
      
      fix std build
      
      update .lock
      
      fix sp-version
      
      move sp_std import
      
      test extern crate alloc
      
      replace sp_std with core
      
      add missing core
      
      sp_core: serde feature do not enforce full crypto
      
      application-crypto: serde feature do not enforce full crypto
      
      rename serde_full to serde
      
      add dep:serde and alloc to default feature
      
      add full_crypto and remove unnecessary debu/fmt impls for serde
      
      update comment
      
      remove obolsete change in display AccountId32
      
      remove extra changes
      
      minimize diff
      
      revert keystore changes
      
      remove std from keystore
      
      remove full-crypto feature
      
      fix serde import
      
      fix comment
      
      fix feature = serde
      
      * rename serde_full to serde
      
      * move #[doc(hidden)] back
      
      * remove feature = full crypto require frm MultiSigner
      
      * reorder serde and scale_info import
      
      * fix bs58 missing alloc import in serde feature
      
      * add `from_string` to serde feature and add unimplemented
      
      * remove serde feature from fixed_point display
      
      * Remove serde/alloc
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * Update primitives/consensus/babe/Cargo.toml
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/arithmetic/src/fixed_point.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * revert `from_string`fixed impl back to std only
      
      * remove duplicate runtime string impl
      
      * use sp_std::alloc
      
      * remove no_std compatible rpc
      
      * remove no_std compatibility from serializer
      
      * rename mpl_maybe_marker_serde to std_or_serde
      
      * update .lock
      
      * add sp-std to executor
      
      * fix sp-std import
      
      * fix sp_std::format import
      
      * use crate import
      
      * add serde feature
      
      * Update primitives/core/src/lib.rs
      
      ---------
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      0e49ed72
  5. Apr 11, 2023
  6. Mar 20, 2023
    • Davide Galassi's avatar
      Keystore overhaul (iter 2) (#13634) · 480396fe
      Davide Galassi authored
      * Remove bloat about remote keystore
      
      * Update docs and remove unused 'KeystoreRef' trait
      
      * Use wherever possible, MemoryKeystore for testing
      
      * Remove unrequired fully qualified method syntax for Keystore
      480396fe
  7. Mar 17, 2023
    • Davide Galassi's avatar
      Keystore overhaul (#13615) · f110941b
      Davide Galassi authored
      * Remove 'supported_keys' 'sign_with_any' and 'sign_with_all' from keystore trait
      
      * Remove the aync keystore
      
      * Renaming:
      - SyncCryptoStore -> Keystore
      - SyncCryptoStorePtr -> KeystorePtr
      - KeyStore -> MemoryKeystore
      
      * Fix authority discovery worker and tests
      
      * Rename 'insert_unknown' to 'insert'
      
      * Remove leftover
      f110941b
  8. Mar 03, 2023
  9. Feb 28, 2023