Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update revoked -> jailed in the docs, and in minor places within cmd. #2337

Merged
merged 1 commit into from
Sep 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/gaia/app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func genesisAccountFromGenTx(genTx GaiaGenTx) GenesisAccount {
}

// GaiaValidateGenesisState ensures that the genesis state obeys the expected invariants
// TODO: No validators are both bonded and revoked (#2088)
// TODO: No validators are both bonded and jailed (#2088)
// TODO: Error if there is a duplicate validator (#1708)
// TODO: Ensure all state machine parameters are in genesis (#1704)
func GaiaValidateGenesisState(genesisState GenesisState) (err error) {
Expand All @@ -258,7 +258,7 @@ func validateGenesisStateValidators(validators []stakeTypes.Validator) (err erro
return fmt.Errorf("Duplicate validator in genesis state: moniker %v, Address %v", val.Description.Moniker, val.ConsAddress())
}
if val.Jailed && val.Status == sdk.Bonded {
return fmt.Errorf("Validator is bonded and revoked in genesis state: moniker %v, Address %v", val.Description.Moniker, val.ConsAddress())
return fmt.Errorf("Validator is bonded and jailed in genesis state: moniker %v, Address %v", val.Description.Moniker, val.ConsAddress())
}
addrMap[strKey] = true
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaia/app/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestGaiaGenesisValidation(t *testing.T) {
genesisState := makeGenesisState(genTxs)
err := GaiaValidateGenesisState(genesisState)
require.NotNil(t, err)
// Test bonded + revoked validator fails
// Test bonded + jailed validator fails
genesisState = makeGenesisState(genTxs[:1])
val1 := stakeTypes.NewValidator(addr1, pk1, stakeTypes.Description{Moniker: "test #2"})
val1.Jailed = true
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaia/cmd/gaiadebug/hack.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func runHackCmd(cmd *cobra.Command, args []string) error {
// The following powerKey was there, but the corresponding "trouble" validator did not exist.
// So here we do a binary search on the past states to find when the powerKey first showed up ...

// operator of the validator the bonds, gets revoked, later unbonds, and then later is still found in the bypower store
// operator of the validator the bonds, gets jailed, later unbonds, and then later is still found in the bypower store
trouble := hexToBytes("D3DC0FF59F7C3B548B7AFA365561B87FD0208AF8")
// this is his "bypower" key
powerKey := hexToBytes("05303030303030303030303033FFFFFFFFFFFF4C0C0000FFFED3DC0FF59F7C3B548B7AFA365561B87FD0208AF8")
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaia/testnets/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ See [testnets repo](https://github.com/cosmos/testnets).
## *June 13, 2018, 17:00 EST* - Gaia-6002 is making blocks!

- Gaia-6002 is live and making blocks
- Absent validators have been slashed and revoked
- Absent validators have been slashed and jailed
- Currently live with 17 validators

## *June 13, 2018, 4:30 EST* - New Testnet Gaia-6002
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/whitepaper.md
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ where the processes that caused the consensus to fail (ie. caused clients of
the protocol to accept different values - a fork) can be identified and punished
according to the rules of the protocol, or, possibly, the legal system. When
the legal system is unreliable or excessively expensive to invoke, validators can be forced to make security
deposits in order to participate, and those deposits can be revoked, or slashed,
deposits in order to participate, and those deposits can be jailed, or slashed,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

when malicious behaviour is detected [\[10\]][10].

Note this is unlike Bitcoin, where forking is a regular occurence due to
Expand Down
10 changes: 5 additions & 5 deletions docs/spec/staking/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type TxDelegate struct {

delegate(tx TxDelegate):
pool = getPool()
if validator.Status == Revoked return
if validator.Status == Jailed return

delegation = getDelegatorBond(DelegatorAddr, ValidatorAddr)
if delegation == nil then delegation = NewDelegation(DelegatorAddr, ValidatorAddr)
Expand Down Expand Up @@ -141,7 +141,7 @@ startUnbonding(tx TxStartUnbonding):
revokeCandidacy = false
if bond.Shares.IsZero() {

if bond.DelegatorAddr == validator.Operator && validator.Revoked == false
if bond.DelegatorAddr == validator.Operator && validator.Jailed == false
revokeCandidacy = true

removeDelegation( bond)
Expand All @@ -157,7 +157,7 @@ startUnbonding(tx TxStartUnbonding):
setUnbondingDelegation(unbondingDelegation)

if revokeCandidacy
validator.Revoked = true
validator.Jailed = true

validator = updateValidator(validator)

Expand Down Expand Up @@ -279,9 +279,9 @@ updateBondedValidators(newValidator Validator) (updatedVal Validator)
else
validator = getValidator(operatorAddr)

// if not previously a validator (and unrevoked),
// if not previously a validator (and unjailed),
// kick the cliff validator / bond this new validator
if validator.Status() != Bonded && !validator.Revoked {
if validator.Status() != Bonded && !validator.Jailed {
kickCliffValidator = true

validator = bondValidator(ctx, store, validator)
Expand Down