2017-03-15 21:03:01 +00:00
|
|
|
package params
|
|
|
|
|
|
|
|
import (
|
|
|
|
"math/big"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2017-04-09 22:16:05 +00:00
|
|
|
// ClientIdentifier is client identifier to advertise over the network
|
|
|
|
ClientIdentifier = "StatusIM"
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// DataDir is default data directory used by statusd executable
|
|
|
|
DataDir = "statusd-data"
|
2017-03-28 09:04:52 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// IPCFile is filename of exposed IPC RPC Server
|
|
|
|
IPCFile = "geth.ipc"
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// HTTPHost is host interface for the HTTP RPC server
|
|
|
|
HTTPHost = "localhost"
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// HTTPPort is HTTP-RPC port (replaced in unit tests)
|
|
|
|
HTTPPort = 8545
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// APIModules is a list of modules to expose vie HTTP RPC
|
2017-03-15 21:03:01 +00:00
|
|
|
// TODO remove "admin" on main net
|
2017-04-09 22:16:05 +00:00
|
|
|
APIModules = "db,eth,net,web3,shh,personal,admin"
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// WSHost is a host interface for the websocket RPC server
|
|
|
|
WSHost = "localhost"
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// WSPort is a WS-RPC port (replaced in unit tests)
|
|
|
|
WSPort = 8546
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// MaxPeers is the maximum number of global peers
|
|
|
|
MaxPeers = 25
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// MaxPendingPeers is the maximum number of peers that can be pending in the
|
2017-03-15 21:03:01 +00:00
|
|
|
// handshake phase, counted separately for inbound and outbound connections.
|
2017-04-09 22:16:05 +00:00
|
|
|
MaxPendingPeers = 0
|
2017-03-15 21:03:01 +00:00
|
|
|
|
|
|
|
// DefaultGas default amount of gas used for transactions
|
|
|
|
DefaultGas = 180000
|
|
|
|
|
|
|
|
// DefaultFileDescriptorLimit is fd limit that database can use
|
|
|
|
DefaultFileDescriptorLimit = uint64(2048)
|
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// DatabaseCache is memory (in MBs) allocated to internal caching (min 16MB / database forced)
|
|
|
|
DatabaseCache = 128
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// LogFile defines where to write logs to
|
|
|
|
LogFile = "geth.log"
|
2017-03-18 19:00:40 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// LogLevel defines the minimum log level to report
|
|
|
|
LogLevel = "INFO"
|
|
|
|
|
|
|
|
// WhisperPort is Whisper node listening port
|
|
|
|
WhisperPort = 30379
|
|
|
|
|
|
|
|
// WhisperMinimumPoW amount of work for Whisper message to be added to sending queue
|
|
|
|
WhisperMinimumPoW = 0.001
|
|
|
|
|
|
|
|
// WhisperTTL is time to live for messages, in seconds
|
|
|
|
WhisperTTL = 120
|
2017-03-18 19:00:40 +00:00
|
|
|
|
2017-03-15 21:03:01 +00:00
|
|
|
// TestNetworkId is id of a test network
|
|
|
|
TestNetworkId = 3
|
|
|
|
)
|
|
|
|
|
|
|
|
// Gas price settings
|
|
|
|
var (
|
|
|
|
GasPrice = new(big.Int).Mul(big.NewInt(20), common.Shannon) // Minimal gas price to accept for mining a transactions
|
|
|
|
GpoMinGasPrice = new(big.Int).Mul(big.NewInt(20), common.Shannon) // Minimum suggested gas price
|
|
|
|
GpoMaxGasPrice = new(big.Int).Mul(big.NewInt(500), common.Shannon) // Maximum suggested gas price
|
|
|
|
GpoFullBlockRatio = 80 // Full block threshold for gas price calculation (%)
|
|
|
|
GpobaseStepDown = 10 // Suggested gas price base step down ratio (1/1000)
|
|
|
|
GpobaseStepUp = 100 // Suggested gas price base step up ratio (1/1000)
|
|
|
|
GpobaseCorrectionFactor = 110 // Suggested gas price base correction factor (%)
|
|
|
|
)
|