One-Click PoS Pool deployment

One-Click PoS Pool deployment – TIER 1 (4 200$)

APPLICATION INTRODUCTION:
As explained on the Conflux Technical Grant Proposition page (https://confluxglobal.notion.site/One-Click-PoS-Pool-deployment-64ab57df915844f9ad871bad6d96f20b).
Setting up a PoS pool is challenging. One needs to run a node, deploy and configure contracts on Core Space and eSpace, verify contracts, hosting the UI, etc. In this grant, we ask you to create a tool that automates this process.

PURPOSE OF THE SYSTEM:
The strategic objective of this grant is to make PoS pool deployment easier and through this, to lower the entry barrier. Project’s source code and created docker images will be open source and available on GitHub. Docker images will be available to use with docker directly via Docker hub (Easy to install).

SCOPE OF THE SYSTEM:
Application will be public and accessible to all. Deployed on Docker Hub for easy access and source code and docker images to GitHub repository.

REQUIREMENTS:
Functionalities include but are not limited to:

  • Run a Dockerized conflux-rust node with the appropriate configuration. This includes proper syncing (https://github.com/conflux-fans/archive-tool), PoS registration, etc.
  • Automatically deploy, configure, and verify pool contracts on both Core Space and eSpace.
  • Run a Dockerized preconfigured version of the PoS pool UI.

The contracts and UI should use the reference implementation with no modification: https://github.com/conflux-fans/pos-pool. The node should use the Dockerized conflux-rust distribution: https://hub.docker.com/r/confluxchain/conflux-rust.

DEFINITIONS, ACRONYMS, AND ABBREVIATIONS:
Conflux PoS Pool One-Click deployment, one-step install docker image, Proof-of-Stake Staking Pool installation

TEAM:
Team consists of only myself. I’ve been a fullstack developer for 22 years and also a web3 dev for few months now. I’m doxxed to Conflux Team, but choose to remain anonymous to public. I’ve built:

  • Hundreds of Docker images from scratch and I use them also frequently with my private business and they have been stable in production for many years now.
  • Conflux Core Space and ESpace faucets:
    https://conflux-faucets.com (Frontend and Tx maker are open source and on Github)
  • Webomatic NFT Rarity Tool:
    https://rarity.webomatic.fi/ (Frontend’s JS will be on Github later on, but otherwise it’s closed source)
  • I also run PoS node and have built the website for Webomatic Conflux Proof-of-Stake Pool, this is running on a Docker instance:
    https://pos.webomatic.fi/ (Open Source, Github)
  • Webomatic tools website:
    https://webomatic.fi

Also here is my Twitter account: https://twitter.com/nioctla
and my GitHub page: https://github.com/ni0c/

TOTAL BUDGET AND FUNDING TIER:
The approximative budget is 100$ x 42h (5 full days) for work and maintenance = Total of 4200$ (TIER 1)

CURRENT FUNCTIONALITY:
Users can create PoS pool to Conflux Core Space and Conflux ESpace with ease using a ready-made Docker image or via using GitHub repository Dockerfile (source code).
One should be able to add parameters for DOCKER RUN: private keys, pool address, pool regist data, pool UI web address, etc. Trouble shooting should be the key here, there will be many failure states that need to be handled.

PERFORMANCE:
The main deliverable is a Docker image (and Dockerfile). A user can execute script in the docker image on a cloud provider like AWS or on their local machine after providing some basic info (e.g. private key), and then the script should execute the setup automatically. Docker image will need some maintenance to keep it secure and with the latest updates.

PACKAGING:
Source code + documentation = Github (open source). Easy to use Docker image on Docker Hub.

LEGAL / LICENSING:
Apache License 2.0

DEVELOPMENT ROADMAP:

  • Initialization of the project (Github, Docker Hub, Documentation) : 4 hours
  • Development of the project (Docker image, scripts, testing): 34 hours
  • Release of the project (Docker Hub, GitHub) : 2 hours
  • Maintenance for 1 year (Docker image GitHub and Docker Hub): 2 hours

SPECIFICATION OF THE SOFTWARE:

  • Docker (last stable version)
  • Node.js (last stable version)
  • Bash (last stable version)
  • PHP-CLI (7.4+ / last stable version) (possibly used for scripting, if BASH is not enough)

The created Docker image will be very lean, and probably will be using stable Debian Node LTS repository as it’s base.

MAINTENANCE CONSIDERATIONS:
I will maintain the GitHub for 1 year and the Docker Hub repository along with it. It is possible to transfer the owner role of the Github repository to Conflux member in future if necessary.

2 Likes

Thanks, Nio for applying for this grant.
To make a very easy-to-use deployment tool, there are some details to consider.

For running a PoS node:

  1. Easy to get the sync status of conflux-rust node, better a page to show whether in catup-mode, how many epochs are left behind, if the sync is stuck how to figure out the reason and etc.
  2. The docker image should be easy to configure
  3. Should enable maintainer to backup and switch new pos_key
  4. Should easily upgrade to new version conflux-rust node and avoid pos node is force retired

For PoS pool contract deployment:

  1. Automatically get PoS register data, deploy and configure contract, and verify it in conflux scan
  2. Provide an easy way to update pool config, for example, lock period, pool share ratio, claim pool interest
  3. Provide an easy way to handle pos pool forceRetired situation
  4. Provide an easy way to upgrade pos pool contract

There should also a monitor service to monitor pos node status, eSpace pool syncer account balance monitor etc.

I’m the solidity developer of conflux-fans/pos-pool, if you have any questions you can contact me

2 Likes

Thanks JiuhuaDao for the suggestions,

For running a PoS node:

  1. Easy to get the sync status of conflux-rust node, better a page to show whether in catup-mode, how many epochs are left behind, if the sync is stuck how to figure out the reason and etc.

PoS node handling will require also some user interaction and administration, but I think the most basic situations should be able to be handled with the Docker image’s scripts and ofc it can be extended by Conflux team if necessary. And the catch-up mode and current epoch and possible errors could be easily gotten to a simple dynamic web page there for the user to review.

  1. The docker image should be easy to configure

Scripts will handle user input and do different commands. And there will be ready-made docker exec scripts for handling the container too.

  1. Should enable maintainer to backup and switch new pos_key

Yes, this is in the plans and will be added.

  1. Should easily upgrade to new version conflux-rust node and avoid pos node is force retired

Upgrading should be easy, as it’s a docker image with data dirs separated. PoS node force retirement handling will be in the scripts, but ofc the user must execute it by himself via scripts.

For PoS pool contract deployment:

  1. Automatically get PoS register data, deploy and configure contract, and verify it in conflux scan

This will be in the scripts. And user can also give old pos key and pos regist data if he has an old node and keys he wants to use.

  1. Provide an easy way to update pool config, for example, lock period, pool share ratio, claim pool interest

These also will be in the scripts and will be easy to use. I will use some of the existing code available also whenever possible and combine them with the new automation scripts.

  1. Provide an easy way to handle pos pool forceRetired situation

As answered above on #4.

  1. Provide an easy way to upgrade pos pool contract

This will also be in the scripts. It will need to first update the sources from github and then script would automate the rest of the pos pool contract update process.

There should also a monitor service to monitor pos node status, eSpace pool syncer account balance monitor etc.

I agree. I will probably add an automated cronjob that will monitor the service and also have a simple dynamic web page to see the status too, and maybe an email alert if there are issues.

I’m the solidity developer of conflux-fans/pos-pool, if you have any questions you can contact me

Thanks, I will be in contact!

1 Like

Hello @nio thanks for applying for this grant. I have some questions:

  • What would be the basic requirements (hardware and knowledge) for a user to use the platform?
  • Knowing that there is another applicant for this grant, which is offering to do it for a total of $3000. Do you think you can reduce the requested budget in this proposal and make it more cost efficient?
    Thanks,
1 Like

Thanks @0xn1c0 for the questions,

What would be the basic requirements (hardware and knowledge) for a user to use the platform?

User should know Docker basics and Linux CLI basics. Everything is automated with scripts and there should be a script for almost every use case (as mentioned in earlier messages above). The user should also understand how the Conflux Proof-of-Stake pool works and know how to fix their Computer hardware or how to run their cloud instance.
But all-in-all the docker image and it’s scripts should be very newbie friendly.

Knowing that there is another applicant for this grant, which is offering to do it for a total of $3000. Do you think you can reduce the requested budget in this proposal and make it more cost efficient?

I dropped the budget from $5,000 to $4,200. I think it should be reasonable as the developed deployment system will be quite advanced with it’s own debugging web server and will have many troubleshooting cases that it needs to handle and will require also extensive testing.
I have encountered many issues myself running the Webomatic PoS Pool already. I also run two Conflux mining nodes and one Chia farming and mining node. So I have extensive knowledge of the Conflux ecosystem, pools and nodes as a whole.

1 Like

Is there any update on your design or apply?

1 Like

Hey @jiuhuaDAO , Thanks for your questions.

I havent started building the one-click PoS pool yet as the grant hasnt been approved yet. I’ve been building monitoring solution for the Webomatic PoS pool’s two nodes (main node and backup node). It will automatically handle many cases, for.ex. a case that main node goes down - the monitor will attempt to switch to backup node automatically. I can add this design to the One-Click PoS pool implementation of PoS node monitoring capabilities.

PS. I see multiple issues on the other candidates implementation there. Security related issues and other issues. Not production-viable material there.

Hello @nio. This monitoring solution you mention sounds interesting. Would including that on this proposal impact the requested budget?
Could you please elaborate more on the issues you found on the other candidates implementations?

1 Like

Hello @0xn1c0, thanks for your questions.

This monitoring solution you mention sounds interesting. Would including that on this proposal impact the requested budget?

The implementation for automatic monitoring and node handling is included in the current budget, so no change in the budget for that.

Could you please elaborate more on the issues you found on the other candidates implementations?

There is multiple issues as said earlier. Also very flawed implementation overall. I wouldnt use it in production.
You shouldnt run the containers with root privileges for starters. Other issues with how things are run in the containers, is very much flawed too. Overall not usable containers in general. Also too many containers to maintain for a beginner - so it’s basically a not “one-click” easy install at all.

My solution will be easier to use and more user-friendly, and also a lot more secure and feature rich.

As said I’ve been running a cluster of servers running docker containers - stable - for 4 years now and counting for my private business. I’ve built the docker containers from scratch and have for.ex. clustered databases, load balanced web servers running in production all custom made. So Docker and building secure containers is something I know very well.

1 Like

As we noticed the web-o-matic Pool has encountered several forceRetired issues, what was the reason for that?

In contrast, the GS Pool looks pretty stable from the PoS beginning

Hello @jiuhuaDAO, thanks for your questions.

We have talked about these issues with you and Peter in Discord few months earlier, but I’ll go through them again;
The first two force retirements were created by bugs in Conflux node software, which drove the node into a failure state and thus the 1 hour window for force retirement were hit.
And the last one was broken hardware - motherboard and CPU fried, troubleshooting the issues took many hours, even with spare parts.
Also there was no backup node available at those 3 times when the main node went down.

Currently I’m setting up the backup node and building the system for automatic switchover when main node might fail and the monitor would hand over the voting to backup node automatically.

I think these issues with the Webomatic node make me better candidate itself to handle this case though, as I’ve seen many failure cases and have logs available. Troubleshooting will be the key for running the node successfully. I think there is very minimal or basically non-existent troubleshooting cases handled in the other authors work.