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
83bcc231
Commit
83bcc231
authored
Jun 20, 2019
by
mdj33
Committed by
vipwzw
Jun 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
genesis block start height
parent
29c863b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
166 additions
and
31 deletions
+166
-31
para.go
plugin/consensus/para/para.go
+1
-1
chain33.para.toml
plugin/dapp/paracross/cmd/build/chain33.para.toml
+151
-28
testcase.sh
plugin/dapp/paracross/cmd/build/testcase.sh
+14
-2
No files found.
plugin/consensus/para/para.go
View file @
83bcc231
...
@@ -205,7 +205,7 @@ func (client *client) InitBlock() {
...
@@ -205,7 +205,7 @@ func (client *client) InitBlock() {
newblock
.
BlockTime
=
genesisBlockTime
newblock
.
BlockTime
=
genesisBlockTime
newblock
.
ParentHash
=
zeroHash
[
:
]
newblock
.
ParentHash
=
zeroHash
[
:
]
newblock
.
MainHash
=
mainHash
newblock
.
MainHash
=
mainHash
newblock
.
MainHeight
=
startHeight
newblock
.
MainHeight
=
startHeight
-
1
tx
:=
client
.
CreateGenesisTx
()
tx
:=
client
.
CreateGenesisTx
()
newblock
.
Txs
=
tx
newblock
.
Txs
=
tx
newblock
.
TxHash
=
merkle
.
CalcMerkleRoot
(
newblock
.
Txs
)
newblock
.
TxHash
=
merkle
.
CalcMerkleRoot
(
newblock
.
Txs
)
...
...
plugin/dapp/paracross/cmd/build/chain33.para.toml
View file @
83bcc231
Title
=
"user.p.guodun."
Title
=
"user.p.para."
# TestNet=true
TestNet
=
false
CoinSymbol
=
"paracoin"
CoinSymbol
=
"bty"
EnableParaFork
=
true
[log]
[log]
# 日志级别,支持debug(dbug)/info/warn/error(eror)/crit
# 日志级别,支持debug(dbug)/info/warn/error(eror)/crit
...
@@ -37,7 +38,9 @@ singleMode=true
...
@@ -37,7 +38,9 @@ singleMode=true
batchsync
=
false
batchsync
=
false
isRecordBlockSequence
=
false
isRecordBlockSequence
=
false
isParaChain
=
true
isParaChain
=
true
enableTxQuickIndex
=
false
enableTxQuickIndex
=
true
# 升级storedb是否重新执行localdb,bityuan主链升级不需要开启,平行链升级需要开启
enableReExecLocal
=
true
[p2p]
[p2p]
seeds
=[]
seeds
=[]
...
@@ -56,9 +59,9 @@ grpcLogFile="grpc33.log"
...
@@ -56,9 +59,9 @@ grpcLogFile="grpc33.log"
[rpc]
[rpc]
# 避免与主链配置冲突
# 避免与主链配置冲突
jrpcBindAddr
=
"
localhost
:8901"
jrpcBindAddr
=
":8901"
grpcBindAddr
=
"
localhost
:8902"
grpcBindAddr
=
":8902"
whitelist
=
["
127.0.0.1
"]
whitelist
=
["
*
"]
jrpcFuncWhitelist
=
["*"]
jrpcFuncWhitelist
=
["*"]
grpcFuncWhitelist
=
["*"]
grpcFuncWhitelist
=
["*"]
...
@@ -92,6 +95,7 @@ targetTimePerBlock = 16
...
@@ -92,6 +95,7 @@ targetTimePerBlock = 16
[consensus.sub.para]
[consensus.sub.para]
#主链节点的grpc服务器ip,当前可以支持多ip负载均衡,如“101.37.227.226:8802,39.97.20.242:8802,47.107.15.126:8802,jiedian2.bityuan.com,cloud.bityuan.com”
#主链节点的grpc服务器ip,当前可以支持多ip负载均衡,如“101.37.227.226:8802,39.97.20.242:8802,47.107.15.126:8802,jiedian2.bityuan.com,cloud.bityuan.com”
#ParaRemoteGrpcClient="101.37.227.226:8802,39.97.20.242:8802,47.107.15.126:8802,jiedian2.bityuan.com,cloud.bityuan.com"
ParaRemoteGrpcClient
=
"localhost:8802"
ParaRemoteGrpcClient
=
"localhost:8802"
#主链指定高度的区块开始同步
#主链指定高度的区块开始同步
startHeight
=
345850
startHeight
=
345850
...
@@ -107,20 +111,34 @@ waitBlocks4CommitMsg=2
...
@@ -107,20 +111,34 @@ waitBlocks4CommitMsg=2
searchHashMatchedBlockDepth
=
10000
searchHashMatchedBlockDepth
=
10000
#创世地址额度
#创世地址额度
genesisAmount
=
100000000
genesisAmount
=
100000000
#主链支持平行链共识tx分叉高度,需要和主链保持严格一致
#主链支持平行链共识tx分叉高度,需要和主链保持严格一致
,不可修改
MainForkParacrossCommitTx
=
-1
MainForkParacrossCommitTx
=
2270000
#平行链自共识开启对应的主链高度,需要大于等于MainForkParacrossCommitTx
#平行链自共识开启对应的主链高度,需要大于等于MainForkParacrossCommitTx
=2270000, -1 不开启
MainParaSelfConsensusForkHeight
=
-1
MainParaSelfConsensusForkHeight
=
-1
[store]
[store]
name
=
"mavl"
name
=
"
kvmvcc
mavl"
driver
=
"leveldb"
driver
=
"leveldb"
storedbVersion
=
"2.0.0"
dbPath
=
"paradatadir/mavltree"
dbPath
=
"paradatadir/mavltree"
dbCache
=
128
dbCache
=
128
[store.sub.mavl]
enableMavlPrefix
=
false
enableMVCC
=
false
enableMavlPrune
=
false
pruneHeight
=
10000
enableMemTree
=
true
enableMemVal
=
true
[store.sub.kvmvccmavl]
enableMVCCIter
=
true
enableMavlPrefix
=
false
enableMavlPrefix
=
false
enableMVCC
=
false
enableMVCC
=
false
enableMavlPrune
=
false
enableMavlPrune
=
false
pruneHeight
=
10000
pruneHeight
=
10000
enableMemTree
=
true
enableMemVal
=
true
[wallet]
[wallet]
minFee
=
100000
minFee
=
100000
...
@@ -134,31 +152,135 @@ minerdisable=true
...
@@ -134,31 +152,135 @@ minerdisable=true
isFree
=
true
isFree
=
true
minExecFee
=
100000
minExecFee
=
100000
enableStat
=
false
enableStat
=
false
enableMVCC
=
false
[exec.sub.relay]
[exec.sub.relay]
genesis
=
"1
2qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
genesis
=
"1
JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP
"
[exec.sub.manage]
[exec.sub.manage]
superManager
=[
superManager
=
["1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP"]
"1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S"
,
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
,
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
]
[exec.sub.token]
[exec.sub.token]
saveTokenTxList
=
true
saveTokenTxList
=
true
tokenApprs
=
[
tokenApprs
=[]
"1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S"
,
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
,
"1LY8GFia5EiyoTodMLfkB5PHNNpXRqxhyB"
,
"1GCzJDS6HbgTQ2emade7mEJGGWFfA15pS9"
,
"1JYB8sxi4He5pZWHCd3Zi2nypQ4JMB6AxN"
,
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
,
]
[exec.sub.paracross]
[exec.sub.paracross]
#平行链自共识停止n个空块的对应主链高度后,超级账户可以直接参与投票
#平行链自共识停止n个空块的对应主链高度后,超级账户可以直接参与投票,这个高度只在主链有效
paraConsensusStopBlocks
=
100
paraConsensusStopBlocks
=
30000
#系统中所有的fork,默认用chain33的测试网络的
#但是我们可以替换
[fork.system]
ForkChainParamV1
=
0
ForkCheckTxDup
=
0
ForkBlockHash
=
1
ForkMinerTime
=
0
ForkTransferExec
=
0
ForkExecKey
=
0
ForkTxGroup
=
0
ForkResetTx0
=
0
ForkWithdraw
=
0
ForkExecRollback
=
0
ForkCheckBlockTime
=
0
ForkTxHeight
=
0
ForkTxGroupPara
=
0
ForkChainParamV2
=
0
ForkMultiSignAddress
=
0
ForkStateDBSet
=
0
ForkLocalDBAccess
=
0
ForkBlockCheck
=
0
ForkBase58AddressCheck
=
0
#平行链上使能平行链执行器如user.p.x.coins执行器的注册,缺省为0,对已有的平行链需要设置一个fork高度
ForkEnableParaRegExec
=
0
[fork.sub.coins]
Enable
=
0
[fork.sub.ticket]
Enable
=
0
ForkTicketId
=
0
ForkTicketVrf
=
0
[fork.sub.retrieve]
Enable
=
0
ForkRetrive
=
0
[fork.sub.hashlock]
Enable
=
0
[fork.sub.manage]
Enable
=
0
ForkManageExec
=
0
[fork.sub.token]
Enable
=
0
ForkTokenBlackList
=
0
ForkBadTokenSymbol
=
0
ForkTokenPrice
=
0
ForkTokenSymbolWithNumber
=
0
ForkTokenCheck
=
0
[fork.sub.trade]
Enable
=
0
ForkTradeBuyLimit
=
0
ForkTradeAsset
=
0
ForkTradeID
=
0
[fork.sub.paracross]
Enable
=
0
ForkParacrossWithdrawFromParachain
=
0
ForkParacrossCommitTx
=
0
[fork.sub.evm]
Enable
=
0
ForkEVMState
=
0
ForkEVMABI
=
0
ForkEVMFrozen
=
0
ForkEVMKVHash
=
0
[fork.sub.blackwhite]
Enable
=
0
ForkBlackWhiteV2
=
0
[fork.sub.cert]
Enable
=
0
[fork.sub.guess]
Enable
=
0
[fork.sub.lottery]
Enable
=
0
[fork.sub.oracle]
Enable
=
0
[fork.sub.relay]
Enable
=
0
[fork.sub.norm]
Enable
=
0
[fork.sub.pokerbull]
Enable
=
0
[fork.sub.privacy]
Enable
=
0
[fork.sub.game]
Enable
=
0
[fork.sub.multisig]
Enable
=
0
[fork.sub.unfreeze]
Enable
=
0
ForkTerminatePart
=
0
ForkUnfreezeIDX
=
0
#对已有的平行链如果不是从0开始同步数据,需要设置这个kvmvccmavl的fork,如果从0开始同步,statedb会跟以前mavl的不同
[fork.sub.store-kvmvccmavl]
ForkKvmvccmavl
=
0
[pprof]
[pprof]
listenAddr
=
"localhost:6061"
listenAddr
=
"localhost:6061"
\ No newline at end of file
plugin/dapp/paracross/cmd/build/testcase.sh
View file @
83bcc231
...
@@ -42,10 +42,22 @@ function para_set_toml() {
...
@@ -42,10 +42,22 @@ function para_set_toml() {
sed
-i
$xsedfix
's/^MainForkParacrossCommitTx=.*/MainForkParacrossCommitTx=1/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^MainForkParacrossCommitTx=.*/MainForkParacrossCommitTx=1/g'
"
${
1
}
"
# rpc
# rpc
sed
-i
$xsedfix
's/^jrpcBindAddr=.*/jrpcBindAddr="0.0.0.0:8901"/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^grpcBindAddr=.*/grpcBindAddr="0.0.0.0:8902"/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^whitelist=.*/whitelist=["localhost","127.0.0.1","0.0.0.0"]/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^whitelist=.*/whitelist=["localhost","127.0.0.1","0.0.0.0"]/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^ParaRemoteGrpcClient=.*/ParaRemoteGrpcClient="nginx:8803"/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^ParaRemoteGrpcClient=.*/ParaRemoteGrpcClient="nginx:8803"/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^genesis="1JmFaA6unrCFYEWP.*/genesis="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"/g'
"
${
1
}
"
# shellcheck disable=SC1004
sed
-i
$xsedfix
's/^superManager=.*/superManager=["1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S",\
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv",\
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"]/g'
"
${
1
}
"
# shellcheck disable=SC1004
sed
-i
$xsedfix
's/^tokenApprs=.*/tokenApprs=[ "1Bsg9j6gW83sShoee1fZAt9TkUjcrCgA9S",\
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK",\
"1LY8GFia5EiyoTodMLfkB5PHNNpXRqxhyB",\
"1GCzJDS6HbgTQ2emade7mEJGGWFfA15pS9",\
"1JYB8sxi4He5pZWHCd3Zi2nypQ4JMB6AxN",\
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv",]/g'
"
${
1
}
"
}
}
function
para_set_wallet
()
{
function
para_set_wallet
()
{
...
...
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