1. Aug 01, 2023
  2. Jul 25, 2023
  3. 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
  4. Jul 06, 2023
  5. Jun 27, 2023
  6. Jun 21, 2023
  7. May 31, 2023
  8. May 29, 2023
  9. 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
  10. 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
  11. 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
  12. 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
  13. Apr 12, 2023
  14. Apr 11, 2023
  15. 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
  16. 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
  17. 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
  18. 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
  19. Mar 03, 2023
  20. Mar 01, 2023
  21. Feb 28, 2023
  22. Feb 27, 2023
  23. Feb 21, 2023
    • Vivek Pandya's avatar
      Remove years from copyright notes. (#13415) · bc53b9a0
      Vivek Pandya authored
      * Change copyright year to 2023 from 2022
      
      * Fix incorrect update of copyright year
      
      * Remove years from copy right header
      
      * Fix remaining files
      
      * Fix typo in a header and remove update-copyright.sh
      bc53b9a0
  24. Feb 11, 2023
  25. Feb 02, 2023
  26. Jan 19, 2023
  27. Jan 02, 2023
  28. Dec 24, 2022
    • André Silva's avatar
      babe: allow skipping over empty epochs (#11727) · 017cf703
      André Silva authored
      
      
      * babe: allow skipping epochs in pallet
      
      * babe: detect and skip epochs on client
      
      * babe: cleaner epoch util functions
      
      * babe: add test for runtime handling of skipped epochs
      
      * babe: simpler implementation of client handling of skipped epochs
      
      * babe: test client-side handling of skipped epochs
      
      * babe: add comments on client-side skipped epochs
      
      * babe: remove emptyline
      
      * babe: make it resilient to forks
      
      * babe: typo
      
      * babe: overflow-safe math
      
      * babe: add test for skipping epochs across different forks
      
      * Fix tests
      
      * FMT
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      017cf703
  29. Dec 19, 2022
    • Qinxuan Chen's avatar
      *: update `rand` to v0.8.5 (#12962) · 40c04cf1
      Qinxuan Chen authored
      * *: update rand to v0.8.5
      
      * *: remove useless deps from Cargo.toml
      
      * fix pallet-session-benchmarking
      
      * fix pallet-election-provider-support test
      
      * remove useless rand from dev-dependencies
      40c04cf1
  30. Dec 01, 2022
    • alexgparity's avatar
      Reduce provisioner work (#12749) · d20e4958
      alexgparity authored
      
      
      * Move create_inherent_data call to use side
      
      * Make provide_inherent_data async
      
      * Fix tests
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Log errors
      
      * Fix test
      
      * Fix test
      
      * fix
      
      * Deduplicate test code
      
      * fix
      
      * flag
      
      * Update client/consensus/slots/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Revert "Deduplicate test code"
      
      This reverts commit ba46adbe089329c78cd69ccdb08e27ed67bd77cf.
      
      * Fix test
      
      * remove commented out code
      
      * minor to start CI run
      
      * start CI
      
      * Update client/consensus/slots/src/lib.rs
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      
      * Apply PR suggestions
      
      * Apply PR suggestions
      
      * Update client/consensus/slots/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * minor
      
      * kickoff CI
      
      * PR suggestions
      
      * Compute remaining duration instead of using slot_info.duration
      
      * Don't rely on sub implementation for Instant
      
      * Apply PR suggestions
      
      * Use saturating_duration_since
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarMarcin S. <[email protected]>
      Co-authored-by: parity-processbot <>
      d20e4958
  31. Nov 15, 2022
  32. Oct 28, 2022
    • Bastian Köcher's avatar
      Aura: Adds some compatibility mode to support old chains (#12492) · 33b61f0e
      Bastian Köcher authored
      * Aura: Adds some compatibility mode to support old chains
      
      In https://github.com/paritytech/substrate/pull/9132
      
       we changed the way how we get the authorities
      from the runtime. Before this mentioned pr we would call `initialize_block` before calling the
      authorities runtime function. The problem with this was that when you have a block X that would
      switch the authority set, it would already be signed by an authority of the new set. This was wrong,
      as a block should only be signed by the current authority set. As this change is a hard fork, this
      pr brings back the possibility for users that have a chain running with this old logic to upgrade.
      
      They will need to use:
      ```
      CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future }
      ```
      
      Using this compatibility mode will make the node behave like the old nodes, aka calling
      `initialize_block` before doing the actual runtime call to `authorities`. Then when the given
      `until` block is being build/imported the node switches to the new behaviour of not calling
      `initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a
      point where all nodes in the network have upgraded.
      
      * Fixes
      
      * Make docs ready
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * FMT
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      33b61f0e
  33. Sep 13, 2022
    • Michal Kucharczyk's avatar
      Remove CanAuthorWith trait (#12213) · 214eb25f
      Michal Kucharczyk authored
      * Remove CanAuthorWith trait
      
      CanAuthotWith trait removed. Also all dependencies, parameters, type
      paramers were removed. This is related to removal of native runtime.
      
      * Remove commented code
      
      * Fix code formatting
      
      * trigger CI job
      
      * trigger CI job
      
      * trigger CI job
      
      * trigger CI job
      
      * trigger CI job
      
      * trigger CI job
      
      * trigger CI job
      214eb25f
  34. Sep 05, 2022
    • Davide Galassi's avatar
      Fetch Babe configuration from runtime state (#11760) · 83aec6f9
      Davide Galassi authored
      * Fetch babe config data from runtime state
      
      * Some renaming
      
      * More renaming
      
      * Final nits
      
      * Fix tests and benches
      
      * Rename  to  in BabeConfiguration
      
      * Remove duplicate babe parameter description
      
      Already specified over the 'PRIMARY_PROBABILITY' constant value
      
      * trigger pipeline
      
      * trigger pipeline
      83aec6f9
  35. Aug 26, 2022
  36. Aug 09, 2022
    • Nazar Mokrynskyi's avatar
      Network sync refactoring (part 6) (#11940) · a685582b
      Nazar Mokrynskyi authored
      * Extract `NetworkKVProvider` trait in `sc-authority-discovery` and remove unnecessary dependency
      
      * Extract `NetworkSyncForkRequest` trait in `sc-finality-grandpa`
      
      * Relax requirements on `SyncOracle` trait, remove extra native methods from `NetworkService` that are already provided by trait impls
      
      * Move `NetworkSigner` trait from `sc-authority-discovery` into `sc-network-common` and de-duplicate methods on `NetworkService`
      
      * Move `NetworkKVProvider` trait from `sc-authority-discovery` into `sc-network-common` and de-duplicate methods on `NetworkService`
      
      * Minimize `sc-authority-discovery` dependency on `sc-network`
      
      * Move `NetworkSyncForkRequest` trait from `sc-finality-grandpa` to `sc-network-common` and de-duplicate methods in `NetworkService`
      
      * Extract `NetworkStatusProvider` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkPeers` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkEventStream` trait and de-duplicate methods on `NetworkService`
      
      * Move more methods from `NetworkService` into `NetworkPeers` trait
      
      * Move `NetworkStateInfo` trait into `sc-network-common`
      
      * Extract `NetworkNotification` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkRequest` trait and de-duplicate methods on `NetworkService`
      
      * Remove `NetworkService::local_peer_id()`, it is already provided by `NetworkStateInfo` impl
      
      * Extract `NetworkTransaction` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkBlock` trait and de-duplicate methods on `NetworkService`
      
      * Remove dependencies on `NetworkService` from most of the methods of `sc-service`
      
      * Address simple review comments
      a685582b