Skip to content

Commit

Permalink
Merge branch 'release/v6.2.x' of github.com:cosmos/ibc-go into releas…
Browse files Browse the repository at this point in the history
…e/v6.2.0
  • Loading branch information
iramiller committed Aug 24, 2023
2 parents f18fd1a + eb90640 commit 423bc6c
Show file tree
Hide file tree
Showing 36 changed files with 1,717 additions and 357 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ write a little note why.

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting)).
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/10-structure.md).
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/11-structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing).
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`).
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/[email protected]
with:
version: latest
version: v1.51.2
args: --timeout 5m
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: '1.19'

- name: Release
uses: goreleaser/goreleaser-action@v3
Expand Down Expand Up @@ -51,4 +51,5 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
IBC_GO_VERSION="${{ github.ref_name }}"
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- name: install tparse
Expand All @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -52,6 +52,13 @@ jobs:
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build

docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker Build
run: docker build . --no-cache --build-arg IBC_GO_VERSION=v6.1.0

split-test-files:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -89,7 +96,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand Down
7 changes: 6 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ run:
linters:
disable-all: true
enable:
- deadcode
- depguard
- dogsled
- exportloopref
Expand All @@ -33,6 +32,12 @@ linters:

issues:
exclude-rules:
- text: "is unused for linter"
linters:
- nolintlint
- text: "SA1019:"
linters:
- staticcheck
- text: "Use of weak random number generator"
linters:
- gosec
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,39 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [[Unreleased]]

### Dependencies

### API Breaking

### State Machine Breaking

### Improvements

### Features

### Bug Fixes

## [v6.2.0](https://github.com/cosmos/ibc-go/releases/tag/v6.2.0) - 2023-05-31

### Dependencies

* [\#3393](https://github.com/cosmos/ibc-go/pull/3393) Bump Cosmos SDK to v0.46.12 and replace Tendermint with CometBFT v0.34.37.

### Improvements

* (core) [\#3082](https://github.com/cosmos/ibc-go/pull/3082) Add `HasConnection` and `HasChannel` methods.
* (apps/transfer) [\#3454](https://github.com/cosmos/ibc-go/pull/3454) Support transfer authorization unlimited spending when the max `uint256` value is provided as limit.

### Features

* [\#3079](https://github.com/cosmos/ibc-go/pull/3079) Add authz support for ics20.

### Bug Fixes

* [\#3346](https://github.com/cosmos/ibc-go/pull/3346) Properly handle ordered channels in `UnreceivedPackets` query.

## [v6.1.0](https://github.com/cosmos/ibc-go/releases/tag/v6.1.0) - 2022-12-20

### Dependencies
Expand Down
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM golang:1.18 as builder
FROM golang:1.19 as builder

ARG IBC_GO_VERSION

ENV GOPATH=""
ENV GOMODULE="on"

# ensure the ibc go version is being specified for this image.
RUN test -n "${IBC_GO_VERSION}"

COPY go.mod .
COPY go.sum .

Expand All @@ -14,10 +19,15 @@ ADD LICENSE LICENSE

COPY Makefile .


RUN make build

FROM ubuntu:20.04

ARG IBC_GO_VERSION

LABEL "org.cosmos.ibc-go" "${IBC_GO_VERSION}"

COPY --from=builder /go/build/simd /bin/simd

ENTRYPOINT ["simd"]
5 changes: 5 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ module.exports = {
directory: false,
path: "/apps/transfer/params.html",
},
{
title: "Authorizations",
directory: false,
path: "/apps/transfer/authorizations.html",
},
],
},
],
Expand Down
47 changes: 47 additions & 0 deletions docs/apps/transfer/authorizations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# `TransferAuthorization`

`TransferAuthorization` implements the `Authorization` interface for `ibc.applications.transfer.v1.MsgTransfer`. It allows a granter to grant a grantee the privilege to submit `MsgTransfer` on its behalf. Please see the [Cosmos SDK docs](https://docs.cosmos.network/v0.47/modules/authz) for more details on granting privileges via the `x/authz` module.

More specifically, the granter allows the grantee to transfer funds that belong to the granter over a specified channel.

For the specified channel, the granter must be able to specify a spend limit of a specific denomination they wish to allow the grantee to be able to transfer.

The granter may be able to specify the list of addresses that they allow to receive funds. If empty, then all addresses are allowed.


It takes:

- a `SourcePort` and a `SourceChannel` which together comprise the unique transfer channel identifier over which authorized funds can be transferred.

- a `SpendLimit` that specifies the maximum amount of tokens the grantee can transfer. The `SpendLimit` is updated as the tokens are transfered, unless the sentinel value of the maximum value for a 256-bit unsigned integer (i.e. 2^256 - 1) is used for the amount, in which case the `SpendLimit` will not be updated (please be aware that using this sentinel value will grant the grantee the privilege to transfer **all** the tokens of a given denomination available at the granter's account). The helper function `UnboundedSpendLimit` in the `types` package of the `transfer` module provides the sentinel value that can be used. This `SpendLimit` may also be updated to increase or decrease the limit as the granter wishes.

- an `AllowList` list that specifies the list of addresses that are allowed to receive funds. If this list is empty, then all addresses are allowed to receive funds from the `TransferAuthorization`.

Setting a `TransferAuthorization` is expected to fail if:
- the spend limit is nil
- the denomination of the spend limit is an invalid coin type
- the source port ID is invalid
- the source channel ID is invalid
- there are duplicate entries in the `AllowList`

Below is the `TransferAuthorization` message:

```golang
func NewTransferAuthorization(allocations ...Allocation) *TransferAuthorization {
return &TransferAuthorization{
Allocations: allocations,
}
}

