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

fix!: use authority admin, remove params #184

Merged
merged 21 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 11 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
1 change: 0 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
- "ictest-jail"
- "ictest-val-add"
- "ictest-val-remove"
- "ictest-gov"
fail-fast: false

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ debug_container.dot
build/

go.work.sum
debug_*.*
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ ictest-val-add:
ictest-val-remove:
$(MAKE) -C e2e/ ictest-val-remove

ictest-gov:
$(MAKE) -C e2e/ ictest-gov

.PHONY: test ictest-poa ictest-jail ictest-val-add ictest-val-remove

COV_ROOT="/tmp/poa-coverage"
Expand Down
36 changes: 0 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ All delegation actions are disabled with the [disabled-staking ante](./INTEGRATI

## State

### Genesis
`Params` is found in the genesis state. This object contains the `admins` field, which is a list of bech32 addresses that are allowed to modify the validator set, PoA params, and validator params (via x/staking). If no admin is set, then the chain should set the governance account as the admin (default). By allowing for an array of admins, the chain can be controlled by multiple different parties according to your use case. For example, governance can be an admin while also allowing a multisig, DAO, and/or single account to control the validator set. There must be at least one admin in the list at all times.

`AllowValidatorSelfExit` is a boolean option *(default true)* that toggles validators ability to remove themselves from the active set. This is useful for validators that are no longer able or decide this PoA network is no longer for them. If set to false, only admins can remove validators from the set. **NOTE** This does not stop validators from going down and being jailed for downtime. It just provides a graceful way to self remove power.

### Pending Validators
`PendingValidators` stores an array of PoA validator objects pending approval (from the admins) into the active set. This only is required after the chain has started.

Expand Down Expand Up @@ -125,26 +120,6 @@ The `AbsoluteChangedPower` of +1 to each validator is 3, which is 33% of the pre
}
```

### UpdateParams (admin only)

- `admins` is a list of bech32 addresses that control the validator set and parameters of the chain.
- `allow_validator_self_exit` allows validators to force remove themselves from the active set at any time.

```json
{
"@type": "/strangelove_ventures.poa.v1.MsgUpdateParams",
"sender": "cosmos1addr",
"params": {
"admins": [
"cosmos1addr",
"cosmos1addr1",
"cosmos1addr2",
],
"allow_validator_self_exit": true
}
}
```

### UpdateStakingParams (admin only)
```json
{
Expand Down Expand Up @@ -176,7 +151,6 @@ A validator is removed by an admin at height H; it increases the minimum self de

| LCD / API | gRPC |
|------------------------------|-----------------------------------------------------|
| `/poa/v1/params` |`strangelove_ventures.poa.v1.Query/Params` |
| `/poa/v1/pending_validators` |`strangelove_ventures.poa.v1.Query/PendingValidators`|
| `/poa/v1/{consensus_power}` |`strangelove_ventures.poa.v1.Query/ConsensusPower` |

Expand All @@ -189,9 +163,6 @@ A user can query and interact with the `poa` module using the CLI.
The `query` commands allow users to query the `poa` state.

```bash
# Get module params (admins list)
poad q poa params

# Get validators waiting to be added to the set
poad q poa pending-validators

Expand Down Expand Up @@ -222,13 +193,6 @@ poad tx poa remove [validator]
# - --unsafe flag allows for bypassing the 30% max change per block
poad tx poa set-power [validator] [amount] [--unsafe]

# (admin) Update the PoA module params
# - admins is a comma separated list of bech32 addresses
# - any admin can modify the list at any time
# - there must be at least one admin in the list at all times
# - allow_validator_self_exit is a bool to allow validators to force remove themselves from the set.
poad tx poa update-params [admin1,admin2,admin3,...] [allow_validator_self_exit]

# (admin) Update the staking module params
# - unbondingTime is the time that a validator must wait to unbond (ex: 336h)
# - maxVals is the maximum number of validators for the active set.
Expand Down
Loading
Loading