Skip to content

Commit

Permalink
Merge PR: merge v1.6.5 to dev (#2805)
Browse files Browse the repository at this point in the history
* Merge PR: fix the evm2cm tx in parallel in watchdb query status error (#2715)

Co-authored-by: Evan Han <[email protected]>

* Merge PR: fix feesplit cache contaminate when parallel-tx rerun (#2720)

* Merge PR: delete feesplit innertx (#2721)

* delete feesplit innertx

* Update keeper_innertx.go

* Merge PR: optimize the feesplit api (#2725)

* Merge PR: fix the watchdb parallel query error (#2730)

2. fix the --deliver-txs-mode=2 can not query status
3. update the version

* Merge PR: init commit and merge confilict (#2731)

when repair-state we judge the fast-storage flag by data

add feesplit module

reserve --iavl-enable-fast-storage flag for repair-state

merge repair-state we judge... and deal with confict

rm NeedLongTimeToUpgrade use the IsFastStorgeStrategy universal

Co-authored-by: xiangjianmeng <[email protected]>

* Merge PR: query Feesplit params by rest api (#2732)

* Merge PR: upadte version (#2735)

* Merge PR: fix watchdb duplicate tx bugs (#2736)

* Merge PR: rollback blocktime v156 (#2738)

* roll back blocktime

* del flag

* Merge PR: fix the estimateGas crash (#2749)

* Merge PR: Compatible start enable-repair-state flag with fss  (#2754)

* when start with enable-repair-state and the db is fast-storage, we repair with the iavl-enable-fast-storage

* adjust the fast-storage node size

* Merge PR: patch to fix the potential bug of hgu (#2755)

Co-authored-by: KamiD <[email protected]>

* Merge PR: update config default value (#2751)

* set chain-id default to exchain-66

* set EnablePrerunTx default to true

* set pruning default to everything

* enable ac default

* disableABCIQueryMutex default

* enable fast-query by default

* enable BloomFilter by default

* update mempool Size default value

* update val mode config

* add tx_indexer.indexer cmd flags

* add enable-concurrency flag

* set chainid to exchain65 if make testnet

* Merge PR: dump lastrun in case of fastsync (#2760)

* Merge PR: recommend gp bug fix (#2744)

* gp bug fix

* modify code

* add flag DynamicGpAdaptUncongest

* modify ut

* adapt congest

* bug fix

* code optimize

Co-authored-by: KamiD <[email protected]>

* Merge PR: optimize start params (#2762)

* optimize start params

* optimize start param

* optimize start param

* optimize start param

* Merge PR: DDS lastrun & bump version to v1.6.5.5(#2763)

* dds lastrun

* Version=v1.6.5.5

* Merge PR: add dynamic dp flag (#2764)

* gp bug fix

* modify code

* add flag DynamicGpAdaptUncongest

* modify ut

* adapt congest

* bug fix

* code optimize

* add flag: gp maxGas maxTx

* Update config.go

* Update flags.go

Co-authored-by: KamiD <[email protected]>

* Merge PR: add avc flag (#2768)

* Merge PR: modify DynamicGpMaxGasUsed flag (#2765)

* gp bug fix

* modify code

* add flag DynamicGpAdaptUncongest

* modify ut

* adapt congest

* bug fix

* code optimize

* add flag: gp maxGas maxTx

* bug fix

* modify flag

* typo fix

* Merge PR: optimiz fss flag (#2769)

* fast storage is default true and set by the data

* add fast-storage tips when start the node

* hidden flag discard-fast-storage

* print iavl.IsFastStorage when start node

* Update Makefile

* restore and hide the old flag

Co-authored-by: KamiD <[email protected]>

* Merge PR: evn set (#2782)

* Merge PR: commitGapHeight for dynamic update (#2773)

* 1. add commitGapHeight for dynamic update

* 1. add comment

* 1. add UpdateCommitGapHeight at before commitStores

* 1. add UpdateCommitGapHeight at before commitStores

* 1. modify the spell

Co-authored-by: KamiD <[email protected]>

* Merge PR: support dynamic set fast node cache size (#2780)

* support dynamic set fast node cache size

* use atomic operate the size

* do not use atomic

* use one const and reduce dup flag

* Merge PR: optimize gp flag and fix bug (#2775)

* modify dynamic gp flag

* fix bug

* rewrite ut

* magic number fix

* replace flag in sh

* modify code

* fix typo

* mark hidden enable-dynamic-gp

* improve code

* improve code

* Merge PR: change avc premakeblock to single (#2778)

* add debug test

* preblock test

* restore producer

* adjust channel buffer

Co-authored-by: xiangjianmeng <[email protected]>

* Merge PR: feesplit support paralleled-tx (#2776)

* Update app_parallel.go

first. commit

Update baseapp_runtx.go

Update abci.go

1

Update app_parallel.go

Update app_parallel.go

Update baseapp_mode_deliver.go

1

Update evm_hooks.go

Update baseapp_mode_deliver.go

Update base.go

Update evm_hooks.go

1

a

Update repair_state.go

Revert "Update repair_state.go"

This reverts commit 3051e30.

* fix test

* typ

* add check

* add check

Co-authored-by: xiangjianmeng <[email protected]>

* Merge PR: workload(lastRun+persist) statistic (#2785)

* applybolck workload statistic

* complete workload statistic

* fix bug  & change format

* remove BlockExecutor field

* fix atomic on lower go version

* remove assert

* make it more accurately if process started less than 1 hour

* make code easier to understand

* fix code style

Co-authored-by: Zhong Qiu <[email protected]>
Co-authored-by: yangzhe <[email protected]>

* Merge PR: fix random panic parallel tx (#2794)

* Merge PR: Bump version to v1.6.5.7 (#2796)

* Merge PR: replay cmd default value (#2792)

* change default cli params when replay

* update

Co-authored-by: xiangjianmeng <[email protected]>

* Merge PR: disable multi cache (#2802)

* Merge PR: bump to v1.6.5.8 (#2803)

* Merge PR: fix eth_getTransactionCount error when rpc node is behind the latest block (#2807)

* Merge PR: local dynamic config (#2783)

* local dynamic config

* update go mod

* support dynamic config for mempool.cache_size

* if enable apollo, local dynamic config will not be applied

* update

Co-authored-by: ylsGit <[email protected]>
Co-authored-by: xiangjianmeng <[email protected]>

* Merge PR: fix concurrency execute bug (#2808)

* fix bug: concurrency execute ApplyBlock in TestFastSyncBadBlockStopsPeer make WrokloadStatistic crash

* remove out-of-date comment

* add comment for concurrently invoking

Co-authored-by: yangzhe <[email protected]>

* revert patch for hgu

* Merge PR: Update elapse_info.go (#2810)

* Merge PR: fix config of timeout_commit (#2806)

* fix config of timeout_commit

* fix config fmt

* add db_backend

* add pendingPool=false

* del setEnv rocksdb

* unify timeout_commit define in one place

* testnet.sh

* add log

* add log

Co-authored-by: xiangjianmeng <[email protected]>

* Merge PR: support pprof and multi-cache when repair state (#2801)

* support multi-cache when repair state

* add pprof

* fix net pprof

* Merge PR: simulate tx async (#2812)

* add enable config of hgu

* simulate tx in new goroutine

* add simulation debug info

* start more goroutine for simulation

* fix bug

* udpate

* fix bug of sig cache

* disable pendingPool

* enable hgu default

* add log info and query api of simulation gas

* add enable config of pgu and adjustment

* use atomic to prevent data race

* delete temp code

* enable async simulation only when pgb is greater than -1

* check error

* Merge PR: fix websocket leak (#2820)

* fix websocket leak

* optimize code

* Merge PR: Change GetFastNode's Lock to Rlock (#2815)

* remove the lock when get fast node

* replace mutex with rbmutex

* bump version to v1.6.6

Co-authored-by: lyh169 <[email protected]>
Co-authored-by: Evan Han <[email protected]>
Co-authored-by: ylsGit <[email protected]>
Co-authored-by: zhangkai <[email protected]>
Co-authored-by: xiangjianmeng <[email protected]>
Co-authored-by: lcmmhcc <[email protected]>
Co-authored-by: chengzhinei <[email protected]>
Co-authored-by: YuanXingqiang <[email protected]>
Co-authored-by: cwbhhjl <[email protected]>
Co-authored-by: Leo <[email protected]>
Co-authored-by: Zhong Qiu <[email protected]>
Co-authored-by: lisuxiaoqi <[email protected]>
Co-authored-by: chunfengSun <[email protected]>
Co-authored-by: fatcat22 <[email protected]>
Co-authored-by: yangzhe <[email protected]>
  • Loading branch information
16 people authored Dec 1, 2022
1 parent 42e9163 commit a4005fc
Show file tree
Hide file tree
Showing 57 changed files with 1,511 additions and 268 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ IGNORE_CHECK_GO=false
install_rocksdb_version:=$(ROCKSDB_VERSION)


Version=v1.6.5
Version=v1.6.6
CosmosSDK=v0.39.2
Tendermint=v0.33.9
Iavl=v0.14.3
Expand Down Expand Up @@ -104,6 +104,10 @@ ifeq ($(WITH_ROCKSDB),true)
ldflags += -X github.com/okex/exchain/libs/tendermint/types.DBBackend=rocksdb
endif

ifeq ($(MAKECMDGOALS),testnet)
ldflags += -X github.com/okex/exchain/libs/cosmos-sdk/server.ChainID=exchain-65
endif

ifeq ($(LINK_STATICALLY),true)
ldflags += -linkmode=external -extldflags "-Wl,-z,muldefs -static"
endif
Expand Down
14 changes: 10 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ import (
"google.golang.org/grpc/encoding"
"google.golang.org/grpc/encoding/proto"

"github.com/okex/exchain/app/utils/appstatus"

"github.com/okex/exchain/app/ante"
okexchaincodec "github.com/okex/exchain/app/codec"
appconfig "github.com/okex/exchain/app/config"
gasprice "github.com/okex/exchain/app/gasprice"
"github.com/okex/exchain/app/gasprice"
"github.com/okex/exchain/app/refund"
"github.com/okex/exchain/app/types"
okexchain "github.com/okex/exchain/app/types"
"github.com/okex/exchain/app/utils/sanity"
bam "github.com/okex/exchain/libs/cosmos-sdk/baseapp"
Expand Down Expand Up @@ -683,7 +686,7 @@ func NewOKExChainApp(
enableAnalyzer := sm.DeliverTxsExecMode(viper.GetInt(sm.FlagDeliverTxsExecMode)) == sm.DeliverTxsExecModeSerial
trace.EnableAnalyzer(enableAnalyzer)

if appconfig.GetOecConfig().GetEnableDynamicGp() {
if appconfig.GetOecConfig().GetDynamicGpMode() != types.CloseMode {
gpoConfig := gasprice.NewGPOConfig(appconfig.GetOecConfig().GetDynamicGpWeight(), appconfig.GetOecConfig().GetDynamicGpCheckBlocks())
app.gpo = gasprice.NewOracle(gpoConfig)
}
Expand Down Expand Up @@ -719,8 +722,9 @@ func (app *OKExChainApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBloc

// EndBlocker updates every end block
func (app *OKExChainApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock {
if appconfig.GetOecConfig().GetEnableDynamicGp() {
_ = app.gpo.BlockGPQueue.Push(app.gpo.CurrentBlockGPs)
if appconfig.GetOecConfig().GetDynamicGpMode() != types.CloseMode {
currentBlockGPsCopy := app.gpo.CurrentBlockGPs.Copy()
_ = app.gpo.BlockGPQueue.Push(currentBlockGPsCopy)
GlobalGp = app.gpo.RecommendGP()
app.gpo.CurrentBlockGPs.Clear()
}
Expand Down Expand Up @@ -875,9 +879,11 @@ func PreRun(ctx *server.Context, cmd *cobra.Command) error {
// init tx signature cache
tmtypes.InitSignatureCache()

iavl.SetEnableFastStorage(appstatus.IsFastStorageStrategy())
// set external package flags
server.SetExternalPackageValue(cmd)

ctx.Logger.Info("The database storage strategy", "fast-storage", iavl.GetEnableFastStorage())
// set the dynamic config
appconfig.RegisterDynamicConfig(ctx.Logger.With("module", "config"))

Expand Down
5 changes: 3 additions & 2 deletions app/app_abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"time"

appconfig "github.com/okex/exchain/app/config"
"github.com/okex/exchain/app/types"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
"github.com/okex/exchain/libs/system/trace"
abci "github.com/okex/exchain/libs/tendermint/abci/types"
Expand All @@ -25,7 +26,7 @@ func (app *OKExChainApp) DeliverTx(req abci.RequestDeliverTx) (res abci.Response

resp := app.BaseApp.DeliverTx(req)

if appconfig.GetOecConfig().GetEnableDynamicGp() {
if appconfig.GetOecConfig().GetDynamicGpMode() != types.CloseMode {
tx, err := evm.TxDecoder(app.marshal)(req.Tx)
if err == nil {
//optimize get tx gas price can not get value from verifySign method
Expand All @@ -46,7 +47,7 @@ func (app *OKExChainApp) DeliverRealTx(req abci.TxEssentials) (res abci.Response
app.EvmKeeper.Watcher.RecordTxAndFailedReceipt(req, &resp, app.GetTxDecoder())

var err error
if appconfig.GetOecConfig().GetEnableDynamicGp() {
if appconfig.GetOecConfig().GetDynamicGpMode() != types.CloseMode {
tx, _ := req.(sdk.Tx)
if tx == nil {
tx, err = evm.TxDecoder(app.Codec())(req.GetRaw())
Expand Down
Loading

0 comments on commit a4005fc

Please sign in to comment.