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
Staking v4 init auciton nodes list #3818
Conversation
epochStart/metachain/systemSCs.go
Outdated
@@ -313,6 +317,13 @@ func (s *systemSCProcessor) ProcessSystemSmartContract( | |||
} | |||
} | |||
|
|||
if s.flagStakingV4Enabled.IsSet() { |
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.
rename to flag Init
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.
287 you need a disable flag
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.
- Renamed to
flagStakingV4InitEnabled
- Also added a disable flag
cmd/node/config/enableEpochs.toml
Outdated
@@ -187,6 +187,10 @@ | |||
# StakeLimitsEnableEpoch represents the epoch when stake limits on validators are enabled | |||
StakeLimitsEnableEpoch = 5 | |||
|
|||
# StakingV4InitEnableEpoch represents the epoch when staking v4 is initialized. This is the epoch in which | |||
# all nodes from staking queue are moved in the auction list | |||
StakingV4InitEnableEpoch = 1000000 |
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.
for testing purposes you can set this to 3 or 4
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.
Right, changed it
@@ -313,6 +320,13 @@ func (s *systemSCProcessor) ProcessSystemSmartContract( | |||
} | |||
} | |||
|
|||
if s.flagInitStakingV4Enabled.IsSet() { |
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.
this will be called only on the epoch when we activate the staking v4. Is this correct?
Do we need this flag to execute something only on the activation epoch?
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.
Yes. This is the expected behavior. We only want these actions to happen only once, hence the name StakingV4InitEnableEpoch.
On this epoch, the only thing we want is to move all nodes from staking queue to auction list ("remove" waiting list).
Starting next epoch, using another flag -StakingV4EnableEpoch- we will start sorting auction nodes based on top up.
Reason being that we only want to "empty" the staking queue only once
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.
Great!
Auction list