diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..4419f9eb5 Binary files /dev/null and b/.DS_Store differ diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100644 index 000000000..fc438795c Binary files /dev/null and b/docs/.DS_Store differ diff --git a/docs/spec/.DS_Store b/docs/spec/.DS_Store new file mode 100644 index 000000000..8e71b2fa6 Binary files /dev/null and b/docs/spec/.DS_Store differ diff --git a/docs/spec/governance/overview.md b/docs/spec/governance/overview.md index 93bb40dee..4ad0d22c1 100644 --- a/docs/spec/governance/overview.md +++ b/docs/spec/governance/overview.md @@ -164,13 +164,7 @@ making it mechanically impossible for some validators to vote on it. ### Governance key and governance address -Validators can make use of a slot where they can designate a -`Governance PubKey`. By default, a validator's `Governance PubKey` will be the -same as its main PubKey. Validators can change this `Governance PubKey` by -sending a `Change Governance PubKey` transaction signed by their main -`Consensus PrivKey`. From there, they will be able to sign votes using the -`Governance PrivKey` associated with their `Governance PubKey`. The -`Governance PubKey` can be changed at any moment. +Later, we may add permissionned keys that could only sign txs from certain modules. For the MVP, the `Governance PubKey` will be the main validator PubKey generated at account creation. This PubKey corresponds to a different PrivKey than the Tendermint PrivKey which is responsible for signing consensus messages. Validators thus do not have to sign governance transactions with the sensitive Tendermint PrivKey. ## Software Upgrade diff --git a/docs/spec/governance/state.md b/docs/spec/governance/state.md index ecaadfbed..fd77d950b 100644 --- a/docs/spec/governance/state.md +++ b/docs/spec/governance/state.md @@ -71,9 +71,9 @@ type ValidatorGovInfo struct { this `PubKey` for this validator (`nil` if `PubKey` has not voted under this validator) * `ValidatorGovInfos`: A mapping `map[[]byte]ValidatorGovInfo` of validator's - governance infos indexed by `:`. Returns + governance infos indexed by `:`. Returns `nil` if proposal has not entered voting period or if `PubKey` was not the - governance public key of a validator when proposal entered voting period. + public key of a validator when proposal entered voting period. For pseudocode purposes, here are the two function we will use to read or write in stores: @@ -126,12 +126,12 @@ And the pseudocode for the `ProposalProcessingQueue`: activeProcedure = load(Procedures, activeProcedureNumber) for each validator in CurrentBondedValidators - validatorGovInfo = load(multistore, ValidatorGovInfos, validator.GovPubKey) + validatorGovInfo = load(multistore, ValidatorGovInfos, validator.PubKey) if (validatorGovInfo.InitVotingPower != nil) // validator was bonded when vote started - validatorOption = load(Options, validator.GovPubKey) + validatorOption = load(Options, validator.PubKey) if (validatorOption == nil) // validator did not vote slash validator by activeProcedure.GovernancePenalty diff --git a/docs/spec/governance/transactions.md b/docs/spec/governance/transactions.md index 200c09bcc..feb506d32 100644 --- a/docs/spec/governance/transactions.md +++ b/docs/spec/governance/transactions.md @@ -83,7 +83,7 @@ upon receiving txGovSubmitProposal from sender do validatorGovInfo.InitVotingPower = validator.VotingPower validatorGovInfo.Minus = 0 - store(ValidatorGovInfos, :, validatorGovInfo) + store(ValidatorGovInfos, :, validatorGovInfo) ProposalProcessingQueue.push(proposalID) @@ -186,7 +186,7 @@ upon receiving txGovDeposit from sender do validatorGovInfo.InitVotingPower = validator.VotingPower validatorGovInfo.Minus = 0 - store(ValidatorGovInfos, :, validatorGovInfo) + store(ValidatorGovInfos, :, validatorGovInfo) ProposalProcessingQueue.push(txGovDeposit.ProposalID) ``` @@ -338,7 +338,7 @@ handled: // Throws if // Option is not in Option Set of procedure that was active when vote opened OR if - // ValidatorPubKey is not the GovPubKey of a current validator + // ValidatorPubKey is not the PubKey of a current validator throw @@ -369,7 +369,7 @@ handled: throw else - validatorGovInfo = load(ValidatorGovInfos, :) + validatorGovInfo = load(ValidatorGovInfos, :) if (validatorGovInfo == nil) // validator became validator after proposal entered voting period @@ -381,8 +381,8 @@ handled: store(Options, ::, txGovVote.Option) - if (sender != validator.GovPubKey) - // Here, sender is not the Governance PubKey of the validator whose PubKey is txGovVote.ValidatorPubKey + if (sender != validator.PubKey) + // Here, sender is not the PubKey of the validator whose PubKey is txGovVote.ValidatorPubKey if sender does not have bonded Atoms to txGovVote.ValidatorPubKey then // check in Staking module @@ -396,7 +396,7 @@ handled: // Validator has not voted already validatorGovInfo.Minus += sender.bondedAmounTo(txGovVote.ValidatorPubKey) - store(ValidatorGovInfos, :, validatorGovInfo) + store(ValidatorGovInfos, :, validatorGovInfo) else // Validator has already voted @@ -411,7 +411,7 @@ handled: else - // sender is the Governance PubKey of the validator whose main PubKey is txGovVote.ValidatorPubKey + // sender is the PubKey of the validator whose main PubKey is txGovVote.ValidatorPubKey // i.e. sender == validator optionVotes = load(Votes, :)