Skip to content

Commit

Permalink
Merge pull request ethereum#94 from maticnetwork/develop
Browse files Browse the repository at this point in the history
Update master
  • Loading branch information
jdkanani committed Nov 20, 2020
2 parents 187fc06 + adf77d2 commit c1cbbb2
Show file tree
Hide file tree
Showing 962 changed files with 372,399 additions and 72,302 deletions.
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ light/ @zsfelfoldi @rjl493456442
mobile/ @karalabe @ligi
p2p/ @fjl @zsfelfoldi
rpc/ @fjl @holiman
p2p/simulations @zelig @nonsense @janos @justelad
p2p/protocols @zelig @nonsense @janos @justelad
p2p/testing @zelig @nonsense @janos @justelad
p2p/simulations @zelig @janos @justelad
p2p/protocols @zelig @janos @justelad
p2p/testing @zelig @janos @justelad
signer/ @holiman
whisper/ @gballet @gluk256
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Hi there,

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

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

#### System information

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.14.7
- name: "Build binaries"
run: make all
- name: "Run tests"
run: make test
27 changes: 27 additions & 0 deletions .github/workflows/dockerimage-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docker Images For Latest Branches

on:
push:
branches:
- develop
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build docker image
env:
DOCKERHUB: ${{ secrets.DOCKERHUB }}
DOCKERHUB_KEY: ${{ secrets.DOCKERHUB_KEY }}
run: |
set -x
ls -l
echo "Docker login"
docker login -u $DOCKERHUB -p $DOCKERHUB_KEY
echo "Running build"
docker build -t maticnetwork/bor:${GITHUB_REF/refs\/heads\//} .
echo "Pushing image"
docker push maticnetwork/bor:${GITHUB_REF/refs\/heads\//}
echo "Done"
71 changes: 2 additions & 69 deletions .github/workflows/linuxpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: 1.14.7

- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
Expand All @@ -33,76 +33,9 @@ jobs:
make all
cat > bor.service <<- "EOF"
[Unit]
Description=bor
[Service]
WorkingDirectory=/etc/bor/
EnvironmentFile=/etc/bor/metadata
ExecStartPre=/bin/chmod +x /etc/bor/start.sh
ExecStart=/bin/bash /etc/bor/start.sh ${NETWORK_ID} ${VALIDATOR_ADDRESS} ${NODE_TYPE}
Type=simple
User=root
EOF
cat > after_install.sh <<- "EOF"
#!/bin/bash
touch /etc/bor/metadata
touch /etc/bor/start.sh
EOF
cat > metadata <<- "EOF"
NETWORK_ID=
VALIDATOR_ADDRESS=
NODE_TYPE=sentry
EOF
cat > start.sh <<- "EOF"
#!/usr/bin/env sh
NETWORK_ID=$1
VALIDATOR_ADDRESS=$2
NODE_TYPE=$3
DATA_DIR=/etc/bor/dataDir
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' "
if [[ $NODE_TYPE == 'validator' ]]; then
args+="--keystore $DATA_DIR/keystore \
--unlock $VALIDATOR_ADDRESS \
--password $DATA_DIR/password.txt \
--allow-insecure-unlock \
--nodiscover --maxpeers 1 \
--mine
"
fi
if [[ $NODE_TYPE == 'sentry' ]]; then
args+="--maxpeers 200
"
fi
if [[ $NODE_TYPE == 'validator-without-sentry' ]]; then
args+="--keystore $DATA_DIR/keystore \
--unlock $VALIDATOR_ADDRESS \
--password $DATA_DIR/password.txt \
--allow-insecure-unlock \
--maxpeers 200 \
--mine
"
fi
eval $args
EOF
fpm -s dir -t deb --deb-user root --deb-group root -n matic-bor -v ${{ env.RELEASE_VERSION }} \
--after-install after_install.sh \
bor.service=/etc/systemd/system/ \
build/bin/bor=/usr/bin/ \
build/bin/bootnode=/usr/bin/ \
metadata=/etc/bor/ \
start.sh=/etc/bor/
build/bin/bootnode=/usr/bin/
mkdir packages-v${{ env.RELEASE_VERSION }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ build/_vendor/pkg

# used by the Makefile
/build/_workspace/
/build/cache/
/build/bin/
/geth*.zip

Expand Down
50 changes: 50 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file configures github.com/golangci/golangci-lint.

run:
timeout: 3m
tests: true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
skip-files:
- core/genesis_alloc.go

linters:
disable-all: true
enable:
- deadcode
- goconst
- goimports
- gosimple
- govet
- ineffassign
- misspell
# - staticcheck
- unconvert
# - unused
- varcheck

linters-settings:
gofmt:
simplify: true
goconst:
min-len: 3 # minimum length of string constant
min-occurrences: 6 # minimum number of occurrences

issues:
exclude-rules:
- path: crypto/blake2b/
linters:
- deadcode
- path: crypto/bn256/cloudflare
linters:
- deadcode
- path: p2p/discv5/
linters:
- deadcode
- path: core/vm/instructions_test.go
linters:
- goconst
- path: cmd/faucet/
linters:
- deadcode
Loading

0 comments on commit c1cbbb2

Please sign in to comment.