Withdrawal addr should be able to call logout
See original GitHub issueIssue
Currently, a validator must call logout
using their validation key. If the validator loses their validation key, they can never get their deposit back. Allowing logout
to be called from the validator’s withdrawal addr provides a backup in case of any issue that might arise with their validation key.
This is a simple addition that will ultimately provide a better validator experience and will likely encourage validation through reduced risk.
Proposed Implementation
- change logout to assert that either ‘the msg sender is withdrawal_addr’ or ‘logout_msg is signed by the validators validation key’
- add tests demonstrating both of these methods (including when both!)
Code should look something like the following:
@public
def logout(logout_msg: bytes <= 1024):
sighash: bytes32 = extract32(raw_call(self.SIGHASHER, logout_msg, gas=self.SIGHASHER_GAS_LIMIT, outsize=32), 0)
values = RLPList(logout_msg, [int128, int128, bytes])
validator_index: int128 = values[0]
epoch: int128 = values[1]
sig: bytes <= 1024 = values[2]
assert self.current_epoch >= epoch
from_withdrawal: bool = msg.sender == self.validators[validator_index].withdrawal_addr
assert msg.sender == from_withdrawal or self.validate_signature(sighash, sig, validator_index)
...
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
FTX Security Features
A white listed address requires that all withdrawals go to predesignated whitelisted addresses. You can whitelist addresses saved to your main ...
Read more >Adding and confirming a new cryptocurrency withdrawal ...
If you are looking for information on adding and confirming a new cryptocurrency withdrawal address on Kraken Pro, you can find out how...
Read more >360000710185-Security-tools-available-from-HitBTC
This brand new feature lets you create a list of approved addresses to withdraw your funds to. It is a great tool to...
Read more >15 Tips to Enhance Security of Your Binance Account
Binance's “Withdrawal Address Management” feature allows you to limit the wallet addresses to which you can withdraw your funds.
Read more >Crypto.com App User Guide
Depositing Crypto. Clicking the “Transfer” button on the main screen will open the selection menu, where Deposit and Withdrawal will be available as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is also a more secure way and a better experience for users looking to interact with casper through smart contracts (i.e. multisigs or vaults), as it enable to run a validator and manage the funds with completely separate logics and keys. I like it.
@paulhauner No worries. I have stopped working on it. You can claim the bounty.