mirror of
https://gitee.com/BTAJL/repchain.git
synced 2024-12-02 03:38:08 +08:00
242 lines
9.5 KiB
Plaintext
242 lines
9.5 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 {
|
||
#artery模式下的配置
|
||
artery {
|
||
#canonical.hostname = "192.168.10.155"
|
||
#canonical.hostname = "192.168.31.155"
|
||
canonical.hostname = "127.0.0.1"
|
||
canonical.port = 8083
|
||
ssl {
|
||
#节点的ssl配置,主要设置密码,密钥、证书、信任证书路径在程序中动态设置
|
||
config-ssl-engine {
|
||
key-password = "123"
|
||
key-store-password = "123"
|
||
trust-store-password = "changeme"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
#以下两项配置是针对集群节点出现不可达是来配置的 在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:8082"]
|
||
|
||
#集群节点出现不可达的情况下采取的策略,目前采用保持大多数方法 在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#建立连接对超时时间
|
||
}
|
||
tls-session-info-header = off
|
||
ssl-session-attribute = off
|
||
}
|
||
|
||
system {
|
||
#创世节点的名称,在系统初始化时,将根据该节点是否是创世节点进行创世块的建立
|
||
#genesis_node_name_jks = "330597659476689954.node6"
|
||
#chain_cert_name_jks = "951002007l78123233.super_admin"
|
||
|
||
genesis_node_name = "330597659476689954.node6"
|
||
chain_cert_name = "credence-net:951002007l78123233.super_admin"
|
||
chain_network_id = "credence-net" #组网id,组网id的命名不能包含"_"这样的字符
|
||
basic_chain_id = "identity-net"
|
||
#api是否开启
|
||
api{
|
||
ws_enable = 1#api 0,不开启;1,开启
|
||
http_mode = 0 #http协议模式 0,http;1,https 默认使用http
|
||
is_need_client_auth = 0 #当http的模式设置为https时有效,该配置指https时是否需要客户端验证;0=不验证;1=验证
|
||
#实时图的事件是否发送,如果不发送,前端实时图将收不到任何消息。
|
||
real_time_graph_enable = 1#0 unable;1 enable; default 1
|
||
http_service_port = 9087#http服务的端口号,默认为8081
|
||
}
|
||
|
||
#交易生产方式
|
||
trans_create_type = 0#0,手动;1,自动
|
||
#是否进行TPS测试
|
||
statistic_enable = 0 # 0,unable;able
|
||
|
||
http_service_actor_number = 5 //接收http请求的actor数量
|
||
is_broadcast_transaction = 1//是否广播交易,1=广播;0:不广播
|
||
check_cert_validate = 0#设置是否检查证书的有效性,默认为0 0=不校验,1=校验
|
||
contract_operation_mode = 1#设置合约的运行方式,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 = 0 #0,不持久化缓存交易到数据库;1,持久化缓存交易到数据库
|
||
|
||
block {
|
||
#块内交易的最大数量
|
||
trans_num_limit = 200
|
||
#块内交易标准最小数量
|
||
trans_num_min = 1
|
||
#交易数量不足,重试次数
|
||
retry_time = 10
|
||
#区块的最大长度,不能大于传输的消息的最大长度,单位是字节
|
||
block_length = 2400000
|
||
}
|
||
|
||
vote {
|
||
#最低投票人数量
|
||
vote_node_min = 4
|
||
#参与共识的节点别名
|
||
vote_node_list = ["330597659476689954.node6", "044934755127708189.node7",
|
||
"201353514191149590.node8", "734747416095474396.node9"
|
||
#]
|
||
, "710341838996249513.node10"]
|
||
vote_node_list_pfx = ["215159697776981712.node1","904703631549900672.node2","989038588418990208.node3",
|
||
"645377164372772928.node4","379552050023903168.node5"]
|
||
}
|
||
account {
|
||
chain_code_name = "RdidOperateAuthorizeTPL"#账户管理合约的名称,使用did配置:RdidOperateAuthorizeTPL;使用非did配置:ContractCert
|
||
chain_code_version = 1
|
||
cache_size = 10000 //账户权限信息缓存大小,默认10000
|
||
}
|
||
|
||
member_management{
|
||
contract_name = "ManageNodeCert"
|
||
contract_method = "updateNodeCert"
|
||
contract_vote_method = "updateVoteList"
|
||
}
|
||
|
||
disk_space_manager {
|
||
disk_space_alarm = 5000#磁盘最少空间大小,单位M ,小于这个值系统将不能启动。
|
||
}
|
||
|
||
transaction {
|
||
#辅助自动创建交易的间隔
|
||
tran_create_dur = 100 #millis
|
||
#最大交易缓存量
|
||
max_cache_num = 100000
|
||
}
|
||
|
||
cluster {
|
||
#节点入网稳定时间
|
||
node_stable_delay = 5000 #millis
|
||
}
|
||
|
||
storage {
|
||
db_type = "LevelDB" #支持数据库的类型:LevelDB、RocksDB
|
||
db_path = "./repchaindata/data/leveldbdata"
|
||
db_name = "12110107bi45jh675g.node2"
|
||
db_cache_size=48 #数据库读写缓存,单位为M
|
||
|
||
block_file_type = "localFileSystem"
|
||
block_file_path = "./repchaindata/data/blockdata"
|
||
block_file_name = "12110107bi45jh675g.node2"
|
||
file_max_length = 100 #单位为M
|
||
}
|
||
|
||
gm{
|
||
#是否使用国密算法,默认为false,使用java国际标准密码体系;true使用中国国家密码算法
|
||
is_use_gm = false
|
||
#jce密码算法提供者的类名
|
||
gm_jce_provider = "org.bouncycastle.jce.provider.BouncyCastleProvider"
|
||
#密码算法提供者注册时的注册名称
|
||
gm_jce_provider_name = "BC"
|
||
gm_jsse_provider = "org.bouncycastle.jsse.provider.BouncyCastleJsseProvider"
|
||
gm_jsse_provider_name = "BCJSSE"
|
||
gm_pfx_sign_key_name = "Sig"
|
||
}
|
||
|
||
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#链同步的超时时间
|
||
#transaction_waiting = 900#交易在交易池中等待入块到的超时时间,单位是秒
|
||
}
|
||
}
|
||
|
||
consensus {
|
||
#共识类型,目前只支持一种
|
||
type = "CFRD"//内置三种共识协议,CFRD、RAFT、PBFT、CFRDINSTREAM
|
||
synch_type="CFRD"//内置两种同步类型,CFRD最高的高度的节点数大于一半;RAFT按照最高高度进行同步
|
||
block_number_of_raft = 3
|
||
is_stream = 1
|
||
}
|
||
|
||
}
|