diff --git a/Makefile b/Makefile index f5431aee87..25e2b4971d 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ IGNORE_CHECK_GO=false install_rocksdb_version:=$(ROCKSDB_VERSION) -Version=v1.7.5 + +Version=v1.7.1.1 CosmosSDK=v0.39.2 Tendermint=v0.33.9 Iavl=v0.14.3 diff --git a/app/rpc/apis.go b/app/rpc/apis.go index d399293da8..e6b2a63c02 100644 --- a/app/rpc/apis.go +++ b/app/rpc/apis.go @@ -6,7 +6,6 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/okex/exchain/app/rpc/namespaces/eth/txpool" "github.com/okex/exchain/libs/cosmos-sdk/client/context" - "github.com/okex/exchain/libs/cosmos-sdk/server" "github.com/okex/exchain/libs/tendermint/libs/log" evmtypes "github.com/okex/exchain/x/evm/types" "github.com/spf13/viper" @@ -21,7 +20,6 @@ import ( "github.com/okex/exchain/app/rpc/namespaces/personal" "github.com/okex/exchain/app/rpc/namespaces/web3" rpctypes "github.com/okex/exchain/app/rpc/types" - cosmost "github.com/okex/exchain/libs/cosmos-sdk/store/types" ) // RPC namespaces and API version @@ -97,7 +95,7 @@ func GetAPIs(clientCtx context.CLIContext, log log.Logger, keys ...ethsecp256k1. }) } - if viper.GetBool(FlagDebugAPI) && viper.GetString(server.FlagPruning) == cosmost.PruningOptionNothing { + if viper.GetBool(FlagDebugAPI) { apis = append(apis, rpc.API{ Namespace: DebugNamespace, Version: apiVersion, diff --git a/app/rpc/namespaces/eth/tx_pool.go b/app/rpc/namespaces/eth/tx_pool.go index 99bf732bb0..8e57a0e14e 100644 --- a/app/rpc/namespaces/eth/tx_pool.go +++ b/app/rpc/namespaces/eth/tx_pool.go @@ -218,6 +218,11 @@ func (pool *TxPool) insertTx(address common.Address, tx *evmtypes.MsgEthereumTx) // iterate through the txPool map, check if need to continue broadcast tx and do it func (pool *TxPool) continueBroadcast(api *PublicEthereumAPI, currentNonce uint64, address common.Address) error { + defer func() { + if r := recover(); r != nil { + fmt.Errorf("panic of continueBroadcast") + } + }() i := 0 txsLen := len(pool.addressTxsPool[address]) var err error @@ -245,12 +250,12 @@ func (pool *TxPool) continueBroadcast(api *PublicEthereumAPI, currentNonce uint6 if !strings.Contains(err.Error(), sdkerrors.ErrMempoolIsFull.Error()) && !strings.Contains(err.Error(), sdkerrors.ErrInvalidSequence.Error()) { // tx has err, and err is not mempoolfull, the tx should be dropped - err = fmt.Errorf("broadcast failed and tx dropped. err:%s; nonce:%d; tx_hash:%s; address:%s\n", - err.Error(), pool.addressTxsPool[address][i].Data.AccountNonce, pool.addressTxsPool[address][i].Data.Hash.String(), address.String()) + //err = fmt.Errorf("broadcast failed and tx dropped. err:%s; nonce:%d; tx_hash:%s; address:%s\n", + // err.Error(), pool.addressTxsPool[address][i].Data.AccountNonce, pool.addressTxsPool[address][i].Data.Hash.String(), address.String()) pool.dropTxs(i+1, address) } else { - err = fmt.Errorf("broadcast failed. err:%s; nonce:%d; tx_hash:%s; address:%s\n", - err.Error(), pool.addressTxsPool[address][i].Data.AccountNonce, pool.addressTxsPool[address][i].Data.Hash.String(), address.String()) + //err = fmt.Errorf("broadcast failed. err:%s; nonce:%d; tx_hash:%s; address:%s\n", + // err.Error(), pool.addressTxsPool[address][i].Data.AccountNonce, pool.addressTxsPool[address][i].Data.Hash.String(), address.String()) pool.dropTxs(i, address) } pool.logger.Error(err.Error()) diff --git a/go.mod b/go.mod index 032180404a..40e73cd3cf 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/99designs/keyring v1.1.6 github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d - github.com/CosmWasm/wasmvm v1.0.0 + github.com/CosmWasm/wasmvm v1.0.1 github.com/VictoriaMetrics/fastcache v1.8.0 github.com/Workiva/go-datastructures v1.0.53 github.com/alicebob/miniredis/v2 v2.17.0 diff --git a/go.sum b/go.sum index a7f7793cdc..fbe76aba20 100644 --- a/go.sum +++ b/go.sum @@ -80,8 +80,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmvm v1.0.0 h1:NRmnHe3xXsKn2uEcB1F5Ha323JVAhON+BI6L177dlKc= -github.com/CosmWasm/wasmvm v1.0.0/go.mod h1:ei0xpvomwSdONsxDuONzV7bL1jSET1M8brEx0FCXc+A= +github.com/CosmWasm/wasmvm v1.0.1 h1:ZgkPm/nMiahE2CNjQRsOJTjF3eNkjeDVVWt3Pf7B0Gc= +github.com/CosmWasm/wasmvm v1.0.1/go.mod h1:ei0xpvomwSdONsxDuONzV7bL1jSET1M8brEx0FCXc+A= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=