Bastian Köcher
97bb9ab35a
Detect conflicting module names in construct_runtime! ( #7968 )
2021-01-25 10:37:20 +01:00
Guillaume Thiolliere
98951b33a9
Allow pallet in construct_runtime to have fixed index ( #6969 )
...
* implement index for pallet + some tests
* add test and doc
* remove deprecated and document behavior
* update internal doc
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* address review
* use index for all module, break construct_runtime
* fix line length
* implement migration helper funciton in scheduler
* fix start at index 0
* Update frame/scheduler/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/support/procedural/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* bump frame-metadata crate
* factorize
* avoid some unwrap and remove nightly join
* Update frame/support/src/event.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* fix test
* add test and improve error message
* factorize test
* keep iterator, and use slice instead of vec
* refactor to avoid to have expects
* small refactor
* Test something
* Make sure we update the `Cargo.lock`
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* return 2 error
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/scheduler/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* fix typo
* Revert "fix typo"
This reverts commit f2de8f2db34e8ac72bc9c34437c60dca3fa4ac22.
* Revert "Update frame/scheduler/src/lib.rs"
This reverts commit 6feb4605c6f784b64591e229de7a6fec6dbffb4b.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-09-22 14:54:03 +00:00
Shaopeng Wang
a6702b7121
decl_module! macro: use 'frame_system' instead of system as default ident ( #6500 )
...
* Use frame_system as default ident.
* Remove unused 'frame_system' to 'system' renaming.
* Fix construct_runtime_ui tests.
* Rename system to frame_system in sudo/utility pallet test.
* Bump runtime impl_version.
* Update formatting.
2020-07-07 23:06:21 +00:00
Bastian Köcher
ad2e832289
Don't require module name in inherents ( #6576 )
...
* Start
* Cleanup `construct_runtime!`
* Add tests
* Fix after merge
* Update the docs
2020-07-06 10:29:17 +00:00
Shawn Tabrizi
c7a14db792
Fix various spelling errors ( #4940 )
...
* meaningfull -> meaningful
* initialise -> initialize
* tokans -> tokens
* incentivise -> incentivize
* lenght -> length
* incentivisation -> incentivization
* doesnt't -> doesn't
* overwriten -> overwritten
* lifecycle -> life cycle
* lifecycle -> life cycle
* usefull -> useful
* noone -> no one
* spaming -> spamming
* defered -> deferred
* hieght -> height
* sumation -> summation
* ingore -> ignore
* registed -> registered
* Auxialary -> Auxiliary
* loggin -> logging
* independance -> independence
* trailling -> trailing
* responsability -> responsibility
* trunkated -> truncated
* Weither -> Whether
* informations -> information
* Runtume -> Runtime
* choosen -> chosen
* delcataion -> declaration
* Unchekced -> Unchecked
* defintion -> definition
* scrach -> scratch
* imput -> input
* transfered -> transferred
* endownment -> endowment
* Determinator -> Determiner
* relevent -> relevant
* emited -> emitted
* acocunt -> account
* proprotional -> proportional
* instantiaion -> instantiation
* commited -> committed
* tombstonedead -> tombstone
* uwnrap -> unwrap
* acount -> account
* specialised -> specialized
* existant -> existent
* requried -> required
* Anull -> Annul
* AUTHORITES -> AUTHORITIES
* underyling -> underlying
* recognisable -> recognizable
* Capitalise -> Capitalize
* reportfor -> report for
* hearbeat -> heartbeat
* onlineness -> being online
* creater -> creator
* Bytearray -> Byte array
* Despoit -> Deposit
* substratced -> subtracted
* Curent -> Current
* imbalanes -> imbalances
* countfown -> countdown
* inexisting -> inexistent
* additionaly -> additionally
* substracted -> subtracted
* auxilary -> auxiliary
* parital -> partial
* in't -> isn't
* compatability -> compatibility
* infomation -> information
* etected -> detected
* extrinsiscs -> extrinsics
* reprensentation -> representation
* coonfiguration -> configuration
* primtives -> primitives
* miscelanious -> miscellaneous
* VERISON -> VERSION
* endcoded -> encoded
* Genrates -> Generates
* miliseconds -> milliseconds
* occured -> occurred
* trully -> truely
* truely -> truly
* conjuction -> conjunction
* encouters -> encounters
* customised -> customized
* deterministicly -> deterministically
* finalisation -> finalization
* pluggable -> plugable
* wakeup -> wake-up
* interemdiate -> intermediate
* intepreting -> interpreting
* finalzied -> finalized
* throgh -> through
* extinsic -> extrinsic
* convient -> convenient
* allocater -> allocator
* propagateable -> propagatable
* succesfuly -> successfully
* finalising -> finalizing
* publically -> publicly
* phrasee -> phrase
* substration -> substractions
* substractions -> subtractions
* neccessarily -> necessarily
* Inlucde -> Include
* unefficient -> inefficient
* thay -> they
* funtion -> function
* datastructures -> data structures
* infromation -> information
* propagatable -> propagable
* ecountered -> encountered
* recognise -> recognize
* intergration -> integration
* lastet -> latest
* datatypes -> data types
* datatype -> data type
* Strongarming -> Strong Arming
* avaible -> available
* Commiting -> Committing
* Retreiving -> Retrieving
* shoud -> should
* canonicaliziation -> canonicalization
* comitted -> committed
* clonable -> cloneable
* Uknown -> Unknown
* reponse -> response
* arbitary -> arbitrary
* Capapbilities -> Capabilities
* responsbile -> responsible
* initialisation -> initialization
* cames -> came
* intemediate -> intermediate
* reqeust -> request
* intance -> instance
* explcitly -> explicitly
* neighor -> neighbor
* reolving -> resolving
* untill -> until
* Validte -> Validate
* deserailize -> deserialize
* literaly -> literally
* preceeding -> preceding
* abpve -> above
* chcecked -> checked
* numbet -> number
* Unknow -> Unknown
* halfs -> halves
* gossup -> gossip
* givent -> given
* immediatelly -> immediately
* slicable -> sliceable
* conensus -> consensus
* Mimicks -> Mimics
* acccept -> accept
* serialise -> serialize
* exstrinsics -> extrinsics
* panicks -> panics
* maintaince -> maintenance
* repeatidely -> repeatedly
* anecstor -> ancestor
* becasue -> because
* processer -> processor
* Prunning -> Pruning
* insterested -> interested
* unuseful -> not useful
* yeided -> yielded
* descendfing -> descending
* corresponts -> corresponds
* survivew -> survive
* keps -> keeps
* ligh -> light
* prerequisities -> prerequisites
* positiion -> position
* depedency -> dependency
* extrinisic -> extrinsic
* atomicaly -> atomically
* staticly -> statically
* resul -> result
* timestamb -> timestamp
* Utilites -> Utilities
* ammount -> amount
* pocess -> process
* exteral -> external
* Update client/finality-grandpa/src/tests.rs
* Update primitives/io/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update primitives/blockchain/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update frame/support/src/weights.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update bin/node/cli/tests/common.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/cli/src/params.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/executor/common/src/sandbox.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/finality-grandpa/src/communication/mod.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/state-db/src/pruning.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update frame/contracts/src/tests.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
* bump impl
* timestamb -> timestamp
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
2020-02-17 15:07:24 +01:00
Bastian Köcher
625e963aa2
Remove default expansion from construct_runtime! ( #4937 )
...
This removes the following syntactic sugar from `construct_runtime!`:
- Expansion of `default` to the default set of module parts
- Expansion of `System: system` to the default set of module parts
The macro now requires the user to provide all the module parts of a pallet.
2020-02-15 14:40:29 +01:00
Gavin Wood
5b7512e2e4
Composite accounts ( #4820 )
...
* 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: Shawn Tabrizi <shawntabrizi@gmail.com >
* Fix ED logic
* Repatriate reserved logic
* Typo
* Fix typo
* Update frame/system/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/system/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Last few fixes
* Another fix
* Build fix
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-02-14 00:47:51 +00:00
Bastian Köcher
070148e9fd
Add test files I forgot to commit with #4520 ( #4598 )
2020-01-11 18:23:04 +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
Alexey
d7b9dd300b
Refactor construct_runtime to procedural ( #3810 )
...
* 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: thiolliere <gui.thiolliere@gmail.com >
* 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: Bastian Köcher <bkchr@users.noreply.github.com >
* Update paint/support/procedural/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update paint/support/procedural/src/construct_runtime/parse.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* interim
* refactored seen_keys
* refactored hash_set
* Update paint/support/procedural/src/construct_runtime/mod.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* refactored find
* fix
* fixed all_modules
* added double declaration check
* small fix
* fmt
* fix
* fix default
* format
2019-11-25 17:48:18 +01:00