Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upgo-kosu: implement validator removal and subcommand #190
Conversation
This comment has been minimized.
This comment has been minimized.
|
@hrharder I'm tagging this as a WIP cause there's still some details that I'd like to discuss with you. |
This comment has been minimized.
This comment has been minimized.
|
Great, this looks good so far Gus! I will play around with it today. |
This comment has been minimized.
This comment has been minimized.
|
cool, let me know how it goes |
This comment has been minimized.
This comment has been minimized.
Looks like the git-gods listened, all appears to work! Great job :) |
|
This looks good to me, the only outstanding issue I see is dealing with confirmed witness Tx's. We'll have to figure out the best way to safely prune them. Perhaps during execution of each new WitnessTx, we check if there are any in the store that are more than N blocks old, and if so, we can assume they will never be confirmed (or already have been) and can delete... Just an idea. We can discuss elsewhere. |
This comment has been minimized.
This comment has been minimized.
|
@hrharder do you think we should implement |
This comment has been minimized.
This comment has been minimized.
|
I agree, let's merge this in and delegate that to a new PR. |
gchaincl commentedJul 25, 2019
Overview
Implements validator removal and `kosu-cli tx update-validator sub-command. Useful to test this scenario.
Description
Given an incoming Validator Tx we check the amount:
- if == 0: use the corresponding validator's power to confirm the tx and update the balance with 0
- if != 0: use the tx amount as confirmation power.
validators updated with 0 balance will be removed from the store
Testing
To test this, a new command has been introduced:
kosu-cli tx update-validator <block> <pubkey> <address> <power> [flags]: