Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade polkadot-v0.9.38 #886

Merged
merged 23 commits into from
Mar 1, 2023

Conversation

tgmichel
Copy link
Contributor

@tgmichel tgmichel commented Feb 22, 2023

  • Upgrades ORML to use v0.9.38 and support XCM v3.
  • Includes runtime migration for orml-asset-registry and orml-unknonw-tokens pallet (v2::MultiLocation -> v3::MultiLocation).
  • XCM v3 removes v0/v1 and therefore the extrinsic interface for orml-xtokens is changed. You will need to detect XCM version and construct the extrinsic accordingly.

Related issue paritytech/polkadot#6770

@tgmichel tgmichel marked this pull request as ready for review February 23, 2023 13:42
@tgmichel tgmichel changed the title WIP Upgrade polkadot-v0.9.38 Upgrade polkadot-v0.9.38 Feb 23, 2023
@tgmichel tgmichel requested a review from girazoki February 23, 2023 13:43
@tgmichel
Copy link
Contributor Author

@xlc PTAL

@xlc xlc requested review from shaunxw and zjb0807 and removed request for girazoki February 23, 2023 20:22
asset-registry/src/lib.rs Outdated Show resolved Hide resolved
traits/src/location.rs Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2023

Codecov Report

Merging #886 (a2fddf2) into master (dbf86dc) will decrease coverage by 0.06%.
The diff coverage is 73.07%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #886      +/-   ##
==========================================
- Coverage   78.73%   78.67%   -0.06%     
==========================================
  Files         104      105       +1     
  Lines       10643    10750     +107     
==========================================
+ Hits         8380     8458      +78     
- Misses       2263     2292      +29     
Impacted Files Coverage Δ
asset-registry/src/lib.rs 89.53% <ø> (ø)
asset-registry/src/mock/relay.rs 16.66% <0.00%> (-8.34%) ⬇️
authority/src/lib.rs 78.66% <0.00%> (ø)
benchmarking/src/lib.rs 30.43% <0.00%> (-0.54%) ⬇️
vesting/src/mock.rs 100.00% <ø> (ø)
xtokens/src/mock/para_relative_view.rs 24.39% <16.66%> (-0.61%) ⬇️
xtokens/src/mock/para_teleport.rs 15.78% <16.66%> (+2.45%) ⬆️
xtokens/src/mock/relay.rs 55.55% <42.85%> (+12.69%) ⬆️
asset-registry/src/mock/mod.rs 78.82% <45.83%> (-5.99%) ⬇️
unknown-tokens/src/lib.rs 70.73% <50.00%> (ø)
... and 24 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tgmichel
Copy link
Contributor Author

@zjb0807 sorry for the CI mess, fixed my local env to fit the Cargo.dev workflow.

@valentunn
Copy link

valentunn commented Feb 28, 2023

Hey everyone! Valentin from Nova Wallet team here. I wanted to check out on possible breaking changes that this PR introduces for clients like wallets and dapps:

  1. Will it still be possible to use V1 of VersionedMultiAsset and VersionedMultiLocation when calling transfer_multiasset?
  2. Will dest_weight_limit argument type change from V1 (Compact) to V2 (struct)?
  3. Do you plan to deploy runtime with new version of the pallet to testnet once PR is merged?

@wangjj9219
Copy link
Contributor

Hey everyone! Valentin from Nova Wallet team here. I wanted to check out on possible breaking changes that this PR introduces for clients like wallets and dapps:

  1. Will it still be possible to use V1 of VersionedMultiAsset and VersionedMultiLocation when calling transfer_multiasset?
  2. Will dest_weight_limit argument type change from V1 (Compact) to V2 (struct)?
  3. Do you plan to deploy runtime with new version of the pallet to testnet once PR is merged?

"Very unlikely, but in case your parachain runtime is still using v0 or v1 versions, you must upgrade at least to v2 since v0 and v1 will no longer be supported." quoted from https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-38/2122

If the cross-chain transfer extrinsics your client constructed is still using the v0 and v1 formats params, like multilocation, it is recommended to upgrade to v2

Copy link
Contributor

@zjb0807 zjb0807 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zjb0807 zjb0807 mentioned this pull request Mar 1, 2023
@xlc xlc merged commit 0a64a0b into open-web3-stack:master Mar 1, 2023
@xlc xlc added breaking-change This PR includes breaking changes runtime-migration This PR modify storages and includes runtime migration labels Mar 1, 2023
@xlc
Copy link
Member

xlc commented Mar 1, 2023

ORML users: This upgrades ORML to use v0.9.38 and support XCM v3.
For parachain team: This includes runtime migration for orml-asset-registry and orml-unknonw-tokens pallet.
For dApp & wallet team: XCM v3 removes v0/v1 and therefore the extrinsic interface for orml-xtokens is changed. You will need to detect XCM version and construct the extrinsic accordingly.

@valentunn
Copy link

valentunn commented Mar 2, 2023

Hey @xlc ! Can we expect updated version of xTokens to be live on Acala Mandala before its deployment to Karura to be able to test the integration? Also wanted to ask what are the expected timeline for update to be live on Karura

@xlc
Copy link
Member

xlc commented Mar 2, 2023

There is no urgency on this release for Karura so we will take as much time as required for testing.
Acala Mandala isn't suitable for XCM testing as it doesn't connect to other parachains. However you can use Chopsticks to fork Karura and upgrade it to the new runtime to test integration.
We don't expect the new release to be created within 3 weeks.

devdanco added a commit to gasp-xyz/open-runtime-module-library that referenced this pull request May 25, 2023
* run CI for release branch

* Upgrade polkadot-v0.9.31 (open-web3-stack#830)

* Upgrade polkadot-v0.9.31

* Update authority/src/lib.rs

Co-authored-by: Xiliang Chen <[email protected]>

* fix tests

Co-authored-by: Xiliang Chen <[email protected]>

* add CODECOV_TOKEN (open-web3-stack#836)

* claim_rewards should not create empty records (open-web3-stack#835)

* Update Readme (open-web3-stack#837)

* Update Readme

Plasm Network rebranded last year to Astar Network
Source: https://medium.com/astar-network/plasm-rebrands-to-astar-network-in-pursuit-of-becoming-a-polkadot-native-dapp-hub-6db3121c4f13

* Update README.md

Change order

* Token hook refactoring; Posthooks for deposit and transfer (open-web3-stack#834)

* feat(tokens): Refactor hooks into single trait

* feat(tokens): Add post-hooks for Transfer and Deposit

* chore(tokens): improve mutation hook naming

* fix(tokens): PostDeposit hook (open-web3-stack#839)

* fix(tokens): PostDeposit hook

* test(tokens): posthook correctness

* fix(tokens): use `assert` instead of `ensure` in mock posthooks

* Add Centrifuge to users of orml (open-web3-stack#842)

* Add Crust to ORML (open-web3-stack#843)

* refactor: make weight argument in xtokens transfers optional (open-web3-stack#841)

* refactor: make weight argument in xtokens be of type WeightLimit

* refactor: rename dest_weight -> dest_weight_limit

* Update weight-gen template.hbs (open-web3-stack#844)

* prevent nested DelayedOrigin (open-web3-stack#845)

* prevent nested DelayedOrigin

* fix deps

* Update authority/src/tests.rs

Co-authored-by: zjb0807 <[email protected]>

* allow nested DelayedOrigin

* update docstring

* typo fix

Co-authored-by: zjb0807 <[email protected]>

* Add try-runtime feature for orml-payments (open-web3-stack#846)

* Add try-runtime feature for orml-payments

* Add features

* Update to Polkadot v0.9.32 (open-web3-stack#848)

* Add new for DelayedOrigin (open-web3-stack#849)

* Update README.md (open-web3-stack#851)

* Update README.md

Update modules description

* Update README.md

Further updates on description.

* #xcm polishing #xtokens  README.md (open-web3-stack#856)

* Update github actions (open-web3-stack#855)

* Update github actions

* trigger GitHub actions

* Changed `vested_transfer` extrinsic behavior. (open-web3-stack#857)

* Changed `vested_transfer` extrinsic behavior.
Fixed self-vesting case (`from` == `to`) when it was possible to self-freeze funds above the current account balance.

* added test for self-vesting case

* Upgrade polkadot-v0.9.33 (open-web3-stack#858)

* use explicit call index (open-web3-stack#865)

* Upgrade to polkadot v0.9.36 (open-web3-stack#864)

* build: upgrade to polkadot v0.9.36

Signed-off-by: Yaroslav Bolyukin <[email protected]>

* style: fix formatting

Signed-off-by: Yaroslav Bolyukin <[email protected]>

* fix: polkadot dependency references

Signed-off-by: Yaroslav Bolyukin <[email protected]>

* build: use released cumulus

Signed-off-by: Yaroslav Bolyukin <[email protected]>

* fix: make asset_exists return false

Signed-off-by: Yaroslav Bolyukin <[email protected]>

Signed-off-by: Yaroslav Bolyukin <[email protected]>

* update asset_exists (open-web3-stack#866)

* Fix payments on-idle (open-web3-stack#868)

* fix payments on-idle

* update comment

* Switch to Rust-1.66 (open-web3-stack#869)

* feat: derive MEL for Value enum (open-web3-stack#867)

* feat: impl MEL for Value enum

* fmt: fix

* feat:Make the XcmTransfer trait support transfer_multiasset_with_fee (open-web3-stack#870)

* update bencher deps (open-web3-stack#872)

* add BenchmarkError::Weightless (open-web3-stack#873)

* add BenchmarkError::Weightless

* Update benchmarking/src/lib.rs

Co-authored-by: zjb0807 <[email protected]>

Co-authored-by: zjb0807 <[email protected]>

* Update jsonrpsee 0.16.2 (open-web3-stack#876)

* Update jsonrpsee 0.16.2

* fix clippy

* fix clippy

* Update README.md (open-web3-stack#879)

Added Mangata and Parallel Finance

* Update README.md (open-web3-stack#880)

Added Moonbeam

* Upgrade polkadot-v0.9.37 (open-web3-stack#882)

* Add lock events to tokens pallet (open-web3-stack#883)

* Implement lock events in update_locks(...)

* Implement lock tests

* Replace depracted clippy rule name

* Move tests into correct test file

* Use correct Event type

* Update xtokens docs (open-web3-stack#885)

* added ajuna network (open-web3-stack#887)

using mainly the orml-vesting ...

* Upgrade polkadot-v0.9.38 (open-web3-stack#886)

* Upgrade polkadot-v0.9.38

* use `as_bounded_slice`

* `latest` instead explicit version

* use `AllCounted` for asset deposit

* Update `asset-registry` tests

* Update `benchmarking` tests

* Update `traits` tests

* Update `unknown-tokens` tests

* Update `xcm-support` tests

* Update `xtokens` tests

* Update `Cargo.dev.toml` pin

* clippy

* Specific version instead `latest`

* Add test `MultiLocation` encoding

* Remove `sp-authorship`

* Update `sp-weights` pin

* Fix runtime-benchmarks

* Add `asset-registry` migration

* clippy

* Assert `StorageVersion`

* Assert multiple migration calls

* AddImpl `OnRuntimeUpgrade`

* Add `unknown-tokens` migration

* Use xcm::v3 instead of latest (open-web3-stack#889)

* max weight fix (open-web3-stack#891)

* XcmTransfer Trait (open-web3-stack#892)

* Add more methods on XcmTransfer trait

* Add Transferred for XcmTransfer

* fix tests

* fix clippy

* fix migration and tests (open-web3-stack#893)

* build: upgrade polkadot to v0.9.39 (open-web3-stack#897)

* Add & clean deprecated (open-web3-stack#895)

* clean deprecated

* add dependencies on RPC

* add deprecated on RPC

* fix clippy

* remove tests

* Expose Xtokens pallet weight (open-web3-stack#898)

* fix unknown-tokens migration (open-web3-stack#899)

* fix unknown-tokens migration

* remove debug print

* Upgrade polkadot to v0.9.40 (open-web3-stack#902)

* Upgrade polkadot to v0.9.40

* add import for Hasher

* replace from_ref_time to from_parts

* fix CI

* remove unnecessary workspace word

* update branch ref

---------

Signed-off-by: Yaroslav Bolyukin <[email protected]>
Co-authored-by: Bryan Chen <[email protected]>
Co-authored-by: zjb0807 <[email protected]>
Co-authored-by: wangjj9219 <[email protected]>
Co-authored-by: Maarten <[email protected]>
Co-authored-by: Daniel Savu <[email protected]>
Co-authored-by: Miguel Hervas <[email protected]>
Co-authored-by: Myron <[email protected]>
Co-authored-by: sander2 <[email protected]>
Co-authored-by: Nuno Alexandre <[email protected]>
Co-authored-by: Lawrence Law - Acala <[email protected]>
Co-authored-by: Dzmitry Lahoda <[email protected]>
Co-authored-by: Pavel Orlov <[email protected]>
Co-authored-by: Daniel Shiposha <[email protected]>
Co-authored-by: Yaroslav Bolyukin <[email protected]>
Co-authored-by: William Freudenberger <[email protected]>
Co-authored-by: NingBo Wang <[email protected]>
Co-authored-by: Ermal Kaleci <[email protected]>
Co-authored-by: Andrew Plaza <[email protected]>
Co-authored-by: Joshua Cheong <[email protected]>
Co-authored-by: Harald Heckmann <[email protected]>
Co-authored-by: Cedric Decoster <[email protected]>
Co-authored-by: tgmichel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This PR includes breaking changes runtime-migration This PR modify storages and includes runtime migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants