gupnik
5e7b27e98c
Moves Block to frame_system instead of construct_runtime and removes Header and BlockNumber ( #14437 )
...
* Initial setup
* Adds node block
* Uses UncheckedExtrinsic and removes Where section
* Updates frame_system to use Block
* Adds deprecation warning
* Fixes pallet-timestamp
* Removes Header and BlockNumber
* Addresses review comments
* Addresses review comments
* Adds comment about compiler bug
* Removes where clause
* Refactors code
* Fixes errors in cargo check
* Fixes errors in cargo check
* Fixes warnings in cargo check
* Formatting
* Fixes construct_runtime tests
* Uses import instead of full path for BlockNumber
* Uses import instead of full path for Header
* Formatting
* Fixes construct_runtime tests
* Fixes imports in benchmarks
* Formatting
* Fixes construct_runtime tests
* Formatting
* Minor updates
* Fixes construct_runtime ui tests
* Fixes construct_runtime ui tests with 1.70
* Fixes docs
* Fixes docs
* Adds u128 mock block type
* Fixes split example
* fixes for cumulus
* ".git/.scripts/commands/fmt/fmt.sh"
* Updates new tests
* Fixes fully-qualified path in few places
* Formatting
* Update frame/examples/default-config/src/lib.rs
Co-authored-by: Juan <juangirini@gmail.com >
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Juan <juangirini@gmail.com >
* ".git/.scripts/commands/fmt/fmt.sh"
* Addresses some review comments
* Fixes build
* ".git/.scripts/commands/fmt/fmt.sh"
* Update frame/democracy/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/democracy/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Addresses review comments
* Updates trait bounds
* Minor fix
* ".git/.scripts/commands/fmt/fmt.sh"
* Removes unnecessary bound
* ".git/.scripts/commands/fmt/fmt.sh"
* Updates test
* Fixes build
* Adds a bound for header
* ".git/.scripts/commands/fmt/fmt.sh"
* Removes where block
* Minor fix
* Minor fix
* Fixes tests
* ".git/.scripts/commands/update-ui/update-ui.sh" 1.70
* Updates test
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Updates doc
* Updates doc
---------
Co-authored-by: command-bot <>
Co-authored-by: Juan <juangirini@gmail.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-07-13 12:01:34 +00:00
Michal Kucharczyk
87d41d0a89
GenesisBuild<T,I> deprecated. BuildGenesisConfig added. (#14306 )
...
* frame::support: GenesisConfig types for Runtime enabled
* frame::support: macro generating GenesisBuild::build for RuntimeGenesisConfig
* frame: ambiguity BuildStorage vs GenesisBuild fixed
* fix
* RuntimeGenesisBuild added
* Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
* Revert "fix"
This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
* Revert "RuntimeGenesisBuild added"
This reverts commit 3c131b618138ced29c01ab8d15d8c6410c9e128b.
* Revert "Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed""
This reverts commit 2b1ecd467231eddec69f8d328039ba48a380da3d.
* Revert "Revert "fix""
This reverts commit fd7fa629adf579d83e30e6ae9fd162637fc45e30.
* Code review suggestions
* frame: BuildGenesisConfig added, BuildGenesis deprecated
* frame: some pallets updated with BuildGenesisConfig
* constuct_runtime: support for BuildGenesisConfig
* frame::support: genesis_build macro supports BuildGenesisConfig
* frame: BuildGenesisConfig added, BuildGenesis deprecated
* Cargo.lock update
* test-runtime: fixes
* Revert "fix"
This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
* Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
* self review
* doc fixed
* ui tests fixed
* fmt
* tests fixed
* genesis_build macrto fixed for non-generic GenesisConfig
* BuildGenesisConfig constraints added
* warning fixed
* some duplication removed
* fmt
* fix
* doc tests fix
* doc fix
* cleanup: remove BuildModuleGenesisStorage
* self review comments
* fix
* Update frame/treasury/src/tests.rs
Co-authored-by: Sebastian Kunert <skunert49@gmail.com >
* Update frame/support/src/traits/hooks.rs
Co-authored-by: Sebastian Kunert <skunert49@gmail.com >
* doc fix: GenesisBuild exposed
* ".git/.scripts/commands/fmt/fmt.sh"
* frame: more serde(skip) + cleanup
* Update frame/support/src/traits/hooks.rs
Co-authored-by: Davide Galassi <davxy@datawok.net >
* frame: phantom fields moved to the end of structs
* chain-spec: Default::default cleanup
* test-runtime: phantom at the end
* merge master fixes
* fix
* fix
* fix
* fix
* fix (facepalm)
* Update frame/support/procedural/src/pallet/expand/genesis_build.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* fmt
* fix
* fix
---------
Co-authored-by: parity-processbot <>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com >
Co-authored-by: Davide Galassi <davxy@datawok.net >
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-07-12 10:22:12 +00:00
Abhijit Roy
4ba78088d3
Update Pallet placeholder struct as per FRAME v2 ( #14348 )
...
* Update Pallet placeholder struct as per FRAME v3
* ".git/.scripts/commands/fmt/fmt.sh"
* Update lib.rs
Removed the unused import
---------
Co-authored-by: command-bot <>
2023-06-12 15:22:05 +00:00
Qinxuan Chen
dcc0858f67
frame-support-test: migrate tests from decl_* macros to the new pallet macros ( #12445 )
...
* frame-support: migrate some tests from decl macros to new pallet attribute macros
* Remove useless type alias
* Remove useless type alias
* frame-support-test: migrate old decl_macros to new pallet attribute macros
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix features
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove deprecated stuff
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix UI test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Cleanup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: parity-processbot <>
2023-05-09 09:22:55 +00:00
Vivek Pandya
bc53b9a03a
Remove years from copyright notes. ( #13415 )
...
* 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
2023-02-21 18:46:41 +00:00
Sergej Sakac
e4b6f4a66d
BREAKING: Rename Origin ( #12258 )
...
* BREAKING: Rename Origin
* more renaming
* a bit more renaming
* fix
* more fixing
* fix in frame_support
* even more fixes
* fix
* small fix
* ...
* update .stderr
* docs
* update docs
* update docs
* docs
2022-09-20 22:13:09 +00:00
Squirrel
3dd32d5255
Make clippy _a little_ more annoying ( #10570 )
...
* Clippy: +complexity
* Update client/cli/src/arg_enums.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/inspect/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/keystore/src/testing.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/elections/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update primitives/npos-elections/fuzzer/src/reduce.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Incorporating feedback
* No need for Ok
* Additional
* Needed slice
* Wigy's suggestions on less derefs
* fix count
* reverting changes brought in by option_map_unit_fn
* add --all-targets
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-01-05 14:35:30 +00:00
Bastian Köcher
f3662b4bba
Happy new year 2022 ( #10573 )
2022-01-03 09:22:14 +01:00
Bastian Köcher
7b56ab15b4
Run cargo fmt on the whole code base ( #9394 )
...
* 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: André Silva <andrerfosilva@gmail.com >
2021-07-21 14:32:32 +00:00
Guillaume Thiolliere
9fbbecc195
Replace last usages of <() as PalletInfo> in substrate ( #8080 )
...
* replace last occurences
* Update frame/support/src/traits.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/test/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* fix dispatch test
* move PanicPalletInfo to tests module
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-02-09 15:28:34 +00:00
Bastian Köcher
e3e651f72c
Happy new year ( #7814 )
...
* Happy new year
Updates the copyright years and fixes wrong license headers.
* Fix the template
* Split HEADER into HEADER-APACHE & HEADER-GPL
2021-01-04 09:03:13 +00:00
Guillaume Thiolliere
1cbfc9257f
Rename pallet trait Trait to Config ( #7599 )
...
* rename Trait to Config
* add test asserting using Trait is still valid.
* fix ui tests
2020-11-30 14:34:54 +00:00
Bastian Köcher
ed1d0fa815
Implements pallet versioning ( #7208 )
...
* Start
* Make macro work
* Rename `ModuleToIndex` to `PalletRuntimeSetup`
Besides the renaming it also adds support getting the name of a pallet
as configured in the runtime.
* Rename it to `PalletInfo`
* Remove accidentally added files
* Some work
* Make everything compile
* Adds a test and fixes some bugs
* Implement ordering for `PalletVersion`
* Apply suggestions from code review
* Review feedback
* Update frame/support/src/dispatch.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Update frame/support/src/dispatch.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Fix compilation
* Fix test
* Fix doc test
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2020-10-21 19:05:52 +02:00
Shawn Tabrizi
50568fcc19
Disambiguate BlockNumber type in decl_module ( #7061 )
...
* Disambiguate `BlockNumber` type in `decl_module`
* fix `frame-support-tests`
* fix ui tests
* fix trait order
2020-09-10 01:47:24 +02:00
Benjamin Kampmann
be8c96adec
Relax substrate licensing scheme ( #5947 )
2020-05-15 13:21:56 +02:00
Gavin Wood
af9083f53b
Refactor away from opaque hashes ( #5226 )
...
* 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: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/elections/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Remove old migration code.
* Update frame/system/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update bin/node/runtime/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Fix hash
* fix session migration
* Fix watning
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
2020-03-16 23:19:53 +01:00
Shawn Tabrizi
74f8db5def
Assign unique storage names to pallets. ( #5010 )
...
* Assign unique storage names to pallets.
* Bump spec
* Upgrade logic for finality tracker (untested)
* Logic for migrating Identity (untested)
* Logic for migrating transaction-payment
* Fix tests
* Fix `decl_storage` build
* Contract -> Contracts
* Update Cargo.lock
* bump spec
* update migration
* Fix merge error
* Migration for contracts
* Remove serde
* Remove some illegal spaces and Options
* Fix types in identity.
* Minor variable rename
Co-authored-by: Gavin Wood <gavin@parity.io >
2020-03-14 12:44:48 +01:00
thiolliere
76acc96f3a
Remove default hasher ( #4739 )
...
* remove default hasher from decl_storage!
* fix decl_storage declarations
2020-01-27 18:23:10 +01:00
thiolliere
b74c88b3cc
Modify doublemap syntax ( #4576 )
...
* modify doublemap syntax
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-10 11:52:56 +01:00
Shawn Tabrizi
7efa62725e
Update copyright year ( #4532 )
2020-01-05 14:05:44 +01:00
Tomasz Drwięga
8778ca7dc8
[big refactor] Remove crate aliasing. ( #4395 )
...
* 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.
2019-12-16 20:36:49 +08:00
Shawn Tabrizi
c9175b59ff
Rename Palette to FRAME ( #4182 )
...
* palette -> frame
* PALETTE, Palette -> FRAME
* Move folder pallete -> frame
* Update docs/Structure.adoc
Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com >
* Update docs/README.adoc
Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com >
* Update README.adoc
2019-11-22 19:21:25 +01:00