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

02-client refactor #1845

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a4b5b8f
chore: Remove GetClientID() From Misbehaviour Interface (#897)
notbdu Mar 9, 2022
841d21d
chore: add 668 functions to localhost client (#908)
notbdu Mar 9, 2022
18abb79
chore: rename 06-solomachine type Misbehaviour to DuplicateSignatures…
damiannolan Mar 10, 2022
a333a73
chore: reverting renaming of Misbehaviour (#1099)
damiannolan Mar 11, 2022
daa01db
remove GetClientID from 07-tendermint misbehaviour (#1097)
colin-axner Mar 11, 2022
2de5f1d
chore: remove GetClientID from 06-solomachine type Misbehaviour (#1100)
damiannolan Mar 11, 2022
12f4ed2
client-02 update to latest from main (#1106)
seantking Mar 11, 2022
ebf40bb
02-client: merge misbehavior & header interfaces (#1107)
seantking Mar 15, 2022
b0fa240
chore: 06-solomachine rename checkHeader to VerifyClientMessage (#1109)
damiannolan Mar 16, 2022
5e9785e
refactor: modify VerifyUpgradeAndUpdateState to set upgraded client a…
colin-axner Mar 16, 2022
4c8b7c5
chore: 06-solomachine rename update to UpdateState (#1110)
damiannolan Mar 16, 2022
bdbaa91
chore: 06-solomachine adding CheckForMisbehaviour and UpdateStateOnMi…
damiannolan Mar 16, 2022
f4480fb
chore: 02-client-refactor: merge main into feature branch (#1149)
seantking Mar 21, 2022
5e3bac0
02-client-refactor: rename update to UpdateState for 07-tendermint (#…
colin-axner Mar 24, 2022
efbc5a1
chore: adding UpdateStateOnMisbehaviour to 07-tendermint (#1168)
damiannolan Mar 24, 2022
b0dd49d
chore: add solomachine client storage (#1144)
damiannolan Mar 28, 2022
17209f7
refactor: adding CheckForMisbehaviour to 07-tendermint client (#1163)
damiannolan Mar 28, 2022
fadd9d0
02-client refactor: Adding VerifyClientMessage helper fn (#1119)
seantking Mar 28, 2022
c2602a5
refactor: removing GetRoot from ConsensusState interface (#1186)
seantking Mar 30, 2022
40183b4
Adding VerifyClientMessage to ClientState interface (#1196)
seantking Mar 30, 2022
a4b3d09
chore: CheckSubstituteAndUpdateState stores client state in lightclie…
damiannolan Mar 30, 2022
2e2bfab
chore: 07-tendermint set client/consensus states in UpdateState (#1199)
damiannolan Mar 30, 2022
18f1382
chore: update 07-tendermint GetConsensusState to return bool over err…
damiannolan Mar 30, 2022
3c7358b
feat: adding UpdateStateOnMisbehaviour to ClientState interface (#1198)
seantking Mar 31, 2022
5cf6528
refactor: remove localhost client implementation (#1187)
seantking Mar 31, 2022
eb48e54
chore: adding UpdateState to ClientState interface (#1206)
damiannolan Mar 31, 2022
d2be6d5
feat: adding CheckForMisbehaviour to ClientState interface (#1197)
seantking Mar 31, 2022
e2f37b8
Replace CheckHeaderAndUpdateState with new ClientState functions (#1208)
colin-axner Apr 1, 2022
8a9978c
refactor: removing CheckHeaderAndUpdateState from ClientState (#1210)
seantking Apr 4, 2022
c43af66
refactor: routing MsgSubmitMisbehaviour to UpdateClient keeper fn (#1…
seantking Apr 4, 2022
e249518
refactor: removing CheckMisbehaviourAndUpdateState from ClientState i…
seantking Apr 4, 2022
e91ee68
fix: rm AllowUpdateAfter... check (#1118)
charleenfei Apr 25, 2022
e1ec9f4
chore: update 02-client-refactor branch with latest main (#1286)
damiannolan Apr 26, 2022
cf893c2
chore: remove GetHeight from ClientMessage interface (#1285)
damiannolan Apr 27, 2022
55b115a
update godoc for VerifyClientMessage (#1281)
colin-axner Apr 27, 2022
48882a9
Add VerifyMembership to 07-tendermint (#1297)
colin-axner Apr 28, 2022
8f46821
chore: MsgUpdateClient rename header to client_message (#1316)
damiannolan May 9, 2022
e1f2103
Add migration docs for 02-client refactor (#1287)
catShaark May 10, 2022
31b6ead
Add revision number tests for 07-tendermint (#1302)
colin-axner May 10, 2022
d120044
ADR 005: update client consensus height events (#1315)
damiannolan May 10, 2022
e2bdd1f
feat: VerifyNonMembership 07-tendermint implementation (#1611)
seantking Jun 30, 2022
aab9ca2
chore: making changes based on nits from 02-client refactor audit (#1…
chatton Jun 30, 2022
4def196
chore: add generic proof verification methods to ClientState interfac…
damiannolan Jul 4, 2022
32c4827
chore: add GetTimestampAtHeight to client state #888 (#1659)
charleenfei Jul 6, 2022
1617de7
chore: modify connection keeper GetTimestampAtHeight to use the clien…
charleenfei Jul 7, 2022
3987a5b
refactor: replace usage of verification funcs in 03-connection (#1647)
damiannolan Jul 7, 2022
81a7cae
Check that client state is zeroed out for ibc client upgrade proposal…
chatton Jul 11, 2022
60e5305
Zero out client state before upgrading client proof (#1674)
chatton Jul 11, 2022
549c181
chore: restructuring 07-tendermint lightclient directory layout (#1677)
damiannolan Jul 12, 2022
04df7cd
chore: adding upgrade handler for 09-localhost removal (#1671)
damiannolan Jul 15, 2022
d8ac28a
Emit event upon setting upgrade consensus state (#1741)
chatton Jul 27, 2022
d3d91ed
chore: removing GetHeight legacy method from 06-solomachine (#1810)
damiannolan Jul 29, 2022
b0a58a8
refactor: solomachine generic verification methods and signbytes simp…
damiannolan Aug 2, 2022
4839217
bump 02-client-refactor branch to tip of main (#1867)
colin-axner Aug 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 18 additions & 8 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

* @colin-axner @AdityaSripal @crodriguezvega @seantking @charleenfei @damiannolan
* @colin-axner @AdityaSripal @crodriguezvega @seantking @charleenfei @damiannolan @chatton

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
Expand All @@ -13,20 +13,30 @@

# CODEOWNERS for the core IBC module

/modules/core/ @colin-axner @fedekunze @AdityaSripal
/proto/core/ @colin-axner @fedekunze @AdityaSripal
/modules/core/ @colin-axner @AdityaSripal
/proto/ibc/core/ @colin-axner @AdityaSripal

## CODEOWNERS for core/02-client

/modules/core/02-client @colin-axner @AdityaSripal @seantking @damiannolan
/proto/ibc/core/client @colin-axner @AdityaSripal @seantking @damiannolan

# CODEOWNERS for the light-clients

/modules/light-clients/ @colin-axner @fedekunze @AdityaSripal
/proto/lightclients/ @colin-axner @fedekunze @AdityaSripal
/modules/light-clients/ @colin-axner @AdityaSripal @seantking @damiannolan
/proto/ibc/lightclients/ @colin-axner @AdityaSripal @seantking @damiannolan

# CODEOWNERS for ICS 20

/modules/apps/transfer/ @colin-axner @fedekunze @AdityaSripal
/proto/applications/transfer/ @colin-axner @fedekunze @AdityaSripal
/modules/apps/transfer/ @colin-axner @AdityaSripal
/proto/ibc/applications/transfer/ @colin-axner @AdityaSripal

# CODEOWNERS for interchain-accounts module

/modules/apps/27-interchain-accounts/ @seantking @colin-axner @AdityaSripal @damiannolan
/proto/applications/interchain_accounts/ @seantking @colin-axner @AdityaSripal @damiannolan
/proto/ibc/applications/interchain_accounts/ @seantking @colin-axner @AdityaSripal @damiannolan

# CODEOWNERS for fee module

/modules/apps/29-fee/ @AdityaSripal @seantking @charleenfei @colin-axner @damiannolan
/proto/ibc/applications/fee/ @AdityaSripal @seantking @charleenfei @colin-axner @damiannolan
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ through the appropriate channels won't receive any bounty.

<!-- Concisely describe the issue -->

## Expected Behaviour

<!-- What is the expected behaviour? -->

## Version

<!-- git commit hash or release version -->
Expand Down
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/epic-tracker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Epic Tracker
about: Create an issue to track feature epic progress

---

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Word of caution: poorly thought-out proposals may be rejected
v without deliberation
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

## Requirements document

<!-- Link to requirements document -->

## IBC spec

<!-- Link to specification -->

## ADRs

<!-- Links to ADRs related to this epic -->

## Milestones

<!-- Links to alpha, beta, RC milestones -->

## Implementation issues

<!-- Links to specific issues, thematically/logically grouped -->

## QA scenarios

<!-- Lists of manual QA tests that need be performed -->

## Automated e2e tests

<!-- List of automated e2e tests that need be added to CI -->

## Pre-releases

<!-- Links to alpha, beta, RC tags/releases -->

## Checklist

<!-- Remove any items that are not applicable. -->

- [ ] Internal audit(s)
- [ ] External audit(s)
- [ ] Documentation
- [ ] Swagger
- [ ] Integration with relayers:
- [ ] Hermes
- [ ] Rly

____

#### For Admin Use

- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged/assigned
66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/release-tracker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: Release tracker
about: Create an issue to track release progress

---

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Word of caution: poorly thought-out proposals may be rejected
v without deliberation
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

## Milestones

<!-- Links to alpha, beta, RC or final milestones -->

## IBC spec compatibility

<!-- Version of the IBC spec that this release is compatible with -->

## QA

### Backwards compatibility

<!-- List of tests that need be performed with previous
versions of ibc-go to guarantee that no regression is introduced -->

- [ ] Fungible token transfers over a non-incentivised channel works with a counterparty chain running each previous major version.
- [ ] Fungible token transfers over an incentivised channel works with a counterparty chain running each previous major version that supports ICS-29 Fee Middleware.
- [ ] Interchain Accounts over a non-incentivised channel works with a counterparty chain running each previous major version that supports ICS-27 Interchain Accounts over non-incentivised channels.
- [ ] Interchain Accounts over an incentivised channel works with a counterparty chain running each previous major version that supports ICS-27 Interchain Accounts over incentivised channels.

## Migration

<!-- Link to migration document -->

## Checklist

<!-- Remove any items that are not applicable. -->

- [ ] Bump [go package version](https://github.com/cosmos/ibc-go/blob/main/go.mod#L3).
- [ ] Change all imports starting with `github.com/cosmos/ibc-go/v{x}` to `github.com/cosmos/ibc-go/v{x+1}`.
- [ ] Branch off main to create release branch in the form of `release/vx.y.z`.
- [ ] Add branch protection rules to new release branch.
- [ ] Add backport task to [`mergify.yml`](https://github.com/cosmos/ibc-go/blob/main/.github/mergify.yml)
- [ ] Upgrade ibc-go version in [ibctest](https://github.com/strangelove-ventures/ibctest).
- [ ] Check Swagger is up-to-date.

## Post-release checklist

- [ ] Update [`CHANGELOG.md`](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [ ] Update the table of supported release lines (and End of Life dates) in [`RELEASES.md`](https://github.com/cosmos/ibc-go/blob/main/RELEASES.md).
- [ ] Update [version matrix](https://github.com/cosmos/ibc-go/blob/main/RELEASES.md#version-matrix) in `RELEASES.md`.
- [ ] Update docs site:
- [ ] Add new release branch to [`docs/versions`](https://github.com/cosmos/ibc-go/blob/main/docs/versions) file.
- [ ] Add `label` and `key` to `versions` array in [`config.js`](https://github.com/cosmos/ibc-go/blob/main/docs/.vuepress/config.js#L33).
- [ ] After changes to docs site are deployed, check [ibc.cosmos.network](https://ibc.cosmos.network) is updated.

____

#### For Admin Use

- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged/assigned
60 changes: 50 additions & 10 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,75 @@ pull_request_rules:
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
- name: backport patches to v1.1.x branch
- name: backport patches to v2.1.x branch
conditions:
- base=main
- label=backport-to-v1.1.x
- label=backport-to-v2.1.x
actions:
backport:
branches:
- release/v1.1.x
- name: backport patches to v1.2x branch
- release/v2.1.x
- name: backport patches to v2.2.x branch
conditions:
- base=main
- label=backport-to-v1.2.x
- label=backport-to-v2.2.x
actions:
backport:
branches:
- release/v1.2.x
- name: backport patches to v2.0.x branch
- release/v2.2.x
- name: backport patches to v2.3.x branch
conditions:
- base=main
- label=backport-to-v2.0.x
- label=backport-to-v2.3.x
actions:
backport:
branches:
- release/v2.0.x
- release/v2.3.x
- name: backport patches to v2.4.x branch
conditions:
- base=main
- label=backport-to-v2.4.x
actions:
backport:
branches:
- release/v2.4.x
- name: backport patches to v3.0.x branch
conditions:
- base=main
- label=backport-to-v3.0.x
actions:
backport:
branches:
- release/v3.0.x
- release/v3.0.x
- name: backport patches to v3.1.x branch
conditions:
- base=main
- label=backport-to-v3.1.x
actions:
backport:
branches:
- release/v3.1.x
- name: backport patches to v3.2.x branch
conditions:
- base=main
- label=backport-to-v3.2.x
actions:
backport:
branches:
- release/v3.2.x
- name: backport patches to v4.0.x branch
conditions:
- base=main
- label=backport-to-v4.0.x
actions:
backport:
branches:
- release/v4.0.x
- name: backport patches to v5.0.x branch
conditions:
- base=main
- label=backport-to-v5.0.x
actions:
backport:
branches:
- release/v5.0.x
20 changes: 20 additions & 0 deletions .github/scripts/go-imports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
formatted_files="$(docker run -v "$(pwd)":/ibc-go --rm -w "/ibc-go" --entrypoint="" cytopia/goimports goimports -l -local 'github.com/cosmos/ibc-go' /ibc-go)"

exit_code=0
for f in $formatted_files
do
# we don't care about formatting in pb.go files.
if [ "${f: -5}" == "pb.go" ]; then
continue
fi
exit_code=1
echo "formatted file ${f}..."
done

if [ "${exit_code}" == 1 ]; then
echo "not all files were correctly formated, run the following:"
echo "make goimports"
fi

exit $exit_code
4 changes: 2 additions & 2 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check docs build
# This will check if the docs build successfully by running `npm run build`
on:
pull_request:
paths:
paths:
- './docs'

jobs:
Expand All @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '37 21 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# 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

steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality
if: env.GIT_DIFF
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)

- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: env.GIT_DIFF

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
if: env.GIT_DIFF
Loading