Guillaume Thiolliere and Gavin Wood
28fa5c2b6c
Compute yearly inflation on-chain allowing to change x_ideal according to number of slots. ( #8332 )
...
* new crate
* Update frame/staking/reward-fn/src/lib.rs
Co-authored-by: Gavin Wood <gavin@parity.io >
* fix doc
Co-authored-by: Gavin Wood <gavin@parity.io >
2021-03-19 09:32:22 +01:00
Guillaume Thiolliere
9c4e4d453c
Fix doc build with --all-features ( #8277 )
...
* implement
* make default pre/post_upgrade
* simplify Cargo.toml
* revert removal of outdated/private links
* link in pallet-mmr
2021-03-05 16:08:44 +01:00
Guillaume Thiolliere
ddbdfc9e57
update nb-connect pin-project-lite rand_core ( #8249 )
2021-03-04 09:49:49 +01:00
Guillaume Thiolliere
fb8da7ea92
Allow pallet::call to return DispatchResult ( #8241 )
...
* allow dispatch result
* remove custom error message
* format
* add forgotten UI test
* fix test
* fix tests
2021-03-03 13:14:07 +01:00
Guillaume Thiolliere and Bastian Köcher
aca3332953
Add some migration helper to help migrating pallet changing pallet prefix ( #8199 )
...
* migration helper
* fix move_storage
* format
* doc
* improve doc
* Update frame/support/src/storage/migration.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-03-02 19:13:47 +01:00
Guillaume Thiolliere
9af70e93b7
make use of matches ( #8211 )
2021-03-02 19:03:05 +01:00
Guillaume Thiolliere and Shawn Tabrizi
65df4a9333
Fix ignored error in benchmark tests ( #8214 )
...
* fix ignored error in benchmark tests
* use normal format for str
* explicit match
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-02-26 19:50:58 +01:00
Guillaume Thiolliere and Peter Goodspeed-Niklaus
f2436b87b5
pallet macro broke benchmarks_instance, fix by introducing benchmarks_instance_pallet ( #8190 )
...
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
2021-02-25 16:25:08 +01:00
Guillaume Thiolliere
5232e8ad5c
allow to write pre and post runtime upgrade in pallet macro ( #8194 )
2021-02-25 11:43:48 +01:00
Guillaume Thiolliere
115dcd81dc
Fix: stash account reaped when ledger.active == ED ( #8170 )
...
* do not reap account when active == ed
* add tests + refactor
2021-02-22 16:46:45 +00:00
Guillaume Thiolliere
ecf4404903
Migrate examples to use pallet macro ( #8138 )
2021-02-22 12:33:35 +01:00
Guillaume Thiolliere
1b2dd6117b
Allow transfer_keep_alive to transfer all free balance ( #8125 )
2021-02-22 12:32:41 +01:00
Guillaume Thiolliere
f35a27cca0
Remove inherent in pallet-babe ( #8124 )
2021-02-16 19:03:59 +01:00
Guillaume Thiolliere
f49aae65a8
fix deprecated usage of panic ( #8134 )
2021-02-16 19:02:53 +01:00
Guillaume Thiolliere
e78d139676
pallet macro: easier syntax for #[pallet::pallet] with struct Pallet<T>(_) ( #8091 )
2021-02-10 10:27:05 +01:00
Guillaume Thiolliere and Kian Paimani
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
Guillaume Thiolliere and Shawn Tabrizi
0ed683ca13
Use construct_runtime in tests ( #8059 )
...
* impl some more
* add serde
* remove unused
* fix staking fuzz
* fix system bench
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-02-06 20:12:46 +00:00
Guillaume Thiolliere
86498a1a0c
move some pallet test to use construct_runtime ( #8049 )
...
* migrate some more pallets
* revert example-offcahin-worker as not straightforward
* fix mmr
2021-02-04 15:57:59 +00:00
Guillaume Thiolliere
f48296e9ad
Update parity-scale-codec to 2.0 ( #7994 )
...
* update cargo.toml
* use 2.0 in mmmr
2021-01-29 12:22:45 +00:00
Guillaume Thiolliere
4e1f112059
Ensure transactional with ? works in frame v2 ( #7982 )
2021-01-26 16:42:27 +01:00
Guillaume Thiolliere
b1888395e8
Make pallet use construct_runtime in tests instead of impl_* ( #7986 )
2021-01-26 15:25:04 +01:00
Guillaume Thiolliere
681f8408ce
use construct_runtime for more pallet ( #7974 )
2021-01-25 16:24:38 +01:00
48810cd75b
Make pallets use construct_runtime ( #7950 )
...
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: David <dvdplm@gmail.com >
2021-01-25 13:20:47 +01:00
703c263079
pallet minor doc improvment ( #7922 )
...
* doc improvment
* additional fixes
* another fix
* better code suggestion
* Apply suggestions from code review
Co-authored-by: David <dvdplm@gmail.com >
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* apply suggestion
* apply suggestion
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* apply suggestion
* better guideline on reexport
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* apopiak suggestion
* clearer check suggestion
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: David <dvdplm@gmail.com >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-01-25 10:10:40 +00:00
Guillaume Thiolliere
cf37f44c38
fix template ( #7905 )
2021-01-15 12:03:08 +01:00
Guillaume Thiolliere
014e6f03c6
bumpd minor version ( #7873 )
2021-01-12 09:25:47 +01:00
Guillaume Thiolliere
66a9093fa3
Improve spans of pallet macro ( #7830 )
...
* fix spans
* convert name to snake case
2021-01-06 09:16:05 +00:00
Guillaume Thiolliere
ccce3405f4
Improve error message on where clause on pallet error ( #7821 )
...
* improve error message on where clause on pallet error
* Revert "improve error message on where clause on pallet error"
This reverts commit 5a3cc38976813fccef3357833553ce30f5b988ea.
* Revert "Revert "improve error message on where clause on pallet error""
This reverts commit e3b3fca6bc4fa89816f80dbcb82dc4536a9b2549.
2021-01-05 09:51:46 +00:00
Guillaume Thiolliere
51028310d2
fix template ( #7823 )
2021-01-04 22:17:59 +01:00
Guillaume Thiolliere
ab4c8e4fe5
remove some unecessary bound ( #7813 )
2021-01-01 17:46:38 +01:00
6dfad0921b
Add pallet attribute macro to declare pallets ( #6877 )
...
* rename system Config to system Trait.
command used:
```
find frame/ bin/ test-utils/ utils/ -name *.rs -exec sed -i 's/system::Trait>::/system::Config>::/g' {} \;
find frame/ bin/ test-utils/ utils/ -name *.rs -exec sed -i 's/impl frame_system::Trait for /impl frame_system::Config for /g' {} \;
find frame/ bin/ test-utils/ utils/ -name *.rs -exec sed -i 's/impl system::Trait for /impl system::Config for /g' {} \;
```
plus some manual ones especially for frame-support tests and frame-system
* make construct_runtime handle Pallet and Module
pallets can now be implemented on struct named Pallet or Module, both
definition are valid.
This is because next macro will generate only Pallet placeholder.
* introduce pallet attribute macro
currently just with tests, frame_system and other example hasn't been
upgraded
* allow to print some upgrade helper from decl_storage
* Improved error msg, typo.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Improved error msg, typo.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Improved error message on unexpected attributes + ui test
* add test for transactional
* various typo
* some tips when spans are lost
* allow pallet to depend on other pallet instances
* make event type metadata consistent with call and constant
* error messages
* ignore doc example
* fix pallet upgrade template
* fixup
* fix doc
* fix indentation
* Apply suggestions code formatting
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* some renames + fix compilation
* remove unsupported genesis config type alias
* merge fixup
* fix ui tests
* additional doc
* implement StorageInstance with new syntax
* fix line width
* fix doc: because pallet doc goes below reexport doc
* Update frame/support/procedural/src/pallet/parse/event.rs
Co-authored-by: Andrew Jones <ascjones@gmail.com >
* Update frame/system/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/test/tests/pallet_ui.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* improve doc as suggested
* revert construct_runtime Pallet part.
This revert the changes on construct_runtime. Now construct_runtime is
unchanged and instead pallet macro create a type alias
`type Module<..> = Pallet<..>` to be used by construct_runtime
* refactor with less intricated code
* fix ui test with new image
* fix ui tests
* add minor tests
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Andrew Jones <ascjones@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-12-24 11:33:40 +00:00
Guillaume Thiolliere and Alexander Theißen
8814d793c7
Fix docs ( #7710 )
...
* fix docs
* Update frame/merkle-mountain-range/src/lib.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
2020-12-10 14:38:56 +01:00
Guillaume Thiolliere
f6198b4c1b
implement more convertion on NumberOrHex ( #7682 )
2020-12-08 10:10:46 +01:00
Guillaume Thiolliere and Bastian Köcher
7e83b7a7f2
Refactor StorageInstance trait to be usable more easily ( #7659 )
...
* refactor StorageInstance to be usable without macros
* better description
* update types doc
* Update frame/support/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-12-03 10:51:08 +00:00
Guillaume Thiolliere
15b0dece54
Renames of Trait to Config in README.md, weight templates and few minor ones ( #7636 )
...
* manual rename
* renamse in README.md
* fix template
2020-11-30 20:33:49 +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
Guillaume Thiolliere
2d114fb485
refactor subtrait/elevated trait as not needed ( #7497 )
2020-11-09 20:26:24 +01:00
Guillaume Thiolliere and Bastian Köcher
ff6b603d69
Introduce storage types, to builds abstraction on storage (to be used in pallet attribute macro) ( #7278 )
...
* introduce storage types
* fix line width
* improve doc
* typo
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* remove redundant function
* some more doc improvment
* disallow: some value on empty with option query
tests are update to still test default value is used when it is supposed
to be used.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-11-03 11:08:36 +01:00
1679919830
Fix benchmarks template whitespaces ( #7447 )
...
* fix
* actual fix
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/system/src/weights.rs
Co-authored-by: Parity Benchmarking Bot <admin@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-10-28 13:34:03 +00:00
Guillaume Thiolliere and Bastian Köcher
e2a15b0b50
Fix doc for ChangeMember trait ( #7396 )
...
* fix doc
* Update frame/support/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-10-26 19:32:12 +01:00
Guillaume Thiolliere and Bastian Köcher
7ca9baf9b6
Derive no bound macros (to be also used in pallet macro) ( #7280 )
...
* derive no bound macros
* explicit different variant for partialeq
* fix ui for 1.47
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* move test to frame-support-test
* renames, code organization and remove expect as suggested
* better doc
* remove DebugStripped introduce RuntimeDebugNoBound
* rename
* fix test
* fix ui test
* fix line width
* Update frame/support/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/procedural/src/clone_no_bound.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* fix confusing dead code
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-10-19 09:11:51 +00:00
Guillaume Thiolliere
1164ced041
allow where clause in decl_error ( #7324 )
2020-10-14 15:39:27 +00:00
Guillaume Thiolliere
a31637def8
Fix executive test ( #7243 )
...
* fix executive test
* add unallowed unsigned test
* better to have also unsigned pre_dispatch check tested
2020-10-01 12:40:45 +00:00
Guillaume Thiolliere
6182878933
Fix weight for inner call with new origin ( #7196 )
...
* fix weight for inner call with new origin
* fix
2020-10-01 08:24:34 +00:00
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
Guillaume Thiolliere
0e843d260c
link todo to issue ( #7162 )
2020-09-21 12:04:46 +00:00
Guillaume Thiolliere
e1839d5d07
Frame-support storage: make iterations and translate consistent ( #5470 )
...
* implementation and factorisation
* factorize test
* doc
* fix bug and improve test
* address suggestions
2020-09-15 11:39:52 +00:00
Guillaume Thiolliere and Kian Paimani
45d26e7419
Make decoding of compact<perthing> saturating instead of invalid ( #7062 )
...
* make decoding of cmopact<perthing> saturating
* fix stable build
* Update primitives/arithmetic/src/per_things.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update primitives/arithmetic/src/per_things.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-09-11 10:39:44 +02:00
Guillaume Thiolliere
5b7af66384
fix bench db wipe ( #6965 )
2020-08-26 18:36:37 +00:00
Guillaume Thiolliere
d628c62d6d
update tracing attribute ( #6950 )
2020-08-24 15:33:15 +00:00
Guillaume Thiolliere
9b42720ac5
Fix benchmark read/write key tracker for keys in child storages. ( #6905 )
...
* WIP: read child trie and write child trie
* add test
* refactor a bit + improve log
* better naming
* trigger CI
* Revert "trigger CI"
This reverts commit d0aadaeb6a12fc6c39f01b3c1b5725d19f085865.
2020-08-24 13:40:16 +00:00
Guillaume Thiolliere and Bastian Köcher
8a37f60844
Remove generation of instance trait by decl_storage. ( #6812 )
...
* remove generation of instance trait, no breaking change
* doc
* doc
* Update frame/support/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/procedural/src/storage/instance_trait.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-08-05 11:37:01 +00:00
Guillaume Thiolliere
b6505d743f
pallet-democracy use of weightinfo ( #6783 )
...
* democracy use of weightinfo
* fix some doc and benchs
* todo generate from parity machine
* factorize and add license
* use final weights
* add slightly more sensible default weight
* refactor
* rename benchmark to avoid confusion
* just make remove_other_vote benchmark being the worst case of the extrinsic
2020-08-04 17:58:03 +00:00
Guillaume Thiolliere
7db19db948
Fix link ( #6775 )
2020-07-31 10:29:39 +02:00
Guillaume Thiolliere
1eeb4b0e3f
benchmarks! macro: factorize instance usage. ( #6750 )
...
* factorize benchmark!
* fix types
* fix types
2020-07-29 14:33:54 +02:00
Guillaume Thiolliere
4187827343
fix comment ( #6670 )
2020-07-16 13:13:12 +02:00
Guillaume Thiolliere and Kian Paimani
44fb311f1f
Bound Unsigned when signed is not supported. ( #6367 )
...
* bound unsigned when necessary
* convert more type to AtLeast32BitUnsigned
* Update primitives/arithmetic/src/traits.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* doc refactor
* line reorganize
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-06-25 11:30:20 +02:00
Guillaume Thiolliere
ff897c1acc
Allow where clause in benchmarking ( #6461 )
...
* WIP
* handle where clause in benchmarking
* doc
* maybe better syntax
* line width
2020-06-24 15:24:05 +00:00
Guillaume Thiolliere
2c9cadaf5d
bound some missing bound for elevated trait ( #6487 )
2020-06-23 17:09:01 +02:00
Guillaume Thiolliere
6103e9854c
llow decl-module to have a where clause with trailing comma ( #6431 )
2020-06-19 16:00:06 +02:00
Guillaume Thiolliere
780f8e09d7
Root origin use no filter by default. Scheduler and Democracy dispatch without asserting BaseCallFilter ( #6408 )
...
* make system root origin build runtime origin with no filter
* additional doc
2020-06-19 15:59:29 +02:00
622dff9ca7
Impl integrity test for runtime ( #6356 )
...
* impl integrity test for runtime
* Update frame/support/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* use thread local
* update doc
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Gavin Wood <gavin@parity.io >
2020-06-16 13:10:10 +02:00
Guillaume Thiolliere and Kian Paimani
c2ad27271b
Introduce in-origin filtering ( #6318 )
...
* 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: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* 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: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-06-15 17:05:41 +02:00
thiolliere
40f3c7348e
put max votes into metadata ( #6114 )
2020-05-22 15:08:51 +02:00
thiolliere and Gavin Wood
b50c3338d6
Allow operational recovery path if on_initialize use fullblock. ( #6089 )
...
* note_preimage using operational
* Update frame/democracy/src/lib.rs
Co-authored-by: Gavin Wood <gavin@parity.io >
2020-05-21 13:51:47 +02:00
thiolliere
4644be3c90
Make decl_storage generated code respect clippy ( #6065 )
...
* fix clippy for code generated by decl_storage
* use as_ref
2020-05-18 18:43:18 +02:00
thiolliere
1dbd761192
Democracy weight ( #5828 )
2020-05-15 13:25:43 +02:00
thiolliere and Alexander Popiak
0360080126
Fix and add benchs for democracy pallet ( #5897 )
...
* fix and add benchs
* Update frame/democracy/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* bump spec version
* Revert "bump spec version"
This reverts commit 01233117dee575490bc71a4730cdc4351a4013ad.
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2020-05-07 14:52:56 +02:00
thiolliere
8b69609397
Update treasury weights. ( #5723 )
...
* treasury weight formula
* use max tippers count
* doc
* Fix upper bound
* rounding a bit
* remove unused + doc
* as u64 -> as Weight
* 2 significative digits rounded up
* rename ContainsCountUpperBound -> ContainsLengthBound
* add doc
* sender account -> origin account
* fix
2020-04-28 17:55:56 +02:00
thiolliere
dc09f76189
Update weight for im-online ( #5771 )
...
* implementation using Keys::decode_len
* add heartbeat new param
* address issues
* improve doc
* fix test
* fix overflow
2020-04-27 21:46:37 +02:00
thiolliere
a564cafae3
Update weight formula for session (with new_session taking full block) ( #5738 )
...
* weight formula for session except on_initialize
* fix typo and set on_initialize to MaxWeight
* Add note
2020-04-24 18:49:36 +02:00
thiolliere
e1ef69506a
update code owners ( #5700 )
2020-04-20 13:37:05 +02:00
thiolliere and Gavin Wood
28edcbfe8d
Implement iter for doublemap ( #5504 )
...
* implement iter for doublemap
* fmt
* fix tests
* fix staking mock
* address comment
* update doc and constraint for reversible hasher
Co-authored-by: Gavin Wood <gavin@parity.io >
2020-04-15 16:49:08 +02:00
thiolliere
57659b8cf4
Phragmen solution should submit for current era and be checked… ( #5583 )
...
* submit solution for current era
* add test
* address comment
* fix tests
2020-04-14 16:04:25 +02:00
thiolliere
1363675adb
safe slice operation ( #5471 )
2020-03-31 18:41:55 +02:00
thiolliere
2138004fc8
Hide metadata function for in decl_event, and add doc for GenesisConfig ( #5431 )
...
* hide metadata function for non generic event
* add doc for decl_storage
2020-03-27 21:40:12 +01:00
thiolliere
7abc577017
fix tests ( #5416 )
2020-03-27 12:38:14 +01:00
b0d2f4b173
Make Staking pallet using a proper Time module. ( #4662 )
...
* add new trait, still migration to make
* Apply suggestions from code review
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* implement migration
* better naming
* fix test
* no longer require DeprecatedTime
* add test
* fix version
* upgrade only from kusama
* add test
* fix test
* Update frame/timestamp/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-26 11:04:52 +01:00
thiolliere
8a41ac664b
on_initialize return weight consumed and default cost to default DispatchInfo instead of zero ( #5382 )
...
* frame update
* doc
* move offchain worker trait also
* fix weigh merge
* indentation
* reorder for better git diff
* comment
* fix benchmark
* remove test
2020-03-24 19:51:04 +01:00
thiolliere and joe petrowski
1b4dcd1f23
Staking improve payout_validator ( #5208 )
...
* add documentation and optimise payout_validator a bit
* bump spec version to be safe
this is just in case clipped exposure and exposure have different fields
own and total. This shouldn't be the case but better be safe in case
storage is wrong.
* Update frame/staking/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
2020-03-10 20:54:29 +01:00
thiolliere
2aac500d61
Change space to tab ( #5193 )
2020-03-09 16:32:24 +01:00
thiolliere
71ff24c79e
Fix staking bug ( #5170 )
...
* fix staking bug
* add some guarantee note in SessionManager while it is not fixed in staking
* bumpd impl version
2020-03-06 18:31:48 +01:00
thiolliere
a36a170c15
remove ambiguous into_iter ( #4794 )
2020-01-31 18:49:02 +01:00
thiolliere
556c80e792
LinkedMap doesn't implement StoragePrefixedMap ( #4760 )
...
* LinkedMap doesn't implement StoragePrefixedMap
* fix test
2020-01-29 13:36:52 +01:00
thiolliere
f4fa59470a
doc ( #4761 )
2020-01-29 13:26:09 +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 and Bastian Köcher
e4f3e85585
Improve decl storage parsing ( #4731 )
...
* improve decl storage parsing
* remove hidding detail macro
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-24 20:04:11 +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
thiolliere
28fada7daf
remove old test ( #4637 )
2020-01-16 08:00:01 +01:00
thiolliere
4de8d5cef9
Add translate function for storage prefixed map. ( #4555 )
...
* translace values for prefixed storages
* improve doc
* new impl
* update test
2020-01-13 12:14:44 +01:00
thiolliere
2d0c382daf
fix society ( #4594 )
2020-01-10 15:10:16 +01:00
thiolliere and Bastian Köcher
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
thiolliere
583b0e3c69
impl iter_prefix on doublemap ( #4388 )
2019-12-17 13:41:25 +08:00
thiolliere
e5b6935c2a
Introduce prefixed storage with enumeration ( #4185 )
...
* Introduce storage_next allowing iteration. (without childtries)
* Implement prefixed storage
* impl cache in client_storage_cache (needs test)
* switch overlay change to btreemap
* Revert "impl cache in client_storage_cache"
This reverts commit c91a4848916eba87184b3dc4722cea81aec9339d.
the storage cache cannot be used this way
* Revert "Implement prefixed storage"
This reverts commit 4931088126a427082d7310ed7e83b8eea966bc20.
* Impl StoragePrefixedMap for all map storages
* remove comment
* Move all overlays to BTreeMap
* btreemap iteration improvment
* impl for child tries
* impl tests for childs
* fix
* remove cache comment
* Fix grumble
2019-12-09 20:55:11 +01:00
thiolliere
b8ac094649
allow storage value build to put no value ( #4319 )
2019-12-07 15:30:57 +01:00
thiolliere
22c00ff424
Add swap and decode_len to DoubleMap finishing #3749 ( #4264 )
...
* Add `swap` and `decode_len` to `DoubleMap`
* Add tests to `swap` and `decode_len` for `DoubleMap` (WIP)
* Address review comments
* Remove function that is not in scope
* fix test
* better naming
2019-12-02 13:01:29 +01:00
thiolliere
b87b008775
remove unused file ( #4251 )
2019-11-29 20:25:30 +01:00
thiolliere
2f35d7f003
improve doc ( #4239 )
2019-11-28 11:06:06 +01:00
thiolliere
f4035cd5ac
Implement all storage after prefix ( #4227 )
...
* Implement all storage after prefix
* fix test, bump version and fix doc
* bump metadata version
* Update frame/support/procedural/src/storage/storage_struct.rs
2019-11-27 18:23:20 +00:00
thiolliere
f000392cc0
fix storage decode error ( #3997 )
2019-11-22 16:29:26 +01:00