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
8fbbee7c
Commit
8fbbee7c
authored
Oct 12, 2020
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updata
parent
8a459f77
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
chain33.para.toml
chain33.para.toml
+1
-0
action.go
plugin/dapp/paracross/executor/action.go
+7
-4
paracross.go
plugin/dapp/paracross/types/paracross.go
+2
-3
type.go
plugin/dapp/paracross/types/type.go
+2
-0
No files found.
chain33.para.toml
View file @
8fbbee7c
...
@@ -115,6 +115,7 @@ mainBlockHashForkHeight=209186
...
@@ -115,6 +115,7 @@ mainBlockHashForkHeight=209186
mainForkParacrossCommitTx
=
2270000
mainForkParacrossCommitTx
=
2270000
#主链开启循环检查共识交易done的fork高度,需要和主链保持严格一致,不可修改,4320000是bityuan主链对应高度, ycc或其他按实际修改
#主链开启循环检查共识交易done的fork高度,需要和主链保持严格一致,不可修改,4320000是bityuan主链对应高度, ycc或其他按实际修改
mainLoopCheckCommitTxDoneForkHeight
=
4320000
mainLoopCheckCommitTxDoneForkHeight
=
4320000
#mainForkParaSupervision=10400000
#无平行链交易的主链区块间隔,平行链产生一个空块,从高度0开始,配置[blockHeight:interval],比如["0:50","1000:100"]
#无平行链交易的主链区块间隔,平行链产生一个空块,从高度0开始,配置[blockHeight:interval],比如["0:50","1000:100"]
emptyBlockInterval
=
["0:50"]
emptyBlockInterval
=
["0:50"]
...
...
plugin/dapp/paracross/executor/action.go
View file @
8fbbee7c
...
@@ -635,9 +635,6 @@ func (a *action) proCommitMsg(commit *pt.ParacrossNodeStatus, nodes map[string]s
...
@@ -635,9 +635,6 @@ func (a *action) proCommitMsg(commit *pt.ParacrossNodeStatus, nodes map[string]s
stat
.
MainHeight
=
commit
.
MainBlockHeight
stat
.
MainHeight
=
commit
.
MainBlockHeight
stat
.
MainHash
=
commit
.
MainBlockHash
stat
.
MainHash
=
commit
.
MainBlockHash
}
}
if
pt
.
IsParaForkHeight
(
cfg
,
a
.
exec
.
GetMainHeight
(),
pt
.
ForkParaSupervision
)
{
stat
.
SupervisionDetails
=
&
pt
.
ParacrossStatusDetails
{}
}
}
else
{
}
else
{
copyStat
=
proto
.
Clone
(
stat
)
.
(
*
pt
.
ParacrossHeightStatus
)
copyStat
=
proto
.
Clone
(
stat
)
.
(
*
pt
.
ParacrossHeightStatus
)
}
}
...
@@ -654,6 +651,9 @@ func (a *action) proCommitMsg(commit *pt.ParacrossNodeStatus, nodes map[string]s
...
@@ -654,6 +651,9 @@ func (a *action) proCommitMsg(commit *pt.ParacrossNodeStatus, nodes map[string]s
}
}
for
_
,
addr
:=
range
supervisionValidAddrs
{
for
_
,
addr
:=
range
supervisionValidAddrs
{
if
stat
.
SupervisionDetails
==
nil
{
stat
.
SupervisionDetails
=
&
pt
.
ParacrossStatusDetails
{}
}
// 如有分叉, 同一个节点可能再次提交commit交易
// 如有分叉, 同一个节点可能再次提交commit交易
found
,
index
:=
hasCommited
(
stat
.
SupervisionDetails
.
Addrs
,
addr
)
found
,
index
:=
hasCommited
(
stat
.
SupervisionDetails
.
Addrs
,
addr
)
if
found
{
if
found
{
...
@@ -674,8 +674,11 @@ func (a *action) proCommitMsg(commit *pt.ParacrossNodeStatus, nodes map[string]s
...
@@ -674,8 +674,11 @@ func (a *action) proCommitMsg(commit *pt.ParacrossNodeStatus, nodes map[string]s
//平行链fork pt.ForkCommitTx=0,主链在ForkCommitTx后支持nodegroup,这里平行链dappFork一定为true
//平行链fork pt.ForkCommitTx=0,主链在ForkCommitTx后支持nodegroup,这里平行链dappFork一定为true
if
cfg
.
IsDappFork
(
commit
.
MainBlockHeight
,
pt
.
ParaX
,
pt
.
ForkCommitTx
)
{
if
cfg
.
IsDappFork
(
commit
.
MainBlockHeight
,
pt
.
ParaX
,
pt
.
ForkCommitTx
)
{
updateCommitAddrs
(
stat
,
nodes
)
updateCommitAddrs
(
stat
,
nodes
)
//updateSupervisionDetailsCommitAddrs(stat, supervisionNodes) // ???
}
}
if
stat
.
SupervisionDetails
!=
nil
{
updateSupervisionDetailsCommitAddrs
(
stat
,
supervisionNodes
)
}
_
=
saveTitleHeight
(
a
.
db
,
calcTitleHeightKey
(
stat
.
Title
,
stat
.
Height
),
stat
)
_
=
saveTitleHeight
(
a
.
db
,
calcTitleHeightKey
(
stat
.
Title
,
stat
.
Height
),
stat
)
//fork之前记录的stat 没有根据nodes更新而更新
//fork之前记录的stat 没有根据nodes更新而更新
if
pt
.
IsParaForkHeight
(
cfg
,
stat
.
MainHeight
,
pt
.
ForkLoopCheckCommitTxDone
)
{
if
pt
.
IsParaForkHeight
(
cfg
,
stat
.
MainHeight
,
pt
.
ForkLoopCheckCommitTxDone
)
{
...
...
plugin/dapp/paracross/types/paracross.go
View file @
8fbbee7c
...
@@ -329,6 +329,8 @@ func GetDappForkHeight(cfg *types.Chain33Config, forkKey string) int64 {
...
@@ -329,6 +329,8 @@ func GetDappForkHeight(cfg *types.Chain33Config, forkKey string) int64 {
key
=
MainForkParacrossCommitTx
key
=
MainForkParacrossCommitTx
case
ForkLoopCheckCommitTxDone
:
case
ForkLoopCheckCommitTxDone
:
key
=
MainLoopCheckCommitTxDoneForkHeight
key
=
MainLoopCheckCommitTxDoneForkHeight
//case ForkParaSupervision:
// key = MainForkParaSupervision
}
}
forkHeight
=
types
.
Conf
(
cfg
,
ParaPrefixConsSubConf
)
.
GInt
(
key
)
forkHeight
=
types
.
Conf
(
cfg
,
ParaPrefixConsSubConf
)
.
GInt
(
key
)
...
@@ -336,9 +338,6 @@ func GetDappForkHeight(cfg *types.Chain33Config, forkKey string) int64 {
...
@@ -336,9 +338,6 @@ func GetDappForkHeight(cfg *types.Chain33Config, forkKey string) int64 {
forkHeight
=
types
.
MaxHeight
forkHeight
=
types
.
MaxHeight
}
}
if
key
==
ForkParaSupervision
{
// ????
forkHeight
=
types
.
Conf
(
cfg
,
ParaPrefixConsSubConf
)
.
GInt
(
key
)
}
}
else
{
}
else
{
forkHeight
=
cfg
.
GetDappFork
(
ParaX
,
forkKey
)
forkHeight
=
cfg
.
GetDappFork
(
ParaX
,
forkKey
)
...
...
plugin/dapp/paracross/types/type.go
View file @
8fbbee7c
...
@@ -24,6 +24,8 @@ var (
...
@@ -24,6 +24,8 @@ var (
ForkLoopCheckCommitTxDone
=
"ForkLoopCheckCommitTxDone"
ForkLoopCheckCommitTxDone
=
"ForkLoopCheckCommitTxDone"
// MainLoopCheckCommitTxDoneForkHeight 平行链的配置项,对应主链的ForkLoopCheckCommitTxDone高度
// MainLoopCheckCommitTxDoneForkHeight 平行链的配置项,对应主链的ForkLoopCheckCommitTxDone高度
MainLoopCheckCommitTxDoneForkHeight
=
"mainLoopCheckCommitTxDoneForkHeight"
MainLoopCheckCommitTxDoneForkHeight
=
"mainLoopCheckCommitTxDoneForkHeight"
//MainForkParaSupervision = "mainForkParaSupervision"
// ForkParaSelfConsStages 平行链自共识分阶段共识
// ForkParaSelfConsStages 平行链自共识分阶段共识
ForkParaSelfConsStages
=
"ForkParaSelfConsStages"
ForkParaSelfConsStages
=
"ForkParaSelfConsStages"
// ForkParaAssetTransferRbk 平行链资产转移平行链失败主链回滚
// ForkParaAssetTransferRbk 平行链资产转移平行链失败主链回滚
...
...
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