################################################################################
# Copyright © 2013-2016 The Nxt Core Developers.                               #
# Copyright © 2016-2017 Jelurida IP B.V.                                       #
#                                                                              #
# See the LICENSE.txt file at the top-level directory of this distribution     #
# for licensing information.                                                   #
#                                                                              #
# Unless otherwise agreed in a custom licensing agreement with Jelurida B.V.,  #
# no part of the Nxt software, including this file, may be copied, modified,   #
# propagated, or distributed except according to the terms contained in the    #
# LICENSE.txt file.                                                            #
#                                                                              #
# Removal or modification of this copyright notice is prohibited.              #
#                                                                              #
################################################################################

#### MAIN CONFIG ####

# My platform, to be announced to peers.
prizm.myPlatform= 

# Password that should be provided when executing protected (administrative) API
# requests.
# Please choose a decent password here. Preferably, use a password generator.
# Password protection is disabled and password is not needed when the API server
# only listens on the localhost interface, i.e. when
# prizm.apiServerHost=127.0.0.1.
prizm.adminPassword=

# My externally visible IP address or host name, to be announced to peers.
# It can optionally include a port number, which will also be announced to
# peers, and may be different from prizm.peerServerPort (useful if you do port
# forwarding behind a router).
prizm.myAddress=


#### PEER NETWORKING ####

# Announce my IP address/hostname to peers and allow them to share it with other
# peers. If disabled, peer networking servlet will not be started at all.
prizm.shareMyAddress=true
 

# Host interface on which to listen for peer networking requests, default all.
# Use 0.0.0.0 to listen on all interfaces, including IPv6.
prizm.peerServerHost=0.0.0.0



# Host interface on which to listen for http/json API request, default localhost
# only. Set to 0.0.0.0 to allow the API server to accept requests from all
# network interfaces, including IPv6.
prizm.apiServerHost=0.0.0.0

# Hosts from which to allow http/json API requests, if enabled. Set to * to
# allow all. Can also specify networks in CIDR notation, e.g. 192.168.1.0/24.
prizm.allowedBotHosts=*

# Port for http/json API requests.
prizm.apiServerPort=9976

# Port for https/json API request. If same as prizm.apiServerPort, the prizm.apiSSL
# setting determines whether SSL is used or not.
prizm.apiServerSSLPort=9977



# Port for incoming peer to peer networking requests, if enabled.
prizm.peerServerPort=9974

# Enable UPnP for the peer port.
prizm.enablePeerUPnP=true

# UPnP gateway http read timeout, milliseconds. Set to -1 to disable.
# Default 7000 if not set.
prizm.upnpGatewayTimeout=7000

# UPnP gateway socket connection timeout, milliseconds. Set to -1 to disable.
# Default 3000 if not set.
prizm.upnpDiscoverTimeout=3000


# My hallmark, if available.
# prizm.myHallmark=

# Default initial peers. Only used if prizm.usePeersDb=true.
# Do not modify. Add custom peers to prizm.wellKnownPeers instead.
prizm.defaultPeers=146.52.111.137; 45.134.27.187; 185.182.185.97; 89.185.85.51; 188.120.245.83; 109.237.1.177; 80.241.217.254; 185.244.217.129; 77.91.78.125; 95.37.217.89; 79.137.248.88; 94.130.8.110; 62.113.118.11; 212.12.20.83; 5.189.179.253; 178.124.148.56;

# A list of well known peer addresses / host names, separated by '; '. These
# peers are always kept in connected state.
prizm.wellKnownPeers=146.52.111.137; 45.134.27.187; 185.182.185.97; 89.185.85.51; 188.120.245.83; 109.237.1.177; 80.241.217.254; 185.244.217.129; 77.91.78.125; 95.37.217.89; 79.137.248.88; 94.130.8.110; 62.113.118.11; 212.12.20.83; 5.189.179.253; 178.124.148.56;

# Known bad peers to be blacklisted.
prizm.knownBlacklistedPeers=

# Default initial peers used for testnet only. Only used if prizm.usePeersDb=true.
# Do not modify. Add custom testnet peers to prizm.testnetPeers instead.
prizm.defaultTestnetPeers=10.0.1.35

# Well known testnet peers.
prizm.testnetPeers=10.0.1.35

# Maximum number of inbound connections.
prizm.maxNumberOfInboundConnections=1000

# Maximum number of outbound connections.
prizm.maxNumberOfOutboundConnections=100

# Maintain active connections with at least that many peers.
prizm.maxNumberOfConnectedPublicPeers=40

# Stop adding new peers when number of known peers exceeds that many.
prizm.maxNumberOfKnownPeers=2000

# Stop removing old peers when number of known peers drops below that many.
prizm.minNumberOfKnownPeers=1000

# Peer networking connect timeout for outgoing connections.
prizm.connectTimeout=1000

