Skip to content

Commit

Permalink
Merge branch 'master' into ilina/tla_specs
Browse files Browse the repository at this point in the history
  • Loading branch information
istoilkovska committed May 26, 2020
2 parents a2e8dfd + b528e97 commit 6e01704
Show file tree
Hide file tree
Showing 87 changed files with 6,420 additions and 106 deletions.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ ______

For contributor use:

- [ ] Wrote tests
- [ ] Unit tests written
- [ ] Added test to CI if applicable
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
name: Audit Check
on: [pull_request]
name: Security Audit
on:
pull_request:
paths: Cargo.lock
push:
branches: develop
paths: Cargo.lock
schedule:
- cron: '0 0 * * *'

jobs:
security_audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo bin
uses: actions/cache@v1
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-audit-v0.11.2
- uses: actions-rs/audit-check@v1
with:
args: --ignore RUSTSEC-2019-0031
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
args: --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests"
- uses: actions-rs/grcov@v0.1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk

# Ignore database folders
**/*.db/
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2020 Informal Systems

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
# ibc-rs
Rust implementation of IBC modules and relayer

> Rust implementation of IBC modules and relayer
## Disclaimer

THIS PROJECT IS UNDER HEAVY DEVELOPMENT AND IS NOT IN A WORKING STAGE NOW, USE AT YOUR OWN RISK.

## Requirements

- Rust 1.42+ (might work on earlier versions but this has not been tested yet)

## Usage

Provided that one has a Tendermint node running on port 26657, one can
configure and spawn two light clients for this chain with the following commands (to be run in the `ibc-rs` directory):

1. Fetch a trusted header from the chain:

```bash
$ curl -s http://localhost:26657/status | jq '.result.sync_info|.latest_block_hash,.latest_block_height'
```

2. Initialize a light client for chain A with the trusted height and hash fetched in step 1:

```bash
ibc-rs $ cargo run --bin relayer -- -c ./relayer/relay/tests/config/fixtures/relayer_conf_example.toml light init -x HASH -h HEIGHT chain_A
```
> Replace `HASH` and `HEIGHT` with the appropriate values.

3. Repeat step 1 and 2 above for `chain_B`.

> For this, update the height and hash, and change the chain identifier in the command above from `chain_A` to `chain_B`.

4. Start the light clients and a dummy relayer thread:

```bash
ibc-rs $ cargo run --bin relayer -- -c ./relayer/relay/tests/config/fixtures/relayer_conf_example.toml start
```

**Note:** Add a `-v` flag to the commands above to see detailed log output, eg. `cargo run --bin relayer -- -v -c ./relayer/relay/tests/config/fixtures/relayer_conf_example.toml run`

## License

Copyright © 2020 Informal Systems

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
codecov:
require_ci_to_pass: yes
allow_coverage_offsets: true

ignore:

Expand Down
Loading

0 comments on commit 6e01704

Please sign in to comment.