# Sample Server Configuration File for Grin
#
# When running the grin executable without specifying any command line
# arguments, it will look for this file in three places, in the following
# order:
#
# -The working directory
# -The directory in which the executable resides
# -[user home]/.grin
#

#########################################
### SERVER CONFIGURATION              ###
#########################################

#Server connection details
[server]

#the address on which services will listen, e.g. Transaction Pool

api_http_addr = "127.0.0.1:13413"

#the directory, relative to current, in which the grin blockchain
#is stored

db_root = ".grin"

#How to seed this server, can be None, List, WebStatic or DNSSeed
#
#seeding_type = "None"

#If seeding_type = List, the list of peers to connect to.
#
#seeds = ["192.168.0.1:13414","192.168.0.2:13414"]

#The chain type, which defines the genesis block and the set of cuckoo
#parameters used for mining. Can be:
#AutomatedTesting - For CI builds and instant blockchain creation
#UserTesting - For regular user testing (cuckoo 16)
#Testnet1 - Testnet1 genesis block (cuckoo 16)
#Testnet2 - Testnet2 genesis block (cuckoo 30)

chain_type = "Testnet3"

#The chain validation mode, defines how often (if at all) we
#want to run a full chain validation. Can be:
#"EveryBlock" - run full chain validation when processing each block (except during sync)
#"Disabled" - disable full chain validation (just run regular block validation)
#chain_validation_mode = "Disabled"

#run the node in "full archive" mode (default is fast-sync, pruned node)
#archive_mode = false

#7 = Bit flags for FULL_NODE, this structure needs to be changed
#internally to make it more configurable
capabilities = [7]

#skip waiting for sync on startup, (optional param, mostly for testing)
skip_sync_wait = false

#whether to run the ncurses TUI. Ncurses must be installed and this
#will also disable logging to stdout
run_tui = true

#Whether to run the wallet listener with the server by default
run_wallet_listener = true

# Whether to run the web-wallet API (will only run on localhost)
# grin wallet web will run this automatically, so this should
# only be set to true for test/development purposes
run_wallet_owner_api = false

#Whether to run a test miner. This is only for developer testing (chaintype
#usertesting) at cuckoo 16, and will only mine into the default wallet port.
#real mining should use the standalone grin-miner
run_test_miner = false

#test miner wallet URL (burns if this doesn't exist)
#test_miner_wallet_url = "http://127.0.0.1:13415"

[server.dandelion_config]
#dandelion relay time (choose new relay peer every n secs)
relay_secs = 600

#fluff and broadcast after embargo expires if tx not seen on network
embargo_secs = 180

#run dandelion stem/fluff processing every n secs (stem tx aggregation in this window)
patience_secs = 10

#dandelion stem probability (stem 90% of the time, fluff 10% of the time)
stem_probability = 90

#The P2P server details (i.e. the server that communicates with other
#grin server nodes
[server.p2p_config]

host = "0.0.0.0"
port = 13414

#hardcoded peer lists for allow/deny
#will *only* connect to peers in allow list
#peers_allow = ["192.168.0.1:13414", "192.168.0.2:13414"]
#will *never* connect to peers in deny list
#peers_deny = ["192.168.0.3:13414", "192.168.0.4:13414"]

#how long a banned peer should stay banned
#ban_window = 10800

#maximum number of peers
#peer_max_count = 25

#preferred minimum number of peers (we'll actively keep trying to add peers
#until we get to at least this number
#peer_min_preferred_count = 8

###########################################
### STRATUM MINING SERVER CONFIGURATION ###
###########################################
[mining_server]

#flag whether stratum server is enabled
enable_stratum_server = true

#what port and address for the stratum server to listen on
stratum_server_addr = "127.0.0.1:13416"

#The amount of time, in seconds, to attempt to mine on a particular
#header before stopping and re-collecting transactions from the pool
attempt_time_per_block = 15

#The minimum acceptable share difficulty to request from miners
minimum_share_difficulty = 1

#the wallet receiver to which coinbase rewards will be sent
wallet_listener_url = "http://127.0.0.1:13415"

#whether to ignore the reward (mostly for testing)
burn_reward = false

#########################################
### WALLET CONFIGURATION              ###
#########################################

[wallet]

# Host IP for wallet listener, change to "0.0.0.0" to receive grins
api_listen_interface = "127.0.0.1"

# Port for wallet listener
api_listen_port = 13415

# Where the wallet should find a running node
check_node_api_http_addr = "http://127.0.0.1:13413"

# Where to find wallet files (seed, data, etc)
data_file_dir = "."

#########################################
### LOGGING CONFIGURATION             ###
#########################################

[logging]

# Whether to log to stdout
log_to_stdout = true

# Log level for stdout: Critical, Error, Warning, Info, Debug, Trace
stdout_log_level = "Warning"

# Whether to log to a file
log_to_file = true

# Log level for file: Critical, Error, Warning, Info, Debug, Trace
file_log_level = "Debug"

# Log file path
log_file_path = "grin.log"

# Whether to append to the log file (true), or replace it on every run (false)
log_file_append = true