# Peer networking read timeout for outgoing connections.
prizm.readTimeout=2000

# Peer networking server idle timeout, milliseconds.
prizm.peerServerIdleTimeout=3000

# Use WebSocket connection if supported by the remote peer.
prizm.useWebSockets=true

# WebSocket connection idle timeout (milliseconds).
prizm.webSocketIdleTimeout=90000

# Use the peer hallmark to only connect with peers above the defined push/pull
# hallmark thresholds.
# Disabling hallmark protection also disables weighting of peers by hallmark
# weight, so connecting to any of your peers becomes equally likely.
prizm.enableHallmarkProtection=false

# Hallmark threshold to use when sending data to peers.
prizm.pushThreshold=500000

# Hallmark threshold to use when requesting data from peers.
prizm.pullThreshold=500000

# Blacklist peers for 600000 milliseconds (i.e. 10 minutes by default).
prizm.blacklistingPeriod=6000000

# Consider a new transaction or block sent after 10 peers have received it.
prizm.sendToPeersLimit=10

# Enable the Jetty Denial of Service Filter for the peer networking server.
prizm.enablePeerServerDoSFilter=true

# Compress Http responses for the peer networking server.
prizm.enablePeerServerGZIPFilter=true

# Use testnet, leave set to false unless you are really testing.
# Never unlock your real accounts on testnet! Use separate accounts for testing
# only.
# When using testnet, all custom port settings will be ignored,
# and hardcoded ports of 6574 (peer networking), 6575 (UI) and 6576 (API) will
# be used.
prizm.isTestnet=false

# Save known peers in the database
prizm.savePeers=true

# Set to false to disable use of the peers database and the default initial
# peers. This will not delete saved peers.
prizm.usePeersDb=true

# Set to false to disable getting more peers from the currently connected peers.
# Only useful when debugging and want to limit the peers to those in peersDb or
# wellKnownPeers.
prizm.getMorePeers=true

# Set to true to run offline - do not connect to peers and do not listen for
# incoming peer connections. This is equivalent to setting
# prizm.shareMyAddress=false, prizm.wellKnownPeers=, prizm.testnetPeers=
# and prizm.usePeersDb=false, and if set to true overrides those properties.
prizm.isOffline=false

# Ignore peer announced addresses. Do not change unless you understand what it
# does.
prizm.ignorePeerAnnouncedAddress=false

# Only allow peer addresses starting with "fc". This is for users of cjdns only,
# do not set if you don't know what that is.
prizm.cjdnsOnly=false

# Do not include exception details when returning error response to peers.
prizm.hideErrorDetails=false

#### SYSTEM ####

# Set the socks proxy host.
#socksProxyHost=localhost

# Set the socks proxy port.
#socksProxyPort=9050





#### API SERVER ####

# Accept http/json API requests.
prizm.enableAPIServer=true


# Enable UPnP for the API ports.
prizm.enableAPIUPnP=true



# Idle timeout for http/json API request connections, milliseconds.
prizm.apiServerIdleTimeout=30000

# Directory with html and javascript files for the new client UI, and admin
# tools utilizing the http/json API.
prizm.apiResourceBase=./html/ui

# Default page for the API server.
prizm.apiWelcomeFile=index.html

# Java API documentation directory, optional.
prizm.javadocResourceBase=./html/doc

# Enable Cross Origin Filter for the API server.
prizm.apiServerCORS=true

# Add X-Frame-Options SAMEORIGIN header to every response as a protection
# against clickjacking.
prizm.apiFrameOptionsSameOrigin=true

# Enable SSL for the API server (also need to set prizm.keyStorePath and
# prizm.keyStorePassword).
# Non-SSL connections will be disabled if prizm.apiServerSSLPort is equal to
# prizm.apiServerPort.
# Otherwise, both SSL and non-SSL connections will be accepted.
prizm.apiSSL=false

# Enable automatical use of self-signed certificate
# SSL will be enabled if prizm.apiServerHost=0.0.0.0
# SSL will not be enabled automatically if prizm.apiServerHost=127.0.0.1
# set to false to disable this feature
prizm.apiServerEnforceSSL=true

# Enabled cipher suites for the API server when SSL is enabled. The list below
# is an example to use for choosing AES-GCM instead of AES-CBC, not the default.
#prizm.apiSSLCiphers=TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384; \
#  TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256; \
#  TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384; \
#  TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256;

# Enforce requests that require POST to only be accepted when submitted as POST.
prizm.apiServerEnforcePOST=true

# Compress Http responses for the API server.
prizm.enableAPIServerGZIPFilter=true


# Set to true to disable the password protection for admin API requests even
# when API server is publicly accessible. Not recommended.
prizm.disableAdminPassword=false

# The maximum number of records possible to retrieve with a single request. This
# restriction is not enforced if the admin password is provided, or is not
# needed (disabled or listening on localhost only).
prizm.maxAPIRecords=100

# API event registration timeout (seconds). The timeout is reset each time an
# event wait request is received from the application. The minimum value is 15
# seconds.
prizm.apiEventTimeout=300

# Maximum number of applications with active event registrations.
prizm.apiMaxEventUsers=32

# Maximum file size accepted for upload, in bytes. Default and minimum value
# accepted is 43008 (42 kbytes).
#prizm.maxUploadFileSize=0

# If an unsigned transaction is submitted with insufficient fee, set the fee to
# the minimum fee calculated for this transaction instead, as if feeNQT=0 has
# been specified. Default is false.
prizm.correctInvalidFees=true

# APIs to disable, as a semicolon separated list.
prizm.disabledAPIs=

# Groups of APIs to disable, as a semicolon separated list of API tag names.
prizm.disabledAPITags=

# Enables the API proxy. Requests are forwarded to a randomly chosen peer
# providing openAPI service. Outgoing transactions are signed locally - the
# secret phrase is never sent to the remote peer.
# Used by light clients or when the blockchain is not yet downloaded.
# For openAPI nodes, the API proxy remains disabled, ignoring this setting.
# For light clients, the API proxy is always enabled, ignoring this setting.
prizm.enableAPIProxy=false

# Operate as light client. Blockchain is not downloaded and processed, instead
# the API proxy is used (see nxt.enableAPIProxy).
# Light clients are not advertised as providing openAPI service even if they do
# have their API publicly accessible.
prizm.isLightClient=false

# If set, all requests will be forwarded to the specified openAPI peer
prizm.forceAPIProxyServerURL=

# The period remote API servers are blacklisted when not functioning (in
# milliseconds).
# The API proxy blacklisting mechanism is in addition to the peers blacklisting
# - if a peer is blacklisted, it won't be used by the proxy, but it is possible
# that a peer is online and correctly functioning, and only its open API is
# blocked (e.g. by firewall)
prizm.apiProxyBlacklistingPeriod=1800000

# When the API server is running behind a proxy, use this header to obtain the
# remote host for which the API request was forwarded. Currently only used for
# keeping track of and blacklisting hosts that try to brute force the API admin
# password.
#prizm.forwardedForHeader=X-Forwarded-For




#### DEBUGGING ####

# Log file, will be overwritten at every restart.
prizm.log=prizm.log
# The log file is now specified in logging.properties.

# Enable debug log output.
prizm.debug=true
# Debug logging is now specified in logging properties.

# Include caller traceback in log messages.
prizm.enableLogTraceback=true

# Enable logging of exception stack traces.
prizm.enableStackTraces=true

# Enable logging of Jetty messages.
prizm.debugJetty=false
# Jetty logging is now specified in logging properties.

# Used for debugging peer to peer communications.
prizm.communicationLoggingMask=0

# Track balances of the following accounts and related events for debugging
# purposes.
prizm.debugTraceAccounts=

# File name for logging tracked account balances.
prizm.debugTraceLog=

# Separator character for trace log.
prizm.debugTraceSeparator=\t

# Quote character for trace log.
prizm.debugTraceQuote="

# Log changes to unconfirmed balances.
prizm.debugLogUnconfirmed=false

#### DATABASE ####

# Database connection JDBC url, see the H2 documentation for possible
# customizations.
# Append ;AUTO_SERVER=TRUE to enable automatic mixed mode access.
# The prizm_db folder is expected to be in the current working directory, will be
# created if missing.
# prizm.dbUrl=jdbc:h2:./prizm_db/prizm;DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE;MV_STORE=FALSE
prizm.dbParaUrl=jdbc:h2:./prizm_db/paraprizm;DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE;MV_STORE=FALSE

# Database connection JDBC url to use with the test network, if isTestnet=true.
# prizm.testDbUrl=jdbc:h2:./prizm_test_db/prizm;DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE;MV_STORE=FALSE

prizm.dbType=h2
prizm.testDbType=h2

prizm.dbDir=./prizm_db/prizm
prizm.testDbDir=./prizm_test_db/prizm

prizm.dbParams=DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE;MV_STORE=FALSE
prizm.dbParaParams=DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE;MV_STORE=FALSE
prizm.testDbParams=DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE;MV_STORE=FALSE

prizm.dbUsername=sa
prizm.dbParaUsername=sa
prizm.testDbUsername=sa

prizm.dbPassword=sa
prizm.dbParaPassword=para
prizm.testDbPassword=sa

# Database connection timeout in seconds.
prizm.dbLoginTimeout=70

# Database default lock timeout in seconds.
prizm.dbDefaultLockTimeout=60

# Database max memory rows limit.
prizm.dbMaxMemoryRows=1000000

# Maximum simultaneous database connections.
prizm.maxDbConnections=30

# The memory allocated to database cache, in kB.
# If set to 0, the cache size varies from a minimum of 16MB for heap sizes 160MB
# or less, to a maximum of 256MB for heap sizes 640MB or higher.
prizm.dbCacheKB=0

# Enable trimming of derived objects tables. Disabling this will significantly
# worsen performance.
prizm.trimDerivedTables=true

# If trimming is enabled, maintain enough previous height records to allow
# rollback of at least that many blocks. Cannot be set to less than 720.
# After increasing this value, a full re-scan also needs to be done in order for
# the previously trimmed records to be re-created and preserved.
prizm.maxRollback=800

# When trimming is enabled, it is run every prizm.trimFrequency blocks.
prizm.trimFrequency=1000

# Override the lifetime of prunable data to keep them longer, value in seconds.
# Set to -1 to disable pruning. Has no effect if set to less then the minimum
# required lifetime of two weeks (1209600 seconds) on mainnet, or 24 hours
# (86400 seconds) on testnet. Default is 90 days.
prizm.maxPrunableLifetime=7776000

# Include expired prunable parts if requested as long as it is still available.
# In order to provide the PRUNABLE peer service, prizm.maxPrunableLifetime must
# be -1 and prizm.includeExpiredPrunable must be true.  The PRUNABLE service means
# the peer will provide expired prunable data to other peers when requested.
prizm.includeExpiredPrunable=true

# Threshold for logging database statements (milliseconds).
prizm.statementLogThreshold=10000

# Threshold for logging database transactions (milliseconds).
prizm.transactionLogThreshold=15000

# Log the average transaction time after this many minutes.
prizm.transactionLogInterval=15

# Public keys are by default cached, which consumes 10-15 MB of memory.
prizm.enablePublicKeyCache=true



#### Blocks and transactions ####

# Maximum number of forging accounts allowed on this node.
prizm.maxNumberOfForgers=100

# Verify batches of blocks downloaded from a single peer with that many other
# peers.
prizm.numberOfForkConfirmations=3
prizm.testnetNumberOfForkConfirmations=3

# Enable re-broadcasting of new transactions until they are received back from
# at least one peer, or found in the blockchain. This feature can optionally be
# disabled, to avoid the risk of revealing that this node is the submitter of
# such re-broadcasted new transactions.
prizm.enableTransactionRebroadcasting=true

# Do not allow the number of unconfirmed transactions in memory to exceed this
# value. If exceeded, the same transaction ordering as when choosing which
# transactions to include in a forged block is used to decide which to keep in
# the unconfirmed pool.
# Set to 0 or negative for no limit.
prizm.maxUnconfirmedTransactions=2000

# Maximum number of account monitors allowed on this node
prizm.maxNumberOfMonitors=100



#### DESKTOP WALLET ####

# When using desktop mode and when user interface is available. Launch the wallet
# inside a desktop frame when the node is started.
prizm.launchDesktopApplication=true

# The default account is used, to automatically login to the wallet during startup
prizm.defaultDesktopAccount=


#### ACCOUNT LEDGER ####

# Address of accounts (in RS format) to track balance changes in the ledger
# table, separated by ';'.
# Set to * to track changes for all accounts. Specify no accounts to disable
# the account ledger.
prizm.ledgerAccounts=*

# Specify 0 to not log unconfirmed changes, 1 to log unconfirmed changes or 2 to
# log only unconfirmed changes.
prizm.ledgerLogUnconfirmed=2

# Specify the number of blocks to keep when trimming the account ledger table.
# A value of zero will cause all blocks to be kept.
prizm.ledgerTrimKeep=30000

#### JETTY ####

# Settings for the Jetty Denial Of Service Filter, used for the peer networking
# server only.
prizm.peerServerDoSFilter.maxRequestsPerSec=30
prizm.peerServerDoSFilter.delayMs=1000
prizm.peerServerDoSFilter.maxRequestMs=300000

# keystore file and password, required if uiSSL or apiSSL are enabled.
prizm.keyStorePath=keystore
prizm.keyStorePassword=password



#### Developers only ####

# Force re-validation of blocks and transaction at start.
prizm.forceValidate=false

# Force re-build of derived objects tables at start.
prizm.forceScan=false

# Stop blockchain download at this block
# prizm.maxBlockchainHeight=0

# PrizmCore version.
prizm.version=1.10.4.6

#### HierarchyAPI ####

# Process HierarchyAPI requests received only from localhost and reject others
# Recommended to be enabled
prizm.allowAPIHierarchyOnlyLocalhost=false

# Allow HierarchyAPI usage without admin password
# Recommended to be enabled if prizm.allowAPIHierarchyOnlyLocalhost is true
prizm.allowAPIHierarchyWithoutPassword=true

# Enable to get more detailed information about derived tables trimming process
prizm.measureTrimmingTime=false
