From cf2d5306c283f861877e5765e1582ada84e3aa8c Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Tue, 22 May 2018 19:34:31 -0400 Subject: [PATCH] update x/stake/store.md --- x/stake/store.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/x/stake/store.md b/x/stake/store.md index 507e0513a..1c95ffe87 100644 --- a/x/stake/store.md +++ b/x/stake/store.md @@ -7,6 +7,7 @@ prefixed areas of the staking store which are accessed in `x/stake/keeper.go`. ## Validators - Prefix Key Space: ValidatorsKey - Key/Sort: Validator Owner Address + - Value: Validator Object - Contains: All Validator records independent of being bonded or not - Used For: Retrieve validator from owner address, general validator retrieval @@ -14,12 +15,21 @@ prefixed areas of the staking store which are accessed in `x/stake/keeper.go`. - Prefix Key Space: ValidatorsByPowerKey - Key/Sort: Validator Power (equivalent bonded shares) then Block Height then Transaction Order + - Value: Validator Owner Address - Contains: All Validator records independent of being bonded or not - Used For: Determining who the top validators are whom should be bonded +## Validators Cliff Power + - Prefix Key Space: ValidatorCliffKey + - Key/Sort: single-record + - Value: Validator Power Key (as above store) + - Contains: The cliff validator (ex. 100th validator) power + - Used For: Efficient updates to validator status + ## Validators Bonded - Prefix Key Space: ValidatorsBondedKey - Key/Sort: Validator PubKey Address (NOTE same as Tendermint) + - Value: Validator Owner Address - Contains: Only currently bonded Validators - Used For: Retrieving the list of all currently bonded validators when updating for a new validator entering the validator set we may want to loop @@ -29,6 +39,7 @@ prefixed areas of the staking store which are accessed in `x/stake/keeper.go`. ## Tendermint Updates - Prefix Key Space: TendermintUpdatesKey - Key/Sort: Validator Owner Address + - Value: Tendermint ABCI Validator - Contains: Validators are queued to affect the consensus validation set in Tendermint - Used For: Informing Tendermint of the validator set updates, is used only intra-block, as the updates are applied then cleared on endblock