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

Release client v0.10.36, Centrifuge 1025 & Altair 1034 #1749

Merged
merged 16 commits into from
Mar 7, 2024

Conversation

wischli
Copy link
Contributor

@wischli wischli commented Feb 29, 2024

Description

Changes

  • Minor migration fixes
  • Updates weights
  • Splits PoolFees trait into PoolFeesMutate and PoolFeesInspect whereas the latter is only needed for weights

TODO

  • Altair weights
  • Centrifuge weights
  • Dev weights

Checklist:

  • I have added Rust doc comments to structs, enums, traits and functions
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works

@wischli wischli self-assigned this Feb 29, 2024
@wischli wischli added the I9-release A specific release. label Feb 29, 2024
@mustermeiszer mustermeiszer mentioned this pull request Feb 29, 2024
4 tasks
Comment on lines +108 to +112
/// The current storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);

#[pallet::pallet]
#[pallet::storage_version(STORAGE_VERSION)]
Copy link
Contributor Author

@wischli wischli Mar 4, 2024

Choose a reason for hiding this comment

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

This slipped under our radar. Note to ourselves to not forget storage versions of pallets in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good eye!

@@ -23,8 +23,8 @@ use sp_runtime::{traits::checked_pow, FixedPointNumber};

use super::*;

const CURRENCY_IN: u32 = 1;
const CURRENCY_OUT: u32 = 2;
const CURRENCY_IN: u32 = 1000;
Copy link
Contributor

@lemunozm lemunozm Mar 6, 2024

Choose a reason for hiding this comment

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

Out of curiosity, what was the issue here?

Copy link
Contributor Author

@wischli wischli Mar 6, 2024

Choose a reason for hiding this comment

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

Benchmarks failed because at least CURRENCY_IN existed in storage already.

Copy link
Contributor

Choose a reason for hiding this comment

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

Mmm... but who was registering that CURRENCY_IN before? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couldn't find a quick answer and didn't wanna spend more time debugging this because debugging runtime benchmarks is really annoying.

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem! Just curious in case you knew it

Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

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

Amazing work @wischli ! Thanks for shine it before the release

Just one minor detail below

@@ -334,7 +334,7 @@ pub mod pallet {
impl<T: Config> Pallet<T> {
/// Create an order with the default min fulfillment amount.
#[pallet::call_index(0)]
#[pallet::weight(T::Weights::create_order())]
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for clean up my dirty!

Self::update_portfolio_valuation_for_pool(pool_id, &mut T::Balance::zero())?;

// Ok(Some(T::WeightInfo::update_portfolio_valuation(count)).into())
Ok(Some(T::DbWeight::get().reads(1)).into())
Ok(Some(T::WeightInfo::update_portfolio_valuation(count)).into())
Copy link
Contributor

Choose a reason for hiding this comment

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

The above weights attached to this extrinsic is

#[pallet::weight(Weight::from_parts(10_000, 0))]

Should we change it to:

#[pallet::weight(Weight::update_porfolio_valuation(T::MaxFeesPeerPool::get()))]

to get a real maximum suggestion of the expected fees for this extrinsic?

Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

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

LGTM!

@lemunozm
Copy link
Contributor

lemunozm commented Mar 6, 2024

Because this is critical, I would like to have another couple of eyes here to ensure all version numbers are correctly set and other such things. But LGTM!

Copy link
Collaborator

@mustermeiszer mustermeiszer left a comment

Choose a reason for hiding this comment

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

Thanks! Lets go!!

@wischli wischli merged commit 544ce02 into main Mar 7, 2024
9 checks passed
@wischli wischli deleted the release-v0.10.36-rc1 branch March 7, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I9-release A specific release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants