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

[Merged by Bors] - Update size of Ballot #5619

Closed
wants to merge 6 commits into from
Closed

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Feb 28, 2024

Motivation

This updates max scale collection sizes to support a network with up to 2.2 mio unique (valid) identities.

Description

  • The documentation of EligibilityProofs in Ballot is misleading. Additionally the current maximum size is too small when ATX merging will be introduced. The new limit is based on the same assumption that no single identity will control more than 10% of the networks PoST size. See the added comment for details.
  • The max number of Rewards in a Block, Ballots in a Layer and Proposals for a hare message all depend on the total number of ATXs that are valid for a given epoch. Since those are probabilistic (randomly distributed) I calculated the expected value with a 6 sigma (99.997%) safety margin and used this as new maximum for the collection. For 2.2 mio ATXs that turned out to be ~ 743 so I chose 800.
  • I added more comments as to which other values have to be increased if a collection is updated.

Test Plan

n/a

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

@fasmat fasmat self-assigned this Feb 28, 2024
@fasmat fasmat requested review from pigmej and removed request for ivan4th, dshulyak and poszu February 28, 2024 16:09
@fasmat fasmat force-pushed the increase-ballot-size branch from ff1a415 to db573da Compare February 28, 2024 16:10
@fasmat fasmat requested review from ivan4th, dshulyak and poszu February 28, 2024 16:10
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.8%. Comparing base (1a65b41) to head (7574aed).

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #5619     +/-   ##
=========================================
- Coverage     79.8%   79.8%   -0.1%     
=========================================
  Files          271     271             
  Lines        27347   27346      -1     
=========================================
- Hits         21842   21841      -1     
- Misses        3972    3973      +1     
+ Partials      1533    1532      -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fasmat fasmat force-pushed the increase-ballot-size branch from db573da to a9af7e0 Compare February 28, 2024 22:11
@fasmat fasmat force-pushed the increase-ballot-size branch from 7897095 to 997c608 Compare February 28, 2024 22:28
//
// Assuming the largest smesher won't control more than 10% of space in the network, we can assume that the
// highest number of eligibilities in a single ballot will be below 25000. (10% of 4032 * 50 = 20160)
EligibilityProofs []VotingEligibility `scale:"max=25000"`
Copy link
Contributor

Choose a reason for hiding this comment

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

we are not concerned about number of eligibility proofs for a single identity.
instead number of identities will grow, and therefore number of proposals/ballots. so we have to update collections that references proposals/ballots per layer.

  • hare preround message
  • LayerData for sync
  • number of rewards in the block

Copy link
Member Author

Choose a reason for hiding this comment

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

I checked those and updated the maximum allowed number for each of them.

@fasmat fasmat requested a review from dshulyak February 29, 2024 10:22
@fasmat
Copy link
Member Author

fasmat commented Feb 29, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 29, 2024
## Motivation

This updates max scale collection sizes to support a network with up to 2.2 mio unique (valid) identities.
@spacemesh-bors
Copy link

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title Update size of Ballot [Merged by Bors] - Update size of Ballot Feb 29, 2024
@spacemesh-bors spacemesh-bors bot closed this Feb 29, 2024
@spacemesh-bors spacemesh-bors bot deleted the increase-ballot-size branch February 29, 2024 12:23
fasmat added a commit that referenced this pull request Feb 29, 2024
## Motivation

This updates max scale collection sizes to support a network with up to 2.2 mio unique (valid) identities.
@fasmat fasmat mentioned this pull request Feb 29, 2024
4 tasks
fasmat added a commit that referenced this pull request Feb 29, 2024
## Motivation

This updates max scale collection sizes to support a network with up to 2.2 mio unique (valid) identities.
fasmat added a commit that referenced this pull request Feb 29, 2024
## Motivation

This updates max scale collection sizes to support a network with up to 2.2 mio unique (valid) identities.
fasmat added a commit that referenced this pull request Feb 29, 2024
* Update size of Ballot (#5619)

## Motivation

This updates max scale collection sizes to support a network with up to 2.2 mio unique (valid) identities.

* Update CHANGELOG.md
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