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

[AHM] Fast unstake and Bags list #563

Open
wants to merge 6 commits into
base: dev-asset-hub-migration
Choose a base branch
from

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Jan 28, 2025

To be merged into the AHM dev branch.

There should be no user impact here - both pallets have their storage migrated exactly as is and the used times are always in Epoch.

  • Does not require a CHANGELOG entry

@ggwpez ggwpez mentioned this pull request Jan 29, 2025
64 tasks
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez changed the title [AHM] Fast unstake [AHM] Fast unstake and Bags list Jan 29, 2025
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Copy link
Member Author

Choose a reason for hiding this comment

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

Need to check if we have to re-generate these values.

Copy link
Contributor

Choose a reason for hiding this comment

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

No proper review given from me for this file. But I will do it on request. May be we better consult with staking team on this, will take more time from me.

@ggwpez ggwpez marked this pull request as ready for review January 29, 2025 21:54
Copy link
Contributor

Choose a reason for hiding this comment

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

No proper review given from me for this file. But I will do it on request. May be we better consult with staking team on this, will take more time from me.

type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BatchSize = frame_support::traits::ConstU32<16>;
type Deposit = frame_support::traits::ConstU128<{ UNITS }>;
Copy link
Contributor

Choose a reason for hiding this comment

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

might need to be updated, since should cost less on a parachain

MigrationDone,
}

pub type MigrationStageFor<T> = MigrationStage<<T as frame_system::Config>::AccountId>;
pub type MigrationStageFor<T> = MigrationStage<
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have some non written convention when we use For or Of suffix? I wished to keep it consistent (=
I had a feeling that Gav used For for storage items and Of for types, but I am not sure.

});
},
e => {
log::error!(target: LOG_TARGET, "Error while migrating fast unstake: {:?}", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

actually no need for error, since defensive is below. just would be nice to pass the e for defensive as well

break;
}
}
if messages.len() > 10_000 {
Copy link
Contributor

Choose a reason for hiding this comment

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

temporary measure or not? can you explain please

messages: Vec<RcBagsListMessage<T>>,
) -> Result<(), Error<T>> {
let (mut good, mut bad) = (0, 0);
log::info!("Integrating {} BagsListMessages", messages.len());
Copy link
Contributor

Choose a reason for hiding this comment

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

log target?

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.

2 participants