1. Jan 28, 2020
  2. Jan 27, 2020
  3. Jan 24, 2020
  4. Jan 23, 2020
  5. Jan 20, 2020
    • thiolliere's avatar
      Pallet session new API (#4609) · 1f9d09d5
      thiolliere authored
      * Initial work
      
      * Fix most things
      
      * fix test
      
      * fix old comment
      
      * migration
      
      * fix
      
      * remove useless stuff
      
      * fix
      
      * less spaghetti implementation
      
      * fix initial session
      
      * fix
      1f9d09d5
  6. Jan 17, 2020
  7. Jan 14, 2020
  8. Jan 13, 2020
  9. Jan 10, 2020
    • Kian Paimani's avatar
      Fix runners-up candidacy submission check in council (#4592) · dc4216a5
      Kian Paimani authored
      * fix is_runner()
      
      * add a test
      
      * Bump
      dc4216a5
    • Bastian Köcher's avatar
      Remove requirement on `Hash = H256`, make `Proposer` return `StorageChanges` and `Proof` (#3860) · 4ed0ad6f
      Bastian Köcher authored
      
      
      * Extend `Proposer` to optionally generate a proof of the proposal
      
      * Something
      
      * Refactor sr-api to not depend on client anymore
      
      * Fix benches
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * Apply suggestions from code review
      
      * Introduce new `into_storage_changes` function
      
      * Switch to runtime api for `execute_block` and don't require `H256`
      anywhere in the code
      
      * Put the `StorageChanges` into the `Proposal`
      
      * Move the runtime api error to its own trait
      
      * Adds `StorageTransactionCache` to the runtime api
      
      This requires that we add `type NodeBlock = ` to the
      `impl_runtime_apis!` macro to work around some bugs in rustc :(
      
      * Remove `type NodeBlock` and switch to a "better" hack
      
      * Start using the transaction cache from the runtime api
      
      * Make it compile
      
      * Move `InMemory` to its own file
      
      * Make all tests work again
      
      * Return block, storage_changes and proof from Blockbuilder::bake()
      
      * Make sure that we use/set `storage_changes` when possible
      
      * Add test
      
      * Fix deadlock
      
      * Remove accidentally added folders
      
      * Introduce `RecordProof` as argument type to be more explicit
      
      * Update client/src/client.rs
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * Update primitives/state-machine/src/ext.rs
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * Integrates review feedback
      
      * Remove `unsafe` usage
      
      * Update client/block-builder/src/lib.rs
      
      Co-Authored-By: default avatarBenjamin Kampmann <[email protected]>
      
      * Update client/src/call_executor.rs
      
      * Bump versions
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      4ed0ad6f
    • Tomasz Drwięga's avatar
      Add documentation to SubmitSignedTransaction and actually make it work (#4200) · 89743498
      Tomasz Drwięga authored
      
      
      * Add documentation to signed transactions and actually make them work.
      
      * Fix naming and bounds.
      
      * Forgotten import.
      
      * Remove warning.
      
      * Make accounts optional, fix logic.
      
      * Split the method to avoid confusing type error message.
      
      * Move executor tests to integration.
      
      * Add submit transactions tests.
      
      * Make `submit_transaction` tests compile
      
      * Remove a file that was accidently committed
      
      * Add can_sign helper function.
      
      * Fix compilation.
      
      * Add a key to keystore.
      
      * Fix the tests.
      
      * Remove env_logger.
      
      * Fix sending multiple transactions.
      
      * Remove commented code.
      
      * Bring back criterion.
      
      * Remove stray debug log.
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Make sure to initialize block correctly.
      
      * Initialize block for offchain workers.
      
      * Add test for transaction validity.
      
      * Fix tests.
      
      * Review suggestions.
      
      * Remove redundant comment.
      
      * Make sure to use correct block number of authoring.
      
      * Change the runtime API.
      
      * Support both versions.
      
      * Bump spec version, fix RPC test.
      
      Co-authored-by: default avatarHernando Castano <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      89743498
    • Shawn Tabrizi's avatar
      Introduce `OnReapAccount` (#4585) · f1cc6715
      Shawn Tabrizi authored
      * Initial run and gun at `OnReapAccount`
      
      * Fix some imports
      
      * More fixes
      
      * Whitespace
      
      * More wack-a-mole
      
      * Gotta catch em all
      
      * Update lib.rs
      
      * Small doc update
      
      * Whitespace
      f1cc6715
  10. Jan 09, 2020
  11. Jan 08, 2020
  12. Jan 05, 2020
  13. Jan 03, 2020
  14. Jan 02, 2020
  15. Dec 24, 2019
  16. Dec 22, 2019
  17. Dec 19, 2019
    • Bastian Köcher's avatar
      Make `decl_error!` errors usable (#4449) · fef0e752
      Bastian Köcher authored
      * Make `decl_error!` errors usable
      
      This pr implements support for returning errors of different pallets in
      a pallet. These errors need to be declared with `decl_error!`.
      
      The pr changes the following:
      
      - Each dispatchable function now returns a `DispatchResult` which is an
      alias for `Result<(), DispatchError>`.
      - `DispatchError` is an enum that has 4 variants:
        - `Other`: For storing string error messages
        - `CannotLookup`: Variant that is returned when something returns a
        `sp_runtime::LookupError`
        - `BadOrigin`: Variant that is returned for any kind of bad origin
        - `Module`: The error of a specific module. Contains the `index`,
        `error` and the `message`. The index is the index of the module in
        `construct_runtime!`. `error` is the index of the error in the error
        enum declared by `decl_error!`. `message` is the message to the error
        variant (this will not be encoded).
      - `construct_runtime!` now creates a new struct `ModuleToIndex`. This
      struct implements the trait `ModuleToIndex`.
      - `frame_system::Trait` has a new associated type: `ModuleToIndex` that
      expects the `ModuleToIndex` generated by `construct_runtime!`.
      - All error strings returned in any module are being converted now to `DispatchError`.
      - `BadOrigin` is the default error returned by any type that implements `EnsureOrigin`.
      
      * Fix frame system benchmarks
      fef0e752
  18. Dec 17, 2019
  19. Dec 16, 2019
    • Tomasz Drwięga's avatar
      [big refactor] Remove crate aliasing. (#4395) · 40a16efe
      Tomasz Drwięga authored
      * Rename: Phase 1.
      
      * Unify codec.
      
      * Fixing: Phase 2
      
      * Fixing: Phase 3.
      
      * Fixing: Phase 4.
      
      * Fixing: Phase 5.
      
      * Fixing: Phase 6.
      
      * Fixing: Phase 7.
      
      * Fixing: Phase 8. Tests
      
      * Fixing: Phase 9. Tests!!!
      
      * Fixing: Phase 10. Moar tests!
      
      * Finally done!
      
      * More fixes.
      
      * Rename primitives:: to sp_core::
      
      * Apply renames in finality-grandpa.
      
      * Fix benches.
      
      * Fix benches 2.
      
      * Revert node-template.
      
      * Fix frame-system in our modules.
      40a16efe
  20. Dec 10, 2019
  21. Dec 06, 2019
  22. Dec 02, 2019
  23. Dec 01, 2019
  24. Nov 28, 2019
    • Svyatoslav Nikolsky's avatar
      Recover transaction pool on light client (#3833) · 2ffaf054
      Svyatoslav Nikolsky authored
      
      
      * recover tx pool on light client
      
      * revert local tests fix
      
      * removed import renamings
      
      * futures03::Future -> std::future::Future
      
      * Update core/transaction-pool/graph/src/error.rs
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * replace remove_from_ready with remove_invalid
      
      * avoid excess hashing
      
      * debug -> warn
      
      * TransactionPool + BasicTransactionPool
      
      * pause future tx reject when resubmitting
      
      * bump impl_version to make CI happy
      
      * and revert back local test fixes
      
      * alter doc to restart CI
      
      * Transaction::clone() -> Transaction::duplicate()
      
      * transactions -> updated_tranasctions
      
      * remove explicit consensus-common ref
      
      * ::std:: -> std::
      
      * manual set/unset flag -> calling clusore with given flag value
      
      * removed comments
      
      * removed force argument
      
      * BestIterator -> Box<Iterator>
      
      * separate crate for TxPool + Maintainer trait
      
      * long line fix
      
      * pos-merge fix
      
      * fix benches compilation
      
      * Rename txpoolapi to txpool_api
      
      * Clean up.
      
      * Finalize merge.
      
      * post-merge fix
      
      * Move transaction pool api to primitives directly.
      
      * Consistent naming for txpool-runtime-api
      
      * Warn about missing docs.
      
      * Move  abstraction for offchain calls to tx-pool-api.
      
      * Merge RPC instantiation.
      
      * Update cargo.lock
      
      * Post merge fixes.
      
      * Avoid depending on client.
      
      * Fix build
      2ffaf054
  25. Nov 27, 2019
    • asynchronous rob's avatar
      safe multi-era slashing for NPoS (#3846) · b853a4f9
      asynchronous rob authored
      
      
      * define slashing spans
      
      * tests and pruning for slashing-spans record
      
      * validators get slashed before nominators
      
      * apply slash to nominators as well
      
      * chill and end slashing spans
      
      * actually perform slashes
      
      * integration (tests failing)
      
      * prune metadata
      
      * fix compilation
      
      * some tests for slashing and metadata garbage collection
      
      * correctly pass session index to slash handler
      
      * test span-max property for nominators and validators
      
      * test that slashes are summed correctly
      
      * reward value computation
      
      * implement rewarding
      
      * add comment about rewards
      
      * do not adjust slash fraction in offences module
      
      * fix offences tests
      
      * remove unused new_offenders field
      
      * update runtime version
      
      * fix up some docs
      
      * fix some CI failures
      
      * remove no-std incompatible vec! invocation
      
      * try to fix span-max rounding error
      
      * Update srml/staking/src/slashing.rs
      
      Fix type: winow -> window
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * slashes from prior spans don't kick validator again
      
      * more information for nominators, suppression
      
      * ensure ledger is consistent with itself post-slash
      
      * implement slash out of unlocking funds also
      
      * slashing: create records to be applied after-the-fact
      
      * queue slashes for a few eras later
      
      * method for canceling deferred slashes
      
      * attempt to fix test in CI
      
      * storage migration for `Nominators`
      
      * update node-runtime to use SlashDeferDuration
      
      * adjust migration entry-points somewhat
      
      * fix migration compilation
      
      * add manual Vec import to migration
      
      * enable migrations feature in node-runtime
      
      * bump runtime version
      
      * update to latest master crate renames
      
      * update to use ensure-origin
      
      * Apply suggestions from code review
      
      use `ensure!`
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * fix multi-slash removal
      
      * initialize storage version to current in genesis
      
      * add test for version initialization
      b853a4f9
    • thiolliere's avatar
      Implement all storage after prefix (#4227) · a512dcdd
      thiolliere authored
      * Implement all storage after prefix
      
      * fix test, bump version and fix doc
      
      * bump metadata version
      
      * Update frame/support/procedural/src/storage/storage_struct.rs
      a512dcdd
  26. Nov 25, 2019
    • Alexey's avatar
      Refactor `construct_runtime` to procedural (#3810) · 298b6324
      Alexey authored
      
      
      * interim
      
      * interim
      
      * interim
      
      * first working section
      
      * cleanup
      
      * finished parsing
      
      * cleanup
      
      * added system module search
      
      * added clone and find_entry
      
      * generic find_module_entry
      
      * interim
      
      * working event
      
      * added generic event with no instance error
      
      * cleanup
      
      * added decl origin
      
      * cleanup
      
      * added all modules
      
      * added outer dispatch
      
      * added modules expansion
      
      * refactored transformations
      
      * updated error message
      
      * added resolve mechanics
      
      * added metadata
      
      * finished config
      
      * finished inherents
      
      * added validate_unsigned
      
      * added compares
      
      * cleanup
      
      * cleanup
      
      * cleanup
      
      * fix
      
      * updated modules for last one wins
      
      * cleanup
      
      * made nested modules
      
      * updated impl version
      
      * removed comment
      
      * cleanup
      
      * added ui tests
      
      * added optional comma
      
      * removed unnecessary to string cast
      
      * removed no compile
      
      * cleanup
      
      * fmt
      
      * returned nocompile
      
      * Update srml/support/procedural/src/construct_runtime/parse.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * added where definition
      
      * updated ui tests
      
      * updated ui test cases
      
      * added test case
      
      * updated tests
      
      * interim
      
      * added parse for module part
      
      * removed totokens
      
      * fixes
      
      * fixed multiple iter
      
      * changed TokenStream
      
      * fmt
      
      * updated trybuild
      
      * added test for arguments
      
      * fmt
      
      * fixes + more tests
      
      * fixes
      
      * fmt
      
      * rolled back runtime
      
      * minor fixes
      
      * empty
      
      * fixes
      
      * fmt
      
      * Update paint/support/procedural/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update paint/support/procedural/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update paint/support/procedural/src/construct_runtime/parse.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * interim
      
      * refactored seen_keys
      
      * refactored hash_set
      
      * Update paint/support/procedural/src/construct_runtime/mod.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * refactored find
      
      * fix
      
      * fixed all_modules
      
      * added double declaration check
      
      * small fix
      
      * fmt
      
      * fix
      
      * fix default
      
      * format
      298b6324
  27. Nov 22, 2019
    • Sergey Pepyakin's avatar
      Renaming and documentation for ApplyResult, ApplyOutcome and et al (#4134) · d88fff59
      Sergey Pepyakin authored
      
      
      * Remove superflous errors from the system module
      
      * Rename and document InclusionOutcome
      
      * Rename InclusionError
      
      * Remove unused inclusion errors.
      
      I left the enumeration though since other elements might be used some day.
      
      * Rename and document DispatchOutcome
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * TransactionValidityError instead of InclusionError
      
      * Rename InclusionOutcome to ApplyExtrinsicResult
      
      * Update docs.
      
      * Update lib.rs
      
      should be → is
      
      * Bump the block builder API version.
      
      * Fix the should_return_runtime_version test
      
      * Clean the evidence
      d88fff59
    • Tomasz Drwięga's avatar
      Offchain execution extensions (#4145) · 06f6daab
      Tomasz Drwięga authored
      * Pass Extensions instead of individual objects.
      
      * Move TransactionPool to a separate ExternalitiesExtension.
      
      * Fix compilation.?
      
      * Clean up.
      
      * Refactor testing utilities.
      
      * Add docs, fix tests.
      
      * Fix doctest.
      
      * Fix formatting and add some logs.
      
      * Add some docs.
      
      * Remove unused files.
      06f6daab
    • Gavin Wood's avatar
      Publish the dispatch info in extrinsic events (#4148) · 371074cb
      Gavin Wood authored
      * Publish the dispatch info in extrinsic events
      
      Place the DispatchInfo (which contains weight information about the
      extrinsic that is otherwise difficult to determine) in the dispatch
      result value.
      
      * Runtime bump.
      
      * Fix build
      
      * Fix tests
      
      * Fix build?
      371074cb