Skip to content

Commit

Permalink
Merge branch 'master' into romac/attack-detector
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Ruetschi <[email protected]>
  • Loading branch information
romac authored Apr 26, 2023
2 parents 17ba1b5 + c3a4fb3 commit 28df2c0
Show file tree
Hide file tree
Showing 50 changed files with 536 additions and 245 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add Juno to chains tested in the integration tests
([#3235](https://github.com/informalsystems/hermes/issues/3235))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added a configuration to specify the directory used to the keyring store
([#1541](https://github.com/informalsystems/hermes/issues/1541))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Enable misbehaviour detection by default.
([#3001](https://github.com/informalsystems/hermes/issues/3001))
6 changes: 6 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
- package: stride
command: strided
account_prefix: stride
- package: juno
command: junod
account_prefix: juno

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -233,6 +236,9 @@ jobs:
- package: gaia9
command: gaiad
account_prefix: cosmos
- package: juno
command: junod
account_prefix: juno
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
Expand Down
35 changes: 10 additions & 25 deletions .github/workflows/multi-chains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,42 +59,27 @@ jobs:
matrix:
first-package:
- package: gaia9
chain_command_path: gaiad
command: gaiad
account_prefix: cosmos
- package: ibc-go-v7-simapp
chain_command_path: simd
command: simd
account_prefix: cosmos
- package: wasmd
chain_command_path: wasmd
command: wasmd
account_prefix: wasm
- package: evmos
chain_command_path: evmosd
account_prefix: evmos
- package: osmosis
chain_command_path: osmosisd
account_prefix: osmo
- package: stride
chain_command_path: strided
account_prefix: stride
second-package:
- package: gaia9
chain_command_path: gaiad
account_prefix: cosmos
- package: ibc-go-v7-simapp
chain_command_path: simd
account_prefix: cosmos
- package: wasmd
chain_command_path: wasmd
account_prefix: wasm
- package: evmos
chain_command_path: evmosd
command: evmosd
account_prefix: evmos
- package: osmosis
chain_command_path: osmosisd
command: osmosisd
account_prefix: osmo
- package: stride
chain_command_path: strided
command: strided
account_prefix: stride
- package: juno
command: junod
account_prefix: juno

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -126,7 +111,7 @@ jobs:
max_attempts: 2
timeout_minutes: 60
command: |
CHAIN_COMMAND_PATHS=$(nix shell .#${{ matrix.first-package.package }} -c which ${{ matrix.first-package.chain_command_path }}),$(nix shell .#${{ matrix.second-package.package }} -c which ${{ matrix.second-package.chain_command_path }}) \
CHAIN_COMMAND_PATHS=$(nix shell .#${{ matrix.first-package.package }} -c which ${{ matrix.first-package.command }}),$(nix shell .#${{ matrix.second-package.package }} -c which ${{ matrix.second-package.command }}) \
nix shell .#python -c cargo \
test -p ibc-integration-test --no-fail-fast -- \
--nocapture --test-threads=2
56 changes: 34 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
# Contributing

Thank you for your interest in contributing! The goal
of ibc-rs is to provide a high quality, formally verified implementation of
the IBC protocol and relayer.
Thank you for your interest in contributing to the Hermes IBC relayer! The goal
of this project is to provide a high quality, formally verified IBC relayer
implementation in Rust.

All work on the code base should be motivated by a Github
issue. Before opening a new issue, first do a search of open and closed issues
to make sure that yours will not be a duplicate.
If you would like to work on an issue which already exists, please indicate so
by leaving a comment. If what you'd like to work on hasn't already been covered
by an issue, then open a new one to get the process going.
by leaving a comment on the issue. If what you'd like to work on hasn't already
been covered by an issue, then open a new one to get the process going. Please
do your best to ensure that your issue adheres to one of the
[issue templates](https://github.com/informalsystems/hermes/tree/master/.github/ISSUE_TEMPLATE)
that we have in the repository.

The rest of this document outlines the best practices for contributing to this
repository:

- [Core Team Responsibility](#responsibility) - what the core team is responsible for
- [Decision Making](#decision-making) - process for agreeing to changes
- [Issues](#issues) - what makes a good issue
- [Pull Requests](#pull-requests) - what makes a good pull request
- [Forking](#forking) - fork the repo to make pull requests
- [Changelog](#changelog) - changes must be recorded in the changelog
- [Releases](#releases) - how to release new version of the crates

## Core Team Responsibility

The Hermes core team is responsible for stewarding this project over time. This means that the core team needs to understand the nature of, and agree to maintain, all of the changes that land on the master branch. It may cost a few days or weeks' worth of time to submit a particular change, but maintaining that change over the years has a much higher cost that the core team is responsible for bearing.

With that in mind, the core team must balance the potential risks of maintaining
any contribution in the long-term against the immediate usefulness or utility
that that contribution manifests.

## Decision Making

When contributing to the project, the following process leads to the best chance of
Expand Down Expand Up @@ -101,30 +113,31 @@ explaining why, and we will reprioritize it!

## Pull Requests

If you have write access to the ibc-rs repo, you can directly branch off of `master`.
If you have write access to the Hermes repo, you can directly branch off of `master`.
This makes it easier for project maintainers to directly make changes to your
branch should the need arise. Otherwise, check [Forking](#forking) section for instructions.

Branch names should be prefixed with the author's name followed by a short description
of the feature, eg. `name/feature-x`.
branch should the need arise. Otherwise, check the [Forking](#forking) section for instructions.

Pull requests are made against `master` and are squash-merged into master.

PRs must:
Branch names should be prefixed with the author's name followed by a short description of the feature, eg. `name/feature-x`.

Pull requests are made against `master` and are squash-merged into master. Each
PR should:
- make reference to an issue outlining the context
- update any relevant documentation and include tests
- add a corresponding entry in the `.changelog` directory using `unclog`,
see the [Changelog](#changelog) section for more details.

Pull requests should aim to be small and self-contained to facilitate quick
review and merging. Larger change sets should be broken up across multiple PRs.
Commits should be concise but informative, and moderately clean. Commits will be squashed into a
single commit for the PR with all the commit messages.
Additionally, in order to make PRs as easy to review as possible, each PR should:
- Be focused on implementing _*one*_ piece of logic from end-to-end. It must be
very clear what the purpose of the PR is from looking at the PR's title, description, and/or linked issue(s). It should also be very clear what value the changes incorporated in the PR aim to deliver. A single PR that does multiple things, without a clear articulation of the problem it attempts to solve, will very likely be rejected.
- Be small, ideally no more than 500 lines of code changes. While this is a guideline and not a hard rule, in general, larger changes should be structured as a series of PRs, each building off of the previous ones; these PRs should also be tracked in a tracking issue.

If a single PR absolutely has to be larger, it _must_ be structured such that it can be reviewed commit-by-commit, with each commit doing a single logical thing, accompanied with a good description of what it aims to achieve in the git commit message. Poorly structured PRs will likely be rejected on the grounds of being too much of a burden for the core maintainers to review; you will be asked to restructure the PR in accordance with the guidelines laid out here.

This does not necessarily apply to documentation-related changes or automatically generated code (e.g. generated from Protobuf definitions). But automatically generated code changes should occur within separate commits, so they are easily distinguishable from manual code changes.

In order to help facilitate the PR review process, tag *one* person as the
reviewer of the PR. If you are unsure of who to tag, your point of contact on
the ibc-rs team is always a natural candidate; they'll make sure that the PR gets
the Hermes team is always a natural candidate; they'll make sure that the PR gets
reviewed by whomever is most appropriate to review it. It also helps to notify
the person whom you tagged as reviewer through direct means, such as through
Slack or Discord, as it is easy for GitHub notifications to get lost or buried.
Expand Down Expand Up @@ -216,7 +229,7 @@ and [Hashicorp Consul](http://github.com/hashicorp/consul/tree/master/CHANGELOG.
See those changelogs for examples.

We currently split changes for a given release between these four sections: Breaking
Changes, Features, Improvements, Bug Fixes.
Changes, Features, Improvements, and Bug Fixes.

Entries in the changelog should initially be logged in the __Unreleased__ section, which
represents a "staging area" for accumulating all the changes throughout a
Expand Down Expand Up @@ -272,16 +285,15 @@ Our release process is as follows:
2. All crates' `lib.rs` files documentation references' `html_root_url`
parameters must point to the new version.
3. Every reference to Hermes version in the [guide](./guide).

4. Run `cargo doc --all-features --open` locally to double-check that all the
documentation compiles and seems up-to-date and coherent. Fix any potential
documentation compiles and is up-to-date and coherent. Fix any potential
issues here and push them to the release PR.
5. Mark the PR as **Ready for Review** and incorporate feedback on the release.
6. Once approved, merge the PR.
7. Pull `master` and run the [`release.sh`](./scripts/release.sh) script.
If any problem arises, submit a new PR, get it merged to `master` and try again.
The reason for not releasing straight from the release branch, and therefore losing the
ability to fix publishing problems as they arise, is that we would like the embedded
ability to fix publishing-related problems as they arise, is that we would like the embedded
metadata of the published crates, namely the Git commit at which the release was done,
to match the Git commit on the `master` branch which will be tagged.
[See this article][crates.io-security] for a more in-depth explanation.
Expand Down
74 changes: 63 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enabled = true
# there is activity on a connection or channel they are involved with.
refresh = true

# Whether or not to enable misbehaviour detection for clients. [Default: false]
# Whether or not to enable misbehaviour detection for clients. [Default: true]
misbehaviour = true

# Specify the connections mode.
Expand Down Expand Up @@ -140,6 +140,10 @@ account_prefix = 'cosmos'
# https://hermes.informal.systems/commands/keys/index.html#adding-keys
key_name = 'testkey'

# Specify the folder used to store the keys. Optional
# If this is not specified then the hermes home folder is used.
# key_store_folder = '$HOME/.hermes/keys'

# Specify the address type which determines:
# 1) address derivation;
# 2) how to retrieve and decode accounts and pubkeys;
Expand Down
1 change: 1 addition & 0 deletions crates/relayer-cli/src/chain_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ where
account_prefix: chain_data.bech32_prefix,
key_name: String::new(),
key_store_type: Store::default(),
key_store_folder: None,
store_prefix: "ibc".to_string(),
default_gas: Some(100000),
max_gas: Some(400000),
Expand Down
Loading

0 comments on commit 28df2c0

Please sign in to comment.