Skip to content

Commit

Permalink
whisper/mailserver: reduce the max number of opened files (ethereum#1…
Browse files Browse the repository at this point in the history
…8142)

This should reduce the occurences of travis failures on MacOS

Also fix some linter warnings
  • Loading branch information
czhang-nbai committed Dec 27, 2019
1 parent 403b1ed commit 2225bf4
Show file tree
Hide file tree
Showing 2,762 changed files with 365,560 additions and 872,973 deletions.
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
**/.git
.git
!.git/HEAD
!.git/refs/heads
**/*_test.go

build/_workspace
Expand Down
20 changes: 15 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
# Each line is a file pattern followed by one or more owners.

accounts/usbwallet @karalabe
accounts/scwallet @gballet
accounts/abi @gballet
cmd/clef @holiman
cmd/puppeth @karalabe
consensus @karalabe
core/ @karalabe @holiman
eth/ @karalabe
les/ @zsfelfoldi
light/ @zsfelfoldi
mobile/ @karalabe
core/ @karalabe @holiman @rjl493456442
dashboard/ @kurkomisi
eth/ @karalabe @holiman @rjl493456442
graphql/ @gballet
les/ @zsfelfoldi @rjl493456442
light/ @zsfelfoldi @rjl493456442
mobile/ @karalabe @ligi
p2p/ @fjl @zsfelfoldi
rpc/ @fjl @holiman
p2p/simulations @zelig @janos @justelad
p2p/protocols @zelig @janos @justelad
p2p/testing @zelig @janos @justelad
signer/ @holiman
whisper/ @gballet @gluk256
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ smallest of fixes!
If you'd like to contribute to go-ethereum, please fork, fix, commit and send a
pull request for the maintainers to review and merge into the main code base. If
you wish to submit more complex changes though, please check up with the core
devs first on [our gitter channel](https://gitter.im/nebulaai/nbai-node) to
devs first on [our gitter channel](https://gitter.im/ethereum/go-ethereum) to
ensure those changes are in line with the general philosophy of the project
and/or get some early feedback which can make both your efforts much lighter as
well as our review and merge procedures quick and simple.
Expand All @@ -30,11 +30,11 @@ Please make sure your contributions adhere to our coding guidelines:
Before you submit a feature request, please check and make sure that it isn't
possible through some other means. The JavaScript-enabled console is a powerful
feature in the right hands. Please check our
[Wiki page](https://github.com/nebulaai/nbai-node/wiki) for more info
[Wiki page](https://github.com/ethereum/go-ethereum/wiki) for more info
and help.

## Configuration, dependencies, and tests

Please see the [Developers' Guide](https://github.com/nebulaai/nbai-node/wiki/Developers'-Guide)
Please see the [Developers' Guide](https://github.com/ethereum/go-ethereum/wiki/Developers'-Guide)
for more details on configuring your environment, managing project dependencies
and testing procedures.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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.

Expand Down
2 changes: 2 additions & 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 All @@ -42,6 +43,7 @@ profile.cov
/dashboard/assets/node_modules
/dashboard/assets/stats.json
/dashboard/assets/bundle.js
/dashboard/assets/bundle.js.map
/dashboard/assets/package-lock.json

**/yarn-error.log
45 changes: 45 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file configures github.com/golangci/golangci-lint.

run:
timeout: 2m
tests: true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true

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
135 changes: 81 additions & 54 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,63 @@
language: go
go_import_path: github.com/nebulaai/nbai-node
go_import_path: github.com/ethereum/go-ethereum
sudo: false
matrix:
jobs:
include:
- os: linux
dist: trusty
sudo: required
go: 1.10.x
# This builder only tests code linters on latest version of Go
- stage: lint
os: linux
dist: xenial
go: 1.13.x
env:
- lint
git:
submodules: false # avoid cloning ethereum/tests
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES
- go run build/ci.go lint

# These are the latest Go versions.
- os: linux
dist: trusty
sudo: required
- stage: build
os: linux
dist: xenial
go: 1.11.x
env:
- GO111MODULE=on
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

