Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade relayer #4

Merged
merged 60 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d5e3882
Better Error Messaging when failing to query the Block Height (#1189)
keefertaylor May 18, 2023
debdee7
penumbra: update protos (#1181)
conorsch May 19, 2023
23d1e5c
Neutron launch fixes and optimizations (#1185)
agouin May 24, 2023
736e48b
Problem: fixes in ibc-go v7.0.1 are not included (#1205)
mmsqe May 31, 2023
de95076
Harry/rly address (#1204)
Cosmos-Harry Jun 1, 2023
e95dd80
deps: update to ibc-go v7.1.0-rc0 (#1207)
jtieri Jun 7, 2023
0981e67
Export wallet address for Prometheus metrics (#1206)
boojamya Jun 8, 2023
4ec767a
chore: replace gogo/protobuf to cosmos/gogoproto (#1208)
mmsqe Jun 28, 2023
049b5b4
feat: add extension_options parameter in chain configs (#1179)
mmsqe Jun 29, 2023
b4653dd
feat: support localhost ibc (#1191)
jtieri Jun 29, 2023
253a641
dep: bump cometbft and ibc-go (#1221)
mmsqe Jul 5, 2023
d0a4010
add missing stop relayer to avoid log after test complete (#1229)
mmsqe Jul 5, 2023
ea035d5
fix: avoid invalid Bech32 prefix in scenario test (#1226)
mmsqe Jul 6, 2023
1bfe06c
wait more blks for ack (#1222)
mmsqe Jul 6, 2023
91f9105
penumbra provider: update proof spec (#1232)
avahowell Jul 7, 2023
4a3237d
fix: flag accessed but not defined: flush-interval (#1238)
mindcarver Jul 12, 2023
af73416
penumbra provider: update protos (#1245)
avahowell Jul 22, 2023
73d338a
fix: Suppressing scary SDK error on redundant packets (#1214)
joeabbey Jul 22, 2023
7ae1596
catch error if type is missing (#1234)
murataniloener Jul 25, 2023
22bce42
Export client expiration metric to prometheus (#1235)
boojamya Jul 25, 2023
55084bd
Export configured gas prices to prometheus wallet balance metric (#1236)
boojamya Jul 25, 2023
107d3f5
Exports block query errors to prometheus metrics (counter) (#1239)
boojamya Jul 25, 2023
3c78287
Export TX failures to prometheus metrics (counter) (#1240)
boojamya Jul 25, 2023
993c21b
use the name given by the user to generate the fetch URL (#1233)
murataniloener Jul 26, 2023
cdd7661
feegrant PR (#1140)
KyleMoser Jul 27, 2023
5236f6f
Export Client Trusting Period to Prometheus metrics (#1246)
boojamya Jul 27, 2023
f054ac4
separate feegrant test to avoid no space left on device (#1250)
mmsqe Jul 29, 2023
1301e1d
Add extra client info when querying client expiration (#1247)
boojamya Jul 29, 2023
ab1c4fc
next seq ack handling (#1244)
agouin Jul 31, 2023
d878a55
chore: update penumbra protos to v0.57.0 (#1249)
conorsch Jul 31, 2023
2138221
fix: reduce get bech32 prefix when get signer (#1231)
mmsqe Aug 1, 2023
a63cd79
update setup-go action (#1251)
boojamya Aug 2, 2023
4598b0e
fix for feegrants (#1256)
KyleMoser Aug 15, 2023
811004c
chore: update penumbra protos (#1260)
conorsch Aug 15, 2023
b7e185e
Change 2.3.0 to 2.4.0 (#1253)
Sr20dem Aug 16, 2023
3415e6a
rename path to path_name for consistency (#1262)
danbryan Aug 17, 2023
c3f07c6
Use unique names for relayer images & cleanup when purpose served (#1…
vimystic Aug 29, 2023
dcd6d37
use ibc-go capability module (#1277)
faddat Sep 1, 2023
2fadd37
fix: use resp.Events to parse events instead of logs (#1271)
colin-axner Sep 5, 2023
7b073b3
working correctly with 7.3 and 0.47.5 (#1280)
faddat Sep 6, 2023
b5dce36
Add use command to "rly keys" (#1282)
vimystic Sep 7, 2023
256544c
Update README.md with an update to leverage 'rly key use' in step 5 (…
vimystic Sep 8, 2023
7c773fb
Ability to fetch specific chain paths only (#1291)
Reecepbcups Sep 11, 2023
0c1441c
faddat/upgrade go (#1279)
faddat Sep 12, 2023
2aa59be
Split scenarios test (#1294)
vimystic Sep 12, 2023
4d47b66
Add verbosity and timeout for scenarios tests (#1295)
vimystic Sep 13, 2023
49290ac
Add output flag for query sub commands results printed to console. …
vimystic Sep 13, 2023
cf88c21
Add ability to fetch testnet chains and paths + force-add ability (#1…
boojamya Sep 13, 2023
2aca133
update interchaintest workflow (#1298)
boojamya Sep 13, 2023
259b127
Query param prop directly (#1264)
vimystic Sep 13, 2023
ce11f24
Saga IBC transfers between SPC and chainlet
luckychess Jun 14, 2023
9b1026f
Set keystore password
luckychess Jun 22, 2023
2a284ad
Poll chainlet until it's up and running
luckychess Jun 23, 2023
7d8b5c4
Remove unused mnemonic file
luckychess Jun 30, 2023
31c748d
Rename example .json files to .json.example
luckychess Jun 30, 2023
3cfbd7a
Env vars renaming
luckychess Jul 3, 2023
fd24ad0
Rename SPC_EXTERNAL_ADDRESS -> SPC_RPC_EXTERNAL_ADDRESS
luckychess Jul 3, 2023
bfdb6bf
Feature/ccv (#2)
ashishchandr70 Sep 12, 2023
deb0267
Committing go.work.sum
Sep 27, 2023
2a20514
Merge branch 'cosmos-main' into upgrade-relayer
Sep 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: '1.21'

# setup gopath
- name: Set PATH
Expand All @@ -40,4 +40,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: rly
path: ./build/rly
path: ./build/rly
156 changes: 127 additions & 29 deletions .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ jobs:
events:
runs-on: self-hosted
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.20
id: go
go-version: '1.21'

- name: checkout relayer
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
Expand All @@ -32,18 +33,19 @@ jobs:
legacy:
runs-on: self-hosted
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.20
id: go
go-version: '1.21'

- name: checkout relayer
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
Expand All @@ -54,43 +56,139 @@ jobs:
multiple-paths:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.20
id: go
go-version: '1.21'

- name: checkout relayer
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: interchaintest
run: make interchaintest-multiple

misbehaviour:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: checkout relayer
uses: actions/checkout@v4

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: interchaintest
run: make interchaintest-misbehaviour

fee-middleware:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: checkout relayer
uses: actions/checkout@v4

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: interchaintest
run: make interchaintest-fee-middleware

fee-grant:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: checkout relayer
uses: actions/checkout@v4

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: interchaintest
run: make interchaintest-fee-grant

prepare-scenario-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Generate matrix
id: set-matrix
run: |
# Run the command and convert its output to a JSON array
TESTS=$(cd interchaintest && go test -list ^TestScenario | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=${TESTS}" >> $GITHUB_OUTPUT

# Note : This job will not start until prepare-scenario-matrix completes sucessfully
scenarios:
needs: prepare-scenario-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: ${{fromJson(needs.prepare-scenario-matrix.outputs.matrix)}}

steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.20
id: go
go-version: '1.21'

- name: checkout relayer
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: interchaintest
run: make interchaintest-scenario
run: |
cd interchaintest
go test -timeout 30m -race -v -run ${{ matrix.test }}

8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Release"
name: 'Release'

on:
push:
Expand All @@ -15,11 +15,11 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version: '1.21'

- run: echo https://github.com/cosmos/relayer/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md
- run: echo https://github.com/cosmos/relayer/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md

- name: setup release environment
run: |-
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
* [\#1177](https://github.com/cosmos/relayer/pull/1177) Avoid panic due to nil map when add new path and ensure path get written to config.
* [\#1178](https://github.com/cosmos/relayer/pull/1178) Add max-gas-amount parameter in chain configs.
* [\#1180](https://github.com/cosmos/relayer/pull/1180) Update SDK from v0.47.0 to v0.47.2.
* [\#1205](https://github.com/cosmos/relayer/pull/1205) Update ibc-go to v7.0.1.
* [\#1179](https://github.com/cosmos/relayer/pull/1179) Add extension-options parameter in chain configs and update SDK to v0.47.3.
* [\#1208](https://github.com/cosmos/relayer/pull/1208) Replace gogo/protobuf to cosmos/gogoproto.
* [\#1221](https://github.com/cosmos/relayer/pull/1221) Update cometbft to v0.37.2 and ibc-go to v7.2.0.
* [\#1226](https://github.com/cosmos/relayer/pull/1226) Avoid invalid Bech32 prefix error in parallel tests when sdk Config get overwritten by each other in single process.
* [\#1231](https://github.com/cosmos/relayer/pull/1231) Reduce get bech32 prefix when get signer.

## v0.9.3

Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
FROM --platform=$BUILDPLATFORM golang:1.20-alpine3.16 AS build-env
FROM --platform=$BUILDPLATFORM golang:1.21-alpine3.17 AS build-env

RUN apk add --update --no-cache curl make git libc-dev bash gcc linux-headers eudev-dev

ARG TARGETARCH
ARG BUILDARCH

RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then \
wget -c https://musl.cc/aarch64-linux-musl-cross.tgz -O - | tar -xzvv --strip-components 1 -C /usr; \
wget -c https://musl.cc/aarch64-linux-musl-cross.tgz -O - | tar -xzvv --strip-components 1 -C /usr; \
elif [ "${TARGETARCH}" = "amd64" ] && [ "${BUILDARCH}" != "amd64" ]; then \
wget -c https://musl.cc/x86_64-linux-musl-cross.tgz -O - | tar -xzvv --strip-components 1 -C /usr; \
wget -c https://musl.cc/x86_64-linux-musl-cross.tgz -O - | tar -xzvv --strip-components 1 -C /usr; \
fi

ADD . .

RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then \
export CC=aarch64-linux-musl-gcc CXX=aarch64-linux-musl-g++;\
export CC=aarch64-linux-musl-gcc CXX=aarch64-linux-musl-g++;\
elif [ "${TARGETARCH}" = "amd64" ] && [ "${BUILDARCH}" != "amd64" ]; then \
export CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++; \
export CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++; \
fi; \
GOOS=linux GOARCH=$TARGETARCH CGO_ENABLED=1 LDFLAGS='-linkmode external -extldflags "-static"' make install

Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ interchaintest-legacy:
interchaintest-multiple:
cd interchaintest && go test -race -v -run TestRelayerMultiplePathsSingleProcess .

interchaintest-misbehaviour:
cd interchaintest && go test -race -v -run TestRelayerMisbehaviourDetection .

interchaintest-fee-middleware:
cd interchaintest && go test -race -v -run TestRelayerFeeMiddleware .

interchaintest-fee-grant:
cd interchaintest && go test -race -v -run TestRelayerFeeGrant .

interchaintest-scenario: ## Scenario tests are suitable for simple networks of 1 validator and no full nodes. They test specific functionality.
cd interchaintest && go test -timeout 30m -race -v -run TestScenario ./...

Expand Down
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Additional information on how IBC works can be found [here](https://ibc.cosmos.n

```shell
$ git clone https://github.com/cosmos/relayer.git
$ cd relayer && git checkout v2.3.0
$ cd relayer && git checkout v2.4.0
$ make install
```

Expand All @@ -58,15 +58,15 @@ Additional information on how IBC works can be found [here](https://ibc.cosmos.n
```
**Default config file location:** `~/.relayer/config/config.yaml`

By default, transactions will be relayed with a memo of `rly(VERSION)` e.g. `rly(v2.3.0)`.
By default, transactions will be relayed with a memo of `rly(VERSION)` e.g. `rly(v2.4.0)`.

To customize the memo for all relaying, use the `--memo` flag when initializing the configuration.

```shell
$ rly config init --memo "My custom memo"
```

Custom memos will have `rly(VERSION)` appended. For example, a memo of `My custom memo` running on relayer version `v2.3.0` would result in a transaction memo of `My custom memo | rly(v2.3.0)`.
Custom memos will have `rly(VERSION)` appended. For example, a memo of `My custom memo` running on relayer version `v2.4.0` would result in a transaction memo of `My custom memo | rly(v2.4.0)`.

The `--memo` flag is also available for other `rly` commands also that involve sending transactions such as `rly tx link` and `rly start`. It can be passed there to override the `config.yaml` value if desired.

Expand Down Expand Up @@ -112,18 +112,14 @@ Additional information on how IBC works can be found [here](https://ibc.cosmos.n
$ rly keys restore osmosis [key-name] "mnemonic words here"
```

5. **Edit the relayer's `key` values in the config file to match the `key-name`'s chosen above.**
5. **Use the `key-name` created above.**

>This step is necessary if you chose a `key-name` other than "default"

Example:
```yaml
- type: cosmos
value:
key: YOUR-KEY-NAME-HERE
chain-id: cosmoshub-4
rpc-addr: http://localhost:26657
```
```shell
$ rly keys use cosmoshub [key-name]
$ rly keys use osmosis [key-name]
```

6. **Ensure the keys associated with the configured chains are funded.**

Expand Down
31 changes: 31 additions & 0 deletions cmd/appstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,34 @@ func (a *appState) updatePathConfig(
return nil
})
}

func (a *appState) useKey(chainName, key string) error {

chain, exists := a.config.Chains[chainName]
if !exists {
return fmt.Errorf("chain %s not found in config", chainName)
}

cc := chain.ChainProvider

info, err := cc.ListAddresses()
if err != nil {
return err
}
value, exists := info[key]
currentValue := a.config.Chains[chainName].ChainProvider.Key()

if currentValue == key {
return fmt.Errorf("config is already using %s -> %s for %s", key, value, cc.ChainName())
}

if exists {
fmt.Printf("Config will now use %s -> %s for %s\n", key, value, cc.ChainName())
} else {
return fmt.Errorf("key %s does not exist for chain %s", key, cc.ChainName())
}
return a.performConfigLockingOperation(context.Background(), func() error {
a.config.Chains[chainName].ChainProvider.UseKey(key)
return nil
})
}
Loading
Loading