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

Threebot deployer #1428

Closed
4 of 10 tasks
DylanVerstraete opened this issue May 9, 2023 · 4 comments
Closed
4 of 10 tasks

Threebot deployer #1428

DylanVerstraete opened this issue May 9, 2023 · 4 comments
Assignees

Comments

@DylanVerstraete
Copy link
Contributor

DylanVerstraete commented May 9, 2023

We want to have a deployer app that can deploy a web3 proxy (threebot) for a user.

Components:

  • Threebot UI (not ready yet)
  • Threebot server (web3 proxy)
  • Deployer App

Key management

The threebot will be controlled with an ethereum wallet, in this case it will be Metamask extension. Authentication to the threebot will be controlled with this metamask wallet. When the Threebot is created, the public key a wallet in metamask will be passed for future verficiation. When a user want's to interact with the Threebot (Modify state) he needs to sign a random message that is generated on the server authenticate(message, signature) and sent this back to the server.

Additional keys

  • Tfchain key
  • Stellar key

Both keys will be generated before the Threebot is created. The tfchain key will be used to create the threebot deployment.
We need the following flow before we can deploy a Threebot:

  • Create tfchain key
  • Fund with activation service
  • Accept terms and conditions
  • Create a twin

When this flow is completed, the deployer can use the tfchain to deploy the Threebot. Once deployed, the user will have 1 hour to fund the tfchain address with additional tokens until his contract is put into grace state (automically done by the billing)

Deployment variables to deploy a Threebot:

  • ETH_PUBLIC_KEY
  • TFCHAIN_KEY
  • SSH_KEY

To do:

  • add environment variables to the go server ETH_PUBLIC_KEY and TFCHAIN_KEY and SSH_KEY
  • modify state in tfchain package to load an account from ETH_PUBLIC_KEY environment variable if no key is passed in the request
  • add authenticate flow
    • generate random message
    • user signs message in threebot UI with metamask
    • server verifies signature and message based on the ETH_PUBLIC_KEY, this then allows the user to modify state (need to indentify which state calls these are)
  • deploy flow
    • create tfchain account and do activation flow
    • deploy Threebot and reserve a name on a webgateway
    • give user a summary + ssh endpoint ?
@DylanVerstraete
Copy link
Contributor Author

@Mahmoud-Emad
Copy link
Contributor

The Threebot-Deployer implemented in https://github.com/threefoldtech/threebot-deployer

@xmonader
Copy link
Contributor

The story is pending on the flist, right now the website uses an ubuntu flist.

@xmonader
Copy link
Contributor

i'll move that to web_proxy project

@xmonader xmonader removed this from the 3.10 milestone May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants