remove default timeouts

pull/4377/head
MaxMustermann2 2 years ago committed by Casey Gardiner
parent bc3aec4ef6
commit 2bd16b8df6
  1. 26
      rosetta/infra/harmony-mainnet.conf
  2. 26
      rosetta/infra/harmony-pstn.conf
  3. 2
      rosetta/services/construction_check.go
  4. 8
      rpc/rpc.go

@ -1,4 +1,4 @@
Version = "2.5.11" Version = "2.5.13"
[BLSKeys] [BLSKeys]
KMSConfigFile = "" KMSConfigFile = ""
@ -41,9 +41,12 @@ Version = "2.5.11"
AuthPort = 9501 AuthPort = 9501
Enabled = true Enabled = true
IP = "0.0.0.0" IP = "0.0.0.0"
IdleTimeout = "120s"
Port = 9500 Port = 9500
ReadTimeout = "30s"
RosettaEnabled = true RosettaEnabled = true
RosettaPort = 9700 RosettaPort = 9700
WriteTimeout = "30s"
[Log] [Log]
Console = false Console = false
@ -62,6 +65,8 @@ Version = "2.5.11"
NetworkType = "mainnet" NetworkType = "mainnet"
[P2P] [P2P]
ConnManagerHighWatermark = 192
ConnManagerLowWatermark = 160
DisablePrivateIPScan = false DisablePrivateIPScan = false
DiscConcurrency = 0 DiscConcurrency = 0
IP = "0.0.0.0" IP = "0.0.0.0"
@ -69,8 +74,6 @@ Version = "2.5.11"
MaxConnsPerIP = 10 MaxConnsPerIP = 10
MaxPeers = 0 MaxPeers = 0
Port = 9000 Port = 9000
ConnManagerLowWatermark = 160
ConnManagerHighWatermark = 192
WaitForEachPeerToConnect = false WaitForEachPeerToConnect = false
[Pprof] [Pprof]
@ -84,6 +87,7 @@ Version = "2.5.11"
[RPCOpt] [RPCOpt]
DebugEnabled = false DebugEnabled = false
EthRPCsEnabled = true EthRPCsEnabled = true
EvmCallTimeout = "5s"
LegacyRPCsEnabled = true LegacyRPCsEnabled = true
RateLimterEnabled = true RateLimterEnabled = true
RequestsPerSecond = 1000 RequestsPerSecond = 1000
@ -104,11 +108,23 @@ Version = "2.5.11"
DiscHighCap = 128 DiscHighCap = 128
DiscSoftLowCap = 8 DiscSoftLowCap = 8
Downloader = false Downloader = false
StagedSync = false
Enabled = false Enabled = false
InitStreams = 8 InitStreams = 8
MinPeers = 5
MaxAdvertiseWaitTime = 30 MaxAdvertiseWaitTime = 30
MinPeers = 5
StagedSync = false
[Sync.StagedSyncCfg]
DoubleCheckBlockHashes = false
InsertChainBatchSize = 0
LogProgress = false
MaxBackgroundBlocks = 0
MaxBlocksPerSyncCycle = 0
MaxMemSyncCycleSize = 0
TurboMode = false
UseMemDB = false
VerifyAllSig = false
VerifyHeaderBatchSize = 0
[TxPool] [TxPool]
AccountSlots = 16 AccountSlots = 16

