Skip to content

Commit c1edb60

Browse files
Merge pull request #257 from cardano-foundation/chore/upgradable-relayer
Chore/upgradable relayer
2 parents 64ac179 + 239a21a commit c1edb60

File tree

9,321 files changed

+169284
-6019878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,321 files changed

+169284
-6019878
lines changed

chains/cardano/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
yaci/
1+
yaci/
2+
db-sync-configuration/

relayer/.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
build/
2+
chain-code/
3+
clib/
4+
data/
5+
scripts/
6+
testnets/
7+
two-chains/

relayer/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ SRC_MNEMONIC="direct language gravity into finger nurse rug rug spoon toddler mu
2222

2323
DST_CHAIN_NAME=ibc-1
2424
DST_PORT=transfer
25-
DST_MNEMONIC="engage vote never tired enter brain chat loan coil venture soldier shine awkward keen delay link mass print venue federal ankle valid upgrade balance"
25+
DST_MNEMONIC="engage vote never tired enter brain chat loan coil venture soldier shine awkward keen delay link mass print venue federal ankle valid upgrade balance"

relayer/.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# CODEOWNERS: https://help.github.com/articles/about-codeowners/
2+
* @jackzampolin @jtieri @boojamya @mark-rushakoff
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: BUILD - build and binary upload
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: build
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Install and setup go
15+
- name: Set up Go 1.21
16+
uses: actions/setup-go@v4
17+
with:
18+
go-version: '1.21'
19+
20+
# setup gopath
21+
- name: Set PATH
22+
run: |
23+
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
24+
shell: bash
25+
26+
# checkout relayer
27+
- name: checkout relayer
28+
uses: actions/checkout@v3
29+
30+
# unit tests
31+
- name: run unit tests
32+
run: make test
33+
34+
# build binary
35+
- name: build binary and move to upload location
36+
run: make build
37+
38+
# upload resulting binaries
39+
- name: upload binaries
40+
uses: actions/upload-artifact@v1
41+
with:
42+
name: rly
43+
path: ./build/rly
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '23 17 * * 5'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'go' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Create and publish a Docker image
2+
3+
on:
4+
push:
5+
tags:
6+
- '**'
7+
branches:
8+
- '**'
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: ${{ github.repository }}
13+
14+
jobs:
15+
build-and-push-image:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
packages: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v1
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v1
30+
31+
- name: Log in to the Container registry
32+
uses: docker/login-action@v1
33+
with:
34+
registry: ${{ env.REGISTRY }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Extract metadata (tags, labels) for Docker
39+
id: meta
40+
uses: docker/metadata-action@v3
41+
with:
42+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43+
44+
- name: Build and push Docker image
45+
uses: docker/[email protected]
46+
with:
47+
context: .
48+
platforms: linux/amd64,linux/arm64
49+
file: Dockerfile
50+
push: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}
53+
cache-from: type=gha
54+
cache-to: type=gha,mode=max
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
name: TESTING - interchaintest
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
events:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up Go 1.21
11+
uses: actions/setup-go@v4
12+
with:
13+
go-version: '1.21'
14+
15+
- name: checkout relayer
16+
uses: actions/checkout@v4
17+
18+
- uses: actions/cache@v3
19+
with:
20+
path: |
21+
~/.cache/go-build
22+
~/go/pkg/mod
23+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
24+
restore-keys: |
25+
${{ runner.os }}-go-
26+
27+
- name: interchaintest
28+
run: make interchaintest-events
29+
30+
legacy:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Set up Go 1.21
34+
uses: actions/setup-go@v4
35+
with:
36+
go-version: '1.21'
37+
38+
- name: checkout relayer
39+
uses: actions/checkout@v4
40+
41+
- uses: actions/cache@v3
42+
with:
43+
path: |
44+
~/.cache/go-build
45+
~/go/pkg/mod
46+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
47+
restore-keys: |
48+
${{ runner.os }}-go-
49+
50+
- name: interchaintest
51+
run: make interchaintest-legacy
52+
53+
multiple-paths:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Set up Go 1.21
57+
uses: actions/setup-go@v4
58+
with:
59+
go-version: '1.21'
60+
61+
- name: checkout relayer
62+
uses: actions/checkout@v4
63+
64+
- uses: actions/cache@v3
65+
with:
66+
path: |
67+
~/.cache/go-build
68+
~/go/pkg/mod
69+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
70+
restore-keys: |
71+
${{ runner.os }}-go-
72+
73+
- name: interchaintest
74+
run: make interchaintest-multiple
75+
76+
misbehaviour:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Set up Go 1.21
80+
uses: actions/setup-go@v4
81+
with:
82+
go-version: '1.21'
83+
84+
- name: checkout relayer
85+
uses: actions/checkout@v4
86+
87+
- uses: actions/cache@v3
88+
with:
89+
path: |
90+
~/.cache/go-build
91+
~/go/pkg/mod
92+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
93+
restore-keys: |
94+
${{ runner.os }}-go-
95+
96+
- name: interchaintest
97+
run: make interchaintest-misbehaviour
98+
99+
fee-middleware:
100+
runs-on: ubuntu-latest
101+
steps:
102+
- name: Set up Go 1.21
103+
uses: actions/setup-go@v4
104+
with:
105+
go-version: '1.21'
106+
107+
- name: checkout relayer
108+
uses: actions/checkout@v4
109+
110+
- uses: actions/cache@v3
111+
with:
112+
path: |
113+
~/.cache/go-build
114+
~/go/pkg/mod
115+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
116+
restore-keys: |
117+
${{ runner.os }}-go-
118+
119+
- name: interchaintest
120+
run: make interchaintest-fee-middleware
121+
122+
fee-grant:
123+
runs-on: ubuntu-latest
124+
steps:
125+
- name: Set up Go 1.21
126+
uses: actions/setup-go@v4
127+
with:
128+
go-version: '1.21'
129+
130+
- name: checkout relayer
131+
uses: actions/checkout@v4
132+
133+
- uses: actions/cache@v3
134+
with:
135+
path: |
136+
~/.cache/go-build
137+
~/go/pkg/mod
138+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
139+
restore-keys: |
140+
${{ runner.os }}-go-
141+
142+
- name: interchaintest
143+
run: make interchaintest-fee-grant
144+
145+
prepare-scenario-matrix:
146+
runs-on: ubuntu-latest
147+
outputs:
148+
matrix: ${{ steps.set-matrix.outputs.matrix }}
149+
steps:
150+
- name: Checkout code
151+
uses: actions/checkout@v4
152+
153+
- name: Generate matrix
154+
id: set-matrix
155+
run: |
156+
# Run the command and convert its output to a JSON array
157+
TESTS=$(cd interchaintest && go test -list ^TestScenario ./... | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]')
158+
echo "matrix=${TESTS}" >> $GITHUB_OUTPUT
159+
160+
# Note : This job will not start until prepare-scenario-matrix completes sucessfully
161+
scenarios:
162+
needs: prepare-scenario-matrix
163+
runs-on: ubuntu-latest
164+
strategy:
165+
fail-fast: false
166+
matrix:
167+
test: ${{fromJson(needs.prepare-scenario-matrix.outputs.matrix)}}
168+
169+
steps:
170+
- name: Set up Go 1.21
171+
uses: actions/setup-go@v4
172+
with:
173+
go-version: '1.21'
174+
175+
- name: checkout relayer
176+
uses: actions/checkout@v4
177+
178+
- uses: actions/cache@v3
179+
with:
180+
path: |
181+
~/.cache/go-build
182+
~/go/pkg/mod
183+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
184+
restore-keys: |
185+
${{ runner.os }}-go-
186+
187+
- name: interchaintest
188+
run: |
189+
cd interchaintest
190+
go test -timeout 30m -race -v -run ${{ matrix.test }}
191+

0 commit comments

Comments
 (0)