Skip to content
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

[Delegation] New smart contract for testnet #412

Open
rattrap opened this issue Mar 21, 2023 · 1 comment · May be fixed by #427
Open

[Delegation] New smart contract for testnet #412

rattrap opened this issue Mar 21, 2023 · 1 comment · May be fixed by #427
Assignees
Labels
enhancement New feature or request

Comments

@rattrap
Copy link
Contributor

rattrap commented Mar 21, 2023

What we need

We need a new smart contract to replace the current backend implementation of registering nodes to the testnet.

Why we need it

On the testnet we always want to have majority. We need this in order to be able to upgrade quickly.

Right now, there is a backend app that, when registering a new testnet node, delegates double the amount of stake to our validators first and then registers the node.

This fails often times and is slow because we need to wait 1 block after each delegation request.

How we do it

We create a new smart contract that contains the following methods:

  1. Constructor - Needs to take in a list of validator wallets (our own validators)
  2. Add Own Validator - When we have a new validator own node
  3. Register - This is the main method that first delegates 2 x tokens to our validators and then registers the validator in the DPOS contract

This will be deployed automatically in the genesis block.

@rattrap rattrap converted this from a draft issue Mar 21, 2023
@rattrap rattrap added the enhancement New feature or request label Mar 21, 2023
@rattrap rattrap changed the title [Delegation] New contract for testnet [Delegation] New smart contract for testnet Mar 21, 2023
@VargaElod23
Copy link
Contributor

VargaElod23 commented Mar 28, 2023

Some clarifications/comments:

  • The registerValidator() method will be called by the testnet node's owner, right?
  • Will we provide a faucet and make the method payable so that the flow is "classic" or just delegate the testnet tokens from the smart contract directly to the DPOS contract?
  • Contract needs to get a substantial amount of tokens during construction.

@rattrap rattrap moved this to Todo 📝 in Ecosystem Team Planning Apr 4, 2023
@VargaElod23 VargaElod23 moved this from Todo 📝 to Ready for review 💬 in Ecosystem Team Planning Apr 7, 2023
@VargaElod23 VargaElod23 linked a pull request Apr 7, 2023 that will close this issue
@Malak67 Malak67 closed this as completed Oct 9, 2023
@Malak67 Malak67 reopened this Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready for review 💬
Development

Successfully merging a pull request may close this issue.

3 participants