Gavin Wood
3e9b8b47b3
Introduce hard limit on XCM assets ( #3579 )
2021-08-05 23:51:52 +02:00
Gavin Wood
00d6fc5af0
Avoid bad pattern of wildcard fees ( #3578 )
...
* Avoid bad pattern of wildcard fees
* spelling
* fmt
* Fix runtimes
* spelling
2021-08-05 17:44:34 +02:00
Martin Pugh
49a46f78d3
Bump versions, substrate and beefy in prep for v0.9.9 ( #3567 )
...
* bump versions, substrate and beefy
* bump substrate
2021-08-05 15:12:18 +02:00
Amar Singh
90e6d318c7
Add unit tests to pallet-xcm ( #3539 )
...
* init
* reserve transfer asset unit test
* happy path tests for all dispatchables and can teleport assets to self surprisingly enough
* better tests
* minimize mock
* clean
* test send xcm failure when router blocks
* rm numbers to prefer variables
* clean
* test execute with local effects
* rm local env stuff
* copyrights
* fix merge conflict
* appease spellcheck
* fmt
* address review comments
* clean constants
* fmt
2021-08-03 11:07:30 +00:00
Shawn Tabrizi
ff5d56fb76
cargo +nightly fmt ( #3540 )
...
* cargo +nightly fmt
* add cargo-fmt check to ci
* update ci
* fmt
* fmt
* skip macro
* ignore bridges
2021-08-02 10:47:33 +00:00
Shaun W
1b0baab401
XCM simulator ( #3538 )
...
* Add xcm-simulator and xcm-simulator-example.
* Abstract xcmp and dmp handling.
* Use mock message queue.
* Xcm simulator example unit tests.
* Use relay chain block number on sending msg.
* Fix typo.
* fmt
* more fmt
* Fix deps.
2021-08-01 15:16:14 +00:00
Alexander Popiak
86f6a173e4
Fix TransactAsset Implementation ( #3345 )
...
* convert local AssetNotFound errors into XcmError::AssetNotFound
aims allow the tuple implementation of TransactAsset to iterate properly
* add more XcmError descriptions
* adjust the rest of the TransactAsset tuple implementation to the behavior of can_check_in
* fix copy paste errors
* keep iterating tuple on Unimplemented error in TransactAsset
* add tests for tuple implementation of TransactAsset
* Update xcm/src/v0/traits.rs
Co-authored-by: Andronik Ordian <write@reusable.software >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-07-26 10:43:14 +00:00
Denis Pisarev
fc253e6e4d
WIP: CI: add spellcheck ( #3421 )
...
* CI: add spellcheck
* revert me
* CI: explicit command for spellchecker
* spellcheck: edit misspells
* CI: run spellcheck on diff
* spellcheck: edits
* spellcheck: edit misspells
* spellcheck: add rules
* spellcheck: mv configs
* spellcheck: more edits
* spellcheck: chore
* spellcheck: one more thing
* spellcheck: and another one
* spellcheck: seems like it doesn't get to an end
* spellcheck: new words after rebase
* spellcheck: new words appearing out of nowhere
* chore
* review edits
* more review edits
* more edits
* wonky behavior
* wonky behavior 2
* wonky behavior 3
* change git behavior
* spellcheck: another bunch of new edits
* spellcheck: new words are koming out of nowhere
* CI: finding the master
* CI: fetching master implicitly
* CI: undebug
* new errors
* a bunch of new edits
* and some more
* Update node/core/approval-voting/src/approval_db/v1/mod.rs
Co-authored-by: Andronik Ordian <write@reusable.software >
* Update xcm/xcm-executor/src/assets.rs
Co-authored-by: Andronik Ordian <write@reusable.software >
* Apply suggestions from code review
Co-authored-by: Andronik Ordian <write@reusable.software >
* Suggestions from the code review
* CI: scan only changed files
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-07-14 19:22:58 +02:00
Alexander Popiak
4a345045a9
Add XCM Tracing ( #3353 )
...
* add missing bridges logging target
* trace send_xcm
* trace execute_xcm
* trace calls in xcm-executor
* trace tuple implementations of xcm traits
* update cargo.lock
* remove bridge log target
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* log argument formatting
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-07-05 22:44:46 +00:00
Andronik Ordian
e80475ce4e
bump a bunch of deps in parity-common ( #3402 )
...
* bump a bunch of deps in parity-common
* update Substrate
* fix browser check
Co-authored-by: parity-processbot <>
2021-07-05 21:45:51 +02:00
Shawn Tabrizi
e0f481ca6c
XCM canonicalize + prepend_with fix ( #3269 )
...
* canonicalize + prepend_with fix
* fix doc
* not needed
* better docs, and more deterministic logic
* one more test
* Update xcm/src/v0/multi_location.rs
* Update multi_location.rs
Co-Authored-By: parity-processbot <>
* follow style guide
Co-Authored-By: parity-processbot <>
* oops
* Update xcm/src/v0/multi_location.rs
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
* Update xcm/src/v0/multi_location.rs
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
2021-07-02 16:31:13 +00:00
Martin Pugh
cfbfefc972
Bump version, specs & substrate in prep for v0.9.8 ( #3387 )
...
* bump version
* bump substrate
* bump spec_versions
2021-07-01 12:09:41 +02:00
Martin Pugh
022e8bc11c
Bump versions & spec_versions ( #3368 )
...
* bump versions & spec_versions
* bump Cargo.lock
2021-06-25 12:59:14 +02:00
Alexander Popiak
45ed52a273
Export fungibles_adapter Types ( #3334 )
...
* export fungibles_adapter types
* formatting
2021-06-21 17:09:54 +01:00
Shaun Wang
d8dc0f8778
Export 'TakeRevenue' trait. ( #3278 )
2021-06-17 14:20:40 +00:00
Shawn Tabrizi
29fa0a369d
Add XCM Decode Limit ( #3273 )
...
* Add XCM Decode Limit of 256
* use `decode_all_*`
* Update xcm/src/double_encoded.rs
2021-06-17 11:51:36 +00:00
Shawn Tabrizi
0282ad3128
fix xcm pallet origin ( #3272 )
2021-06-16 21:57:29 +01:00
Shawn Tabrizi
b64d9885ad
use safe math ( #3249 )
2021-06-16 10:19:41 +00:00
Martin Pugh
396b38b355
Bump version, spec_version & substrate in prep for release v0.9.5 ( #3238 )
...
* bump spec_version and version
* bump substrate
* remove migrations
* Revert "remove migrations"
This reverts commit ceeab924d1cd5c2d3d05f24ab28315f0566f89d8.
* remove stale migration for kusama + westend
2021-06-14 23:10:45 +02:00
Shawn Tabrizi
7f344df160
Companion for #9085 (pub calls) ( #3214 )
...
* update to use pub dispatchables
* update Substrate
* Update claims.rs
* remove warning
Co-authored-by: parity-processbot <>
2021-06-12 19:13:16 +01:00
Martin Pugh
b63184e4ec
Bump version, substrate, beefy in prep for v0.9.4 ( #3169 )
...
* bump version, substrate, beefy
* bump substrate
2021-06-03 17:05:31 +02:00
Gavin Wood
53de6871e0
Fix teleport accounting and add some events ( #3167 )
...
* Stuff to help inspect the DMP activity
* Fix teleport accounting
* Fixes
* Fixes
* Fixes
* Fixes
2021-06-03 15:39:08 +02:00
Alexander Popiak
a28d4a5c5d
XCM docs and tests ( #2948 )
...
* WIP
* add tests and docs for DoubleEncoded
* reformat parent_count
* add test for match_and_split
* fix append_with docs and add tests
* move Parachain enum variant to tuple
* Fix stuff
* add to append test
* simplify match
* formatting
* format and extend doc comments (including examples)
* fix typo
* add some doc comments
* add test for location inverter
* Add more tests/docs
* Fix build
* matches fungibles
* currency adapter.
* add more tests for location inverter
* extract max length magic number into constant
* adapters.
* Apply suggestions from code review
* Final touches.
* Repot and fixes
* Remove last todo
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-builder/src/barriers.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-builder/src/barriers.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-builder/src/currency_adapter.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-builder/src/filter_asset_location.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-builder/src/matches_fungible.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-executor/src/traits/conversion.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-executor/src/traits/conversion.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-executor/src/traits/transact_asset.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-executor/src/traits/should_execute.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: kianenigma <kian@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-03 02:01:25 +00:00
Shaun Wang
fe97d7eb16
XCM docstring typo fix ( #3138 )
...
* Typo fix in xcm crate.
* Update xcm/src/v0/junction.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-05-31 07:49:43 +00:00
Martin Pugh
2174d9475e
bump version & substrate ( #3085 )
2021-05-24 12:36:30 +02:00
Martin Pugh
fe97c3a3a2
Bump version & spec version in prep for v0.9.2 ( #3046 )
...
* bump version & spec version
* update Cargo.lock
* bump substrate
2021-05-18 23:03:45 +02:00
Gavin Wood
dcae333e82
Introduce reserve-asset transfer extrinsic ( #3010 )
...
* Introduce reserve-asset transfer extrinsic
* Fixes
2021-05-12 21:07:20 +02:00
Gavin Wood
41a93127a9
Check out/in assets when teleporting to maintain total issuance ( #3007 )
...
* Check out/in assets when teleporting to maintain total issuance
* Fixes
* Fixes
* Fixes
* Fixes
* Update xcm/xcm-executor/src/traits/transact_asset.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Docs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-05-12 08:39:16 +02:00
Martin Pugh
25cd67436c
Bump version to v0.9.1 and spec_version to v9010 ( #3001 )
...
* bump version and spec_version
* fix generate_release_text.rb
* Revert "fix generate_release_text.rb"
This reverts commit 9e01e0ae4f6db2155d123f69063db7d7564588e0.
* fix publish_draft_release
* fix publish_draft_release
* update target cache
2021-05-11 15:27:52 +02:00
Gavin Wood
36b9d23923
Dispatchable for teleporting assets ( #2995 )
...
* Dispatchable for teleporting assets
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Update node/network/protocol/src/peer_set.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update xcm/src/v0/traits.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-05-10 16:13:46 +02:00
Robert Habermeier
2d18b26151
Add parachains modules to Westend and Kusama runtimes ( #2854 )
...
* add `force_set_active_config`
* add parachains modules to Westend
* add parachains modules to Kusama runtime
* use real runtime API impl
* add module indices and remove auctions, crowdloan
* add benchmarks
* remove previous migrations and add host configuration set migration
* make compile
* Add Call Filter for Registrar and Slots except Root
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
* fix build
* update `add_benchmark`
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_paras_registrar.rs
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_slots.rs
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_paras_registrar.rs
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_slots.rs
* fix weights
* tweak more constants
* Fix up the kusama runtime
* Westend runtime fixups
* Fix MMR & Beefy for westend
* Fixes
* fix tests
* Update runtime/polkadot/src/constants.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update runtime/westend/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Parity Benchmarking Bot <admin@parity.io >
Co-authored-by: Gav Wood <gavin@parity.io >
2021-05-01 17:36:11 +02:00
Martin Pugh
7a99a18d1d
v0.9.0 prep ( #2959 )
...
* bump version and unify spec version
* bump substrate
* spec_version to 900
2021-04-29 18:21:58 +02:00
Gavin Wood
ce457a91e1
Implement null weight trader ( #2957 )
2021-04-29 15:35:07 +02:00
Gavin Wood
f36d8efb3d
Allow normal accounts to execute XCM for withdraw+teleport ( #2953 )
...
* Allow normal accounts to execute XCM for withdraw+teleport
* Bump Substrate
2021-04-28 23:13:19 +02:00
Gavin Wood
c0bf7e3d8c
Required weight is returned in case it exceeds limit. ( #2952 )
2021-04-28 18:24:39 +02:00
Martin Pugh
9c60982989
Bump version, bump substrate & update benchmarks in preparation for v0.8.31 ( #2938 )
...
* bump version
* bump cargo
* update benchmarks
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_identity --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_staking --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 >
2021-04-28 13:23:54 +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
Gavin Wood
9194219586
Add XCM Origin and converter ( #2896 )
...
* Add XCM Origin and converter
* IsMajority filter can be location-prefixed
* Update xcm/pallet-xcm/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/src/v0/multi_location.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Introduce UsingComponents to allow reuse of fee payment in XCM
* Use Drop rather than finalize
* Add errors for weight.
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Fixes
* Update xcm/xcm-builder/src/weight.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Various XCM fixes and improvements
* Fixes
* Update xcm/xcm-builder/src/weight.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-builder/src/weight.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update xcm/xcm-builder/src/weight.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Fixes
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-04-27 14:33:40 +02:00
Kian Paimani
47889d845c
Fix bench bot ( #2900 )
...
* Fix bench bot
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_membership --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
* Fix weights files
* Fix'
* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_membership --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 >
2021-04-21 01:38:19 +00:00
Gavin Wood
359ade2b89
Dedupe some code and companion for #8589 ( #2873 )
...
* Dedupe some code and companion for #8589
* Bump Substrate
2021-04-11 12:22:45 +00:00
Gavin Wood
025200fb25
Rococo allows ROC to be teleported from Tick, Trick and Track ( #2872 )
...
Also allows unpaid messages from them.
2021-04-10 12:59:50 +02:00
Gavin Wood
69bd6d8ef2
Introduce/integrate a collective into Rococo Relay ( #2869 )
...
* Introduce a collective into Rococo runtime
* Intregrate Rococo Collective into XCM
* Fixes
* Update runtime/rococo/src/lib.rs
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
2021-04-09 22:16:32 +02:00
Gavin Wood
c9102c11a4
XCM Revamp Continued ( #2865 )
...
* Introduce plurality XCM locations
* Add RelayedFrom
* DMP dispatch weight handling.
* Add pallet for XCM sending, add routing logic.
* Update error types & doc
* Fix warnings.
* Fixes
* Fixes
* Fixes
* Bump Substrate
* Fixes
* Docs
* Docs
* Docs
* Fixes
* Fixes
* Fixes
* Update xcm/pallet-xcm/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Docs
* Fixes
* Update lib.rs
* Fixes
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-04-09 20:34:28 +02:00
Gavin Wood
9b4844e853
Introduce plurality XCM locations ( #2846 )
...
* Introduce plurality XCM locations
* Add RelayedFrom
2021-04-08 20:58:06 +02:00
Gavin Wood
adc238ad86
XCM revamp ( #2836 )
...
* Remove unused relaying XCM
* Aggregate HRMP (XCMP/HMP) messages. Payloads for spambot.
* Revert lock
* Fix
* Broken example
* Introduce fee payment mechanics into XCM.
* Weight limitations on XCM execution
* Mock environment for tests and the first test
* Tests for XCM and a few refactors.
* Remove code that's not ready
* Fix for an XCM and an additional test
* Query response system
* XCMP message dispatch system reimagining
- Moved most of the logic into xcm-handler pallet
- Altered the outgoing XCMP API from push to pull
- Changed underlying outgoing queue data structures to avoid multi-page read/writes
- Introduced queuing for incoming messages
- Introduced signal messages as a flow-control sub-stream
- Introduced flow-control with basic threshold back-pressure
- Introduced overall weight limitation on messages executed
- Additonal alterations to XCM APIs for the new system
* Some build fixes
* Remove the Encode bounds sprayed around
* More faff
* Fix bounds amek use latest scale codec.
* remove println
* fixes
* Fix XcmExecutor Tests
* Fix XCM bounds using derivative crate
* Refactor names of XcmGeneric &c into Xcm
* Repot the xcm-executor into xcm-builder
* Docs
* Docs
* Fixes
* Update xcm/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Fixes
* Docs
* Update runtime/parachains/src/ump.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Docs
* Fixes
* Fixes
* Fixes
* Docs
* Fixes
* Fixes
* Introduce transfer_asset specialisation.
* Fixes
* Fixes
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-04-07 22:38:29 +02:00
Guillaume Thiolliere
445f626c34
Fix usage ( #2775 )
2021-03-30 18:37:24 +02:00
Gavin Wood
0395b5dd16
Fungibles adapter and MultiLocation::X8 ( #2662 )
...
* Fungibles adapter and MultiLocation::X8
* Comments
* Comment & whitespace
* Fix up CI/CD for the new labels.
* Fix labels
* Whitespace
* Fixes
* Update Cargo.lock
* Update xcm/xcm-builder/src/fungibles_adapter.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-03-30 17:52:50 +02:00
Martin Pugh
9938513e71
Bump version , weights and substrate in prep for v0.8.30 ( #2690 )
...
* bump version and substrate
* bump old forgotten versions
* update weights
* bump substrate
* Revert "bump substrate"
This reverts commit 8b5004b6fe9ce9ccdf143d3fe878802931ea4f2f.
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-03-25 11:29:11 +01:00
Shaun Wang
d859734ed9
Replace XCM Error::Undefined usage ( #2580 )
...
* Replace undefined error in currency adapter.
* Update tranact asset errors.
* Update TransactAsset trait documentations.
* Update currency adapter error documentation.
2021-03-09 15:46:30 +01:00
Amar Singh
5b3fa6f7f6
add accountkey20 conversion impls ( #2576 )
2021-03-07 17:54:30 -04:00