Gavin Wood
afa5861f3b
Lazy reaping ( #4895 )
...
* Squash and rebase from gav-lazy-reaping
* Bump version
* Bump runtime again
* Docs.
* Remove old functions
* Update frame/balances/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/contracts/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Warnings
* Bump runtime version
* Update frame/democracy/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/system/src/lib.rs
* Clean up OnReapAccount
* Use frame_support debug
* Bump spec
* Renames and fix
* Fix
* Fix rename
* Fix
* Increase time for test
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com >
2020-02-24 18:04:42 +01:00
Benjamin Kampmann
c412c6230e
Cargo.toml fixups for the release ( #4975 )
...
* setting versions to development pre-release
fixing version in dependencies
* unset already released wasm-builder
* do not publish test crates
* adding licenses
* setting homepage metadata
* set repository url
2020-02-21 17:07:00 +01:00
Alexander Popiak
a98e6b0ec8
Rename remaining occurences of SRML to FRAME ( #4932 )
...
* rename remaining SRML occurences to FRAME
* Some module -> pallet
* remove out of date url
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com >
2020-02-19 10:46:54 +01: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
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
Kian Paimani
c871eaacbc
Per-things trait. ( #4904 )
...
* Give perthigns the trait it always deserved.
* Make staking and phragmen work with the new generic per_thing
* Make everything work together 🔨
* a bit of cleanup
* Clean usage
* Bump.
* Fix name
* fix grumbles
* hopefully fix the ui test
* Some grumbles
* revamp traits again
* Better naming again.
2020-02-13 13:09:33 +01:00
Gavin Wood
d52d8692f9
Refactor the balances module ( #4649 )
...
* Initially scoping out of the problem
* Remove need for exiry in balance locks.
* Remove expiry from locks.
* Remove supefluous balance test
* Amalgamate pieces of balance module
* Split out vesting
* Fix tests
* Fixes for vesting.
* Docs.
* Weight docs.
* Refactor things in terms of set_balances.
* Switch out ED to be free + reserved.
* Remove on_free_balance_zero and some docs.
* Build fixes
* Update frame/vesting/src/lib.rs
Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com >
* Update frame/vesting/src/lib.rs
Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com >
* Migration
* Remove superfluous code.
* Test fixes
* Fix some tests
* Fix repatriate reserve
* Fixes
* Add test for migration
* Final cleanups
* Fix
* Indentation.
* Undo unneeded referencing
* Bump runtime version
* Fixes
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com >
2020-02-01 13:20:16 +00:00
Benjamin Kampmann
3f9a05a0d3
clarify licensing ( #4755 )
...
* adding license fields to all crates
* 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-29 11:57:13 +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
Joshy Orndorff
957ea8ba46
Remove references to frame_consensus from docs ( #4582 )
...
* Simply remove references to frame_consensus
* More thorough re-write
* Update frame/session/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* on_initialize is not dispatchable
* Attempt to fix test.
* Actually fix test.
* Actually ran passing test.
* Update frame/session/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2020-01-27 17:14:10 +01:00
thiolliere
164dec95e5
Pallet session new API ( #4609 )
...
* Initial work
* Fix most things
* fix test
* fix old comment
* migration
* fix
* remove useless stuff
* fix
* less spaghetti implementation
* fix initial session
* fix
2020-01-20 17:26:53 +01:00
Xiliang Chen
20ce6c120c
remove unused safe-mix dependency ( #4656 )
2020-01-17 09:16:20 +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
Stanislav Tkach
328563f8d4
Migrate membership, nicks, scored-pool and session to decl_error ( #4463 )
...
* Migrate membership, nicks, scored-pool and session to decl_error
* Fix tests
* Update frame/scored-pool/src/tests.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Remove InsufficientBalance error from scored-pool
* Replace Error::<Test, DefaultInstance> with Error::<Test, _>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2019-12-20 17:12:21 +01:00
Bastian Köcher
8e393aa5a8
Make decl_error! errors usable ( #4449 )
...
* 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
2019-12-19 14:01:52 +01:00
Benjamin Kampmann
9200bfa997
Setting versions locally towards 2.0 release ( #4404 )
...
* clean up cargo.toml syntax
* bumping versions to 2.0
* bump networking to 0.8
* move consensus down to 0.8
* bump consensus pallets to 0.8.0, too
* Upping babe and aura pallets
* add remaining, missing version definitions
* missed some
2019-12-17 22:05:50 +08: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
Benjamin Kampmann
df133d6be3
Fix folder names in primitives ( #4358 )
...
* sr-arithmetic -> arithmetic
* sr-sandbox -> sandbox
* primitives/sr-staking-primitives -> primitives/staking
* primitives/sr-version -> primitives/version
* primitives/block-builder/runtime-api -> primitives/block-builder
2019-12-11 11:36:29 +01:00
Benjamin Kampmann
f0cc89a4b0
Break appcrypto dep cycle ( #4347 )
...
* move application-crypto tests into seperate crate
* Fix crate name, update script and add docs
* pressing 'save' helps
* remove useless lines
* adding header
* split into actual modules
2019-12-10 22:12:57 +01:00
Weiliang Li
4f2cdb20c1
Rename: primitives/sr-io -> primitives/sp-io ( #4328 )
...
* primitives/sr-io -> primitives/io
* fix
* rename
* runtime-io -> sp-io
* git mv
* fix ci
* remove package name
* fix
* fix
* try minimizing diff
* try minimizing diff again
* try minimizing diff again
2019-12-10 16:08:35 +01:00
Tomasz Drwięga
1f84d6d41d
Fix warnings when compiling runtime. ( #4332 )
...
* Remove warnings when compiling runtime.
* Remove dispatch::Result imports.
* Add missing imports.
* Fix missing vecs. #4333
* Fix oom function.
* Remove superfluous import.
* More warnings.
2019-12-10 14:21:34 +01:00
Weiliang Li
6da9f59d72
Rename: primitives/sr-std -> primitives/sp-std ( #4327 )
...
* primitives/sr-std -> primitives/std
* fix
* fix conflict
* rstd -> sp-std
* git mv
* fix review
* fix merge
2019-12-10 08:26:27 +01:00
Weiliang Li
04fcc71809
Rename folder: primitives/sr-primitives -> primitives/runtime ( #4280 )
...
* primitives/sr-primitives -> primitives/runtime
* update
2019-12-09 08:49:32 +01:00
Spencer Judge
0a3f326e56
Expose some of session module's storage as public, as well as the set_keys transaction ( #4175 )
...
* Expose some of session's storage as public, as well as set_keys
Seemingly there's no reason not to do this, as anyone can always do
it the "hard way" by constructing storage keys or extrinsics.
* Use trait to expose `is_registered` function
* Missed removing a pub keyword
* Move trait to support, add docstrings
2019-12-05 10:42:42 +01:00
Benjamin Kampmann
927e13c13a
The crate rename ( #4223 )
...
* 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
2019-12-02 11:23:53 +01:00
Stanislav Tkach
3e3ec05e56
Make weights compatible with u64 ( #4192 )
...
* Use Weight instead of u32 everywhere
* Revert Weight declaration
* Fix benches
2019-11-29 20:20:20 +01: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