type Allocation struct {
// the port on which the packet will be sent
SourcePort string
// the channel by which the packet will be sent
SourceChannel string
// spend limitation on the channel
SpendLimit sdk.Coins
// allow list of receivers, an empty allow list permits any receiver address
AllowList []string
}

```
2 changes: 1 addition & 1 deletion docs/ibc/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func NewApp(...args) *App {
### Module Managers
In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/13-simulator.md).
In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/14-simulator.md).
```go
// app.go
Expand Down
54 changes: 54 additions & 0 deletions docs/ibc/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@

- [Msg](#ibc.applications.transfer.v1.Msg)

- [ibc/applications/transfer/v2/authz.proto](#ibc/applications/transfer/v2/authz.proto)
- [PortChannelAmount](#ibc.applications.transfer.v2.PortChannelAmount)
- [TransferAuthorization](#ibc.applications.transfer.v2.TransferAuthorization)

- [ibc/applications/transfer/v2/packet.proto](#ibc/applications/transfer/v2/packet.proto)
- [FungibleTokenPacketData](#ibc.applications.transfer.v2.FungibleTokenPacketData)

Expand Down Expand Up @@ -2291,6 +2295,56 @@ Msg defines the ibc/transfer Msg service.



<a name="ibc/applications/transfer/v2/authz.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## ibc/applications/transfer/v2/authz.proto



<a name="ibc.applications.transfer.v2.PortChannelAmount"></a>

### PortChannelAmount



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `source_port` | [string](#string) | | the port on which the packet will be sent |
| `source_channel` | [string](#string) | | the channel by which the packet will be sent |
| `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | spend limitation on the channel |
| `allowed_addresses` | [string](#string) | repeated | |






<a name="ibc.applications.transfer.v2.TransferAuthorization"></a>

### TransferAuthorization
TransferAuthorization allows the grantee to spend up to spend_limit coins from
the granter's account for ibc transfer on a specific channel


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `allocations` | [PortChannelAmount](#ibc.applications.transfer.v2.PortChannelAmount) | repeated | port and channel amounts |





<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="ibc/applications/transfer/v2/packet.proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down
Loading

0 comments on commit 423bc6c

Please sign in to comment.