Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Deploy vector-0.0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
LayneHaber committed Nov 26, 2020
2 parents 00fcd8b + f1156dc commit f3d72fe
Show file tree
Hide file tree
Showing 111 changed files with 3,296 additions and 1,722 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@ jobs:
- run: bash ops/test-integration.sh router
- name: Print logs
if: failure()
run: docker service ls && docker service logs --tail 200 node_node
run: docker service ls && docker service logs --tail 200 router_node
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
- run: bash ops/test-integration.sh router
- name: Print logs
if: failure()
run: docker service ls && docker service logs --tail 200 node_node
run: docker service ls && docker service logs --tail 200 router_node

deploy-testnet:
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ config-prod.json
**/.db-snapshots
modules/server-node/connext-store.db
modules/server-node/migrations/migrate.lock
modules/contracts/typechain

# Docs
modules/client/docs
Expand Down
17 changes: 15 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
module.exports = {
semi: true,
trailingComma: 'all',
trailingComma: "all",
singleQuote: false,
printWidth: 120,
tabWidth: 2
tabWidth: 2,
overrides: [
{
files: "*.sol",
options: {
printWidth: 80,
tabWidth: 4,
useTabs: false,
singleQuote: false,
bracketSpacing: false,
explicitTypes: "always",
},
},
],
};
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ commit=$(shell git rev-parse HEAD | head -c 8)
id=$(shell if [[ "`uname`" == "Darwin" ]]; then echo 0:0; else echo "`id -u`:`id -g`"; fi)

# Pool of images to pull cached layers from during docker build steps
image_cache=$(shell if [[ -n "${GITHUB_WORKFLOW}" ]]; then echo "--cache-from=$(project)_builder:latest,$(project)_database:latest,$(project)_ethprovider:latest,$(project)_server-node:latest,$(project)_router:latest,$(project)_global_proxy:latest"; else echo ""; fi)
image_cache=$(shell if [[ -n "${GITHUB_WORKFLOW}" ]]; then echo "--cache-from=$(project)_builder:latest,$(project)_database:latest,$(project)_ethprovider:latest,$(project)_server-node:latest,$(project)_router:latest,$(project)_global_proxy:latest,$(project)_iframe_app"; else echo ""; fi)

interactive=$(shell if [[ -t 0 && -t 2 ]]; then echo "--interactive"; else echo ""; fi)

Expand All @@ -36,7 +36,7 @@ log_finish=@echo $$((`date "+%s"` - `cat $(startTime)`)) > $(totalTime); rm $(st
default: dev
dev: global node router duet trio test-runner-js
prod: global-prod node-prod router-prod test-runner
all: dev prod browser-node
all: dev prod iframe-app

global: auth-js ethprovider global-proxy nats
global-prod: auth-img global-proxy nats
Expand Down Expand Up @@ -350,6 +350,17 @@ router-img: router-bundle $(shell find modules/router/ops $(find_options))
docker tag $(project)_router $(project)_router:$(commit)
$(log_finish) && mv -f $(totalTime) .flags/$@

iframe-app: iframe-app-img
iframe-app-js: browser-node $(shell find modules/iframe-app $(find_options))
$(log_start)
$(docker_run) "cd modules/iframe-app && npm run build"
$(log_finish) && mv -f $(totalTime) .flags/$@
iframe-app-img: iframe-app-js $(shell find modules/iframe-app/ops $(find_options))
$(log_start)
docker build --file modules/iframe-app/ops/Dockerfile $(image_cache) --tag $(project)_iframe_app modules/iframe-app
docker tag $(project)_iframe_app $(project)_iframe_app:$(commit)
$(log_finish) && mv -f $(totalTime) .flags/$@


test-runner: test-runner-img
test-runner-js: engine $(shell find modules/test-runner/src $(find_options))
Expand Down
202 changes: 101 additions & 101 deletions address-book.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 1
applications:
- frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build-prod
artifacts:
baseDirectory: build
files:
- "**/*"
cache:
paths:
- node_modules/**/*
appRoot: modules/iframe-app
3 changes: 2 additions & 1 deletion modules/auth/ops/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ WORKDIR /root
ENV HOME /root
RUN apk add --update --no-cache bash curl g++ gcc git jq make python
RUN npm config set unsafe-perm true && npm install -g npm@6.14.7
RUN npm install nodemon pino-pretty
RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/ed77b63706ea721766a62ff22d3a251d8b4a6a30/wait-for-it.sh > /bin/wait-for && chmod +x /bin/wait-for
COPY ops/package.json package.json
RUN npm install
ENV PATH="/root/node_modules/.bin:./node_modules/.bin:${PATH}"
COPY ops ops
COPY dist dist
Expand Down
9 changes: 9 additions & 0 deletions modules/auth/ops/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "auth",
"description": "This is only used to install & pin versions for a few global packages in the prod-mode docker container",
"dependencies": {
"nodemon": "2.0.6",
"pino-pretty": "4.3.0"
}
}

