Skip to content

Commit

Permalink
Merge branch 'main' into ph/min-power-on-the-fly
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Jun 12, 2024
2 parents 4a6aa73 + 8955fcb commit d2985d6
Show file tree
Hide file tree
Showing 48 changed files with 1,138 additions and 138 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Allow consumer chains to change their PSS parameters.
([\#1932](https://github.com/cosmos/interchain-security/pull/1932))
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
- Apply audit suggestions that include a bug fix in the way we compute the
maximum capped power. ([\#1925](https://github.com/cosmos/interchain-
security/pull/1925))
maximum capped power. ([\#1925](https://github.com/cosmos/interchain-security/pull/1925))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Allow consumer chains to change their PSS parameters.
([\#1932](https://github.com/cosmos/interchain-security/pull/1932))
20 changes: 0 additions & 20 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,6 @@ updates:
labels:
- dependencies

- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
target-branch: "release/v4.1.x"
# Only allow automated security-related dependency updates on release branches.
open-pull-requests-limit: 0
labels:
- dependencies

- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
target-branch: "release/v4.1.x-lsm"
# Only allow automated security-related dependency updates on release branches.
open-pull-requests-limit: 0
labels:
- dependencies

- package-ecosystem: gomod
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 #v5.3.0
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 #v5.4.0
with:
context: .
file: ./Dockerfile
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/nightly-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,38 @@ jobs:
go-version: "1.21" # The Go version to download (if necessary) and use.
- name: E2E partial set security denylist
run: go run ./tests/e2e/... --tc partial-set-security-validators-denylisted
partial-set-security-modification-proposal:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- uses: actions/checkout@v4
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21" # The Go version to download (if necessary) and use.
- name: E2E partial set security modification proposal
run: go run ./tests/e2e/... --tc partial-set-security-modification-proposal
active-set-changes-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- uses: actions/checkout@v4
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21" # The Go version to download (if necessary) and use.
- name: E2E active set changes
run: go run ./tests/e2e/... --tc active-set-changes

nightly-test-fail:
needs:
Expand All @@ -295,6 +327,11 @@ jobs:
- partial-set-security-validators-power-cap-test
- partial-set-security-validators-allowlisted-test
- partial-set-security-validators-denylisted-test
<<<<<<< HEAD
- active-set-changes-test
=======
- partial-set-security-modification-proposal
>>>>>>> main
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
Expand Down
16 changes: 0 additions & 16 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,6 @@ queue_rules:
- "#approved-reviews-by>1"

pull_request_rules:
- name: Backport patches to the release/v4.1.x branch
conditions:
- base=main
- label=A:backport/v4.1.x
actions:
backport:
branches:
- release/v4.1.x
- name: Backport patches to the release/v4.1.x-lsm branch
conditions:
- base=main
- label=A:backport/v4.1.x-lsm
actions:
backport:
branches:
- release/v4.1.x-lsm
- name: Backport patches to the release/v4.2.x branch
conditions:
- base=main
Expand Down
33 changes: 17 additions & 16 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@

The following table indicates the major ICS features available in the [currently active releases](./RELEASES.md#version-matrix):

| Feature | `v3.2.0` | `v3.3.0` | `v3.3.3-lsm` | `v4.0.0` | `v4.1.1` | `v4.1.1-lsm` |
|---------|---------:|---------:|-------------:|---------:|---------:|-------------:|
| [Channel initialization: new chains](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#channel-initialization-new-chains) |||||||
| [Validator set update](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#validator-set-update) |||||||
| [Completion of unbonding operations](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#completion-of-unbonding-operations) |||||||
| [Consumer initiated slashing](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#consumer-initiated-slashing) |||||||
| [Reward distribution](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#reward-distribution) |||||||
| [Consumer chain removal](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#consumer-chain-removal) |||||||
| [Key assignment](https://github.com/cosmos/interchain-security/issues/26) |||||||
| [Jail throttling](https://github.com/cosmos/interchain-security/issues/404) |||||||
| [Soft opt-out](https://github.com/cosmos/interchain-security/issues/851) |||||||
| [Channel initialization: existing chains](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#channel-initialization-existing-chains) (aka [Standalone to consumer changeover](https://github.com/cosmos/interchain-security/issues/756)) |||||||
| [Cryptographic verification of equivocation](https://github.com/cosmos/interchain-security/issues/732) |||||||
| [Jail throttling with retries](https://github.com/cosmos/interchain-security/issues/713) - consumer-side changes |||||||
| [Jail throttling with retries](https://github.com/cosmos/interchain-security/issues/713) - [provider-side changes](https://github.com/cosmos/interchain-security/issues/1102) |||||||
| [ICS epochs](https://cosmos.github.io/interchain-security/adrs/adr-014-epochs) |||||||
| Feature | `v3.2.0` | `v4.0.0` | `v4.2.0` | `v4.2.0-lsm` | `v5.0.0` |
|---------|---------:|---------:|---------:|-------------:|---------:|
| [Channel initialization: new chains](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#channel-initialization-new-chains) ||||||
| [Validator set update](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#validator-set-update) ||||||
| [Completion of unbonding operations](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#completion-of-unbonding-operations) ||||||
| [Consumer initiated slashing](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#consumer-initiated-slashing) ||||||
| [Reward distribution](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#reward-distribution) ||||||
| [Consumer chain removal](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#consumer-chain-removal) ||||||
| [Key assignment](https://github.com/cosmos/interchain-security/issues/26) ||||||
| [Jail throttling](https://github.com/cosmos/interchain-security/issues/404) ||||||
| [Soft opt-out](https://github.com/cosmos/interchain-security/issues/851) ||||||
| [Channel initialization: existing chains](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/overview_and_basic_concepts.md#channel-initialization-existing-chains) (aka [Standalone to consumer changeover](https://github.com/cosmos/interchain-security/issues/756)) ||||||
| [Cryptographic verification of equivocation](https://github.com/cosmos/interchain-security/issues/732) ||||||
| [Jail throttling with retries](https://github.com/cosmos/interchain-security/issues/713) - consumer-side changes ||||||
| [Jail throttling with retries](https://github.com/cosmos/interchain-security/issues/713) - [provider-side changes](https://github.com/cosmos/interchain-security/issues/1102) ||||||
| [ICS epochs](https://cosmos.github.io/interchain-security/adrs/adr-014-epochs) ||||||
| [Partial Set Security](https://cosmos.github.io/interchain-security/adrs/adr-015-partial-set-security) ||||||
35 changes: 13 additions & 22 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- [Stable Release Policy](#stable-release-policy)
- [Version Matrix](#version-matrix)
- [Backwards Compatibility](#backwards-compatibility)
- [Notes](#notes)

## Semantic Versioning

Expand Down Expand Up @@ -60,13 +59,12 @@ All missing minor release versions have been discontinued.
| Release | End of Life Date |
|---------|------------------|
| `v3.2.x` | July 10, 2024 |
| `v3.3.x` | July 10, 2024 |
| `v3.3.x-lsm` | July 10, 2024 |
| `v4.0.x` | January 24, 2025 |
| `v4.1.x` | January 24, 2025 |
| `v4.2.x` | January 24, 2025 |
| `v5.0.x` | May 9, 2025 |

**Note**: As of [Gaia v15.1.0](https://github.com/cosmos/gaia/releases/tag/v15.1.0),
the Cosmos Hub uses a fork of Cosmos SDK ([v0.47.10-ics-lsm](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.10-ics-lsm))
**Note**: As of [Gaia v17.2.0](https://github.com/cosmos/gaia/releases/tag/v17.2.0),
the Cosmos Hub uses a fork of Cosmos SDK ([v0.47.15-ics-lsm](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.15-ics-lsm))
that contains the Liquid Staking Module (LSM).
This means the Cosmos Hub requires a fork of ICS.
This fork is maintained by the development team and released using the `-lsm` prefix.
Expand All @@ -79,11 +77,10 @@ Versions of Golang, IBC, Cosmos SDK and CometBFT used by ICS in the currently ac
| ICS | Golang | IBC | Cosmos SDK | CometBFT | Note |
|-----|--------|-----|------------|----------|------|
| [v3.2.0](https://github.com/cosmos/interchain-security/releases/tag/v3.2.0) | 1.20 | v7.3.0 | v0.47.5 | v0.37.2 |
| [v3.3.0](https://github.com/cosmos/interchain-security/releases/tag/v3.3.0) | 1.20 | v7.3.0 | v0.47.5 | v0.37.2 |
| [v3.3.3-lsm](https://github.com/cosmos/interchain-security/releases/tag/v3.3.3-lsm) | 1.20 | v7.3.1 | v0.47.10-ics-lsm | v0.37.4 | Provider only (Cosmos Hub specific) |
| [v4.0.0](https://github.com/cosmos/interchain-security/releases/tag/v4.0.0) | 1.21 | v7.3.1 | v0.47.7 | v0.37.4 | Provider on >= v4.0.0 backwards compatible with consumers >= v3.2.0 |
| [v4.1.1](https://github.com/cosmos/interchain-security/releases/tag/v4.1.1) | 1.21 | v7.4.0 | v0.47.10 | v0.37.4 |
| [v4.1.1-lsm](https://github.com/cosmos/interchain-security/releases/tag/v4.1.1-lsm) | 1.21 | v7.4.0 | v0.47.12-ics-lsm | v0.37.4 | Provider only (Cosmos Hub specific) |
| [v4.2.0](https://github.com/cosmos/interchain-security/releases/tag/v4.2.0) | 1.21 | v7.4.0 | v0.47.11 | v0.37.6 |
| [v4.2.0-lsm](https://github.com/cosmos/interchain-security/releases/tag/v4.2.0-lsm) | 1.21 | v7.4.0 | v0.47.13-ics-lsm | v0.37.6 | Provider only (Cosmos Hub specific) |
| [v5.0.0](https://github.com/cosmos/interchain-security/releases/tag/v5.0.0) | 1.21 | v8.1.0 | v0.50.4 | v0.38.5 |

**Note:** For a list of major ICS features available in the currently active releases, see [FEATURES.md](./FEATURES.md).

Expand All @@ -93,15 +90,9 @@ A MAJOR version of ICS will always be backwards compatible with the previous MAJ

The following table indicates the compatibility of currently active releases:

| Consumer | Provider | `v3.2.0` | `v3.3.0` | `v3.3.3-lsm` | `v4.0.0` | `v4.1.1-lsm` |
|----------|----------|----------|----------|--------------|----------|--------------|
| `v3.2.0` ||| ✅ (1) ||||
| `v3.3.0` || ✅ (1) |||||
| `v4.0.0` || ✅ (1)| ✅ (1)| ✅ (1) |||
| `v4.1.1` || ✅ (1)| ✅ (1)| ✅ (1) |||

#### Notes

The following adjustments must be made to the CCV consumer genesis state that is obtained from the provider chain after the spawn time is reached in order for the consumer chain to start without errors.

- (1) Use `interchain-security-cd genesis transform` to transform the consumer genesis file obtained from the provider.
| Consumer | Provider | `v4.2.0-lsm` |
|----------|----------|--------------|
| `v3.2.0` |||
| `v4.0.0` |||
| `v4.2.0` |||
| `v5.0.0` |||
1 change: 1 addition & 0 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ var (
ibcclientclient.UpgradeProposalHandler,
ibcproviderclient.ConsumerAdditionProposalHandler,
ibcproviderclient.ConsumerRemovalProposalHandler,
ibcproviderclient.ConsumerModificationProposalHandler,
ibcproviderclient.ChangeRewardDenomsProposalHandler,
},
),
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/features/partial-set-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ For Top N chains, this is also the long term vision for how they are launched.

For Opt In chains, this is a temporary measure to prevent issues around chain ID squatting, i.e. someone could spuriously register many desirable chain IDs of upcoming consumer chain and simply deny legitimate consumer chains from using them. Eventually, the plan is to allow launching Opt In chains permissionlessly without going through governance, with quality control being handled by the market of validators deciding which chains they would like to validate on.
:::

:::tip
A running Top N consumer chain might want to become an Opt-In chain or vice versa. This can be achieved by issuing
a [`ConsumerModificationProposal`](./proposals.md#consumermodificationproposal).
:::
6 changes: 5 additions & 1 deletion docs/docs/features/power-shaping.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ an allowlist that is too short can very quickly become outdated and leave too fe
the power distribution on the provider shifts and the denylisted validators gain more power.

In general, when setting these parameters, consider that the voting power distribution in the future might be very different from the one right now,
and that the chain should be secure even if the power distribution changes significantly.
and that the chain should be secure even if the power distribution changes significantly.

:::tip
The power shaping parameters of a running consumer chain can be changed through a [`ConsumerModificationProposal`](./proposals.md#consumermodificationproposal).
:::
34 changes: 33 additions & 1 deletion docs/docs/features/proposals.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 3

# ICS Provider Proposals

Interchain security module introduces 3 new proposal types to the provider.
Interchain security module introduces new proposal types to the provider.

The proposals are used to propose upcoming interchain security events through governance.

Expand Down Expand Up @@ -84,6 +84,38 @@ After the introduction of Partial Set Security, the use of the soft opt-out mech
encouraged to use the topN parameter to not force validators with little stake to validate the chain.
:::


## `ConsumerModificationProposal`
Proposal type used to change the power shaping parameters of a running consumer chain, as well as to change a Top N running
consumer chain to an Opt-In chain and vice versa.

When a `ConsumerModificationProposal` passes for a running consumer chain, the consumer chain would change all its
parameters to the ones passed in the `ConsumerModificationProposal`.

Assume, a `chain-1` is a Top N chain. If the following `ConsumerModificationProposal` passes, then `chain-1` would become
an Opt-In chain with a 40% validators power cap, a maximum number of 30 validators, and one denylisted validator.
```js
{
"title": "Modify consumer chain",
"description": ".md description of your chain and all other relevant information",
"chain_id": "chain-1",
"top_N": 0,
"validators_power_cap": 40,
"validator_set_cap": 30,
"allowlist": [],
"denylist": ["cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq"]
}
```

:::warning
If `top_N`, `validators_power_cap`, or some other argument is not included in the proposal, then it is considered
that the default value is set for this argument. For example, if a Top 50% chain wants to only modify `validators_power_cap`
from 35 to 40, then the `ConsumerModificationProposal` would still need to include that `top_N` is 50. Otherwise
`top_N` would be set to its default value of 0, and the chain would become an Opt-In chain.

To be **safe**, always include `top_N` and all the power shaping parameters in your `ConsumerModificationProposal`.
:::

## ChangeRewardDenomProposal

Proposal type used to mutate the set of denoms accepted by the provider as rewards.
Expand Down
6 changes: 6 additions & 0 deletions docs/docs/frequently-asked-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@ Yes, the consumer chain will halt with an ERR CONSENSUS FAILURE error after the
## Can validators set a commission rate for chains they have not opted in to?
Yes, and this is useful for validators that are not in the top N% of the provider chain, but might move into the top N% in the future.
By setting the commission rate ahead of time, they can make sure that they immediately have a commission rate of their choosing as soon as they are in the top N%.

## Can a consumer chain modify its power shaping parameters?
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal).

## Can a Top N consumer chain become Opt-In or vice versa?
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal).
4 changes: 2 additions & 2 deletions docs/docs/validators/joining-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The experience gained in the testnet will prepare you for validating interchain
:::tip
Provider and consumer chain represent distinct networks and infrastructures operated by the same validator set.

For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs
For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/main/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs
:::

## Joining the provider chain
Expand Down Expand Up @@ -79,7 +79,7 @@ gaiad tx staking create-validator \
```
:::tip
Check this [guide](https://hub.cosmos.network/validators/validator-setup#edit-validator-description) to edit your validator.
Check this [guide](https://hub.cosmos.network/main/validators/validator-setup#edit-validator-description) to edit your validator.
:::
After this step, your validator is created and you can start your node and catch up to the rest of the network. It is recommended that you use `statesync` to catch up to the rest of the network.
Expand Down
Loading

0 comments on commit d2985d6

Please sign in to comment.