{"id":26163977,"url":"https://github.com/stratisproject/lss-ejector","last_synced_at":"2025-03-11T14:55:01.202Z","repository":{"id":279428791,"uuid":"924689681","full_name":"stratisproject/lss-ejector","owner":"stratisproject","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-25T13:52:16.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T14:43:46.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stratisproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-30T13:28:03.000Z","updated_at":"2025-02-25T13:52:19.000Z","dependencies_parsed_at":"2025-02-25T14:47:00.910Z","dependency_job_id":"220c3780-5587-41b5-8ab7-8c3552b3f635","html_url":"https://github.com/stratisproject/lss-ejector","commit_stats":null,"previous_names":["stratisproject/lss-ejector"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratisproject%2Flss-ejector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratisproject%2Flss-ejector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratisproject%2Flss-ejector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratisproject%2Flss-ejector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stratisproject","download_url":"https://codeload.github.com/stratisproject/lss-ejector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243057272,"owners_count":20229174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T14:55:00.637Z","updated_at":"2025-03-11T14:55:01.194Z","avatar_url":"https://github.com/stratisproject.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Masternode Staking Setup Guide\n\nThis guide will help you set up your validator and participate in Masternode Staking. By following these steps, you'll stake your STRAX tokens, receive liquid staking tokens (**mSTRAX**), and use them as collateral on the Masternode dApp—earning dual rewards as both a validator operator and a Masternode participant.\n\n----------\n\n## Overview of Components\n\nUnderstanding the role of each component is key to a successful setup:\n\n### 1. Ejector Service\n\nThe **Ejector Service** acts as an intermediary between your validator and the staking network. Its primary functions include:\n\n-   **Withdrawal \u0026 Emergency Handling:** Managing withdrawals and addressing validator issues automatically.\n\n### 2. Staking Deposit CLI Tool\n\nThe **staking-deposit-cli** tool is used for generating validator credentials and deposit data. Its key tasks are:\n\n-   **Key Generation:** Creating a secure mnemonic and generating unique validator keys (keystores).\n-   **Deposit Data Creation:** Producing JSON files that serve as proof of deposit and link your validator to the staking protocol.\n\n### 3. Stratis Launcher\n\nThe **Stratis Launcher** simplifies the process of configuring and managing your validator host. You can set up your validator host using the latest release from the [stratis-node repository](https://github.com/stratisproject/stratis-node). It provides:\n\n-   **User-Friendly Interface:** A simple platform for uploading validator keys and managing staking operations.\n-   **Validator Management:** Automated configuration and integration of the required components.\n-   **Monitoring \u0026 Updates:** Real-time insights into validator status, performance, and rewards.\n\nThese components work together to create a robust and secure environment for Masternode Staking.\n\n----------\n\n## Prerequisites\n\n-   **SSH Access:** Ensure you have SSH access to your host.\n-   **Basic Linux Knowledge:** Familiarity with terminal commands is recommended.\n-   **STRAX Tokens:** You will need 1,000,000 STRAX for Mainnet staking (or 100,000 tSTRAX for testing via the [Stratis EVM Faucet](https://faucet.stratisevm.com/)).\n\n----------\n\n## Step 1: Setting Up Your Validator Host\n\nBefore using the Stratis Launcher, SSH into your host and follow these steps:\n\n### A. Install System Dependencies\n\nUpdate and upgrade your packages, then install the required dependencies:\n\n```bash\napt update \u0026\u0026 apt upgrade -y\napt install -y git build-essential libssl-dev zlib1g-dev libbz2-dev \\\n  libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \\\n  libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev \\\n  software-properties-common supervisor\n```\n\n### B. Install PyEnv and Python 3.10\n\n1.  **Clone PyEnv into your home directory:**\n    \n    ```bash\n    git clone https://github.com/pyenv/pyenv.git ~/.pyenv\n    \n    ```\n    \n2.  **Configure environment variables.**  \n    Add the following lines to your `~/.bashrc` or `~/.zshrc` file:\n    \n    ```bash\n    export PYENV_ROOT=\"$HOME/.pyenv\"\n    export PATH=\"$PYENV_ROOT/bin:$PATH\"\n    eval \"$(pyenv init --path)\"\n    eval \"$(pyenv init -)\"\n    ```\n    \n3.  **Reload your shell:**\n    \n    ```bash\n    source ~/.bashrc\n    ```\n    \n4.  **Install Python 3.10 and set it as the global version:**\n    \n    ```bash\n    pyenv install 3.10\n    pyenv global 3.10\n    ```\n    \n\n### C. Install Go 1.23.5\n\n1.  **Download, extract, and configure Go:**\n    \n    ```bash\n    wget https://go.dev/dl/go1.23.5.linux-amd64.tar.gz\n    rm -rf /usr/local/go\n    tar -C /usr/local -xzf go1.23.5.linux-amd64.tar.gz\n    export PATH=$PATH:/usr/local/go/bin\n    source ~/.bashrc\n    ```\n    \n\n### D. Clone Required Repositories\n\nClone the repositories that contain the tools needed for your validator:\n\n```bash\ngit clone https://github.com/stratisproject/staking-deposit-cli\ngit clone https://github.com/stratisproject/lss-ejector\n```\n\n### E. Build and Install Components\n\n#### Build staking-deposit-cli:\n\n1.  Navigate to the `staking-deposit-cli` directory:\n    \n    ```bash\n    cd staking-deposit-cli\n    ```\n    \n2.  Build and install using:\n    \n    ```bash\n    make build_linux\n    ./deposit.sh install\n    ```\n    \n\n#### Build the Ejector:\n\n1.  Navigate to the ejector directory:\n    \n    ```bash\n    cd ../lss-ejector/\n    ```\n    \n2.  Build and install the ejector:\n    \n    ```bash\n    make install\n    ```\n    \n\n----------\n\n## Step 2: Generate Validator Keys\n\n1.  **Navigate to the staking-deposit-cli directory:**\n    \n    ```bash\n    cd ../staking-deposit-cli\n    ```\n    \n2.  **Run the key generation script with the execution address parameter:**  \n    For the **beta network**, run:\n    \n    ```bash\n    ./deposit.sh new-mnemonic --execution_address 0x00A6A303B2085857f04d700DF780dcEe72fc7048\n    ```\n    \n    \u003e **Note:** This execution address is specific to the beta network. For Mainnet, as the protocol is not deployed, there is no defined execution address.\n    \n3.  You will be prompted to provide the following inputs:\n    \n    -   **Number of Validators:**\n        -   **Auroria:** The collateral requirement is 100,000 STRAX. Define **5 validators** (5 x 20,000 STRAX).\n        -   **Mainnet:** The collateral requirement is 1,000,000 STRAX. Define **50 validators** (50 x 20,000 STRAX).\n    -   **Withdrawal Recipient Address:**\n        -   For the **beta network**, **set this value to:**  \n            `0x00A6A303B2085857f04d700DF780dcEe72fc7048`\n        -   **Important:** Do not change this value or use a personal address. For Mainnet, as the protocol is not deployed, there is no address to use. Failure to set this address correctly will result in activation failure.\n    -   **Network/Chain Name:**\n        -   Enter the correct network name (e.g., `auroria` for Auroria, `stratis` for Mainnet).\n    -   **Password:**\n        -   Choose a secure password to protect your validator keystore(s).\n    \n    **Note:** The field for \"Amount a validator must deposit\" is no longer needed and should be omitted.\n    \n4.  **Important:**\n    \n    -   Record the generated mnemonic phrase and password securely.\n    -   The script will create a `validator_keys` directory and output `deposit_data.json`.\n    - Keep these safe and copy to your local machine. Later we will upload the `validator_keys` via the Stratis Launcher and the `deposit_data.json` will be used to record your validators within the Masternode Staking protocol.\n\n----------\n\n## Step 3: Configure and Run Services\n\n### A. Configure the Ejector Service Using Supervisor\n\n1.  **Create an Ejector configuration file:**  \n    Open or create the configuration file for Supervisor:\n    \n    ```bash\n    vi /etc/supervisor/conf.d/ejector.conf\n    ```\n    \n2.  **Paste the following configuration snippet (replace `\u003ckeystore_password\u003e` with your password):**\n    \n    ```ini\n    [program:lss-ejector]\n    command=lss-ejector start \\\n      --execution_endpoint=http://localhost:8545 \\\n      --consensus_endpoint=http://localhost:3500 \\\n      --keys_dir=/root/staking-deposit-cli/validator_keys \\\n      --staking_address=0x00A6A303B2085857f04d700DF780dcEe72fc7048\n    environment=KEYSTORE_PASSWORD=\u003ckeystore_password\u003e\n    redirect_stderr=true\n    stdout_logfile=/var/log/supervisor-lss-ejector.log\n    stdout_logfile_maxbytes=500MB\n    stdout_logfile_backups=10\n    autostart=true\n    startretries=10\n    stopwaitsecs=60\n    ```\n    **Important:**\n    Be sure to set your password value here: `  environment=KEYSTORE_PASSWORD=\u003ckeystore_password\u003e`\n    \n3.  **Reload Supervisor** to apply the new configuration:\n    \n    ```bash\n    supervisorctl reread\n    supervisorctl update\n    ```\n    \n\n### B. Set Up Your Validator Host via Stratis Launcher\n\nTo set up your validator host, use the latest release from the [stratis-node repository](https://github.com/stratisproject/stratis-node). \n\nThis Stratis Launcher streamlines the process of uploading your validator keys and managing staking operations. Download and install the appropriate release from the repository, connect to the host we've configured and then upload your keys via the Staking Tab.\n\n----------\n\n## Step 4: Deposit Collateral and Receive Liquid Tokens\n\n1.  **Deposit Collateral:**\n    \n    -   Navigate to the [Masternode Staking Beta](https://beta.staking.masternode.stratisevm.com/).\n    -   Deposit the required collateral (100,000 STRAX).\n2.  **Receive Liquid Tokens:**\n    \n    -   Upon deposit confirmation, you will receive an equivalent amount of liquid Masternode Staking tokens (**mSTRAX**).\n3.  **Upload Deposit Data:**\n    \n    -   Upload the `deposit_data` JSON file generated in Step 2 to link your validator with your staking deposit.\n\n----------\n\n## Step 5: Register on the Masternode dApp\n\n1.  **Deposit mSTRAX Tokens:**\n    \n    -   Visit the [Masternode dApp](https://beta.masternode.stratisevm.com).\n    -   Deposit your **mSTRAX** tokens as collateral to register on the Masternode Protocol.\n2.  **Earn Dual Rewards:**\n    \n    -   Once registered, you will earn rewards both for operating your validator and for being a member of the Masternode contract.\n\n----------\n\nBy following these detailed steps and understanding the role of each component, you'll be well-prepared to set up your validator host, configure essential services, and participate in Masternode Staking to maximize your yield.\n\n**Happy Masternode Staking!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstratisproject%2Flss-ejector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstratisproject%2Flss-ejector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstratisproject%2Flss-ejector/lists"}