1. Jul 26, 2022
    • Sebastian Kunert's avatar
      Prepare for rust 1.62.1 (#11903) · 9f409dc0
      Sebastian Kunert authored
      
      
      * Update UI test output for rust 1.62.1
      
      * switch ci to staging image to check that everything works
      
      * fix artifacts node-bench-regression-guard
      
      * Imeplement `scale_info::TypeInfo` manually to silence aggressive rust warning
      
      * Fix more clippy lints
      
      * Make clippy happy by relying on auto-deref were possible
      
      * Add tracking issue to the comments
      
      * pin ci image
      
      Co-authored-by: default avataralvicsam <[email protected]>
      9f409dc0
  2. Jan 03, 2022
  3. Dec 16, 2021
    • dharjeezy's avatar
      Replace parameter_types with ConstU32 &c. (#10402) · 1b0be8ae
      dharjeezy authored
      
      
      * remove parameter types and use const type
      
      * remove parameter types and use const type
      
      * Delete {
      
      * Delete count,
      
      * refractor for beefy, benchmarking, child bounties, and collective pallets
      
      * refractor for pallet contracts
      
      * refractor for elections
      
      * refractor for more pallets
      
      * fix CI issues
      
      * fix CI issues
      
      * fix CI issues
      
      * fix CI issues
      
      * remove warning to fix CI issue
      
      * remove warning to fix CI issue
      refractor for pallet preimage
      
      * remove warning to fix CI issue
      refractor for pallet proxy
      
      * remove warning to fix CI issue
      refractor for pallet recovery
      refractor for pallet randomness-collective-flip
      
      * remove warning to fix CI issue
      refractor for pallet scored-pool
      refractor for pallet scheduler
      refractor for pallet session
      
      * remove warning to fix CI issue
      refractor for pallet society, support, system, timestamp, tips
      
      * remove warning to fix CI issue
      refractor for pallet transaction_payment, transaction_storage, treasury, uniques, utility
      
      * remove warning to fix CI issue
      
      * cargo +nightly fmt
      
      * CI fix
      
      * more param refractor on beefy-mmr
      
      * refractor for beefy
      
      * Update frame/babe/src/mock.rs
      
      * Update frame/babe/src/mock.rs
      
      * Update frame/bounties/src/tests.rs
      
      * Update frame/tips/src/tests.rs
      
      * Delete mock.rs
      
      * Update frame/examples/basic/src/tests.rs
      
      * Apply suggestions from code review
      
      * Update frame/im-online/src/mock.rs
      
      * Update frame/im-online/src/mock.rs
      
      * Update frame/offences/benchmarking/src/mock.rs
      
      * Update frame/session/benchmarking/src/mock.rs
      
      * Update frame/support/test/tests/pallet_compatibility.rs
      
      * Update frame/support/test/tests/pallet_compatibility_instance.rs
      
      * Update frame/treasury/src/tests.rs
      
      * Update test-utils/runtime/src/lib.rs
      
      * some cleanup
      
      * fmt
      
      * remove unused
      
      Co-authored-by: default avatarDamilare <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      1b0be8ae
  4. Dec 09, 2021
  5. Nov 17, 2021
  6. Aug 07, 2021
  7. Jul 21, 2021
    • Bastian Köcher's avatar
      Run cargo fmt on the whole code base (#9394) · 7b56ab15
      Bastian Köcher authored
      * Run cargo fmt on the whole code base
      
      * Second run
      
      * Add CI check
      
      * Fix compilation
      
      * More unnecessary braces
      
      * Handle weights
      
      * Use --all
      
      * Use correct attributes...
      
      * Fix UI tests
      
      * AHHHHHHHHH
      
      * 🤦
      
      * Docs
      
      * Fix compilation
      
      * 🤷
      
      * Please stop
      
      * 🤦
      
       x 2
      
      * More
      
      * make rustfmt.toml consistent with polkadot
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      7b56ab15
  8. Jul 12, 2021
  9. Jun 16, 2021
    • Keith Yeung's avatar
      Emit error when construct_runtime imports a non-existent pallet part (#8949) · 58e837fc
      Keith Yeung authored
      
      
      * Emit error when construct_runtime imports a non-existent Call part
      
      * Reword and display pallet name when emitting part not found error
      
      * Migrate decl_outer_dispatch to a proc macro
      
      * Rename calls.rs to call.rs
      
      * Create new construct_runtime_v2 macro
      
      * Add UI test for importing non-existent call part in construct_runtime
      
      * Emit error when construct_runtime imports a non-existent Config part
      
      * Emit error when construct_runtime imports a non-existent Event part
      
      * Migrate decl_outer_inherent to a proc macro
      
      * Emit error when construct_runtime imports a non-existent Inherent part
      
      * Migrate decl_outer_validate_unsigned to a proc macro
      
      * Emit error when construct_runtime imports a non-existent ValidateUnsigned part
      
      * impl for old macro
      
      * fix line width
      
      * add doc
      
      * hide macroes and use unique counter everywhere
      
      * Remove construct_runtime_v2
      
      * Encapsulate pallet part check macros in a module
      
      * Fix macro definitions in dummy part checker
      
      * Tag ProvideInherent impl with #[pallet::inherent] properly for authorship pallet
      
      * Remove Call part from pallets that do not define it
      
      * Add Call part unit tests
      
      * Remove undefined Call part import from offences pallet
      
      * Add tests for expand_outer_inherent
      
      * Remove Call part from pallets that do not define them
      
      * Remove Call part imports from pallets that do not have it defined
      
      * Remove Call part import of the offences pallet from grandpa pallet mocks
      
      * Update frame/support/test/tests/pallet.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Remove Call part imports for pallets that do not define them
      
      * Move inherent tests to inherent_expand
      
      * Add unit tests for expand_outer_validate_unsigned
      
      * Add newline at the end of file
      
      * fix ui test
      
      * Small prayer to RNGsus for fixing CI
      
      * Remove Call part from construct_runtime for randomness collective flip pallet
      
      * Remove Call part import for randomness collective flip pallet
      
      * Summon Laplace's demon instead of praying to RNGsus
      
      * Update test expectations
      
      * fix ui test and make sure it's flaky
      
      * Revert "fix ui test and make sure it's flaky"
      
      This reverts commit 362b6881389c911ef8d9ef85d71c9463f5694b20.
      
      * Comment out test instead of putting it in conditional compilation
      
      * Update UI test expectations
      
      * Update UI test expectations
      
      * Emit error when construct_runtime imports a non-existent Origin part
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      Co-authored-by: default avatarDenis P <[email protected]>
      58e837fc
  10. Jun 12, 2021
  11. May 12, 2021
  12. May 03, 2021
    • Lohann Paterno Coutinho Ferreira's avatar
      Remove Offence delay (#8414) · ffca28ba
      Lohann Paterno Coutinho Ferreira authored
      
      
      * Removed can_report api from OnOffenceHandler
      
      * Removed DeferredOffences and create a storage migration
      
      * Removed missing comments
      
      * Mock set_deferred_offences and deferred_offences methods
      
      * OnOffenceHandler::on_offence always succeed
      
      * Fix benchmark tests
      
      * Fix runtime-benchmark cfg methods
      
      * Removed 'applied' attribute from Offence event
      
      * refactor deprecated deferred offences getter
      
      * Validate if offences are submited after on_runtime_upgrade
      
      * update changelog
      
      * Remove empty lines
      
      * Fix remove_deferred_storage weights
      
      * Remove Offence::on_runtime_upgrade benchmark
      
      * Revert CHANGELOG.md update
      
      * Deprecate DeferredOffenceOf type
      
      * Update copyright
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Add migration logs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fix migration log
      
      * Remove unused import
      
      * Add migration tests
      
      * rustfmt
      
      * use generate_storage_alias! macro
      
      * Refactor should_resubmit_deferred_offences test
      
      * Replace spaces by tabs
      
      * Refactor should_resubmit_deferred_offences test
      
      * Removed WeightSoftLimit
      
      * Removed WeightSoftLimit from tests and mocks
      
      * Remove unused imports
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      ffca28ba
  13. Apr 01, 2021
  14. Mar 18, 2021
    • Shaun Wang's avatar
      Replace 'Module' with 'Pallet' in construct_runtime macro (#8372) · 2e552244
      Shaun Wang authored
      * Use 'Pallet' struct in construct_runtime.
      
      * Fix genesis and metadata macro.
      
      * Fix 'Pallet' type alias.
      
      * Replace 'Module' with 'Pallet' for all construct_runtime use cases.
      
      * Replace more deprecated 'Module' struct.
      
      * Bring back AllModules and AllPalletsWithSystem type, but deprecate them.
      
      * Replace deprecated 'Module' struct from merge master.
      
      * Minor fix.
      
      * Fix UI tests.
      
      * Revert UI override in derive_no_bound.
      
      * Fix more deprecated 'Module' use from master branch.
      
      * Fix more deprecated 'Module' use from master branch.
      2e552244
  15. Feb 04, 2021
  16. Jan 04, 2021
    • Bastian Köcher's avatar
      Happy new year (#7814) · e3e651f7
      Bastian Köcher authored
      * Happy new year
      
      Updates the copyright years and fixes wrong license headers.
      
      * Fix the template
      
      * Split HEADER into HEADER-APACHE & HEADER-GPL
      e3e651f7
  17. Dec 30, 2020
  18. Dec 08, 2020
    • Tomasz Drwięga's avatar
      Streamline frame_system weight parametrization (#6629) · 39a776cd
      Tomasz Drwięga authored
      
      
      * Basic weights builder.
      
      * Fixing WiP
      
      * Make the tests work.
      
      * Fix weights in node/runtime.
      
      * WiP.
      
      * Update pallets with new weights parameters.
      
      * Validate returns a Result now.
      
      * Count mandatory weight separately.
      
      * DRY
      
      * BREAKING: Updating state root, because of the left-over weight-tracking stuff
      
      * Update tests affected by Mandatory tracking.
      
      * Fixing tests.
      
      * Fix defaults for simple_max
      
      * Update frame/system/src/weights.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Rework the API a bit.
      
      * Fix compilation & tests.
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Add extra docs & rename few things.
      
      * Fix whitespace in ASCII art.
      
      * Update frame/system/src/limits.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fix max_extrinsic calculations.
      
      * Fix conflicts.
      
      * Fix compilation.
      
      * Fix new code.
      
      * re-remove generic asset
      
      * Fix usage.
      
      * Update state root.
      
      * Update proxy.
      
      * Fix tests.
      
      * Move weights validity to integrity_test
      
      * Remove redundant BlockWeights.
      
      * Add all/non_mandatory comment
      
      * Add test.
      
      * Remove fn block_weights
      
      * Make the macro prettier.
      
      * Fix some docs.
      
      * Make max_total behave more predictabily.
      
      * Add BlockWeights to metadata.
      
      * fix balances test
      
      * Fix utility test.
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      39a776cd
  19. Nov 30, 2020
  20. Sep 22, 2020
  21. Sep 21, 2020
  22. Jul 08, 2020
    • Shawn Tabrizi's avatar
      Add `WeightInfo` to all pallets with benchmarks. (#6575) · 2302898b
      Shawn Tabrizi authored
      * Start adding weight info
      
      * More weightinfo
      
      * finish weight info
      
      * more fixes
      
      * inital update of node runtime
      
      * fix the rest of the compilation
      
      * update balances
      
      * add docs
      
      * fix balances tests
      
      * Fix more tests
      
      * Fix compile
      
      * Fix pallet-evm tests
      2302898b
  23. Jun 15, 2020
    • thiolliere's avatar
      Introduce in-origin filtering (#6318) · c2ad2727
      thiolliere authored
      
      
      * impl filter in origin
      
      * remove IsCallable usage. Breaking: utility::batch(root, calls) no longer bypass BasicCallFilter
      
      * rename BasicCallFilter -> BaseCallFilter
      
      * refactor code
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * remove forgotten temporar comment
      
      * better add suggestion in another PR
      
      * refactor: use Clone instead of mem::replace
      
      * fix tests
      
      * fix tests
      
      * fix tests
      
      * fix benchmarks
      
      * Make root bypass filter in utility::batch
      
      * fix unused imports
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      c2ad2727
  24. May 27, 2020
  25. May 21, 2020
  26. May 20, 2020
    • Tomasz Drwięga's avatar
      Maximum extrinsic weight limit (#6067) · f74a7171
      Tomasz Drwięga authored
      * Only check single extrinsics weight limit in validate_transaction.
      
      * Add missing parameter to all pallets.
      
      * Add tests, fix default configuration.
      
      * Bump spec version.
      
      * Use AvailableBlockRation to calculate MaxExtrinsicWeight
      f74a7171
  27. May 15, 2020
  28. Apr 25, 2020
    • Shawn Tabrizi's avatar
      Introduce `BlockExecutionWeight` and `ExtrinsicBaseWeight` (#5722) · 8a33c297
      Shawn Tabrizi authored
      
      
      * Introduce `BlockExectionWeight` and `ExtrinsicBaseWeight`
      
      * Add new traits everywhere
      
      * Missed one update
      
      * fix tests
      
      * Update `check_weight` logic
      
      * introduce `max_extrinsic_weight` function
      
      * fix + add tests
      
      * format nits
      
      * remove println
      
      * make test a bit more clear
      
      * Remove minimum weight
      
      * newlines left over from find/replace
      
      * Fix test, improve clarity
      
      * Fix executor tests
      
      * Extrinsic base weight same as old `MINIMUM_WEIGHT`
      
      * fix example test
      
      * Expose constants
      
      * Add test for full block with operational and normal
      
      * Initiate test environment with `BlockExecutionWeight` weight
      
      * format nit
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Replace `TransactionBaseFee` with `ExtrinsicBaseWeight` (#5761)
      
      * Replace `TransactionBaseFee` with `ExtrinsicBaseFee`
      
      * Fix stuff
      
      * Fix and make tests better
      
      * Forgot to update this test
      
      * Fix priority number in test
      
      * Remove minimum weight from merge
      
      * Fix weight in contracts
      
      * remove `TransactionBaseFee` from contract tests
      
      * Let `register_extra_weight_unchecked` go past `MaximumBlockWeight`
      
      * address feedback
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      8a33c297
  29. Apr 16, 2020
  30. Mar 31, 2020
  31. Mar 26, 2020
    • Kian Paimani's avatar
      Offchain Phragmén BREAKING. (#4517) · 970c5f94
      Kian Paimani authored
      * Initial skeleton for offchain phragmen
      
      * Basic compact encoding decoding for results
      
      * add compact files
      
      * Bring back Self::ensure_storage_upgraded();
      
      * Make staking use compact stuff.
      
      * First seemingly working version of reduce, full of todos
      
      * Everything phragmen related works again.
      
      * Signing made easier, still issues.
      
      * Signing from offchain compile fine 😎
      
      * make compact work with staked asssignment
      
      * Evaluation basics are in place.
      
      * Move reduce into crate. Document stuff
      
      * move reduce into no_std
      
      * Add files
      
      * Remove other std deps. Runtime compiles
      
      * Seemingly it is al stable; cycle implemented but not integrated.
      
      * Add fuzzing code.
      
      * Cleanup reduce a bit more.
      
      * a metric ton of tests for staking; wip 🔨
      
      * Implement a lot more of the tests.
      
      * wip getting the unsigned stuff to work
      
      * A bit gleanup for unsigned debug
      
      * Clean and finalize compact code.
      
      * Document reduce.
      
      * Still problems with signing
      
      * We officaly duct taped the transaction submission stuff. 🤓
      
      * Deadlock with keys again
      
      * Runtime builds
      
      * Unsigned test works 🙌
      
      * Some cleanups
      
      * Make all the tests compile and stuff
      
      * Minor cleanup
      
      * fix more merge stuff
      
      * Most tests work again.
      
      * a very nasty bug in reduce
      
      * Fix all integrations
      
      * Fix more todos
      
      * Revamp everything and everything
      
      * Remove bogus test
      
      * Some review grumbles.
      
      * Some fixes
      
      * Fix doc test
      
      * loop for submission
      
      * Fix cli, keyring etc.
      
      * some cleanup
      
      * Fix staking tests again
      
      * fix per-things; bring patches from benchmarking
      
      * better score prediction
      
      * Add fuzzer, more patches.
      
      * Some fixes
      
      * More docs
      
      * Remove unused generics
      
      * Remove max-nominator footgun
      
      * Better fuzzer
      
      * Disable it 
      
      
      
      * Bump.
      
      * Another round of self-review
      
      * Refactor a lot
      
      * More major fixes in perThing
      
      * Add new fuzz file
      
      * Update lock
      
      * fix fuzzing code.
      
      * Fix nominator retain test
      
      * Add slashing check
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarJoshy Orndorff <[email protected]>
      
      * Some formatting nits
      
      * Review comments.
      
      * Fix cargo file
      
      * Almost all tests work again
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Fix review comments
      
      * More review stuff
      
      * Some nits
      
      * Fix new staking / session / babe relation
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/compact/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Some doc updates to slashing
      
      * Fix derive
      
      * Remove imports
      
      * Remove unimplemented tests
      
      * nits
      
      * Remove dbg
      
      * Better fuzzing params
      
      * Remove unused pref map
      
      * Deferred Slashing/Offence for offchain Phragmen  (#5151)
      
      * Some boilerplate
      
      * Add test
      
      * One more test
      
      * Review comments
      
      * Fix build
      
      * review comments
      
      * fix more
      
      * fix build
      
      * Some cleanups and self-reviews
      
      * More minor self reviews
      
      * Final nits
      
      * Some merge fixes.
      
      * opt comment
      
      * Fix build
      
      * Fix build again.
      
      * Update frame/staking/fuzz/fuzz_targets/submit_solution.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/slashing.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/offchain_election.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Fix review comments
      
      * fix test
      
      * === 🔑
      
       Revamp without staking key.
      
      * final round of changes.
      
      * Fix cargo-deny
      
      * Update frame/staking/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      970c5f94
  32. Mar 19, 2020
  33. Mar 16, 2020
    • Gavin Wood's avatar
      Refactor away from opaque hashes (#5226) · af9083f5
      Gavin Wood authored
      
      
      * System.BlockHash
      
      * Fix hash
      
      * Introduce K/V iteration in all _concat maps
      
      Also move across:
      - System.Account (blake2_128_concat)
      - Balances.Locks (twox_64_concat)
      - ElectionsPhragmen.VotesOf (twox_64_concat)
      - ElectionsPhragmen.StakeOf (twox_64_concat)
      - Identity.IdentityOf (twox_64_concat)
      - Identity.SubsOf (twox_64_concat)
      - Society.Payouts (twox_64_concat)
      - Session.NextKeys (twox_64_concat)
      - Identity.SuperOf (blake2_128_concat)
      - Session.KeyOwner (blake2_128_concat)
      - Society.SuspendedCandidates (twox_64_concat)
      - Society.SuspendedMembers (twox_64_concat)
      - Society.Vouching (twox_64_concat)
      - Society.Strikes (twox_64_concat)
      - System.EventTopics
      - Balances.Account
      
      * Build fixes
      
      * Ensure migration happens in correct order
      
      * Staking.*
      
      * Vesting.* Offences.*
      
      * Democracy.*
      
      * Babe.* Collective.*
      
      * Grandpa.*
      
      * Assets.* Benchmark.* Contracts.* Elections.* Asset.* Nicks.*
      
      Also introduce real account list
      
      * ImOnline.*
      
      * Treasury.*
      
      * Recovery.*
      
      * Final bits.
      
      * Docs
      
      * Fix one test
      
      * Fix test
      
      * All passing except the UI tests
      
      * Remove linked_map part 1
      
      * Remove linked_map
      
      * Some iterator utils for double maps.
      
      * Remove old migrations
      
      * Introduce tombstone for LinkedMap type
      
      * Migration for genesis hash
      
      * Fix build
      
      * Fix hash
      
      * Rename Map is_linked -> unused, keeping backwards compat (#5256)
      
      * Update frame/balances/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/elections/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Remove old migration code.
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update bin/node/runtime/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Fix hash
      
      * fix session migration
      
      * Fix watning
      
      Co-authored-by: default avatarJaco Greeff <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      af9083f5
  34. Feb 24, 2020
  35. Feb 14, 2020
    • Gavin Wood's avatar
      Composite accounts (#4820) · 5b7512e2
      Gavin Wood authored
      
      
      * Basic account composition.
      
      * Add try_mutate_exists
      
      * De-duplicate
      
      * Refactor away the UpdateBalanceOutcome
      
      * Expunge final UpdateBalanceOutcome refs
      
      * Refactor transfer
      
      * Refactor reservable currency stuff.
      
      * Test with the alternative setup.
      
      * Fixes
      
      * Test with both setups.
      
      * Fixes
      
      * Fix
      
      * Fix macros
      
      * Make indices opt-in
      
      * Remove CreationFee, and make indices opt-in.
      
      * Fix construct_runtime
      
      * Fix last few bits
      
      * Fix tests
      
      * Update trait impls
      
      * Don't hardcode the system event
      
      * Make tests build and fix some stuff.
      
      * Pointlessly bump runtime version
      
      * Fix benchmark
      
      * Another fix
      
      * Whitespace
      
      * Make indices module economically safe
      
      * Migrations for indices.
      
      * Fix
      
      * Whilespace
      
      * Trim defunct migrations
      
      * Remove unused storage item
      
      * More contains_key fixes
      
      * Docs.
      
      * Bump runtime
      
      * Remove unneeded code
      
      * Fix test
      
      * Fix test
      
      * Update frame/balances/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Fix ED logic
      
      * Repatriate reserved logic
      
      * Typo
      
      * Fix typo
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Last few fixes
      
      * Another fix
      
      * Build fix
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarJaco Greeff <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      5b7512e2
  36. Jan 05, 2020
  37. Dec 19, 2019
    • Bastian Köcher's avatar
      Make `decl_error!` errors usable (#4449) · 8e393aa5
      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
      8e393aa5
  38. Dec 16, 2019
    • Tomasz Drwięga's avatar
      [big refactor] Remove crate aliasing. (#4395) · 8778ca7d
      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.
      8778ca7d
  39. Dec 10, 2019
  40. Dec 02, 2019
    • Benjamin Kampmann's avatar
      The crate rename (#4223) · 927e13c1
      Benjamin Kampmann authored
      * Adding script for rename, could be applicable for nodes on top of it, too
      
      * add stderr and gitlab ci features
      
      * apply script
      
      * fix now minor details in expected stderr
      
      * Update the Cargo.lock
      
      * fix name: sc-transaction -> sc-tracing
      
      * fix rename in script, too
      927e13c1