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: upgrade polkadot v1.7.2 #659

Merged
merged 56 commits into from
May 8, 2024
Merged

chore: upgrade polkadot v1.7.2 #659

merged 56 commits into from
May 8, 2024

Conversation

enthusiastmartin
Copy link
Contributor

@enthusiastmartin enthusiastmartin commented Apr 22, 2024

Notable changes

  • rust stable 1.75.0
  • orml no longer possible to import directly from github due to changes in depedencies - using fork from GC repo for now ( daniel needs to include some changes anyway). In future - use crates.io?!
  • Democracy - changed to generic hash instead of H256 -> chec other changes?
  • parachain-info reanmed to staging-parachain-info
  • AllPalletsReversedWithSystemFirst replaced by AllPalletsWithSystemFirst
  • pallet-balances no longer has transfer extrinsic
  • new benchmarking script

Removed

  • palet-xcm-rate-limiter
  • dmp-queue

New pallet:

  • pallet-message-queue - replaced dmp-queue

XCM:

  • xcm v4 support, we still keep v3 for
  • XCM - changed parameter type From Assets -> AssetInHoldings - does not use MultiAsset ( eg. in Xcm Weight Trader )
  • MultiAsset no longer in V4 -> replaced by AssetId(Location) type --- this changes a lot!!!
  • MultiLocation rename to Location in v4 -- registry migration?!! probably unecessary , it is the same type, only name change
  • xtokens has two new params - RateLimiter and RateLimiterId - not used atm

New config params:

  • Treasury - spending support, it is disabled for now
  • identity - bunch of new stuff, migration too

Copy link

github-actions bot commented Apr 22, 2024

New crates:

  • pallet-asset-registry: v2.3.3

Crate versions that have been updated:

  • runtime-integration-tests: v1.0.1 -> v1.0.2
  • basilisk: v11.1.0 -> v13.0.0
  • pallet-marketplace: v5.0.17 -> v5.0.18
  • pallet-xyk-liquidity-mining: v1.1.10 -> v1.1.11
  • pallet-xyk-liquidity-mining-benchmarking: v1.0.16 -> v1.0.17
  • primitives: v6.6.0 -> v6.6.1
  • basilisk-runtime: v112.0.0 -> v113.0.0

Runtime version has been increased.

@enthusiastmartin enthusiastmartin marked this pull request as ready for review April 25, 2024 15:05
type GetExchangeFee = ExchangeFee;
type MinTradingLimit = MinTradingLimit;
type MinPoolLiquidity = MinPoolLiquidity;
type MaxInRatio = MaxInRatio;
type MaxOutRatio = MaxOutRatio;
type OracleSource = XYKOracleSourceIdentifier;
type CanCreatePool = pallet_lbp::DisallowWhenLBPPoolRunning<Runtime>;
type CanCreatePool = hydradx_adapters::xyk::AllowPoolCreation<Runtime, AssetRegistry>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm.. suspicious. what happened here? double check

Copy link
Contributor

@dmoka dmoka May 7, 2024

Choose a reason for hiding this comment

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

yeah, I think it should be fine, it has only strange naming, I changed it to also disallow specific xyk pool creation. So we do the same like in hydraDX

As I was the one who changed it, please someone else do a double check then

Copy link
Member

Choose a reason for hiding this comment

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

should be ok as we are reusing hydradx adapter

integration-tests/src/cross_chain_transfer.rs Outdated Show resolved Hide resolved
integration-tests/src/kusama_test_net.rs Show resolved Hide resolved
integration-tests/src/exchange_asset.rs Outdated Show resolved Hide resolved
integration-tests/src/kusama_test_net.rs Outdated Show resolved Hide resolved
},
pallets = {
PolkadotXcm: basilisk_runtime::PolkadotXcm,
Balances: basilisk_runtime::Balances,
}
},
pub struct OtherParachain {
pub struct OtherPara {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's keep naming consistent, OtherParachain

Copy link
Contributor

@dmoka dmoka May 7, 2024

Choose a reason for hiding this comment

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

yeah I needed to find another name so I could create a helper type so we don't need to change in every tests:

pub type OtherParachain = OtherPara<TestNet>;

The struct is only used directly at this line.

Copy link
Member

Choose a reason for hiding this comment

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

runtime/basilisk/src/benchmarking/multi_payment.rs Outdated Show resolved Hide resolved
runtime/basilisk/src/benchmarking/route_executor.rs Outdated Show resolved Hide resolved
runtime/basilisk/src/benchmarking/route_executor.rs Outdated Show resolved Hide resolved
runtime/basilisk/src/benchmarking/route_executor.rs Outdated Show resolved Hide resolved
runtime/basilisk/src/governance.rs Outdated Show resolved Hide resolved
@@ -269,6 +269,8 @@ async fn start_node_impl(

if let Some(hwbench) = hwbench {
sc_sysinfo::print_hwbench(&hwbench);
//TODO: need?
Copy link
Contributor

Choose a reason for hiding this comment

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

todo

integration-tests/src/transact_call_filter.rs Outdated Show resolved Hide resolved
node/src/cli.rs Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
type GetExchangeFee = ExchangeFee;
type MinTradingLimit = MinTradingLimit;
type MinPoolLiquidity = MinPoolLiquidity;
type MaxInRatio = MaxInRatio;
type MaxOutRatio = MaxOutRatio;
type OracleSource = XYKOracleSourceIdentifier;
type CanCreatePool = pallet_lbp::DisallowWhenLBPPoolRunning<Runtime>;
type CanCreatePool = hydradx_adapters::xyk::AllowPoolCreation<Runtime, AssetRegistry>;
Copy link
Member

Choose a reason for hiding this comment

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

should be ok as we are reusing hydradx adapter

runtime/basilisk/src/system.rs Outdated Show resolved Hide resolved
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type BaseXcmWeight = BaseXcmWeight;
type UniversalLocation = UniversalLocation;
type MaxAssetsForTransfer = MaxAssetsForTransfer;
type ReserveProvider = AbsoluteReserveProvider;
type RateLimiter = (); //TODO: what do ?
Copy link
Member

Choose a reason for hiding this comment

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

TODO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we want to do something with this ratelimiter at all ? nobody else seems to be using it.

runtime/basilisk/src/xcm.rs Show resolved Hide resolved
runtime/basilisk/src/xcm.rs Show resolved Hide resolved
Co-authored-by: Richard Roznovjak <[email protected]>
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum AssetType<AssetId> {
Token,
PoolShare(AssetId, AssetId), // Use XYX instead
Copy link
Contributor

Choose a reason for hiding this comment

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

if this is deprecated, we could place attribute like

 #[deprecated(since = "x.z.y", note = "Use XYK instead")]

Copy link
Contributor Author

@enthusiastmartin enthusiastmartin May 7, 2024

Choose a reason for hiding this comment

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

i would not bother with this anymore. it is older version of registry. it would probably fail on clippy and we would need to allow deprecated anyway

@mrq1911 mrq1911 merged commit 31972f1 into master May 8, 2024
4 checks passed
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.

5 participants