Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fabo/1873 big mergeroo #1883

Merged
merged 32 commits into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a29c2b9
add yarn audit check
sabau Jan 14, 2019
330a6b2
fixes:
sabau Jan 14, 2019
92e86cd
sudoing the npm global yarn update
sabau Jan 14, 2019
b60972e
try extended version exit code
sabau Jan 14, 2019
6cc23d5
circleci audit: be more descriptive in errors
sabau Jan 15, 2019
0e11960
Fabo/voyager web (#1804)
faboweb Jan 16, 2019
04d3355
Merge branch 'web' into sabau/1806-yarn-audit-cci-check
sabau Jan 17, 2019
ba1db67
try oneliner
sabau Jan 17, 2019
81e7130
restore extended version
sabau Jan 17, 2019
c203b1b
align snapshots
sabau Jan 17, 2019
83183f5
Changelog
sabau Jan 17, 2019
9d9462b
Merge pull request #1850 from cosmos/sabau/web/fix-snapshot-unit-test
faboweb Jan 17, 2019
599ae33
Merge remote-tracking branch 'origin/web' into sabau/1806-yarn-audit-…
Jan 17, 2019
989d64a
Merge pull request #1822 from cosmos/sabau/1806-yarn-audit-cci-check
faboweb Jan 17, 2019
caca894
fix circleci audit job
sabau Jan 21, 2019
83ea737
Add circleci audit job to CHANGELOG
sabau Jan 21, 2019
15ef583
Merge pull request #1859 from cosmos/sabau/web/fix-audit
faboweb Jan 21, 2019
d86935d
Fabo/1831 reconnect (#1856)
faboweb Jan 22, 2019
a8bedb1
Fabo/1809 update header on send (#1830)
faboweb Jan 24, 2019
d92b865
Merge remote-tracking branch 'origin/web' into fabo/1873-big-mergeroo
Jan 24, 2019
6a57fc8
fixed several tests
Jan 25, 2019
68f8f21
persist denoms
Jan 25, 2019
ce132ad
fixed denom load tests
Jan 25, 2019
1406dd7
Apply suggestions from code review
fedekunze Jan 25, 2019
9646d59
Merge remote-tracking branch 'origin/develop' into fabo/1873-big-merg…
Jan 28, 2019
0323582
fixed sendmodal tests
Jan 28, 2019
07ff58e
fixed signup
Jan 28, 2019
cf6e984
fixed optimistic update for delegation
Jan 28, 2019
0191bdc
erase password on close of action modal
Jan 28, 2019
e332357
Update app/src/renderer/main.js
sabau Jan 28, 2019
386c33d
addressed comments
Jan 28, 2019
f93120f
Merge branch 'fabo/1873-big-mergeroo' of https://github.com/cosmos/vo…
Jan 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of relying on a genesis, fixing the denoms for now

"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