Skip to content

Commit

Permalink
Merge pull request #1270 from gfanton/dev/update-network-config
Browse files Browse the repository at this point in the history
feat(network): update network config
  • Loading branch information
90dy committed Aug 2, 2019
2 parents 07b170f + 6ce9fd3 commit 03550e8
Show file tree
Hide file tree
Showing 133 changed files with 13,014 additions and 1,137 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ jobs:
- run:
name: Build application Docker image
command: env DOCKER_BUILDKIT=1 /tmp/retry -m 3 docker build --ssh=default -t bertychat/berty .
command: /tmp/retry -m 3 docker build -t bertychat/berty .

- run:
name: Run application within Docker
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/go-orbit-db/
/gomobile-ipfs/
/gomobile-react-bridge/
/network/
/protocol/

# junk
Expand Down
6 changes: 4 additions & 2 deletions .stickler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ files:
- 'vendor/*'
- '*.gen.*'
- 'core/.scripts/upgrade-libp2p.sh'
- 'client/react-native/android/ble/logger.sh'
- 'client/react-native/ios/Reachability.swift'
- 'network/.scripts/generate-logger.sh'
- 'network/.scripts/upgrade-libp2p.sh'
- 'client/android/ble/logger.sh'
- 'client/ios/Reachability.swift'
fixers:
enable: true
20 changes: 8 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# syntax=docker/dockerfile:experimental
# build core
FROM golang:1.12-alpine as core-builder
RUN apk --no-cache --update add nodejs-npm make gcc g++ musl-dev openssl-dev git openssh
RUN apk --no-cache --update add nodejs-npm make gcc g++ musl-dev openssl-dev git
ENV GO111MODULE=on
COPY core/go.* /go/src/berty.tech/core/
WORKDIR /go/src/berty.tech
COPY core /go/src/berty.tech/core
COPY network/go.* /go/src/berty.tech/network/

# @HOTFIX manually get berty.tech network & checkout the right commit
RUN mkdir -m 700 /root/.ssh
RUN echo "StrictHostKeyChecking no " > /root/.ssh/config
RUN --mount=type=ssh git clone git@github.com:berty/network.git /tmp/network && \
git -C /tmp/network checkout "$(cat core/go.mod | grep 'berty.tech/network v0.0.0-' | sed -E 's/.*-(.+)$/\1/')" && \
cd core && \
go mod edit -require 'berty.tech/network@v0.0.0' && \
go mod edit -replace 'berty.tech/network@v0.0.0=/tmp/network'
WORKDIR /go/src/berty.tech

RUN cd network && go get .
RUN cd core && go get .

COPY core /go/src/berty.tech/core
COPY network /go/src/berty.tech/network

RUN cd core && make _ci_prepare # touching generated files
RUN cd core && make install

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _ci_prepare:

.PHONY: docker.build
docker.build:
DOCKER_BUILDKIT=1 docker build --progress=plain --ssh default -t bertychat/berty .
docker build -t bertychat/berty .

.PHONY: docker.push
docker.push: docker.build
Expand Down
18 changes: 9 additions & 9 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 36 additions & 49 deletions client/packages/bridge/service/daemon/daemon.pb.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,39 @@
},
"NetworkConfig": {
"fields": {
"json": {
"type": "string",
"peerCache": {
"type": "bool",
"id": 1
},
"identity": {
"type": "string",
"id": 2
},
"bootstrap": {
"rule": "repeated",
"type": "string",
"id": 3
},
"bindP2P": {
"rule": "repeated",
"type": "string",
"id": 5
},
"mdns": {
"type": "bool",
"id": 6
},
"privateNetwork": {
"type": "bool",
"id": 7
},
"ipfs": {
"type": "bool",
"id": 8
},
"mobile": {
"type": "bool",
"id": 9
}
}
},
Expand Down Expand Up @@ -142,7 +172,7 @@
},
"grpcWebBind": {
"type": "string",
"id": 25
"id": 3
},
"hideBanner": {
"type": "bool",
Expand Down Expand Up @@ -183,56 +213,13 @@
"type": "string",
"id": 12
},
"peerCache": {
"type": "bool",
"networkConfig": {
"type": "NetworkConfig",
"id": 13
},
"identity": {
"type": "string",
"id": 14
},
"bootstrap": {
"rule": "repeated",
"type": "string",
"id": 15
},
"noP2P": {
"type": "bool",
"id": 16
},
"bindP2P": {
"rule": "repeated",
"type": "string",
"id": 17
},
"transportP2P": {
"rule": "repeated",
"type": "string",
"id": 18
},
"hop": {
"type": "bool",
"id": 19
},
"ble": {
"type": "bool",
"id": 20
},
"mdns": {
"type": "bool",
"id": 21
},
"dhtServer": {
"type": "bool",
"id": 22
},
"PrivateNetwork": {
"type": "bool",
"id": 23
},
"SwarmKeyPath": {
"type": "string",
"id": 24
"id": 14
}
}
},
Expand Down

0 comments on commit 03550e8

Please sign in to comment.