Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
d211d09f
Commit
d211d09f
authored
Nov 17, 2021
by
mdj33
Committed by
vipwzw
Nov 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fork
parent
d2526d02
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
6 deletions
+21
-6
docker-compose.sh
build/docker-compose.sh
+1
-1
chain33.para.toml
chain33.para.toml
+10
-3
chain33.para.toml.readme
chain33.para.toml.readme
+5
-1
parajumpdownload.go
plugin/consensus/para/parajumpdownload.go
+5
-1
autonomy.pb.go
plugin/dapp/autonomy/types/autonomy.pb.go
+0
-0
paracross.pb.go
plugin/dapp/paracross/types/paracross.pb.go
+0
-0
No files found.
build/docker-compose.sh
View file @
d211d09f
...
...
@@ -134,7 +134,7 @@ function base_init() {
fi
#autonomy config
sed
-i
$sedfix
's/^autonomyExec
=.*/autonomyExec=""/g'
chain33.toml
sed
-i
$sedfix
's/^autonomyExec=.*/autonomyExec=""/g'
chain33.toml
}
...
...
chain33.para.toml
View file @
d211d09f
...
...
@@ -107,7 +107,7 @@ halvePeriod=1000
[consensus.sub.para]
#主链节点的grpc服务器ip,当前可以支持多ip负载均衡,如“118.31.177.1:8802,39.97.2.127:8802”
#ParaRemoteGrpcClient="
118.31.177.1:8802,39.97.2.127:8802,120.77.111.44:8802,
jiedian2.bityuan.com,cloud.bityuan.com"
#ParaRemoteGrpcClient="jiedian2.bityuan.com,cloud.bityuan.com"
ParaRemoteGrpcClient
=
"localhost:8802"
#主链指定高度的区块开始同步
startHeight
=
345850
...
...
@@ -119,14 +119,13 @@ writeBlockMsec=2000
authAccount
=
""
#创世地址额度
genesisAmount
=
100000000
#主链计算blockhash forkheight,需要和主链保持严格一致,不可修改,1是bityuan主链对应高度, ycc或其他按实际修改
mainBlockHashForkHeight
=
1
#主链支持平行链共识tx分叉高度,需要和主链保持严格一致,不可修改,2270000是bityuan主链对应高度, ycc或其他按实际修改
#不可为0,主链Local时候需特殊配置
mainForkParacrossCommitTx
=
2270000
#主链开启循环检查共识交易done的fork高度,需要和主链保持严格一致,不可修改,4320000是bityuan主链对应高度, ycc或其他按实际修改
#不可为0,主链Local时候需特殊配置
mainLoopCheckCommitTxDoneForkHeight
=
4320000
#主链开启Supervision功能fork高度,需要和主链保持严格一致
#mainForkParaSupervision=10400000
#无平行链交易的主链区块间隔,平行链产生一个空块,从高度0开始,配置[blockHeight:interval],比如["0:50","1000:100"]
emptyBlockInterval
=
["0:50"]
...
...
@@ -190,6 +189,8 @@ genesis="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
[exec.sub.manage]
superManager
=
["12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"]
#autonomy执行器名字,空则不开启,使用superManager list
autonomyExec
=
""
[exec.sub.token]
saveTokenTxList
=
true
...
...
@@ -218,6 +219,8 @@ pointHX="19172955941344617222923168298456110557655645809646772800021167670156933
pointHY
=
"21116962883761739586121793871108889864627195706475546685847911817475098399811"
#电路最大支持1024个叶子hash,10 level, 配置可以小于1024,但不能大于
maxTreeLeaves
=
1024
#管理员列表
mixApprs
=[]
#系统中所有的fork,默认用chain33的测试网络的
#但是我们可以替换
...
...
@@ -270,6 +273,8 @@ ForkBadRepeatSecret=0
[fork.sub.manage]
Enable
=
0
ForkManageExec
=
0
#manage增加配置需要经过autonomy board成员审批,平行链不开启
ForkManageAutonomyEnable
=
-1
[fork.sub.token]
Enable
=
0
...
...
@@ -300,6 +305,8 @@ ForkParaSupervision=0
ForkParaFullMinerHeight
=
0
#仅平行链适用,在旧的版本中计算blockTxHash输入高度为0,需要在此高度后统一采用新的主链高度值,旧的版本需要设置此分叉高度,新版本缺省为0即可
ForkParaRootHash
=
0
#nodegroup approve需要经过autonomy board成员审批,平行链不开启
ForkParaAutonomySuperGroup
=
-1
[fork.sub.evm]
Enable
=
0
...
...
chain33.para.toml.readme
View file @
d211d09f
...
...
@@ -124,7 +124,7 @@ writeBlockMsec=2000
authAccount=""
#创世地址额度
genesisAmount=100000000
#主链计算blockhash forkheight,需要和主链保持严格一致,不可修改,1是bityuan主链对应高度, ycc或其他按实际修改
#主链计算blockhash forkheight,需要和主链保持严格一致,不可修改,1是bityuan主链对应高度, ycc或其他按实际修改
--此参数弃用
mainBlockHashForkHeight=1
#主链支持平行链共识tx分叉高度,需要和主链保持严格一致,不可修改,2270000是bityuan主链对应高度, ycc或其他按实际修改
#不可为0,主链Local时候需特殊配置
...
...
@@ -275,6 +275,8 @@ ForkBadRepeatSecret=0
[fork.sub.manage]
Enable=0
ForkManageExec=0
#manage增加配置需要autonomy审批
ForkManageAutonomyEnable=0
[fork.sub.token]
Enable=0
...
...
@@ -305,6 +307,8 @@ ForkParaSupervision=0
ForkParaFullMinerHeight=0
#仅平行链适用,在旧的版本中计算blockTxHash输入高度为0,需要在此高度后统一采用新的主链高度值,旧的版本需要设置此分叉高度,新版本缺省为0即可
ForkParaRootHash=0
#nodegroup approve需要经过autonomy board成员审批
ForkParaAutonomySuperGroup=0
[fork.sub.evm]
Enable=0
...
...
plugin/consensus/para/parajumpdownload.go
View file @
d211d09f
...
...
@@ -63,6 +63,7 @@ func (j *jumpDldClient) getParaHeightList(startHeight, endHeight int64) ([]*type
return
heightList
,
nil
}
//分页查找,只获取范围内的高度
plog
.
Info
(
"jumpDld.getParaTxHeightList"
,
"start"
,
heights
.
Items
[
0
]
.
GetHeight
(),
"end"
,
heights
.
Items
[
len
(
heights
.
Items
)
-
1
]
.
GetHeight
())
for
_
,
h
:=
range
heights
.
Items
{
if
h
.
Height
>=
startHeight
&&
h
.
Height
<=
endHeight
{
heightList
=
append
(
heightList
,
h
)
...
...
@@ -280,17 +281,20 @@ func (j *jumpDldClient) getParaTxs(startHeight, endHeight int64, heights []*type
//获取每一排1000个paraTxBlocks
paraBlocks
,
err
:=
j
.
getParaTxsBlocks
(
row
,
title
)
if
err
!=
nil
{
plog
.
Error
(
"jumpDld.getParaTxsBlocks"
,
"err"
,
err
)
return
err
}
//根据1000个paraTxBlocks的头尾高度获取header的头尾高度,header的高度要包含paraTxBlocks高度
headerStart
,
headerEnd
:=
getHeaderStartEndRange
(
startHeight
,
endHeight
,
heightsRows
,
i
)
plog
.
Debug
(
"jumpDld.getParaTxs"
,
"headerStart"
,
headerStart
,
"headerEnd"
,
headerEnd
,
"i"
,
i
)
plog
.
Info
(
"jumpDld.getParaTxs"
,
"headerStart"
,
headerStart
,
"headerEnd"
,
headerEnd
,
"i"
,
i
)
err
=
j
.
procParaTxHeaders
(
headerStart
,
headerEnd
,
paraBlocks
,
jobCh
)
if
err
!=
nil
{
plog
.
Error
(
"jumpDld.procParaTxHeaders"
,
"err"
,
err
)
return
err
}
if
atomic
.
LoadInt32
(
&
j
.
downFail
)
!=
0
||
j
.
paraClient
.
isCancel
()
{
plog
.
Error
(
"jumpDld.downFail"
,
"downfail"
,
atomic
.
LoadInt32
(
&
j
.
downFail
))
return
errors
.
New
(
"verify fail or main thread cancel"
)
}
}
...
...
plugin/dapp/autonomy/types/autonomy.pb.go
View file @
d211d09f
This diff is collapsed.
Click to expand it.
plugin/dapp/paracross/types/paracross.pb.go
View file @
d211d09f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment