Skip to content

A tool to deploy an utility that automatically claims your Kusama/Polkadot validator rewards in a Kubernetes cluster

License

Notifications You must be signed in to change notification settings

ironoa/polkadot-k8s-payouts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polkadot-K8s-Payouts

A tool to deploy an utility that automatically claims your Kusama/Polkadot validator rewards in a Kubernetes cluster.
This tool leverages on the official polkadot-payout application from Web3 Foundation.

My on-chain Identity

ALESSIO (Validator on Polkadot): 16cdSZUq7kxq6mtoVMWmYXo62FnNGT9jzWjVRUg87CpL9pxP
ALESSIO (Validator0 on Kusama): GaK38GT7LmgCpRSTRdDC2LeiMaV9TJmx8NmQcb9L3cJ3fyX
ALESSIO (Validator1 on Kusama): GTuMySjzg6ibdn4sJ2XgS4cVH1LcjmXUWZyoxB5GPCCNRtx

identity

Related Projects

  • https://github.com/ironoa/polkadot-k8s-monitor: this other project will help you deploy a monitoring cluster for substrate based nodes. You can think to deploy the payout tool in this cluster as an addon, or else in an another Kubernetes cluster you prefer.

  • The Helm Chart is also deployed here.

    helm repo add ironoa https://ironoa.github.io/helm-charts/

    You can then run helm search repo ironoa to see the charts.

Table Of Contents

Requirements

Polkadot Payouts

This project is particularly suited to be working in synergy with the polkadot-k8s-monitor, and his goal is to automate the payout claims for the validators you are running. You can use this tool even if you are nominating your favourite validators and you want to be sure to not miss any payout. It will submit the payoutStakers extrinsics for you !

Claimer Account

This is a hot wallet you deploy onto the cluster. Its job is to sign and send the payoutStakers extrinsics for your monitored accounts. To do so, it is obviusly gonna pay some negligible fees for the transactions submissions. For this reason, that wallet should be founded ( just a few euros and then you can forget about it )

Security

You should create a dedicated wallet for this scope (ideally, one for each network you want to work with), and then found it with no more than the equivalent of few euros. For this reason, even though this is an hot wallet, there are no risks on deploying it

How To Configure the Application

You can find a sample of the nodes related yaml config file here.

validatorsPolkadot:
- name: ALESSIO
  stashAccount: 16cdSZUq7kxq6mtoVMWmYXo62FnNGT9jzWjVRUg87CpL9pxP
validatorsKusama: 
- name: ALESSIO-0
  stashAccount: GaK38GT7LmgCpRSTRdDC2LeiMaV9TJmx8NmQcb9L3cJ3fyX

You can find a sample of the environment variables related file file, meant to contain your secrets and your passwords:

export KUSAMA_CLAIMER_PASSWORD='yourPassword'
export KUSAMA_CLAIMER_WALLET=`{"address":"xx","encoded":"xx","encoding":{"content":["pkcs8","sr25519"],"type":["scrypt","xsalsa20-poly1305"],"version":"3"},"meta":{"name":"xx","whenCreated":xx}}`

Once you have set up the nodes and the secrets/passwords, you can focus on fine tuning the deployment (though default values are provided): config

How To Deploy it Locally

I'd reccomend to test first this approach

git clone https://github.com/ironoa/polkadot-k8s-payouts.git
cd polkadot-k8s-payouts
cp config/env.sample.local.sh config/env.sh #create the default env config file
cp config/validators.sample.yaml config/validators.yaml #create the default nodes config file
#just the fist time

./scripts/deployLocal.sh
# just re trigger it to deploy configuration changes

#if you want to delete your local cluster
#./scripts/uninstallLocal.sh

How To Deploy it in Production

First, connect yourself to your chosen kubernetes cluster.

git clone https://github.com/ironoa/polkadot-k8s-payouts.git 
cd polkadot-k8s-payouts
cp config/env.sample.complete.sh config/env.sh #create the default env config file
cp config/validators.sample.yaml config/validators.yaml #create the default nodes config file
#just the fist time

./scripts/deployProduction.sh
# just re trigger it to deploy configuration changes

How it will look like

log

Future Developments

  • Improve the documentation
  • Youtube tutorials

About

A tool to deploy an utility that automatically claims your Kusama/Polkadot validator rewards in a Kubernetes cluster

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages