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 v1.1.0 Integration Tests #1776

Merged
merged 8 commits into from
Apr 2, 2024
Merged

Conversation

lemunozm
Copy link
Contributor

Description

PR over polkadot-v1.1.0 containing integration-tests changes

@lemunozm lemunozm added I4-tests Test needs fixing or improving. Q5-hard Can be done by an experienced coder with a good knowledge of the codebase. labels Mar 25, 2024
@lemunozm lemunozm self-assigned this Mar 25, 2024
@lemunozm lemunozm marked this pull request as draft March 25, 2024 16:33
@lemunozm lemunozm marked this pull request as ready for review March 25, 2024 16:37
runtime/integration-tests/src/generic/mod.rs Outdated Show resolved Hide resolved
runtime/integration-tests/src/lib.rs Outdated Show resolved Hide resolved
runtime/integration-tests/src/utils/accounts.rs Outdated Show resolved Hide resolved
@lemunozm lemunozm marked this pull request as draft March 25, 2024 16:52
@lemunozm
Copy link
Contributor Author

Fudge updated, now using same polkadot-sdk dependencies: bd15cc8

@lemunozm lemunozm force-pushed the polkadot-v1.1.0-it branch from bd15cc8 to aab01d7 Compare March 27, 2024 10:25
* main changes

* integration-tests: Fix test envs

* runtime: Implement parachains pallets for runtimes

* runtime: Enable multilocation convert for CurrencyIdConvert

* runtime: Remove extra paras pallets

* integration-tests: Update expected balances

---------

Co-authored-by: lemunozm <[email protected]>
@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 1, 2024

Currently failing just 3 test.

---- generic::cases::liquidity_pools::altair::transfers::transfer_ksm_to_and_from_relay_chain::altair stdout ----
thread 'generic::cases::liquidity_pools::altair::transfers::transfer_ksm_to_and_from_relay_chain::altair' panicked at runtime/integration-tests/src/generic/cases/liquidity_pools.rs:5779:17:
assertion `left == right` failed
  left: 1991963000000
 right: 1993570400000
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- generic::cases::liquidity_pools::centrifuge::transfers::transfer_dot_to_and_from_relay_chain::centrifuge stdout ----
thread 'generic::cases::liquidity_pools::centrifuge::transfers::transfer_dot_to_and_from_relay_chain::centrifuge' panicked at runtime/integration-tests/src/generic/cases/liquidity_pools.rs:7900:17:
assertion `left == right` failed
  left: 29919630000
 right: 29935704000

---- generic::cases::liquidity_pools::centrifuge::restricted_transfers::restrict_dot_xcm_transfer::centrifuge stdout ----
thread 'generic::cases::liquidity_pools::centrifuge::restricted_transfers::restrict_dot_xcm_transfer::centrifuge' panicked at runtime/integration-tests/src/generic/cases/liquidity_pools.rs:7530:17:
assertion `left == right` failed
  left: 29919630000
 right: 29935704000


failures:
    generic::cases::liquidity_pools::altair::transfers::transfer_ksm_to_and_from_relay_chain::altair
    generic::cases::liquidity_pools::centrifuge::restricted_transfers::restrict_dot_xcm_transfer::centrifuge
    generic::cases::liquidity_pools::centrifuge::transfers::transfer_dot_to_and_from_relay_chain::centrifuge

test result: FAILED. 217 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9423.86s

error: test failed, to rerun pass `-p runtime-integration-tests --lib`

All have as common denominator the call of fee(), any idea of what could happen @cdamian?

@cdamian
Copy link
Contributor

cdamian commented Apr 2, 2024

@lemunozm yes, it seems that the fee calculations that we have there are no longer valid, I manually updated those expected values in the branch that I had here.

@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 2, 2024

The value of WEIGHT_REF_TIME_PER_NANOS has changed from v0.9.43 to v1.1.0. It seems like something that changes any new polkadot version.

I'm not sure why we do that check. But IMO, we could just remove those lines because they're not related to the test itself. WDYT @cdamian @wischli?

For reference the failing asserts are:

assert_eq!(
    orml_tokens::Pallet::<T>::free_balance(currency_id, &Keyring::Bob.into()),
    transfer_amount - fee(meta.decimals)
);
assert_eq!(alice_initial_dot, dot(3) - dot_fee());

@cdamian
Copy link
Contributor

cdamian commented Apr 2, 2024

The value of WEIGHT_REF_TIME_PER_NANOS has changed from v0.9.43 to v1.1.0. It seems like something that changes any new polkadot version.

I'm not sure why we do that check. But IMO, we could just remove those lines because they're not related to the test itself. WDYT @cdamian @wischli?

For reference the failing asserts are:

assert_eq!(
    orml_tokens::Pallet::<T>::free_balance(currency_id, &Keyring::Bob.into()),
    transfer_amount - fee(meta.decimals)
);
assert_eq!(alice_initial_dot, dot(3) - dot_fee());

