-
Notifications
You must be signed in to change notification settings - Fork 527
state proofs: update state proof totals calculation #4445
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
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
562a719
add v35 to update state proof totals calculation
cce 3847e6e
v32 to v35 upgrade test
algorandskiy e79b8a8
update tests for TopOnlineAccounts
cce f6a79a1
pass rewardsLevel instead of block header
cce c5d0e65
bump ConsensusCurrentVersion
cce 1f11f29
Fix TestReleasedVersion
algorandskiy 0d37f67
add new commit hash + refactoring
d70b51a
using the current version
3555eed
add e2e for testing online stake and rewards
165f173
some test cleanup
e1ff379
skipping the long tests on ci
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -391,6 +391,10 @@ type ConsensusParams struct { | |
| // release resources allocated for creating state proofs. | ||
| StateProofMaxRecoveryIntervals uint64 | ||
|
|
||
| // StateProofExcludeTotalWeightWithRewards specifies whether to subtract rewards from excluded online accounts along with | ||
| // their account balances. | ||
| StateProofExcludeTotalWeightWithRewards bool | ||
|
|
||
| // EnableAssetCloseAmount adds an extra field to the ApplyData. The field contains the amount of the remaining | ||
| // asset that were sent to the close-to address. | ||
| EnableAssetCloseAmount bool | ||
|
|
@@ -1191,14 +1195,22 @@ func initConsensusProtocols() { | |
|
|
||
| Consensus[protocol.ConsensusV34] = v34 | ||
|
|
||
| // v33 can be upgraded to v34, with an update delay of 12h: | ||
| v35 := v34 | ||
| v35.StateProofExcludeTotalWeightWithRewards = true | ||
|
|
||
| v35.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} | ||
|
|
||
| Consensus[protocol.ConsensusV35] = v35 | ||
|
|
||
| // v33 and v34 can be upgraded to v35, with an update delay of 12h: | ||
| // 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't we have v33 upgradeable to v34?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| v34.ApprovedUpgrades[protocol.ConsensusV35] = 10000 | ||
|
|
||
| // ConsensusFuture is used to test features that are implemented | ||
| // but not yet released in a production protocol version. | ||
| vFuture := v34 | ||
| vFuture := v35 | ||
| vFuture.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} | ||
|
|
||
| vFuture.LogicSigVersion = 8 // When moving this to a release, put a new higher LogicSigVersion here | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.