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 #1756

Merged
merged 84 commits into from
Apr 15, 2024
Merged

Polkadot v1.1.0 #1756

merged 84 commits into from
Apr 15, 2024

Conversation

lemunozm
Copy link
Contributor

@lemunozm lemunozm commented Mar 1, 2024

Description

Fixes #1734

Current work done

  • Migrated all dependencies to polkadot-sdk with version 1.1.0.
  • Renamed some crates with their new names
  • Patch polkadot-sdkdependencies
  • cargo check & cargo test using runtime-benchmarks feature
    • libs
    • pallets
      • anchors
      • block-rewards
      • bridge
      • collator-allowlist
      • crowdloan-claim
      • crowdloan-reward
      • ethereum-transaction
      • fees
      • foreign-investments
      • interest-accrual
      • investments
      • keystore
      • liquidity-pools
      • liquidity-pools-gateway
        • liquidity-pools-gateway-routers
        • axelar-gateway-precompile
          • Evaluate this: I've needed to point to polkadot-evm dependencies instead of the moonbeam-foundation fork. There seems to be a lot of chaos with moonbeam dependencies. Ensure this is correct. Finally using the moonbeam fork
      • liquidity-rewards
      • loans
      • oracle-collection
      • oracle-feed
      • order-book
      • permissions
      • pool-fees
      • pool-registry
      • pool-system
      • restricted-tokens
      • restricted-xtokens
      • rewards
      • swaps
      • token-mux
      • transfer-allowlist
    • runtimes
      • common
      • development
        • Evaluate this: Move our moonbeam frontier fork to centrifuge github (currently under lemunozm). <= We should remove this fork in v1.3.0
        • Evaluate this: We needed to add serde in a lot of our types. In case we find a way to not need it, we can revert 884893a. Slack thread explaining why.
      • altair
      • centrifuge
    • integration-tests
    • node
      • Evaluate: Currently using some deprecated code. It seems like Moonbeam already uses for this polkadot version. We can live with it to merge this ASAP, and fix later in a new commit where we simplify node stuff.
  • check real benchmarks
  • check try-runtime
  • check docker files
  • modify CI and scripts
  • Evaluate if we need to perform migrations from 3parties
    • It seems pallet-ethereum need it It seems not related to this migration. Having the same message on main. It seems it appears because they never set a VERSION.
    • pallet_collator_selection
  • Check any missing TODO in the PR

@lemunozm lemunozm added Q7-very-hard Can be done by an expert coder with a deep knowledge of the codebase. I6-refactoring Code needs refactoring. crcl-protocol Circle protocol related. labels Mar 1, 2024
@lemunozm lemunozm self-assigned this Mar 1, 2024
Cargo.toml Show resolved Hide resolved
libs/types/src/tokens.rs Outdated Show resolved Hide resolved
node/src/service.rs Outdated Show resolved Hide resolved
node/src/service.rs Outdated Show resolved Hide resolved
@lemunozm lemunozm mentioned this pull request Apr 5, 2024
9 tasks
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Looking really good, great job taming this beast! I have a bunch of questions. For a few things, I have posted them as Placeholder to check where these particular code paths went.

libs/mocks/src/asset_registry.rs Show resolved Hide resolved
@@ -270,7 +270,7 @@ pub mod constants {
pub const TRANSACTION_RECOVERY_ID: u64 = 42;

/// The safe XCM version of pallet-xcm, same as on relay chain
pub const SAFE_XCM_VERSION: u32 = xcm::opaque::v2::VERSION;
pub const SAFE_XCM_VERSION: u32 = staging_xcm::opaque::v2::VERSION;
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: I think we can switch to v3 by now but that would be out of scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. We can do after merging this 👍🏻

libs/primitives/src/lib.rs Show resolved Hide resolved
libs/types/src/locations.rs Show resolved Hide resolved
libs/types/src/tokens.rs Show resolved Hide resolved
runtime/common/src/account_conversion.rs Outdated Show resolved Hide resolved
runtime/common/src/oracle.rs Show resolved Hide resolved
Comment on lines -49 to +50
cargo run --release --features try-runtime try-runtime \
try-runtime \
Copy link
Contributor

Choose a reason for hiding this comment

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

This will break the try-runtime CI. Since you pinged @gpmayorga already and try-runtime being optional, I am fine with leaving this as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will break the try-runtime CI?

Mmm... you said that because we're not installing try-runtime binary, right? Probably. I've tested locally but I have the tool 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we add this as a tech-debt? In the CI job, I've seen some comment lines regarding this. So, probably, just uncommenting those makes this work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are not really utilizing the CI right now, totally fine with this.

@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 8, 2024

Thanks @wischli for your deep and detailed review 🙌🏻. Really appreciated

libs/mocks/Cargo.toml Show resolved Hide resolved
libs/types/src/consts.rs Show resolved Hide resolved
libs/types/src/fixed_point.rs Show resolved Hide resolved
runtime/common/src/account_conversion.rs Outdated Show resolved Hide resolved
runtime/common/src/account_conversion.rs Outdated Show resolved Hide resolved
runtime/common/src/xcm.rs Show resolved Hide resolved
@@ -272,7 +282,7 @@ pub type LocationToAccountId<RelayNetwork> = (
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
AccountId32Aliases<RelayNetwork, AccountId>,
// Generate remote accounts according to polkadot standards
cfg_primitives::xcm::HashedDescriptionDescribeFamilyAllTerminal<AccountId>,
HashedDescription<AccountId, DescribeFamily<DescribeAllTerminal>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

We had test covering the conversions made beforehand and can ensure that they stay the same, right?

* Modify AccountConverter types

* fix some imports
@wischli wischli mentioned this pull request Apr 11, 2024
4 tasks
mustermeiszer
mustermeiszer previously approved these changes Apr 15, 2024
wischli
wischli previously approved these changes Apr 15, 2024
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Soft approving this with the following TODO list

Best before merge

TBD

Post merge

* fix: deprecate parachain CLI

* chore: cleanup deprecated chain specs

* fix: clippy
@wischli wischli dismissed stale reviews from mustermeiszer and themself via 399228a April 15, 2024 09:21
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Re-approving. Sorry, should have merged #1808 before

@lemunozm
Copy link
Contributor Author

No worries! And thanks for the wrap-up comment!

@lemunozm lemunozm enabled auto-merge (squash) April 15, 2024 10:05
@lemunozm lemunozm merged commit 94ee4d7 into main Apr 15, 2024
11 of 12 checks passed
@wischli wischli deleted the polkadot-v1.1.0 branch April 15, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crcl-protocol Circle protocol related. I6-refactoring Code needs refactoring. Q7-very-hard Can be done by an expert coder with a deep knowledge of the codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to Polkadot 1.1.0 from Polkadot 0.9.43
5 participants