Guillaume Thiolliere
4856b6fcf4
Remove impl_outer_ macros ( #9307 )
...
* remove impl_outer_*
* continue to reexport some unsigned in order not to break users
2021-07-12 08:50:50 +00:00
Guillaume Thiolliere
d969da8aa5
fix link ( #9289 )
2021-07-06 14:14:30 +00:00
Guillaume Thiolliere
3127eac4d7
fix storage info for decl_storage ( #9274 )
2021-07-06 01:58:24 +00:00
Guillaume Thiolliere and Keith Yeung
f96c5df754
pallet macro: always generate storage info on pallet struct ( #9246 )
...
* always implement storage info on Pallet
* fix UI test
* Fold span computation into trait and method computation
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-07-05 11:23:43 +00:00
Guillaume Thiolliere
0af5d6ff32
fix typo ( #9184 )
2021-06-23 10:34:54 +00:00
Guillaume Thiolliere
205ab6dee1
Avoid running some test 2 times when unneeded ( #9124 )
...
* avoid running some test 2 times when unneeded
* Update frame/support/test/Cargo.toml
2021-06-16 16:19:09 +00:00
Guillaume Thiolliere
5fa96f2ed2
Do not run pallet_ui test with conditional-storage feature ( #9122 )
...
* do not run pallet_ui test with conditional-compilation feature
* fix
2021-06-16 09:09:24 +00:00
Guillaume Thiolliere
65d3d5d4ab
execute system integrity_test also ( #9104 )
2021-06-14 21:31:04 +01:00
Guillaume Thiolliere
fdc29180f6
improve variable name ( #9108 )
2021-06-14 21:16:58 +02:00
ebf5e771fc
staking/election: prolonged era and emergency mode for governance submission. ( #8912 )
...
* Implementation but weird initial era in tests
* Emergency mode for elections. (#8918 )
* do some testing, some logging.
* some testing apparatus
* genesis election provider (#8970 )
* genesis election provider
* fix historical stuff
* Fix test
* remove dbg
* Apply suggestions from code review
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* capitalize comment and name without conflict
* fix log
* Update frame/election-provider-multi-phase/src/lib.rs
* Update frame/election-provider-multi-phase/src/lib.rs
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* apply suggestion on tests
* remove testing modifications
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Dmitry Kashitsyn <korvin@deeptown.org >
* apply suggestion
* fix master merge
Co-authored-by: kianenigma <kian@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
Co-authored-by: Dmitry Kashitsyn <korvin@deeptown.org >
2021-06-14 14:02:45 +00:00
d31e607bda
Enforce pub calls in pallets ( #9085 )
...
* make all extrinsics public so they are available from outside
* Impl
* fix
* more fix
* more pub
* few more
* merge fix
* fix ui test
* fix ui test
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-06-12 16:15:21 +00:00
Guillaume Thiolliere and Shawn Tabrizi
ea6831e398
put the validate_unsigned implementation inside the pallet definition ( #9044 )
...
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-08 20:54:06 +00:00
Guillaume Thiolliere and Peter Goodspeed-Niklaus
25625a0f0c
Introduce WeakBoundedVec, StorageTryAppend, and improve BoundedVec API ( #8842 )
...
* fix bounded vec doc and unsafe
* fix btree map and set and tests
* introduce weak_bounded_vec and StorageTryAppend
* fix tests and reorganize tests
* improve doc
* add doc
* Update frame/support/src/storage/weak_bounded_vec.rs
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* fix inner doc
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
2021-05-21 09:07:00 +00:00
Guillaume Thiolliere
693529df63
Fix transaction payment fee/tip unbalanceds ( #8860 )
...
* fix and test
* fmt
2021-05-19 18:44:50 +02:00
Guillaume Thiolliere
c48b460b2e
Improve pallet macro error message by deriving codec with no bound for Call enum ( #8851 )
...
* improve span for call
* fix stderr file paths
2021-05-19 09:23:06 +00:00
Guillaume Thiolliere
0b30049417
Allow to name the generic for storages in #[pallet::storage] ( #8751 )
...
* implement named generic for storages
* fix error message on unexpected name for generic
2021-05-19 07:11:11 +00:00
Guillaume Thiolliere and Peter Goodspeed-Niklaus
9bf62ef65d
Allow to specify some max number of values for storages in pallet macro. ( #8735 )
...
* implement max_values + storages info
* some formatting + doc
* rename StoragesInfo -> PalletStorageInfo
* merge both StorageInfoTrait and PalletStorageInfo
I think it is more future proof. In the future some storage could make
use of multiple prefix. Like one to store how much value has been
inserted, etc...
* Update frame/support/procedural/src/storage/parse.rs
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* Update frame/support/procedural/src/storage/storage_struct.rs
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* Fix max_size using hasher information
hasher now expose `max_len` which allows to computes their maximum len.
For hasher without concatenation, it is the size of the hash part,
for hasher with concatenation, it is the size of the hash part + max
encoded len of the key.
* fix tests
* fix ui tests
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
2021-05-17 13:44:24 +00:00
Guillaume Thiolliere
34e83e0be8
add test for store trait ( #8711 )
2021-05-04 19:57:26 +00:00
Guillaume Thiolliere
9ca6abe9eb
make custom on runtime upgrade prior to pallet ones ( #8687 )
2021-05-03 08:57:25 +00:00
Guillaume Thiolliere
ea10494ca9
Make pallet macro generate accessor to PalletInfo information on pallet placeholder ( #8630 )
...
* generate accessor to PalletInfo information on pallet placeholder
* remove unused
* use trait, and add tests
* less verbose doc
* add PalletInfoAccess to prelude for ease usage
2021-04-19 10:09:23 +00:00
Guillaume Thiolliere
bb343c7c26
fix doc and dyn ( #8631 )
2021-04-17 17:01:31 +02:00
Guillaume Thiolliere and Kian Paimani
a4ed9bb9b2
Ensure inherent are first ( #8173 )
...
* impl
* fix tests
* impl in execute_block
* fix tests
* add a test in frame-executive
* fix some panic warning
* use trait to get call from extrinsic
* remove unused
* fix test
* fix testing
* fix tests
* return index of extrinsic on error
* fix test
* Update primitives/inherents/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* address comments
rename trait, and refactor
* refactor + doc improvment
* fix tests
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-04-13 09:30:13 +00:00
Guillaume Thiolliere
da4518e518
Upgrade pallet atomic swap ( #8452 )
...
* upgrade pallet atomic swap
* fix doc
2021-03-26 06:46:03 +00:00
Guillaume Thiolliere
c529f13878
fix local variable names ( #8450 )
2021-03-25 10:43:20 +01:00
Guillaume Thiolliere
aeff56260c
remove outdated comment ( #8442 )
2021-03-24 10:06:41 +00:00
Guillaume Thiolliere
d343683ca9
improve doc ( #8437 )
2021-03-23 17:40:52 +01:00
1602f8dd2d
Add tracing logic in pallet macro for hooks and dispatchables ( #8305 )
...
* span in hooks
* add span for dispatchable
* Update frame/support/src/lib.rs
* Update frame/support/src/lib.rs
Co-authored-by: David <dvdplm@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: David <dvdplm@gmail.com >
2021-03-23 15:53:46 +01:00
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