Bastian Köcher
e360cff92e
pallet-offences: Switch to partition_point ( #9049 )
...
This changes the code to use `partition_point` instead of
`binary_search_by_key`, because this was very likely the problematic
pallet 2 weeks ago on polkadot.
2021-06-12 02:38:17 +02:00
Shaun Wang
0869fdf9aa
Migrate pallet-staking to pallet attribute macro ( #9083 )
...
* Migrate staking pallet to pallet attribute macro.
* HistoryDepth default value.
* Make all calls public.
* Update frame/staking/src/lib.rs
* remove externalities again
* Update lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-12 00:22:40 +00:00
Bastian Köcher
68833498c6
Transaction pool: Remove futures-diagnose and thread pool ( #9074 )
...
* Transaction pool: Remove futures-diagnose and thread pool
This pr removes `futures-diagnose` as this isn't used anymore. Besides
that the pr also removes the thread pool that was used to validate the
transactions in the background. Instead of this thread pool we now spawn
two separate long running tasks that we use to validate the
transactions. All tasks of the transaction pool are now also spawned as
essential tasks. This means, if any of these tasks is stopping, the node
will stop as well.
* Update client/transaction-pool/src/api.rs
2021-06-11 17:24:30 +00:00
Shawn Tabrizi
ed448ef28b
Implement transfer_all in Balances Pallet ( #9018 )
...
* transfer_all
* benchmark
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* update
* add note
* typo
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-06-11 15:45:13 +00:00
Bastian Köcher
11037ac35f
Try fix ui tests ( #9082 )
...
* Try fix ui tests
* More
2021-06-11 15:12:57 +00:00
Pierre Krieger
576a39a25b
Don't connect to reserved nodes if they're banned ( #9020 )
2021-06-11 12:36:37 +00:00
André Silva
b22766dab3
grandpa: ignore justifications from other consensus engines ( #9075 )
2021-06-11 11:18:41 +00:00
Folyd
907e52b28c
Migrate ProfilingLayer to tracing registry API ( #8943 )
...
* Migrate ProfilingLayer to tracing registry API
* Remove the `current_span` field from `BlockSubscriber`.
* Bump the `tracing-subscriber` version
* Fix Gitlab CI
2021-06-10 17:31:49 +00:00
Zeke Mostov
f0120d3b62
[try-runtime-cli] Offchain worker support ( #8966 )
...
* make remote-ext work with ws and safe RPCs
* Update docs.
* Update utils/frame/remote-externalities/Cargo.toml
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* Fix test
* Update lock file
* Update utils/frame/remote-externalities/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Fix build again.
* checkpoint, merging the paged rpc now
* revert lifetime stuff
* WIP: remote client init not working
* Small cleanups
* use jsonrpsee alpha.7
* WIP
* Executiing without errors
* Reorg & cleanup
* Trivial cleaning
* Add txpool & keystore extension
* Small cleaning
* More :cleaning
* Flags: page-size, override-code
* WIP
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Remove heap_pages
* Dry code extraction from state
* Formatting
* More formatting
* Add issue todo
* Use jsonrpsee 0.2.0
* Try trigger gitlab
* Fix "block_import_works" test
* fix native_big_block_import_fails_on_fallback test
* fix commit should work
* Rewrite UI tests
* Revert "Rewrite UI tests"
This reverts commit ada7f670f701c21fb399946a3f6918453f537bcb.
* try again with UI
* Use const for legacy heap pages val
* Move parse module to its own file
* Move rpc_api module to its own file
* Apply suggestions from code review
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* trait names: Block, not B
* Corect HEAP_PAGES_TEST_LEGACY export
* Update utils/frame/remote-externalities/src/rpc_api.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Revert test_ext heap_page insert; adjust storage root instead
* Doc comments for try_runtime::cli::Command
* TryRuntime stub
* trailing comma
* Remove unused dev dep in frame-executive
* Improve parse::hash variable name & error index
* Use Result for rpc_api fns
* Richer err messagges
* Remove HEAP_PAGE_TEST_LEGACY
* Update bin/node/executor/tests/basic.rs
Co-authored-by: kianenigma <kian@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
2021-06-09 22:05:28 +00:00
Joshy Orndorff
5e0f922db4
remove explicit unit return type ( #9053 )
2021-06-09 14:36:41 +00:00
radupopa2010
43422ba440
READY Update simnet tests to v5 ( #8946 )
...
* Update simnet tests to v4
* enable simnet tests for PRs
* add stage to job "test-linux-stable-int"
* v2.0.0simnet
* alow build-for-simnet option
* Fix passing of IMAGE_TAG to downstream
* forgot to build-for-simnet
* build-for-simnet
* build-for-simnet
* build-for-simnet
* build-for-simnet
* build-for-simnet
* take a shortcut build-for-simnet
* build-for-simnet
* update triggering script to polkadot version
* "revert me"
* "revert me" build-for-simnet
* add simnet version as arg to script
* revert me build-for-simnet
* build-for-simnet
* remove triggering simnet for PRs for now
* Add suggestions from Vladimir
* Add suggestions from Vladimir
2021-06-09 13:51:27 +00:00
Squirrel
00ae1fa679
Stop sending network_state to telemetry ( #9026 )
...
(We send network information to prometheus)
2021-06-09 10:56:31 +01:00
Keith Yeung
828d1d74aa
Use pallet names to name enum variants ( #8990 )
...
* Remove unused event_metadata variable
* Eliminate mod_name and use pallet names to name enum variants
* Rename field name `pallet` to `path`
* Use only the pallet name to generate variant names
* Use new naming scheme for Event enum in sudo pallet tests
* Use new naming scheme for Event enum in offences pallet tests
* Use new naming scheme for Event enum in contracts pallet tests
* Use new naming scheme for Event enum in collective pallet tests
* Use new naming scheme for Event enum in bounties pallet tests
* Use new naming scheme for Event enum in balances pallet tests
* Use new naming scheme for Event enum in assets pallet tests
* Use new naming scheme for Event enum in frame support tests
* Use new naming scheme for Event enum in tips pallet tests
* Use new naming scheme for Event enum in transaction payment pallet tests
* Use new naming scheme for GenesisConfig fields in example pallet tests
* Use new naming scheme for GenesisConfig fields in elections pallet tests
* Use new naming scheme for Event enum in election provider multi-phase pallet tests
* Use new naming scheme for Event enum in elections phragmen pallet tests
* Use new naming scheme for GenesisConfig fields in chain spec
* Use new naming scheme for Event enum in staking pallet mock
* Use new naming scheme for GenesisConfig fields in node-template chain spec
* Use new naming scheme for GenesisConfig fields in node-testing chain spec
* Use new naming scheme for Event enum in node executor tests
* Use new naming scheme for GenesisConfig fields in transaction storage pallet mock
* Refactor match conditions
2021-06-09 09:31:29 +00:00
Guillaume Thiolliere
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
David
c7b9430b7f
Misc telemetry polish ( #8484 )
...
* Remove TelemetryWorker::with_transport
Make logging more useful
* Re-instate TelemetryWorker::with_transport
* Fix typo, don't spam
2021-06-08 18:10:16 +00:00
Zeke Mostov
40c0294ff6
Small doc updates to election-provider-multi-phase ( #9041 )
...
* Small doc updates to election-provider-multi-phase
* small change
* Improve challenge phase docs
* An honest
2021-06-08 17:26:08 +00:00
Niklas Adolfsson
51ee2747d2
deps(jsonrpsee): update to 0.2.0 to avoid alpha ( #9036 )
...
The motivation is a couple of bug fixes and not to pin to certain alpha versions.
2021-06-08 16:17:25 +00:00
Shawn Tabrizi
28bfba142e
Emit Bonded event when rebonding ( #9040 )
...
* Emit `Bonded` event when rebonding
* fix borrow checker
* 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
Co-authored-by: Parity Bot <admin@parity.io >
2021-06-08 14:02:57 +00:00
tgmichel
a4bfd40a1b
rpc-http-threads cli arg (#8890 )
...
* Add optional `rpc-http-threads` cli arg
* Update `http::ServerBuilder`threads
2021-06-08 11:18:57 +00:00
Andrew Jones
74793a83a5
Delete legacy runtime metadata macros ( #9043 )
2021-06-08 11:16:56 +00:00
Xiliang Chen
a032d62239
fix unreserve_all_named ( #9042 )
2021-06-08 10:59:19 +02:00
Alexander Theißen
60256d752e
contracts: Add new seal_call that offers new features ( #8909 )
...
* Add new `seal_call` that offers new features
* Fix doc typo
Co-authored-by: Michael Müller <michi@parity.io >
* Fix doc typos
Co-authored-by: Michael Müller <michi@parity.io >
* Fix comment on assert
* Update CHANGELOG.md
Co-authored-by: Michael Müller <michi@parity.io >
2021-06-07 17:40:23 +00:00
Pierre Krieger
5c14dd3f32
Periodically call Peerset::alloc_slots on all sets ( #9025 )
...
* Periodically call alloc_slots on all slots
* Add test
2021-06-07 13:00:03 +00:00
Kian Paimani
d9c1836987
Don't inlucde nominaotrs that back no one in the snapshot. ( #9017 )
2021-06-07 09:26:31 +00:00
cheme
f01c396677
Compact proof utilities in sp_trie. ( #8574 )
...
* validation extension in sp_io
* need paths
* arc impl
* missing host function in executor
* io to pkdot
* decode function.
* encode primitive.
* trailing tab
* multiple patch
* fix child trie logic
* restore master versionning
* bench compact proof size
* trie-db 22.3 is needed
* line width
* split line
* fixes for bench (additional root may not be needed as original issue was
with empty proof).
* revert compact from block size calculation.
* New error type for compression.
* Adding test (incomplete (failing)).
Also lacking real proof checking (no good primitives in sp-trie crate).
* There is currently no proof recording utility in sp_trie, removing
test.
* small test of child root in proof without a child proof.
* remove empty test.
* remove non compact proof size
* Missing revert.
* proof method to encode decode.
2021-06-07 09:06:38 +00:00
André Silva
f0c5699bc6
arithmetic: fix PerThing pow ( #9030 )
...
* arithmetic: add failing test for pow
* arithmetic: fix PerThing::pow
* Revert back to previous optimisations
Co-authored-by: Gav Wood <gavin@parity.io >
2021-06-06 10:07:29 +02:00
André Silva
c44b552d8f
consensus: handle justification sync for blocks authored locally ( #8698 )
...
* consensus: add trait to control justification sync process
* network: implement JustificationSyncLink for NetworkService
* slots: handle justification sync in slot worker
* babe: fix slot worker instantiation
* aura: fix slot worker instantiation
* pow: handle justification sync in miner
* babe: fix tests
* aura: fix tests
* node: fix compilation
* node-template: fix compilation
* consensus: rename justification sync link parameter
* aura: fix test compilation
* consensus: slots: move JustificationSyncLink out of on_slot
2021-06-04 21:31:06 +00:00
Andreas Doerr
a477d4dadf
Bump parity-db ( #9024 )
2021-06-04 14:46:16 +00:00
Arkadiy Paronyan
8a8cc7bc60
Fixed build ( #9021 )
2021-06-04 11:27:05 +00:00
Jakub Pánik
1480b13cc5
update ss58 type to u16 ( #8955 )
2021-06-04 09:01:05 +00:00
Xiliang Chen
223529e4dd
Named reserve ( #7778 )
...
* add NamedReservableCurrency
* move currency related trait and types into a new file
* implement NamedReservableCurrency
* remove empty reserves
* Update frame/support/src/traits.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* fix build
* bump year
* add MaxReserves
* repatriate_reserved_named should put reserved fund into named reserved
* add tests
* add some docs
* fix warning
* Update lib.rs
* fix test
* fix test
* fix
* fix
* triggier CI
* Move NamedReservableCurrency.
* Use strongly bounded vec for reserves.
* Fix test.
* remove duplicated file
* trigger CI
* Make `ReserveIdentifier` assosicated type
* add helpers
* make ReserveIdentifier assosicated type
* fix
* update
* trigger CI
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* trigger CI
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Gavin Wood <i@gavwood.com >
Co-authored-by: Shaun Wang <spxwang@gmail.com >
2021-06-04 09:32:46 +02:00
Andronik Ordian
003738b1c5
more useful error message ( #9014 )
2021-06-04 07:05:21 +00:00
Arkadiy Paronyan
84811dae00
Storage chain: Runtime module ( #8624 )
...
* Transaction storage runtime module
* WIP: Tests
* Tests, benchmarks and docs
* Made check_proof mandatory
* Typo
* Renamed a crate
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Added weight for on_finalize
* Fixed counter mutations
* Reorganized tests
* Fixed build
* Update for the new inherent API
* Reworked for the new inherents API
* Apply suggestions from code review
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Store transactions in a Vec
* Added FeeDestination
* Get rid of constants
* Fixed node runtime build
* Fixed benches
* Update frame/transaction-storage/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-04 06:50:59 +00:00
Bastian Köcher
258c1a86f6
Transaction pool: Ensure that we prune transactions properly ( #8963 )
...
* Transaction pool: Ensure that we prune transactions properly
There was a bug in the transaction pool that we didn't pruned
transactions properly because we called `prune_known`, instead of `prune`.
This bug was introduced by:
https://github.com/paritytech/substrate/pull/4629
This is required to have stale extrinsics being removed properly, so
that they don't fill up the tx pool.
* Fix compilation
* Fix benches
* ...
2021-06-03 16:04:29 +02:00
Shawn Tabrizi
f585bf1c1e
Add Call Filter That Prevents Nested batch_all ( #9009 )
...
* add filter preventing nested `batch_all`
* more tests
* fix test
* cargo run --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
Co-authored-by: Parity Bot <admin@parity.io >
2021-06-03 13:05:02 +00:00
Dmitry Kashitsyn
94717b93db
Removes unused import ( #9007 )
2021-06-03 11:25:02 +00:00
Gavin Wood
bf1ea96c66
Non-fungible token traits ( #8993 )
...
* Non-fungible token traits
* Docs
* Fixes
* Implement non-fungible trait for Uniques
* Update frame/uniques/src/impl_nonfungibles.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/uniques/src/impl_nonfungibles.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-03 13:20:34 +02:00
Andreas Doerr
ccb4e6a551
Add ecdsa::Pair::verify_prehashed() ( #8996 )
...
* Add ecdsa::Pair::verify_prehashed()
* turn verify_prehashed() into an associated function
* add Signature::recover_prehashed()
2021-06-03 09:46:43 +00:00
Shaun Wang
7ec6ebb627
Migrate pallet-democracy to pallet attribute macro ( #8824 )
...
* Migrate pallet-democracy to pallet attribute macro.
* Metadata fix.
* Trigger CI.
2021-06-03 08:30:21 +00:00
Pierre Krieger
152587bcb9
Discard notifications if we have failed to parse handshake ( #8806 )
2021-06-02 20:41:21 +02:00
Bastian Köcher
2ab5f9aeca
Transactionpool: Make ready_at return earlier ( #8995 )
...
`ready_at` returns when we have processed the requested block. However,
on startup we already have processed the best block and there
are no transactions in the pool on startup anyway. So, we can set `updated_at`
to the best block on startup.
Besides that `ready_at` now returns early when there are no ready nor
any future transactions in the pool.
2021-06-02 18:13:47 +00:00
Shawn Tabrizi
554a0cb274
also fix bounded vec ( #8987 )
2021-06-02 04:30:53 +00:00
MOZGIII
e63730b763
Convert another instance of Into impl to From in the macros ( #8986 )
...
* Convert another instance of Into impl to From in the macros
* Convert another location
2021-06-01 20:48:31 +00:00
Boiethios
29a7559fe3
Update WeakBoundedVec's remove and swap_remove ( #8985 )
...
Co-authored-by: Boiethios <felix-dev@daudre-vignier.fr >
2021-06-01 22:27:30 +02:00
Gavin Wood
e819fd03f9
Uniques: An economically-secure basic-featured NFT pallet ( #8813 )
...
* Uniques: An economically-secure basic-featured NFT pallet
* force_transfer
* freeze/thaw
* team management
* approvals
* Fixes
* force_asset_status
* class_metadata
* instance metadata
* Fixes
* use nmap
* Fixes
* class metadata has information field
* Intiial mock/tests and a fix
* Remove impl_non_fungibles
* Docs
* Update frame/uniques/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/uniques/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/uniques/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/uniques/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Reserve, don't transfer.
* Fixes
* Tests
* Tests
* refresh_deposit
* Tests and proper handling of metdata destruction
* test burn
* Tests
* Update impl_fungibles.rs
* Initial benchmarking
* benchmark
* Fixes
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Attributes
* Attribute metadata
* Fixes
* Update frame/uniques/README.md
* Docs
* Docs
* Docs
* Simple metadata
* Use BoundedVec
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/uniques/src/lib.rs
Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev >
* Update frame/uniques/src/lib.rs
Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev >
* Update frame/uniques/src/lib.rs
Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev >
* Update frame/uniques/src/lib.rs
Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev >
* Update frame/uniques/src/lib.rs
Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev >
* Fixes
* Update frame/uniques/README.md
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/uniques/README.md
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/uniques/README.md
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Docs
* Bump
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-06-01 18:03:13 +02:00
Ashley
c408515501
Revert "Use SpawnTaskHandles for spawning tasks in the tx pool ( #8958 )" ( #8983 )
...
This reverts commit 84e402389b .
2021-06-01 15:14:33 +00:00
Sergei Shulepov
bf229f0ba4
Do not spend time on verifying the signatures before calling Runtime ( #8980 )
2021-06-01 14:43:29 +00:00
Ashley
84e402389b
Use SpawnTaskHandles for spawning tasks in the tx pool ( #8958 )
...
* Remove futures-diagnose
* Use `SpawnTaskHandle`s for spawning tasks in the tx pool
* Box the spawner
* Fix tests
* Use the testing task executor
2021-06-01 14:28:03 +00:00
Kian Paimani
ac3c88fd34
Inject hashed prefix for remote-ext ( #8960 )
...
* Inject for remote-ext
* Update utils/frame/remote-externalities/src/lib.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
* Update utils/frame/remote-externalities/src/lib.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
2021-06-01 13:49:06 +01:00
Bastian Köcher
ba52404a27
Dependabot use correct label ( #8973 )
2021-06-01 11:57:35 +00:00