Set of CLI binaries that work as a pipeline for off-chain management of the Validator Bonds Program.
- init-settlement: Creates
Settlement
accounts on-chain from the provided JSON. - list-claimable-epoch: Prints a list of epochs that contain
Settlement
s which can be claimed. - claim-settlement: Searches on-chain for settlements to be claimed and claims them based on the provided JSONs with Merkle proofs.
- list-settlement: Derives
Settlement
account addresses from the provided JSON files and prints them. - close-settlement: Checks the chain for
Settlement
s that can be closed and resets stake accounts, using the provided list ofSettlement
addresses to search for the settlement stake authorities. - verify-settlement: Load all available
Settlement
's on-chain and compares them to provided list of Settlement addresses (expected they were loaded from gcloud). It returns a list of Settlements found on-chain but not available from the gcloud listing.
There are 4 pipelines used for the binary commands.
- init-settlements: Initializes settlements for an epoch based on generated JSON files. This pipeline is expected to be called after the JSON files are generated at prepare-claims.
- claim-settlements: Claims settlements when possible.
It is executed as a cron job once at a set interval. It checks the on-chain state to see if any settlements can be claimed.
The settlement can be claimed within the time range of
Settlement Creation + non-claimable slots
toSettlement Creation Epoch - Config claimable epoch
. - close-settlements: Closes
Settlement
andSettlementClaims
accounts, and resets the state of stake accounts to be associated back to the validatorBond
when not claimed. - verify-settlements: Loading
Settlement
merkle tree data from gcloud and do if the on-chain state does not contain some unknownSettlement
in comparison to gcloud list.
cargo run --bin <name>