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

[SIP-45] Metrics and protocol config changes #20738

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

shio-coder
Copy link
Contributor

Description

This is the change that is proposed from SIP-45.

The change includes:

  • Adds a histogram metric for amplification_factor.
  • Adds K to protocol config. K is set to 5 starting from Protocol Version 70.
  • Sets max gas price to 1T for testnet, starting from Protocol Version 70.

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.

  • Protocol: Set max gas price to 1T in testnet, starting from Protocol Version 70.
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@shio-coder shio-coder requested review from a team and mystenmark as code owners December 26, 2024 07:03
Copy link

vercel bot commented Dec 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 29, 2024 0:25am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Dec 29, 2024 0:25am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Dec 29, 2024 0:25am
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Dec 29, 2024 0:25am

crates/sui-protocol-config/src/lib.rs Outdated Show resolved Hide resolved
crates/sui-protocol-config/src/lib.rs Outdated Show resolved Hide resolved
@shio-coder
Copy link
Contributor Author

Hi @mwtian , I have updated the PR.
Please take another look. Thanks!

Copy link
Member

@mwtian mwtian left a 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 {
Copy link
Member

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

Copy link
Contributor Author

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!

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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

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