Skip to content

Commit

Permalink
Merge pull request #1883 from cosmos/fabo/1873-big-mergeroo
Browse files Browse the repository at this point in the history
Fabo/1873 big mergeroo
  • Loading branch information
faboweb authored Jan 28, 2019
2 parents 70746e2 + f93120f commit fac6aa1
Show file tree
Hide file tree
Showing 150 changed files with 5,155 additions and 11,650 deletions.
54 changes: 43 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

changelogUpdated:
docker:
- image: circleci/node:10.13.0-browsers
- image: circleci/node:10.15.0-browsers

steps:
- checkout
Expand All @@ -41,7 +41,7 @@ jobs:

testUnit:
docker:
- image: circleci/node:10.13.0-browsers
- image: circleci/node:10.15.0-browsers

steps:
- checkout
Expand All @@ -51,8 +51,8 @@ jobs:
- v3-dependencies-root-{{ checksum "package.json" }}
- v3-dependencies-root-

- run: sudo npm -g uninstall yarn ; sudo npm -g install [email protected]
- run: yarn install

- save_cache:
paths:
- yarn.lock
Expand All @@ -70,9 +70,33 @@ jobs:
command: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
when: on_success

security:
docker:
- image: circleci/node:10.15.0-browsers

steps:
- checkout

- run: sudo npm -g uninstall yarn ; sudo npm -g install [email protected]

- run:
name: Audit
command: |
set +e
SUMMARY="$(yarn audit | grep Severity)"
VULNERABILITIES=".*(High|Critical).*"
if [[ $SUMMARY =~ $VULNERABILITIES ]]; then
echo "Unsafe dependencies found: $SUMMARY" >&2
exit 1
fi
echo "Your dependencies are secure enough: $SUMMARY"
exit 0
testE2e:
docker:
- image: circleci/node:10.13.0-browsers
- image: circleci/node:10.15.0-browsers

environment:
- BINARY_PATH: "/home/circleci/project/builds/Gaia/linux_amd64/gaiacli"
Expand All @@ -89,8 +113,8 @@ jobs:
- v2-dependencies-root-{{ checksum "package.json" }}
- v2-dependencies-root-

- run: sudo npm -g uninstall yarn ; sudo npm -g install [email protected]
- run: yarn install

- save_cache:
paths:
- yarn.lock
Expand All @@ -109,7 +133,7 @@ jobs:
# Create release.
release:
docker:
- image: circleci/node:10.13.0
- image: circleci/node:10.15.0

steps:
- checkout
Expand All @@ -119,13 +143,14 @@ jobs:
- v2-dependencies-root-{{ checksum "package.json" }}
- v2-dependencies-root-

- run: sudo npm -g uninstall yarn ; sudo npm -g install [email protected]
- run: yarn install
- run: node tasks/createReleasePR.js

# Publish the release to GitHub.
publish:
docker:
- image: circleci/node:10.13.0
- image: circleci/node:10.15.0

steps:
- checkout
Expand All @@ -145,6 +170,8 @@ jobs:
git tag -d release-candidate
git push --delete bot release-candidate
npm -g uninstall yarn ; npm -g install [email protected]
sudo tasks/build/installWine.sh
yarn install
Expand Down Expand Up @@ -182,9 +209,14 @@ workflows:
branches:
ignore: release

- testE2e:
requires:
- buildGaia
# - testE2e:
# requires:
# - buildGaia
# filters:
# branches:
# ignore: release

