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

[consensus] support committee with 1 node #20530

Merged
merged 3 commits into from
Dec 6, 2024
Merged

[consensus] support committee with 1 node #20530

merged 3 commits into from
Dec 6, 2024

Conversation

mwtian
Copy link
Member

@mwtian mwtian commented Dec 6, 2024

Description

Obviously there is no fault tolerance. But this should be useful for running local cluster cheaply. min_round_delay should be set to a higher value for local cluster so not too many consensus blocks are built.

Test plan

Add unit and simtest.


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:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

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

@mwtian mwtian temporarily deployed to sui-typescript-aws-kms-test-env December 6, 2024 01:13 — with GitHub Actions Inactive
Copy link
Contributor

@arun-koshy arun-koshy left a comment

Choose a reason for hiding this comment

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

nice!

@stefan-mysten
Copy link
Contributor

You rock @mwtian, thanks a lot!

@stefan-mysten
Copy link
Contributor

As I am a bit of a noob in this area, does this change restrict the committee size to only 1?

@mwtian
Copy link
Member Author

mwtian commented Dec 6, 2024

No problem! This change just makes sure 1-validator committee works in the scenarios covered by the tests (with epoch change). Using any other number (2,3,4,...) of validators in a committee is still supported.

Copy link
Contributor

@akichidis akichidis left a comment

Choose a reason for hiding this comment

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

Nice one @mwtian 👍 !

break 'main;
}

let mut total_stake = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice fix as well moving the total_stake here.

@mwtian mwtian merged commit 6e6c72d into main Dec 6, 2024
52 checks passed
@mwtian mwtian deleted the tmw/1-node branch December 6, 2024 16:03
@stefan-mysten
Copy link
Contributor

Thanks a lot @mwtian!!! 🚀

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.

4 participants