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
d9aae4b5
Commit
d9aae4b5
authored
Oct 09, 2019
by
mdj33
Committed by
vipwzw
Oct 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update para node status
parent
b09e1e21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
chain33.para.toml
chain33.para.toml
+2
-2
parasync.go
plugin/consensus/para/parasync.go
+5
-2
filtertxs.go
plugin/dapp/paracross/executor/filtertxs.go
+3
-0
No files found.
chain33.para.toml
View file @
d9aae4b5
...
@@ -90,8 +90,8 @@ coinDevFund=12
...
@@ -90,8 +90,8 @@ coinDevFund=12
[consensus.sub.para]
[consensus.sub.para]
#主链节点的grpc服务器ip,当前可以支持多ip负载均衡,如“1
01.37.227.226:8802,39.97.20.242:8802,47.107.15.126
:8802,jiedian2.bityuan.com,cloud.bityuan.com”
#主链节点的grpc服务器ip,当前可以支持多ip负载均衡,如“1
18.31.177.1:8802,39.97.2.127:8802,120.77.111.44
:8802,jiedian2.bityuan.com,cloud.bityuan.com”
#ParaRemoteGrpcClient="1
83.129.226.74:8802,183.129.226.75:8802,101.37.227.226:8802,39.97.20.242:8802,47.107.15.126:8802,jiedian2.bityuan.com,cloud.bityuan.com
"
#ParaRemoteGrpcClient="1
18.31.177.1:8802,39.97.2.127:8802,120.77.111.44:8802,jiedian2.bityuan.com,cloud.bityuan.com,183.129.226.74:8802,183.129.226.75:8802
"
ParaRemoteGrpcClient
=
"localhost:8802"
ParaRemoteGrpcClient
=
"localhost:8802"
#主链指定高度的区块开始同步
#主链指定高度的区块开始同步
startHeight
=
345850
startHeight
=
345850
...
...
plugin/consensus/para/parasync.go
View file @
d9aae4b5
...
@@ -359,12 +359,15 @@ func (client *blockSyncClient) addMinerTx(preStateHash []byte, block *types.Bloc
...
@@ -359,12 +359,15 @@ func (client *blockSyncClient) addMinerTx(preStateHash []byte, block *types.Bloc
status
:=
&
pt
.
ParacrossNodeStatus
{
status
:=
&
pt
.
ParacrossNodeStatus
{
Title
:
types
.
GetTitle
(),
Title
:
types
.
GetTitle
(),
Height
:
block
.
Height
,
Height
:
block
.
Height
,
PreBlockHash
:
block
.
ParentHash
,
PreStateHash
:
preStateHash
,
MainBlockHash
:
localBlock
.
MainHash
,
MainBlockHash
:
localBlock
.
MainHash
,
MainBlockHeight
:
localBlock
.
MainHeight
,
MainBlockHeight
:
localBlock
.
MainHeight
,
}
}
if
!
pt
.
IsParaForkHeight
(
status
.
MainBlockHeight
,
pt
.
ForkLoopCheckCommitTxDone
)
{
status
.
PreBlockHash
=
block
.
ParentHash
status
.
PreStateHash
=
preStateHash
}
tx
,
err
:=
pt
.
CreateRawMinerTx
(
&
pt
.
ParacrossMinerAction
{
tx
,
err
:=
pt
.
CreateRawMinerTx
(
&
pt
.
ParacrossMinerAction
{
Status
:
status
,
Status
:
status
,
IsSelfConsensus
:
client
.
paraClient
.
isParaSelfConsensusForked
(
status
.
MainBlockHeight
),
IsSelfConsensus
:
client
.
paraClient
.
isParaSelfConsensusForked
(
status
.
MainBlockHeight
),
...
...
plugin/dapp/paracross/executor/filtertxs.go
View file @
d9aae4b5
...
@@ -6,6 +6,7 @@ package executor
...
@@ -6,6 +6,7 @@ package executor
import
(
import
(
"bytes"
"bytes"
"encoding/hex"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
...
@@ -65,6 +66,7 @@ func filterParaTxGroup(tx *types.Transaction, allTxs []*types.TxDetail, index in
...
@@ -65,6 +66,7 @@ func filterParaTxGroup(tx *types.Transaction, allTxs []*types.TxDetail, index in
}
}
if
!
checkReceiptExecOk
(
allTxs
[
i
]
.
Receipt
)
{
if
!
checkReceiptExecOk
(
allTxs
[
i
]
.
Receipt
)
{
clog
.
Error
(
"filterParaTxGroup rmv tx group"
,
"txhash"
,
hex
.
EncodeToString
(
allTxs
[
i
]
.
Tx
.
Hash
()))
return
nil
,
endIdx
return
nil
,
endIdx
}
}
}
}
...
@@ -90,6 +92,7 @@ func FilterTxsForPara(main *types.ParaTxDetail) []*types.Transaction {
...
@@ -90,6 +92,7 @@ func FilterTxsForPara(main *types.ParaTxDetail) []*types.Transaction {
}
}
//单独的paracross tx 如果主链执行失败也要排除, 6.2fork原因 没有排除 非user.p.xx.paracross的平行链交易
//单独的paracross tx 如果主链执行失败也要排除, 6.2fork原因 没有排除 非user.p.xx.paracross的平行链交易
if
main
.
Header
.
Height
>=
forkHeight
&&
bytes
.
HasSuffix
(
tx
.
Execer
,
[]
byte
(
pt
.
ParaX
))
&&
!
checkReceiptExecOk
(
main
.
TxDetails
[
i
]
.
Receipt
)
{
if
main
.
Header
.
Height
>=
forkHeight
&&
bytes
.
HasSuffix
(
tx
.
Execer
,
[]
byte
(
pt
.
ParaX
))
&&
!
checkReceiptExecOk
(
main
.
TxDetails
[
i
]
.
Receipt
)
{
clog
.
Error
(
"FilterTxsForPara rmv tx"
,
"txhash"
,
hex
.
EncodeToString
(
tx
.
Hash
()))
continue
continue
}
}
...
...
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