-
Notifications
You must be signed in to change notification settings - Fork 768
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
[xcm-builder] Replaced deprecated CurrencyAdapter with FungibleAdapter #3287
[xcm-builder] Replaced deprecated CurrencyAdapter with FungibleAdapter #3287
Conversation
@franciscoaguirre I see that tests/benchmarks fails, also I am checking your PR: #2684
What about that following PR? :) also I changed CurencyAdapter to FungibleAdapter for fellows and tests started to fail: https://github.com/polkadot-fellows/runtimes/actions/runs/7869327889/job/21468225062?pr=159 |
Pallet balances' |
Need to change all the other runtimes |
The CI pipeline was cancelled due to failure one of the required jobs. |
Seems there's a problem with benchmarks... Looking into it |
…chmark The `CurrencyAdapter` allowed transferring even when it would destroy the account, because of having less than the ED. The new `FungibleAdapter` always tries to preserve the sending account. This benchmark was leaving an account with zero after transferring, which is why it was working before but not after the change of adapter.
@@ -188,6 +188,7 @@ pub fn send_transfer_token_message_success<Runtime, XcmConfig>( | |||
let channel_id: ChannelId = origin.into(); | |||
|
|||
let nonce = snowbridge_pallet_outbound_queue::Nonce::<Runtime>::try_get(channel_id); | |||
dbg!(&nonce); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -79,7 +82,7 @@ benchmarks_instance_pallet! { | |||
}: { | |||
executor.bench_process(xcm)?; | |||
} verify { | |||
assert!(T::TransactAsset::balance(&sender_account).is_zero()); | |||
assert!(T::TransactAsset::balance(&sender_account) < sender_account_balance_before); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a tight enough bound on this test? It's just checking that it decreases by any amount, whereas do we not expect it to change by some predictable amount?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it should be tighter. Will look into it on another PR 😄
Forgotten in #3287 😅
#3287) I found out during the cleanup of this deprecation message in the `polkadot-fellows` repository that we deprecated `CurrencyAdapter` without making the recommended changes. ## TODO - [ ] fix `polkadot-fellows` bump to 1.6.0 polkadot-fellows/runtimes#159 --------- Co-authored-by: Francisco Aguirre <[email protected]>
…apter (#3417) We replaced deprecated `CurrencyAdapter` [here](#3287) and we also did the same for fellows [here](polkadot-fellows/runtimes@2d6d3ac), but this change requires this patch for xcm benchmarks. Expected patch for `pallet-xcm-benchmarks` as `8.0.1` Co-authored-by: Francisco Aguirre <[email protected]>
Based on bump to [`[email protected]`](#137). Attached result of `cargo upgrade -v --pinned --incompatible` [cargo-upgrade-version-bump.log](https://github.com/polkadot-fellows/runtimes/files/14044160/cargo-upgrade-version-bump.log) _Note: Encointer was not upgraded (because its pallet references `[email protected]` release)._ ## ~~For reviewers~~ ~~This PR is against `polkadot-fellows`'s main to bring it to the fellows repo, but if you want to see a real diff relevant to the `[email protected]` update please check: bkontur/runtimes@bko-bump-to-1.5...bkontur:runtimes:bko-bump-to-1.6.~~ ## TODO - [x] fix compilation - [x] fix integration tests - [x] fix benchmarks (also try them) - `collectives-polkadot` `payout` - [ ] ~~Does not require a CHANGELOG entry~~ - [x] `warning: use of deprecated struct `staging_xcm_builder::CurrencyAdapter`: Use `FungibleAdapter` instead` - [ ] search for `TODO:(PR#159) change to FungibleAdapter` and/or wait for paritytech/polkadot-sdk#3287 - [x] patch for `pallet-nomination-pools` migration fix paritytech/polkadot-sdk#3093 - will be fixed here #188 (comment) - [x] patch for `xcm-executor` fix (for 1.6.0) e.g. paritytech/polkadot-sdk#3174 - [x] check/fix coretime stuff for Kusama/Polkadot - search for `// TODO:(PR#159)(PR#1694)` - see [comment](#159 (comment)) - fixed by bkontur#3 - [x] check the `MaxControllersInDeprecationBatch`https://github.com/polkadot-fellows/runtimes/pull/159/files#r1492361038 - [x] check `pallet_identity::Config` for Kusama and Polkadot https://github.com/polkadot-fellows/runtimes/pull/159/files#r1492363866 --------- Signed-off-by: Adrian Catangiu <[email protected]> Co-authored-by: joe petrowski <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Ross Bulat <[email protected]> Co-authored-by: Alain Brenzikofer <[email protected]> Co-authored-by: eskimor <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com>
paritytech#3287) I found out during the cleanup of this deprecation message in the `polkadot-fellows` repository that we deprecated `CurrencyAdapter` without making the recommended changes. ## TODO - [ ] fix `polkadot-fellows` bump to 1.6.0 polkadot-fellows/runtimes#159 --------- Co-authored-by: Francisco Aguirre <[email protected]>
I found out during the cleanup of this deprecation message in the
polkadot-fellows
repository that we deprecatedCurrencyAdapter
without making the recommended changes.TODO
polkadot-fellows
bump to 1.6.0 Upgrade to latest [email protected] release polkadot-fellows/runtimes#159