-
Notifications
You must be signed in to change notification settings - Fork 18
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
First step to remove legacy #153
Conversation
5fe11d2
to
ee173ff
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6240448509 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6240454444 check. |
ee173ff
to
0abb1ea
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6240532295 check. |
0abb1ea
to
b66fbee
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6240566891 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6241090131 check. |
0a3597d
to
2f8aa67
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6241411525 check. |
2f8aa67
to
7b4c2ae
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6241675809 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6266194951 check. |
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6267918668 check. |
0b123a6
to
92c1376
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6343895490 check. |
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.
Would we want to do legacy removal as a potential EPIC branch instead of stages going into main
? Or are there merge conflicts concerns of such a wide-reaching changes being in a separate branch for too long?
It's not really an EPIC, because next PR will be done only after upgrading code to this one and unstake all legacy. |
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6353000229 check. |
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.
First pass
function stakeNu( | ||
address stakingProvider, | ||
address payable beneficiary, | ||
address authorizer | ||
) external; |
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.
🪓
// slither-disable-next-line constable-states | ||
uint96 private legacyStakeDiscrepancyPenalty; | ||
// slither-disable-next-line constable-states | ||
uint256 private legacyStakeDiscrepancyRewardMultiplier; |
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.
What about removing these variables? Taking into consideration, of course, that they currently occupy a slot in the proxy storage layout.
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.
That is whole point to have them - to not break slot layout for upgrades
address indexed stakingProvider, | ||
address indexed oldOwner, | ||
address indexed newOwner | ||
); |
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 feels refreshing
VendingMachine _nucypherVendingMachine, | ||
KeepStake _keepStake | ||
) { | ||
constructor(T _token, VendingMachine _nucypherVendingMachine) { |
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.
So clean!
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6632026461 check. |
094b765
to
676cb41
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6813151919 check. |
…ng authorization is possible only using T amount, disabled slashing for legacy stakes, keep unstaking for legacy stakes
Co-authored-by: Derek Pierre <[email protected]>
Co-authored-by: David Núñez <[email protected]> Co-authored-by: Łukasz Zimnoch <[email protected]>
676cb41
to
1bc2a56
Compare
Solidity API documentation preview available in the artifacts of the https://github.com/threshold-network/solidity-contracts/actions/runs/6864773014 check. |
After #153, which drop support for legacy stakers, TokenStaking constructor requires less arguments
After #153, which drop support for legacy stakers, TokenStaking constructor requires less arguments
Removes most of legacy support: staking Keep/Nu, top-up Keep/Nu, increasing authorization to more than T stake.
Also adds method to deauthorize+unstake legacy stakes in one tx using involuntary decrease call. This method is permissionless.
Description of how this all would work can be found here #141. Additional to that -
forceUnstakeLegacy
method.Second step will be removing
forceUnstakeLegacy
and all other usage of legacy stakes inTokenStaking
after unstaking all legacy tokens.P.S.
stakedNu
used in NuCypherStakingEscrow
, for compatibility and will be removed at step 2 (together with link to Nu vending machine)