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

Add consensus amplification for SIP-45 #20668

Merged
merged 2 commits into from
Dec 25, 2024
Merged

Conversation

shio-coder
Copy link
Contributor

@shio-coder shio-coder commented Dec 18, 2024

Description

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

Planning to make another separated PR for protocol config, that is:

  • Let K be a part of protocol config.
  • Increase max gas price in protocol config.

Test plan

CI

@shio-coder shio-coder requested a review from a team as a code owner December 18, 2024 10:00
Copy link

vercel bot commented Dec 18, 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 20, 2024 10:03pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2024 10:03pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2024 10:03pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Dec 20, 2024 10:03pm

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.

Looks good overall. A few comments.

// TODO: Make this configurable.
let k = 5;
let multipler = gas_price / epoch_store.reference_gas_price();
let amplification_factor = if multipler >= k { multipler } else { 0 };
Copy link
Member

@mwtian mwtian Dec 19, 2024

Choose a reason for hiding this comment

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

I think in the original proposal this is if multipler >= k { multipler + 1 } else { 0 }, but I like the simpler version here.
https://github.com/sui-foundation/sips/pull/45/files#diff-75580faeea2effa3b32a39975085e3ae86fb79e86f9f7208f3a20aafd002f504R33

crates/sui-core/src/consensus_adapter.rs Outdated Show resolved Hide resolved
crates/sui-core/src/consensus_adapter.rs Show resolved Hide resolved
@mwtian
Copy link
Member

mwtian commented Dec 20, 2024

Native Bridge / test seems to be failing after retries. Maybe rebase this PR on latest main?

@shio-coder
Copy link
Contributor Author

Native Bridge / test seems to be failing after retries. Maybe rebase this PR on latest main?

Hi, the PR is currently based on main. Could it be related to permission?

@mwtian
Copy link
Member

mwtian commented Dec 20, 2024

Native Bridge / test seems to be failing after retries. Maybe rebase this PR on latest main?

Hi, the PR is currently based on main. Could it be related to permission?

I see. There is a recent issue with Sui CI config. The fix was just merged: #20707. We can pick up this change to fix the CI issue.

@shio-coder
Copy link
Contributor Author

Native Bridge / test seems to be failing after retries. Maybe rebase this PR on latest main?

Hi, the PR is currently based on main. Could it be related to permission?

I see. There is a recent issue with Sui CI config. The fix was just merged: #20707. We can pick up this change to fix the CI issue.

Cool, I have rebased the PR

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.

If @akichidis or @arun-koshy can take a look before merging, it will be great.

// TODO: Make this configurable.
let k = 5;
let multipler = gas_price / epoch_store.reference_gas_price();
let amplification_factor = if multipler >= k { multipler } else { 0 };
Copy link
Member

Choose a reason for hiding this comment

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

In this or the next PR, how about adding a histogram metric to record amplification_factor, using SEQUENCING_CERTIFICATE_POSITION_BUCKETS bucket?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. Will do it in the next PR.

@akichidis
Copy link
Contributor

If @akichidis or @arun-koshy can take a look before merging, it will be great.

Thanks @mwtian for reviewing this. I’ll take a look today

@mwtian mwtian changed the title Add consensus amplifaction for SIP-45 Add consensus amplification for SIP-45 Dec 25, 2024
@mwtian mwtian merged commit bed5641 into MystenLabs:main Dec 25, 2024
49 of 50 checks passed
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.

3 participants