2017-03-15 21:03:01 +00:00
|
|
|
package params
|
|
|
|
|
2018-04-20 12:23:18 +00:00
|
|
|
import "github.com/ethereum/go-ethereum/p2p/discv5"
|
|
|
|
|
2017-03-15 21:03:01 +00:00
|
|
|
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
|
|
|
|
2018-04-10 06:44:09 +00:00
|
|
|
// StatusDatabase path relative to DataDir.
|
|
|
|
StatusDatabase = "status-db"
|
|
|
|
|
2017-04-28 08:49:15 +00:00
|
|
|
// KeyStoreDir is default directory where private keys are stored, relative to DataDir
|
|
|
|
KeyStoreDir = "keystore"
|
|
|
|
|
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-07-13 06:54:10 +00:00
|
|
|
// RPCEnabledDefault is the default state of whether the http rpc server is supposed
|
|
|
|
// to be started along with a node.
|
|
|
|
RPCEnabledDefault = false
|
|
|
|
|
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
|
|
|
|
2018-05-28 16:37:09 +00:00
|
|
|
// HTTPPort is HTTP RPC port (replaced in unit tests)
|
2017-04-09 22:16:05 +00:00
|
|
|
HTTPPort = 8545
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-12-04 16:11:14 +00:00
|
|
|
// ListenAddr is an IP address and port of this node (e.g. 127.0.0.1:30303).
|
|
|
|
ListenAddr = ":0"
|
|
|
|
|
2018-06-06 13:16:17 +00:00
|
|
|
// APIModules is a list of modules to expose via any type of RPC (HTTP, IPC, in-proc)
|
|
|
|
// we also expose 2 limited personal APIs by overriding them in `api/backend.go`
|
|
|
|
APIModules = "eth,net,web3,shh,shhext"
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-08-15 10:27:12 +00:00
|
|
|
// SendTransactionMethodName defines the name for a giving transaction.
|
|
|
|
SendTransactionMethodName = "eth_sendTransaction"
|
2018-04-12 16:17:10 +00:00
|
|
|
|
2018-04-09 08:18:22 +00:00
|
|
|
// AccountsMethodName defines the name for listing the currently signed accounts.
|
|
|
|
AccountsMethodName = "eth_accounts"
|
2018-04-12 16:17:10 +00:00
|
|
|
|
2018-04-09 08:18:22 +00:00
|
|
|
// PersonalSignMethodName defines the name for `personal.sign` API.
|
|
|
|
PersonalSignMethodName = "personal_sign"
|
2017-08-15 10:27:12 +00:00
|
|
|
|
2018-04-18 11:04:02 +00:00
|
|
|
// PersonalRecoverMethodName defines the name for `personal.recover` API.
|
|
|
|
PersonalRecoverMethodName = "personal_ecRecover"
|
|
|
|
|
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)
|
2017-05-16 12:09:52 +00:00
|
|
|
DatabaseCache = 16
|
2017-03-15 21:03:01 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// LogFile defines where to write logs to
|
2017-09-01 18:44:50 +00:00
|
|
|
LogFile = ""
|
2017-03-18 19:00:40 +00:00
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// LogLevel defines the minimum log level to report
|
2017-09-01 18:44:50 +00:00
|
|
|
LogLevel = "ERROR"
|
2017-04-09 22:16:05 +00:00
|
|
|
|
2017-05-16 12:09:52 +00:00
|
|
|
// LogLevelSuccinct defines the log level when only errors are reported.
|
|
|
|
// Useful when the default INFO level becomes too verbose.
|
|
|
|
LogLevelSuccinct = "ERROR"
|
|
|
|
|
2017-05-02 14:30:11 +00:00
|
|
|
// LogToStderr defines whether logged info should also be output to os.Stderr
|
|
|
|
LogToStderr = true
|
|
|
|
|
2017-04-28 08:49:15 +00:00
|
|
|
// WhisperDataDir is directory where Whisper data is stored, relative to DataDir
|
|
|
|
WhisperDataDir = "wnode"
|
|
|
|
|
2017-04-09 22:16:05 +00:00
|
|
|
// 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-04-12 18:26:54 +00:00
|
|
|
// FirebaseNotificationTriggerURL is URL where FCM notification requests are sent to
|
|
|
|
FirebaseNotificationTriggerURL = "https://fcm.googleapis.com/fcm/send"
|
|
|
|
|
2017-10-25 12:08:33 +00:00
|
|
|
// MainnetEthereumNetworkURL is URL where the upstream ethereum network is loaded to
|
2017-08-15 10:27:12 +00:00
|
|
|
// allow us avoid syncing node.
|
2017-10-25 12:08:33 +00:00
|
|
|
MainnetEthereumNetworkURL = "https://mainnet.infura.io/nKmXgiFgc2KqtoQ8BCGJ"
|
2017-08-15 10:27:12 +00:00
|
|
|
|
2017-10-25 12:08:33 +00:00
|
|
|
// RopstenEthereumNetworkURL is URL where the upstream ethereum network is loaded to
|
2017-08-15 10:27:12 +00:00
|
|
|
// allow us avoid syncing node.
|
2017-10-25 12:08:33 +00:00
|
|
|
RopstenEthereumNetworkURL = "https://ropsten.infura.io/nKmXgiFgc2KqtoQ8BCGJ"
|
2017-08-15 10:27:12 +00:00
|
|
|
|
2017-10-25 12:08:33 +00:00
|
|
|
// RinkebyEthereumNetworkURL is URL where the upstream ethereum network is loaded to
|
2017-08-15 10:27:12 +00:00
|
|
|
// allow us avoid syncing node.
|
2017-10-25 12:08:33 +00:00
|
|
|
RinkebyEthereumNetworkURL = "https://rinkeby.infura.io/nKmXgiFgc2KqtoQ8BCGJ"
|
2017-08-15 10:27:12 +00:00
|
|
|
|
2017-05-03 14:24:48 +00:00
|
|
|
// MainNetworkID is id of the main network
|
|
|
|
MainNetworkID = 1
|
2017-05-02 14:30:11 +00:00
|
|
|
|
2017-05-16 03:24:56 +00:00
|
|
|
// RopstenNetworkID is id of a test network (on PoW)
|
|
|
|
RopstenNetworkID = 3
|
|
|
|
|
|
|
|
// RinkebyNetworkID is id of a test network (on PoA)
|
|
|
|
RinkebyNetworkID = 4
|
2017-10-16 21:54:56 +00:00
|
|
|
|
|
|
|
// StatusChainNetworkID is id of a test network (private chain)
|
|
|
|
StatusChainNetworkID = 777
|
2018-04-20 12:23:18 +00:00
|
|
|
|
|
|
|
// WhisperDiscv5Topic used to register and search for whisper peers using discovery v5.
|
|
|
|
WhisperDiscv5Topic = discv5.Topic("whisper")
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// WhisperDiscv5Limits declares min and max limits for peers with whisper topic.
|
|
|
|
WhisperDiscv5Limits = Limits{2, 2}
|
2017-05-17 16:23:30 +00:00
|
|
|
)
|