Herramienta de estado del Super Staker

Qtum Español
5 min readFeb 9, 2021

--

Como algunos de los Qtum Super Stakers obtienen cada vez más delegaciones, aquí hay una herramienta para analizar las UTXO del staker y sus delegados. Todos los pasos para ejecutar la herramienta se muestran en este video blog.

Introduccion

gastadas). Estos UTXO son las “monedas” que se apostan como prueba de participación. Hay algunas restricciones de tamaño mínimo en los tamaños de UTXO para staking y algunas optimizaciones disponibles para UTXO que no son demasiado grandes. Los Super Stakers deben tener un inventario de 100 UTXO del tamaño de QTUM (o un tamaño mayor) para staking por las direcciones delegadas. Super Stakers de forma predeterminada apostará UTXO de dirección delegada de al menos 100.0 QTUM. Las UTXO más pequeñas en una dirección delegada no serian staked. El comando “dividir” dimensionará los UTXO de forma adecuada.

La herramienta de estado utiliza la API qtum.info (Interfaz de programación de aplicaciones) para recuperar información sobre un super staker y sus delegados. Puede ver la documentación sobre esta API en la Referencia 1.

La herramienta utiliza una secuencia de comandos de Python para realizar consultas a la API y procesar los resultados. Python es un lenguaje informático conocido por una amplia gama de bibliotecas y complementos disponibles, con el lema “baterías incluidas”. Puede descargar e instalar Python desde https://www.python.org/downloads/ El programa de script Python está disponible en GitHub en https://github.com/JB395/SuperStakerCheckup

Instalando Python

Cómo funciona la herramienta de estado

La herramienta de estado lee un archivo de configuración al inicio. Edite este archivo de texto para establecer la dirección y la tarifa de Super Staker. Coloque este archivo en el mismo directorio con la secuencia de comandos de Python.

# SSCConfigurationFile 2020–12–26

“StakerAddress”: QTJD…, # dirección de Super Staker

“StakerFee”: 3, # tarifa requerida para Super Staker

“StakerMinUTXOSize”: 100, # tamaño predeterminado para la mayoría de los Super Stakers

“IsMainnet”: verdadero, # o falso para testnet

La herramienta realiza una llamada a la API para obtener la información de Super Staker y llamadas a la API para obtener la información de cada dirección delegada. El trabajo principal de la herramienta es evaluar el tamaño y la madurez de cada UTXO para ver si cada UTXO es 1) maduro (tiene al menos 500 confirmaciones) y 2) cumple con los requisitos de tamaño para staking.

La herramienta recorrerá y evaluará todos los UTXO para una dirección con este pseudocódigo:

si el UTXO es maduro {

agregar al peso total para esta dirección

agregar al recuento de UTXO maduros para esta dirección

}

de lo contrario, si el UTXO es demasiado pequeño {

agregar al total para UTXO demasiado pequeñas

agregar al recuento de UTXO demasiado pequeñas

}

else {

agregar al total de UTXO inmaduros

agregar al recuento de UTXO inmaduros

}

Mature UTXOs give the “weight” of UTXOs currently staked, UTXOs that are too small will always be too small and never be staked, and the immature UTXOs will mature after 500 confirmations and add to the staking weight and are typically new coins or staked coins.

The steps are:

  1. install Python
  2. download the Python script and configuration file from GitHub
  3. edit the configuration file to set a Super Staker of interest
  4. right-click the Python script file and launch with the Python editor “IDLE” (Reference 2)
  5. run the program and review the results on the screen

A typical result would be:

SuperStakerCheckup 2021–01–18

Configuration file SSCConfigurationFile.txt:

Staker Address QTJDT…, Staker Fee 3, Staker Min UTXO 100, is Mainnet True

Mainnet height 777320

Super Staker QTJDT…

Number Valid UTXOs = 257 Sum Valid UTXOs = 25704.36070569

Number Immature (probably staked) UTXOs = 6 Sum Immature (probably staked) UTXOs = 608.48315254

Number Too Small UTXOs = 0 Sum Too Small UTXOs = 0.0

Number Total UTXOs = 263 Sum Total UTXOs 26312.84385823

Percent Stake to Total = 2.312494825030787

Delegate QLo9J… Fee 3

Number Valid UTXOs = 4 Sum Valid UTXOs = 456.28494585

Number Immature UTXOs = 0 Sum Immature UTXOs = 0.0

Number Too Small UTXOs = 4 Sum Too Small UTXOs = 7.97643255

Number Total UTXOs = 8 Sum Total UTXOs 464.2613784

Delegate QM29f… Fee 3

Number Valid UTXOs = 1 Sum Valid UTXOs = 132.55552601

Number Immature UTXOs = 0 Sum Immature UTXOs = 0.0

Number Too Small UTXOs = 1 Sum Too Small UTXOs = 0.1267916

Number Total UTXOs = 2 Sum Total UTXOs 132.68231761

<snip>

Number of valid Staker UTXOs (mature + immature) 263

Number of delegates being staked 33

Delegates weight 220148.20535546

The Super Staker result “Percent Stake to Total = 2.31…” shows the current percent of stake for the staker. If this percentage goes up to 50% to 80% the staker should add more UTXOs (depending on the staker situation). If this number approaches 100% the staker will lose block rewards is should have otherwise won.

The tool gives various suggestions about the UTXOs sizes where they should be adjusted. Delegate address users can use the tool to make sure their delegation doesn’t have any of these suggestions:

FEE TOO HIGH — delegate paying a higher fee than the Super Staker requires

SHOULD SPLIT UTXOS — delegate with > 100 total for too small UTXOs, should “split” these into a larger stakeable UTXO

FEE TOO LOW, NOT STAKED — a delegate with a fee below what the Super Staker will accept

There are two suggestions for the super staker:

UTXO(s) >= 200 SHOULD BE SPLIT — Super Staker should split UTXOs

SMALL UTXOs SHOULD SPLIT (RECOMBINED) — Super Staker has enough small UTXO value to recombine

References

1. qtum.info API https://github.com/qtumproject/qtuminfo-api#qtuminfo-api-documentation

2. Python — A first introduction to the Python IDLE Interface https://youtu.be/bOvqYw1SZJg

3. GitHub repo for Super Staker Checkup Tool https://github.com/JB395/SuperStakerCheckup

4. Delegated Address FAQs https://blog.qtum.org/delegating-address-faqs-5958e8b79e72

5. Command Sequence

Install Python

1. Navigate to https://www.python.org/downloads/ or search “download python”

2. Click the “Download Python n.n.n” button, or the version for your computer, and click to open the downloaded installer .exe file.

3. Check the “Add Python 3.9 to PATH” box and “Install Now”.

4. Setup was successful, click “Close”.

Download Python Script

5. Make a folder on desktop “Python Source”

6. From https://github.com/JB395/SuperStakerCheckup select Code and Download ZIP.

7. Copy the downloaded file SuperStakerCheckup-main.zip into the Python Source folder and unzip it (right-click, Extract All).

Get a Super Staker to Check

8. From the Super Staker list https://stake-a-thon.qtum.org/ copy a Super Staker address and note the fee.

9. Open the configuration file with Note and edit the staker address and fee. Save the file.

Run the Python Program

10. Right-click the Python script file, select “Edit with IDLE”

11. On IDLE select Run — Run Module to run the program

--

--

No responses yet