open-web3-stack / open-runtime-module-library

Substrate Open Runtime Module Library
Apache License 2.0
447 stars 289 forks source link

deps: update substrate-sdk to version 1.7.0 #977

Closed RomarQ closed 4 months ago

RomarQ commented 4 months ago

Update polkadot-sdk to version 1.7.0

Includes many xcm changes, which were introduced in https://github.com/paritytech/polkadot-sdk/pull/1230.

To reduce the amount of breaking changes I did not remove the multi prefix from extrinsics in the xtokens pallet:

`transfer_multiasset`: Transfer `MultiAsset` assets.
`transfer_multiasset_with_fee`: Transfer `MultiAsset` specifying the fee
`transfer_multicurrencies`: Transfer several currencies specifying the
`transfer_multiassets`: Transfer several `MultiAsset` specifying the item

I tested the changes against https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.7.0

RomarQ commented 4 months ago

Updating dependencies in Cargo.dev.toml since the crates have been updated in crates.io.

RomarQ commented 4 months ago

@xlc Could you have a look at the changes? Thank you in advance :)

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 80.50633% with 77 lines in your changes are missing coverage. Please review.

Project coverage is 85.25%. Comparing base (c7910d3) to head (68fdf4d).

Files Patch % Lines
xtokens/src/mock/para_relative_view.rs 30.30% 23 Missing :warning:
xtokens/src/lib.rs 76.25% 19 Missing :warning:
asset-registry/src/impls.rs 60.00% 10 Missing :warning:
xtokens/src/mock/para_teleport.rs 0.00% 10 Missing :warning:
asset-registry/src/mock/relay.rs 0.00% 3 Missing :warning:
xtokens/src/mock/relay.rs 40.00% 3 Missing :warning:
asset-registry/src/mock/mod.rs 92.85% 2 Missing :warning:
unknown-tokens/src/lib.rs 75.00% 2 Missing :warning:
xcm-support/src/lib.rs 71.42% 2 Missing :warning:
asset-registry/src/mock/para.rs 93.33% 1 Missing :warning:
... and 2 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #977 +/- ## ========================================== - Coverage 85.27% 85.25% -0.02% ========================================== Files 87 87 Lines 10395 10350 -45 ========================================== - Hits 8864 8824 -40 + Misses 1531 1526 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RomarQ commented 4 months ago

I prefer to leave upgrade to XCM v4 on a separate PR and I prefer only upgrade to it when it is thoroughly tested (e.g. when it is used by system parachains on testnets). There were enough bugs on v3 upgrades and we shouldn't take lightly on upgrading to v4.

Not sure it will be possible to not upgrade to XCM v4 since xcm-executor uses xcm::latest, I will try to have something minimal with a converter between V4 and V3.

More info: https://github.com/paritytech/polkadot-sdk/issues/3214

I think the only breaking change regarding the SCALE encoding is the AssetId since the Abstract variant has been removed.

xlc commented 4 months ago

I will say it will be a major regression in polkadot-sdk if we are forced to use xcm v4 and if that’s actually the case, we need polkadot-sdk to be patched first.

xlc commented 4 months ago

with https://github.com/paritytech/polkadot-sdk/pull/3328 we won't get 100% compatibility between v4 types and v3 types