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

chore(deps): upgraded polkadot to 0.9.43 #4106

Merged
merged 3 commits into from
Sep 8, 2023
Merged

chore(deps): upgraded polkadot to 0.9.43 #4106

merged 3 commits into from
Sep 8, 2023

Conversation

dzmitry-lahoda
Copy link
Contributor

@dzmitry-lahoda dzmitry-lahoda commented Aug 25, 2023

Removed code to be removed (assets transaction router, lending, dutch auciton, liquidations, vault, bonded finance, currency-factory) instead of fixing.

Migrate to XCM ICA from ORML.

Replaced removed crypto with what I have found https://substrate.stackexchange.com/questions/9754/sp-iocrypto-was-removed-amid-polkadot-0-9-39-and-0-9-43-what-is-replacement

Fixed assets after migration (changed how ops work again ED - #4107). Only one test fails - seems something fucked up in Parity burn/slash. Need research and may be report bug.

Oracle, farming, pablo, rewards migrated with disabled tests and benchmarks. Same for TX (need to update to latest Parity version instead of stale CP paste).

Migrated CW.

Seems @kkast migrated oracle, pablo, rewards, farming.

Fixed runtime and node (enabled warp), fixed wasm and benches builds, updated zombienet respecting updated parameters. Disable IBC benches until fixes (using old benches - which should be almost same as if to rerun).

@kkast would be awesome if you can fix look at cumulus/substrate/polkadot/orml release notes and apply migration we need from 39 to 43 version. Ensure assets are correct, 1 asset test asserts..

Required for merge:

Makes review faster:

  • PR title is my best effort to provide summary of changes and has clear text to be part of release notes
  • I marked PR by misc label if it should not be in release notes
  • Linked Zenhub/Github/Slack/etc reference if one exists upgrade code base deps to polkadot 0.9.43 #4093 upgrade polkadot 0.9.43 composable-ibc#397
  • I was clear on what type of deployment required to release my changes (node, runtime, contract, indexer, on chain operation, frontend, infrastructure) if any in PR title or description
  • Added reviewer into Reviewers
  • I tagged(@) or used other form of notification of one person who I think can handle best review of this PR
  • I have proved that PR has no general regressions of relevant features and processes required to release into production
  • Any dependency updates made, was done according guides from relevant dependency
  • Clicking all checkboxes
  • Adding detailed description of changes when it feels appropriate (for example when PR is big)

@dzmitry-lahoda dzmitry-lahoda changed the title chore(deps): upgrade polkadto to 0.9.43 chore(deps): upgrade polkadto to 0.9.43 #check Aug 25, 2023
@github-actions
Copy link

Pull reviewers stats

Stats of the last 30 days for composable:

User Total reviews Time to review Total comments
dzmitry-lahoda 27 8h 13m 13
blasrodri 20 2h 11m 7
mina86 16 12h 56m 56
kkast 11 3h 17m 7
RustNinja 9 2h 6m 0
vmarkushin 5 7h 2
JafarAz 3 9h 25m 0
0xBrainjar2 2 3d 17h 35m 6

@github-actions
Copy link

# run Composable node
nix run "github:ComposableFi/composable/refs/pull/4106/merge" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed
# run local Picasso DevNet (for CosmWasm development)
nix run "github:ComposableFi/composable/refs/pull/4106/merge#devnet-picasso" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# CosmWasm on Substrate CLI tool
nix run "github:ComposableFi/composable/refs/pull/4106/merge#ccw" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# run cross chain devnet with Dotsama and Cosmos nodes 
nix run "github:ComposableFi/composable/refs/pull/4106/merge#devnet-xc-fresh" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# or same with docker
nix build "github:ComposableFi/composable/refs/pull/4106/merge#devnet-xc-image" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed \
&& docker load --input result && docker run -it --entrypoint bash devnet-xc:latest -c /bin/devnet-xc-fresh 

About nix

@dzmitry-lahoda dzmitry-lahoda added the Misc I marked PR by `misc` label if it should not be in release notes #owned:terraform label Aug 25, 2023
@dzmitry-lahoda dzmitry-lahoda changed the title chore(deps): upgrade polkadto to 0.9.43 #check chore(deps): upgrade polkadot to 0.9.43 #check Aug 26, 2023
@dzmitry-lahoda
Copy link
Contributor Author

@arrudagates I see you PR was merged paritytech/polkadot#7165 in 0.9.42. We updating to 0.9.43.

Do you have any code reference how to migrate

# Only needed until the configs get merged into xcm-builder: https://github.com/paritytech/polkadot/pull/7165
invarch-xcm-builder = { git = "https://github.com/InvArch/InvArch-XCM-Builder", rev = "c704c0f2d4c436f96eff10d06c197527b46b3536", default-features = false }

to 0.9.43?

Thank you

@dzmitry-lahoda
Copy link
Contributor Author

@arrudagates i see branch, trying. also would be awesome to have 1.0.0 branch :)

