log.level = {
  root = "TRACE" # TRACE;DEBUG;INFO;WARN;ERROR
}

net {
  type = mainnet
  # type = testnet
}

storage {
  # Directory for storing persistent data

  db.version = 2,
  db.engine = "LEVELDB",
  db.directory = "database",
  index.directory = "index",

  # You can custom these 14 databases' configs:

  # account, account-index, asset-issue, block, block-index,
  # block_KDB, peers, properties, recent-block, trans,
  # utxo, votes, witness, witness_schedule.

  # Otherwise, db configs will remain defualt and data will be stored in
  # the path of "output-directory" or which is set by "-d" ("--output-directory").

  # Attention: name is a required field that must be set !!!
  properties = [
    //    {
    //      name = "account",
    //      path = "storage_directory_test",
    //      createIfMissing = true,
    //      paranoidChecks = true,
    //      verifyChecksums = true,
    //      compressionType = 1,        // compressed with snappy
    //      blockSize = 4096,           // 4  KB =         4 * 1024 B
    //      writeBufferSize = 10485760, // 10 MB = 10 * 1024 * 1024 B
    //      cacheSize = 10485760,       // 10 MB = 10 * 1024 * 1024 B
    //      maxOpenFiles = 100
    //    },
    //    {
    //      name = "account-index",
    //      path = "storage_directory_test",
    //      createIfMissing = true,
    //      paranoidChecks = true,
    //      verifyChecksums = true,
    //      compressionType = 1,        // compressed with snappy
    //      blockSize = 4096,           // 4  KB =         4 * 1024 B
    //      writeBufferSize = 10485760, // 10 MB = 10 * 1024 * 1024 B
    //      cacheSize = 10485760,       // 10 MB = 10 * 1024 * 1024 B
    //      maxOpenFiles = 100
    //    },
  ]
  # data root setting, for check data, currently, only reward-vi is used.

  # merkleRoot = {
  # reward-vi = 9debcb9924055500aaae98cdee10501c5c39d4daa75800a996f4bdda73dbccd8 // main-net, Sha256Hash, hexString
  # }
}

# this part of config is used to node discovery.
node.discovery = {
  enable = false  # you should set this entry value with true if you want your node can be discovered by other node.
  persist = true  # this entry is used to determined to whether storing the peers in the database or not.
  external.ip = 127.0.0.1
}

# this part of config is used to set backup node for witness service.
node.backup {
  port = 10001
  priority = 8
  members = [
  ]
}

node {
  # trust node for solidity node
  # trustNode = "ip:port"
  trustNode = "127.0.0.1:50051"

  # expose extension api to public or not
  walletExtensionApi = true

  listen.port = 18888

  connection.timeout = 2

  tcpNettyWorkThreadNum = 0

  udpNettyWorkThreadNum = 1

  # Number of validate sign thread, default availableProcessors / 2
  # validateSignThreadNum = 16

  maxActiveNodes = 30

  maxActiveNodesWithSameIp = 2

  minParticipationRate = 0

  # check the peer data transfer ,disconnect factor
  disconnectNumberFactor = 0.4
  maxConnectNumberFactor = 0.8
  receiveTcpMinDataLength = 2048
  isOpenFullTcpDisconnect = true

  p2p {
    version = 1 # 11111: mainnet; 20180622: testnet; you can set other number when you deploy one private net, but the node must have the same number in some private net. 
  }

  active = [
    # Active establish connection in any case
    # Sample entries:
    # "ip:port",
    # "ip:port"
  ]

  passive = [
    # Passive accept connection in any case
    # Sample entries:
    # "ip:port",
    # "ip:port"
  ]

  http {
    fullNodeEnable = true
    solidityEnable = true
    fullNodePort = 8090
    solidityPort = 8091
  }

  rpc {
    port = 50051
    solidityPort = 50052

    # Number of gRPC thread, default availableProcessors / 2
    # thread = 16

    # The maximum number of concurrent calls permitted for each incoming connection
    # maxConcurrentCallsPerConnection =

    # The HTTP/2 flow control window, default 1MB
    # flowControlWindow =

    # Connection being idle for longer than which will be gracefully terminated
    maxConnectionIdleInMillis = 60000

    # Connection lasting longer than which will be gracefully terminated
    # maxConnectionAgeInMillis =

    # The maximum message size allowed to be received on the server, default 4MB
    # maxMessageSize =

    # The maximum size of header list allowed to be received, default 8192
    # maxHeaderListSize =

    # Transactions can only be broadcast if the number of effective connections is reached.
    minEffectiveConnection = 0
  }

  # Whether to enable the node detection function, default false
  # nodeDetectEnable = false

  # use your ipv6 address for node discovery and tcp connection, default false
  # enableIpv6 = false

  # if your node's highest block num is below than all your pees', try to acquire new connection. default false
  # effectiveCheckEnable = false

  # Dynamic loading configuration function, disabled by default
  # dynamicConfig = {
    # enable = false
    # Configuration file change check interval, default is 600 seconds
    # checkInterval = 600
  # }

  dns {
    # dns urls to get nodes, url format tree://{pubkey}@{domain}, default empty
    treeUrls = [
      #"tree://APFGGTFOBVE2ZNAB3CSMNNX6RRK3ODIRLP2AA5U4YFAA6MSYZUYTQ@nodes1.example.org",
    ]
  }
}



seed.node = {
  # List of the seed nodes. This is used to enable the node can connect when join one net at first.
  # If you deploy one private net, you must add some "ip:port" here for other node connecting.
  # Seed nodes are stable full nodes, and the first SuperNode must be inclued in.
  # example:
  # ip.list = [
  #   "ip:port",
  #   "ip:port"
  # ]
  ip.list = [
  ]
}

