Sync from fork #74
@ -54,6 +54,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
### Improvements
|
### Improvements
|
||||||
|
|
||||||
* (feemarket) [\#1165](https://github.com/evmos/ethermint/pull/1165) Add hint in specs about different gas terminology for gas in Cosmos and Ethereum.
|
* (feemarket) [\#1165](https://github.com/evmos/ethermint/pull/1165) Add hint in specs about different gas terminology for gas in Cosmos and Ethereum.
|
||||||
|
* (cli) [#1226](https://github.com/evmos/ethermint/pull/1226) Add custom app db backend flag.
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
25
Makefile
25
Makefile
@ -15,6 +15,9 @@ HTTPS_GIT := https://github.com/evmos/ethermint.git
|
|||||||
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)
|
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)
|
||||||
DOCKER := $(shell which docker)
|
DOCKER := $(shell which docker)
|
||||||
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8
|
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8
|
||||||
|
# RocksDB is a native dependency, so we don't assume the library is installed.
|
||||||
|
# Instead, it must be explicitly enabled and we warn when it is not.
|
||||||
|
ENABLE_ROCKSDB ?= false
|
||||||
|
|
||||||
export GO111MODULE = on
|
export GO111MODULE = on
|
||||||
|
|
||||||
@ -49,9 +52,6 @@ ifeq ($(LEDGER_ENABLED),true)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
|
|
||||||
build_tags += gcc
|
|
||||||
endif
|
|
||||||
build_tags += $(BUILD_TAGS)
|
build_tags += $(BUILD_TAGS)
|
||||||
build_tags := $(strip $(build_tags))
|
build_tags := $(strip $(build_tags))
|
||||||
|
|
||||||
@ -69,23 +69,31 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=ethermint \
|
|||||||
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
|
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
|
||||||
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TMVERSION)
|
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TMVERSION)
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_ROCKSDB),true)
|
||||||
|
BUILD_TAGS += rocksdb_build
|
||||||
|
test_tags += rocksdb_build
|
||||||
|
else
|
||||||
|
$(warning RocksDB support is disabled; to build and test with RocksDB support, set ENABLE_ROCKSDB=true)
|
||||||
|
endif
|
||||||
|
|
||||||
# DB backend selection
|
# DB backend selection
|
||||||
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
|
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
|
BUILD_TAGS += gcc
|
||||||
endif
|
endif
|
||||||
ifeq (badgerdb,$(findstring badgerdb,$(COSMOS_BUILD_OPTIONS)))
|
ifeq (badgerdb,$(findstring badgerdb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=badgerdb
|
BUILD_TAGS += badgerdb
|
||||||
endif
|
endif
|
||||||
# handle rocksdb
|
# handle rocksdb
|
||||||
ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS)))
|
ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
ifneq ($(ENABLE_ROCKSDB),true)
|
||||||
|
$(error Cannot use RocksDB backend unless ENABLE_ROCKSDB=true)
|
||||||
|
endif
|
||||||
CGO_ENABLED=1
|
CGO_ENABLED=1
|
||||||
BUILD_TAGS += rocksdb
|
BUILD_TAGS += rocksdb
|
||||||
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=rocksdb
|
|
||||||
endif
|
endif
|
||||||
# handle boltdb
|
# handle boltdb
|
||||||
ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS)))
|
ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
BUILD_TAGS += boltdb
|
BUILD_TAGS += boltdb
|
||||||
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=boltdb
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
||||||
@ -94,6 +102,9 @@ endif
|
|||||||
ldflags += $(LDFLAGS)
|
ldflags += $(LDFLAGS)
|
||||||
ldflags := $(strip $(ldflags))
|
ldflags := $(strip $(ldflags))
|
||||||
|
|
||||||
|
build_tags += $(BUILD_TAGS)
|
||||||
|
build_tags := $(strip $(build_tags))
|
||||||
|
|
||||||
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
|
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
|
||||||
# check for nostrip option
|
# check for nostrip option
|
||||||
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
@ -210,6 +210,10 @@ func (a appCreator) newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots")
|
snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots")
|
||||||
|
if err = os.MkdirAll(snapshotDir, os.ModePerm); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
snapshotDB, err := dbm.NewDB("metadata", sdkserver.GetAppDBBackend(appOpts), snapshotDir)
|
snapshotDB, err := dbm.NewDB("metadata", sdkserver.GetAppDBBackend(appOpts), snapshotDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -7,13 +7,15 @@ import (
|
|||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Tendermint full-node start flags
|
// Tendermint/cosmos-sdk full-node start flags
|
||||||
const (
|
const (
|
||||||
WithTendermint = "with-tendermint"
|
WithTendermint = "with-tendermint"
|
||||||
Address = "address"
|
Address = "address"
|
||||||
Transport = "transport"
|
Transport = "transport"
|
||||||
TraceStore = "trace-store"
|
TraceStore = "trace-store"
|
||||||
CPUProfile = "cpu-profile"
|
CPUProfile = "cpu-profile"
|
||||||
|
// The type of database for application and snapshots databases
|
||||||
|
AppDBBackend = "app-db-backend"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GRPC-related flags.
|
// GRPC-related flags.
|
||||||
|
@ -141,6 +141,7 @@ which accepts a path for the resulting pprof file.
|
|||||||
cmd.Flags().Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')")
|
cmd.Flags().Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')")
|
||||||
cmd.Flags().Uint(server.FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks")
|
cmd.Flags().Uint(server.FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks")
|
||||||
cmd.Flags().Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks")
|
cmd.Flags().Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks")
|
||||||
|
cmd.Flags().String(srvflags.AppDBBackend, "", "The type of database for application and snapshots databases")
|
||||||
|
|
||||||
cmd.Flags().Bool(srvflags.GRPCEnable, true, "Define if the gRPC server should be enabled")
|
cmd.Flags().Bool(srvflags.GRPCEnable, true, "Define if the gRPC server should be enabled")
|
||||||
cmd.Flags().String(srvflags.GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on")
|
cmd.Flags().String(srvflags.GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on")
|
||||||
|
Loading…
Reference in New Issue
Block a user