@arrudagates
Copy link
Contributor

arrudagates commented Aug 26, 2023

@arrudagates i see branch, trying. also would be awesome to have 1.0.0 branch :)

Discussing with other fellowship members we decided that xcm-builder is not the best place for opinionated configs, so we actually ended up making a new repo under the ORML org to host this kind of XCM configs for ecosystem teams.

The repo is https://github.com/open-web3-stack/orml-xcm-builder, there is a branch for 0.9.43 there and the crate you want from the workspace is orml-xcm-builder-kusama.

Migration should be simple, all you have to change in xcmp.rs is:

pub type Barrier = (
	AllowKnownQueryResponses<PolkadotXcm>,
	AllowSubscriptionsFrom<ParentOrSiblings>,
	AllowTopLevelPaidExecutionFrom<Everything>,
	TakeWeightCredit,
	WithComputedOrigin<
-		AllowTopLevelPaidExecutionFrom<invarch_xcm_builder::TinkernetMultisigMultiLocation>,
+		AllowTopLevelPaidExecutionFrom<orml_xcm_builder_kusama::TinkernetMultisigMultiLocation>,
		UniversalLocation,
		ConstU32<8>,
	>,
);
pub type LocationToAccountId = (
	// The parent (Relay-chain) origin converts to the parent `AccountId`.
	ParentIsPreset<AccountId>,
	// Sibling parachain origins convert to AccountId via the `ParaId::into`.
	SiblingParachainConvertsVia<Sibling, AccountId>,
	// Straight up local `AccountId32` origins just alias directly to `AccountId`.
	AccountId32Aliases<RelayNetwork, AccountId>,
	// Mapping Tinkernet multisig to the correctly derived AccountId32.
-	invarch_xcm_builder::TinkernetMultisigAsAccountId<AccountId>,
+	orml_xcm_builder_kusama::TinkernetMultisigAsAccountId<AccountId>,
	AccountId32MultihopTx<AccountId>,
);
pub type XcmOriginToTransactDispatchOrigin = (
	// Sovereign account converter; this attempts to derive an `AccountId` from the origin location
	// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for
	// foreign chains who want to have a local sovereign account on this chain which they control.
	SovereignSignedViaLocation<LocationToAccountId, RuntimeOrigin>,
	// Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when
	// recognized.
	RelayChainAsNative<RelayOrigin, RuntimeOrigin>,
	// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when
	// recognized.
	SiblingParachainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,
	// Native signed account converter; this just converts an `AccountId32` origin into a normal
	// `Origin::Signed` origin of the same 32-byte value.
	SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
	// Derives signed AccountId32 origins for Tinkernet multisigs.
-	invarch_xcm_builder::DeriveOriginFromTinkernetMultisig<RuntimeOrigin>,
+	orml_xcm_builder_kusama::TinkernetMultisigAsNativeOrigin<RuntimeOrigin>,
	// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.
	XcmPassthrough<RuntimeOrigin>,
);

@dzmitry-lahoda
Copy link
Contributor Author

dzmitry-lahoda commented Aug 26, 2023

@kkast would be awesome if you could help migrating pablo/oracle/staking pallets. i did partial migration. but there are dozens of changes to interfaces of tokens. many. a lot of work.

@kkast can I remove CurrencyFactory and all extrinics which call currency factory?

i did deleted several pallets, but still need to migrate xcm/AR/CW and runtimes(checking all migrations). Runtimes are fully on me.

@RustNinja may you help with fixing tests for multihop/rewards/farming? @kkast @RustNinja is staking pallet still used, do not want to waste time on not used things.

@blasrodri i am leaving for vacation and not only, need help. a lot of changes.

@dzmitry-lahoda dzmitry-lahoda requested a review from kkast August 27, 2023 14:50
@dzmitry-lahoda
Copy link
Contributor Author

as agreed, staking-rewards, fnft to be deleted. easy.

@kkast
Copy link
Contributor

kkast commented Aug 31, 2023

@dzmitry-lahoda so what parity did they removed frame/support/src/traits/tokens/fungibles/balanced.rs and moved Balanced trait to frame/support/src/traits/tokens/fungibles/regular.rs but now orml_tokens doesnt have implementation of Balanced trait paritytech/substrate@f8a1dd4#diff-789c2bf8fcaf90e054b55e821799a4c3cbb4b08f843997285c9a4eff3455cea0.
in orml tokens they implemented Balanced trait after commit for 9.43 open-web3-stack/open-runtime-module-library#931

@dzmitry-lahoda
Copy link
Contributor Author

error: builder for '/nix/store/cgmjbzhxj1gjmq5g6778vc47r67x91c5-ics10-grandpa-cw-deps-0.1.drv' failed with exit code 101;
       last 10 log lines:
       >    Compiling indenter v0.3.3
       > error[E0433]: failed to resolve: use of undeclared crate or module `imp`
       >    --> /nix/store/s61z89zhi2j60pij31zlbfbz1lszvlz1-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/getrandom-0.2.8/src/lib.rs:290:5
       >     |
       > 290 |     imp::getrandom_inner(dest)
       >     |     ^^^ use of undeclared crate or module `imp`
       >
       > For more information about this error, try `rustc --explain E0433`.
       > error: could not compile `getrandom` (lib) due to 2 previous errors

missing std feature gate, need to use tool and find what missing

@dzmitry-lahoda dzmitry-lahoda changed the title chore(deps): upgrade polkadot to 0.9.43 #check chore(deps): upgrade polkadot to 0.9.43 Sep 3, 2023
@dzmitry-lahoda dzmitry-lahoda marked this pull request as ready for review September 3, 2023 14:02
@dzmitry-lahoda dzmitry-lahoda force-pushed the dz/14 branch 2 times, most recently from 0f826c2 to bf6db8e Compare September 3, 2023 14:07
@dzmitry-lahoda
Copy link
Contributor Author

composable-build>     |                                                    ^^^^^^^^^^^^^
composable-build> error[E0046]: not all trait items implemented, missing: `HoldIdentifier`, `FreezeIdentifier`, `MaxHolds`, `MaxFreezes`
composable-build>   --> parachain/frame/crowdloan-rewards/src/mocks.rs:74:1
composable-build>    |
composable-build> 74 | impl pallet_balances::Config for Test {
composable-build>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `HoldIdentifier`, `FreezeIdentifier`, `MaxHolds`, `MaxFreezes` in implementation
composable-build>    |
composable-build>    = help: implement the missing item: `type HoldIdentifier = Type;`
composable-build>    = help: implement the missing item: `type FreezeIdentifier = Type;`
composable-build>    = help: implement the missing item: `type MaxHolds = Type;`
composable-build>    = help: implement the missing item: `type MaxFreezes = Type;`
composable-build> For more information about this error, try `rustc --explain E0046`.
composable-build> warning: `pallet-asset-tx-payment` (lib test) generated 4 warnings
composable-build> error: could not compile `pallet-asset-tx-payment` (lib test) due to 2 pre

@dzmitry-lahoda
Copy link
Contributor Author

2023-09-04T10:21:43.3429959Z composable-build> Compiling common v0.8.30 (/build/source/parachain/runtime/common)
2023-09-04T10:21:43.3519393Z composable-build> Compiling pallet-multihop-xcm-ibc v1.0.0 (/build/source/parachain/frame/pallet-multihop-xcm-ibc)
2023-09-04T10:21:43.5033169Z composable-build> Compiling cumulus-client-consensus-aura v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce)
2023-09-04T10:21:43.5835404Z composable-build> warning: unused import: composable_traits::currency::AssetExistentialDepositInspect
2023-09-04T10:21:43.5838675Z composable-build> --> parachain/runtime/common/src/fees.rs:5:5
2023-09-04T10:21:43.5841506Z composable-build> |
2023-09-04T10:21:43.5842701Z composable-build> 5 | use composable_traits::currency::AssetExistentialDepositInspect;
2023-09-04T10:21:43.5843653Z composable-build> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-09-04T10:21:43.5844349Z composable-build> |
2023-09-04T10:21:43.5845162Z composable-build> = note: #[warn(unused_imports)] on by default
2023-09-04T10:21:43.6389764Z composable-build> error[E0308]: mismatched types
2023-09-04T10:21:43.6430051Z composable-build> --> parachain/frame/vesting/src/benchmarks.rs:38:2
2023-09-04T10:21:43.6509479Z composable-build> |
2023-09-04T10:21:43.6630048Z composable-build> 38 | T::Currency::mint_into(asset_id, &caller, amount).unwrap()
2023-09-04T10:21:43.6634123Z composable-build> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type
2023-09-04T10:21:43.6637126Z composable-build> |
2023-09-04T10:21:43.6638920Z composable-build> = note: expected unit type ()
2023-09-04T10:21:43.6640128Z composable-build> found associated type <<T as module::Config>::Currency as MultiCurrency<<T as frame_system::Config>::AccountId>>::Balance
2023-09-04T10:21:43.6641660Z composable-build> = help: consider constraining the associated type <<T as module::Config>::Currency as MultiCurrency<<T as frame_system::Config>::AccountId>>::Balance to ()
2023-09-04T10:21:43.6643103Z composable-build> = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html

@dzmitry-lahoda dzmitry-lahoda requested a review from kkast September 4, 2023 23:07
@dzmitry-lahoda
Copy link
Contributor Author

Will do other chains on request #4113

RustNinja
RustNinja previously approved these changes Sep 5, 2023
@dzmitry-lahoda
Copy link
Contributor Author

I disabling rerun of benches on ibc pallet - using benches from previous runs - to compile runtime benches for other pallets. So we can merge and continue.

@kkast please merge OpenGov something so we can merge 0.9.43, as it requries a lot of testing.

@dzmitry-lahoda dzmitry-lahoda removed the Misc I marked PR by `misc` label if it should not be in release notes #owned:terraform label Sep 7, 2023
@dzmitry-lahoda dzmitry-lahoda force-pushed the dz/14 branch 2 times, most recently from dde7b07 to f831ace Compare September 7, 2023 20:23
hyperspace

remove forks

renames

trait updates

what is the key?

keystore

oracle

delete

ohoho

inspect

fuck you

deleting instead of fixing

orml

no forks

silly fixing api

hoho

doing AI work

more migration

reason

hoho

removed to be removed

fixing comswasm

cw fixes

repaced

updated tinkernet

fnt

fixed reserbable

root cause

fixed

fuck parity again

wtf

happy

clean up aligned and disable tests until parties will have time to fix

fixes

pablo

fixed tx payment

need to put default weights and init assets pallet

oracle is good

remove currency factory

pablo

more pallets

remove warnings

more changes

weight warnings

remove GenerateCurrencyId from assets

assets registry trying to compile

updated centauri deps to latest

fixing composable runtime compile

fixing composable  runtime

more thing

almost fixes composble runtime check

fixed ()

compiles

fixed composable

fixed picasso

porting acala

warp

fixed fmt and std build

zepter fmt

deps

used old centauir too

debug

fixing tests

deps fix

moved dust remover

fixed tests

fixed more tests

clippy fix

fixed vesting benchmarks

fmt and new zombie

fixing remaining reds

less red

removed potentially double minting dust remover

clippy

no dep pn lfs

fixing more

fmt

tune

fixed back deps

fixed port

final fix

retry

more std

more features

more fixes

disabling ibc failing bench build

rebase conflicts

disable benches of ibc

Revert "disable benches of ibc"

This reverts commit e69c0d8.

clean up

fixed test

fmt/clippy

fmt and removed old guide

clean up tests

clippy

tests
@dzmitry-lahoda dzmitry-lahoda enabled auto-merge (squash) September 8, 2023 12:03
@dzmitry-lahoda dzmitry-lahoda changed the title chore(deps): upgrade polkadot to 0.9.43 chore(deps): upgraded polkadot to 0.9.43 Sep 8, 2023
@dzmitry-lahoda dzmitry-lahoda merged commit 8dcf27a into main Sep 8, 2023
33 checks passed
@dzmitry-lahoda dzmitry-lahoda deleted the dz/14 branch September 8, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants