Skip to content

Commit c1cbbb2

Browse files
authored
Merge pull request ethereum#94 from maticnetwork/develop
Update master
2 parents 187fc06 + adf77d2 commit c1cbbb2

File tree

962 files changed

+372399
-72302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

962 files changed

+372399
-72302
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ light/ @zsfelfoldi @rjl493456442
1616
mobile/ @karalabe @ligi
1717
p2p/ @fjl @zsfelfoldi
1818
rpc/ @fjl @holiman
19-
p2p/simulations @zelig @nonsense @janos @justelad
20-
p2p/protocols @zelig @nonsense @janos @justelad
21-
p2p/testing @zelig @nonsense @janos @justelad
19+
p2p/simulations @zelig @janos @justelad
20+
p2p/protocols @zelig @janos @justelad
21+
p2p/testing @zelig @janos @justelad
2222
signer/ @holiman
2323
whisper/ @gballet @gluk256

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Hi there,
22

3-
please note that this is an issue tracker reserved for bug reports and feature requests.
3+
Please note that this is an issue tracker reserved for bug reports and feature requests.
44

5-
For general questions please use the gitter channel or the Ethereum stack exchange at https://ethereum.stackexchange.com.
5+
For general questions please use [discord](https://discord.gg/nthXNEv) or the Ethereum stack exchange at https://ethereum.stackexchange.com.
66

77
#### System information
88

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Install Go
9+
uses: actions/setup-go@v1
10+
with:
11+
go-version: 1.14.7
12+
- name: "Build binaries"
13+
run: make all
14+
- name: "Run tests"
15+
run: make test
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Docker Images For Latest Branches
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Build docker image
15+
env:
16+
DOCKERHUB: ${{ secrets.DOCKERHUB }}
17+
DOCKERHUB_KEY: ${{ secrets.DOCKERHUB_KEY }}
18+
run: |
19+
set -x
20+
ls -l
21+
echo "Docker login"
22+
docker login -u $DOCKERHUB -p $DOCKERHUB_KEY
23+
echo "Running build"
24+
docker build -t maticnetwork/bor:${GITHUB_REF/refs\/heads\//} .
25+
echo "Pushing image"
26+
docker push maticnetwork/bor:${GITHUB_REF/refs\/heads\//}
27+
echo "Done"

.github/workflows/linuxpackage.yml

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install Go
1414
uses: actions/setup-go@v1
1515
with:
16-
go-version: 1.13
16+
go-version: 1.14.7
1717

1818
- name: Set up Ruby 2.6
1919
uses: actions/setup-ruby@v1
@@ -33,76 +33,9 @@ jobs:
3333
3434
make all
3535
36-
cat > bor.service <<- "EOF"
37-
[Unit]
38-
Description=bor
39-
[Service]
40-
WorkingDirectory=/etc/bor/
41-
EnvironmentFile=/etc/bor/metadata
42-
ExecStartPre=/bin/chmod +x /etc/bor/start.sh
43-
ExecStart=/bin/bash /etc/bor/start.sh ${NETWORK_ID} ${VALIDATOR_ADDRESS} ${NODE_TYPE}
44-
Type=simple
45-
User=root
46-
EOF
47-
48-
cat > after_install.sh <<- "EOF"
49-
#!/bin/bash
50-
touch /etc/bor/metadata
51-
touch /etc/bor/start.sh
52-
EOF
53-
54-
cat > metadata <<- "EOF"
55-
NETWORK_ID=
56-
VALIDATOR_ADDRESS=
57-
NODE_TYPE=sentry
58-
EOF
59-
60-
cat > start.sh <<- "EOF"
61-
#!/usr/bin/env sh
62-
63-
NETWORK_ID=$1
64-
VALIDATOR_ADDRESS=$2
65-
NODE_TYPE=$3
66-
67-
DATA_DIR=/etc/bor/dataDir
68-
69-
args="/usr/bin/bor --datadir $DATA_DIR --port '30303' --rpc --rpcaddr '0.0.0.0' --rpcvhosts '*' --rpccorsdomain '*' --rpcport '8545' --ipcpath /etc/bor/bor.ipc --rpcapi 'db,eth,net,web3,txpool,bor' --networkid $NETWORK_ID --miner.gaslimit '200000000' --miner.gastarget '20000000' --txpool.nolocals --txpool.accountslots '128' --txpool.globalslots '20000' --txpool.lifetime '0h16m0s' "
70-
71-
if [[ $NODE_TYPE == 'validator' ]]; then
72-
args+="--keystore $DATA_DIR/keystore \
73-
--unlock $VALIDATOR_ADDRESS \
74-
--password $DATA_DIR/password.txt \
75-
--allow-insecure-unlock \
76-
--nodiscover --maxpeers 1 \
77-
--mine
78-
"
79-
fi
80-
81-
if [[ $NODE_TYPE == 'sentry' ]]; then
82-
args+="--maxpeers 200
83-
"
84-
fi
85-
86-
if [[ $NODE_TYPE == 'validator-without-sentry' ]]; then
87-
args+="--keystore $DATA_DIR/keystore \
88-
--unlock $VALIDATOR_ADDRESS \
89-
--password $DATA_DIR/password.txt \
90-
--allow-insecure-unlock \
91-
--maxpeers 200 \
92-
--mine
93-
"
94-
fi
95-
96-
eval $args
97-
EOF
98-
9936
fpm -s dir -t deb --deb-user root --deb-group root -n matic-bor -v ${{ env.RELEASE_VERSION }} \
100-
--after-install after_install.sh \
101-
bor.service=/etc/systemd/system/ \
10237
build/bin/bor=/usr/bin/ \
103-
build/bin/bootnode=/usr/bin/ \
104-
metadata=/etc/bor/ \
105-
start.sh=/etc/bor/
38+
build/bin/bootnode=/usr/bin/
10639
10740
mkdir packages-v${{ env.RELEASE_VERSION }}
10841

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ build/_vendor/pkg
2424

2525
# used by the Makefile
2626
/build/_workspace/
27+
/build/cache/
2728
/build/bin/
2829
/geth*.zip
2930

.golangci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This file configures github.com/golangci/golangci-lint.
2+
3+
run:
4+
timeout: 3m
5+
tests: true
6+
# default is true. Enables skipping of directories:
7+
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
8+
skip-dirs-use-default: true
9+
skip-files:
10+
- core/genesis_alloc.go
11+
12+
linters:
13+
disable-all: true
14+
enable:
15+
- deadcode
16+
- goconst
17+
- goimports
18+
- gosimple
19+
- govet
20+
- ineffassign
21+
- misspell
22+
# - staticcheck
23+
- unconvert
24+
# - unused
25+
- varcheck
26+
27+
linters-settings:
28+
gofmt:
29+
simplify: true
30+
goconst:
31+
min-len: 3 # minimum length of string constant
32+
min-occurrences: 6 # minimum number of occurrences
33+
34+
issues:
35+
exclude-rules:
36+
- path: crypto/blake2b/
37+
linters:
38+
- deadcode
39+
- path: crypto/bn256/cloudflare
40+
linters:
41+
- deadcode
42+
- path: p2p/discv5/
43+
linters:
44+
- deadcode
45+
- path: core/vm/instructions_test.go
46+
linters:
47+
- goconst
48+
- path: cmd/faucet/
49+
linters:
50+
- deadcode

0 commit comments

Comments
 (0)