Update docs to changes of development blockchains

This commit is contained in:
Simon Warta 2022-07-04 10:29:58 +02:00
parent c9fad49aca
commit 8e6906b471
3 changed files with 28 additions and 34 deletions

View File

@ -46,15 +46,19 @@ yarn test
``` ```
To run the entire test suite, you need to run some local blockchain to test To run the entire test suite, you need to run some local blockchain to test
against. We use [wasmd](https://github.com/CosmWasm/wasmd) for both CosmWasm against. We use [wasmd](https://github.com/CosmWasm/wasmd) for CosmWasm tests.
tests and as a generic Cosmos SDK 0.39 (Launchpad) blockchain. We also spawn For generis Cosmos SDK tests we use simapp. We also spawn multiple versions of
multiple versions of raw Tendermint and a basic WebSocket server. raw Tendermint and a basic WebSocket server.
```sh ```sh
# Start wasmd # Start wasmd
./scripts/launchpad/start.sh ./scripts/wasmd/start.sh
./scripts/launchpad/init.sh ./scripts/wasmd/init.sh
export LAUNCHPAD_ENABLED=1 export WASMD_ENABLED=1
# Start simapp
./scripts/simapp44/start.sh
export SIMAPP44_ENABLED=1
# Start Tendermint # Start Tendermint
./scripts/tendermint/all_start.sh ./scripts/tendermint/all_start.sh
@ -75,11 +79,13 @@ yarn test
unset HTTPSERVER_ENABLED unset HTTPSERVER_ENABLED
unset SOCKETSERVER_ENABLED unset SOCKETSERVER_ENABLED
unset TENDERMINT_ENABLED unset TENDERMINT_ENABLED
unset LAUNCHPAD_ENABLED unset SIMAPP44_ENABLED
unset WASMD_ENABLED
./scripts/httpserver/stop.sh ./scripts/httpserver/stop.sh
./scripts/socketserver/stop.sh ./scripts/socketserver/stop.sh
./scripts/tendermint/all_stop.sh ./scripts/tendermint/all_stop.sh
./scripts/launchpad/stop.sh ./scripts/simapp/stop.sh
./scripts/wasmd/stop.sh
``` ```
## Sanity ## Sanity
@ -99,15 +105,15 @@ In the `scripts/` folder, a bunch of blockchains and other backend systems are
started for testing purposes. Some ports need to be changed from the default in started for testing purposes. Some ports need to be changed from the default in
order to avoid conflicts. Here is an overview of the ports used: order to avoid conflicts. Here is an overview of the ports used:
| Port | Application | Usage | | Port | Application | Usage |
| ----- | --------------------- | ------------------------------- | | ----- | ------------------------------ | ------------------------------- |
| 1317 | wasmd LCD API | @cosmjs/launchpad tests | | 1318 | simapp LCD API | Manual Stargate debugging |
| 1318 | simapp LCD API | Manual Stargate debugging | | 1319 | wasmd LCD API | Manual Stargate debugging |
| 1319 | wasmd LCD API | Manual Stargate debugging | | 4444 | socketserver | @cosmjs/sockets tests |
| 4444 | socketserver | @cosmjs/sockets tests | | 4445 | socketserver slow | @cosmjs/sockets tests |
| 4445 | socketserver slow | @cosmjs/sockets tests | | 5555 | httpserver | @cosmjs/tendermint-rpc tests |
| 5555 | httpserver | @cosmjs/tendermint-rpc tests | | 9090 | simapp gRPC | Manual Stargate debugging |
| 9090 | simapp gRPC | Manual Stargate debugging | | 11134 | Standalone Tendermint 0.34 RPC | @cosmjs/tendermint-rpc tests |
| 11134 | Tendermint 0.34 RPC | @cosmjs/tendermint-rpc tests | | 11135 | Standalone Tendermint 0.35 RPC | @cosmjs/tendermint-rpc tests |
| 26658 | simapp Tendermint RPC | Stargate client tests | | 26658 | simapp Tendermint RPC | Stargate client tests |
| 26659 | wasmd Tendermint RPC | @cosmjs/cosmwasm-stargate tests | | 26659 | wasmd Tendermint RPC | @cosmjs/cosmwasm-stargate tests |

View File

@ -47,7 +47,7 @@ Then follow the instructions on that page.
The tests in this package require a Ledger device The tests in this package require a Ledger device
[initialized with the mnemonic](https://support.ledger.com/hc/en-us/articles/360005434914) [initialized with the mnemonic](https://support.ledger.com/hc/en-us/articles/360005434914)
from from
[scripts/launchpad/README.md#preset-accounts](https://github.com/cosmos/cosmjs/blob/main/scripts/launchpad/README.md#preset-accounts) [scripts/wasmd/README.md#preset-accounts](https://github.com/cosmos/cosmjs/blob/main/scripts/wasmd/README.md#preset-accounts)
(see "Ledger: accounts for Ledger based demos and tests") with an installed (see "Ledger: accounts for Ledger based demos and tests") with an installed
"Cosmos (ATOM)" app. The device must be connected via USB, unlocked and the "Cosmos (ATOM)" app. The device must be connected via USB, unlocked and the
Cosmos app must be opened. The tests require the user to manually approve Cosmos app must be opened. The tests require the user to manually approve
@ -65,18 +65,6 @@ export SIMAPP42_ENABLED=1
yarn test yarn test
``` ```
### Launchpad tests
Start a local Launchpad blockchain as described in
[scripts/launchpad/README.md](https://github.com/cosmos/cosmjs/blob/main/scripts/launchpad/README.md)
and execute:
```sh
export LEDGER_ENABLED=1
export LAUNCHPAD_ENABLED=1
yarn test
```
## License ## License
This package is part of the cosmjs repository, licensed under the Apache License This package is part of the cosmjs repository, licensed under the Apache License

View File

@ -2,7 +2,7 @@
set -o errexit -o nounset -o pipefail set -o errexit -o nounset -o pipefail
command -v shellcheck >/dev/null && shellcheck "$0" command -v shellcheck >/dev/null && shellcheck "$0"
echo "Waiting for blockchain and REST server to be available ..." echo "Waiting for blockchain and LCD server to be available ..."
timeout 60 bash -c "until curl -s http://localhost:1319/node_info > /dev/null; do sleep 0.5; done" timeout 60 bash -c "until curl -s http://localhost:1319/node_info > /dev/null; do sleep 0.5; done"
# The chain is unreliable in the first second of its existence (https://gist.github.com/webmaster128/8175692d4af5e6c572fddda7a9ef437c) # The chain is unreliable in the first second of its existence (https://gist.github.com/webmaster128/8175692d4af5e6c572fddda7a9ef437c)
sleep 2 sleep 2