4 changes: 2 additions & 2 deletions modules/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"test": "ts-mocha --check-leaks --exit --timeout 60000 'src/**/*.spec.ts'"
},
"dependencies": {
"@connext/vector-types": "0.0.14-beta.0",
"@connext/vector-utils": "0.0.14-beta.0",
"@connext/vector-types": "0.0.17",
"@connext/vector-utils": "0.0.17",
"@sinclair/typebox": "0.11.0",
"crypto": "1.0.1",
"fastify": "3.8.0",
Expand Down
10 changes: 5 additions & 5 deletions modules/browser-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@connext/vector-browser-node",
"version": "0.0.14-beta.0",
"version": "0.0.17",
"author": "",
"license": "ISC",
"description": "",
Expand All @@ -17,10 +17,10 @@
"test": "ts-mocha --bail --check-leaks --exit --timeout 60000 'src/**/*.spec.ts'"
},
"dependencies": {
"@connext/vector-contracts": "0.0.14-beta.0",
"@connext/vector-engine": "0.0.14-beta.0",
"@connext/vector-types": "0.0.14-beta.0",
"@connext/vector-utils": "0.0.14-beta.0",
"@connext/vector-contracts": "0.0.17",
"@connext/vector-engine": "0.0.17",
"@connext/vector-types": "0.0.17",
"@connext/vector-utils": "0.0.17",
"@sinclair/typebox": "0.11.0",
"ajv": "6.12.6",
"axios": "0.21.0",
Expand Down
17 changes: 16 additions & 1 deletion modules/browser-node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,21 @@ export class BrowserNode implements INodeService {
return this.send(rpc);
}

async getStatus(): Promise<Result<NodeResponses.GetStatus, NodeError>> {
const rpc: EngineParams.RpcRequest = {
id: Date.now(),
jsonrpc: "2.0",
method: "chan_getStatus",
params: undefined,
};
try {
const res = await this.send(rpc);
return Result.ok(res);
} catch (e) {
return Result.fail(e);
}
}

async getStateChannelByParticipants(
params: OptionalPublicIdentifier<NodeParams.GetChannelStateByParticipants>,
): Promise<Result<NodeResponses.GetChannelStateByParticipants, NodeError>> {
Expand Down Expand Up @@ -152,7 +167,7 @@ export class BrowserNode implements INodeService {
try {
const rpc = constructRpcRequest<"chan_getChannelStates">(ChannelRpcMethods.chan_getChannelStates, undefined);
const res = await this.channelProvider!.send(rpc);
return Result.ok(res.map(chan => chan.channelAddress));
return Result.ok(res.map((chan) => chan.channelAddress));
} catch (e) {
return Result.fail(e);
}
Expand Down
Loading

0 comments on commit f3d72fe

Please sign in to comment.