- os: osx
go: 1.11.x
- stage: build
os: linux
dist: xenial
go: 1.12.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

# These are the latest Go versions.
- stage: build
os: linux
arch: amd64
dist: xenial
go: 1.13.x
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

- stage: build
if: type = pull_request
os: linux
arch: arm64
dist: xenial
go: 1.13.x
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

- stage: build
os: osx
go: 1.13.x
script:
- echo "Increase the maximum number of open file descriptors on macOS"
- NOFILE=20480
Expand All @@ -41,22 +71,12 @@ matrix:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

# This builder only tests code linters on latest version of Go
- os: linux
dist: trusty
go: 1.11.x
env:
- lint
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go lint

# This builder does the Ubuntu PPA upload
- if: type = push
- stage: build
if: type = push
os: linux
dist: trusty
go: 1.11.x
dist: xenial
go: 1.13.x
env:
- ubuntu-ppa
git:
Expand All @@ -68,15 +88,19 @@ matrix:
- debhelper
- dput
- fakeroot
- python-bzrlib
- python-paramiko
script:
- go run build/ci.go debsrc -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>" -upload ppa:ethereum/ethereum
- echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
- go run build/ci.go debsrc -goversion 1.13.4 -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>"

# This builder does the Linux Azure uploads
- if: type = push
- stage: build
if: type = push
os: linux
dist: trusty
dist: xenial
sudo: required
go: 1.11.x
go: 1.13.x
env:
- azure-linux
git:
Expand Down Expand Up @@ -106,12 +130,13 @@ matrix:
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds

# This builder does the Linux Azure MIPS xgo uploads
- if: type = push
- stage: build
if: type = push
os: linux
dist: trusty
dist: xenial
services:
- docker
go: 1.11.x
go: 1.13.x
env:
- azure-linux-mips
git:
Expand All @@ -134,9 +159,10 @@ matrix:
- go run build/ci.go archive -arch mips64le -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds

# This builder does the Android Maven and Azure uploads
- if: type = push
- stage: build
if: type = push
os: linux
dist: trusty
dist: xenial
addons:
apt:
packages:
Expand All @@ -156,25 +182,25 @@ matrix:
git:
submodules: false # avoid cloning ethereum/tests
before_install:
- curl https://storage.googleapis.com/golang/go1.11.4.linux-amd64.tar.gz | tar -xz
- curl https://dl.google.com/go/go1.13.linux-amd64.tar.gz | tar -xz
- export PATH=`pwd`/go/bin:$PATH
- export GOROOT=`pwd`/go
- export GOPATH=$HOME/go
script:
# Build the Android archive and upload it to Maven Central and Azure
- curl https://dl.google.com/android/repository/android-ndk-r17b-linux-x86_64.zip -o android-ndk-r17b.zip
- unzip -q android-ndk-r17b.zip && rm android-ndk-r17b.zip
- mv android-ndk-r17b $HOME
- export ANDROID_NDK=$HOME/android-ndk-r17b
- curl https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip -o android-ndk-r19b.zip
- unzip -q android-ndk-r19b.zip && rm android-ndk-r19b.zip
- mv android-ndk-r19b $ANDROID_HOME/ndk-bundle

- mkdir -p $GOPATH/src/github.com/ethereum
- ln -s `pwd` $GOPATH/src/github.com/ethereum
- ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum
- go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds

# This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
- if: type = push
- stage: build
if: type = push
os: osx
go: 1.11.x
go: 1.13.x
env:
- azure-osx
- azure-ios
Expand All @@ -201,10 +227,11 @@ matrix:
- go run build/ci.go xcode -signer IOS_SIGNING_KEY -deploy trunk -upload gethstore/builds

# This builder does the Azure archive purges to avoid accumulating junk
- if: type = cron
- stage: build
if: type = cron
os: linux
dist: trusty
go: 1.11.x
dist: xenial
go: 1.13.x
env:
- azure-purge
git:
Expand Down
Loading

0 comments on commit 2225bf4

Please sign in to comment.