- security:
filters:
branches:
ignore: release
Expand All @@ -194,7 +226,7 @@ workflows:
- changelogUpdated
- buildGaia
- testUnit
- testE2e
# - testE2e
filters:
branches:
only: develop
Expand Down
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@ testArtifacts/*
app/networks/local-testnet/*
docs/cosmos-voyager
.idea/*
server_dev.key
server_dev.crt
Cosmos_*
app/networks/*
app/package.json
*.crt
*.key
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [\#1660](https://github.com/cosmos/voyager/issues/1660) Add parameters and pool to store @fedekunze
- [\#1739](https://github.com/cosmos/voyager/issues/1739) Init jsDoc into project @sabau
- [\#1674](https://github.com/cosmos/voyager/issues/1674) Add PageProfile component with shared styles for validator and proposal profiles @jbibla
- [\#1806](https://github.com/cosmos/voyager/issues/1806) CircleCI security check in dependencies with yarn audit @sabau
- [\#1804](https://github.com/cosmos/voyager/issues/1804) Moved Voyager to the web @faboweb
- [\#1835](https://github.com/cosmos/voyager/issues/1835) allow user to use different signing methods @faboweb

### Changed
Expand Down Expand Up @@ -154,6 +156,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [\#1572](https://github.com/cosmos/voyager/issues/1572) Fixed scroll bug when switching between tabs @jbibla
- [\#1749](https://github.com/cosmos/voyager/issues/1749) Fixed proposal tally update after voting @fedekunze
- [\#1765](https://github.com/cosmos/voyager/pull/1765) Fixed proposal deposit update after submitting a deposit @fedekunze
- [\#1791](https://github.com/cosmos/voyager/issue/1791) Fixed a problem with initializing the Voyager config dir @faboweb
- [\#1815](https://github.com/cosmos/voyager/issue/1815) Fixed getters for proposals denominator, reverted to 945803d586b83d65547cd16f4cd5994eac2957ea until interfaces are ready @sabau
- [\#1809](https://github.com/cosmos/voyager/issue/1809) Fixed optimistically updating the header on sending @faboweb
- [\#1791](https://github.com/cosmos/voyager/pull/1791) Fixed a problem with initializing the Voyager config dir @faboweb
- [\#1754](https://github.com/cosmos/voyager/pull/1754) Fixed form UX, UI and other miscellaneous styling issues @jbibla
- [\#1707](https://github.com/cosmos/voyager/issues/1707) Governance txs are now disabled if the user doesn't hold any min_deposit token @fedekunze
Expand All @@ -162,6 +167,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [\#1818](https://github.com/cosmos/voyager/issues/1818) Fixed error on validator loading showing as no validators @faboweb
- Fixed error locations sucked up by Sentry @faboweb
- [\#1815](https://github.com/cosmos/voyager/pull/1785) Fixed small bug on preferences page @jbibla
- [\#1831](https://github.com/cosmos/voyager/issues/1831) Fixed websocket reconnection @faboweb
- [\#1850](https://github.com/cosmos/voyager/pull/1850) Snapshots aligned for unit tests @sabau
- [\#1859](https://github.com/cosmos/voyager/pull/1859) Fix security check in circleci @sabau

## [0.10.7] - 2018-10-10

Expand Down
13 changes: 13 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
localhost:8080 {
cors

header / {
Access-Control-Allow-Origin "*"
Access-Control-Allow-Methods "OPTIONS, HEAD, GET, POST, PUT, DELETE"
Access-Control-Allow-Headers "*"
}

proxy / https://localhost:9070/ {
insecure_skip_verify
}
}
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ cd voyager
yarn install
```

---

## Voyager Development

### Gaia (Cosmos SDK)

Since Voyager runs on top of the Cosmos Hub blockchain, we also need to install Gaia (the Cosmos Hub application) and download the supported testnets.
Expand All @@ -63,7 +67,13 @@ To connect to a testnet, Voyager needs the configuration files of those networks
yarn build:testnets
```

## Voyager Development
### Caddy Proxy

Currently we need a proxy to enable easy local development. We use [Caddy](https://caddyserver.com). To download run:

```bash
curl https://getcaddy.com | bash -s personal http.cors
```

### Active testnets

Expand All @@ -73,15 +83,40 @@ To run Voyager on the default testnet (if active):
yarn start
```

To run Voyager on a specific testnet you can use the following command. Click [here](https://github.com/cosmos/testnets) for a complete list of the supported official and community testnets.
## Local testnet

Sometimes you may want to run a local node, i.e. in the case there is no available network. To do so first [Build Gaia](#gaia-cosmos-sdk), then use our automatic script or the manual process to set up your node.

### Generate SSL certificates

If you want to have a predictable environment for Voyager please generate some ssl certificates:

```bash
yarn start <network_name>
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout server_dev.key -out server_dev.crt \
-subj "/C=US/ST=CA/L=Irvine/O=Acme Inc./CN=localhost" \
-reqexts v3_req -reqexts SAN -extensions SAN \
-config \
<(echo -e '
[req]\n
distinguished_name=req_distinguished_name\n
[req_distinguished_name]\n
[SAN]\n
subjectKeyIdentifier=hash\n
authorityKeyIdentifier=keyid:always,issuer:always\n
basicConstraints=CA:TRUE\n
subjectAltName=@alt_names
[alt_names]
DNS.1 = localhost
')
```

## Local testnet
Afterwards you can use:

Sometimes you may want to run a local node, i.e. in the case there is no available network. To do so first [Build Gaia](#gaia-cosmos-sdk), then use our automatic script or the manual process to set up your node.
```bash
yarn backend:fixed-https
yarn frontend:fixed-https
```

### Build

Expand Down
21 changes: 0 additions & 21 deletions app/config.toml

This file was deleted.

5 changes: 1 addition & 4 deletions app/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
<meta charset="utf-8">
<title>Cosmos Voyager</title>
<% if (htmlWebpackPlugin.options.appModules) { %>
<!-- Add `app/node_modules` to global paths so `require` works properly in development -->
<script>
require('module').globalPaths.push('<%= htmlWebpackPlugin.options.appModules.replace(/\\/g, '\\\\') %>')
</script>
<% } %>

<body style="background: #15182d">
<script async src='https://www.google-analytics.com/analytics.js'></script>
<div id="app" style="background: #15182d"></div>
</body>

Expand Down
11 changes: 0 additions & 11 deletions app/src/config.js

This file was deleted.

12 changes: 12 additions & 0 deletions app/src/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Cosmos Voyager",
"default_network": "local-testnet",
"denoms": ["stake", "photino"],
"node_lcd": "http://localhost:8080",
"node_rpc": "http://localhost:26657",
"google_analytics_uid": "UA-51029217-3",
"sentry_dsn": "https://4dee9f70a7d94cc0959a265c45902d84:[email protected]/288169",
"node_halted_timeout": 120000,
"block_timeout": 10000,
"default_gas": 500000
}
Loading

0 comments on commit fac6aa1

Please sign in to comment.