diff --git a/.dockerignore b/.dockerignore index 14c2f5a8b..314dadf0a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,5 +5,5 @@ **/*.dSYM build -tests +tests/testdata cmd/prometheus diff --git a/.gitmodules b/.gitmodules index ae94b08f8..32bdb3b6e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "tests"] path = tests/testdata url = https://github.com/ethereum/tests -[submodule "libmdbx"] - path = libmdbx - url = https://github.com/torquem-ch/libmdbx.git diff --git a/Makefile b/Makefile index cfa1b9745..0256b28fb 100644 --- a/Makefile +++ b/Makefile @@ -105,12 +105,12 @@ COMMANDS += integration COMMANDS += observer COMMANDS += pics COMMANDS += rpcdaemon -COMMANDS += rpcdaemon22 COMMANDS += rpctest COMMANDS += sentry COMMANDS += state COMMANDS += txpool COMMANDS += verkle +COMMANDS += evm # build each command using %.cmd rule $(COMMANDS): %: %.cmd @@ -119,20 +119,13 @@ $(COMMANDS): %: %.cmd all: erigon $(COMMANDS) ## db-tools: build db tools -db-tools: git-submodules +db-tools: @echo "Building db-tools" - @# hub.docker.com setup incorrect gitpath for git modules. Just remove it and re-init submodule. - rm -rf libmdbx - git submodule update --init --recursive --force libmdbx - - cd libmdbx && MDBX_BUILD_TIMESTAMP=unknown make tools - cp libmdbx/mdbx_chk $(GOBIN) - cp libmdbx/mdbx_copy $(GOBIN) - cp libmdbx/mdbx_dump $(GOBIN) - cp libmdbx/mdbx_drop $(GOBIN) - cp libmdbx/mdbx_load $(GOBIN) - cp libmdbx/mdbx_stat $(GOBIN) + go mod vendor + cd vendor/github.com/torquem-ch/mdbx-go && MDBX_BUILD_TIMESTAMP=unknown make tools + cd vendor/github.com/torquem-ch/mdbx-go/mdbxdist && cp mdbx_chk $(GOBIN) && cp mdbx_copy $(GOBIN) && cp mdbx_dump $(GOBIN) && cp mdbx_drop $(GOBIN) && cp mdbx_load $(GOBIN) && cp mdbx_stat $(GOBIN) + rm -rf vendor @echo "Run \"$(GOBIN)/mdbx_stat -h\" to get info about mdbx db file." ## test: run unit tests with a 50s timeout @@ -155,13 +148,12 @@ lintci: ## lintci-deps: (re)installs golangci-lint to build/bin/golangci-lint lintci-deps: rm -f ./build/bin/golangci-lint - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.48.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.49.0 ## clean: cleans the go cache, build dir, libmdbx db dir clean: go clean -cache rm -fr build/* - cd libmdbx/ && make clean # The devtools target installs tools required for 'go generate'. # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'. diff --git a/go.mod b/go.mod index ed0b729df..b11e404f1 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/ledgerwatch/erigon go 1.18 require ( - github.com/ledgerwatch/erigon-lib v0.0.0-20220916073411-10a15edebc2e + github.com/ledgerwatch/erigon-lib v0.0.0-20220916084227-b7b3ea1544fe github.com/ledgerwatch/erigon-snapshot v1.0.1-0.20220809023834-6309df4da4b1 github.com/ledgerwatch/log/v3 v3.4.1 github.com/ledgerwatch/secp256k1 v1.0.0 @@ -57,7 +57,7 @@ require ( github.com/stretchr/testify v1.8.0 github.com/tendermint/go-amino v0.14.1 github.com/tendermint/tendermint v0.31.11 - github.com/torquem-ch/mdbx-go v0.25.3 + github.com/torquem-ch/mdbx-go v0.26.0 github.com/ugorji/go/codec v1.1.13 github.com/ugorji/go/codec/codecgen v1.1.13 github.com/urfave/cli v1.22.9 diff --git a/go.sum b/go.sum index b1fd71553..5f1454055 100644 --- a/go.sum +++ b/go.sum @@ -394,8 +394,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3PYPwICLl+/9oulQauOuETfgFvhBDffs0= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/ledgerwatch/erigon-lib v0.0.0-20220916073411-10a15edebc2e h1:B5h48sxHuWEJptsdBlC/wLlTwG5Kd9K5e5MFZXl0uIg= -github.com/ledgerwatch/erigon-lib v0.0.0-20220916073411-10a15edebc2e/go.mod h1:SRpLIrl+gTW8068Vw4cMSr2Q7Fncpw9KgiWNmmtv+sc= +github.com/ledgerwatch/erigon-lib v0.0.0-20220916084227-b7b3ea1544fe h1:HEchu2DFX7dhuYNHt2+oARGMZJN4ZY6AQrZ4YacY8J0= +github.com/ledgerwatch/erigon-lib v0.0.0-20220916084227-b7b3ea1544fe/go.mod h1:S8/VVAjaE7cVGeI1i58Zb4nUnEy4YtUJDiGDosapbWo= github.com/ledgerwatch/erigon-snapshot v1.0.1-0.20220809023834-6309df4da4b1 h1:qRIJu6cs6fbI8L52DSdPF27j3sOrEriXz1zQSuQvYpA= github.com/ledgerwatch/erigon-snapshot v1.0.1-0.20220809023834-6309df4da4b1/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo= github.com/ledgerwatch/log/v3 v3.4.1 h1:/xGwlVulXnsO9Uq+tzaExc8OWmXXHU0dnLalpbnY5Bc= @@ -625,8 +625,8 @@ github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/torquem-ch/mdbx-go v0.25.3 h1:Moz3A/KERndd2aeLGygeD6zC6ZedyuFdw1pdBQRf6N8= -github.com/torquem-ch/mdbx-go v0.25.3/go.mod h1:T2fsoJDVppxfAPTLd1svUgH1kpPmeXdPESmroSHcL1E= +github.com/torquem-ch/mdbx-go v0.26.0 h1:d8ph2MsVZoBZr0eFWHRiSYjoCXggED6XzcspUX/HsZM= +github.com/torquem-ch/mdbx-go v0.26.0/go.mod h1:T2fsoJDVppxfAPTLd1svUgH1kpPmeXdPESmroSHcL1E= github.com/ugorji/go v1.1.13/go.mod h1:jxau1n+/wyTGLQoCkjok9r5zFa/FxT6eI5HiHKQszjc= github.com/ugorji/go/codec v1.1.13 h1:013LbFhocBoIqgHeIHKlV4JWYhqogATYWZhIcH0WHn4= github.com/ugorji/go/codec v1.1.13/go.mod h1:oNVt3Dq+FO91WNQ/9JnHKQP2QJxTzoN7wCBFCq1OeuU= diff --git a/libmdbx b/libmdbx deleted file mode 160000 index 1cac65363..000000000 --- a/libmdbx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1cac65363763e7523ed3b52eed8f2c617cead973 diff --git a/tools.go b/tools.go index 7a7ba16ab..eab76e962 100644 --- a/tools.go +++ b/tools.go @@ -19,6 +19,8 @@ package tools import ( _ "github.com/fjl/gencodec" _ "github.com/kevinburke/go-bindata" + _ "github.com/torquem-ch/mdbx-go" + _ "github.com/torquem-ch/mdbx-go/mdbxdist" _ "github.com/ugorji/go/codec/codecgen" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" )