From f1ef579c82af11873fd0e5c7bff4d11b126d8d40 Mon Sep 17 00:00:00 2001 From: Ethan Date: Thu, 18 Jul 2024 14:44:07 +0800 Subject: [PATCH] fix: add more description for bep 410 --- BEPs/BEP-410.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/BEPs/BEP-410.md b/BEPs/BEP-410.md index 5eabc11c..f72e228d 100644 --- a/BEPs/BEP-410.md +++ b/BEPs/BEP-410.md @@ -11,9 +11,9 @@ - [BEP-410: Add Agent for Validators](https://github.com/bnb-chain/BEPs/pull/410) - [1. Summary](#1-summary) - [2. Abstract](#2-abstract) - - [3. Status](#3-status) - - [4. Motivation](#4-motivation) - - [5. Specification](#5-specification) + - [3. Motivation](#3-motivation) + - [4. Specification](#4-specification) + - [5. Reference Implementations](#5-reference-implementations) - [6. License](#6-license) @@ -27,18 +27,14 @@ Currently, validators need to manage the operator key, consensus key, and vote k When creating a validator, the operator key is also used for self-delegating with more than 2001 BNB. Since the operator key holds a large amount of staking, it is not suitable for daily management of the validator. Therefore, we have introduced a new `updateAgent` interface in the system contract. Through this interface, the operator can delegate another account to manage the validator. -## 3. Status - -This BEP is in progress. - -## 4. Motivation +## 3. Motivation Before this BEP, the consensus address, commission rate, validator description and vote address can only be changed by the operator which also manages staking for the validator. To reduce the usage of operator key and improve the security of operator key management, validators can set an agent to help them to take on the mentioned tasks below. -## 5. Specification +## 4. Specification ### Data Structure -The current `Validator` struct is as follows. +The current [`Validator`](https://github.com/bnb-chain/bsc-genesis-contract/blob/2dbebb57a0d436d6a30b78c1f123395035249035/contracts/BC_fusion/StakeHub.sol#L154) struct is as follows. ```solidity struct Validator { address consensusAddress; @@ -81,6 +77,7 @@ struct Validator { The validator operator can set the agent address for the validator by calling the following function. The `newAgent` cannot be any operator address or any existing agent. +Each validator can only have one agent assigned at a time. Updating to a new agent will override the previous one. ```solidity function updateAgent(address newAgent) external validatorExist(msg.sender); @@ -98,6 +95,11 @@ The methods that can be accessed are as follows: function editVoteAddress(bytes calldata newVoteAddress, bytes calldata blsProof) external; ``` +It is notable that even after the agent is set, the operator retains the ability to edit the information listed below. + +## 5. Reference Implementations +See https://github.com/bnb-chain/bsc-genesis-contract/pull/568. + ## 6. License