Skip to content

Commit

Permalink
Merge pull request #2134 from ledgerwatch/stable-2021-06-03
Browse files Browse the repository at this point in the history
  • Loading branch information
mandrigin authored Jun 10, 2021
2 parents b4f3f14 + 22d96a6 commit 81a22af
Show file tree
Hide file tree
Showing 214 changed files with 5,102 additions and 5,624 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
version: v1.40
args: "--build-tags=mdbx"
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: true
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ ENV GIT_COMMIT=$git_commit
ARG git_branch
ENV GIT_BRANCH=$git_branch

ARG git_tag
ENV GIT_TAG=$git_tag

# for linters to avoid warnings. we won't use linters in Docker anyway
ENV LATEST_COMMIT="undefined"

Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
GOBIN = $(CURDIR)/build/bin
GOTEST = go test ./... -p 1 --tags 'mdbx'
GOTEST = GODEBUG=cgocheck=2 go test ./... -p 1

GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
GOBUILD = env GO111MODULE=on go build -trimpath -tags=mdbx -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH}"
GO_DBG_BUILD = env CGO_CFLAGS='-O0 -g -DMDBX_BUILD_FLAGS_CONFIG="config.h"' go build -trimpath -tags=mdbx,debug -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH}" -gcflags=all="-N -l" # see delve docs
GIT_TAG ?= $(shell git describe --tags)
GOBUILD = env GO111MODULE=on go build -trimpath -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH} -X main.gitTag=${GIT_TAG}"
GO_DBG_BUILD = env CGO_CFLAGS='-O0 -g -DMDBX_BUILD_FLAGS_CONFIG="config.h"' GODEBUG=cgocheck=2 go build -trimpath -tags=debug -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH} -X main.gitTag=${GIT_TAG}" -gcflags=all="-N -l" # see delve docs

GO_MAJOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
GO_MINOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
Expand All @@ -18,7 +19,6 @@ endif
ifeq ($(OS),Linux)
PROTOC_OS = linux
endif

all: erigon hack rpctest state pics rpcdaemon integration db-tools sentry

go-version:
Expand All @@ -28,7 +28,7 @@ go-version:
fi

docker:
docker build -t turbo-geth:latest --build-arg git_commit='${GIT_COMMIT}' --build-arg git_branch='${GIT_BRANCH}' .
docker build -t turbo-geth:latest --build-arg git_commit='${GIT_COMMIT}' --build-arg git_branch='${GIT_BRANCH}' --build-arg git_tag='${GIT_TAG}' .

docker-compose:
docker-compose up
Expand Down Expand Up @@ -152,11 +152,11 @@ test-mdbx:
TEST_DB=mdbx $(GOTEST) --timeout 20m

lint:
@./build/bin/golangci-lint run --build-tags="mdbx" --config ./.golangci.yml
@./build/bin/golangci-lint run --config ./.golangci.yml

lintci: mdbx
@echo "--> Running linter for code"
@./build/bin/golangci-lint run --build-tags="mdbx" --config ./.golangci.yml
@./build/bin/golangci-lint run --config ./.golangci.yml

lintci-deps:
rm -f ./build/bin/golangci-lint
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Erigon is an implementation of Ethereum (aka "Ethereum client"), on the efficien
+ [JSON-RPC daemon](#json-rpc-daemon)
+ [Run all components by docker-compose](#run-all-components-by-docker-compose)
+ [Grafana dashboard](#grafana-dashboard)
- [FAQ](#faq)
- [Getting in touch](#getting-in-touch)
+ [Erigon Discord Server](#erigon-discord-server)
+ [Reporting security issues/concerns](#reporting-security-issues-concerns)
Expand Down Expand Up @@ -222,6 +223,17 @@ XDG_DATA_HOME=/preferred/data/folder docker-compose up

`docker-compose up prometheus grafana`, [detailed docs](./cmd/prometheus/Readme.md).

FAQ
================

### How much RAM do I need

- Baseline (ext4 SSD): 16Gb RAM sync takes 5 days, 32Gb - 4 days, 64Gb - 3 days
- +1 day on "zfs compression=off". +2 days on "zfs compression=on" (2x compression ratio). +3 days on btrfs.
- -1 day on NVMe

Detailed explanation: [./docs/programmers_guide/db_faq.md](./docs/programmers_guide/db_faq.md)

Getting in touch
================

Expand Down
Loading

0 comments on commit 81a22af

Please sign in to comment.