-
Notifications
You must be signed in to change notification settings - Fork 537
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
BEP-174: Cross Chain Relayer Management #174
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MatusKysel
reviewed
Nov 23, 2022
MatusKysel
previously approved these changes
Nov 23, 2022
Update BEP-174 with newer function changes
Update Bep 174
MatusKysel
previously approved these changes
Feb 3, 2023
brilliant-lx
approved these changes
Mar 1, 2023
jonesk7734
approved these changes
Aug 18, 2023
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.
😀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BEP-174: Cross Chain Relayer Management
1. Summary
This BEP introduces a new governance proposal type to manage the set of whitelisted Relayers.
A Relayer whitelist was introduced recently to the BSC genesis contracts (PR-198).
This BEP will improve the management of the relayer whitelist by introducing Relayer Managers, where a Relayer Manager can manage the registration of a single Relayer.
Managers will be elected and ejected via governance.
2. Abstract
This BEP introduces a new governance proposal type to manage Relayer Manager public keys that will be stored in the
RelayerHub
genesis contract on BSC.Relayer Managers will be able to manage their individual relayer public key. Only Relayer public keys registered via Managers will be able to invoke the
RelayerHub
smart contract for cross chain transfers.3. Status
This BEP is under progress. See bnb-chain/bsc-genesis-contract#205.
4. Motivation
After the BSC Bridge exploitation it is important we introduce some mechanism in place that enhances the security of the system. A governance based set Manager public keys who manage a single Relayer adds an extra layer of security.
5. Specification
5.1 Current Relayer Whitelist
Currently whitelisted relayers are hardcoded in the
System
genesis smart contract. This list needs to be updated manually by deploying a new version of the smart contract.5.2 The New Whitelisting Mechanism
After the implementation of this BEP:
unregister
function will still be active to allow the existing whitelisted relayers to safely exit.5.3
RelayerHub
Smart Contract ChangesRelayer Manager functions
The pre-existing function will be updated to support
addManager
andremoveManager
keys to facilitate adding and removing of managers via governance.Allows a manager to remove himself if required.
Adds a Manager public key to the current set of Managers. This is only called via governance. Emits an event on success.
This can be used by the manager to add or remove its relayer. Overwrites Relayer if there is an existing Relayer already added. Emits an event on success. The
relayerToBeAdded
parameter can be set to0
address to enable removal of a relayer (e.g. if the private key gets compromised).This is to ensure smooth transition so that the presently existing hardcoded whitelisted relayers continue to be relayers after the hardfork. This function needs to be manually called once after the hardfork.
Relayer functions
This will be called by the Relayer codebase, instead of registering. Relayer can stop if this returns false
updateParam
ChangesThe
updateParam
function will be modified accept two new keysaddManager
to add a Manager to the stored Manager set.removeManager
to remove a Manager from the stored Manager set.Also
requiredDeposit
anddues
will be removed. So no need to account for them in the keys check.Functions to be Deprecated
These Relayer functions will be deprecated:
unregister()
function isn't deprecated to allow existing hardcoded whitelisted relayers to have safe exit.5.4 Relayer Changes
Update Relayer codebase to no longer register and deposit. Update abi? and run code generation to call new
verifyRelayer
method onRelayerHub
smart contract and proceed to relay cross chain messages on success.5.5 Existing relayer key migration
Manager keys will need to be supplied for the existing two relayers. Manger set will be seeded with these two Manager public keys. Relayer public keys will be registered to these Managers.
Existing Relayers will need to pull down relayer code once the
RelayerHub
SC has been upgraded.5.6 CLI commands
The commands used to create a change proposal to governance.
7. License
The content is licensed under CC0.