-
Notifications
You must be signed in to change notification settings - Fork 85
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
Upgrade 1020 #1522
Upgrade 1020 #1522
Conversation
@@ -124,7 +123,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { | |||
spec_name: create_runtime_str!("altair"), | |||
impl_name: create_runtime_str!("altair"), | |||
authoring_version: 1, | |||
spec_version: 1030, | |||
spec_version: 1031, |
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.
Need to bump bc Algol is already in 30
/// that have to be applied on that chain, which includes migrations that have | ||
/// already been executed on Algol (1028 & 1029). | ||
#[cfg(not(feature = "testnet-runtime"))] | ||
pub type UpgradeAltair1030 = ( |
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.
Needed to bump bc Algol was already in 1030
crate::NativeToken, | ||
crate::ExistentialDeposit, | ||
>, | ||
pub type UpgradeAltair1031 = ( |
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.
Needed to bump bc Algol was already in 1031
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.
NOTE: Algol is currently on 1030.
@@ -181,57 +193,413 @@ mod asset_registry { | |||
} | |||
} | |||
|
|||
/// Register the LiquidityPools Wrapped Ethereum USDC | |||
pub struct RegisterLpEthUSDC; |
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.
Removing RegisterLpEthUSDC
migration and adding it within the AssetRegistryMultilocationToXCMV3
one
runtime/centrifuge/src/migrations.rs
Outdated
ETHEREUM_USDC, | ||
), | ||
), | ||
] |
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.
Add here any current registered asset that is added between now and the upgrade.
runtime/centrifuge/src/migrations.rs
Outdated
} | ||
|
||
let mut meta_count = orml_asset_registry::Metadata::<T>::iter_keys().count() as u32; | ||
let is_centrifuge = meta_count == 6; |
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.
Bump number according to current number of assets on chain.
* centrifuge: Add liquidity pools pallets to runtime * centrifuge: Add LP OutboundQueue wrapper to runtime * taplo: Obey * runtime: Move OutboundQueue import * centrifuge: Allow both root and half of council as admin origins for LP pallets * centrifuge: Add Axelar Gateway precompile * centrifuge: Use correct HRMP encoder, update HRMP fee to 1 DOT, use XCM V3 imports * centrifuge: Update error message for InboundQueue * clippy: Fix warnings * centrifuge: Rename outbound queue, fix migration import for orml asset registry
runtime/altair/src/migrations.rs
Outdated
// TODO: Verify that these ones can be removed from Algol upgrade, since the first 2 fail | ||
// runtime_common::migrations::nuke::Migration<crate::Loans, RocksDbWeight, 1>, | ||
// runtime_common::migrations::nuke::Migration<crate::InterestAccrual, RocksDbWeight, 0>, | ||
// runtime_common::migrations::nuke::Migration<crate::PoolSystem, RocksDbWeight, 0>, |
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.
This was added during re-base.
runtime/altair/src/migrations.rs
Outdated
// runtime_common::migrations::nuke::Migration<crate::Loans, RocksDbWeight, 1>, | ||
// runtime_common::migrations::nuke::Migration<crate::InterestAccrual, RocksDbWeight, 0>, | ||
// runtime_common::migrations::nuke::Migration<crate::PoolSystem, RocksDbWeight, 0>, | ||
// runtime_common::migrations::nuke::Migration<crate::Investments, RocksDbWeight, 0>, |
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.
This was added during re-base.
* centrifuge: Enable LP gateway XCM origin converter * centrifuge: Update LP pallet config to use Quantity for BalanceRatio * runtime: Update XCM origin converter, use Quantity in LP message, add OriginRecovery to LP gateway
* fix: allow gateway process msg for xcm * feat: add safe xcm version migration * fix: Allow process_msg for xcm transact * refactor: remove spec_version check * refactor: stricter SafeCallFilter * Upgrade1020 LP follow-ups (#1525) * centrifuge: Enable LP gateway XCM origin converter * centrifuge: Update LP pallet config to use Quantity for BalanceRatio * runtime: Update XCM origin converter, use Quantity in LP message, add OriginRecovery to LP gateway * fix: rm OrderBook safe call cause missing * fix: OrderBook missing in both runtimes * fix: clippy --------- Co-authored-by: Cosmin Damian <[email protected]>
* fix: centrifuge asset migration * Apply suggestions from code review Co-authored-by: Frederik Gartenmeister <[email protected]> * chore: append cfg assets to catalyst * fix: asset registry migration improvements * feat: apply asset metadata migration to altair runtime * fix: cleanup altair/algol migrations * fix: less aggressive nuke pre-upgrade * fix: finalize migrations, add context * fix: clippy + cleanup imports * fix: native currency altair, algol * fix: Algol native currency name --------- Co-authored-by: Frederik Gartenmeister <[email protected]>
* gateway: Use BoundedVec instead of EVMChain enum * gateway: Add Sender type to LP gateway config * gateway: Rename EVM chain size const, emit event when submitting message, adjust gateway sender provider
* feat: account ensuring origin * feat: bumb runtime version develpment * fix: allow council to control gatway on Altair based chains * fix: use EnsureSigned, make use of type and add admin * feat: overestimated weights for lp logic * fix: taplooo * fix: tests and comment
* chore: update centrifuge, altair weights * feat: bump and improve dev weights * fix: transfer_allowlist weights * feat: normalize SafeCallFilter across runtimes
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.
Re-approving!
Description
Last items to complete before code freeze:
CurrencyId::Native
)InboundQueue
that triggers event with info (Runtime struct)OutboundQueue
that LPs consumesAddCurrency
,UpdateMember
,AddPool
,AddTranche
,UpdateTrancheTokenPrice
)NOTE: This one will be merged to main in order to allow upgrading DEV earlier