Bastian Köcher
eac38de198
Remove RandomNumberGenerator ( #9198 )
...
* Remove RandomNumberGenerator
This is not used in Substrate/Polkadot. If someone else needs it, they
can copy the code or use chacha.
* 🤦
2021-06-24 14:19:36 +00:00
kotlarmilos
0763716c92
Add OriginTrail Parachain to SS58 Registry ( #9067 )
...
* Add OriginTrail Parachain to SS58 Registry
* Update ss58-registry.json
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-06-24 13:18:15 +02:00
Squirrel
ea1f21a904
Use MAX associated const ( #9196 )
...
* Use MAX associated const
2021-06-24 11:53:49 +01:00
Squirrel
09d9c2c9f6
Fix to support u32::MAX ( #9188 )
...
* Fix to support u32::MAX
* Update primitives/runtime/src/random_number_generator.rs
Co-authored-by: Andronik Ordian <write@reusable.software >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-06-24 07:20:15 +00:00
Tomasz Drwięga
f20edfa262
Transaction Pool docs ( #9056 )
...
* Add transaction pool docs.
* Extra docs.
* Apply suggestions from code review
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
* Expand on some review comments.
* Update README.md
Fixed typos / spellings
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Squirrel <gilescope@gmail.com >
2021-06-24 00:10:44 +02:00
Pierre Krieger
4366e68d08
Fix alert about delay between best and finalized block ( #9150 )
...
* Fix alert about delay between best and finalized block
* Revert debugging changes
2021-06-23 15:17:10 +00:00
Squirrel
6ccb5dc713
Result<Option<>> rather than Option<Option<>> ( #9119 )
...
* Clearer API to code against.
2021-06-23 13:41:46 +01:00
Squirrel
07449840bd
Less slices ( #9176 )
...
* Less slices
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-06-23 13:33:48 +01:00
Julien
7b50bbb9bf
Fixed typo in comment ( #9182 )
2021-06-23 12:44:11 +02:00
Guillaume Thiolliere
0af5d6ff32
fix typo ( #9184 )
2021-06-23 10:34:54 +00:00
Disconnect3d
0846cf5d27
node-template: remove redundant types from runtime ( #9161 )
...
Removes `BlockId`, `SignedBlock` and `CheckedExtrinsic` as they are
unused within the runtime currently and the `BlockId` was defined twice.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-23 09:31:35 +00:00
Shawn Tabrizi
67e0c7b545
Remove Unused AccountIndex ( #9149 )
...
* remove unused `AccountIndex`
* Update lib.rs
2021-06-23 10:29:30 +02:00
akashi6824
1bd834b6a4
Add PolkaFoundry, PolkaSmith SS58 address ( #8623 )
...
* Add PolkaFoundry, PolkaSmith SS58 address
* chang decimals to 18
* fix format
* fix format
2021-06-23 10:04:40 +02:00
André Silva
e35261c605
grandpa: fix broken line breaks in logging ( #9179 )
2021-06-23 07:50:48 +00:00
André Silva
4069877c1c
consensus: remove unused offline tracker ( #9178 )
2021-06-23 05:01:11 +00:00
Zeke Mostov
b9d03f25da
try-runtime-cli: Add execute-block subcommand ( #9077 )
...
* Refactor remote_externalities::rpc_api
* try-runtime-cli: Adde `execute-block` subcommand
* Trivial
* Address some comments
* Use required_if & remove header-at usage
* Improve doc
* Update comment
* small tweaks
* add overwrite-code to shared params
* Update utils/frame/try-runtime/cli/src/lib.rs
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* make url a shared param
* add helper for block_at (#9153 )
* add helper for block_at
* remove redundant bound
* doc for fn block_at
* Update error message
Co-authored-by: kianenigma <kian@parity.io >
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
2021-06-22 20:36:12 +00:00
Pierre Krieger
1eca7767fe
Add substrate-rpc-subscription to exceptions in alert ( #9172 )
2021-06-22 16:11:42 +00:00
Robert Klotzner
d35d69a475
Add dummy Debug instance to authority discovery service. ( #9156 )
...
* Add dummy Debug instance to AuthorityDiscoveryService.
* Update client/authority-discovery/src/service.rs
More idiomatic print
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2021-06-22 13:24:33 +00:00
Tomasz Drwięga
8be60821bb
Fix allocator waste assessment in docs ( #9167 )
...
* Fix allocator comment.
* Add explanations where this comes from.
* Clarify absolute values.
2021-06-22 13:20:29 +02:00
Arkadiy Paronyan
77a4b980ae
Fast sync ( #8884 )
...
* State sync
* Importing state fixes
* Bugfixes
* Sync with proof
* Status reporting
* Unsafe sync mode
* Sync test
* Cleanup
* Apply suggestions from code review
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
* set_genesis_storage
* Extract keys from range proof
* Detect iter completion
* Download and import bodies with fast sync
* Replaced meta updates tuple with a struct
* Fixed reverting finalized state
* Reverted timeout
* Typo
* Doc
* Doc
* Fixed light client test
* Fixed error handling
* Tweaks
* More UpdateMeta changes
* Rename convert_transaction
* Apply suggestions from code review
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 >
* Code review suggestions
* Fixed count handling
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-06-22 09:32:43 +00:00
André Silva
5899eedc8c
grandpa: don't use block_on in Environment::report_equivocation ( #9154 )
...
* grandpa: don't use block_on in Environment::report_equivocation
* grandpa: add issue number to todo
2021-06-21 16:02:08 +00:00
Peter Goodspeed-Niklaus
46ccf17e7c
fix some failing ui tests ( #9157 )
...
* fix some failing ui tests
* Update frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr
* Update frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr
* fix ui test
* fix ui test
* TRYBUILD=overwrite cargo test --workspace -- ui
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2021-06-21 13:12:58 +00:00
Shawn Tabrizi
e5831c3db3
New Weights for All Pallets ( #9148 )
...
* Create run_benchmarks.sh
* Update run_benchmarks.sh
* new weights
* Delete run_benchmarks.sh
* wrong folder
* remove grandpa weight
* Update weights.rs
2021-06-21 09:57:43 +00:00
André Silva
a26ec52450
make SelectChain async ( #9128 )
...
* make SelectChain async
* make JustificationImport async
2021-06-20 11:01:09 +00:00
André Silva
650fc2f9c9
slots: slot lenience must take into account block proposal portion ( #9138 )
...
* aura, babe: proposal slot lenience must take into account proposal portion
* slots: add support for max_block_proposal_slot_portion
* fix compilation
* slots: add tests
* aura: fix comment
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* slots: log the actual proposing duration after lenience is applied
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-06-19 20:37:33 +00:00
André Silva
0417e4e37f
babe: add comments to block weight and expose block_weight function ( #9145 )
...
* babe: add comments to block weight and expose block_weight function
* babe: expose function for block weight key
2021-06-19 12:40:53 +00:00
André Silva
90d47870a9
grandpa: restrict grandpa gossip ( #9131 )
...
* grandpa: make gossip more conservative (and fair)
* grandpa: make round commit timer dependent on gossip_duration
* grandpa: add gossip tests
* grandpa: reduce variance in tests
2021-06-18 19:31:00 +00:00
Kian Paimani
50b9c35037
double the allocator limit ( #9102 )
...
* double the allocator limit
* 32 MiB should be enough for everybody.
* Update doc
Co-authored-by: Sergei Shulepov <sergei@parity.io >
2021-06-17 16:01:27 +00:00
Kian Paimani
4d6802c530
Make it possible to override maximum payload of RPC ( #9019 )
...
* Make it possible to override maximum payload of RPC
* Finish it.
* remove todo.
* Update client/cli/src/commands/run_cmd.rs
* Apply suggestions from code review
Co-authored-by: David <dvdplm@gmail.com >
* Apply suggestions from code review
Co-authored-by: David <dvdplm@gmail.com >
* Incorporate suggestions
* Thread rpc_max_payload from configuration to trace_block
* Try obey line gitlab/check_line_width.sh
* update state rpc tests
* Improve readbility
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
Co-authored-by: David <dvdplm@gmail.com >
2021-06-17 14:37:43 +00:00
Bastian Köcher
1278b9a6d4
Aura: Skip initialize block & remove cache ( #9132 )
...
This instructs the Aura runtime api to skip initialize block, when
requesting the authorities. This is important, as we don't want to use
the new authorities that should be used from the next block on.
Besides that, it removes the caching stuff. The cache is not available
on full nodes anyway. In the future we should store the authorities
probably in the aux store.
2021-06-17 07:27:53 +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
Shawn Tabrizi
9b87134bc6
Make backwards compatible with CountedMap ( #9126 )
2021-06-16 14:19:10 +00:00
Shaun Wang
b21c49524f
Migrate pallet-elections to pallet attribute macro ( #9088 )
...
* Migrate elections pallet to pallet attribute macro.
* Metadata fix.
* Update frame/elections/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-06-16 14:17:57 +00:00
André Silva
ae5cd339b5
grandpa: cleanup sync bounds ( #9127 )
...
* grandpa: cleanup sync bounds
* grandpa: cleanup imports
* remove cargo patch
2021-06-16 12:51: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
Shawn Tabrizi
36ac9111dd
Add Control to Growth of the Staking Pallet ( #8920 )
...
* start count
* track count
* add max limit
* min bonds for participating
* respect min bond when unbonding
* revert a bit of u32
* fix merge
* more merge fixes
* update to `Current*`
* add helper functions
* Update frame/staking/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* fix
* minbond as storage
* checkpoint
* chill_other
* better bond tracking
* MinBond to MinNominatorBond
* better doc
* use helper function
* oops
* simple hard limits to validators / nominators.
* better doc
* update storage version
* fix tests
* enable migrations
* min bond tests
* chill other tests
* tests for max cap
* check `None` on cap too
* benchmarks
* Update frame/staking/src/lib.rs
* Update frame/staking/src/lib.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
* Update frame/staking/src/lib.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
* Update frame/staking/src/tests.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
* fix benchmark
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* nits
* fix reap_stash benchmark
* remove lower bound to min bond
Co-authored-by: kianenigma <kian@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
2021-06-16 04:57:14 +00:00
Keith Yeung
58e837fcd3
Emit error when construct_runtime imports a non-existent pallet part ( #8949 )
...
* Emit error when construct_runtime imports a non-existent Call part
* Reword and display pallet name when emitting part not found error
* Migrate decl_outer_dispatch to a proc macro
* Rename calls.rs to call.rs
* Create new construct_runtime_v2 macro
* Add UI test for importing non-existent call part in construct_runtime
* Emit error when construct_runtime imports a non-existent Config part
* Emit error when construct_runtime imports a non-existent Event part
* Migrate decl_outer_inherent to a proc macro
* Emit error when construct_runtime imports a non-existent Inherent part
* Migrate decl_outer_validate_unsigned to a proc macro
* Emit error when construct_runtime imports a non-existent ValidateUnsigned part
* impl for old macro
* fix line width
* add doc
* hide macroes and use unique counter everywhere
* Remove construct_runtime_v2
* Encapsulate pallet part check macros in a module
* Fix macro definitions in dummy part checker
* Tag ProvideInherent impl with #[pallet::inherent] properly for authorship pallet
* Remove Call part from pallets that do not define it
* Add Call part unit tests
* Remove undefined Call part import from offences pallet
* Add tests for expand_outer_inherent
* Remove Call part from pallets that do not define them
* Remove Call part imports from pallets that do not have it defined
* Remove Call part import of the offences pallet from grandpa pallet mocks
* Update frame/support/test/tests/pallet.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Remove Call part imports for pallets that do not define them
* Move inherent tests to inherent_expand
* Add unit tests for expand_outer_validate_unsigned
* Add newline at the end of file
* fix ui test
* Small prayer to RNGsus for fixing CI
* Remove Call part from construct_runtime for randomness collective flip pallet
* Remove Call part import for randomness collective flip pallet
* Summon Laplace's demon instead of praying to RNGsus
* Update test expectations
* fix ui test and make sure it's flaky
* Revert "fix ui test and make sure it's flaky"
This reverts commit 362b6881389c911ef8d9ef85d71c9463f5694b20.
* Comment out test instead of putting it in conditional compilation
* Update UI test expectations
* Update UI test expectations
* Emit error when construct_runtime imports a non-existent Origin part
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Denis P <denis.pisarev@parity.io >
2021-06-16 03:44:22 +00:00
Ethan Brierley
7dd38e3aec
fix: CARGO_TARGET_DIR_freeze ( #9114 )
2021-06-15 16:23:57 +00:00
cheme
693b39f43b
Frame remove_all with size limit. ( #9106 )
...
* remove prefixed content with limit.
* test match
* factor comment and factor ext limit removal.
* fix benchmark
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-15 13:23:58 +00:00
Sergei Shulepov
5f0257f3b3
Test restoring zeroed data ( #9011 )
...
* Test restoring zeroed data
* Change to u64
2021-06-15 10:58:09 +00:00
Sergei Shulepov
3df32a5411
Decommit instance memory after a runtime call on Linux ( #8998 )
...
* Decommit instance memory after a runtime call on Linux
* Update documentation for the test
* Remove unfinished comment
* Use saturating_sub.
Also update the doc comment.
* Precise RSS tracking in the test
Instead of tracking RSS for the whole process we just look at the particular mapping that is associated with the linear memory of the runtime instance
* Remove unused import
* Fix unused imports
* Fix the unused imports error for good
* Rollback an accidental change to benches
* Fix the test
* Remove now unneeded code
2021-06-14 21:07:06 +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
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
h4x3rotab
cd52b3f2bc
Improve construct_runtime doc ( #9096 )
...
- Mention when the pallet definition parts are needed
- Rename "module" to "pallet"
2021-06-14 11:22:39 +00:00
Qinxuan Chen
6b33a79831
Migrate pallet-randomness-collective-flip to pallet attribute macro ( #9061 )
...
* migrate pallet-randomness-collective-flip to pallet attribute macro
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* fix some nits
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* remove some spacing things
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* remove space
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* use tabs
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2021-06-14 11:00:32 +00:00
Keith Yeung
c2f13a03a8
Allow renaming storage item prefixes ( #9016 )
...
* Implement parsing for #[pallet::storage_name] on storage items
* Rename storage prefix when a #[pallet::storage_name] is supplied
* Fix test_storage_info
* Rename storage_name to storage_prefix
* Check for duplicates when renaming storage prefixes
* Allow only string literals for storage_prefix renames
* Use proper spans for attribute errors
* Check for valid identifiers when parsing storage prefix renames
2021-06-14 10:07:09 +00:00
Peter Goodspeed-Niklaus
0975a92818
fix ordering of staking weight arguments ( #9063 )
...
Closes #9054 .
2021-06-14 09:16:14 +02:00
Bastian Köcher
45f8b6e91f
pallet-authorship: Fixing some nitpicks ( #9095 )
...
As reviewing the pallet yesterday, I have found some nitpicks that I
fixed.
2021-06-13 11:41:13 +00:00
chenwei
df0a50f966
Make find_proxy public. ( #9094 )
...
export `pallet_proxy::find_prox` and `ProxyDefinition`.
2021-06-13 12:27:54 +02:00