genesis.block = {
  # Reserve balance
  assets = [
    {
      accountName = "Zion"
      accountType = "AssetIssue"
      address = "TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY"
      balance = "95000000000000000"
    },
    {
      accountName = "Sun"
      accountType = "AssetIssue"
      address = "TWsm8HtU2A5eEzoT8ev8yaoFjHsXLLrckb"
      balance = "5000000000000000"
    },
    {
      accountName = "Blackhole"
      accountType = "AssetIssue"
      address = "TSJD5rdu6wZXP7F2m3a3tn8Co3JcMjtBip"
      balance = "-9223372036854775808"
    },
    {
      accountName = "TestA"
      accountType = "AssetIssue"
      address = "TVdyt1s88BdiCjKt6K2YuoSmpWScZYK1QF"
      balance = "1000000000000000"
    },
    {
      accountName = "TestB"
      accountType = "AssetIssue"
      address = "TCNVmGtkfknHpKSZXepZDXRowHF7kosxcv"
      balance = "1000000000000000"
    },
    {
      accountName = "TestC"
      accountType = "AssetIssue"
      address = "TAbzgkG8p3yF5aywKVgq9AaAu6hvF2JrVC"
      balance = "1000000000000000"
    },
    {
      accountName = "TestD"
      accountType = "AssetIssue"
      address = "TMmmvwvkBPBv3Gkw9cGKbZ8PLznYkTu3ep"
      balance = "1000000000000000"
    },
    {
      accountName = "TestE"
      accountType = "AssetIssue"
      address = "TBJHZu4Sm86aWHtt6VF6KQSzot8vKTuTKx"
      balance = "1000000000000000"
    }
  ]

  witnesses = [
    {
      address: TPL66VK2gCXNCD7EJg9pgJRfqcRazjhUZY,
      url = "http://tronstudio.com",
      voteCount = 10000
    }
  ]

  timestamp = "0" #2017-8-26 12:00:00

  parentHash = "957dc2d350daecc7bb6a38f3938ebde0a0c1cedafe15f0edae4256a2907449f6"
}

localwitness = [
  da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0  # you must enable this value and the witness address are match.
]

#localwitnesskeystore = [
#  "src/main/resources/localwitnesskeystore.json"  # if you do not set the localwitness above, you must set this value.Otherwise,your SuperNode can not produce the block. 
#]

block = {
  needSyncCheck = false # first node : false, other : true

  # For rapid development (put this in your node's config)
  # HACK: During maintenance time, block can't be produced!
  # Do not set it to too small value!
  proposalExpireTime = 300000 // 5 min
  maintenanceTimeInterval = 300000 // 5 min
}

vm = {
  # allowTvmTransferTrc10 = true
  # allowMultiSign = true
  supportConstant = true
  estimateEnergy = true
  maxEnergyLimitForConstant = 100000000
  minTimeRatio = 0.0
  maxTimeRatio = 100.0
  saveInternalTx = true
  saveFeaturedInternalTx = true

  # In rare cases, transactions that will be within the specified maximum execution time (default 10(ms)) are re-executed and packaged
  # longRunningTime = 10
}

committee = {
  allowCreationOfContracts = 1
  allowUpdateAccountName = 1
  allowSameTokenName = 1
  allowDelegateResource = 1
  allowTvmTransferTrc10 = 1
  allowMultiSign = 1
  allowTvmConstantinople = 1
  allowTvmSolidity059 = 1
  allowTvmIstanbul = 1
  allowShieldedTRC20Transaction = 1
  changedDelegation = 1
  allowOptimizeBlackHole = 1
  allowTvmVote = 1
  allowTvmLondon = 1
  allowHigherLimitForMaxCpuTimeOfOneTx = 1
  allowAssetOptimization = 1
  allowNewReward = 1
  memoFee = 1000000
  allowDelegateOptimization = 1
  unfreezeDelayDays = 1
  allowTvmShangHai = 1
  allowCancelAllUnfreezeV2 = 1
  maxDelegateLockPeriod = 30
}

event.subscribe = {
  native = {
    useNativeQueue = true // if true, use native message queue, else use event plugin.
    bindport = 5555 // bind port
    sendqueuelength = 1000 //max length of send queue
  }

  path = "/java-tron/plugin-kafka-1.0.0.zip" // absolute path of plugin
  server = "broker:9092" // target server address to receive event triggers
  dbconfig = "" // dbname|username|password
  contractParse = true,
  topics = [
    {
      triggerName = "block" // block trigger, the value can't be modified
      enable = false
      topic = "block" // plugin topic, the value could be modified
    },
    {
      triggerName = "transaction"
      enable = false
      topic = "transaction"
    },
    {
      triggerName = "contractevent"
      enable = false
      topic = "contractevent"
    },
    {
      triggerName = "contractlog"
      enable = false
      topic = "contractlog"
    },
    {
      triggerName = "solidity" // solidity block event trigger, the value can't be modified
      enable = false            // the default value is true
      topic = "solidity"
    }
  ]

  filter = {
    fromblock = "" // the value could be "", "earliest" or a specified block number as the beginning of the queried range
    toblock = "" // the value could be "", "latest" or a specified block number as end of the queried range
    contractAddress = [
      "" // contract address you want to subscribe, if it's set to "", you will receive contract logs/events with any contract address.
    ]

    contractTopic = [
      "" // contract topic you want to subscribe, if it's set to "", you will receive contract logs/events with any contract topic.
    ]
  }
}

enery.limit.block.num = 0
