Skip to content

Commit

Permalink
updrade.md update
Browse files Browse the repository at this point in the history
  • Loading branch information
stana-miric committed Nov 28, 2024
1 parent 69ec878 commit 2b0eb15
Showing 1 changed file with 45 additions and 2 deletions.
47 changes: 45 additions & 2 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,43 @@
# Upgrading Replicated Security
# Upgrading Interchain Security

## Unreleased

### Provider

```golang
func SetConsumerInfractionParams(ctx sdk.Context, pk providerkeeper.Keeper) error {
infractionParameters := DefaultInfractionParams()

activeConsumerIds := pk.GetAllActiveConsumerIds(ctx)
for _, consumerId := range activeConsumerIds {
if err := pk.SetInfractionParameters(ctx, consumerId, infractionParameters); err != nil {
return err
}
}

return nil
}

func DefaultInfractionParams() providertypes.InfractionParameters {
return providertypes.InfractionParameters{
DoubleSign: &providertypes.SlashJailParameters{
JailDuration: time.Duration(1<<63 - 1), // the largest value a time.Duration can hold 9223372036854775807 (approximately 292 years)
SlashFraction: math.LegacyNewDecWithPrec(5, 2), // 0.05
},
Downtime: &providertypes.SlashJailParameters{
JailDuration: 600 * time.Second,
SlashFraction: math.LegacyNewDec(0), // no slashing for downtime on the consumer
},
}
}
```

## v6.3.x

Upgrading from `v6.2.0` will not require state migration. To upgrade from lower versions, please check the sections below.

## v6.2.x

### Consumer

Upgrading a consumer from v4.4.x to v4.5.x and from v5.x or v6.1.x to v6.2.x requires state migrations. The following migrators should be added to the upgrade handler of the consumer chain:
Expand All @@ -22,6 +58,13 @@ func InitializeConsumerId(ctx sdk.Context, consumerKeeper consumerkeeper.Keeper)
}
```

## [v6.1.x](https://github.com/cosmos/interchain-security/releases/tag/v6.1.0)

Upgrading from `v6.0.0` will not require state migration.


## [v6.0.x](https://github.com/cosmos/interchain-security/releases/tag/v6.0.0)

### Provider

Upgrading a provider from v5.1.x requires state migrations. The following migrators should be added to the upgrade handler of the provider chain:
Expand Down Expand Up @@ -378,4 +421,4 @@ Upgrading a provider from `v1.1.0-multiden` to `v2.0.0` will require state migra

### Consumer

Upgrading a consumer from `v1.2.0-multiden` to `v2.0.0` will NOT require state migrations.
Upgrading a consumer from `v1.2.0-multiden` to `v2.0.0` will NOT require state migrations.

0 comments on commit 2b0eb15

Please sign in to comment.