Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Sep 11, 2024
2 parents 778e478 + db9176c commit a9237d6
Show file tree
Hide file tree
Showing 61 changed files with 3,192 additions and 2,268 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
- Add the Permissionless ICS feature on the provider (as per
[ADR-019](https://cosmos.github.io/interchain-security/adrs/adr-019-permissionless-ics)),
which entails the following api-breaking changes on the provider.
([\#2171](https://github.com/cosmos/interchain-security/pull/2171))

- Deprecate the `chain-id` parameter in favour of `consumer-id` for all transactions and queries targeting a unique consumer chain. Below is a list highlighting the changes in the CLI commands. All commands assume the prefix `interchain-security-pd tx|q provider`.
- **Transactions:**
- `assign-consensus-key [consumer-id] [consumer-pubkey]`
-- submit a [MsgAssignConsensusKey](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L46)
- `opt-in [consumer-id] [consumer-pubkey]`
-- submit a [MsgOptIn](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L256)
- `opt-out [consumer-id]`
-- submit a [MsgOptOut](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L277)
- `set-consumer-commission-rate [consumer-id] [commission-rate]`
-- submit a [MsgSetConsumerCommissionRate](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L295)

- **Queries:**
- `consumer-genesis [consumer-id]` -- query for consumer chain genesis state by consumer id.
- REST:`/interchain_security/ccv/provider/consumer_genesis/{consumer_id}`

- `validator-consumer-key [consumer-id] [provider-validator-address]` -- query assigned validator consensus public key for a consumer chain.
- REST: `/interchain_security/ccv/provider/validator_consumer_addr/{consumer_id}/{provider_address}`

- `validator-provider-key [consumer-id] [consumer-validator-address]` -- query assigned validator consensus public key for the provider chain.
- REST: `/interchain_security/ccv/provider/validator_provider_addr/{consumer_id}/{consumer_address}`

- `consumer-opted-in-validators [consumer-id]` -- query opted-in validators for a given consumer chain.
- REST: `/interchain_security/ccv/provider/opted_in_validators/{consumer_id}`

- `consumer-validators [consumer-id]` -- query the last set consumer-validator set for a given consumer chain.
- REST: `/interchain_security/ccv/provider/consumer_validators/{consumer_id}`

- `validator-consumer-commission-rate [consumer-id]` -- query the consumer commission rate a validator charges on a consumer chain.
- REST: `/interchain_security/ccv/provider/consumer_commission_rate/{consumer_id}/{provider_address}`

- `all-pairs-valconsensus-address [consumer-id]` -- query all pairs of valconsensus address by consumer id.
- REST: `/interchain_security/ccv/provider/address_pairs/{consumer_id}`

- Deprecate the following queries, proposals and all legacy governance proposals:

- **Queries:**
- `list-start-proposals` -- query consumer chains start proposals on provider chain.
- REST: `/interchain_security/ccv/provider/consumer_chain_start_proposals`

- `list-stop-proposals` -- consumer chains stop proposals on provider chain.
- REST: `/interchain_security/ccv/provider/consumer_chain_stop_proposals`

- `list-proposed-consumer-chains` -- query chain ids in consumer addition proposal before voting finishes.
- REST: `/interchain_security/ccv/provider/proposed_consumer_chains`

- **Proposals:**
- [MsgConsumerAddition](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L121) -- deprecated in favor of [MsgCreateConsumer](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L360)
- [MsgConsumerRemoval](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L206) -- deprecated in favor of [MsgRemoveConsumer](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L225)
- [MsgConsumerModification](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L321) -- deprecated in favor of [MsgUpdateConsumer](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L383)

- **Legacy Proposals:**
- [ConsumerAdditionProposal](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/provider.proto#L31)
- [ConsumerModificationProposal](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/provider.proto#L140)
- [ConsumerRemovalProposal](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/provider.proto#L122)
- [ChangeRewardDenomsProposal](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/provider.proto#L192)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
- Add the Permissionless ICS feature on the provider (as per
[ADR-019](https://cosmos.github.io/interchain-security/adrs/adr-019-permissionless-ics)),
which entails the following CLI and API enhancements on the provider.
([\#2171](https://github.com/cosmos/interchain-security/pull/2171))

- Introduce new CLI commands and gRPC endpoints to manage consumer chains. All commands listed below assume the prefix `interchain-security-pd tx|q provider`.

- **Transactions:**
- `create-consumer [consumer-parameters]`
-- submit a [MsgCreateConsumer](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L360)
-- replace [ConsumerAdditionProposal](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/provider.proto#L31)

- `update-consumer [consumer-parameters]`
-- submit a [MsgUpdateConsumer](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L383)
-- replace [ConsumerModificationProposal](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/provider.proto#L140)

- `remove-consumer [consumer-id]`
-- submit a [MsgRemoveConsumer](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/tx.proto#L225)
-- replace [ConsumerRemovalProposal](https://github.com/cosmos/interchain-security/blob/a17a3851b5eb3cec515b711dceae0afe9c14c3f0/proto/interchain_security/ccv/provider/v1/provider.proto#L122)

> These new TX commands should be used instead of their corresponding deprecated proposals. To update consumer chains owned by the governance module, a proposal containing a `MsgUpdateConsumer` message must be submitted.
- **Queries:**
- `consumer-chain [consumer-id]`-- query details of a consumer chain associated with the consumer id.
- REST: `interchain-security/ccv/provider/consumer_chain/{consumer_id}`
- `consumer-id-from-client-id [client-id]` -- get the consumer id of a chain from a client id.
- REST: `interchain-security/ccv/provider/consumer_id/{client_id}`
- `blocks-until-next-epoch` -- query number of blocks remaining until the next epoch begins.
- REST: `interchain-security/ccv/provider/blocks_until_next_epoch`

- Improve the `list-consumer-chains` query to accept optional parameters `[phase]` and `[limit]`:
- `[phase]`: Filters returned consumer chains by their phase.
- `[limit]`: Limits the number of consumer chains returned.
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: |
sudo apt-get install codespell -y
codespell -w --skip="*.pb.go,*.pb.gw.go,*.json,*.git,*.js" --ignore-words=.github/.codespellignore
- uses: peter-evans/create-pull-request@v6
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PRBOT_PAT }}
commit-message: "chore: spelling errors fixes"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# Run compatibility tests for different consumer (-cv) and provider (-pv) versions.
# Combination of all provider versions with consumer versions are tested.
# For new versions to be tested add/modify -pc/-cv parameters.
run: go run ./tests/e2e/... --tc compatibility -pv latest -pv v4.3.1-lsm -pv v3.3.3-lsm -cv latest -cv v4.4.0 -cv v3.3.0
run: go run ./tests/e2e/... --tc compatibility -pv latest -cv latest -cv v5.2.0 -cv v4.4.0
happy-path-test:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.39.0
- uses: bufbuild/buf-setup-action@v1.40.1
- uses: bufbuild/buf-push-action@v1
with:
input: "proto"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.39.0
- uses: bufbuild/buf-setup-action@v1.40.1
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
COMMIT := $(shell git log -1 --format='%H')
# Fetch tags and get the latest ICS version by filtering tags by vX.Y.Z and vX.Y.Z-lsm
# using lazy set to only execute commands when variable is used
# Note: v.5.0.0 is currently excluded from the list as it's a pre-release and will be added back once it's out of pre-release status
LATEST_RELEASE ?= $(shell git fetch; git tag -l --sort -v:refname 'v*.?' 'v*.?'-lsm 'v*.??' 'v*.??'-lsm --no-contains v5.0.0 | head -n 1)
LATEST_RELEASE ?= $(shell git fetch; git tag -l --sort -v:refname 'v*.?' 'v*.?'-lsm 'v*.??' 'v*.??'-lsm | head -n 1)

# don't override user values
ifeq (,$(VERSION))
Expand Down Expand Up @@ -98,9 +97,9 @@ test-e2e-multi-consumer:
test-e2e-parallel:
go run ./tests/e2e/... --include-multi-consumer --parallel

# run E2E compatibility tests against latest release
# run E2E compatibility tests against consumer running latest release
test-e2e-compatibility-tests-latest:
go run ./tests/e2e/... --tc compatibility -pv $(LATEST_RELEASE)
go run ./tests/e2e/... --tc compatibility -cv $(LATEST_RELEASE)

# run full E2E tests in sequence (including multiconsumer) using latest tagged gaia
test-gaia-e2e:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=cosmos_interchain-security&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=cosmos_interchain-security)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=cosmos_interchain-security&metric=coverage)](https://sonarcloud.io/summary/new_code?id=cosmos_interchain-security)

**interchain-security** contains a working and in-production implementation of the Replicated Security protocol (aka Interchain Security V1). Replicated security is an open sourced IBC application which allows cosmos blockchains to lease their proof-of-stake security to one another.
**interchain-security** contains a working and in-production implementation of the Interchain Security (ICS) protocol. ICS is an open sourced IBC application which allows cosmos blockchains to lease their proof-of-stake security to one another.

For more details on the **Replicated Security protocol**, take a look at the [docs](https://cosmos.github.io/interchain-security/) or [technical specification](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/README.md).
For more details on the **Interchain Security protocol**, take a look at the [docs](https://cosmos.github.io/interchain-security/) or [technical specification](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/README.md).

For a list of **currently active releases**, see [RELEASES.md](./RELEASES.md#version-matrix).

Expand Down
Loading

0 comments on commit a9237d6

Please sign in to comment.