Guillaume Thiolliere and Svyatoslav Nikolsky
23ff5db103
companion for https://github.com/paritytech/polkadot/pull/3507 ( #1067 )
...
* better test
* fmt
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com >
2024-04-10 10:28:37 +02:00
Guillaume Yu Thiolliere
4674aeda07
Better handling of error in inherents logic. ( #14521 )
...
* impl
* trigger CI
* Revert "trigger CI"
This reverts commit 9426361416cb051b0507576b010efbc1a6ac65b7.
* Fix
* fix
* fix
* fix
2023-07-10 09:39:37 +02:00
7db4d74c43
Restructure macro-related exports into private mods for frame ( #14375 )
...
* minor refactor
* Update frame/election-provider-support/src/lib.rs
* Update frame/election-provider-support/solution-type/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* ".git/.scripts/commands/fmt/fmt.sh"
---------
Co-authored-by: Bastian Köcher <git@kchr.de >
Co-authored-by: command-bot <>
2023-06-14 12:44:01 +00:00
Guillaume Yu Thiolliere
c519c78809
minor refactor ( #2733 )
2023-06-14 12:43:41 +00:00
e71c7b259d
new pallet: whitelist pallet ( #10159 )
...
* pallet whitelist
* refactor a bit
* fmt
* address audit
* improve tests
* return Ok + refund
* add test for dispatching failing
* add dispatch_whitelisted_call_with_preimage
* fmt
* better name
* Consume all data on decode
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add error docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove phantom data
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use rust 2021
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update crate features
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Make compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_whitelist --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/whitelist/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Bump Preimage max size
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_whitelist --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/whitelist/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Fmt
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 Bot <admin@parity.io >
2022-03-01 13:31:51 +00:00
Guillaume Thiolliere
137628b4d7
Add feature: no-metadata-doc which removes doc from metadata and full-metadata which build metadata with all doc ( #10493 )
...
* add features to remove or add doc
* fmt
* add test for event/error/call
* fmt
2022-01-17 22:21:19 +01:00
Guillaume Thiolliere
cf1eb73046
Deny warning when building doc ( #10387 )
...
* deny warning
* add new job
* fix doc
* fmt
2021-12-15 20:28:18 +01:00
Guillaume Thiolliere
7f6f3322ad
improve doc ( #10431 )
2021-12-09 06:31:31 +00:00
Guillaume Thiolliere and Shawn Tabrizi
a3c60b245f
companion for #10231 ( #4306 )
...
* fix renames
* fix test
* cargo update -p sp-io
* bump implement version
* bumpd spec version, to be safe
* bump version correctly
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-03 07:00:49 +00:00
9756615d5b
Fix pallet bags list and doc ( #10231 )
...
* fix bags list
* improve doc
* doc
* inner doc
* fix test
* Update docs in frame/election-provider-support/src/lib.rs
* fix staking impl
* prepend unsafe to clear and regenerate
* fix test
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-03 05:58:12 +00:00
e16f71b7b6
companion for pallet order fix. ( #4181 )
...
* companion
* remove no-op duplicated function
* fmt
* add comment on constraint
* Run cargo update
* fix integration test
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-01 03:00:20 +00:00
Guillaume Thiolliere and Keith Yeung
9a76627938
companion for pallet order fix ( #711 )
...
* companion
* Run cargo update
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-12-01 01:51:58 +00:00
Guillaume Thiolliere and Alexander Popiak
db28ba9dfd
Fix order of hook execution ( #10043 )
...
* fix order
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* format
* more accurate description
* format
* better explicit types
* fix tests
* address feedback
* add a type to ease non breaking implementation
* add comment about constraint
* fix test
* add test for generated types
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-12-01 00:59:09 +00:00
Guillaume Thiolliere
d91125389a
ignoring errors and some fix ( #10344 )
2021-11-29 08:16:23 +00:00
Guillaume Thiolliere
76737891bb
remove unused file ( #10343 )
2021-11-23 10:28:58 +00:00
Guillaume Thiolliere
7ed4a7f022
fix ( #10342 )
2021-11-23 10:06:33 +00:00
Guillaume Thiolliere
fcfb766366
Fix some doc link ( #10329 )
...
* fix some doc link
* fmt
2021-11-22 10:48:53 +00:00
Guillaume Thiolliere and joe petrowski
1ae674dd76
Warn about usage of pallet collective set members call. ( #10156 )
...
* warn
* Apply suggestions from code review
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* fmt
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
2021-11-11 22:53:43 +00:00
Guillaume Thiolliere
2755a97fa3
handle doc on type_value ( #10132 )
2021-11-04 10:11:39 +00:00
20c9afcdc1
Better error for when origin filter prevent the call to be dispatched ( #10134 )
...
* better error
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* remove unused
* fix error
* fmt
* fix tests
* fmt
* Update frame/contracts/src/exec.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* fix typo
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
2021-11-02 14:20:00 +00:00
4292e18e50
Automatic pallet parts in construct_runtime ( #9681 )
...
* implement automatic parts
* ui tests
* rename
* remove unnecessary exclude
* better doc
* better doc
* fix genesis config
* fix UI tests
* fix UI test
* Revert "fix UI test"
This reverts commit a910351c0b24cfe42195cfd97d83a416640e3259.
* implemented used_parts
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* doc + fmt
* Update frame/support/procedural/src/construct_runtime/parse.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* add doc in the macro
* remove yet some more parts
* fix ui test
* more determnistic error message + fix ui tests
* fix ui test
* Apply suggestions from code review
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* do refactor + fix ui tests
* fmt
* fix test
* fix test
* fix ui test
* Apply suggestions from code review
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* refactor
* remove even more part in node-runtime
* fix test
* Add flow chart for the construct_runtime! execution flow
* Fix typo
* Ignore snippets that don't contain code
* Refactor some code in expand_after
* Rename expand_after to match_and_insert
* cargo fmt
* Fix rename
* Remove frame_support argument to construct_runtime_parts
* Make use of tt-call to simplify intermediate expansions
* cargo fmt
* Update match_and_insert documentation
* Reset cursor to 0 when no matching patterns are found
* Reorder struct fields on MatchAndInsertDef
* Add test for dependency renames and fix frame-support import
* Add more doc comments
* Update frame/support/test/compile_pass/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-10-31 13:55:10 +00:00
Guillaume Thiolliere
d515116f91
Udpate polkadot substrate ( #713 )
...
* udpate polkadot substrate
* fmt with latest nightly
2021-10-31 13:45:54 +00:00
Guillaume Thiolliere
0214fde9a6
fix query details ( #10107 )
2021-10-31 10:36:26 +00:00
Guillaume Thiolliere
403b348d19
Update lowest unbaked storage. ( #9750 )
...
* update lowest unbaked
* fix format
* add note
* fmt
2021-10-18 09:19:35 +00:00
Guillaume Thiolliere and Keith Yeung
e81a425241
Root origin always bypass all filter, other origin cannot bypass BaseCallFilter even when constructed from Root origin ( #9948 )
...
* improve root filter bypass
* improve doc
* fmt
* refactor test for more understandable flow
* Update frame/support/procedural/src/construct_runtime/expand/origin.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* match
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-10-07 15:46:06 +00:00
Guillaume Thiolliere
f71d87ad28
remove unidiomatic ( #9895 )
2021-09-29 12:44:04 +02:00
Guillaume Thiolliere
8684b73b46
Fix WrapperOpaque max encded len and type info ( #9881 )
...
* fix wrapper opaque
* fix compilation
* improve more precise implementation
* spacing
* fmt
2021-09-29 07:48:26 +00:00
Guillaume Thiolliere
77ad54e4bc
fix master ( #3955 )
2021-09-28 17:38:00 +00:00
Guillaume Thiolliere and Kian Paimani
1ebcbe1c34
pallet macro: allow to declare individual unbounded storage for those who cannot go into PoV ( #9670 )
...
* allow unbounded individual storage
* better doc
* fix UI tests
* update doc
* Update frame/support/procedural/src/pallet/parse/storage.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-09-27 08:25:24 +00:00
Guillaume Thiolliere
6845666c5c
improve test ( #9835 )
2021-09-23 12:19:59 +00:00
Guillaume Thiolliere
15ecbfef16
add test ( #9822 )
2021-09-23 11:51:40 +00:00
Guillaume Thiolliere
e2dcb4b657
Improve post and pre migration checks for pallet-membership ( #9746 )
...
* improve post and pre migration checks
* prevent some more false positive
* prevent another false positive
* fix unused import
* Apply suggestions from code review
2021-09-21 12:36:53 +00:00
Guillaume Thiolliere
0930948580
add feature and fix ci ( #9800 )
2021-09-20 16:49:04 +02:00
65e5fa3aa3
Implement a CountedStorageMap ( #9125 )
...
* initial impl
* expose in pallet_prelude
* temp test
* Apply suggestions from code review
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com >
* implement with macro help.
* test for macro generation
* add iterable functions, some test and fixes
* fix merge
* doc
* Update frame/support/src/storage/types/counted_map.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
* fix merge
* fmt
* fix spelling
* improve on removal
* fix partial storage info
* fmt
* add license
* suggested renames
* fix typo
* fix test
* fmt
* fix ui tests
* clearer doc
* better doc
* add metadata test
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com >
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
2021-09-16 13:20:29 +00:00
Guillaume Thiolliere
be3c59f59c
remove unused state machine ( #9747 )
2021-09-10 16:32:46 +02:00
Guillaume Thiolliere
a59fd304eb
Remove migration done by runtime version 9090 ( #3731 )
...
* remove 9090 migrations
* remove unused
* fmt
* revert removal of polkadot migration
* remove migration for polkadot
2021-09-07 12:19:42 +02:00
Guillaume Thiolliere
1309adf247
remove unused origin ( #9679 )
2021-09-02 15:14:41 +00:00
16e4c8bc28
technical committee is using the weight of council, but should have its own generated weight instead ( #3511 )
...
* collectives have different weight
* fix path
* fix typo
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_collective --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_collective --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
* add description for technical committee
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_collective --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
* use unique names
* makes compiling weights result
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_collective_council --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
* Revert "cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_collective_council --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/"
This reverts commit 690fdb65af58d5413fb16d4da82aff83977d3454.
* revert unique names
* cargo update -p sp-io
* fix
* cargo update -p sp-io
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_collective --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_collective --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
Co-authored-by: Parity Benchmarking Bot <admin@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-09-01 13:37:14 +00:00
Guillaume Thiolliere
6c8946ae21
fix tracker repeat writes ( #9653 )
2021-08-31 12:41:44 +00:00
Guillaume Thiolliere
a44527b288
Fix benchmark writer ( #9626 )
...
* fix benchmark writer
* update doc to show the more general implementation
2021-08-27 13:43:01 +00:00
Guillaume Thiolliere
10268c5b76
fix perthing add ( #9638 )
2021-08-27 13:07:26 +00:00
Guillaume Thiolliere
0f1896e7a2
improve doc of pallet macro ( #9625 )
...
* improve doc
* fmt
2021-08-26 01:14:09 +00:00
Guillaume Thiolliere
e3eb5fda68
fix compilation ( #3657 )
2021-08-18 14:30:32 +02:00
Guillaume Thiolliere and parity-processbot
f78f803698
companion: for call usage https://github.com/paritytech/substrate/pull/9418 ( #3522 )
...
* add test for call size
* fix box arg
* fix xcm variant length + increase limit a bit
* fix para sudo wrapper call length
* reorganize
* fmt
* fix tests
* update Substrate
Co-authored-by: parity-processbot <>
2021-08-07 10:10:28 +00:00
38db14089b
Improve call, and usage in pallet utility ( #9418 )
...
* WIP
* WIP
* WIP
* add some tests and limit
* remove wip test
* fmt
* Update bin/node/runtime/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* fmt
* use primitives allocation limit
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-08-07 09:34:25 +00:00
Guillaume Thiolliere
8f388559a1
Fix benchmarking macro for pallet with instance and where clause ( #9485 )
...
* fix benchmarking instance with where clause
* fmt
* add tests
* remove unused import
* fix tests
* doc
2021-08-04 08:45:56 +00:00
Guillaume Thiolliere
98b2455326
Refactor codec implementation for header ( #9489 )
...
* add test
* refactor
2021-08-03 15:03:06 +00:00
Guillaume Thiolliere
85e11980ff
remove unused ( #3553 )
2021-08-02 14:58:52 +00:00
Guillaume Thiolliere
988c399983
fix codec ( #9445 )
2021-07-27 23:02:55 +02:00
Guillaume Thiolliere and Shawn Tabrizi
23e8088c1c
Make allocator limit available for the runtime ( #9393 )
...
* make allocator limit available
* better inner doc
* move const
* fmt
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-07-27 13:04:11 +00:00
e18f388dac
Benchmarking also benchmark for decoding the call ( #9343 )
...
* benchmark for decoding of call
* better names
* fix benchmarks
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_lottery --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --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 >
2021-07-22 09:29:44 +00:00
Guillaume Thiolliere
5e320614c4
Improve test in bridge ( #3507 )
...
* improve test
* better doc
2021-07-22 07:39:32 +00:00
Guillaume Thiolliere
1e8035a273
Fix invalid link in doc ( #9351 )
...
* fix invalid link
* Update client/executor/common/src/runtime_blob/globals_snapshot.rs
* more fix
2021-07-16 07:24:26 +00:00
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
0b10a24cd2
Minor refactor ( #3386 )
...
* minro refactor
* Update node/core/runtime-api/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update node/core/runtime-api/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-06-30 11:11:43 +00:00
4a1d1b2de3
Companion for upgrade of transaction-payment to pallet macro ( #3267 )
...
* update generic of storages
* update Substrate
* Remove unused import
* Remove unused import in test
Co-authored-by: parity-processbot <>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-06-25 07:45:52 +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
Guillaume Thiolliere
364a8d751d
fix test ( #3240 )
2021-06-14 12:56:36 -05:00
Guillaume Thiolliere and parity-processbot
0ca6ee45b5
companion for staking/election: prolonged era and emergency mode for governance submission. ( #3201 )
...
* companion
* update Substrate
Co-authored-by: parity-processbot <>
2021-06-14 14:33:55 +00: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 Bastian Köcher
b36e4dbca5
update substrate/polkadot with construct_runtime changes ( #485 )
...
* update substrate/polkadot with construct_runtime changes
* fix update
* Fixes
* More fixes
* fix test, but might be wrong fix
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-06-10 17:50:09 +02: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 and Gav Wood
b03d11b8e0
Bump polkadot + fix parachain unnamed field ( #412 )
...
* parachain unnamed field
* bump polkadot: cargo udpate -p xcm
* Update lock
* Fixes
* Fixes
Co-authored-by: Gav Wood <gavin@parity.io >
2021-04-27 18:56:08 +02:00
Guillaume Thiolliere
41e57c4509
change junction parachain id from named field to unnamed field ( #2940 )
...
* use unnamed field for parachain variant in junction
* remove outdated comment
2021-04-27 14:49:55 +02:00
Guillaume Thiolliere
55c1f7ea92
fix link ( #2941 )
2021-04-27 14:48:28 +02: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 parity-processbot
f1f9192a38
Companion for inherent checks: #8173 ( #2560 )
...
* impl is_inherent for pallets
* fix
* fix master merge: inherent is
* update Substrate
Co-authored-by: parity-processbot <>
2021-04-13 09:53:29 +00: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
d0055b1af8
remove unused and sometime invalid type alias ( #2876 )
2021-04-12 20:33:46 +02:00
Guillaume Thiolliere and Robert Habermeier
beca01f118
Ease parachain candidate code fetching ( #2593 )
...
* code stored in para + modify CandidateDescriptor.
* WIP: digest + some more impl
* validation_code_hash in payload + check in inclusion
* check in client + refator
* tests
* fix encoding indices
* remove old todos
* fix test
* fix test
* add test
* fetch validation code inside collation-generation from the relay-chain
* HashMismatch -> PoVHashMismatch + miscompilation
* refactor, store hash when needed
* storage rename: more specific but slightly too verbose
* do not hash on candidate validation, fetch hash instead
* better test
* fix test
* guide updates
* don't panic in runtime
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
2021-04-01 23:55:39 +02:00
Guillaume Thiolliere
445f626c34
Fix usage ( #2775 )
2021-03-30 18:37:24 +02: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 and Bastian Köcher
7df563d471
remove unused ( #2676 )
...
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-03-23 20:33:26 +01: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