From 0012f4205701b5b7e580e227bcb84ff9ca0aff9b Mon Sep 17 00:00:00 2001 From: gamarin Date: Tue, 27 Feb 2018 18:55:04 +0100 Subject: [PATCH] Remove governance GovPubKey --- .DS_Store | Bin 0 -> 8196 bytes docs/.DS_Store | Bin 0 -> 6148 bytes docs/spec/.DS_Store | Bin 0 -> 6148 bytes docs/spec/governance/overview.md | 8 +------- docs/spec/governance/state.md | 8 ++++---- docs/spec/governance/transactions.md | 16 ++++++++-------- 6 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 .DS_Store create mode 100644 docs/.DS_Store create mode 100644 docs/spec/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4419f9eb5be4702e2706ff2b1c0e7af306c112dd GIT binary patch literal 8196 zcmeHM&2G~`5S~p_;&(^$D$jRzNGD70?Q31^xyF@SV-gnDf1_u4=0l&)9yqwdH`878n?Gg4 zi0CqH(<8c1JM@q&dQ7|U>vTqKRrgPMUoyNUIwqGwSPzlbX$X#&<_KO*GS)T3+NB2K z9Kt_<<>MWkd5+QEthnMsW{#!l9J_P?u0_wNm5KW!$7xW2mA=7BLwb#MW6fz!!On1s z)RvqmgZnlQ=M18*<4L`~I$h6=de!Q8QCKK0UMd;ovQfTbylR~WgI3S(^`p8SzK}<5 zyW_;;y&&+WW82wxJA=cO>)V0fvt7RvCg3j*T)!O*>OtRcM{=I0cJCBi8R&4OG8%1G zt83=%TX)85=4fkci^rSev0<#<*tpj`Ivc(ny&J#(gw3Fd_$f?R)$!DR#%L zE^s;}8H<>;2W`S^g0h~%Na(o;98`zRDi0NN$N+PCStQ?}Iph#K%zc`yTMD^M`_SzK z>$J(o8s@5(VwLC|bB9>9i}m<<^-^d-7a0W9N+BSgZdw7Y04uPdWTOfh z{sZt2_$iz?@3ZUdFX*r78D4x^;!M=NYwVHL0n{A&vEw_78RM);+a`+gH2Exau}Lb~@$3?<$Q zeDG81Q;!k~Dc0ZnlK-{DuL&=v6GR`;MUkyGOKgV*G?wuU5xYleiT`m8e*$KJ@vIrW z`dQ-F!1WP#2fd_}6{Bx>C3cz831B-2hZ ziGx()JoB<4e5IqK#@1}M*KBUP5AHvlZ@aTrtHtHL`P^|f@9yp&9-m#jo4ucZ_>9TG z6pkJ-ewFj~1rJLh-gd`vl*9wnF~7!(FT(Qz4@xreOOuyL(Rq;}FG`*PhpT5sIOpco z8@e5_Rlq9nhZW%c!9`+h8(e6Vtpk}{0f1Fhi=oVa8ra7**fzM(h!&XAu0ZXo%oRgv zchtLv*EYD&sNG4K%ZD;OD|16p(mUe2LMPSMXmhK8RiLOqML#z9{C{%!{lDmBpR58_ zf&WSYRXyk)bTB1zwysQ$&srDh7>SK}3ytD}%pAv3;G=j8Nepc+7l3Vp3yr9O**^jz LgUzf0e^r6sL~``Z literal 0 HcmV?d00001 diff --git a/docs/spec/.DS_Store b/docs/spec/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8e71b2fa676392026d0750e41850e8eb72ee9b85 GIT binary patch literal 6148 zcmeHK-EPw`6h7WMnhs6$0%^O<4bmSXsJP^=dV*w&K0%^wh9Z zgvB6lh5c8$mc~hB<3pvgpK%x+rOEK5{_weyMVQK@Kau|WIF+#)w$wnzxgO_bSoFZv z4?3x@jYhkT#)iMWwKLxEN6luFB~&XF8Z0f1PKf3v53>siB9IUFjSzS3VX#6hK_dM<^>i@gN9DRUOt3-+yS$<>?!PJ#bQ0a0mp+AU1Uo~?6}pTgNVuQaGBDC}{p13rq^ b;M&mVa{vr1mIl!Rb3X!F23I%*{;C4klwp-p literal 0 HcmV?d00001 diff --git a/docs/spec/governance/overview.md b/docs/spec/governance/overview.md index 93bb40dee3..4ad0d22c1d 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 ecaadfbedf..fd77d950b8 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 200c09bcc7..feb506d32e 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, :)