github.com/turingchain2020/turingchain@v1.1.21/types/defaultcfg.go (about)

     1  // Copyright Turing Corp. 2018 All Rights Reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package types
     6  
     7  var cfgstring = `
     8  Title="local"
     9  TestNet=true
    10  FixTime=false
    11  TxHeight=true
    12  CoinSymbol="trc"
    13  
    14  # crypto模块配置
    15  [crypto]
    16  enableTypes=[]    #设置启用的加密插件名称,不配置启用所有
    17  [crypto.enableHeight]  #配置已启用插件的启用高度,不配置采用默认高度0, 负数表示不启用
    18  secp256k1=0
    19  [crypto.sub.secp256k1] #支持插件子配置
    20  
    21  [log]
    22  # 日志级别,支持debug(dbug)/info/warn/error(eror)/crit
    23  loglevel = "debug"
    24  logConsoleLevel = "info"
    25  # 日志文件名,可带目录,所有生成的日志文件都放到此目录下
    26  logFile = "logs/turingchain.log"
    27  # 单个日志文件的最大值(单位:兆)
    28  maxFileSize = 300
    29  # 最多保存的历史日志文件个数
    30  maxBackups = 100
    31  # 最多保存的历史日志消息(单位:天)
    32  maxAge = 28
    33  # 日志文件名是否使用本地事件(否则使用UTC时间)
    34  localTime = true
    35  # 历史日志文件是否压缩(压缩格式为gz)
    36  compress = true
    37  # 是否打印调用源文件和行号
    38  callerFile = false
    39  # 是否打印调用方法
    40  callerFunction = false
    41  
    42  [blockchain]
    43  defCacheSize=128
    44  maxFetchBlockNum=128
    45  timeoutSeconds=5
    46  batchBlockNum=128
    47  driver="leveldb"
    48  dbPath="datadir"
    49  dbCache=64
    50  isStrongConsistency=false
    51  singleMode=true
    52  batchsync=false
    53  isRecordBlockSequence=true
    54  isParaChain=false
    55  enableTxQuickIndex=true
    56  txHeight=true
    57  
    58  # 使能精简localdb
    59  enableReduceLocaldb=false
    60  # 关闭分片存储,默认false为开启分片存储;平行链不需要分片需要修改此默认参数为true
    61  disableShard=false
    62  # 分片存储中每个大块包含的区块数
    63  chunkblockNum=1000
    64  # 使能从P2pStore中获取数据
    65  enableFetchP2pstore=false
    66  # 使能假设已删除已归档数据后,获取数据情况
    67  enableIfDelLocalChunk=false
    68  
    69  enablePushSubscribe=true
    70  maxActiveBlockNum=1024
    71  maxActiveBlockSize=100
    72  
    73  
    74  [p2p]
    75  enable=false
    76  driver="leveldb"
    77  dbPath="datadir/addrbook"
    78  dbCache=4
    79  grpcLogFile="grpc33.log"
    80  
    81  [rpc]
    82  jrpcBindAddr="localhost:0"
    83  grpcBindAddr="localhost:0"
    84  whitelist=["127.0.0.1"]
    85  jrpcFuncWhitelist=["*"]
    86  grpcFuncWhitelist=["*"]
    87  
    88  [mempool]
    89  name="timeline"
    90  poolCacheSize=102400
    91  # 最小得交易手续费率,这个没有默认值,必填,一般是0.001 coins
    92  minTxFeeRate=100000
    93  maxTxNumPerAccount=100000
    94  
    95  [consensus]
    96  name="solo"
    97  minerstart=true
    98  genesisBlockTime=1514533394
    99  genesis="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
   100  minerExecs=["ticket", "autonomy"]
   101  
   102  [mver.consensus]
   103  fundKeyAddr = "1BQXS6TxaYYG5mADaWij4AxhZZUTpw95a5"
   104  powLimitBits = "0x1f00ffff"
   105  maxTxNumber = 10000
   106  
   107  [mver.consensus.ForkChainParamV1]
   108  maxTxNumber = 10000
   109  
   110  [mver.consensus.ForkChainParamV2]
   111  powLimitBits = "0x1f2fffff"
   112  
   113  [mver.consensus.ForkTicketFundAddrV1]
   114  fundKeyAddr = "1Ji3W12KGScCM7C2p8bg635sNkayDM8MGY"
   115  
   116  [mver.consensus.ticket]
   117  coinReward = 18
   118  coinDevFund = 12
   119  ticketPrice = 10000
   120  retargetAdjustmentFactor = 4
   121  futureBlockTime = 16
   122  ticketFrozenTime = 5
   123  ticketWithdrawTime = 10
   124  ticketMinerWaitTime = 2
   125  targetTimespan = 2304
   126  targetTimePerBlock = 16
   127  
   128  [mver.consensus.ticket.ForkChainParamV1]
   129  targetTimespan = 288 #only for test
   130  targetTimePerBlock = 2
   131  
   132  [consensus.sub.para]
   133  ParaRemoteGrpcClient="localhost:9672"
   134  #主链指定高度的区块开始同步
   135  startHeight=345850
   136  #打包时间间隔,单位秒
   137  writeBlockSeconds=2
   138  #主链每隔几个没有相关交易的区块,平行链上打包空区块
   139  emptyBlockInterval=50
   140  #验证账户,验证节点需要配置自己的账户,并且钱包导入对应种子,非验证节点留空
   141  authAccount=""
   142  #等待平行链共识消息在主链上链并成功的块数,超出会重发共识消息,最小是2
   143  waitBlocks4CommitMsg=2
   144  searchHashMatchedBlockDepth=100
   145  
   146  [consensus.sub.solo]
   147  genesis="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
   148  genesisBlockTime=1514533394
   149  waitTxMs=1
   150  
   151  [consensus.sub.ticket]
   152  genesisBlockTime=1514533394
   153  [[consensus.sub.ticket.genesis]]
   154  minerAddr="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
   155  returnAddr="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
   156  count=10000
   157  
   158  [[consensus.sub.ticket.genesis]]
   159  minerAddr="1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"
   160  returnAddr="1EbDHAXpoiewjPLX9uqoz38HsKqMXayZrF"
   161  count=1000
   162  
   163  [[consensus.sub.ticket.genesis]]
   164  minerAddr="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
   165  returnAddr="1KcCVZLSQYRUwE5EXTsAoQs9LuJW6xwfQa"
   166  count=1000
   167  
   168  [store]
   169  name="mavl"
   170  driver="leveldb"
   171  dbPath="datadir/mavltree"
   172  dbCache=128
   173  
   174  [store.sub.mavl]
   175  enableMavlPrefix=false
   176  enableMVCC=false
   177  
   178  [wallet]
   179  minFee=100000
   180  driver="leveldb"
   181  dbPath="wallet"
   182  dbCache=16
   183  signType="secp256k1"
   184  coinType="trc"
   185  
   186  [wallet.sub.ticket]
   187  minerdisable=false
   188  minerwhitelist=["*"]
   189  
   190  [exec]
   191  enableStat=false
   192  enableMVCC=false
   193  alias=["token1:token","token2:token","token3:token"]
   194  
   195  [exec.sub.token]
   196  saveTokenTxList=true
   197  tokenApprs = [
   198  	"1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S",
   199  	"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK",
   200  	"1LY8GFia5EiyoTodMLfkB5PHNNpXRqxhyB",
   201  	"1GCzJDS6HbgTQ2emade7mEJGGWFfA15pS9",
   202  	"1JYB8sxi4He5pZWHCd3Zi2nypQ4JMB6AxN",
   203  	"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv",
   204  ]
   205  
   206  [exec.sub.relay]
   207  genesis="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
   208  
   209  [exec.sub.cert]
   210  # 是否启用证书验证和签名
   211  enable=false
   212  # 加密文件路径
   213  cryptoPath="authdir/crypto"
   214  # 带证书签名类型,支持"auth_ecdsa", "auth_sm2"
   215  signType="auth_ecdsa"
   216  
   217  [exec.sub.manage]
   218  superManager=[
   219      "1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S", 
   220      "12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv", 
   221      "1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
   222  ]
   223  [exec.sub.autonomy]
   224  total="16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
   225  useBalance=false
   226  
   227  [exec.sub.jvm]
   228  jdkPath="../../../../build/j2sdk-image"
   229  `
   230  
   231  //GetDefaultCfgstring ...
   232  func GetDefaultCfgstring() string {
   233  	return cfgstring
   234  }