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

Update Staking simple flow node sorting and selection logic #2154

Merged
merged 6 commits into from
Dec 13, 2024

Conversation

ruijialin-avalabs
Copy link
Contributor

@ruijialin-avalabs ruijialin-avalabs commented Dec 12, 2024

Description

  • Set max delegation fee to 4% for simple flow
  • Sort node by delegation fee first, then uptime and node version
  • select node with lowest delegation fee
    • if there are only one node with lowest delegation fee, use it
    • if there are more than one with lowest delegation fee, randomly pick the node from top most 5 nodes

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have added/updated necessary unit tests
  • I have updated the documentation

@ruijialin-avalabs ruijialin-avalabs changed the title Set max delegation fee to 20% for simple flow Set max delegation fee to 4% for simple flow Dec 12, 2024
@ruijialin-avalabs ruijialin-avalabs changed the title Set max delegation fee to 4% for simple flow Update Staking simple flow node sorting and selection logic Dec 12, 2024
atn4z7
atn4z7 previously approved these changes Dec 12, 2024
Copy link
Collaborator

@atn4z7 atn4z7 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 to me. If you could add some tests as well tomorrow, that will be great.

Copy link
Collaborator

@neven-s neven-s 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! 👏

@ruijialin-avalabs ruijialin-avalabs merged commit 9379d09 into main Dec 13, 2024
4 checks passed
@ruijialin-avalabs ruijialin-avalabs deleted the simpleFlowMaxFee branch December 13, 2024 15:38
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