Skip to content

Commit

Permalink
Merge branch 'main' into fix-export
Browse files Browse the repository at this point in the history
  • Loading branch information
yaruwangway committed Jul 19, 2023
2 parents 0344988 + b03f6f0 commit 36a8a6b
Show file tree
Hide file tree
Showing 157 changed files with 3,441 additions and 1,546 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ updates:
open-pull-requests-limit: 0
labels:
- dependencies

- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
target-branch: "release/v3.1.x"
# Only allow automated security-related dependency updates on release branches.
open-pull-requests-limit: 0
labels:
- dependencies
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
make build-docs
- name: Deploy 🚀
uses: JamesIves/[email protected].2
uses: JamesIves/[email protected].3
with:
branch: gh-pages
folder: ~/output
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/proto-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Buf-Push
# Protobuf runs buf (https://buf.build/) push updated proto files to https://buf.build/cosmos/interchain-security
# This workflow is only run when a .proto file has been changed
on:
push:
branches:
- main
paths:
- "proto/**"

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/[email protected]
- uses: bufbuild/buf-push-action@v1
with:
input: "proto"
buf_token: ${{ secrets.BUF_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been changed
on:
pull_request:
paths:
- "proto/**"

permissions:
contents: read

jobs:
break-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/[email protected]
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto"
13 changes: 12 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ run:
linters:
disable-all: true
enable:
- depguard
- dogsled
- exportloopref
- gci
- goconst
- gocritic
- gofumpt
Expand Down Expand Up @@ -60,6 +60,17 @@ issues:
max-same-issues: 10000

linters-settings:
gci:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- blank # blank imports
- dot # dot imports
- prefix(cosmossdk.io)
- prefix(github.com/cosmos/cosmos-sdk)
- prefix(github.com/cometbft/cometbft)
- prefix(github.com/cosmos/interchain-security)
custom-order: true
gofumpt:
# Choose whether to use the extra rules.
# Default: false
Expand Down
8 changes: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ pull_request_rules:
backport:
branches:
- release/v3.0.x
- name: Backport patches to the release/v3.1.x branch
conditions:
- base=main
- label=A:backport/v3.1.x
actions:
backport:
branches:
- release/v3.1.x
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,27 @@
Add an entry to the unreleased section whenever merging a PR to main that is not targeted at a specific release. These entries will eventually be included in a release.
* `[x/ccv/provider]` (fix) [#1076](https://github.com/cosmos/interchain-security/pull/1076) Add `InitTimeoutTimestamps` and `ExportedVscSendTimestamps` to exported genesis.

* (fix!) revert consumer packet data changes from #1037 [#1150](https://github.com/cosmos/interchain-security/pull/1150)
* (fix!) proper deletion of pending packets [#1146](https://github.com/cosmos/interchain-security/pull/1146)
* (feat!) optimize pending packets storage on consumer, with migration! [#1037](https://github.com/cosmos/interchain-security/pull/1037)

## v3.1.0

Date July 11th, 2023

A minor upgrade to v3.0.0, which removes the panic in the consumer ccv module which would occur in an emergency scenario where the ccv channel is closed. This release also fixes how a distribution related event is emitted, and bumps cometbft.

* (feat) [#1127](https://github.com/cosmos/interchain-security/pull/1127) Remove consumer panic when ccv channel is closed
* (fix) [#720](https://github.com/cosmos/interchain-security/issues/720) Fix the attribute `AttributeDistributionTotal` value in `FeeDistribution` event emit.
* (deps) [#1119](https://github.com/cosmos/interchain-security/pull/1119) bump cometbft from `v0.37.1` to `0.37.2`.

## v3.0.0

Date: June 21st, 2023

Interchain Security v3 uses SDK 0.47 and IBC 7.
Interchain Security v3 uses SDK 0.47 and IBC 7.

* (fix) [#1093](https://github.com/cosmos/interchain-security/pull/1093) Make SlashPacketData backward compatible when sending data over the wire
* (deps) [#1019](https://github.com/cosmos/interchain-security/pull/1019) Bump multiple dependencies.
* Bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.47.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.3).
* Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v7.1.0](https://github.com/cosmos/ibc-go/releases/tag/v7.1.0).
Expand Down
27 changes: 27 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
A release notes template that should be adapted for every release
- release: <v*.*.*>
- release branch: <v*.*.x>
- the last release: <v-last>
- the last release branch: <v-last.x>
-->

# Replicated Security <v*.*.*> Release Notes

## 📝 Changelog

Check out the [changelog](https://github.com/cosmos/interchain-security/blob/<v*.*.*>/CHANGELOG.md) for a list of relevant changes or [compare all changes](https://github.com/cosmos/interchain-security/compare/release/<v-last>...<v*.*.*>) from last release.

<!-- Add the following line for major releases -->
Refer to the [upgrading guide](https://github.com/cosmos/interchain-security/blob/release/<v*.x>/UPGRADING.md) when migrating from `<v-last.x>` to `<v*.x>`.

## 🚀 Highlights

<!-- Add any highlights of this release -->

## ❤️ Contributors

* Informal Systems ([@informalinc](https://twitter.com/informalinc))

This list is non-exhaustive and ordered alphabetically.
Thank you to everyone who contributed to this release!
73 changes: 73 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Upgrading Replicated Security

This guide provides instructions for upgrading to specific versions of Replicated Security.

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

### Upgrading to Cosmos SDK 0.47

The following should be considered as complementary to [Cosmos SDK v0.47 UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc2/UPGRADING.md).

#### Protobuf

Protobuf code generation, linting and formatting have been updated to leverage the `ghcr.io/cosmos/proto-builder:0.11.5` docker container. Replicated Security protobuf definitions are now packaged and published to [buf.build/cosmos/interchain-security](buf.build/cosmos/interchain-security) via CI workflows. The `third_party/proto` directory has been removed in favour of dependency management using [buf.build](https://docs.buf.build/introduction).

#### App modules

Legacy APIs of the `AppModule` interface have been removed from ccv modules. For example, for

```diff
- // Route implements the AppModule interface
- func (am AppModule) Route() sdk.Route {
- return sdk.Route{}
- }
-
- // QuerierRoute implements the AppModule interface
- func (AppModule) QuerierRoute() string {
- return types.QuerierRoute
- }
-
- // LegacyQuerierHandler implements the AppModule interface
- func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier {
- return nil
- }
-
- // ProposalContents doesn't return any content functions for governance proposals.
- func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent {
- return nil
- }
```

#### Imports

Imports for ics23 have been updated as the repository have been migrated from confio to cosmos.

```diff
import (
// ...
- ics23 "github.com/confio/ics23/go"
+ ics23 "github.com/cosmos/ics23/go"
// ...
)
```

Imports for gogoproto have been updated.

```diff
import (
// ...
- "github.com/gogo/protobuf/proto"
+ "github.com/cosmos/gogoproto/proto"
// ...
)
```

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

### Provider

Upgrading a provider from `v1.1.0-multiden` to `v2.0.0` will require state migrations. See [migration.go](./x/ccv/provider/keeper/migration.go). See the provider module's `ConsensusVersion` in [module](./x/ccv/provider/module.go).

### Consumer

Upgrading a consumer from `v1.2.0-multiden` to `v2.0.0` will NOT require state migrations. See the consumer module's `ConsensusVersion` in [module](./x/ccv/consumer/module.go).
1 change: 0 additions & 1 deletion app/consumer-democracy/ante/forbidden_proposals_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"

govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
)
Expand Down
7 changes: 4 additions & 3 deletions app/consumer-democracy/ante/forbidden_proposals_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package ante_test
import (
"testing"

ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
"github.com/stretchr/testify/require"

sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/cosmos/cosmos-sdk/x/params/types/proposal"

app "github.com/cosmos/interchain-security/v3/app/consumer-democracy"
"github.com/cosmos/interchain-security/v3/app/consumer-democracy/ante"
"github.com/stretchr/testify/require"

ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
)

// in SDKv47 parameter updates full params object is required
Expand Down
7 changes: 5 additions & 2 deletions app/consumer-democracy/ante_handler.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package app

import (
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

errorsmod "cosmossdk.io/errors"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

democracyante "github.com/cosmos/interchain-security/v3/app/consumer-democracy/ante"
consumerante "github.com/cosmos/interchain-security/v3/app/consumer/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper"
Expand Down
Loading

0 comments on commit 36a8a6b

Please sign in to comment.