mantalabs / validator-elector

Run a Celo validator on Kubernetes with automatic failover.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

validator-elector

validator-elector helps run a Celo validator on Kubernetes with automatic failover. You can use validator-elector to increase availability or enable rolling deployments.

Usage

Add a validator-elector container to run as a sidecar to each Pod running a Celo validator container. If the the Celo validator's current block is recent, the validator-elector sidecar will race to acquire a lock. The validator-elector container that successfully acquires the lock makes an JSONRPC request to the Celo validator to start validation.

The validator-elector periodically renews the lock. If the validator-elector fails to renew the lock (e.g., Node crash) within a default time period, other validator-elector containers can acquire the lock.

Before exit, a validator-elector will release the lock and make a JSONRPC request to the Celo validator to stop validation.

e2e has an example usage.

Testing

e2e/run.py

Related

About

Run a Celo validator on Kubernetes with automatic failover.

License:MIT License


Languages

Language:Go 68.8%Language:Python 29.8%Language:Dockerfile 1.4%