· 6 years ago · Mar 24, 2020, 12:30 PM
1
2# Generated Server Configuration File for Grin
3#
4# When running the grin executable without specifying any command line
5# arguments, it will look for this file in two places, in the following
6# order:
7#
8# -The working directory
9# -[user home]/.grin
10#
11
12#########################################
13### SERVER CONFIGURATION ###
14#########################################
15
16#Server connection details
17[server]
18
19#the directory, relative to current, in which the grin blockchain
20#is stored
21db_root = "/root/grin/chain_data"
22
23#path of TLS certificate file, self-signed certificates are not supported
24#tls_certificate_file = ""
25#private key for the TLS certificate
26#tls_certificate_key = ""
27
28#the address on which services will listen, e.g. Transaction Pool
29api_http_addr = "127.0.0.1:3413"
30
31#path of the secret token used by the Rest API and v2 Owner API to authenticate the calls
32#comment the it to disable basic auth
33api_secret_path = "/root/grin/.api_secret"
34
35#path of the secret token used by the Foreign API to authenticate the calls
36#comment the it to disable basic auth
37foreign_api_secret_path = ".foreign_api_secret"
38
39#The chain type, which defines the genesis block and the set of cuckoo
40#parameters used for mining as well as wallet output coinbase maturity. Can be:
41#AutomatedTesting - For CI builds and instant blockchain creation
42#UserTesting - For regular user testing (cuckoo 16)
43#Floonet - For the long term floonet test network
44#Mainnet - For mainnet
45chain_type = "Mainnet"
46
47#the chain validation mode, defines how often (if at all) we
48#want to run a full chain validation. Can be:
49#"EveryBlock" - run full chain validation when processing each block (except during sync)
50#"Disabled" - disable full chain validation (just run regular block validation)
51chain_validation_mode = "Disabled"
52
53#run the node in "full archive" mode (default is fast-sync, pruned node)
54archive_mode = false
55
56#skip waiting for sync on startup, (optional param, mostly for testing)
57skip_sync_wait = false
58
59#whether to run the ncurses TUI (Ncurses must be installed)
60run_tui = true
61
62#Whether to run a test miner. This is only for developer testing (chaintype
63#usertesting) at cuckoo 16, and will only mine into the default wallet port.
64#real mining should use the standalone grin-miner
65run_test_miner = false
66
67#test miner wallet URL (burns if this doesn't exist)
68#test_miner_wallet_url = "http://127.0.0.1:3415"
69
70#########################################
71### SERVER P2P CONFIGURATION ###
72#########################################
73#The P2P server details (i.e. the server that communicates with other
74[server.p2p_config]
75
76#The interface on which to listen.
77#0.0.0.0 will listen on all interfaces, allowing others to interact
78#127.0.0.1 will listen on the local machine only
79host = "MY PUBLIC IP VPS"
80
81#The port on which to listen.
82port = 3414
83
84#All seeds/peers can be either IP address or DNS names. Port number must always be specified
85#how to seed this server, can be None, List or DNSSeed
86seeding_type = "DNSSeed"
87
88#If the seeding type is List, the list of peers to connect to can
89#be specified as follows:
90#seeds = ["192.168.0.1:3414","192.168.0.2:3414"]
91
92#hardcoded peer lists for allow/deny
93#will *only* connect to peers in allow list
94#peers_allow = ["192.168.0.1:3414", "192.168.0.2:3414"]
95#will *never* connect to peers in deny list
96#peers_deny = ["192.168.0.3:3414", "192.168.0.4:3414"]
97#a list of preferred peers to connect to
98peers_preferred = ["213.239.215.236:3414"]
99
100#how long a banned peer should stay banned
101#ban_window = 10800
102
103#maximum number of inbound peer connections
104peer_max_inbound_count = 30
105
106#maximum number of outbound peer connections
107peer_max_outbound_count = 10
108
109#preferred minimum number of outbound peers (we'll actively keep trying to add peers
110#until we get to at least this number)
111peer_min_preferred_outbound_count = 10
112
113#amount of incoming connections temporarily allowed to exceed peer_max_inbound_count
114peer_listener_buffer_count = 5
115
116# 15 = Bit flags for FULL_NODE
117#This structure needs to be changed internally, to make it more configurable
118
119# A preferred dandelion_peer, mainly used for testing dandelion
120# dandelion_peer = "10.0.0.1:13144"
121
122[server.p2p_config.capabilities]
123bits = 15
124
125
126#########################################
127### MEMPOOL CONFIGURATION ###
128#########################################
129[server.pool_config]
130
131#base fee that's accepted into the pool
132accept_fee_base = 1000000
133
134#maximum number of transactions allowed in the pool
135max_pool_size = 50000
136
137#maximum number of transactions allowed in the stempool
138max_stempool_size = 50000
139
140#maximum total weight of transactions that can get selected to build a block
141mineable_max_weight = 40000
142
143
144#########################################
145### DANDELION CONFIGURATION ###
146#########################################
147[server.dandelion_config]
148
149#dandelion epoch duration
150epoch_secs = 600
151
152#fluff and broadcast after embargo expires if tx not seen on network
153embargo_secs = 180
154
155#dandelion aggregation period in secs
156aggregation_secs = 30
157
158#dandelion stem probability (stem 90% of the time, fluff 10% of the time)
159stem_probability = 90
160
161#always stem our (pushed via api) txs regardless of stem/fluff epoch (as per Dandelion++ paper)
162always_stem_our_txs = true
163
164
165################################################
166### STRATUM MINING SERVER CONFIGURATION ###
167################################################
168[server.stratum_mining_config]
169
170#whether stratum server is enabled
171enable_stratum_server = false
172
173#what port and address for the stratum server to listen on
174stratum_server_addr = "127.0.0.1:3416"
175
176#the amount of time, in seconds, to attempt to mine on a particular
177#header before stopping and re-collecting transactions from the pool
178attempt_time_per_block = 15
179
180#the minimum acceptable share difficulty to request from miners
181minimum_share_difficulty = 1
182
183#the wallet receiver to which coinbase rewards will be sent
184wallet_listener_url = "http://127.0.0.1:3415"
185
186#whether to ignore the reward (mostly for testing)
187burn_reward = false
188
189
190#########################################
191### WEBHOOK CONFIGURATION ###
192#########################################
193[server.webhook_config]
194
195#The url where a POST request will be sent when a new block is accepted by our node.
196#block_accepted_url = "http://127.0.0.1:8080/acceptedblock"
197
198#The url where a POST request will be sent when a new transaction is received by a peer.
199#tx_received_url = "http://127.0.0.1:8080/tx"
200
201#The url where a POST request will be sent when a new header is received by a peer.
202#header_received_url = "http://127.0.0.1:8080/header"
203
204#The url where a POST request will be sent when a new block is received by a peer.
205#block_received_url = "http://127.0.0.1:8080/block"
206
207#The number of worker threads that will be assigned to making the http requests.
208nthreads = 4
209
210#The timeout of the http request in seconds.
211timeout = 10
212
213
214#########################################
215### LOGGING CONFIGURATION ###
216#########################################
217[logging]
218
219#whether to log to stdout
220log_to_stdout = true
221
222#log level for stdout: Error, Warning, Info, Debug, Trace
223stdout_log_level = "Warning"
224
225#whether to log to a file
226log_to_file = true
227
228#log level for file: Error, Warning, Info, Debug, Trace
229file_log_level = "Info"
230
231#log file path
232log_file_path = "/root/grin/grin-server.log"
233
234#whether to append to the log file (true), or replace it on every run (false)
235log_file_append = true
236
237#maximum log file size in bytes before performing log rotation
238#comment it to disable log rotation
239log_max_size = 16777216
240
241#maximum count of the log files to rotate over
242log_max_files = 32