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

polkadot-sdk v1.11.0 uplift #1314

Merged
merged 34 commits into from
Aug 9, 2024
Merged

Conversation

Dinonard
Copy link
Member

@Dinonard Dinonard commented Aug 5, 2024

Summary

Uplifts dependencies from polkadot-sdk-v1.9.0 to polkadot-v1.11.0.

Impact For Users

Deprecation of pallet-xcm calls

The following calls from pallet-xcm have been deprecated:

  • reserve_transfer_assets - use limited_reserve_transfer_assets instead, with WeightLimit::Unlimited to keep the same behavior as before
  • send - use send_blob instead
  • execute - use execute_blob instead

Runtime API Update

XCM

Ability to check XCM payment fees, weight, fee amount.

Click here to check the API trait.
pub trait XcmPaymentApi<Call>
	where
		Call: Codec,
	{
		/// Returns a list of acceptable payment assets.
		///
		/// # Arguments
		///
		/// * `xcm_version`: Version.
		fn query_acceptable_payment_assets(xcm_version: Version) -> Result<Vec<VersionedAssetId>, Error>;
		/// Returns a weight needed to execute a XCM.
		///
		/// # Arguments
		///
		/// * `message`: `VersionedXcm`.
		fn query_xcm_weight(message: VersionedXcm<Call>) -> Result<Weight, Error>;
		/// Converts a weight into a fee for the specified `AssetId`.
		///
		/// # Arguments
		///
		/// * `weight`: convertible `Weight`.
		/// * `asset`: `VersionedAssetId`.
		fn query_weight_to_asset_fee(weight: Weight, asset: VersionedAssetId) -> Result<u128, Error>;
		/// Get delivery fees for sending a specific `message` to a `destination`.
		/// These always come in a specific asset, defined by the chain.
		///
		/// # Arguments
		/// * `message`: The message that'll be sent, necessary because most delivery fees are based on the
		///   size of the message.
		/// * `destination`: The destination to send the message to. Different destinations may use
		///   different senders that charge different fees.
		fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result<VersionedAssets, Error>;
	}

EVM Tracing

Alongside trace_call and trace_block, it is now also possible to trace a call directly, without the need for the transaction context.

        fn trace_call(
            header: &Block::Header,
            from: H160,
            to: H160,
            data: Vec<u8>,
            value: U256,
            gas_limit: U256,
            max_fee_per_gas: Option<U256>,
            max_priority_fee_per_gas: Option<U256>,
            nonce: Option<U256>,
            access_list: Option<Vec<(H160, Vec<H256>)>>,
        ) -> Result<(), sp_runtime::DispatchError>;

@Dinonard Dinonard self-assigned this Aug 5, 2024
@Dinonard Dinonard added shiden related to shiden runtime astar Related to Astar shibuya related to shibuya runtime This PR/Issue is related to the topic “runtime”. client This PR/Issue is related to the topic “client”. labels Aug 5, 2024
vendor/rpc/trace/src/lib.rs Outdated Show resolved Hide resolved
vendor/rpc/trace/src/lib.rs Outdated Show resolved Hide resolved
vendor/rpc/debug/src/lib.rs Outdated Show resolved Hide resolved
vendor/rpc/debug/src/lib.rs Outdated Show resolved Hide resolved
vendor/rpc/debug/src/lib.rs Outdated Show resolved Hide resolved
@Dinonard
Copy link
Member Author

Dinonard commented Aug 6, 2024

/bench astar-dev,shibuya-dev,shiden-dev all

@Dinonard
Copy link
Member Author

Dinonard commented Aug 6, 2024

/runtime-upgrade-test astar,shiden,shibuya

Copy link

github-actions bot commented Aug 6, 2024

Invalid runtime. It should be 'shibuya', 'shiden', or 'astar'.

@Dinonard
Copy link
Member Author

Dinonard commented Aug 6, 2024

/runtime-upgrade-test shibuya

@Dinonard
Copy link
Member Author

Dinonard commented Aug 6, 2024

/runtime-upgrade-test astar

@Dinonard
Copy link
Member Author

Dinonard commented Aug 6, 2024

/runtime-upgrade-test shiden

@Dinonard
Copy link
Member Author

Dinonard commented Aug 8, 2024

/bench astar-dev,shibuya-dev,shiden-dev all

@ipapandinas
Copy link
Contributor

ipapandinas commented Aug 8, 2024

Also, I got the following error running tests locally:

ERROR xcm::weight: XcmFeeHandler::take_revenue failed when minting asset: Token(BelowMinimum)

@ipapandinas can can this be reproduced?

@Dinonard This comes from para_a_send_relay_asset_to_para_b test in fungible_assets.rs from xcm-simulator tests.
A fee of 40 for the new registered asset ID 123 is charged (so then minted) which is below the expected min ED for both paras: Some(123).
It was already there but it can be easily fixed. I suggest to adjust the min ED for both paras to Some(1) for example (as previous tests).

Copy link

github-actions bot commented Aug 8, 2024

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/10299699208.
Please wait for a while.
Branch: feat/polkadot-sdk-v1.11.0-uplift
SHA: caae7ac

