mirror of
https://gitee.com/BTAJL/repchain.git
synced 2024-12-02 03:38:08 +08:00
228 lines
8.7 KiB
Plaintext
228 lines
8.7 KiB
Plaintext
akka {
|
||
actor {
|
||
warn-about-java-serializer-usage = off#关闭Java序列化来序列化消息时的警告,建议不要开启。如果开启,开启值=on
|
||
default-mailbox {
|
||
#akka默认邮箱的选择,默认配置是akka.dispatch.SingleConsumerOnlyUnboundedMailbox,这是一个多生产者单消费者队列。建议不要修改此参数
|
||
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
|
||
}
|
||
|
||
default-dispatcher {
|
||
#akka dispatcher 配置,采用akka的默认的fork-join-executor,建议不要修改。
|
||
parallelism-min = 2 #最小的线程数
|
||
parallelism-factor = 4.0 #并行因子配置
|
||
parallelism-max = 20 #最大的线程数
|
||
throughput = 10
|
||
}
|
||
}
|
||
|
||
remote {
|
||
#classic模式下的配置
|
||
classic {
|
||
netty.tcp {
|
||
//在单机单节点的情况下配置机器ip
|
||
#hostname=192.168.10.155
|
||
#hostname = 192.168.31.155
|
||
hostname = 127.0.0.1
|
||
//在单机单节点的情况下需要配置具体的端口;在单机多节点的情况下直接配置为0
|
||
//port = 0
|
||
//port=8082//0,automatic assign
|
||
//internal (bind) hostname
|
||
//bind-hostname=192.168.1.129
|
||
//bind-port=8082
|
||
}
|
||
|
||
netty.ssl.security {
|
||
//基础路径,证书的存放路径,建议不要修改
|
||
base-path = "jks/"
|
||
//名称前缀,证书的名称前缀,不要修改
|
||
base-name = ""
|
||
//证书的别名,需要跟节点的名称要保持一致
|
||
alias = "121000005l35120456.node1"
|
||
|
||
//用户ca文件密码
|
||
key-store-password = "123"
|
||
//用户证书密码
|
||
key-password = "123"
|
||
}
|
||
}
|
||
|
||
#artery模式下的配置
|
||
artery {
|
||
#canonical.hostname = "192.168.10.155"
|
||
#canonical.hostname = "192.168.31.155"
|
||
canonical.hostname = "127.0.0.1"
|
||
canonical.port = 22526
|
||
}
|
||
}
|
||
|
||
#以下两项配置是针对集群节点出现不可达是来配置的 在akka 2.6.13中适应
|
||
#coordinated-shutdown.exit-jvm = on
|
||
#coordinated-shutdown.exit-code = 0
|
||
cluster {
|
||
#种子节点的配置,在单机单节点的情况下需要配置种子节点的信息akka://
|
||
#classic模式下的配置
|
||
#seed-nodes = ["akka.tcp://Repchain@192.168.10.155:22522","akka.tcp://Repchain@192.168.10.155:22523","akka.tcp://Repchain@192.168.10.155:22524"]
|
||
#seed-nodes = ["akka.ssl.tcp://Repchain@192.168.31.155:22522","akka.ssl.tcp://Repchain@192.168.31.155:22523","akka.ssl.tcp://Repchain@192.168.31.155:22524"]
|
||
|
||
#artery模式下的配置
|
||
#seed-nodes = ["akka://Repchain@192.168.10.155:22522","akka://Repchain@192.168.10.155:22523","akka://Repchain@192.168.10.155:22524"]
|
||
#seed-nodes = ["akka://Repchain@192.168.31.155:22522", "akka://Repchain@192.168.31.155:22523", "akka://Repchain@192.168.31.155:22526"]
|
||
seed-nodes = ["akka://Repchain@127.0.0.1:22522", "akka://Repchain@127.0.0.1:22523", "akka://Repchain@127.0.0.1:22526"]
|
||
|
||
#集群节点出现不可达的情况下采取的策略,目前采用保持大多数方法 在akka 2.6.13中适应
|
||
#downing-provider-class = "akka.cluster.sbr.SplitBrainResolverProvider"
|
||
#split-brain-resolver{
|
||
# active-strategy = keep-majority
|
||
# down-all-when-unstable = off
|
||
# stable-after = 30s
|
||
# active-strategy = keep-majority
|
||
#}
|
||
|
||
}
|
||
}
|
||
|
||
akka.http {
|
||
#akka 与http服务相关的配置
|
||
idle-timeout = 100s#一个空闲连接超时时间配置,当空闲连接超时之后,将被自动关闭
|
||
server {
|
||
server-header = akka-http/${akka.http.version}#http服务头,建议不要修改
|
||
idle-timeout = 100s#空闲连接超时时间,超时将自动关闭连接
|
||
request-timeout = 100s #请求对超时时间
|
||
max-connections = 1024#最大对连接数
|
||
}
|
||
client {
|
||
idle-timeout = 100s #空闲连接超时时间,超时将自动关闭
|
||
connecting-timeout = 100s#建立连接对超时时间
|
||
}
|
||
}
|
||
|
||
system {
|
||
#创世节点的名称,在系统初始化时,将根据该节点是否是创世节点进行创世块的建立
|
||
genesis_node_name = "121000005l35120456.node1"
|
||
chain_cert_name = "951002007l78123233.super_admin"
|
||
#api是否开启
|
||
#如果是单机多节点测试模式(Repchain,则选择0,默认节点1会开启)
|
||
ws_enable = 1#api 0,不开启;1,开启
|
||
#交易生产方式
|
||
trans_create_type = 0#0,手动;1,自动
|
||
#是否进行TPS测试
|
||
statistic_enable = 1 # 0,unable;able
|
||
#实时图的事件是否发送,如果不发送,前端实时图将收不到任何消息。
|
||
realtimegraph_enable = 1#0 unable;1 enable; default 1
|
||
httpServicePort = 9085#http服务的端口号,默认为8081
|
||
httpServiceActorNumber = 5 //接收http请求的actor数量
|
||
isbroadcasttransaction = 1//是否广播交易,1=广播;0:不广播
|
||
checkCertValidate = 0#设置是否检查证书的有效性,默认为0 0=不校验,1=校验
|
||
contractOperationMode = 0#设置合约的运行方式,0=debug方式,1=deploy,默认为debug方式,如果发布部署,必须使用deploy方式。
|
||
|
||
number_of_transProcessor = 10#
|
||
|
||
has_preload_trans_of_api = true#API接收交易时,是否做交易的预执行检查。默认值true
|
||
|
||
is_verify_of_endorsement = true#在出块时,背书节点是否验证交易,默认值true
|
||
|
||
number_of_endorsement = 2#该参数确认背书比例,可选值:1,2,3;如果等于1, 表示有一个出块签名就可以了;如果等于2,表示达成共识需要大于节点的1/2;如果等于3,表示达成共识需要大于节点的2/3;默认值是2.
|
||
|
||
is_persistence_tx_to_db = 1 #0,不持久化缓存交易到数据库;1,持久化缓存交易到数据库
|
||
|
||
block {
|
||
#块内交易的最大数量
|
||
trans_num_limit = 200
|
||
#块内交易标准最小数量
|
||
trans_num_min = 1
|
||
#交易数量不足,重试次数
|
||
retry_time = 10
|
||
#区块的最大长度,不能大于传输的消息的最大长度,单位是字节
|
||
block_length = 2400000
|
||
#出块人每次连续出块的数量
|
||
block_number_blocker = 5
|
||
}
|
||
|
||
vote {
|
||
#最低投票人数量
|
||
vote_node_min = 4
|
||
#参与共识的节点别名
|
||
vote_node_list = ["121000005l35120456.node1", "12110107bi45jh675g.node2",
|
||
"122000002n00123567.node3", "921000005k36123789.node4"
|
||
#]
|
||
, "921000006e0012v696.node5"]
|
||
}
|
||
account {
|
||
chaincodename = "RdidOperateAuthorizeTPL"#账户管理合约的名称,使用did配置:RdidOperateAuthorizeTPL;使用非did配置:ContractCert
|
||
chaincodeversion = 1
|
||
#证书状态改变函数名
|
||
CertStatusChangeFunction = "UpdateCertStatus"
|
||
}
|
||
|
||
diskspaceManager {
|
||
diskspacealarm = 5000#磁盘最少空间大小,单位M ,小于这个值系统将不能启动。
|
||
}
|
||
|
||
transaction {
|
||
#辅助自动创建交易的间隔
|
||
tran_create_dur = 100 #millis
|
||
#最大交易缓存量
|
||
max_cache_num = 100000
|
||
}
|
||
|
||
cluster {
|
||
#节点入网稳定时间
|
||
node_stable_delay = 5000 #millis
|
||
}
|
||
|
||
storage {
|
||
dbpath = "/Users/jiangbuyun/repchaindata/data/leveldbdata"
|
||
blockpath = "/Users/jiangbuyun/repchaindata/data/blockdata"
|
||
filemax = 200000000#单位为字节
|
||
}
|
||
|
||
output_alert{
|
||
is_output_alert = false
|
||
core_threads = 2
|
||
max_threads = 4
|
||
alive_time = 10 //unit second
|
||
prisma_url = "http://localhost/"
|
||
}
|
||
|
||
time {
|
||
#通用稳定延迟
|
||
stable_time_dur = 5000 #millis,确保block模块能够接收到confirm的块数据
|
||
|
||
block {
|
||
#投票选举重试间隔
|
||
vote_retry_delay = 200
|
||
#投票重试无果后等待时间
|
||
#waiting_delay = 3600000
|
||
waiting_delay = 3600
|
||
}
|
||
|
||
#超时策略:1,手动;0,自动
|
||
timeout_policy_type = 1
|
||
|
||
timeout {
|
||
#Unit : Second 以下的超时时间一般采用默认配置
|
||
#For auto 自动采用的超时时间
|
||
#base_preload = 30#交易预执行的超时时间,单位是s
|
||
#base_vote = 20#内部消息传递速度快,抽签的超时时间
|
||
#base_sync = 20#没有耗时操作,没有大块传输的情况下
|
||
#base_addition = 0#冗余量,不用配置
|
||
|
||
#For config manually 手工设置超时时间,系统主动采用手工设置的时间,可以不用设置
|
||
block = 90#出块的超时时间
|
||
endorse = 20#背书超时时间,单位为秒
|
||
endorse_resend_times = 3#背书失败的次数,超过该次数就等待出块超时
|
||
transaction_preload = 12
|
||
sync_chain = 15#链同步的超时时间
|
||
transcation_waiting = 900#交易在交易池中等待入块到的超时时间,单位是秒
|
||
}
|
||
}
|
||
|
||
consensus {
|
||
#共识类型,目前只支持一种
|
||
type = "CFRD"//内置三种共识协议,CFRD、RAFT、PBFT、CFRDINSTREAM
|
||
synch_type="CFRD"//内置两种同步类型,CFRD最高的高度的节点数大于一半;RAFT按照最高高度进行同步
|
||
blocknumberofraft = 3
|
||
isstream = 1
|
||
}
|
||
|
||
} |