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

feat: fix chunk producer staking threshold #12660

Merged
merged 3 commits into from
Dec 21, 2024

Conversation

eagr
Copy link
Contributor

@eagr eagr commented Dec 20, 2024

In case of empty seats, the seat price of cp used to depend on the number of existing shards (approximately block_producer_threshold / num_shard), but it is no longer the case. Hence the fix.

cc @Longarithm @wacban

@eagr eagr requested a review from a team as a code owner December 20, 2024 14:58
@eagr eagr requested a review from wacban December 20, 2024 14:58
@eagr eagr marked this pull request as draft December 20, 2024 14:58
Copy link
Member

@Longarithm Longarithm left a comment

Choose a reason for hiding this comment

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

LGTM, we just likely need to fix/remove tests depending on the old ratio.

Comment on lines 130 to 131
// (reason of "approximately 6x": ./fix_stake_threshold.rs, but it's irrelevant here)
// so test3's proposal will not be approved
Copy link
Member

Choose a reason for hiding this comment

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

Let's just say that 6 corresponds to the number of shards, especially if fix_stake_threshold is irrelevant.

@eagr eagr force-pushed the fix-chunk-producer-stake branch from c556314 to 34bf46e Compare December 20, 2024 20:11
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.51%. Comparing base (dcaa2b6) to head (34bf46e).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12660      +/-   ##
==========================================
+ Coverage   70.49%   70.51%   +0.02%     
==========================================
  Files         845      845              
  Lines      172247   172257      +10     
  Branches   172247   172257      +10     
==========================================
+ Hits       121421   121465      +44     
+ Misses      45727    45696      -31     
+ Partials     5099     5096       -3     
Flag Coverage Δ
backward-compatibility 0.16% <0.00%> (ø)
db-migration 0.16% <0.00%> (ø)
genesis-check 1.36% <0.00%> (-0.01%) ⬇️
linux 69.36% <100.00%> (+<0.01%) ⬆️
linux-nightly 70.11% <100.00%> (+0.03%) ⬆️
pytests 1.66% <0.00%> (-0.01%) ⬇️
sanity-checks 1.47% <0.00%> (-0.01%) ⬇️
unittests 70.34% <100.00%> (+0.02%) ⬆️
upgradability 0.20% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@eagr eagr marked this pull request as ready for review December 20, 2024 20:42
@Longarithm Longarithm added this pull request to the merge queue Dec 21, 2024
Merged via the queue into near:master with commit 33afc1d Dec 21, 2024
28 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.

2 participants