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

state proofs: update state proof totals calculation #4445

Merged
merged 11 commits into from
Aug 24, 2022

Conversation

cce
Copy link
Contributor

@cce cce commented Aug 22, 2022

Summary

Update the total weight to subtract rewards from accounts who have expired or have keys that do not match the weight commitment round.

Test Plan

New tests needed

@cce cce added the Bug-Fix label Aug 22, 2022
@codecov
Copy link

codecov bot commented Aug 23, 2022

Codecov Report

Merging #4445 (e1ff379) into master (e4d6d42) will increase coverage by 0.02%.
The diff coverage is 76.92%.

@@            Coverage Diff             @@
##           master    #4445      +/-   ##
==========================================
+ Coverage   55.19%   55.21%   +0.02%     
==========================================
  Files         398      398              
  Lines       50165    50175      +10     
==========================================
+ Hits        27689    27705      +16     
+ Misses      20159    20155       -4     
+ Partials     2317     2315       -2     
Impacted Files Coverage Δ
ledger/ledgercore/votersForRound.go 0.00% <0.00%> (ø)
protocol/consensus.go 0.00% <ø> (ø)
ledger/acctonline.go 78.12% <60.00%> (-0.77%) ⬇️
config/consensus.go 86.49% <100.00%> (+0.19%) ⬆️
network/wsNetwork.go 64.63% <0.00%> (-0.20%) ⬇️
catchup/service.go 69.38% <0.00%> (ø)
catchup/peerSelector.go 100.00% <0.00%> (+1.04%) ⬆️
network/wsPeer.go 68.21% <0.00%> (+2.73%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@id-ms id-ms closed this Aug 24, 2022
@id-ms id-ms reopened this Aug 24, 2022
@id-ms id-ms marked this pull request as ready for review August 24, 2022 13:56
config/consensus.go Show resolved Hide resolved
ledger/acctonline.go Show resolved Hide resolved
Copy link
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

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

Looks right to me. Though it seems barely worth it, given the small amounts of rewards that are paid these days, and that all participants have necessarily received rewards fairly recently, when they last keyreg'd.

// 10046 = (12 * 60 * 60 / 4.3)
// for the sake of future manual calculations, we'll round that down a bit :
v33.ApprovedUpgrades[protocol.ConsensusV34] = 10000
v33.ApprovedUpgrades[protocol.ConsensusV35] = 10000
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we have v33 upgradeable to v34?

Copy link
Contributor Author

@cce cce Aug 24, 2022

Choose a reason for hiding this comment

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

we were going to skip v34 (what is currently on betanet) and let mainnet go from v32 to v33 to v35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants