Skip to content

Commit

Permalink
Merge branch 'main' into sainoe/genesis-time
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Oct 18, 2024
2 parents fa590f8 + c2a1c76 commit 159c510
Show file tree
Hide file tree
Showing 31 changed files with 299 additions and 95 deletions.
23 changes: 23 additions & 0 deletions .changelog/epilogue.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## v4.5.0

*September 30, 2024*

### BUG FIXES

- Remove duplicate event emission on cached context.
([\#2282](https://github.com/cosmos/interchain-security/pull/2282))

### FEATURES

- `[x/consumer]` Populate the memo on the IBC transfer packets used to send ICS rewards
with the required consumer chain Id to identify the consumer to the provider.
- `[x/provider]` Identify the source of ICS rewards from the IBC transfer packet memo.
([\#2290](https://github.com/cosmos/interchain-security/pull/2290))

### STATE BREAKING

- `[x/consumer]` Populate the memo on the IBC transfer packets used to send ICS rewards
with the required consumer chain Id to identify the consumer to the provider.
- `[x/provider]` Identify the source of ICS rewards from the IBC transfer packet memo.
([\#2290](https://github.com/cosmos/interchain-security/pull/2290))

## v4.4.0

*July 16, 2024*
Expand Down
3 changes: 3 additions & 0 deletions .changelog/unreleased/improvements/2357-init-params.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[x/provider]` Add validation for initial height and set
default values for consumer initialization params.
([\#2357](https://github.com/cosmos/interchain-security/pull/2357))
3 changes: 3 additions & 0 deletions .changelog/unreleased/state-breaking/2357-init-params.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[x/provider]` Add validation for initial height and set
default values for consumer initialization params.
([\#2357](https://github.com/cosmos/interchain-security/pull/2357))
2 changes: 2 additions & 0 deletions .changelog/v6.2.0/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*October 4, 2024*

51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# CHANGELOG

## v6.2.0

*October 4, 2024*

### DEPENDENCIES

- Bump [ibc-go](https://github.com/cosmos/ibc-go) to
[v8.5.1](https://github.com/cosmos/ibc-go/releases/tag/v8.5.1).
([\#2277](https://github.com/cosmos/interchain-security/pull/2277))

### FEATURES

- `[x/consumer]` Populate the memo on the IBC transfer packets used to send ICS rewards.
with the required consumer chain Id to identify the consumer to the provider.
- `[x/provider]` Identify the source of ICS rewards from the IBC transfer packet memo.
([\#2290](https://github.com/cosmos/interchain-security/pull/2290))
- `[x/provider]` Enable permissionless allowlisting of reward denoms (at most 3) per consumer chain.
([\#2309](https://github.com/cosmos/interchain-security/pull/2309))

### STATE BREAKING

- `[x/consumer]` Populate the memo on the IBC transfer packets used to send ICS rewards.
with the required consumer chain Id to identify the consumer to the provider.
- `[x/provider]` Identify the source of ICS rewards from the IBC transfer packet memo.
([\#2290](https://github.com/cosmos/interchain-security/pull/2290))
- `[x/provider]` Enable permissionless allowlisting of reward denoms (at most 3) per consumer chain.
([\#2309](https://github.com/cosmos/interchain-security/pull/2309))

## v6.1.0

*September 20, 2024*
Expand Down Expand Up @@ -317,6 +345,29 @@ Backporting of ([\#1964](https://github.com/cosmos/interchain-security/pull/1964
- Revert `PutUnbondingOnHold` behavior to ICS@v1
([\#1819](https://github.com/cosmos/interchain-security/pull/1819))

## v4.5.0

*September 30, 2024*

### BUG FIXES

- Remove duplicate event emission on cached context.
([\#2282](https://github.com/cosmos/interchain-security/pull/2282))

### FEATURES

- `[x/consumer]` Populate the memo on the IBC transfer packets used to send ICS rewards
with the required consumer chain Id to identify the consumer to the provider.
- `[x/provider]` Identify the source of ICS rewards from the IBC transfer packet memo.
([\#2290](https://github.com/cosmos/interchain-security/pull/2290))

### STATE BREAKING

- `[x/consumer]` Populate the memo on the IBC transfer packets used to send ICS rewards
with the required consumer chain Id to identify the consumer to the provider.
- `[x/provider]` Identify the source of ICS rewards from the IBC transfer packet memo.
([\#2290](https://github.com/cosmos/interchain-security/pull/2290))

## v4.4.0

*July 16, 2024*
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ RUN go mod tidy
RUN make install

# Get Hermes build
## TODO: import Hermes release from ghcr.io/informalsystems repository when
## a Hermes release contains the patch in
# TODO: import Hermes release from ghcr.io/informalsystems repository when
# a Hermes release contains the patch in
# https://github.com/informalsystems/hermes/pull/4182
FROM --platform=linux/amd64 otacrew/hermes-ics:latest AS hermes-builder

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.combined
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ FROM --platform=linux/amd64 ${PROVIDER_IMAGE} AS provider
FROM --platform=linux/amd64 ${CONSUMER_IMAGE} AS consumer

# Get Hermes build
FROM --platform=linux/amd64 ghcr.io/informalsystems/hermes:1.10.2 AS hermes-builder
# TODO: import Hermes release from ghcr.io/informalsystems repository when
# a Hermes release contains the patch in
# https://github.com/informalsystems/hermes/pull/4182
FROM --platform=linux/amd64 otacrew/hermes-ics:latest AS hermes-builder


# Get GoRelayer
Expand Down
32 changes: 16 additions & 16 deletions docs/docs/build/modules/02-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ message MsgUpdateParams {
}
```

### ChangeRewardDenomsProposal
### MsgChangeRewardDenoms

`MsgChangeRewardDenoms` updates the list of whitelisted denoms accepted by the provider as ICS rewards.
The list of accepted denoms is updated through a governance proposal where the signer is the gov module account address.
Expand Down Expand Up @@ -1550,7 +1550,7 @@ power_shaping_params:
allow_inactive_vals: false
allowlist: []
denylist: []
min_stake: "0"
min_stake: 0
top_N: 100
validator_set_cap: 0
validators_power_cap: 0
Expand Down Expand Up @@ -1642,7 +1642,7 @@ where `create-consumer-msg.json` contains:
"metadata": {
"name": "pion-1",
"description":"description of your chain and all other relevant information",
"metadata": "some metadata about your chain"
"metadata": "{\"forge_json_url\": \"...\", \"stage\": \"mainnet\"}"
}
}
```
Expand Down Expand Up @@ -1678,31 +1678,31 @@ where `update-consumer-msg.json` contains:
"metadata": {
"name": "pion-1",
"description":"description of your chain and all other relevant information",
"metadata": "some metadata about your"
"metadata": "{\"forge_json_url\": \"...\", \"stage\": \"mainnet\"}"
},
"initialization_parameters":{
"initial_height":{
"revision_number": 0,
"revision_height": 1
"revision_number": 1,
"revision_height": 0
},
"genesis_hash":"2D5C2110941DA54BE07CBB9FACD7E4A2E3253E79BE7BE3E5A1A7BDA518BAA4BE",
"binary_hash": "6EF05C2F38BE62A833E5AB51EBF3BA72D1BC1664D7E4A2E3253DA54BE07CF38A",
"genesis_hash": "",
"binary_hash": "",
"spawn_time": "2024-09-29T12:57:43Z",
"unbonding_period":"2419200s",
"ccv_timeout_period": "2419200s",
"transfer_timeout_period": "3600s",
"unbonding_period": 1728000000000000,
"ccv_timeout_period": 2419200000000000,
"transfer_timeout_period": 1800000000000,
"consumer_redistribution_fraction": "0.75",
"blocks_per_distribution_transmission": "1500",
"historical_entries":"1000",
"historical_entries": "1000",
"distribution_transmission_channel": ""
},
"power_shaping_parameters":{
"top_N":50,
"validators_power_cap":50,
"validator_set_cap":50,
"top_N": 0,
"validators_power_cap": 10,
"validator_set_cap": 50,
"allowlist":["cosmosvalcons1l9qq4m300z8c5ez86ak2mp8znftewkwgjlxh88"],
"denylist":[],
"min_stake": "1000",
"min_stake": 1000,
"allow_inactive_vals":true
},
"allowlisted_reward_denoms": {
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/build/modules/03-consumer.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ The consumer module contains the following parameters.
Providing an IBC transfer channel enables a consumer chain to re-use one of the existing channels to the provider for consumer chain rewards distribution.
This will preserve the `ibc denom` that may already be in use.
This is especially important for standalone chains transitioning to become consumer chains.
For more details, see the [changeover procedure](../consumer-development/changeover-procedure.md).
For more details, see the [changeover procedure](../../consumer-development/changeover-procedure.md).

### ProviderFeePoolAddrStr

Expand Down Expand Up @@ -439,7 +439,7 @@ It is recommended that every consumer chain set and unbonding period shorter tha
| time.Duration | 3600s (1 hour) |

`RetryDelayPeriod` is the period at which the consumer retries to send a `SlashPacket` that was rejected by the provider.
For more details, see [ADR-008](../adrs/adr-008-throttle-retries.md).
For more details, see [ADR-008](../../adrs/adr-008-throttle-retries.md).

## Client

Expand Down
7 changes: 3 additions & 4 deletions docs/docs/consumer-development/changeover-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ However, here are the most important notes and differences between a new consume
// must correspond to a height that is at least 1 block after the upgrade
// that will add the `consumer` module to the standalone chain
// e.g. "upgrade_height": 100 => "revision_height": 101
"revision_height": 1,
"revision_height": 101,
},
...
}
```
RevisionNumber: 0, RevisionHeight: 111
:::

* `genesis_hash` can be safely ignored because the chain is already running. A hash of the standalone chain's initial genesis may be used
Expand Down Expand Up @@ -177,10 +176,10 @@ Example of initialization parameters (compare with the [those](./onboarding.md#
"spawn_time": "2023-02-28T20:40:00.000000Z",
// Unbonding period for the consumer chain.
// It should should be smaller than that of the provider.
"unbonding_period": 86400000000000,
"unbonding_period": 1728000000000000,
// Timeout period for CCV related IBC packets.
// Packets are considered timed-out after this interval elapses.
"ccv_timeout_period": 259200000000000,
"ccv_timeout_period": 2419200000000000,
// IBC transfer packets will timeout after this interval elapses.
"transfer_timeout_period": 1800000000000,
// The fraction of tokens allocated to the consumer redistribution address during distribution events.
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/consumer-development/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Example of initialization parameters:
"spawn_time": "2023-02-28T20:40:00.000000Z",
// Unbonding period for the consumer chain.
// It should be smaller than that of the provider.
"unbonding_period": 86400000000000,
"unbonding_period": 1728000000000000,
// Timeout period for CCV related IBC packets.
// Packets are considered timed-out after this interval elapses.
"ccv_timeout_period": 259200000000000,
"ccv_timeout_period": 2419200000000000,
// IBC transfer packets will timeout after this interval elapses.
"transfer_timeout_period": 1800000000000,
// The fraction of tokens allocated to the consumer redistribution address during distribution events.
Expand Down Expand Up @@ -108,7 +108,7 @@ Example of power-shaping parameters:
// For example, 53 corresponds to a Top 53% chain, meaning that the top 53% provider validators by voting power
// have to validate the proposed consumer chain. top_N can either be 0 or any value in [50, 100].
// A chain can join with top_N == 0 as an Opt In chain, or with top_N ∈ [50, 100] as a Top N chain.
"top_N": 95,
"top_N": 0,
// Corresponds to the maximum power (percentage-wise) a validator can have on the consumer chain. For instance, if
// `validators_power_cap` is set to 32, it means that no validator can have more than 32% of the voting power on the
// consumer chain. Note that this might not be feasible. For example, think of a consumer chain with only
Expand All @@ -120,7 +120,7 @@ Example of power-shaping parameters:
"validator_set_cap": 0,
// Corresponds to a list of provider consensus addresses of validators that are the ONLY ones that can validate
// the consumer chain.
"allowlist": [],
"allowlist": ["cosmosvalcons1l9qq4m300z8c5ez86ak2mp8znftewkwgjlxh88"],
// Corresponds to a list of provider consensus addresses of validators that CANNOT validate the consumer chain.
"denylist": [],
// Corresponds to the minimal amount of (provider chain) stake required to validate on the consumer chain.
Expand Down
5 changes: 0 additions & 5 deletions docs/docs/introduction/terminology.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ PSS allows for more flexible security tradeoffs than Replicated Security.
[Permissionless ICS](../features/permissionless.md) is the latest version of ICS that allows to launch Opt In chains in
a permissionless way (i.e., without requiring a governance proposal).

## Consumer Chain

Chain that is secured by the validator set of the provider, instead of its own.
Interchain Security allows a subset of the provider chain's validator set to validate blocks on the consumer chain.

## Standalone Chain

Chain that is secured by its own validator set. This chain does not participate in Interchain Security.
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ func (tr Chain) submitConsumerAdditionProposal(
DistributionTransmissionChannel: action.DistributionChannel,
}

consumerId := tr.CreateConsumer(providerChainCfg.ChainId, consumerChainCfg.ChainId, action.From, Metadata, nil, nil)
consumerId := tr.CreateConsumer(providerChainCfg.ChainId, consumerChainCfg.ChainId, action.From, Metadata, &initializationParameters, nil)
authority := "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
// Set the new created consumer-id on the chain's config
consumerChainCfg.ConsumerId = consumerId
Expand Down
6 changes: 3 additions & 3 deletions testutil/keeper/unit_test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func SetupForDeleteConsumerChain(t *testing.T, ctx sdk.Context,
t.Helper()

expectations := GetMocksForCreateConsumerClient(ctx, &mocks,
"chainID", clienttypes.NewHeight(4, 5))
"chainID", clienttypes.NewHeight(0, 5))
expectations = append(expectations, GetMocksForSetConsumerChain(ctx, &mocks, "chainID")...)

gomock.InOrder(expectations...)
Expand Down Expand Up @@ -286,7 +286,7 @@ func GetTestConsumerMetadata() providertypes.ConsumerMetadata {

func GetTestInitializationParameters() providertypes.ConsumerInitializationParameters {
return providertypes.ConsumerInitializationParameters{
InitialHeight: clienttypes.NewHeight(4, 5),
InitialHeight: clienttypes.NewHeight(0, 5),
GenesisHash: []byte("gen_hash"),
BinaryHash: []byte("bin_hash"),
SpawnTime: time.Now().UTC(),
Expand Down Expand Up @@ -323,7 +323,7 @@ func GetTestMsgUpdateConsumer() providertypes.MsgUpdateConsumer {
func GetTestMsgConsumerAddition() providertypes.MsgConsumerAddition {
return providertypes.MsgConsumerAddition{
ChainId: "a ChainId",
InitialHeight: clienttypes.NewHeight(4, 5),
InitialHeight: clienttypes.NewHeight(0, 5),
GenesisHash: []byte(base64.StdEncoding.EncodeToString([]byte("gen_hash"))),
BinaryHash: []byte(base64.StdEncoding.EncodeToString([]byte("bin_hash"))),
SpawnTime: time.Now(),
Expand Down
Loading

0 comments on commit 159c510

Please sign in to comment.