-
Notifications
You must be signed in to change notification settings - Fork 221
Adjusted weight function for new identities #6817
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
@@ -104,6 +104,8 @@ func MainnetConfig() Config { | |||
LayerAvgSize: 50, | |||
LayersPerEpoch: 4032, | |||
|
|||
BonusWeightEpoch: 50, // TODO(mafa): set to correct value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: update to correct value
bors try |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## develop #6817 +/- ##
=========================================
- Coverage 76.9% 76.9% -0.1%
=========================================
Files 369 369
Lines 50315 50402 +87
=========================================
+ Hits 38734 38770 +36
- Misses 9374 9416 +42
- Partials 2207 2216 +9 ☔ View full report in Codecov by Sentry. |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild succeeded: |
6113630
to
cba3684
Compare
cba3684
to
c424e2e
Compare
c424e2e
to
ec1b585
Compare
Motivation
Incentivise reinitialisation by giving identities that have been created after a certain epoch extra weight in their ATXs. This PR adjusts the weight function for identities that have been initialized after the configured epoch.
Description
BonusWeightEpoch
that defines the epoch at which new identities start to receive extraweight
BonusWeightEpoch-2
, any ATX published in or after that epoch and is used as commitment makes an identity eligiblefor the extra weight
BonusWeightEpoch-2
or the golden ATXfastnet
I set epoch 3 as theBonusWeightEpoch
so that all identities created after genesis receive the bonusweight
BonusWeightEpoch
should be set to an epoch in the near future, but not hard coded intotestnet
preset. Unless this functionality is explicitly tested on a testnet this parameter doesn't need to be set at all.Test Plan
New unit tests have been added and existing tests have been adjusted for the changed functionality.
TODO