-
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
Feat: upgrade1020 misc 2 #1532
Merged
Merged
Feat: upgrade1020 misc 2 #1532
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ee6c6d0
feat: account ensuring origin
mustermeiszer 2431d22
feat: bumb runtime version develpment
mustermeiszer 8903331
fix: allow council to control gatway on Altair based chains
mustermeiszer 3f4d05a
fix: use EnsureSigned, make use of type and add admin
mustermeiszer 0fe4cff
feat: overestimated weights for lp logic
mustermeiszer 5a62dd3
Merge remote-tracking branch 'origin/upgrade1020' into feat/upgrade10…
mustermeiszer c1e5d34
fix: taplooo
mustermeiszer fbb35fe
fix: tests and comment
mustermeiszer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
pallets/liquidity-pools-gateway/axelar-gateway-precompile/src/weights.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2023 Centrifuge Foundation (centrifuge.io). | ||
// | ||
// This file is part of the Centrifuge chain project. | ||
// Centrifuge is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version (see http://www.gnu.org/licenses). | ||
// Centrifuge is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
use frame_support::weights::{constants::RocksDbWeight, Weight}; | ||
|
||
pub trait WeightInfo { | ||
fn set_gateway() -> Weight; | ||
fn set_converter() -> Weight; | ||
} | ||
|
||
impl WeightInfo for () { | ||
fn set_gateway() -> Weight { | ||
// TODO: BENCHMARK CORRECTLY | ||
// | ||
// NOTE: Reasonable weight taken from `PoolSystem::set_max_reserve` | ||
// This one has one read and one write for sure and possible one | ||
// read for `AdminOrigin` | ||
Weight::from_parts(17_000_000, 5991) | ||
.saturating_add(RocksDbWeight::get().reads(2)) | ||
.saturating_add(RocksDbWeight::get().writes(1)) | ||
} | ||
|
||
fn set_converter() -> Weight { | ||
// TODO: BENCHMARK CORRECTLY | ||
// | ||
// NOTE: Reasonable weight taken from `PoolSystem::set_max_reserve` | ||
// This one has one read and one write for sure and possible one | ||
// read for `AdminOrigin` | ||
Weight::from_parts(17_000_000, 5991) | ||
.saturating_add(RocksDbWeight::get().reads(2)) | ||
.saturating_add(RocksDbWeight::get().writes(1)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: I made sure this default weight and PoV size for liquidity pool extrinsics is still executable. It is.
I do believe though we should increase it when we introduce foreign investments or did you factor that in already?
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.
I did too ^^
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.
No, I think we should increase it.