-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[SIP-45] Metrics and protocol config changes #20738
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
Hi @mwtian , I have updated the PR. |
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.
Pushed some changes to fix the tests.
@@ -3076,6 +3083,13 @@ impl ProtocolConfig { | |||
|
|||
cfg.validator_validate_metadata_cost_base = Some(20000); | |||
} | |||
71 => { | |||
if chain != Chain::Mainnet { |
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.
Was there a discussion to roll out the max gas price to testnet and mainnet separately, instead of in the same release? cc @dariorussi @sblackshear
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 is just being conservative. If rolling out to mainnet at the same time is acceptable then let's do it!
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.
Ok. After looking at the related logic a bit, it seems there are some interactions between gas price and max_tx_gas limit, among other effects of using high gas price. I think being a bit conservative is warranted here. We should definitely try out using very high gas price on testnet first before changing the limit on mainnet. We may need to update max_tx_gas or switch to a different parameter limiting gas unit instead of total gas. They can be done separately.
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.
Yes I have justed realized there is max_tx_gas
as well.
Tried to change it locally and that has just caused so many tests to fail (these tests use max_tx_gas
as gas budget if not explicitly set). Looks like we are going to need another PR for it.
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.
Agree let's not change max_tx_gas
in this PR. In fact we can postpone changing max_gas_price
too if you think just changing it will not be useful. I have asked experts on the gas logic for the best way forward. cc @dariorussi @tzakian
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.
please take a look at my main comment
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 wondered about the max_tx_gas
and I am not too sure.
I think we need some good testing here and let's find out who is going to do that.
Gas tests are here https://github.com/MystenLabs/sui/blob/main/crates/sui-core/src/unit_tests/gas_tests.rs and I think we should add something that plays with budget and price, and also some tests that executes the same transaction with different prices and see that the results are as expected.
Thoughts?
@@ -3076,6 +3083,13 @@ impl ProtocolConfig { | |||
|
|||
cfg.validator_validate_metadata_cost_base = Some(20000); | |||
} | |||
71 => { | |||
if chain != Chain::Mainnet { |
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.
please take a look at my main comment
Agree. I see some existing tests on gas budget and prices in the file. We can discuss later on what need to be added, and who should add them. Maybe the change to max gas price can be moved to another PR along with the additional tests and adjustments to other parameters. |
Sounds good folks. I have removed |
to be honest I am not sure how max gas budget and a super high gas price and the coins to provide may interact. |
I actually see that the gas has been entirely removed from the PR and getting it in is entire up to you folks. |
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.
Looks good!
Description
This is the change that is proposed from SIP-45.
The change includes:
amplification_factor
.K
to protocol config.K
is set to 5 starting from Protocol Version 71.Test plan
CI
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.