@ -1,4 +1,4 @@
Version = "2.5.11" Version = "2.5.13"
[BLSKeys] [BLSKeys]
KMSConfigFile = "" KMSConfigFile = ""
@ -41,9 +41,12 @@ Version = "2.5.11"
AuthPort = 9501 AuthPort = 9501
Enabled = true Enabled = true
IP = "0.0.0.0" IP = "0.0.0.0"
IdleTimeout = "120s"
Port = 9500 Port = 9500
ReadTimeout = "30s"
RosettaEnabled = true RosettaEnabled = true
RosettaPort = 9700 RosettaPort = 9700
WriteTimeout = "30s"
[Log] [Log]
Console = false Console = false
@ -62,6 +65,8 @@ Version = "2.5.11"
NetworkType = "partner" NetworkType = "partner"
[P2P] [P2P]
ConnManagerHighWatermark = 192
ConnManagerLowWatermark = 160
DisablePrivateIPScan = false DisablePrivateIPScan = false
DiscConcurrency = 0 DiscConcurrency = 0
IP = "0.0.0.0" IP = "0.0.0.0"
@ -69,8 +74,6 @@ Version = "2.5.11"
MaxConnsPerIP = 10 MaxConnsPerIP = 10
MaxPeers = 0 MaxPeers = 0
Port = 9000 Port = 9000
ConnManagerLowWatermark = 160
ConnManagerHighWatermark = 192
WaitForEachPeerToConnect = false WaitForEachPeerToConnect = false
[Pprof] [Pprof]
@ -84,6 +87,7 @@ Version = "2.5.11"
[RPCOpt] [RPCOpt]
DebugEnabled = false DebugEnabled = false
EthRPCsEnabled = true EthRPCsEnabled = true
EvmCallTimeout = "5s"
LegacyRPCsEnabled = true LegacyRPCsEnabled = true
RateLimterEnabled = true RateLimterEnabled = true
RequestsPerSecond = 1000 RequestsPerSecond = 1000
@ -104,11 +108,23 @@ Version = "2.5.11"
DiscHighCap = 128 DiscHighCap = 128
DiscSoftLowCap = 8 DiscSoftLowCap = 8
Downloader = false Downloader = false
StagedSync = false
Enabled = false Enabled = false
InitStreams = 8 InitStreams = 8
MinPeers = 2
MaxAdvertiseWaitTime = 30 MaxAdvertiseWaitTime = 30
MinPeers = 2
StagedSync = false
[Sync.StagedSyncCfg]
DoubleCheckBlockHashes = false
InsertChainBatchSize = 0
LogProgress = false
MaxBackgroundBlocks = 0
MaxBlocksPerSyncCycle = 0
MaxMemSyncCycleSize = 0
TurboMode = false
UseMemDB = false
VerifyAllSig = false
VerifyHeaderBatchSize = 0
[TxPool] [TxPool]
AccountSlots = 16 AccountSlots = 16

@ -270,7 +270,7 @@ func (s *ConstructAPI) ConstructionMetadata(
callArgs.To = &contractAddress callArgs.To = &contractAddress
} }
evmExe, err := rpc.DoEVMCall( evmExe, err := rpc.DoEVMCall(
ctx, s.hmy, callArgs, latest, rpc.CallTimeout, ctx, s.hmy, callArgs, latest, s.hmy.NodeAPI.GetConfig().NodeConfig.RPCServer.EvmCallTimeout,
) )
if err != nil { if err != nil {
return nil, common.NewError(common.CatchAllError, map[string]interface{}{ return nil, common.NewError(common.CatchAllError, map[string]interface{}{

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"net" "net"
"strings" "strings"
"time"
"github.com/harmony-one/harmony/eth/rpc" "github.com/harmony-one/harmony/eth/rpc"
"github.com/harmony-one/harmony/hmy" "github.com/harmony-one/harmony/hmy"
@ -28,8 +27,6 @@ const (
const ( const (
// APIVersion used for DApp's, bumped after RPC refactor (7/2020) // APIVersion used for DApp's, bumped after RPC refactor (7/2020)
APIVersion = "1.1" APIVersion = "1.1"
// CallTimeout is the timeout given to all contract calls
CallTimeout = 5 * time.Second
// LogTag is the tag found in the log for all RPC logs // LogTag is the tag found in the log for all RPC logs
LogTag = "[RPC]" LogTag = "[RPC]"
// HTTPPortOffset .. // HTTPPortOffset ..
@ -58,9 +55,8 @@ var (
wsEndpoint = "" wsEndpoint = ""
wsAuthEndpoint = "" wsAuthEndpoint = ""
httpVirtualHosts = []string{"*"} httpVirtualHosts = []string{"*"}
// httpTimeouts = rpc.DefaultHTTPTimeouts httpOrigins = []string{"*"}
httpOrigins = []string{"*"} wsOrigins = []string{"*"}
wsOrigins = []string{"*"}
) )
// Version of the RPC // Version of the RPC

Loading…
Cancel
Save