Skip to content

Commit 81a22af

Browse files
authored
Merge pull request #2134 from ledgerwatch/stable-2021-06-03
2 parents b4f3f14 + 22d96a6 commit 81a22af

File tree

214 files changed

+5102
-5624
lines changed

Some content is hidden

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

214 files changed

+5102
-5624
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
uses: golangci/golangci-lint-action@v2
4545
with:
4646
version: v1.40
47-
args: "--build-tags=mdbx"
4847
skip-go-installation: true
4948
skip-pkg-cache: true
5049
skip-build-cache: true

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ENV GIT_COMMIT=$git_commit
66
ARG git_branch
77
ENV GIT_BRANCH=$git_branch
88

9+
ARG git_tag
10+
ENV GIT_TAG=$git_tag
11+
912
# for linters to avoid warnings. we won't use linters in Docker anyway
1013
ENV LATEST_COMMIT="undefined"
1114

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
GOBIN = $(CURDIR)/build/bin
2-
GOTEST = go test ./... -p 1 --tags 'mdbx'
2+
GOTEST = GODEBUG=cgocheck=2 go test ./... -p 1
33

44
GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
55
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
6-
GOBUILD = env GO111MODULE=on go build -trimpath -tags=mdbx -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH}"
7-
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
6+
GIT_TAG ?= $(shell git describe --tags)
7+
GOBUILD = env GO111MODULE=on go build -trimpath -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH} -X main.gitTag=${GIT_TAG}"
8+
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
89

910
GO_MAJOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
1011
GO_MINOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
@@ -18,7 +19,6 @@ endif
1819
ifeq ($(OS),Linux)
1920
PROTOC_OS = linux
2021
endif
21-
2222
all: erigon hack rpctest state pics rpcdaemon integration db-tools sentry
2323

2424
go-version:
@@ -28,7 +28,7 @@ go-version:
2828
fi
2929

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

3333
docker-compose:
3434
docker-compose up
@@ -152,11 +152,11 @@ test-mdbx:
152152
TEST_DB=mdbx $(GOTEST) --timeout 20m
153153

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

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

161161
lintci-deps:
162162
rm -f ./build/bin/golangci-lint

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Erigon is an implementation of Ethereum (aka "Ethereum client"), on the efficien
1919
+ [JSON-RPC daemon](#json-rpc-daemon)
2020
+ [Run all components by docker-compose](#run-all-components-by-docker-compose)
2121
+ [Grafana dashboard](#grafana-dashboard)
22+
- [FAQ](#faq)
2223
- [Getting in touch](#getting-in-touch)
2324
+ [Erigon Discord Server](#erigon-discord-server)
2425
+ [Reporting security issues/concerns](#reporting-security-issues-concerns)
@@ -222,6 +223,17 @@ XDG_DATA_HOME=/preferred/data/folder docker-compose up
222223

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

226+
FAQ
227+
================
228+
229+
### How much RAM do I need
230+
231+
- Baseline (ext4 SSD): 16Gb RAM sync takes 5 days, 32Gb - 4 days, 64Gb - 3 days
232+
- +1 day on "zfs compression=off". +2 days on "zfs compression=on" (2x compression ratio). +3 days on btrfs.
233+
- -1 day on NVMe
234+
235+
Detailed explanation: [./docs/programmers_guide/db_faq.md](./docs/programmers_guide/db_faq.md)
236+
225237
Getting in touch
226238
================
227239

0 commit comments

Comments
 (0)