Skip to content

Commit

Permalink
Merge pull request ChorusOne#7 from ChorusOne/improve-test-documentation
Browse files Browse the repository at this point in the history
improve documentation for test
  • Loading branch information
ParthDesai authored Aug 20, 2020
2 parents 9cdab0c + be0580a commit cf2cb27
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
# Wormhole: A Cosmos-Substrate bridge

## What is Wormhole?

Wormhole is a bridge to connect a Substrate-based blockchain to a Cosmos-SDK based blockchain. Specifically it connects
substrate light client running inside cosmos chain to substrate chain and cosmos light client running inside substrate chain to cosmos chain.


## Parts

The Wormhole bridge, comprises three parts:
- A fork of Gaia, with an additional module to allow execution of wasm-based light clients.
- Wormhole, a Substrate-based chain, including a tendermint-client pallet.
- Quantum-tunnel, a simple relayer, written in rust.

## Demo
In order to run the demo, clone this repository, and run `docker-compose up`.
In order to run the demo, clone this repository, and run following command:
```
# Cleans data directory and shuts down any stray docker containers.
make clean
# Builds docker images, could take a while.
make build
# Runs a demo
make run
```

## Integration tests
There are five integration test variants you can run:
1. **Live**: Both chains are live
2. **Simulated cosmos**: Cosmos chain is simulated with a text file and headers are fed into cosmos light client running in substrate chain
3. **Simulated substrate**: Substrate chain is simulated with a text file and headers are fed into substrate light client running in cosmos chain
4. **Faulty simulated cosmos**: Same as simulated cosmos but with faulty data to test failure scenario
5. **Faulty simulated substrate**: Same as simulated substrate but with faulty data to test failure scenario

### Live
Both chains are live. To run this variant you need to execute `make test_live` in project directory.
Note that this test will not terminate automatically, which provides tester opportunity to check both chain's status.

## Credit and Attribution
### Simulated cosmos
Cosmos chain is simulated with a text file and headers are fed into cosmos light client running in substrate chain. To run this variant you need to execute `make test_simulated_cosmos`. If the test is successful, docker compose will exit with zero exit code.

### Simulated substrate
Substrate chain is simulated with a text file and headers are fed into substrate light client running in cosmos chain. To run this variant you need to execute `make test_simulated_substrate`. If the test is successful, docker compose will exit with zero exit code.

### Faulty simulated cosmos
Same as simulated cosmos but with faulty data to test failure scenario. To run this variant you need to execute `make test_faulty_simulated_substrate`. If the test is successful, docker compose will exit with zero exit code.

### Faulty simulated substrate
Same as simulated substrate but with faulty data to test failure scenario. To run this variant you need to execute `make test_faulty_simulated_cosmos`. If the test is successful, docker compose will exit with zero exit code.


## Credit and Attribution
Substrate - Web3 Foundation, Parity
Cosmos-SDK - All in Bits, Tendermint Inc., Interchain.io, Interchain Foundation
Cosmwasm - Confio, Ethan Frey and Simon Warta
Expand Down

0 comments on commit cf2cb27

Please sign in to comment.