ipapandinas
ipapandinas previously approved these changes Aug 8, 2024
Copy link
Contributor

@ipapandinas ipapandinas left a comment

Choose a reason for hiding this comment

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

LGTM! ✨

tests/xcm-simulator/src/mocks/parachain.rs Outdated Show resolved Hide resolved
tests/xcm-simulator/src/tests/fungible_assets.rs Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Aug 8, 2024

Benchmarks have been finished.
You can download artifacts if exists https://github.com/AstarNetwork/Astar/actions/runs/10299699208.

@Dinonard
Copy link
Member Author

Dinonard commented Aug 8, 2024

@Dinonard This comes from para_a_send_relay_asset_to_para_b test in fungible_assets.rs from xcm-simulator tests.
A fee of 40 for the new registered asset ID 123 is charged (so then minted) which is below the expected min ED for both paras: Some(123).
It was already there but it can be easily fixed. I suggest to adjust the min ED for both paras to Some(1) for example (as previous tests).

Sorry but how to reproduce this again?

cargo test -p xcm-simulator-tests passes, everything is green.

@Dinonard
Copy link
Member Author

Dinonard commented Aug 8, 2024

/bench shibuya-dev,shiden-dev all

@ipapandinas
Copy link
Contributor

ipapandinas commented Aug 8, 2024

Sorry but how to reproduce this again?

cargo test -p xcm-simulator-tests passes, everything is green.

@Dinonard Sorry I forgot to mention the command, I used:

cargo test -p xcm-simulator-tests --lib -- --exact --show-output

You may include RUST_LOG="xcm::weight=debug" but since its an error it should not be mandatory

@Dinonard
Copy link
Member Author

Dinonard commented Aug 8, 2024

@ipapandinas you meant the error in the log, now I see it.
It's fixed now.

Copy link

github-actions bot commented Aug 8, 2024

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/10302935572.
Please wait for a while.
Branch: feat/polkadot-sdk-v1.11.0-uplift
SHA: 0cf39aa

Copy link

github-actions bot commented Aug 8, 2024

Benchmarks have been finished.
You can download artifacts if exists https://github.com/AstarNetwork/Astar/actions/runs/10302935572.

ermalkaleci
ermalkaleci previously approved these changes Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

Code Coverage

Package Line Rate Branch Rate Health
chain-extensions/pallet-assets/src 56% 0%
precompiles/xcm/src 71% 0%
primitives/src 59% 0%
pallets/price-aggregator/src 82% 0%
pallets/dapp-staking-migration/src 0% 0%
pallets/unified-accounts/src 86% 0%
pallets/dapp-staking-v3/src 86% 0%
pallets/static-price-provider/src 85% 0%
primitives/src/xcm 65% 0%
pallets/inflation/src 93% 0%
pallets/dapp-staking-v3/rpc/runtime-api/src 0% 0%
precompiles/dapp-staking-v3/src 90% 0%
precompiles/assets-erc20/src 78% 0%
precompiles/sr25519/src 64% 0%
pallets/dapp-staking-v3/src/benchmarking 98% 0%
precompiles/dispatch-lockdrop/src 86% 0%
chain-extensions/unified-accounts/src 0% 0%
pallets/astar-xcm-benchmarks/src 86% 0%
chain-extensions/types/assets/src 0% 0%
pallets/ethereum-checked/src 74% 0%
pallets/astar-xcm-benchmarks/src/generic 100% 0%
pallets/collective-proxy/src 86% 0%
precompiles/substrate-ecdsa/src 74% 0%
precompiles/unified-accounts/src 100% 0%
pallets/collator-selection/src 92% 0%
pallets/dynamic-evm-base-fee/src 89% 0%
pallets/xc-asset-config/src 50% 0%
precompiles/dapp-staking-v3/src/test 0% 0%
pallets/astar-xcm-benchmarks/src/fungible 100% 0%
pallets/dapp-staking-v3/src/test 0% 0%
chain-extensions/types/unified-accounts/src 0% 0%
Summary 78% (3565 / 4591) 0% (0 / 0)

Minimum allowed line rate is 50%

@ermalkaleci
Copy link
Contributor

/bench shibuya-dev all

Copy link

github-actions bot commented Aug 8, 2024

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/10309118965.
Please wait for a while.
Branch: feat/polkadot-sdk-v1.11.0-uplift
SHA: edde0ad

Copy link

github-actions bot commented Aug 8, 2024

Benchmarks have been finished.
You can download artifacts if exists https://github.com/AstarNetwork/Astar/actions/runs/10309118965.

@Dinonard Dinonard merged commit 29b0731 into master Aug 9, 2024
9 checks passed
@Dinonard Dinonard deleted the feat/polkadot-sdk-v1.11.0-uplift branch August 9, 2024 04:11
@ipapandinas ipapandinas mentioned this pull request Sep 10, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astar Related to Astar client This PR/Issue is related to the topic “client”. runtime This PR/Issue is related to the topic “runtime”. shibuya related to shibuya shiden related to shiden runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants