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

Revert "Add vesting migration and extend to 4 years" #906

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ exclude = ["examples"]

[workspace]
members = [
"account-util",
"primitives",
"primitives/crypto",
"primitives/rpc/*",
Expand Down
18 changes: 0 additions & 18 deletions account-util/Cargo.toml

This file was deleted.

96 changes: 0 additions & 96 deletions account-util/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion pallets/multi-asset-delegation/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl<T: crate::Config> MultiAssetDelegationInfo<T::AccountId, BalanceOf<T>, Bloc

fn is_operator_active(operator: &T::AccountId) -> bool {
Operators::<T>::get(operator)
.is_some_and(|metadata| matches!(metadata.status, OperatorStatus::Active))
.map_or(false, |metadata| matches!(metadata.status, OperatorStatus::Active))
}

fn get_operator_stake(operator: &T::AccountId) -> BalanceOf<T> {
Expand Down
2 changes: 1 addition & 1 deletion primitives/src/services/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ impl<'de, S: Get<u32>> serde::Deserialize<'de> for BoundedString<S> {
{
struct StringVisitor<S: Get<u32>>(PhantomData<S>);

impl<S: Get<u32>> serde::de::Visitor<'_> for StringVisitor<S> {
impl<'de, S: Get<u32>> serde::de::Visitor<'de> for StringVisitor<S> {
type Value = String;

fn expecting(&self, formatter: &mut core::fmt::Formatter) -> core::fmt::Result {
Expand Down
3 changes: 2 additions & 1 deletion primitives/src/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ use crate::Weight;
use educe::Educe;
use fp_evm::CallInfo;
use frame_support::pallet_prelude::*;
use serde::Deserializer;
#[cfg(feature = "std")]
use serde::{Deserialize, Deserializer, Serialize};
use serde::{Deserialize, Serialize};
use sp_core::{ByteArray, RuntimeDebug, H160, U256};
use sp_runtime::Percent;

Expand Down
22 changes: 0 additions & 22 deletions runtime/mainnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -281,28 +281,6 @@ std = [
"pallet-evm-precompile-multi-asset-delegation/std",
]

try-runtime = [
"frame-support/try-runtime",
"frame-executive/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-vesting/try-runtime",
"pallet-assets/try-runtime",
"pallet-collective/try-runtime",
"pallet-tx-pause/try-runtime",
"pallet-staking/try-runtime",
"sp-runtime/try-runtime",

# Frontier
"pallet-ethereum/try-runtime",
"pallet-evm/try-runtime",
"pallet-hotfix-sufficients/try-runtime",
# Tangle
"pallet-services/try-runtime",
]

integration-tests = ["tangle-primitives/integration-tests"]
with-rocksdb-weights = []
with-paritydb-weights = []
Expand Down
5 changes: 2 additions & 3 deletions runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1449,14 +1449,13 @@ pub type Executive = frame_executive::Executive<
Runtime,
AllPalletsWithSystem,
(
migrations::session_key_migrations_08062024::MigrateSessionKeys<Runtime>,
migrations::MigrateSessionKeys<Runtime>,
// AssetId limits
// 0 - 1000 (reserved for future use)
// 1000 - 50000 (reserved for LST pools)
// 50000 - 1000000 (reserved for native assets)
// set user start at 50_000, everything below is reserved for system use
migrations::assets_indices_migration_01162025::SetNextAssetId<ConstU128<50_000>, Runtime>,
migrations::investor_team_vesting_migration_11302024::UpdateTeamInvestorVesting<Runtime>,
migrations::SetNextAssetId<ConstU128<50_000>, Runtime>,
),
>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::{AccountId, Babe, Grandpa, KeyTypeId, OpaqueKeys, Session, SessionKeys};
use frame_support::{pallet_prelude::*, traits::OnRuntimeUpgrade};
use super::*;
use frame_support::traits::Incrementable;
use frame_support::traits::OnRuntimeUpgrade;
use pallet_assets::NextAssetId;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use sp_runtime::{BoundToRuntimeAppPublic, RuntimeAppPublic, RuntimeDebug};

Expand Down Expand Up @@ -69,3 +71,20 @@ impl<T: pallet_session::Config> OnRuntimeUpgrade for MigrateSessionKeys<T> {
T::DbWeight::get().reads_writes(10, 10)
}
}

/// Set [`NextAssetId`] to the value of `ID` if [`NextAssetId`] does not exist yet.
pub struct SetNextAssetId<ID, T: pallet_assets::Config>(core::marker::PhantomData<(ID, T)>);
impl<ID, T: pallet_assets::Config> OnRuntimeUpgrade for SetNextAssetId<ID, T>
where
T::AssetId: Incrementable,
ID: Get<T::AssetId>,
{
fn on_runtime_upgrade() -> frame_support::weights::Weight {
if !NextAssetId::<T>::exists() {
NextAssetId::<T>::put(ID::get());
T::DbWeight::get().reads_writes(1, 1)
} else {
T::DbWeight::get().reads(1)
}
}
}

This file was deleted.

Loading
Loading