I wouldn't mind having those checks in there to be honest. I think we might catch any unexpected changes to the fees that are charged when doing those kind of transfers.

@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 2, 2024

And how would you solve the current issue then? Without hardcoding the values. Or maybe we're having the issue right now, because from what I can see, if it worked before, it should work now

@cdamian
Copy link
Contributor

cdamian commented Apr 2, 2024

@lemunozm I hardcoded those values in some of the other tests. We can either do that or fix the fee funcs if possible.

@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 2, 2024

The problem with hardcoding is that we're losing the "why it fails". Other would see this failing without any reason on the why. I'll give a try to see why fee is failing when it shouldn't

@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 2, 2024

I'll merge this by now. Issues should be addressed in #1756

@lemunozm lemunozm marked this pull request as ready for review April 2, 2024 15:10
@lemunozm lemunozm merged commit fb20056 into polkadot-v1.1.0 Apr 2, 2024
3 of 9 checks passed
@lemunozm lemunozm mentioned this pull request Apr 3, 2024
58 tasks
@lemunozm lemunozm deleted the polkadot-v1.1.0-it branch April 4, 2024 07:54
lemunozm added a commit that referenced this pull request Apr 15, 2024
* all dependencies set

* migrate libs/*

* migrate pallet-anchors

* migrate pallet-rewards

* migrate pallet-liquidity-rewards

* migrate pallet-fees pallet-bridge

* migrate pallet-keystore

* migrate restricted-tokens

* migrate restricted-xtokens

* migrate block-rewards

* migrate-interest-accrual

* migrate oracle-feed

* migrate oracle-collection

* migrate collator-allowlist

* migrate transfer-allowlist

* migrate crowdloan pallets

* migrate permissions

* migrate order-book

* migrate pallet-swaps

* migrate pallet-token-mux

* migrate investments

* migrate foreign-investments

* migrate loans

* migrate pool-fees

* migrate liquidity-pools-gateway

* migrate axelar-gateway-precompile

* migrate liquidity-pools-gateway-routers & patch moonbeam deps

* use precompile-utils from moonbeam from now

* simplify mock initialization

* simplify some mocks

* migrate ethereum-transaction

* simplify minor stuff

* disable runtimes by now

* migrate pool-system

* migrate pool-registry

* migrate liquidity-pools

* polish patch section

* dirty fix for unaccesible Pending storage

* minor dependency update

* minor extend comment

* migrate runtime-common

* minor fixes

* Revert "dirty fix for unaccesible Pending storage"

This reverts commit 975060d.

* pointing to the updated pallet-ethereum

* fix pool-system compilation with benchmarks

* fix serde dependencies

* required changes for runtime to work

* development runtime failing because of serde

* patch all required dependencies to make moonbeam works

* fix xcm types

* add serde to no_std

* minor

* migrate altair & centrifuge

* minor fixes

* support runtime-benchmarking in runtimes

* Polkadot v1.1.0: Node required changes (#1789)

* make it compile

* minor change

* prepare changes for modify deprecated code

* fix ExportGenesisState and remove unused warnings

* update benchmark CLI

* remove completelly try-runtime-cli

* minor clean

* fix try-runtime CI job

* Polkadot v1.1.0 Integration Tests (#1776)

* legacy-test migration wip

* main changes

* remove unused dependency

* basic stuff migrated

* uncomment fudge_env

* update fudge

* integration-tests: Fix test envs (#1780)

* main changes

* integration-tests: Fix test envs

* runtime: Implement parachains pallets for runtimes

* runtime: Enable multilocation convert for CurrencyIdConvert

* runtime: Remove extra paras pallets

* integration-tests: Update expected balances

---------

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

---------

Co-authored-by: Cosmin Damian <[email protected]>

* fixed issues compiling with rust 1.78

* fix clippy

* taplo

Signed-off-by: lemunozm <[email protected]>

* reading value from deposit_creating

* remove locked from taplo-cli

* update scripts

* fix docs

* fix integration tests

* add collator-selection migration

* makes try-runtime idempotent checks work

* revert fixed point serialization, remove unused Location code

* comment TODOs and deprecated until 1.3.0

* fix fixed_point serialization for std

* correct features for dev dependency

* apply Cosmin NITs

* remove comments regarding v1.3.0

* revert benchmarking HostFunction

* Polkadot v1.1.0: Account converter changes (#1806)

* Modify AccountConverter types

* fix some imports

* fix: polkadot v1.1.0 client (#1808)

* fix: deprecate parachain CLI

* chore: cleanup deprecated chain specs

* fix: clippy

---------

Signed-off-by: lemunozm <[email protected]>
Co-authored-by: Cosmin Damian <[email protected]>
Co-authored-by: William Freudenberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I4-tests Test needs fixing or improving. Q5-hard Can be done by an experienced coder with a good knowledge of the codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants