ergo { # Directory to keep data directory = ${user.dir}"/.ergo" directory = ${?DATADIR} networkType = "testnet" # Settings for node view holder regime. See papers.yellow.ModifiersProcessing.md node { # State type. Possible options are: # "utxo" - keep full utxo set, that allows to validate arbitrary block and generate ADProofs # "digest" - keep state root hash only and validate transactions via ADProofs stateType = "utxo" # Download block transactions and verify them (requires BlocksToKeep == 0 if disabled) verifyTransactions = true # Number of last blocks to keep with transactions and ADproofs, for all other blocks only header will be stored. # Keep all blocks from genesis if negative # Please do not set it more than 114,688 (default adProofsSuffixLength), # otherwise, it could be hard to find proofs around the peers blocksToKeep = -1 utxo { # Download and apply UTXO set snapshot and full-blocks after that utxoBootstrap = false # how many utxo set snapshots to store, 0 means that they are not stored at all storingUtxoSnapshots = 0 # how many utxo set snapshots for a height with same id we need to find in p2p network # in order to start downloading it p2pUtxoSnapshots = 2 } # settings related to headers-chain bootstrapping via NiPoPoWs nipopow { # Download PoPoW proof on node bootstrap nipopowBootstrap = false # how many different proofs we are downloading from other peers # and comparing with each other, before choosing best one p2pNipopows = 1 } # Is the node is doing mining mining = false # maximum cost of transaction for it to be propagated maxTransactionCost = 1000000 # Maximum size of transaction to be accepted into mempool maxTransactionSize = 98304 // 96 kb # Use external miner, native miner is used if set to `false` useExternalMiner = true # Block candidate is regenerated periodically to include new transactions blockCandidateGenerationInterval = 60s # How many internal miner threads to spawn (used mainly for testing) internalMinersCount = 1 # How frequently to ask for new block candidate internalMinerPollingInterval = 500ms # Public key mining rewards will be dedicated to (P2PK address is also accepted) miningPubKeyHex = null # If true, a node generates blocks being offline. The only really useful case for it probably is to start a new # blockchain offlineGeneration = false # Number of state snapshot diffs to keep. Defines maximum rollback depth keepVersions = 200 # Acceptable difference between NOW and timestamp of the latest chain update or best block. This helps to discover syncing issues. acceptableChainUpdateDelay = 30m # Maximum number of unconfirmed transactions node can accept mempoolCapacity = 1000 # Interval for mempool transaction re-check. We check transaction when it is entering the mempool, and then # re-check it every interval value (but only on new block arrival) mempoolCleanupDuration = 30s # Mempool transaction sorting scheme ("random", "bySize", or "byExecutionCost") mempoolSorting = "random" # Number of transactions from mempool to be re-broadcasted at each epoch rebroadcastCount = 3 # Minimal fee amount of transactions mempool accepts minimalFeeAmount = 1000000 # If true, the node will store all transactions, boxes and addresses in an index. extraIndex = false # If true, a mining node sweeps storage-rent-eligible boxes into a claim transaction # included directly in its block candidates (bypassing the mempool). The rent-eligible # boxes are enumerated via the extra index, so this requires extraIndex = true and is # meaningful only when mining = true. # Note: the claim goes into the candidate ahead of mempool transactions, so a mempool # transaction spending a rent-eligible box conflicts with the claim and is invalidated # from this node's mempool on candidate rebuilds - even if this node never finds the # block. Other nodes' mempools are not affected. storageRentCollection = false # Tokens which are never burned by storage rent collection: when a box carrying them is # fully consumed by the claim builder, they are carried over to the miner's proceeds # output instead of being burned with the box. Hex-encoded token ids, LOWER CASE only # (ids are compared against the canonical lowercase form, an uppercase spelling would # silently not match and the token would be burned). storageRentTokenWhitelist = [] # List with hex-encoded identifiers of transactions banned from getting into memory pool blacklistedTransactions = [] # Reject storage rent collection transactions (transactions using the storage-rent-specific # context extension variable #127 with an empty spending proof) from the memory pool. # Storage rent is to be collected by miners directly during candidate block generation, # not relayed through the mempool. This is a mempool policy only: consensus rules are # unchanged and such transactions remain valid in blocks. rejectStorageRentTxs = false # The node is downloading headers first and only then full blocks. Depending on settings, the node is downloading # whether a suffix of the blockchain (if stateType = "digest" and "blocksToKeep" >= 0) or all the # full blocks (otherwise). # The node is considering that the headers-chain is synced if it sees a header of a block generated closely # to the current moment. The node considers that a header is close if its timestamp is no more # than "headerChainDiff" blocks on average than node's clocks. # # default value is 100 blocks ~= 200 minutes headerChainDiff = 100 # Optional and individual checkpoint. If you going to provide it , set height and # corresponding block header id like # # checkpoint = { # height = 703848 # blockId = "ed64513030a0396f492385410ba643bb24ca69f0a72b83c9bae8f04d1fa9c5cd" # } # # Before the height given (including it) validation of scripts is missed. # This improving performance and memory usage during initial bootstrapping. # The node still applying transactions to UTXO set and so checks UTXO set digests for each block. # Block at checkpoint height is to be checked against expected one. checkpoint = null # Dump ADProofs only for the suffix given during bootstrapping adProofsSuffixLength = 114688 // 112k } cache { history { # Number of recently used block sections that will be kept in memory blockSectionsCacheSize = 12 # Number of recently used extra indexes that will be kept in memory (has no effect if extraIndex is disabled) extraCacheSize = 1000 # Number of recently used headers that will be kept in memory headersCacheSize = 1000 # Number of recently used indexes that will be kept in memory indexesCacheSize = 10000 } network { # Maximum number of invalid modifiers to keep in cache, following modifiers are kept in bloom filters invalidModifiersCacheSize = 10000 # For how long to keep invalid modifiers in cache invalidModifiersCacheExpiration = 4h } mempool { # Maximum number of invalid transaction id modifiers to keep in cache, # following modifiers are kept in bloom filters, filter size is the same, # and we store FIFO queue of 4 Bloom filters invalidModifiersCacheSize = 10000 # For how long to keep invalid transaction id modifiers in cache invalidModifiersCacheExpiration = 4h } } # Chain-specific settings. Change only if you are going to launch a new chain (except of protocol version)! chain { # Blockchain protocol version supported by the client. # Please do not increase this value manually, this should be done by client developers. protocolVersion = 4 # Network address prefix, currently reserved values are 0 (Ergo mainnet) and 16 (Ergo testnet) addressPrefix = 16 # Monetary config for chain monetary { # number of blocks reward won't change (2 years) fixedRatePeriod = 525600 # number of coins issued every block during fixedRatePeriod (75 Ergo) fixedRate = 75000000000 # Part of coins issued, that is going to the foundation during fixedRatePeriod (7.5 Ergo) foundersInitialReward = 7500000000 # number of blocks between reward reduction (90 days) epochLength = 64800 # number of coins reward decrease every epochs (3 Ergo) oneEpochReduction = 3000000000 # delay between the block mined and a time, when the reward can be spend. ~ 1 day. minerRewardDelay = 720 } reemission { checkReemissionRules = false emissionNftId = "" reemissionTokenId = "" reemissionNftId = "" activationHeight = 777217 reemissionStartHeight = 2080800 injectionBoxBytesEncoded = "" } # Latest news from media (the Guardian, Xinhua, Vedomosti), existing cryptocurrency block ids (Bitcoin, Ethereum) noPremineProof = [ "'Chaos reigns': what the papers say about the no-deal Brexit vote", # https://www.theguardian.com/politics/2019/mar/14/chaos-reigns-what-the-papers-say-about-the-no-deal-brexit-vote "习近平的两会时间|这里有份习近平两会日历,请查收!", # http://www.xinhuanet.com/politics/2019lh/2019-03/13/c_1124232018.htm "ТАСС сообщил об обнаружении нескольких майнинговых ферм на столичных рынках", # https://www.vedomosti.ru/politics/news/2019/03/14/796376-mainingovih-ferm "000000000000000000139a3e61bd5721827b51a5309a8bfeca0b8c4b5c060931", # https://www.blockchain.com/btc/block/000000000000000000139a3e61bd5721827b51a5309a8bfeca0b8c4b5c060931 "0xef1d584d77e74e3c509de625dc17893b22b73d040b5d5302bbf832065f928d03" # https://etherscan.io/block/0xef1d584d77e74e3c509de625dc17893b22b73d040b5d5302bbf832065f928d03 ] # Public keys of founders, represented as just group elements foundersPubkeys = [ "039bb5fe52359a64c99a60fd944fc5e388cbdc4d37ff091cc841c3ee79060b8647", "031fb52cf6e805f80d97cde289f4f757d49accf0c83fb864b27d2cf982c37f9a8b", "0352ac2a471339b0d23b3d2c5ce0db0e81c969f77891b9edf0bda7fd39a78184e7" ] # Base16 representation of genesis state roothash genesisStateDigestHex = "cb63aa99a3060f341781d8662b58bf18b9ad258db4fe88d09f8f71cb668cad4502" # Desired time interval between blocks blockInterval = 2m # Length of an epoch in difficulty recalculation. 1 means difficulty recalculation every block epochLength = 1024 # Number of last epochs that will be used for difficulty recalculation useLastEpochs = 8 # Difficulty network start with initialDifficultyHex = "01" # Proof-of-Work algorithm and its parameters. Possible options are "fake" and "autolykos". powScheme { powType = "autolykos" k = 32 n = 26 } voting { # Length of a voting epoch. votingLength = 1024 # Voting epochs to vote for soft-fork softForkEpochs = 32 # Voting epochs to activate a soft-fork after acceptance activationEpochs = 32 # Activation height for protocol version 2 (client version 4.0.0 hard-fork) # Relevant for the mainnet only atm version2ActivationHeight = 417792 # Difficulty for Autolykos version 2 activation (corresponding to ~ 1 TH/s hashrate) version2ActivationDifficultyHex = "6f98d5000000" } # UTXO set snapshot to be taken every this number of blocks. # The value MUST be divisible by voting epoch length (chainSettings.voting.votingLength), # so after snapshot the state is corresponding to a moment before applying first block of a voting epoch, # and then the first block sets current validation parameters. # # So for the Ergo mainnet the value should be divisible by 1024 (for testnet, 128, any number divisible by # 1024 is divisible by 128 also. # # Not consensus-critical setting, but located here, in chain settings section, as all the nodes in the network # should have the same value. makeSnapshotEvery = 52224 # Defines an id of the genesis block. Other genesis blocks will be considered invalid. # genesisId = "ab19bb59871e86507defb9a7769841b1130aad4d8c1ea8b0e01e0dee9e97a27e" } wallet { secretStorage { secretDir = ${ergo.directory}"/wallet/keystore" encryption { # Pseudo-random function with output of length `dkLen` (PBKDF2 param) prf = "HmacSHA256" # Number of PBKDF2 iterations (PBKDF2 param) c = 128000 # Desired bit-length of the derived key (PBKDF2 param) dkLen = 256 } } # Generating seed length in bits # Options: 128, 160, 192, 224, 256 seedStrengthBits = 160 # Language to be used in mnemonic seed # Options: "chinese_simplified", "chinese_traditional", "english", "french", "italian", "japanese", "korean", "spanish" mnemonicPhraseLanguage = "english" # Save used boxes (may consume additional disk space) or delete them immediately keepSpentBoxes = false # Default fee wallet is using when the fee is not specified defaultTransactionFee = 1000000 # Use pre-EIP3 key derivation scheme usePreEip3Derivation = false # Boxes with value smaller than dustLimit are disregarded in wallet scan logic dustLimit = null # Maximum number of inputs per transaction generated by the wallet maxInputs = 100 # If transaction generated has less than optimal inputs, and new inputs can be added to eliminate dust in the # wallet, the wallet will add inputs (up to optimal number) to the transaction optimalInputs = 3 # Mnemonic seed used in wallet for tests. If set the wallet operates in test mode. # testMnemonic = "ozone drill grab fiber curtain grace pudding thank cruise elder eight picnic" # Number of keys to be generated for tests # testKeysQty = 5 # Whitelisted tokens, if non-null, the wallet will automatically burn non-whitelisted tokens from # inputs when doing transactions. # If tokensWhitelist = [], all the tokens will be burnt, # tokensWhitelist = ["example"] means that all the tokens except of "example" will be burnt # tokensWhitelist = null means no tokens burnt automatically tokensWhitelist = null # Enable this setting to handle re-emission tokens in the wallet properly, # e.g. doing transfers correctly in the presence of re-emission tokens checkEIP27 = false # Wallet profile allows to say wallet what kind of load it should expect, # and so spend memory on caches and Bloom filters accordingly. # There are three options: user, exchange, appServer # User profile is about ordinary planned usage. # Exchange consumes ~20 MB of RAM for high-load ready Bloom filters # AppServer is in between profile = "user" } # To vote for parameter change, in the following section put target value for a parameter. # For that, find parameters table in the Yellow paper, find "id" of a parameter of interest, and put target value # for the parameter below. A node will automatically vote, if actual parameter value is different from the target one. voting { # Example: storage fee factor id = 1, target value = 1000000 # 1 = 1000000 # A vote for soft-fork. protocolVersion (in the chain{} settings) must be one announced in a block header # increased by one also, and then the node will automatically propose a soft-fork (in the beginning of an epoch), # or vote for it. # Put any non-zero value here to vote for soft-fork, or zero to vote against. # 120 = 0 # Put an array of rules to deactivate with the soft-fork # Following rules are disabled in 6.0 protocol update: # 215 - this rule prevented from starting voting for unknown parameter. Off since 6.0, so newer client # now may vote for changing parameters old clients do not recognize # 409 - this rule enforced that all the parameters in the first block (extension section of it) of an epoch should # contain parameter values for known parameters, and no more. Replaced with new rule #414 which allows for # values for unknown to the current client parameters to be put as well (presumably, newer clients' parameters) "rulesToDisable" = [215, 409] } } bounded-mailbox { mailbox-type = "akka.dispatch.NonBlockingBoundedMailbox" mailbox-capacity = 5000 } akka { log-dead-letters = 0 loggers = ["akka.event.slf4j.Slf4jLogger"] loglevel = "DEBUG" logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" actor.mailbox.requirements { "akka.dispatch.BoundedMessageQueueSemantics" = bounded-mailbox } http { server { request-timeout = 1 minute max-connections = 128 } parsing { max-uri-length = 8192 } } } scorex { # Execution context used in tests executionContext { type = Dispatcher executor = "thread-pool-executor" thread-pool-executor { fixed-pool-size = 16 } throughput = 1 } # Node data directory dataDir = ${user.home}"/scorex" # Node logs directory logDir = ${scorex.dataDir}"/log" logging { level = "INFO" } # Node's REST API settings restApi { # Network address to bind to bindAddress = "0.0.0.0:9052" # Hex-encoded Blake2b256 hash of an API key. Should be 64-chars long Base16 string. # Below is the hash of "hello" string. # Change it! apiKeyHash = "324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf" # Enable/disable CORS support. # This is an optional param. It would allow cors in case if this setting is set. # If this setting will be omitted cors will be prohibited. corsAllowedOrigin = "*" # request processing timeout timeout = 5s # node which exposes restApi in firewall should define publicly accessible URL of it # publicUrl = "https://example.com:80" } # P2P Network settings network { ##################################################### # Node information to be declared during handshake # ##################################################### # Node name to send during handshake nodeName = "ergo-node" # Network protocol version to be sent in handshakes appVersion = 6.0.8 # Network agent name. May contain information about client code # stack, starting from core code-base up to the end graphical interface. # Basic format is `/Name:Version(comments)/Name:Version/.../`, # e.g. `/Ergo-Scala-client:2.0.0(iPad; U; CPU OS 3_2_1)/AndroidBuild:0.8/` agentName = "ergoref" # Network address bindAddress = "0.0.0.0:9020" ######################## # Connection settings # ######################## # Magic bytes, that will be added to every p2p message to allow # distinguish different networks (e.g. testnet/mainnet). magicBytes = [2, 2, 2, 2] # String with IP address and port to send as external address during handshake. # Could be set automatically if UPnP is enabled. # # If `declared-address` is set, which is the common scenario for nodes running in the cloud, # the node will just listen to incoming connections on `bindAddress:port` and # broadcast its `declaredAddress` to its peers. # UPnP is supposed to be disabled in this scenario. # # If declared address is not set and UPnP is not enabled, the node will not listen to incoming connections at all. # # If declared address is not set and UPnP is enabled, the node will attempt to connect to an IGD, retrieve its # external IP address and configure the gateway to allow traffic through. If the node succeeds, the IGD's external # IP address becomes the node's declared address. # # In some cases, you may both set `decalredAddress` and enable UPnP (e.g. when IGD can't reliably determine its # external IP address). In such cases the node will attempt to configure an IGD to pass traffic from external port # to `bind-address:port`. Please note, however, that this setup is not recommended. # declaredAddress = "" # Enable UPnP tunnel creation only if you router/gateway supports it. Useful if your node is running in home # network. Completely useless if you node is in cloud. upnpEnabled = no # Allow connections to/from local (site-local, link-local, loopback) addresses allowLocal = false # UPnP timeouts # upnp-gateway-timeout = 7s # upnp-discover-timeout = 3s # Add delay for sending message # addedMaxDelay = 0ms ################## # Peers settings # ################## # Network handshake timeout handshakeTimeout = 30s # A list of `IP:port` pairs of well known nodes. knownPeers = [] # A list of `IP:port` pairs peers that will be permanently banned bannedPeers = [] # Interval between GetPeers messages to be send by our node to a random one getPeersInterval = 2m # Number of network connections maxConnections = 30 # Network connection timeout connectionTimeout = 1s # interval of evicting random peer to avoid eclipsing peerEvictionInterval = 1h ############################ # Delivery settings limits # ############################ # Network delivery timeout deliveryTimeout = 10s # Max number of delivery checks. Stop expecting modifier if it was not delivered after that # number of delivery attempts. The node tries to ask different peers on different attempts, and # not increasing the delivery counter if global loss of connectivity is possible maxDeliveryChecks = 100 ############ # Timeouts # ############ # Timeout for dropping dead connections inactiveConnectionDeadline = 10m # Interval between `SyncInfo` messages when our node is not synchronized yet syncInterval = 5s # Interval between `SyncInfo` messages when our node is already synchronized syncIntervalStable = 15s # Synchronization timeout syncTimeout = 10s # Synchronization status update interval syncStatusRefresh = 60s syncStatusRefreshStable = 90s # Synchronization status update interval for stable regime syncIntervalStable = 30s # Network controller timeout controllerTimeout = 5s ############### # Size limits # ############### # Desired number of inv objects. Our requests will have this size. desiredInvObjects = 400 # How many persistent modifiers to store in the cache. # The cache stores modifiers that are waiting to be applied. maxModifiersCacheSize = 1024 # Maximum number of PeerSpec objects in one Peers message maxPeerSpecObjects = 64 # Default ban duration, unless permanent penalty is applied temporalBanDuration = 60m # Misbehaving peer penalty score will not be increased withing this time interval, # unless permanent penalty is applied penaltySafeInterval = 2m # Max penalty score peer can accumulate before being banned penaltyScoreThreshold = 500 # If set (and it is set by default), the node will try to discover peers in the network. # If set to false, the node will use only peers from database # (with fallback to knownPeers config section if no peers there) peerDiscovery = true } } # dispatcher which is used for block candidate generator and NodeViewHolder actors only critical-dispatcher { type = Dispatcher executor = "thread-pool-executor" thread-pool-executor { fixed-pool-size = 2 } throughput = 1 } # dispatcher for some API-related actors api-dispatcher { # Dispatcher is the name of the event-based dispatcher type = Dispatcher # What kind of ExecutionService to use executor = "fork-join-executor" # Configuration for the fork join pool fork-join-executor { # Min number of threads to cap factor-based parallelism number to parallelism-min = 1 # Parallelism (threads) ... ceil(available processors * factor) parallelism-factor = 2.0 # Max number of threads to cap factor-based parallelism number to parallelism-max = 2 } # Throughput defines the maximum number of messages to be # processed per actor before the thread jumps to the next actor. # Set to 1 for as fair as possible. throughput = 4 } indexer-dispatcher { # Dispatcher is the name of the event-based dispatcher type = Dispatcher # What kind of ExecutionService to use executor = "fork-join-executor" # Configuration for the fork join pool fork-join-executor { # Min number of threads to cap factor-based parallelism number to parallelism-min = 1 # Parallelism (threads) ... ceil(available processors * factor) parallelism-factor = 1.0 # Max number of threads to cap factor-based parallelism number to parallelism-max = 4 } }