-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: bond enough aleo but make a delegate address be a validator #2185
base: testnet3
Are you sure you want to change the base?
Conversation
TODO: In this scenario, when A delegates 1 million to B for B to become a validator, if C also delegates 100,000 to B, and A withdraws 100,000 (assuming B's remaining amount is still greater than or equal to 1 million), it may result in C being unable to withdraw the delegated amount. |
Some solution: // The committee_state struct tracks the total stake of the validator, and whether they are open to stakers.
struct committee_state:
// The amount of microcredits bonded to the validator, by the validator and its delegators.
microcredits as u64;
// The boolean flag indicating if the validator is open to stakers.
is_open as boolean;
// The delegate address of the validator bft.
delegate_address as address; add a parameter delegate_address in committee_state, when A delegates 1 million to B for B to become a validator. A is delegate_address, check the microcredits gte 1 million when delegate_address unbond |
Can you answer the following concerns:
|
Thanks for your response. The purpose of this Pull Request is to split the validator address into owner and worker addresses.
|
There might be better ways to make modifications, but in order to keep code changes minimal, the original logic has been reused. |
Signed-off-by: swift-mx <huangxinheng@storswift.com>
Motivation
Bond enough aleo but make a delegate address be a validator. solve the problem of asset security for Validators.