1. Oct 24, 2023
  2. Oct 20, 2023
    • Bastian Köcher's avatar
      `xcm`: Change `TypeInfo::path` to not include `staging` (#1948) · f3bf5c1a
      Bastian Köcher authored
      The `xcm` crate was renamed to `staging-xcm` to be able to publish it to
      crates.io as someone as squatted `xcm`. The problem with this rename is
      that the `TypeInfo` includes the crate name which ultimately lands in
      the metadata. The metadata is consumed by downstream users like
      `polkadot-js` or people building on top of `polkadot-js`. These people
      are using the entire `path` to find the type in the type registry. Thus,
      their code would break as the type path would now be [`staging_xcm`,
      `VersionedXcm`] instead of [`xcm`, `VersionedXcm`]. This pull request
      fixes this by renaming the path segment `staging_xcm` to `xcm`.
      
      This requires: https://github.com/paritytech/scale-info/pull/197
      
      
      
      ---------
      
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      f3bf5c1a
  3. Oct 16, 2023
  4. Sep 29, 2023
  5. Sep 25, 2023
  6. Sep 05, 2023
  7. Sep 04, 2023
  8. Aug 31, 2023
    • Davide Galassi's avatar
      Sassafras primitives (#1249) · f1f79371
      Davide Galassi authored
      * Introduce Sassafras primitives
      
      * Keystore workaround
      
      * Fix doc
      
      * Use  in keystore
      
      * Improve bandersnatch vrf docs
      
      * Apply review suggestions
      
      * Update README
      
      * Docs improvement
      
      * Docs fix
      f1f79371
  9. Aug 30, 2023
  10. Aug 29, 2023
  11. Aug 25, 2023
  12. Aug 23, 2023
  13. Aug 17, 2023
  14. 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
  15. Aug 01, 2023
  16. Jul 25, 2023
  17. Jul 11, 2023
    • Bastian Köcher's avatar
      Removal of execution strategies (#14387) · 5eb816d7
      Bastian Köcher authored
      
      
      * Start
      
      * More work!
      
      * Moar
      
      * More changes
      
      * More fixes
      
      * More worrk
      
      * More fixes
      
      * More fixes to make it compile
      
      * Adds `NoOffchainStorage`
      
      * Pass the extensions
      
      * Small basti making small progress
      
      * Fix merge errors and remove `ExecutionContext`
      
      * Move registration of `ReadRuntimeVersionExt` to `ExecutionExtension`
      
      Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to
      `ExecutionExtension` which provides the default extensions.
      
      * Fix compilation
      
      * Register the global extensions inside runtime api instance
      
      * Fixes
      
      * Fix `generate_initial_session_keys` by passing the keystore extension
      
      * Fix the grandpa tests
      
      * Fix more tests
      
      * Fix more tests
      
      * Don't set any heap pages if there isn't an override
      
      * Fix small fallout
      
      * FMT
      
      * Fix tests
      
      * More tests
      
      * Offchain worker custom extensions
      
      * More fixes
      
      * Make offchain tx pool creation reusable
      
      Introduces an `OffchainTransactionPoolFactory` for creating offchain transactions pools that can be
      registered in the runtime externalities context. This factory will be required for a later pr to
      make the creation of offchain transaction pools easier.
      
      * Fixes
      
      * Fixes
      
      * Set offchain transaction pool in BABE before using it in the runtime
      
      * Add the `offchain_tx_pool` to Grandpa as well
      
      * Fix the nodes
      
      * Print some error when using the old warnings
      
      * Fix merge issues
      
      * Fix compilation
      
      * Rename `babe_link`
      
      * Rename to `offchain_tx_pool_factory`
      
      * Cleanup
      
      * FMT
      
      * Fix benchmark name
      
      * Fix `try-runtime`
      
      * Remove `--execution` CLI args
      
      * Make clippy happy
      
      * Forward bls functions
      
      * Fix docs
      
      * Update UI tests
      
      * Update client/api/src/execution_extensions.rs
      
      Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/cli/src/params/import_params.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/api/src/execution_extensions.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Pass the offchain storage to the MMR RPC
      
      * Update client/api/src/execution_extensions.rs
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      
      * Review comments
      
      * Fixes
      
      ---------
      
      Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
      Co-authored-by: default avatarKoute <[email protected]>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      5eb816d7
  18. Jul 06, 2023
  19. Jun 27, 2023
  20. Jun 21, 2023
  21. May 31, 2023
  22. May 29, 2023
  23. May 18, 2023
    • Michal Kucharczyk's avatar
      Added serde feature to sp-consensus-aura (#14166) · 580efaec
      Michal Kucharczyk authored
      This is followup of #13027.
      
      `Aura` need to enable `serde` feature in dependent crates, otherwise
      test-substrate-runtime compilation fails with the following error if
      `serde` is enabled:
      
      ```
        error: cannot find macro `format` in this scope
          -->
      /home/miszka/parity/10-genesis-config/substrate-master/primitives/consensus/aura/src/lib.rs:50:3
           |
        50 |         app_crypto!(ed25519, AURA);
           |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
           |
           = help: consider importing one of these items:
                   scale_info::prelude::format
                   sp_application_crypto::format
           = note: this error originates in the macro
      `$crate::app_crypto_public_common_if_serde` which comes from the
      expansion of the macro `app_crypto` (in Nightly builds, run with -Z
      macro-backtrace for more info)
      ```
      580efaec
  24. 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
  25. May 04, 2023
    • Davide Galassi's avatar
      Refinements to VRF types (#14036) · 3a90728d
      Davide Galassi authored
      * Allow extra signing data
      
      * Fix tests after renaming
      
      * Rename VrfSecret/VrfVerifier to VrfSecret/VrfPublic
      
      * Further encrapsulation of 'transcript' type to the sr25519 implementation
      
      * Keystore sr25519 pre-output
      
      * Leave additional custom input field hidden in the associated VrfInput type
      
      * Fix test
      
      * More ergonomic output_bytes
      
      * Trigger pipeline
      
      * Define a separated type for vrf signature data
      
      * Fix docs
      
      * Fix doc
      
      * Remove annotation
      
      * Directly use dleq_proove and dleq_verify in sr25519
      
      * Trigger CI
      
      * Remove cruft before merge
      3a90728d
  26. Apr 19, 2023
    • Davide Galassi's avatar
      VRF refactory (#13889) · bb394e08
      Davide Galassi authored
      
      
      * First iteration to encapsulate schnorrkel and merlin usage
      
      * Remove schnorkel direct dependency from BABE pallet
      
      * Remove schnorrkel direct dependency from BABE client
      
      * Trivial renaming for VrfTranscript data and value
      
      * Better errors
      
      * Expose a function to get a schnorrkel friendly transcript
      
      * Keep the vrf signature stuff together (preventing some clones around)
      
      * Fix tests
      
      * Remove vrf agnostic transcript and define it as an associated type for VrfSigner and VrfVerifier
      
      * Fix babe pallet mock
      
      * Inner types are required to be public for polkadot
      
      * Update client/consensus/babe/src/verification.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Nit
      
      * Remove Deref implementations
      
      * make_bytes as a method
      
      * Trigger CI
      
      ---------
      
      Co-authored-by: default avatarKoute <[email protected]>
      bb394e08
  27. Apr 12, 2023
  28. Apr 11, 2023
  29. Mar 24, 2023
    • Davide Galassi's avatar
      Keystore overhaul (final) (#13683) · 40e1704e
      Davide Galassi authored
      
      
      * Introduce keystore specialized sign methods
      
      * Get rid of 'AppKey::UntypedGeneric' associated type.
      
      Untyped generics are accessible using associated types 'Generic' associated type.
      I.e. <T as AppKey>::Public::Generic
      
      * Get rid of 'CryptoTypePublicPair'
      
      * Trivial fix
      
      * Small refactory of local keystore implementations
      
      * Remove 'crypto_id' method from 'Public'
      
      * Trivial rename of 'AppKey' to 'AppCrypto'
      
      * Remove unused import
      
      * Improve docs
      
      * Better signature related errors for authority-discovery
      
      * Apply review suggestion
      
      * Apply review suggestions
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Authority discoverty signing error revisited
      
      * Signing error revisited for babe and aura as well
      
      * Further cleanup
      
      ---------
      
      Co-authored-by: default avatarKoute <[email protected]>
      40e1704e
  30. 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
  31. Mar 17, 2023
    • Davide Galassi's avatar
      Bump grandpa to 0.16.2 (#13622) · bc2724f0
      Davide Galassi authored
      bc2724f0
    • 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
  32. Mar 07, 2023
    • Davide Galassi's avatar
      Offences report system rework (#13425) · 9dd10d13
      Davide Galassi authored
      * Experiments with common equivocation trait
      
      * Improved equivocation trait
      
      * Fix grandpa equivocation implementation
      
      * Remove some cruft
      
      * Remove some more cruft
      
      * More generic naming
      
      * Simplification of offences manipilation
      
      * More refactory
      
      * Some prograss with the encapsulation of offence report system
      
      * Finally unit type works as a universal null report system
      
      * Align substrate node code
      
      * Further simplification
      
      * Fix test utils
      
      * Remove not required associated type
      
      * Fix benches
      
      * Rollback to prev field name
      
      * Box big params
      
      * Fix typo
      
      * Remove new tag computation
      
      * Remove default implementations
      
      * Better docs
      
      * Return 'Result' instead of bool
      
      * Change offence report system return types
      
      * Some renaming and documentation
      
      * Improve documentation
      
      * More abstract offence report system
      
      * Rename 'consume_evidence' to 'process_evidence'
      
      * Further docs refinements
      
      * Doc for dummy offence report
      
      * Fix rustdoc
      
      * Fix after master merge
      
      * Apply code review suggestions
      
      * Improve docs
      9dd10d13
    • André Silva's avatar
      consensus: remove caching functionality from block import pipeline (#13551) · 13b0f24a
      André Silva authored
      * consensus: remove caching functionality from block import pipeline
      
      * client: update docs on Verifier::verify
      
      * node: fix block production benchmark
      13b0f24a
  33. Mar 03, 2023