Skip to content

Commit

Permalink
Merge pull request #372 from KiraCore/release/v0.3.0.21
Browse files Browse the repository at this point in the history
release/v0.3.0.21 -> master
  • Loading branch information
asmodat authored Aug 29, 2022
2 parents 1edb3eb + b74d9fc commit 08f2510
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 31 deletions.
3 changes: 1 addition & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Features:

- Implement slash proposal and execution process for multistaking pool
- Implement delegation/undelegation changes on slashed pool
- Resolve genesis import/export on distributor module
2 changes: 2 additions & 0 deletions proto/kira/distributor/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ message GenesisState {
int64 snap_period = 3;
// validator historical votes
repeated ValidatorVote validator_votes = 4 [(gogoproto.nullable) = false];
// previous proposer
string previous_proposer = 5;
}

// https://www.notion.so/kira-network/KIP-73-Fee-Reward-Distributor-v1-32b3d1dc90024befa7bb9680c6a425cd
Expand Down
9 changes: 5 additions & 4 deletions scripts/commands/governance/upgrade-plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ sekaid query customgov proposals
sekaid start --home=$HOME/.sekaid

# propose second upgrade plan
sekaid tx upgrade proposal-set-plan --name="upgrade2" --instate-upgrade=true --skip-handler=false --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=1 --new-chain-id=1 --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade2 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes
sekaid tx upgrade proposal-set-plan --name="upgrade6" --instate-upgrade=false --skip-handler=true --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=testing --new-chain-id=testing --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade2 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes

sekaid tx upgrade proposal-set-plan --name="upgrade3" --instate-upgrade=true --skip-handler=false --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=1 --new-chain-id=1 --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade3 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes
sekaid tx upgrade proposal-set-plan --name="upgrade3" --instate-upgrade=true --skip-handler=false --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=testing --new-chain-id=testing --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade3 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes

sekaid tx upgrade proposal-set-plan --name="upgrade4" --instate-upgrade=true --skip-handler=true --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=1 --new-chain-id=1 --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade4 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes
sekaid tx upgrade proposal-set-plan --name="upgrade4" --instate-upgrade=true --skip-handler=true --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=testing --new-chain-id=testing --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade4 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes

sekaid tx upgrade proposal-set-plan --name="upgrade5" --instate-upgrade=false --skip-handler=false --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=1 --new-chain-id=1 --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade5 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes
sekaid tx upgrade proposal-set-plan --name="upgrade5" --instate-upgrade=false --skip-handler=false --resources="[{\"id\":\"infra\",\"git\":\"https://aaa/bbb.com\"}]" --min-upgrade-time=$(($(date -u +%s) + 200)) --old-chain-id=testing --new-chain-id=testing --rollback-memo=1 --max-enrollment-duration=1 --upgrade-memo="upgrade5 test" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes

sekaid tx upgrade proposal-cancel-plan --name="cancel-upgrade4" --from=validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes
sekaid tx customgov proposal vote 1 1 --from validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes
sekaid tx customgov proposal vote 2 1 --from validator --keyring-backend=test --home=$HOME/.sekaid --chain-id=testing --fees=100ukex --yes
sekaid query customgov proposals

Expand Down
2 changes: 1 addition & 1 deletion types/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package types
const (
// we set page iteration limit for safety
PageIterationLimit = 512
SekaiVersion = "v0.3.0"
SekaiVersion = "v0.3.0.21"
CosmosVersion = "v0.45.1"
)
9 changes: 9 additions & 0 deletions x/distributor/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ func (am AppModule) InitGenesis(
am.distributorKeeper.SetValidatorVote(ctx, consAddr, vote.Height)
}

if genesisState.PreviousProposer != "" {
consAddr, err := sdk.ConsAddressFromBech32(genesisState.PreviousProposer)
if err != nil {
panic(err)
}
am.distributorKeeper.SetPreviousProposerConsAddr(ctx, consAddr)
}

return nil
}

Expand All @@ -117,6 +125,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
genesisState.FeesTreasury = am.distributorKeeper.GetFeesTreasury(ctx)
genesisState.SnapPeriod = am.distributorKeeper.GetSnapPeriod(ctx)
genesisState.ValidatorVotes = am.distributorKeeper.GetAllValidatorVotes(ctx)
genesisState.PreviousProposer = am.distributorKeeper.GetPreviousProposerConsAddr(ctx).String()
return cdc.MustMarshalJSON(&genesisState)
}

Expand Down
102 changes: 78 additions & 24 deletions x/distributor/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08f2510

Please sign in to comment.