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
820571b3
Commit
820571b3
authored
Nov 11, 2018
by
madengji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add clang format
parent
cdf51d68
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1738 additions
and
1506 deletions
+1738
-1506
.clang-format
.clang-format
+21
-0
.gitignore
.gitignore
+40
-11
Makefile
Makefile
+0
-1
blackwhite.proto
plugin/dapp/blackwhite/proto/blackwhite.proto
+137
-126
cert.proto
plugin/dapp/cert/proto/cert.proto
+20
-19
evmcontract.proto
plugin/dapp/evm/proto/evmcontract.proto
+71
-65
game.proto
plugin/dapp/game/proto/game.proto
+97
-85
hashlock.proto
plugin/dapp/hashlock/proto/hashlock.proto
+30
-29
lottery.proto
plugin/dapp/lottery/proto/lottery.proto
+134
-112
norm.proto
plugin/dapp/norm/proto/norm.proto
+14
-10
paracross.proto
plugin/dapp/paracross/proto/paracross.proto
+83
-72
pokerbull.proto
plugin/dapp/pokerbull/proto/pokerbull.proto
+99
-85
privacy.proto
plugin/dapp/privacy/proto/privacy.proto
+282
-253
relay.proto
plugin/dapp/relay/proto/relay.proto
+142
-133
retrieve.proto
plugin/dapp/retrieve/proto/retrieve.proto
+37
-36
ticket.proto
plugin/dapp/ticket/proto/ticket.proto
+84
-75
config.proto
...in/dapp/token/cmd/signatory-server/signatory/config.proto
+3
-3
token.proto
plugin/dapp/token/proto/token.proto
+88
-81
trade.proto
plugin/dapp/trade/proto/trade.proto
+203
-180
tendermint.proto
plugin/dapp/valnode/proto/tendermint.proto
+116
-106
valnode.proto
plugin/dapp/valnode/proto/valnode.proto
+17
-11
node.proto
plugin/store/mpt/db/node.proto
+19
-13
mpt.go
plugin/store/mpt/mpt.go
+1
-0
No files found.
.clang-format
0 → 100644
View file @
820571b3
Language: 'Proto'
BasedOnStyle: 'LLVM'
AccessModifierOffset: '-1'
AlignAfterOpenBracket: 'Align'
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignEscapedNewlinesLeft: 'true'
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'true'
AllowShortBlocksOnASingleLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'true'
ColumnLimit: '200'
IndentWidth: '4'
ContinuationIndentWidth: '4'
TabWidth: '4'
TabWidth: '4'
ReflowComments: 'true'
SortIncludes: 'true'
AllowShortFunctionsOnASingleLine: 'Empty'
AllowShortIfStatementsOnASingleLine: 'true'
.gitignore
View file @
820571b3
consensus/raft/tools/scripts/grpc33.log
consensus/raft/tools/scripts/logs/
*.orig
store/kvmvcc/1.png
store/kvmvcc/cpu.pprof
store/kvmvcc/kvmvcc.test
store/mpt/1.png
store/mpt/cpu.pprof
store/mpt/mpt.test
tool
.vscode
chain33
chain33
chain33-cli
chain33-cli
tool
datadir*
*.log
*.exe
*.orig
*.bak
*.log.last
.idea
.vscode
build/chain33*
build/datadir
build/bityuan*
build/para
build/execblock
build/relayd
build/relayd.toml
build/*.log
build/fzm
build/guodun
build/main.sh
build/main*
build/para.sh
build/ci
build/tools/autotest/autotest
build/tools/autotest/*.toml
build/tools/autotest/chain33
build/tools/autotest/chain33-cli
.DS_Store
logs/
build/wallet
plugin/store/kvmvcc/1.png
plugin/store/kvmvcc/cpu.pprof
plugin/store/kvmvcc/kvmvcc.test
plugin/store/mpt/1.png
plugin/store/mpt/cpu.pprof
plugin/store/mpt/mpt.test
plugin/consensus/raft/tools/scripts/grpc33.log
plugin/consensus/raft/tools/scripts/logs/
Makefile
View file @
820571b3
...
@@ -221,7 +221,6 @@ auto_ci: clean fmt_proto fmt_shell protobuf
...
@@ -221,7 +221,6 @@ auto_ci: clean fmt_proto fmt_shell protobuf
${
auto_fmt
}
${
auto_fmt
}
git add
*
.go
*
.sh
*
.proto
git add
*
.go
*
.sh
*
.proto
git status
git status
echo
"branch"
echo
$(branch)
echo
$(branch)
files
=
$$
(
git status
-suno
)
;
if
[
-n
"
$$
files"
]
;
then
\
files
=
$$
(
git status
-suno
)
;
if
[
-n
"
$$
files"
]
;
then
\
git add
*
.go
*
.sh
*
.proto
;
\
git add
*
.go
*
.sh
*
.proto
;
\
...
...
plugin/dapp/blackwhite/proto/blackwhite.proto
View file @
820571b3
...
@@ -5,186 +5,196 @@ import "transaction.proto";
...
@@ -5,186 +5,196 @@ import "transaction.proto";
package
types
;
package
types
;
message
AddressResult
{
message
AddressResult
{
string
addr
=
1
;
string
addr
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
repeated
bytes
hashValues
=
3
;
repeated
bytes
hashValues
=
3
;
string
showSecret
=
4
;
string
showSecret
=
4
;
}
}
// order
// order
message
BlackwhiteRound
{
message
BlackwhiteRound
{
// txhash
// txhash
string
gameID
=
1
;
string
gameID
=
1
;
// create -> play(timeout) -> show -> done
// create -> play(timeout) -> show -> done
int32
status
=
2
;
int32
status
=
2
;
// 游戏押金可大于
// 游戏押金可大于
int64
playAmount
=
3
;
int64
playAmount
=
3
;
// 游戏人数
// 游戏人数
int32
playerCount
=
4
;
int32
playerCount
=
4
;
// 当前游戏人数
// 当前游戏人数
int32
curPlayerCount
=
5
;
int32
curPlayerCount
=
5
;
// 游戏需要比对次数
// 游戏需要比对次数
int32
loop
=
6
;
int32
loop
=
6
;
// 当前出示密钥人数
// 当前出示密钥人数
int32
curShowCount
=
7
;
int32
curShowCount
=
7
;
// 创建游戏时间
// 创建游戏时间
int64
createTime
=
8
;
int64
createTime
=
8
;
// 出示密钥开始时间
// 出示密钥开始时间
int64
showTime
=
9
;
int64
showTime
=
9
;
// 超时时间
// 超时时间
int64
timeout
=
10
;
int64
timeout
=
10
;
// 创建游戏地址
// 创建游戏地址
string
createAddr
=
11
;
string
createAddr
=
11
;
// 游戏名称
// 游戏名称
string
gameName
=
12
;
string
gameName
=
12
;
// 游戏加密结果
// 游戏加密结果
repeated
AddressResult
addrResult
=
13
;
repeated
AddressResult
addrResult
=
13
;
// 游戏赢家
// 游戏赢家
repeated
string
winner
=
14
;
repeated
string
winner
=
14
;
// block高度以及索引值
// block高度以及索引值
int64
index
=
15
;
int64
index
=
15
;
}
}
// actions
// actions
message
BlackwhiteAction
{
message
BlackwhiteAction
{
oneof
value
{
oneof
value
{
BlackwhiteCreate
create
=
1
;
BlackwhiteCreate
create
=
1
;
BlackwhitePlay
play
=
2
;
BlackwhitePlay
play
=
2
;
BlackwhiteShow
show
=
3
;
BlackwhiteShow
show
=
3
;
BlackwhiteTimeoutDone
timeoutDone
=
4
;
BlackwhiteTimeoutDone
timeoutDone
=
4
;
}
}
int32
ty
=
6
;
int32
ty
=
6
;
}
}
message
BlackwhiteCreate
{
message
BlackwhiteCreate
{
int64
playAmount
=
1
;
int64
playAmount
=
1
;
int32
playerCount
=
2
;
int32
playerCount
=
2
;
int64
timeout
=
3
;
int64
timeout
=
3
;
string
gameName
=
4
;
string
gameName
=
4
;
}
}
message
BlackwhitePlay
{
message
BlackwhitePlay
{
string
gameID
=
1
;
string
gameID
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
repeated
bytes
hashValues
=
3
;
repeated
bytes
hashValues
=
3
;
}
}
message
BlackwhiteShow
{
message
BlackwhiteShow
{
string
gameID
=
1
;
string
gameID
=
1
;
string
secret
=
2
;
string
secret
=
2
;
}
}
message
BlackwhiteTimeoutDone
{
string
gameID
=
1
;
}
message
BlackwhiteTimeoutDone
{
string
gameID
=
1
;
}
// logs
// logs
message
ReceiptBlackwhite
{
BlackwhiteRound
round
=
1
;
}
message
ReceiptBlackwhite
{
BlackwhiteRound
round
=
1
;
}
message
ReceiptBlackwhiteStatus
{
message
ReceiptBlackwhiteStatus
{
string
gameID
=
1
;
string
gameID
=
1
;
int32
status
=
2
;
int32
status
=
2
;
//记录上一次状态
//记录上一次状态
int32
prevStatus
=
3
;
int32
prevStatus
=
3
;
string
addr
=
4
;
string
addr
=
4
;
int64
index
=
5
;
int64
index
=
5
;
}
}
message
ReqBlackwhiteRoundInfo
{
string
gameID
=
1
;
}
message
ReqBlackwhiteRoundInfo
{
string
gameID
=
1
;
}
message
ReplyBlackwhiteRoundInfo
{
BlackwhiteRoundResult
round
=
1
;
}
message
ReplyBlackwhiteRoundInfo
{
BlackwhiteRoundResult
round
=
1
;
}
message
ReqBlackwhiteRoundList
{
message
ReqBlackwhiteRoundList
{
//优先根据status查询,status不可为空
//优先根据status查询,status不可为空
int32
status
=
1
;
int32
status
=
1
;
//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
string
address
=
2
;
string
address
=
2
;
int32
count
=
3
;
int32
count
=
3
;
int32
direction
=
4
;
int32
direction
=
4
;
int64
index
=
5
;
int64
index
=
5
;
}
}
message
ReplyBlackwhiteRoundList
{
repeated
BlackwhiteRoundResult
round
=
1
;
}
message
ReplyBlackwhiteRoundList
{
repeated
BlackwhiteRoundResult
round
=
1
;
}
message
ReqLoopResult
{
message
ReqLoopResult
{
string
gameID
=
1
;
string
gameID
=
1
;
int32
loopSeq
=
2
;
int32
loopSeq
=
2
;
}
}
message
perLoopResult
{
message
perLoopResult
{
repeated
string
winers
=
1
;
repeated
string
winers
=
1
;
repeated
string
losers
=
2
;
repeated
string
losers
=
2
;
}
}
message
ReplyLoopResults
{
message
ReplyLoopResults
{
string
gameID
=
1
;
string
gameID
=
1
;
repeated
perLoopResult
results
=
2
;
repeated
perLoopResult
results
=
2
;
}
}
message
BlackwhiteRoundResult
{
message
BlackwhiteRoundResult
{
// txhash
// txhash
string
gameID
=
1
;
string
gameID
=
1
;
// create -> play(timeout) -> show -> done
// create -> play(timeout) -> show -> done
int32
status
=
2
;
int32
status
=
2
;
// 游戏押金可大于
// 游戏押金可大于
int64
playAmount
=
3
;
int64
playAmount
=
3
;
// 游戏人数
// 游戏人数
int32
playerCount
=
4
;
int32
playerCount
=
4
;
// 当前游戏人数
// 当前游戏人数
int32
curPlayerCount
=
5
;
int32
curPlayerCount
=
5
;
// 游戏需要比对次数
// 游戏需要比对次数
int32
loop
=
6
;
int32
loop
=
6
;
// 当前出示密钥人数
// 当前出示密钥人数
int32
curShowCount
=
7
;
int32
curShowCount
=
7
;
// 创建游戏时间
// 创建游戏时间
int64
createTime
=
8
;
int64
createTime
=
8
;
// 出示密钥开始时间
// 出示密钥开始时间
int64
showTime
=
9
;
int64
showTime
=
9
;
// 超时时间
// 超时时间
int64
timeout
=
10
;
int64
timeout
=
10
;
// 创建游戏地址
// 创建游戏地址
string
createAddr
=
11
;
string
createAddr
=
11
;
// 游戏名称
// 游戏名称
string
gameName
=
12
;
string
gameName
=
12
;
// 游戏加密结果
// 游戏加密结果
repeated
AddressResult
addrResult
=
13
;
repeated
AddressResult
addrResult
=
13
;
// 游戏赢家
// 游戏赢家
repeated
string
winner
=
14
;
repeated
string
winner
=
14
;
// block高度以及索引值
// block高度以及索引值
int64
index
=
15
;
int64
index
=
15
;
}
}
message
BlackwhiteCreateTxReq
{
message
BlackwhiteCreateTxReq
{
int64
PlayAmount
=
1
;
int64
PlayAmount
=
1
;
int32
PlayerCount
=
2
;
int32
PlayerCount
=
2
;
int64
Timeout
=
3
;
int64
Timeout
=
3
;
string
GameName
=
4
;
string
GameName
=
4
;
int64
Fee
=
5
;
int64
Fee
=
5
;
}
}
message
BlackwhitePlayTxReq
{
message
BlackwhitePlayTxReq
{
string
GameID
=
1
;
string
GameID
=
1
;
int64
Amount
=
2
;
int64
Amount
=
2
;
repeated
bytes
HashValues
=
3
;
repeated
bytes
HashValues
=
3
;
int64
Fee
=
4
;
int64
Fee
=
4
;
}
}
message
BlackwhiteShowTxReq
{
message
BlackwhiteShowTxReq
{
string
GameID
=
1
;
string
GameID
=
1
;
string
Secret
=
2
;
string
Secret
=
2
;
int64
Fee
=
3
;
int64
Fee
=
3
;
}
}
message
BlackwhiteTimeoutDoneTxReq
{
message
BlackwhiteTimeoutDoneTxReq
{
string
GameID
=
1
;
string
GameID
=
1
;
int64
Fee
=
2
;
int64
Fee
=
2
;
}
}
service
blackwhite
{
service
blackwhite
{
// blackwhite 对外提供服务的接口
// blackwhite 对外提供服务的接口
//区块链接口
//区块链接口
rpc
Create
(
BlackwhiteCreate
)
returns
(
UnsignTx
)
{}
rpc
Create
(
BlackwhiteCreate
)
returns
(
UnsignTx
)
{}
//获取最新的区块头
//获取最新的区块头
rpc
Show
(
BlackwhiteShow
)
returns
(
UnsignTx
)
{}
rpc
Show
(
BlackwhiteShow
)
returns
(
UnsignTx
)
{}
//交易接口
//交易接口
rpc
Play
(
BlackwhitePlay
)
returns
(
UnsignTx
)
{}
rpc
Play
(
BlackwhitePlay
)
returns
(
UnsignTx
)
{}
rpc
TimeoutDone
(
BlackwhiteTimeoutDone
)
returns
(
UnsignTx
)
{}
rpc
TimeoutDone
(
BlackwhiteTimeoutDone
)
returns
(
UnsignTx
)
{}
}
}
\ No newline at end of file
plugin/dapp/cert/proto/cert.proto
View file @
820571b3
...
@@ -3,38 +3,38 @@ syntax = "proto3";
...
@@ -3,38 +3,38 @@ syntax = "proto3";
package
types
;
package
types
;
message
Cert
{
message
Cert
{
bytes
certId
=
1
;
bytes
certId
=
1
;
int64
createTime
=
2
;
int64
createTime
=
2
;
string
key
=
3
;
string
key
=
3
;
bytes
value
=
4
;
bytes
value
=
4
;
}
}
message
CertAction
{
message
CertAction
{
oneof
value
{
oneof
value
{
CertNew
new
=
1
;
CertNew
new
=
1
;
CertUpdate
update
=
2
;
CertUpdate
update
=
2
;
CertNormal
normal
=
3
;
CertNormal
normal
=
3
;
}
}
int32
ty
=
4
;
int32
ty
=
4
;
}
}
message
CertNew
{
message
CertNew
{
string
key
=
1
;
string
key
=
1
;
bytes
value
=
2
;
bytes
value
=
2
;
}
}
message
CertUpdate
{
message
CertUpdate
{
string
key
=
1
;
string
key
=
1
;
bytes
value
=
2
;
bytes
value
=
2
;
}
}
message
CertNormal
{
message
CertNormal
{
string
key
=
1
;
string
key
=
1
;
bytes
value
=
2
;
bytes
value
=
2
;
}
}
message
Authority
{
message
Authority
{
bool
enable
=
1
;
bool
enable
=
1
;
string
cryptoPath
=
2
;
string
cryptoPath
=
2
;
string
signType
=
3
;
string
signType
=
3
;
}
}
\ No newline at end of file
plugin/dapp/evm/proto/evmcontract.proto
View file @
820571b3
...
@@ -4,110 +4,116 @@ package types;
...
@@ -4,110 +4,116 @@ package types;
//合约对象信息
//合约对象信息
message
EVMContractObject
{
message
EVMContractObject
{
string
addr
=
1
;
string
addr
=
1
;
EVMContractData
data
=
2
;
EVMContractData
data
=
2
;
EVMContractState
state
=
3
;
EVMContractState
state
=
3
;
}
}
// 存放合约固定数据
// 存放合约固定数据
message
EVMContractData
{
message
EVMContractData
{
string
creator
=
1
;
string
creator
=
1
;
string
name
=
2
;
string
name
=
2
;
string
alias
=
3
;
string
alias
=
3
;
string
addr
=
4
;
string
addr
=
4
;
bytes
code
=
5
;
bytes
code
=
5
;
bytes
codeHash
=
6
;
bytes
codeHash
=
6
;
}
}
// 存放合约变化数据
// 存放合约变化数据
message
EVMContractState
{
message
EVMContractState
{
uint64
nonce
=
1
;
uint64
nonce
=
1
;
bool
suicided
=
2
;
bool
suicided
=
2
;
bytes
storageHash
=
3
;
bytes
storageHash
=
3
;
map
<
string
,
bytes
>
storage
=
4
;
map
<
string
,
bytes
>
storage
=
4
;
}
}
// 创建/调用合约的请求结构
// 创建/调用合约的请求结构
message
EVMContractAction
{
message
EVMContractAction
{
// 转账金额
// 转账金额
uint64
amount
=
1
;
uint64
amount
=
1
;
// 消耗限制,默认为Transaction.Fee
// 消耗限制,默认为Transaction.Fee
uint64
gasLimit
=
2
;
uint64
gasLimit
=
2
;
// gas价格,默认为1
// gas价格,默认为1
uint32
gasPrice
=
3
;
uint32
gasPrice
=
3
;
// 合约数据
// 合约数据
bytes
code
=
4
;
bytes
code
=
4
;
// 合约别名,方便识别
// 合约别名,方便识别
string
alias
=
5
;
string
alias
=
5
;
// 交易备注
// 交易备注
string
note
=
6
;
string
note
=
6
;
}
}
// 合约创建/调用日志
// 合约创建/调用日志
message
ReceiptEVMContract
{
message
ReceiptEVMContract
{
string
caller
=
1
;
string
caller
=
1
;
string
contractName
=
2
;
string
contractName
=
2
;
string
contractAddr
=
3
;
string
contractAddr
=
3
;
uint64
usedGas
=
4
;
uint64
usedGas
=
4
;
// 创建合约返回的代码
// 创建合约返回的代码
bytes
ret
=
5
;
bytes
ret
=
5
;
}
}
// 用于保存EVM只能合约中的状态数据变更
// 用于保存EVM只能合约中的状态数据变更
message
EVMStateChangeItem
{
message
EVMStateChangeItem
{
string
key
=
1
;
string
key
=
1
;
bytes
preValue
=
2
;
bytes
preValue
=
2
;
bytes
currentValue
=
3
;
bytes
currentValue
=
3
;
}
}
// 存放合约固定数据
// 存放合约固定数据
message
EVMContractDataCmd
{
message
EVMContractDataCmd
{
string
creator
=
1
;
string
creator
=
1
;
string
name
=
2
;
string
name
=
2
;
string
alias
=
3
;
string
alias
=
3
;
string
addr
=
4
;
string
addr
=
4
;
string
code
=
5
;
string
code
=
5
;
string
codeHash
=
6
;
string
codeHash
=
6
;
}
}
// 存放合约变化数据
// 存放合约变化数据
message
EVMContractStateCmd
{
message
EVMContractStateCmd
{
uint64
nonce
=
1
;
uint64
nonce
=
1
;
bool
suicided
=
2
;
bool
suicided
=
2
;
string
storageHash
=
3
;
string
storageHash
=
3
;
map
<
string
,
string
>
storage
=
4
;
map
<
string
,
string
>
storage
=
4
;
}
}
// 合约创建/调用日志
// 合约创建/调用日志
message
ReceiptEVMContractCmd
{
message
ReceiptEVMContractCmd
{
string
caller
=
1
;
string
caller
=
1
;
// 合约创建时才会返回此内容
// 合约创建时才会返回此内容
string
contractName
=
2
;
string
contractName
=
2
;
string
contractAddr
=
3
;
string
contractAddr
=
3
;
uint64
usedGas
=
4
;
uint64
usedGas
=
4
;
// 创建合约返回的代码
// 创建合约返回的代码
string
ret
=
5
;
string
ret
=
5
;
}
}
message
CheckEVMAddrReq
{
string
addr
=
1
;
}
message
CheckEVMAddrReq
{
string
addr
=
1
;
}
message
CheckEVMAddrResp
{
message
CheckEVMAddrResp
{
bool
contract
=
1
;
bool
contract
=
1
;
string
contractAddr
=
2
;
string
contractAddr
=
2
;
string
contractName
=
3
;
string
contractName
=
3
;
string
aliasName
=
4
;
string
aliasName
=
4
;
}
}
message
EstimateEVMGasReq
{
message
EstimateEVMGasReq
{
string
to
=
1
;
string
to
=
1
;
bytes
code
=
2
;
bytes
code
=
2
;
string
caller
=
3
;
string
caller
=
3
;
uint64
amount
=
4
;
uint64
amount
=
4
;
}
message
EstimateEVMGasResp
{
uint64
gas
=
1
;
}
}
message
EstimateEVMGasResp
{
uint64
gas
=
1
;
}
message
EvmDebugReq
{
message
EvmDebugReq
{
// 0 query, 1 set, -1 clear
// 0 query, 1 set, -1 clear
int32
optype
=
1
;
int32
optype
=
1
;
}
}
message
EvmDebugResp
{
string
debugStatus
=
1
;
}
message
EvmDebugResp
{
\ No newline at end of file
string
debugStatus
=
1
;
}
\ No newline at end of file
plugin/dapp/game/proto/game.proto
View file @
820571b3
...
@@ -3,121 +3,133 @@ syntax = "proto3";
...
@@ -3,121 +3,133 @@ syntax = "proto3";
package
types
;
package
types
;
message
Game
{
message
Game
{
//默认是由创建这局游戏的txHash作为gameId
//默认是由创建这局游戏的txHash作为gameId
string
gameId
=
1
;
string
gameId
=
1
;
// create 1 -> Match 2 -> Cancel 3 -> Close 4
// create 1 -> Match 2 -> Cancel 3 -> Close 4
int32
status
=
2
;
int32
status
=
2
;
//创建时间
//创建时间
int64
createTime
=
3
;
int64
createTime
=
3
;
//匹配时间(何时参与对赌)
//匹配时间(何时参与对赌)
int64
matchTime
=
4
;
int64
matchTime
=
4
;
//状态close的时间(包括cancel)
//状态close的时间(包括cancel)
int64
closetime
=
5
;
int64
closetime
=
5
;
//赌注
//赌注
int64
value
=
6
;
int64
value
=
6
;
//发起者账号地址
//发起者账号地址
string
createAddress
=
7
;
string
createAddress
=
7
;
//对赌者账号地址
//对赌者账号地址
string
matchAddress
=
8
;
string
matchAddress
=
8
;
// hash 类型,预留字段
// hash 类型,预留字段
string
hashType
=
9
;
string
hashType
=
9
;
//庄家创建游戏时,庄家自己出拳结果加密后的hash值
//庄家创建游戏时,庄家自己出拳结果加密后的hash值
bytes
hashValue
=
10
;
bytes
hashValue
=
10
;
//用来公布庄家出拳结果的私钥
//用来公布庄家出拳结果的私钥
string
secret
=
11
;
string
secret
=
11
;
// 1 平局,2 庄家获胜,3 matcher获胜,4
// 1 平局,2 庄家获胜,3 matcher获胜,4
// 庄家开奖超时,matcher获胜,并获得本局所有赌资
// 庄家开奖超时,matcher获胜,并获得本局所有赌资
int32
result
=
12
;
int32
result
=
12
;
// matcher 出拳结果
// matcher 出拳结果
int32
matcherGuess
=
13
;
int32
matcherGuess
=
13
;
// create txHash
// create txHash
string
createTxHash
=
14
;
string
createTxHash
=
14
;
// matche交易hash
// matche交易hash
string
matchTxHash
=
15
;
string
matchTxHash
=
15
;
// close txhash
// close txhash
string
closeTxHash
=
16
;
string
closeTxHash
=
16
;
// cancel txhash
// cancel txhash
string
cancelTxHash
=
17
;
string
cancelTxHash
=
17
;
int64
index
=
18
;
int64
index
=
18
;
int64
prevIndex
=
19
;
int64
prevIndex
=
19
;
int32
creatorGuess
=
20
;
int32
creatorGuess
=
20
;
}
}
// message for execs.game
// message for execs.game
message
GameAction
{
message
GameAction
{
oneof
value
{
oneof
value
{
GameCreate
create
=
1
;
GameCreate
create
=
1
;
GameCancel
cancel
=
2
;
GameCancel
cancel
=
2
;
GameClose
close
=
3
;
GameClose
close
=
3
;
GameMatch
match
=
4
;
GameMatch
match
=
4
;
}
}
int32
ty
=
10
;
int32
ty
=
10
;
}
}
message
GameMatch
{
message
GameMatch
{
string
gameId
=
1
;
string
gameId
=
1
;
int32
guess
=
2
;
int32
guess
=
2
;
}
}
message
GameCancel
{
string
gameId
=
1
;
}
message
GameCancel
{
string
gameId
=
1
;
}
message
GameClose
{
message
GameClose
{
string
gameId
=
1
;
string
gameId
=
1
;
string
secret
=
2
;
string
secret
=
2
;
}
}
message
GameCreate
{
message
GameCreate
{
int64
value
=
1
;
int64
value
=
1
;
//加密用的算法
//加密用的算法
string
hashType
=
2
;
string
hashType
=
2
;
//加密后的值
//加密后的值
bytes
hashValue
=
3
;
bytes
hashValue
=
3
;
}
}
// queryByAddr 和 queryByStatus共用同一个结构体
// queryByAddr 和 queryByStatus共用同一个结构体
message
QueryGameListByStatusAndAddr
{
message
QueryGameListByStatusAndAddr
{
//优先根据status查询,status不可为空
//优先根据status查询,status不可为空
int32
status
=
1
;
int32
status
=
1
;
//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
string
address
=
2
;
string
address
=
2
;
// 索引值
// 索引值
int64
index
=
3
;
int64
index
=
3
;
//单页返回多少条记录,默认返回20条,单次最多返回100条
//单页返回多少条记录,默认返回20条,单次最多返回100条
int32
count
=
4
;
int32
count
=
4
;
// 0降序,1升序,默认降序
// 0降序,1升序,默认降序
int32
direction
=
5
;
int32
direction
=
5
;
}
}
// 统计数量
// 统计数量
message
QueryGameListCount
{
message
QueryGameListCount
{
//优先根据status查询,status不可为空
//优先根据status查询,status不可为空
int32
status
=
1
;
int32
status
=
1
;
//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
//二级搜索,如果要查询一个地址下的所有game信息,可以根据status,分多次查询,这样规避存储数据时的臃余情况
string
address
=
2
;
string
address
=
2
;
}
}
// 索引value值
// 索引value值
message
GameRecord
{
message
GameRecord
{
string
gameId
=
1
;
string
gameId
=
1
;
int64
index
=
2
;
int64
index
=
2
;
}
}
message
QueryGameInfo
{
string
gameId
=
1
;
}
message
QueryGameInfo
{
string
gameId
=
1
;
}
message
QueryGameInfos
{
repeated
string
gameIds
=
1
;
}
message
QueryGameInfos
{
repeated
string
gameIds
=
1
;
}
message
ReplyGameList
{
repeated
Game
games
=
1
;
}
message
ReplyGameList
{
repeated
Game
games
=
1
;
}
message
ReplyGameListCount
{
int64
count
=
1
;
}
message
ReplyGameListCount
{
int64
count
=
1
;
}
message
ReplyGame
{
Game
game
=
1
;
}
message
ReplyGame
{
Game
game
=
1
;
}
message
ReceiptGame
{
message
ReceiptGame
{
string
gameId
=
1
;
string
gameId
=
1
;
int32
status
=
2
;
int32
status
=
2
;
//记录上一次状态
//记录上一次状态
int32
prevStatus
=
3
;
int32
prevStatus
=
3
;
string
addr
=
4
;
string
addr
=
4
;
string
createAddr
=
5
;
string
createAddr
=
5
;
string
matchAddr
=
6
;
string
matchAddr
=
6
;
int64
index
=
7
;
int64
index
=
7
;
int64
prevIndex
=
8
;
int64
prevIndex
=
8
;
}
}
plugin/dapp/hashlock/proto/hashlock.proto
View file @
820571b3
...
@@ -2,52 +2,52 @@ syntax = "proto3";
...
@@ -2,52 +2,52 @@ syntax = "proto3";
package
types
;
package
types
;
message
Hashlock
{
message
Hashlock
{
bytes
hashlockId
=
1
;
bytes
hashlockId
=
1
;
int32
status
=
2
;
int32
status
=
2
;
int64
CreateTime
=
3
;
int64
CreateTime
=
3
;
string
toAddress
=
4
;
string
toAddress
=
4
;
string
returnAddress
=
5
;
string
returnAddress
=
5
;
int64
amount
=
6
;
int64
amount
=
6
;
int64
frozentime
=
7
;
int64
frozentime
=
7
;
}
}
message
HashlockLock
{
message
HashlockLock
{
int64
amount
=
1
;
int64
amount
=
1
;
int64
time
=
2
;
int64
time
=
2
;
bytes
hash
=
3
;
bytes
hash
=
3
;
string
toAddress
=
4
;
string
toAddress
=
4
;
string
returnAddress
=
5
;
string
returnAddress
=
5
;
}
}
message
HashlockSend
{
message
HashlockSend
{
bytes
secret
=
1
;
bytes
secret
=
1
;
// bytes hash = 3;
// bytes hash = 3;
}
}
message
Hashlockquery
{
message
Hashlockquery
{
int64
time
=
1
;
int64
time
=
1
;
int32
status
=
2
;
int32
status
=
2
;
int64
amount
=
3
;
int64
amount
=
3
;
int64
createTime
=
4
;
int64
createTime
=
4
;
int64
currentTime
=
5
;
int64
currentTime
=
5
;
}
}
message
HashRecv
{
message
HashRecv
{
bytes
HashlockId
=
1
;
bytes
HashlockId
=
1
;
Hashlockquery
Infomation
=
2
;
Hashlockquery
Infomation
=
2
;
}
}
message
HashlockUnlock
{
message
HashlockUnlock
{
bytes
secret
=
1
;
bytes
secret
=
1
;
// bytes hash = 3;
// bytes hash = 3;
}
}
// message for hashlock
// message for hashlock
message
HashlockAction
{
message
HashlockAction
{
oneof
value
{
oneof
value
{
HashlockLock
hlock
=
1
;
HashlockLock
hlock
=
1
;
HashlockSend
hsend
=
2
;
HashlockSend
hsend
=
2
;
HashlockUnlock
hunlock
=
3
;
HashlockUnlock
hunlock
=
3
;
}
}
int32
ty
=
4
;
int32
ty
=
4
;
}
}
\ No newline at end of file
plugin/dapp/lottery/proto/lottery.proto
View file @
820571b3
...
@@ -3,172 +3,194 @@ syntax = "proto3";
...
@@ -3,172 +3,194 @@ syntax = "proto3";
package
types
;
package
types
;
message
PurchaseRecord
{
message
PurchaseRecord
{
int64
amount
=
1
;
int64
amount
=
1
;
int64
number
=
2
;
int64
number
=
2
;
int64
index
=
3
;
int64
index
=
3
;
int64
way
=
4
;
int64
way
=
4
;
}
}
message
PurchaseRecords
{
message
PurchaseRecords
{
repeated
PurchaseRecord
record
=
1
;
repeated
PurchaseRecord
record
=
1
;
int64
fundWin
=
2
;
int64
fundWin
=
2
;
int64
amountOneRound
=
3
;
int64
amountOneRound
=
3
;
}
}
message
Lottery
{
message
Lottery
{
string
lotteryId
=
1
;
string
lotteryId
=
1
;
int32
status
=
2
;
int32
status
=
2
;
int64
createHeight
=
3
;
int64
createHeight
=
3
;
int64
fund
=
4
;
int64
fund
=
4
;
int64
purBlockNum
=
5
;
int64
purBlockNum
=
5
;
int64
drawBlockNum
=
6
;
int64
drawBlockNum
=
6
;
int64
lastTransToPurState
=
7
;
int64
lastTransToPurState
=
7
;
int64
lastTransToDrawState
=
8
;
int64
lastTransToDrawState
=
8
;
map
<
string
,
PurchaseRecords
>
records
=
9
;
map
<
string
,
PurchaseRecords
>
records
=
9
;
int64
totalPurchasedTxNum
=
10
;
int64
totalPurchasedTxNum
=
10
;
string
createAddr
=
11
;
string
createAddr
=
11
;
int64
round
=
12
;
int64
round
=
12
;
int64
luckyNumber
=
13
;
int64
luckyNumber
=
13
;
int64
createOnMain
=
14
;
int64
createOnMain
=
14
;
int64
lastTransToPurStateOnMain
=
15
;
int64
lastTransToPurStateOnMain
=
15
;
int64
lastTransToDrawStateOnMain
=
16
;
int64
lastTransToDrawStateOnMain
=
16
;
repeated
MissingRecord
missingRecords
=
17
;
repeated
MissingRecord
missingRecords
=
17
;
}
}
message
MissingRecord
{
repeated
int32
times
=
1
;
}
message
MissingRecord
{
repeated
int32
times
=
1
;
}
message
LotteryAction
{
message
LotteryAction
{
oneof
value
{
oneof
value
{
LotteryCreate
create
=
1
;
LotteryCreate
create
=
1
;
LotteryBuy
buy
=
2
;
LotteryBuy
buy
=
2
;
LotteryDraw
draw
=
3
;
LotteryDraw
draw
=
3
;
LotteryClose
close
=
4
;
LotteryClose
close
=
4
;
}
}
int32
ty
=
10
;
int32
ty
=
10
;
}
}
message
LotteryCreate
{
message
LotteryCreate
{
int64
purBlockNum
=
1
;
int64
purBlockNum
=
1
;
int64
drawBlockNum
=
2
;
int64
drawBlockNum
=
2
;
}
}
message
LotteryBuy
{
message
LotteryBuy
{
string
lotteryId
=
1
;
string
lotteryId
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
int64
number
=
3
;
int64
number
=
3
;
int64
way
=
4
;
int64
way
=
4
;
}
}
message
LotteryDraw
{
string
lotteryId
=
1
;
}
message
LotteryDraw
{
string
lotteryId
=
1
;
}
message
LotteryClose
{
string
lotteryId
=
1
;
}
message
LotteryClose
{
string
lotteryId
=
1
;
}
message
ReceiptLottery
{
message
ReceiptLottery
{
string
lotteryId
=
1
;
string
lotteryId
=
1
;
int32
status
=
2
;
int32
status
=
2
;
int32
prevStatus
=
3
;
int32
prevStatus
=
3
;
string
addr
=
4
;
string
addr
=
4
;
int64
round
=
5
;
int64
round
=
5
;
int64
number
=
6
;
int64
number
=
6
;
int64
amount
=
7
;
int64
amount
=
7
;
int64
luckyNumber
=
8
;
int64
luckyNumber
=
8
;
int64
time
=
9
;
int64
time
=
9
;
string
txHash
=
10
;
string
txHash
=
10
;
LotteryUpdateBuyInfo
updateInfo
=
11
;
LotteryUpdateBuyInfo
updateInfo
=
11
;
int64
way
=
12
;
int64
way
=
12
;
int64
index
=
13
;
int64
index
=
13
;
}
}
message
ReqLotteryInfo
{
string
lotteryId
=
1
;
}
message
ReqLotteryInfo
{
string
lotteryId
=
1
;
}
message
ReqLotteryBuyInfo
{
message
ReqLotteryBuyInfo
{
string
lotteryId
=
1
;
string
lotteryId
=
1
;
string
addr
=
2
;
string
addr
=
2
;
int64
round
=
3
;
int64
round
=
3
;
}
}
message
ReqLotteryBuyHistory
{
message
ReqLotteryBuyHistory
{
string
lotteryId
=
1
;
string
lotteryId
=
1
;
string
addr
=
2
;
string
addr
=
2
;
int64
round
=
3
;
int64
round
=
3
;
int32
count
=
4
;
int32
count
=
4
;
int32
direction
=
5
;
int32
direction
=
5
;
int64
index
=
6
;
int64
index
=
6
;
}
}
message
ReqLotteryLuckyInfo
{
message
ReqLotteryLuckyInfo
{
string
lotteryId
=
1
;
string
lotteryId
=
1
;
repeated
int64
round
=
2
;
repeated
int64
round
=
2
;
}
}
message
ReqLotteryLuckyHistory
{
message
ReqLotteryLuckyHistory
{
string
lotteryId
=
1
;
string
lotteryId
=
1
;
int64
round
=
2
;
int64
round
=
2
;
int32
count
=
3
;
int32
count
=
3
;
int32
direction
=
4
;
int32
direction
=
4
;
}
}
message
ReplyLotteryNormalInfo
{
message
ReplyLotteryNormalInfo
{
int64
createHeight
=
1
;
int64
createHeight
=
1
;
int64
purBlockNum
=
2
;
int64
purBlockNum
=
2
;
int64
drawBlockNum
=
3
;
int64
drawBlockNum
=
3
;
string
createAddr
=
4
;
string
createAddr
=
4
;
}
}
message
ReplyLotteryCurrentInfo
{
message
ReplyLotteryCurrentInfo
{
int32
status
=
1
;
int32
status
=
1
;
int64
fund
=
2
;
int64
fund
=
2
;
int64
lastTransToPurState
=
3
;
int64
lastTransToPurState
=
3
;
int64
lastTransToDrawState
=
4
;
int64
lastTransToDrawState
=
4
;
int64
totalPurchasedTxNum
=
5
;
int64
totalPurchasedTxNum
=
5
;
int64
round
=
6
;
int64
round
=
6
;
int64
luckyNumber
=
7
;
int64
luckyNumber
=
7
;
int64
lastTransToPurStateOnMain
=
8
;
int64
lastTransToPurStateOnMain
=
8
;
int64
lastTransToDrawStateOnMain
=
9
;
int64
lastTransToDrawStateOnMain
=
9
;
int64
purBlockNum
=
10
;
int64
purBlockNum
=
10
;
int64
drawBlockNum
=
11
;
int64
drawBlockNum
=
11
;
repeated
MissingRecord
missingRecords
=
12
;
repeated
MissingRecord
missingRecords
=
12
;
}
}
message
ReplyLotteryHistoryLuckyNumber
{
repeated
int64
luckyNumber
=
1
;
}
message
ReplyLotteryHistoryLuckyNumber
{
repeated
int64
luckyNumber
=
1
;
}
message
ReplyLotteryShowInfo
{
repeated
LotteryBuyRecord
records
=
1
;
}
message
ReplyLotteryShowInfo
{
repeated
LotteryBuyRecord
records
=
1
;
}
message
LotteryNumberRecord
{
message
LotteryNumberRecord
{
int64
number
=
1
;
int64
number
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
}
}
// used for execlocal
// used for execlocal
message
LotteryBuyRecord
{
message
LotteryBuyRecord
{
int64
number
=
1
;
int64
number
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
int64
round
=
3
;
int64
round
=
3
;
int64
type
=
4
;
int64
type
=
4
;
int64
way
=
5
;
int64
way
=
5
;
int64
index
=
6
;
int64
index
=
6
;
int64
time
=
7
;
int64
time
=
7
;
string
txHash
=
8
;
string
txHash
=
8
;
}
}
message
LotteryBuyRecords
{
repeated
LotteryBuyRecord
records
=
1
;
}
message
LotteryBuyRecords
{
repeated
LotteryBuyRecord
records
=
1
;
}
message
LotteryDrawRecord
{
message
LotteryDrawRecord
{
int64
number
=
1
;
int64
number
=
1
;
int64
round
=
2
;
int64
round
=
2
;
int64
time
=
3
;
int64
time
=
3
;
string
txHash
=
4
;
string
txHash
=
4
;
}
}
message
LotteryDrawRecords
{
repeated
LotteryDrawRecord
records
=
1
;
}
message
LotteryDrawRecords
{
repeated
LotteryDrawRecord
records
=
1
;
}
message
LotteryUpdateRec
{
message
LotteryUpdateRec
{
int64
index
=
1
;
int64
index
=
1
;
int64
type
=
2
;
int64
type
=
2
;
}
}
message
LotteryUpdateRecs
{
repeated
LotteryUpdateRec
records
=
1
;
}
message
LotteryUpdateRecs
{
repeated
LotteryUpdateRec
records
=
1
;
}
message
LotteryUpdateBuyInfo
{
map
<
string
,
LotteryUpdateRecs
>
buyInfo
=
1
;
}
message
LotteryUpdateBuyInfo
{
map
<
string
,
LotteryUpdateRecs
>
buyInfo
=
1
;
}
message
ReplyLotteryPurchaseAddr
{
repeated
string
address
=
1
;
}
message
ReplyLotteryPurchaseAddr
{
repeated
string
address
=
1
;
}
plugin/dapp/norm/proto/norm.proto
View file @
820571b3
...
@@ -2,20 +2,24 @@ syntax = "proto3";
...
@@ -2,20 +2,24 @@ syntax = "proto3";
package
types
;
package
types
;
message
Norm
{
message
Norm
{
bytes
normId
=
1
;
bytes
normId
=
1
;
int64
createTime
=
2
;
int64
createTime
=
2
;
string
key
=
3
;
string
key
=
3
;
bytes
value
=
4
;
bytes
value
=
4
;
}
}
message
NormAction
{
message
NormAction
{
oneof
value
{
NormPut
nput
=
1
;
}
oneof
value
{
int32
ty
=
5
;
NormPut
nput
=
1
;
}
int32
ty
=
5
;
}
}
message
NormPut
{
message
NormPut
{
string
key
=
1
;
string
key
=
1
;
bytes
value
=
2
;
bytes
value
=
2
;
}
}
message
NormGetKey
{
string
key
=
1
;
}
message
NormGetKey
{
\ No newline at end of file
string
key
=
1
;
}
\ No newline at end of file
plugin/dapp/paracross/proto/paracross.proto
View file @
820571b3
...
@@ -7,117 +7,127 @@ package types;
...
@@ -7,117 +7,127 @@ package types;
// stateDB
// stateDB
message
ParacrossStatusDetails
{
message
ParacrossStatusDetails
{
repeated
string
addrs
=
1
;
repeated
string
addrs
=
1
;
repeated
bytes
blockHash
=
2
;
repeated
bytes
blockHash
=
2
;
}
}
message
ParacrossHeightStatus
{
message
ParacrossHeightStatus
{
// ing, done
// ing, done
int32
status
=
1
;
int32
status
=
1
;
string
title
=
2
;
string
title
=
2
;
int64
height
=
3
;
int64
height
=
3
;
ParacrossStatusDetails
details
=
4
;
ParacrossStatusDetails
details
=
4
;
}
}
message
ParacrossStatus
{
message
ParacrossStatus
{
string
title
=
1
;
string
title
=
1
;
int64
height
=
2
;
int64
height
=
2
;
bytes
blockHash
=
3
;
bytes
blockHash
=
3
;
}
}
// action
// action
message
ParacrossNodeStatus
{
message
ParacrossNodeStatus
{
bytes
mainBlockHash
=
1
;
bytes
mainBlockHash
=
1
;
int64
mainBlockHeight
=
2
;
int64
mainBlockHeight
=
2
;
string
title
=
3
;
string
title
=
3
;
int64
height
=
4
;
int64
height
=
4
;
bytes
preBlockHash
=
5
;
bytes
preBlockHash
=
5
;
bytes
blockHash
=
6
;
bytes
blockHash
=
6
;
bytes
preStateHash
=
7
;
bytes
preStateHash
=
7
;
bytes
stateHash
=
8
;
bytes
stateHash
=
8
;
uint32
txCounts
=
9
;
uint32
txCounts
=
9
;
bytes
txResult
=
10
;
bytes
txResult
=
10
;
repeated
bytes
txHashs
=
11
;
repeated
bytes
txHashs
=
11
;
bytes
crossTxResult
=
12
;
bytes
crossTxResult
=
12
;
repeated
bytes
crossTxHashs
=
13
;
repeated
bytes
crossTxHashs
=
13
;
}
}
message
ParacrossCommitAction
{
ParacrossNodeStatus
status
=
1
;
}
message
ParacrossCommitAction
{
ParacrossNodeStatus
status
=
1
;
}
message
ParacrossMinerAction
{
ParacrossNodeStatus
status
=
1
;
}
message
ParacrossMinerAction
{
ParacrossNodeStatus
status
=
1
;
}
message
ParacrossAction
{
message
ParacrossAction
{
oneof
value
{
oneof
value
{
ParacrossCommitAction
commit
=
1
;
ParacrossCommitAction
commit
=
1
;
ParacrossMinerAction
miner
=
3
;
ParacrossMinerAction
miner
=
3
;
AssetsTransfer
assetTransfer
=
4
;
AssetsTransfer
assetTransfer
=
4
;
AssetsWithdraw
assetWithdraw
=
5
;
AssetsWithdraw
assetWithdraw
=
5
;
AssetsTransfer
transfer
=
6
;
AssetsTransfer
transfer
=
6
;
AssetsWithdraw
withdraw
=
7
;
AssetsWithdraw
withdraw
=
7
;
AssetsTransferToExec
transferToExec
=
8
;
AssetsTransferToExec
transferToExec
=
8
;
}
}
int32
ty
=
2
;
int32
ty
=
2
;
}
}
// logs
// logs
message
ReceiptParacrossCommit
{
message
ReceiptParacrossCommit
{
string
addr
=
1
;
string
addr
=
1
;
ParacrossNodeStatus
status
=
2
;
ParacrossNodeStatus
status
=
2
;
ParacrossHeightStatus
prev
=
3
;
ParacrossHeightStatus
prev
=
3
;
ParacrossHeightStatus
current
=
4
;
ParacrossHeightStatus
current
=
4
;
}
}
message
ReceiptParacrossMiner
{
ParacrossNodeStatus
status
=
1
;
}
message
ReceiptParacrossMiner
{
ParacrossNodeStatus
status
=
1
;
}
message
ReceiptParacrossDone
{
message
ReceiptParacrossDone
{
int32
totalNodes
=
1
;
int32
totalNodes
=
1
;
int32
totalCommit
=
2
;
int32
totalCommit
=
2
;
int32
mostSameCommit
=
3
;
int32
mostSameCommit
=
3
;
string
title
=
4
;
string
title
=
4
;
int64
height
=
5
;
int64
height
=
5
;
bytes
stateHash
=
6
;
bytes
stateHash
=
6
;
uint32
txCounts
=
7
;
uint32
txCounts
=
7
;
bytes
txResult
=
8
;
bytes
txResult
=
8
;
}
}
message
ReceiptParacrossRecord
{
message
ReceiptParacrossRecord
{
string
addr
=
1
;
string
addr
=
1
;
ParacrossNodeStatus
status
=
2
;
ParacrossNodeStatus
status
=
2
;
}
}
// LocalDB
// LocalDB
// title-height-addr : txHash
// title-height-addr : txHash
message
ParacrossTx
{
string
txHash
=
1
;
}
message
ParacrossTx
{
string
txHash
=
1
;
}
// query
// query
message
ReqParacrossTitleHeight
{
message
ReqParacrossTitleHeight
{
string
title
=
1
;
string
title
=
1
;
int64
height
=
2
;
int64
height
=
2
;
}
}
message
RespParacrossTitles
{
repeated
ReceiptParacrossDone
titles
=
1
;
}
message
RespParacrossTitles
{
repeated
ReceiptParacrossDone
titles
=
1
;
}
// 跨链转账相关
// 跨链转账相关
message
ParacrossAsset
{
message
ParacrossAsset
{
// input
// input
string
from
=
1
;
string
from
=
1
;
string
to
=
2
;
string
to
=
2
;
bool
isWithdraw
=
3
;
bool
isWithdraw
=
3
;
bytes
txHash
=
4
;
bytes
txHash
=
4
;
int64
amount
=
5
;
int64
amount
=
5
;
string
exec
=
6
;
string
exec
=
6
;
string
symbol
=
7
;
string
symbol
=
7
;
// 主链部分
// 主链部分
int64
height
=
10
;
int64
height
=
10
;
// 平行链部分
// 平行链部分
int64
commitDoneHeight
=
21
;
int64
commitDoneHeight
=
21
;
int64
paraHeight
=
22
;
int64
paraHeight
=
22
;
bool
success
=
23
;
bool
success
=
23
;
}
}
service
paracross
{
service
paracross
{
rpc
GetTitle
(
ReqString
)
returns
(
ParacrossStatus
)
{}
rpc
GetTitle
(
ReqString
)
returns
(
ParacrossStatus
)
{}
rpc
ListTitles
(
ReqNil
)
returns
(
RespParacrossTitles
)
{}
rpc
ListTitles
(
ReqNil
)
returns
(
RespParacrossTitles
)
{}
rpc
GetTitleHeight
(
ReqParacrossTitleHeight
)
returns
(
ReceiptParacrossDone
)
{}
rpc
GetTitleHeight
(
ReqParacrossTitleHeight
)
returns
(
ReceiptParacrossDone
)
{}
rpc
GetAssetTxResult
(
ReqHash
)
returns
(
ParacrossAsset
)
{}
rpc
GetAssetTxResult
(
ReqHash
)
returns
(
ParacrossAsset
)
{}
}
}
\ No newline at end of file
plugin/dapp/pokerbull/proto/pokerbull.proto
View file @
820571b3
...
@@ -6,156 +6,170 @@ package types;
...
@@ -6,156 +6,170 @@ package types;
//斗牛游戏内容
//斗牛游戏内容
message
PokerBull
{
message
PokerBull
{
string
gameId
=
1
;
//默认是由创建这局游戏的txHash作为gameId
string
gameId
=
1
;
//默认是由创建这局游戏的txHash作为gameId
int32
status
=
2
;
// Start 1 -> Continue 2 -> Quit 3
int32
status
=
2
;
// Start 1 -> Continue 2 -> Quit 3
int64
startTime
=
3
;
//开始时间
int64
startTime
=
3
;
//开始时间
string
startTxHash
=
4
;
//游戏启动交易hash
string
startTxHash
=
4
;
//游戏启动交易hash
int64
value
=
5
;
//赌注
int64
value
=
5
;
//赌注
PBPoker
poker
=
6
;
//扑克牌
PBPoker
poker
=
6
;
//扑克牌
repeated
PBPlayer
players
=
7
;
//玩家历史牌和结果集
repeated
PBPlayer
players
=
7
;
//玩家历史牌和结果集
int32
playerNum
=
8
;
//玩家数
int32
playerNum
=
8
;
//玩家数
repeated
PBResult
results
=
9
;
//游戏结果集
repeated
PBResult
results
=
9
;
//游戏结果集
int64
index
=
10
;
//索引
int64
index
=
10
;
//索引
int64
prevIndex
=
11
;
//上级索引
int64
prevIndex
=
11
;
//上级索引
int64
quitTime
=
12
;
//游戏结束时间
int64
quitTime
=
12
;
//游戏结束时间
string
quitTxHash
=
13
;
//游戏结束交易hash
string
quitTxHash
=
13
;
//游戏结束交易hash
string
dealerAddr
=
14
;
//下局庄家地址
string
dealerAddr
=
14
;
//下局庄家地址
bool
isWaiting
=
15
;
//游戏是否处于等待状态
bool
isWaiting
=
15
;
//游戏是否处于等待状态
int32
preStatus
=
16
;
//上一index的状态
int32
preStatus
=
16
;
//上一index的状态
}
}
//一把牌
//一把牌
message
PBHand
{
message
PBHand
{
repeated
int32
cards
=
1
;
//一把牌,五张
repeated
int32
cards
=
1
;
//一把牌,五张
int32
result
=
2
;
//斗牛结果 (没牛:0, 牛1-9:1-9, 牛牛:10)
int32
result
=
2
;
//斗牛结果 (没牛:0, 牛1-9:1-9, 牛牛:10)
string
address
=
3
;
//玩家地址
string
address
=
3
;
//玩家地址
bool
isWin
=
4
;
//是否赢庄家
bool
isWin
=
4
;
//是否赢庄家
int32
leverage
=
5
;
//赌注倍数
int32
leverage
=
5
;
//赌注倍数
}
}
//玩家
//玩家
message
PBPlayer
{
message
PBPlayer
{
repeated
PBHand
hands
=
1
;
//历史发牌和斗牛结果
repeated
PBHand
hands
=
1
;
//历史发牌和斗牛结果
string
address
=
2
;
//玩家地址
string
address
=
2
;
//玩家地址
int64
txHash
=
3
;
//发牌随机数因子txhash的整数格式
int64
txHash
=
3
;
//发牌随机数因子txhash的整数格式
bool
ready
=
4
;
// continue状态下,是否ready
bool
ready
=
4
;
// continue状态下,是否ready
}
}
//本局游戏结果
//本局游戏结果
message
PBResult
{
message
PBResult
{
repeated
PBHand
hands
=
1
;
//本局所有玩家的牌和结果,按牛大小升序排序
repeated
PBHand
hands
=
1
;
//本局所有玩家的牌和结果,按牛大小升序排序
string
winner
=
2
;
//赢家地址
string
winner
=
2
;
//赢家地址
int32
leverage
=
3
;
//赢得赌注倍数
int32
leverage
=
3
;
//赢得赌注倍数
string
dealer
=
4
;
//庄家
string
dealer
=
4
;
//庄家
int32
dealerLeverage
=
5
;
//庄家赌注倍数
int32
dealerLeverage
=
5
;
//庄家赌注倍数
}
}
//扑克牌
//扑克牌
message
PBPoker
{
message
PBPoker
{
repeated
int32
cards
=
1
;
// 52张牌
repeated
int32
cards
=
1
;
// 52张牌
int32
pointer
=
2
;
//已发牌偏移
int32
pointer
=
2
;
//已发牌偏移
}
}
//游戏状态
//游戏状态
message
PBGameAction
{
message
PBGameAction
{
oneof
value
{
oneof
value
{
PBGameStart
start
=
1
;
PBGameStart
start
=
1
;
PBGameContinue
continue
=
2
;
PBGameContinue
continue
=
2
;
PBGameQuit
quit
=
3
;
PBGameQuit
quit
=
3
;
PBGameQuery
query
=
4
;
PBGameQuery
query
=
4
;
}
}
int32
ty
=
10
;
int32
ty
=
10
;
}
}
//游戏启动
//游戏启动
message
PBGameStart
{
message
PBGameStart
{
int64
value
=
1
;
int64
value
=
1
;
int32
playerNum
=
2
;
int32
playerNum
=
2
;
}
}
//游戏继续
//游戏继续
message
PBGameContinue
{
string
gameId
=
1
;
}
message
PBGameContinue
{
string
gameId
=
1
;
}
//游戏结束
//游戏结束
message
PBGameQuit
{
string
gameId
=
1
;
}
message
PBGameQuit
{
string
gameId
=
1
;
}
//查询游戏结果
//查询游戏结果
message
PBGameQuery
{
string
gameId
=
1
;
}
message
PBGameQuery
{
string
gameId
=
1
;
}
//根据状态和游戏人数查找
//根据状态和游戏人数查找
message
QueryPBGameListByStatusAndPlayerNum
{
message
QueryPBGameListByStatusAndPlayerNum
{
int32
status
=
1
;
int32
status
=
1
;
int32
playerNum
=
2
;
int32
playerNum
=
2
;
int64
index
=
3
;
int64
index
=
3
;
}
}
// 索引value值
// 索引value值
message
PBGameRecord
{
message
PBGameRecord
{
string
gameId
=
1
;
string
gameId
=
1
;
int32
status
=
2
;
int32
status
=
2
;
int64
index
=
3
;
int64
index
=
3
;
}
}
message
PBGameIndexRecord
{
message
PBGameIndexRecord
{
string
gameId
=
1
;
string
gameId
=
1
;
int64
index
=
2
;
int64
index
=
2
;
}
}
message
PBGameRecords
{
repeated
PBGameRecord
records
=
1
;
}
message
PBGameRecords
{
repeated
PBGameRecord
records
=
1
;
}
message
QueryPBGameInfo
{
message
QueryPBGameInfo
{
string
gameId
=
1
;
string
gameId
=
1
;
string
addr
=
2
;
string
addr
=
2
;
int32
status
=
3
;
int32
status
=
3
;
int64
index
=
4
;
int64
index
=
4
;
}
}
message
ReplyPBGame
{
PokerBull
game
=
1
;
}
message
ReplyPBGame
{
PokerBull
game
=
1
;
}
message
QueryPBGameInfos
{
repeated
string
gameIds
=
1
;
}
message
QueryPBGameInfos
{
repeated
string
gameIds
=
1
;
}
message
ReplyPBGameList
{
repeated
PokerBull
games
=
1
;
}
message
ReplyPBGameList
{
repeated
PokerBull
games
=
1
;
}
message
ReceiptPBGame
{
message
ReceiptPBGame
{
string
gameId
=
1
;
string
gameId
=
1
;
int32
status
=
2
;
int32
status
=
2
;
string
addr
=
3
;
string
addr
=
3
;
int64
index
=
4
;
int64
index
=
4
;
int64
prevIndex
=
5
;
int64
prevIndex
=
5
;
int32
playerNum
=
6
;
int32
playerNum
=
6
;
int64
value
=
7
;
int64
value
=
7
;
bool
isWaiting
=
8
;
bool
isWaiting
=
8
;
repeated
string
players
=
9
;
repeated
string
players
=
9
;
int32
preStatus
=
10
;
int32
preStatus
=
10
;
}
}
message
PBStartTxReq
{
message
PBStartTxReq
{
int64
value
=
1
;
int64
value
=
1
;
int32
playerNum
=
2
;
int32
playerNum
=
2
;
int64
fee
=
3
;
int64
fee
=
3
;
}
}
message
PBContinueTxReq
{
message
PBContinueTxReq
{
string
gameId
=
1
;
string
gameId
=
1
;
int64
fee
=
2
;
int64
fee
=
2
;
}
}
message
PBQuitTxReq
{
message
PBQuitTxReq
{
string
gameId
=
1
;
string
gameId
=
1
;
int64
fee
=
2
;
int64
fee
=
2
;
}
}
message
PBQueryReq
{
message
PBQueryReq
{
string
gameId
=
1
;
string
gameId
=
1
;
int64
fee
=
2
;
int64
fee
=
2
;
}
}
// pokerbull 对外提供服务的接口
// pokerbull 对外提供服务的接口
service
pokerbull
{
service
pokerbull
{
//游戏开始
//游戏开始
rpc
Start
(
PBGameStart
)
returns
(
UnsignTx
)
{}
rpc
Start
(
PBGameStart
)
returns
(
UnsignTx
)
{}
//游戏继续
//游戏继续
rpc
Continue
(
PBGameContinue
)
returns
(
UnsignTx
)
{}
rpc
Continue
(
PBGameContinue
)
returns
(
UnsignTx
)
{}
//游戏结束
//游戏结束
rpc
Quit
(
PBGameQuit
)
returns
(
UnsignTx
)
{}
rpc
Quit
(
PBGameQuit
)
returns
(
UnsignTx
)
{}
}
}
plugin/dapp/privacy/proto/privacy.proto
View file @
820571b3
...
@@ -11,433 +11,461 @@ import "wallet.proto";
...
@@ -11,433 +11,461 @@ import "wallet.proto";
// start/////////////////////////////////////////////////////
// start/////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
message
PrivacyAction
{
message
PrivacyAction
{
oneof
value
{
oneof
value
{
Public2Privacy
public2privacy
=
1
;
Public2Privacy
public2privacy
=
1
;
Privacy2Privacy
privacy2privacy
=
2
;
Privacy2Privacy
privacy2privacy
=
2
;
Privacy2Public
privacy2public
=
3
;
Privacy2Public
privacy2public
=
3
;
}
}
int32
ty
=
4
;
int32
ty
=
4
;
}
}
message
Public2Privacy
{
message
Public2Privacy
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
5
;
string
note
=
5
;
PrivacyOutput
output
=
7
;
PrivacyOutput
output
=
7
;
}
}
message
Privacy2Privacy
{
message
Privacy2Privacy
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
5
;
string
note
=
5
;
PrivacyInput
input
=
6
;
PrivacyInput
input
=
6
;
PrivacyOutput
output
=
7
;
PrivacyOutput
output
=
7
;
}
}
message
Privacy2Public
{
message
Privacy2Public
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
3
;
string
note
=
3
;
PrivacyInput
input
=
4
;
PrivacyInput
input
=
4
;
PrivacyOutput
output
=
5
;
PrivacyOutput
output
=
5
;
}
}
message
UTXOGlobalIndex
{
message
UTXOGlobalIndex
{
// int64 height = 1;
// int64 height = 1;
// int32 txindex = 2;
// int32 txindex = 2;
bytes
txhash
=
3
;
bytes
txhash
=
3
;
int32
outindex
=
4
;
int32
outindex
=
4
;
}
}
// privacy input
// privacy input
message
KeyInput
{
message
KeyInput
{
int64
amount
=
1
;
int64
amount
=
1
;
repeated
UTXOGlobalIndex
utxoGlobalIndex
=
2
;
repeated
UTXOGlobalIndex
utxoGlobalIndex
=
2
;
bytes
keyImage
=
3
;
bytes
keyImage
=
3
;
}
}
message
PrivacyInput
{
repeated
KeyInput
keyinput
=
1
;
}
message
PrivacyInput
{
repeated
KeyInput
keyinput
=
1
;
}
// privacy output
// privacy output
message
keyOutput
{
message
keyOutput
{
int64
amount
=
1
;
int64
amount
=
1
;
bytes
onetimepubkey
=
2
;
bytes
onetimepubkey
=
2
;
}
}
message
PrivacyOutput
{
message
PrivacyOutput
{
bytes
RpubKeytx
=
1
;
bytes
RpubKeytx
=
1
;
repeated
keyOutput
keyoutput
=
2
;
repeated
keyOutput
keyoutput
=
2
;
}
}
message
GroupUTXOGlobalIndex
{
message
GroupUTXOGlobalIndex
{
int64
amount
=
1
;
int64
amount
=
1
;
repeated
UTXOGlobalIndex
utxoGlobalIndex
=
2
;
repeated
UTXOGlobalIndex
utxoGlobalIndex
=
2
;
}
}
message
LocalUTXOItem
{
message
LocalUTXOItem
{
int64
height
=
1
;
int64
height
=
1
;
int32
txindex
=
2
;
int32
txindex
=
2
;
int32
outindex
=
3
;
int32
outindex
=
3
;
bytes
txhash
=
4
;
bytes
txhash
=
4
;
bytes
onetimepubkey
=
5
;
bytes
onetimepubkey
=
5
;
}
}
message
ReqUTXOPubKeys
{
message
ReqUTXOPubKeys
{
string
tokenName
=
1
;
string
tokenName
=
1
;
repeated
GroupUTXOGlobalIndex
groupUTXOGlobalIndex
=
2
;
repeated
GroupUTXOGlobalIndex
groupUTXOGlobalIndex
=
2
;
}
}
// 一个公钥信息
// 一个公钥信息
message
PublicKeyData
{
repeated
bytes
data
=
1
;
}
message
PublicKeyData
{
repeated
bytes
data
=
1
;
}
message
GroupUTXOPubKey
{
message
GroupUTXOPubKey
{
int64
amount
=
1
;
int64
amount
=
1
;
// 输出签名的所有公钥
// 输出签名的所有公钥
repeated
bytes
pubkey
=
2
;
repeated
bytes
pubkey
=
2
;
}
}
message
ResUTXOPubKeys
{
repeated
GroupUTXOPubKey
groupUTXOPubKeys
=
1
;
}
message
ResUTXOPubKeys
{
repeated
GroupUTXOPubKey
groupUTXOPubKeys
=
1
;
}
message
ReqPrivacyToken
{
message
ReqPrivacyToken
{
string
token
=
1
;
string
token
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
}
}
message
AmountDetail
{
message
AmountDetail
{
int64
amount
=
1
;
int64
amount
=
1
;
int64
count
=
2
;
int64
count
=
2
;
}
}
message
ReplyPrivacyAmounts
{
repeated
AmountDetail
amountDetail
=
1
;
}
message
ReplyPrivacyAmounts
{
repeated
AmountDetail
amountDetail
=
1
;
}
message
replyUTXOsOfAmount
{
repeated
LocalUTXOItem
localUTXOItems
=
1
;
}
message
replyUTXOsOfAmount
{
repeated
LocalUTXOItem
localUTXOItems
=
1
;
}
message
ReceiptPrivacyOutput
{
message
ReceiptPrivacyOutput
{
string
token
=
1
;
string
token
=
1
;
repeated
keyOutput
keyoutput
=
2
;
repeated
keyOutput
keyoutput
=
2
;
}
}
//各种amount额度的UTXO在链上的数量
//各种amount额度的UTXO在链上的数量
message
AmountsOfUTXO
{
map
<
int64
,
int64
>
amountMap
=
1
;
}
message
AmountsOfUTXO
{
map
<
int64
,
int64
>
amountMap
=
1
;
}
message
TokenNamesOfUTXO
{
map
<
string
,
string
>
tokensMap
=
1
;
}
message
TokenNamesOfUTXO
{
map
<
string
,
string
>
tokensMap
=
1
;
}
// 用以转换成json后继续可见的结构
// 用以转换成json后继续可见的结构
message
UTXOGlobalIndex4Print
{
message
UTXOGlobalIndex4Print
{
string
txhash
=
1
;
string
txhash
=
1
;
int32
outindex
=
2
;
int32
outindex
=
2
;
}
}
message
KeyInput4Print
{
message
KeyInput4Print
{
int64
amount
=
1
;
int64
amount
=
1
;
repeated
UTXOGlobalIndex4Print
utxoGlobalIndex
=
2
;
repeated
UTXOGlobalIndex4Print
utxoGlobalIndex
=
2
;
string
keyImage
=
3
;
string
keyImage
=
3
;
}
}
message
keyOutput4Print
{
message
keyOutput4Print
{
int64
amount
=
1
;
int64
amount
=
1
;
string
onetimepubkey
=
2
;
string
onetimepubkey
=
2
;
}
}
message
PrivacyInput4Print
{
repeated
KeyInput4Print
keyinput
=
1
;
}
message
PrivacyInput4Print
{
repeated
KeyInput4Print
keyinput
=
1
;
}
message
PrivacyOutput4Print
{
message
PrivacyOutput4Print
{
string
RpubKeytx
=
1
;
string
RpubKeytx
=
1
;
repeated
keyOutput4Print
keyoutput
=
2
;
repeated
keyOutput4Print
keyoutput
=
2
;
}
}
message
Public2Privacy4Print
{
message
Public2Privacy4Print
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
5
;
string
note
=
5
;
PrivacyOutput4Print
output
=
7
;
PrivacyOutput4Print
output
=
7
;
}
}
message
Privacy2Privacy4Print
{
message
Privacy2Privacy4Print
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
5
;
string
note
=
5
;
PrivacyInput4Print
input
=
6
;
PrivacyInput4Print
input
=
6
;
PrivacyOutput4Print
output
=
7
;
PrivacyOutput4Print
output
=
7
;
}
}
message
Privacy2Public4Print
{
message
Privacy2Public4Print
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
3
;
string
note
=
3
;
PrivacyInput4Print
input
=
4
;
PrivacyInput4Print
input
=
4
;
PrivacyOutput4Print
output
=
5
;
PrivacyOutput4Print
output
=
5
;
}
}
message
PrivacyAction4Print
{
message
PrivacyAction4Print
{
oneof
value
{
oneof
value
{
Public2Privacy4Print
public2privacy
=
1
;
Public2Privacy4Print
public2privacy
=
1
;
Privacy2Privacy4Print
privacy2privacy
=
2
;
Privacy2Privacy4Print
privacy2privacy
=
2
;
Privacy2Public4Print
privacy2public
=
3
;
Privacy2Public4Print
privacy2public
=
3
;
}
}
int32
ty
=
4
;
int32
ty
=
4
;
}
}
message
ReqPub2Pri
{
message
ReqPub2Pri
{
//接收人可见公钥A
//接收人可见公钥A
// string viewPublic = 1;
// string viewPublic = 1;
//接收人花费公钥B
//接收人花费公钥B
// string spendPublic = 2;
// string spendPublic = 2;
string
tokenname
=
3
;
string
tokenname
=
3
;
int64
amount
=
4
;
int64
amount
=
4
;
string
note
=
5
;
string
note
=
5
;
//发送人地址
//发送人地址
string
sender
=
6
;
string
sender
=
6
;
int32
mixin
=
7
;
int32
mixin
=
7
;
string
pubkeypair
=
8
;
string
pubkeypair
=
8
;
int64
expire
=
9
;
int64
expire
=
9
;
}
}
message
ReqPri2Pri
{
message
ReqPri2Pri
{
//接收人可见公钥A
//接收人可见公钥A
// string viewPublic = 1; //A
// string viewPublic = 1; //A
//接收人花费公钥B
//接收人花费公钥B
// string spendPublic = 2; //B
// string spendPublic = 2; //B
string
tokenname
=
3
;
string
tokenname
=
3
;
int64
amount
=
4
;
int64
amount
=
4
;
string
note
=
5
;
string
note
=
5
;
//隐私交易发起人地址
//隐私交易发起人地址
string
sender
=
6
;
string
sender
=
6
;
int32
mixin
=
7
;
int32
mixin
=
7
;
// string txhash = 7;
// string txhash = 7;
string
pubkeypair
=
8
;
string
pubkeypair
=
8
;
int64
expire
=
9
;
int64
expire
=
9
;
}
}
message
ReqPri2Pub
{
message
ReqPri2Pub
{
string
receiver
=
1
;
string
receiver
=
1
;
string
tokenname
=
2
;
string
tokenname
=
2
;
int64
amount
=
3
;
int64
amount
=
3
;
string
note
=
4
;
string
note
=
4
;
//隐私交易发起人地址
//隐私交易发起人地址
string
sender
=
5
;
string
sender
=
5
;
int32
mixin
=
6
;
int32
mixin
=
6
;
// string txhash = 6;
// string txhash = 6;
int64
expire
=
7
;
int64
expire
=
7
;
}
}
message
ReqCreateUTXOs
{
message
ReqCreateUTXOs
{
// string viewPublic = 1; //接收人可见公钥A
// string viewPublic = 1; //接收人可见公钥A
// string spendPublic = 2; //接收人花费公钥B
// string spendPublic = 2; //接收人花费公钥B
string
tokenname
=
3
;
string
tokenname
=
3
;
int64
amount
=
4
;
int64
amount
=
4
;
string
note
=
5
;
string
note
=
5
;
string
sender
=
6
;
//发送人地址
string
sender
=
6
;
//发送人地址
int32
count
=
7
;
int32
count
=
7
;
string
pubkeypair
=
8
;
string
pubkeypair
=
8
;
int64
expire
=
9
;
int64
expire
=
9
;
}
}
message
ReplyPrivacyPkPair
{
message
ReplyPrivacyPkPair
{
bool
showSuccessful
=
1
;
bool
showSuccessful
=
1
;
// string viewPub = 2;
// string viewPub = 2;
// string spendPub = 3;
// string spendPub = 3;
string
pubkeypair
=
4
;
string
pubkeypair
=
4
;
}
}
message
ReqPrivBal4AddrToken
{
message
ReqPrivBal4AddrToken
{
string
addr
=
1
;
string
addr
=
1
;
string
token
=
2
;
string
token
=
2
;
}
}
message
ReplyPrivacyBalance
{
message
ReplyPrivacyBalance
{
string
onetimeaddr
=
1
;
string
onetimeaddr
=
1
;
int64
balance
=
2
;
int64
balance
=
2
;
}
}
message
PrivacyDBStore
{
message
PrivacyDBStore
{
bytes
txhash
=
1
;
bytes
txhash
=
1
;
string
tokenname
=
2
;
string
tokenname
=
2
;
int64
amount
=
3
;
int64
amount
=
3
;
int32
outIndex
=
4
;
int32
outIndex
=
4
;
bytes
txPublicKeyR
=
5
;
bytes
txPublicKeyR
=
5
;
bytes
onetimePublicKey
=
6
;
bytes
onetimePublicKey
=
6
;
string
owner
=
7
;
string
owner
=
7
;
int64
height
=
8
;
int64
height
=
8
;
int32
txindex
=
9
;
int32
txindex
=
9
;
bytes
blockhash
=
10
;
bytes
blockhash
=
10
;
}
}
message
UTXO
{
message
UTXO
{
int64
amount
=
1
;
int64
amount
=
1
;
UTXOBasic
utxoBasic
=
2
;
UTXOBasic
utxoBasic
=
2
;
}
}
message
UTXOHaveTxHash
{
message
UTXOHaveTxHash
{
int64
amount
=
1
;
int64
amount
=
1
;
string
txHash
=
2
;
string
txHash
=
2
;
UTXOBasic
utxoBasic
=
3
;
UTXOBasic
utxoBasic
=
3
;
}
}
message
UTXOs
{
repeated
UTXO
utxos
=
1
;
}
message
UTXOs
{
repeated
UTXO
utxos
=
1
;
}
message
UTXOHaveTxHashs
{
repeated
UTXOHaveTxHash
utxoHaveTxHashs
=
1
;
}
message
UTXOHaveTxHashs
{
repeated
UTXOHaveTxHash
utxoHaveTxHashs
=
1
;
}
message
ReqUTXOGlobalIndex
{
message
ReqUTXOGlobalIndex
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int32
mixCount
=
2
;
int32
mixCount
=
2
;
repeated
int64
amount
=
3
;
repeated
int64
amount
=
3
;
}
}
message
UTXOBasic
{
message
UTXOBasic
{
UTXOGlobalIndex
utxoGlobalIndex
=
1
;
UTXOGlobalIndex
utxoGlobalIndex
=
1
;
bytes
onetimePubkey
=
2
;
bytes
onetimePubkey
=
2
;
}
}
message
UTXOIndex4Amount
{
message
UTXOIndex4Amount
{
int64
amount
=
1
;
int64
amount
=
1
;
repeated
UTXOBasic
utxos
=
2
;
repeated
UTXOBasic
utxos
=
2
;
}
}
message
ResUTXOGlobalIndex
{
message
ResUTXOGlobalIndex
{
string
tokenname
=
1
;
string
tokenname
=
1
;
int32
mixCount
=
2
;
int32
mixCount
=
2
;
repeated
UTXOIndex4Amount
utxoIndex4Amount
=
3
;
repeated
UTXOIndex4Amount
utxoIndex4Amount
=
3
;
}
}
message
FTXOsSTXOsInOneTx
{
message
FTXOsSTXOsInOneTx
{
string
tokenname
=
1
;
string
tokenname
=
1
;
string
sender
=
2
;
string
sender
=
2
;
// FTXO的超期,设定原则与Transaction.expire一致
// FTXO的超期,设定原则与Transaction.expire一致
int64
expire
=
3
;
int64
expire
=
3
;
string
txhash
=
4
;
string
txhash
=
4
;
repeated
UTXO
utxos
=
5
;
repeated
UTXO
utxos
=
5
;
}
}
message
RealKeyInput
{
message
RealKeyInput
{
int32
realinputkey
=
1
;
int32
realinputkey
=
1
;
bytes
onetimeprivkey
=
2
;
bytes
onetimeprivkey
=
2
;
}
}
message
UTXOBasics
{
repeated
UTXOBasic
utxos
=
1
;
}
message
UTXOBasics
{
repeated
UTXOBasic
utxos
=
1
;
}
message
CreateTransactionCache
{
message
CreateTransactionCache
{
bytes
key
=
1
;
bytes
key
=
1
;
// 记录创建时间,用以处理过期的交易
// 记录创建时间,用以处理过期的交易
int64
createtime
=
2
;
int64
createtime
=
2
;
// 记录签名成功的时间,用以处理过期交易
// 记录签名成功的时间,用以处理过期交易
int64
signtime
=
3
;
int64
signtime
=
3
;
// 缓存状态
// 缓存状态
// 0 - 创建状态
// 0 - 创建状态
// 1 - 已经签名状态
// 1 - 已经签名状态
int32
status
=
4
;
int32
status
=
4
;
//
//
Transaction
transaction
=
5
;
Transaction
transaction
=
5
;
string
sender
=
6
;
string
sender
=
6
;
repeated
RealKeyInput
realkeyinput
=
7
;
repeated
RealKeyInput
realkeyinput
=
7
;
repeated
UTXOBasics
utxos
=
8
;
repeated
UTXOBasics
utxos
=
8
;
string
tokenname
=
9
;
string
tokenname
=
9
;
}
}
message
ReqCacheTxList
{
message
ReqCacheTxList
{
string
addr
=
1
;
string
addr
=
1
;
string
tokenname
=
2
;
string
tokenname
=
2
;
}
}
message
ReplyCacheTxList
{
repeated
Transaction
txs
=
1
;
}
message
ReplyCacheTxList
{
repeated
Transaction
txs
=
1
;
}
message
ReqPrivacyAccount
{
message
ReqPrivacyAccount
{
string
tokenname
=
1
;
string
tokenname
=
1
;
string
addr
=
2
;
string
addr
=
2
;
}
}
message
ReqPPrivacyAccount
{
message
ReqPPrivacyAccount
{
string
addr
=
1
;
string
addr
=
1
;
string
token
=
2
;
string
token
=
2
;
// 设定显示的数据类型信息
// 设定显示的数据类型信息
// 0: 只显示账户的数值信息
// 0: 只显示账户的数值信息
// 1: 显示UTXO明细
// 1: 显示UTXO明细
// 2: 显示FTXO明细
// 2: 显示FTXO明细
// 3: 全部显示
// 3: 全部显示
int32
displaymode
=
3
;
int32
displaymode
=
3
;
}
}
// 请求隐私账户信息的应答
// 请求隐私账户信息的应答
message
ReplyPrivacyAccount
{
message
ReplyPrivacyAccount
{
// 未花费的UTXO
// 未花费的UTXO
UTXOs
utxos
=
1
;
UTXOs
utxos
=
1
;
// 冻结的UTXO
// 冻结的UTXO
UTXOs
ftxos
=
2
;
UTXOs
ftxos
=
2
;
int32
displaymode
=
3
;
int32
displaymode
=
3
;
}
}
message
ReqCreateCacheTxKey
{
message
ReqCreateCacheTxKey
{
string
tokenname
=
1
;
string
tokenname
=
1
;
bytes
hashkey
=
2
;
bytes
hashkey
=
2
;
}
}
// get privacy transaction list in wallet
// get privacy transaction list in wallet
message
ReqPrivacyTransactionList
{
message
ReqPrivacyTransactionList
{
// support BTY
// support BTY
string
tokenname
=
1
;
string
tokenname
=
1
;
// 1:sendtx 2:recvtx
// 1:sendtx 2:recvtx
int32
sendRecvFlag
=
2
;
int32
sendRecvFlag
=
2
;
int32
direction
=
3
;
int32
direction
=
3
;
int32
count
=
4
;
int32
count
=
4
;
string
from
=
5
;
string
from
=
5
;
string
address
=
6
;
string
address
=
6
;
bytes
seedtxhash
=
7
;
bytes
seedtxhash
=
7
;
}
}
message
ReqRescanUtxos
{
message
ReqRescanUtxos
{
repeated
string
addrs
=
1
;
repeated
string
addrs
=
1
;
int32
flag
=
2
;
int32
flag
=
2
;
}
}
message
RepRescanResult
{
message
RepRescanResult
{
string
addr
=
1
;
string
addr
=
1
;
int32
flag
=
2
;
int32
flag
=
2
;
}
}
message
RepRescanUtxos
{
message
RepRescanUtxos
{
int32
flag
=
1
;
int32
flag
=
1
;
repeated
RepRescanResult
repRescanResults
=
2
;
repeated
RepRescanResult
repRescanResults
=
2
;
}
}
message
ReqEnablePrivacy
{
repeated
string
addrs
=
2
;
}
message
ReqEnablePrivacy
{
repeated
string
addrs
=
2
;
}
message
PriAddrResult
{
message
PriAddrResult
{
string
addr
=
1
;
string
addr
=
1
;
bool
IsOK
=
2
;
bool
IsOK
=
2
;
string
msg
=
3
;
string
msg
=
3
;
}
}
message
RepEnablePrivacy
{
repeated
PriAddrResult
results
=
1
;
}
message
RepEnablePrivacy
{
repeated
PriAddrResult
results
=
1
;
}
// 隐私交易三步发送时,临时存储签名需要的数据信息结构
// 隐私交易三步发送时,临时存储签名需要的数据信息结构
message
PrivacySignatureParam
{
message
PrivacySignatureParam
{
int32
actionType
=
1
;
int32
actionType
=
1
;
repeated
UTXOBasics
utxobasics
=
2
;
repeated
UTXOBasics
utxobasics
=
2
;
repeated
RealKeyInput
realKeyInputs
=
3
;
repeated
RealKeyInput
realKeyInputs
=
3
;
}
}
message
WalletAccountPrivacy
{
message
WalletAccountPrivacy
{
bytes
viewPubkey
=
1
;
bytes
viewPubkey
=
1
;
bytes
viewPrivKey
=
2
;
bytes
viewPrivKey
=
2
;
bytes
spendPubkey
=
3
;
bytes
spendPubkey
=
3
;
bytes
spendPrivKey
=
4
;
bytes
spendPrivKey
=
4
;
}
}
service
privacy
{
service
privacy
{
// Privacy Trading
// Privacy Trading
// 显示指定地址的公钥对信息,可以作为后续交易参数
// 显示指定地址的公钥对信息,可以作为后续交易参数
rpc
ShowPrivacyKey
(
ReqString
)
returns
(
ReplyPrivacyPkPair
)
{}
rpc
ShowPrivacyKey
(
ReqString
)
returns
(
ReplyPrivacyPkPair
)
{}
// 创建一系列UTXO
// 创建一系列UTXO
rpc
CreateUTXOs
(
ReqCreateUTXOs
)
returns
(
Reply
)
{}
rpc
CreateUTXOs
(
ReqCreateUTXOs
)
returns
(
Reply
)
{}
// 将资金从公开到隐私转移
// 将资金从公开到隐私转移
rpc
MakeTxPublic2Privacy
(
ReqPub2Pri
)
returns
(
Reply
)
{}
rpc
MakeTxPublic2Privacy
(
ReqPub2Pri
)
returns
(
Reply
)
{}
// 将资产从隐私到隐私进行转移
// 将资产从隐私到隐私进行转移
rpc
MakeTxPrivacy2Privacy
(
ReqPri2Pri
)
returns
(
Reply
)
{}
rpc
MakeTxPrivacy2Privacy
(
ReqPri2Pri
)
returns
(
Reply
)
{}
// 将资产从隐私到公开进行转移
// 将资产从隐私到公开进行转移
rpc
MakeTxPrivacy2Public
(
ReqPri2Pub
)
returns
(
Reply
)
{}
rpc
MakeTxPrivacy2Public
(
ReqPri2Pub
)
returns
(
Reply
)
{}
// 扫描UTXO以及获取扫描UTXO后的状态
// 扫描UTXO以及获取扫描UTXO后的状态
rpc
RescanUtxos
(
ReqRescanUtxos
)
returns
(
RepRescanUtxos
)
{}
rpc
RescanUtxos
(
ReqRescanUtxos
)
returns
(
RepRescanUtxos
)
{}
// 使能隐私账户
// 使能隐私账户
rpc
EnablePrivacy
(
ReqEnablePrivacy
)
returns
(
RepEnablePrivacy
)
{}
rpc
EnablePrivacy
(
ReqEnablePrivacy
)
returns
(
RepEnablePrivacy
)
{}
// 创建隐私交易
// 创建隐私交易
rpc
CreateRawTransaction
(
ReqCreateTransaction
)
returns
(
Transaction
)
{}
rpc
CreateRawTransaction
(
ReqCreateTransaction
)
returns
(
Transaction
)
{}
}
}
\ No newline at end of file
plugin/dapp/relay/proto/relay.proto
View file @
820571b3
...
@@ -2,204 +2,212 @@ syntax = "proto3";
...
@@ -2,204 +2,212 @@ syntax = "proto3";
package
types
;
package
types
;
enum
RelayOrderStatus
{
enum
RelayOrderStatus
{
init
=
0
;
init
=
0
;
pending
=
1
;
pending
=
1
;
locking
=
2
;
locking
=
2
;
confirming
=
3
;
confirming
=
3
;
finished
=
4
;
finished
=
4
;
canceled
=
5
;
canceled
=
5
;
timeout
=
6
;
// TODO: may not needed?
timeout
=
6
;
// TODO: may not needed?
}
}
message
RelayAction
{
message
RelayAction
{
oneof
value
{
oneof
value
{
RelayCreate
create
=
1
;
RelayCreate
create
=
1
;
RelayAccept
accept
=
2
;
RelayAccept
accept
=
2
;
RelayRevoke
revoke
=
3
;
RelayRevoke
revoke
=
3
;
RelayConfirmTx
confirmTx
=
4
;
RelayConfirmTx
confirmTx
=
4
;
RelayVerify
verify
=
5
;
RelayVerify
verify
=
5
;
RelayVerifyCli
verifyCli
=
6
;
RelayVerifyCli
verifyCli
=
6
;
BtcHeaders
btcHeaders
=
7
;
BtcHeaders
btcHeaders
=
7
;
}
}
int32
ty
=
10
;
int32
ty
=
10
;
}
}
message
RelayOrder
{
message
RelayOrder
{
string
id
=
1
;
string
id
=
1
;
RelayOrderStatus
status
=
2
;
RelayOrderStatus
status
=
2
;
RelayOrderStatus
preStatus
=
3
;
RelayOrderStatus
preStatus
=
3
;
uint64
amount
=
4
;
uint64
amount
=
4
;
string
createrAddr
=
5
;
string
createrAddr
=
5
;
uint32
coinOperation
=
6
;
uint32
coinOperation
=
6
;
string
coin
=
7
;
string
coin
=
7
;
uint64
coinAmount
=
8
;
uint64
coinAmount
=
8
;
string
coinAddr
=
9
;
string
coinAddr
=
9
;
string
coinTxHash
=
10
;
string
coinTxHash
=
10
;
int64
createTime
=
11
;
int64
createTime
=
11
;
string
acceptAddr
=
12
;
string
acceptAddr
=
12
;
int64
acceptTime
=
13
;
int64
acceptTime
=
13
;
int64
confirmTime
=
14
;
int64
confirmTime
=
14
;
int64
finishTime
=
15
;
int64
finishTime
=
15
;
string
finishTxHash
=
16
;
string
finishTxHash
=
16
;
int64
height
=
17
;
int64
height
=
17
;
uint64
coinHeight
=
18
;
uint64
coinHeight
=
18
;
uint32
coinWaits
=
19
;
uint32
coinWaits
=
19
;
}
}
message
RelayCreate
{
message
RelayCreate
{
uint32
operation
=
1
;
// 0: buy, 1: sell
uint32
operation
=
1
;
// 0: buy, 1: sell
string
coin
=
2
;
// outside coin BTC, ETH...
string
coin
=
2
;
// outside coin BTC, ETH...
uint64
amount
=
3
;
uint64
amount
=
3
;
string
addr
=
4
;
string
addr
=
4
;
uint64
btyAmount
=
5
;
uint64
btyAmount
=
5
;
uint32
coinWaits
=
6
;
// the coin blocks to wait
uint32
coinWaits
=
6
;
// the coin blocks to wait
}
}
message
RelayAccept
{
message
RelayAccept
{
string
orderId
=
1
;
string
orderId
=
1
;
string
coinAddr
=
2
;
// for sell coin case needed
string
coinAddr
=
2
;
// for sell coin case needed
uint32
coinWaits
=
3
;
uint32
coinWaits
=
3
;
}
}
message
RelayRevoke
{
message
RelayRevoke
{
string
orderId
=
1
;
string
orderId
=
1
;
uint32
target
=
2
;
// 0:create , 1: accept
uint32
target
=
2
;
// 0:create , 1: accept
uint32
action
=
3
;
// 0: unlock, 1: cancel (only for creator)
uint32
action
=
3
;
// 0: unlock, 1: cancel (only for creator)
}
}
//客户只用交易hash提交, 验证需要的其他信息由relayd提供
//客户只用交易hash提交, 验证需要的其他信息由relayd提供
message
RelayConfirmTx
{
message
RelayConfirmTx
{
string
orderId
=
1
;
string
orderId
=
1
;
string
txHash
=
2
;
string
txHash
=
2
;
}
}
// relayd提供验证信息
// relayd提供验证信息
message
RelayVerify
{
message
RelayVerify
{
string
orderId
=
1
;
string
orderId
=
1
;
BtcTransaction
tx
=
2
;
BtcTransaction
tx
=
2
;
BtcSpv
spv
=
3
;
BtcSpv
spv
=
3
;
}
}
message
RelayVerifyCli
{
message
RelayVerifyCli
{
string
orderId
=
1
;
string
orderId
=
1
;
string
rawTx
=
2
;
string
rawTx
=
2
;
uint32
txIndex
=
3
;
uint32
txIndex
=
3
;
string
merkBranch
=
4
;
string
merkBranch
=
4
;
string
blockHash
=
5
;
string
blockHash
=
5
;
}
}
message
BtcHeader
{
message
BtcHeader
{
string
hash
=
1
;
string
hash
=
1
;
uint64
confirmations
=
2
;
uint64
confirmations
=
2
;
uint64
height
=
3
;
uint64
height
=
3
;
uint32
version
=
4
;
uint32
version
=
4
;
string
merkleRoot
=
5
;
string
merkleRoot
=
5
;
int64
time
=
6
;
int64
time
=
6
;
uint64
nonce
=
7
;
uint64
nonce
=
7
;
int64
bits
=
8
;
int64
bits
=
8
;
int64
difficulty
=
9
;
int64
difficulty
=
9
;
string
previousHash
=
10
;
string
previousHash
=
10
;
string
nextHash
=
11
;
string
nextHash
=
11
;
bool
isReset
=
12
;
// 0: nomal btc headers sync (default), 1: set the base
bool
isReset
=
12
;
// 0: nomal btc headers sync (default), 1: set the base
// head (may not from 1)
// head (may not from 1)
}
}
message
BtcHeaders
{
repeated
BtcHeader
btcHeader
=
1
;
}
message
BtcHeaders
{
repeated
BtcHeader
btcHeader
=
1
;
}
message
BtcTransaction
{
message
BtcTransaction
{
string
hash
=
1
;
// txhash
string
hash
=
1
;
// txhash
uint64
blockHeight
=
2
;
uint64
blockHeight
=
2
;
repeated
Vin
vin
=
3
;
repeated
Vin
vin
=
3
;
repeated
Vout
vout
=
4
;
repeated
Vout
vout
=
4
;
int64
time
=
5
;
int64
time
=
5
;
uint64
confirmations
=
6
;
uint64
confirmations
=
6
;
}
}
message
Vin
{
message
Vin
{
string
address
=
1
;
string
address
=
1
;
uint64
Value
=
2
;
uint64
Value
=
2
;
}
}
message
Vout
{
message
Vout
{
bool
coinbase
=
1
;
bool
coinbase
=
1
;
string
address
=
2
;
string
address
=
2
;
uint64
Value
=
3
;
uint64
Value
=
3
;
}
}
message
BtcSpv
{
message
BtcSpv
{
string
hash
=
1
;
// txhash
string
hash
=
1
;
// txhash
int64
time
=
2
;
int64
time
=
2
;
uint64
height
=
3
;
uint64
height
=
3
;
string
blockHash
=
4
;
string
blockHash
=
4
;
uint32
txIndex
=
5
;
uint32
txIndex
=
5
;
repeated
bytes
branchProof
=
6
;
repeated
bytes
branchProof
=
6
;
}
}
message
RelayLastRcvBtcHeader
{
message
RelayLastRcvBtcHeader
{
BtcHeader
Header
=
1
;
BtcHeader
Header
=
1
;
uint64
baseHeight
=
2
;
uint64
baseHeight
=
2
;
}
}
message
ReceiptRelayRcvBTCHeaders
{
message
ReceiptRelayRcvBTCHeaders
{
repeated
BtcHeader
headers
=
1
;
repeated
BtcHeader
headers
=
1
;
uint64
lastHeight
=
2
;
// last height is the last btc Tx's last height
uint64
lastHeight
=
2
;
// last height is the last btc Tx's last height
uint64
newHeight
=
3
;
uint64
newHeight
=
3
;
uint64
lastBaseHeight
=
4
;
// last base height means ever base height
uint64
lastBaseHeight
=
4
;
// last base height means ever base height
uint64
newBaseHeight
=
5
;
uint64
newBaseHeight
=
5
;
}
}
message
ReceiptRelayLog
{
message
ReceiptRelayLog
{
string
orderId
=
1
;
string
orderId
=
1
;
string
curStatus
=
2
;
string
curStatus
=
2
;
string
preStatus
=
3
;
string
preStatus
=
3
;
string
txAmount
=
4
;
string
txAmount
=
4
;
string
createrAddr
=
5
;
string
createrAddr
=
5
;
string
coinOperation
=
6
;
string
coinOperation
=
6
;
string
coin
=
7
;
string
coin
=
7
;
string
coinAmount
=
8
;
string
coinAmount
=
8
;
string
coinAddr
=
9
;
string
coinAddr
=
9
;
string
coinTxHash
=
10
;
string
coinTxHash
=
10
;
int64
createTime
=
11
;
int64
createTime
=
11
;
string
acceptAddr
=
12
;
string
acceptAddr
=
12
;
int64
acceptTime
=
13
;
int64
acceptTime
=
13
;
int64
confirmTime
=
14
;
int64
confirmTime
=
14
;
int64
finishTime
=
15
;
int64
finishTime
=
15
;
string
finishTxHash
=
16
;
string
finishTxHash
=
16
;
uint64
coinHeight
=
17
;
uint64
coinHeight
=
17
;
uint32
coinWaits
=
18
;
uint32
coinWaits
=
18
;
}
}
message
ReqRelayAddrCoins
{
message
ReqRelayAddrCoins
{
string
addr
=
1
;
string
addr
=
1
;
RelayOrderStatus
status
=
2
;
RelayOrderStatus
status
=
2
;
repeated
string
coins
=
3
;
repeated
string
coins
=
3
;
int32
pageNumber
=
4
;
int32
pageNumber
=
4
;
int32
pageSize
=
5
;
int32
pageSize
=
5
;
}
}
message
ReplyRelayOrders
{
repeated
RelayOrder
relayorders
=
1
;
}
message
ReplyRelayOrders
{
repeated
RelayOrder
relayorders
=
1
;
}
message
QueryRelayOrderParam
{
message
QueryRelayOrderParam
{
RelayOrderStatus
status
=
1
;
RelayOrderStatus
status
=
1
;
string
orderId
=
2
;
string
orderId
=
2
;
}
}
message
QueryRelayOrderResult
{
repeated
RelayOrder
orders
=
1
;
}
message
QueryRelayOrderResult
{
repeated
RelayOrder
orders
=
1
;
}
message
ReqRelayBtcHeaderHeightList
{
message
ReqRelayBtcHeaderHeightList
{
int64
reqHeight
=
1
;
int64
reqHeight
=
1
;
int32
counts
=
2
;
int32
counts
=
2
;
int32
direction
=
3
;
// 0: desc, 1: asc
int32
direction
=
3
;
// 0: desc, 1: asc
}
}
message
ReplyRelayBtcHeadHeightList
{
repeated
int64
heights
=
1
;
}
message
ReplyRelayBtcHeadHeightList
{
repeated
int64
heights
=
1
;
}
message
ReqRelayQryBTCHeadHeight
{
message
ReqRelayQryBTCHeadHeight
{
int64
baseHeight
=
1
;
// from the baseHeight begin, if any
int64
baseHeight
=
1
;
// from the baseHeight begin, if any
}
}
message
ReplayRelayQryBTCHeadHeight
{
message
ReplayRelayQryBTCHeadHeight
{
int64
curHeight
=
1
;
// current height in chain
int64
curHeight
=
1
;
// current height in chain
int64
baseHeight
=
2
;
// base height means the the 1st head record in chain db
int64
baseHeight
=
2
;
// base height means the the 1st head record in chain db
// (base height can be change)
// (base height can be change)
}
}
\ No newline at end of file
plugin/dapp/retrieve/proto/retrieve.proto
View file @
820571b3
...
@@ -6,70 +6,70 @@ package types;
...
@@ -6,70 +6,70 @@ package types;
// message for retrieve start
// message for retrieve start
message
RetrievePara
{
message
RetrievePara
{
string
defaultAddress
=
1
;
string
defaultAddress
=
1
;
int32
status
=
2
;
int32
status
=
2
;
int64
createTime
=
3
;
int64
createTime
=
3
;
int64
prepareTime
=
4
;
int64
prepareTime
=
4
;
int64
delayPeriod
=
5
;
int64
delayPeriod
=
5
;
}
}
message
Retrieve
{
message
Retrieve
{
// used as key
// used as key
string
backupAddress
=
1
;
string
backupAddress
=
1
;
repeated
RetrievePara
retPara
=
2
;
repeated
RetrievePara
retPara
=
2
;
}
}
message
RetrieveAction
{
message
RetrieveAction
{
oneof
value
{
oneof
value
{
PrepareRetrieve
prepare
=
1
;
PrepareRetrieve
prepare
=
1
;
PerformRetrieve
perform
=
2
;
PerformRetrieve
perform
=
2
;
BackupRetrieve
backup
=
3
;
BackupRetrieve
backup
=
3
;
CancelRetrieve
cancel
=
4
;
CancelRetrieve
cancel
=
4
;
}
}
int32
ty
=
5
;
int32
ty
=
5
;
}
}
message
BackupRetrieve
{
message
BackupRetrieve
{
string
backupAddress
=
1
;
string
backupAddress
=
1
;
string
defaultAddress
=
2
;
string
defaultAddress
=
2
;
int64
delayPeriod
=
3
;
int64
delayPeriod
=
3
;
}
}
message
PrepareRetrieve
{
message
PrepareRetrieve
{
string
backupAddress
=
1
;
string
backupAddress
=
1
;
string
defaultAddress
=
2
;
string
defaultAddress
=
2
;
}
}
message
PerformRetrieve
{
message
PerformRetrieve
{
string
backupAddress
=
1
;
string
backupAddress
=
1
;
string
defaultAddress
=
2
;
string
defaultAddress
=
2
;
}
}
message
CancelRetrieve
{
message
CancelRetrieve
{
string
backupAddress
=
1
;
string
backupAddress
=
1
;
string
defaultAddress
=
2
;
string
defaultAddress
=
2
;
}
}
message
ReqRetrieveInfo
{
message
ReqRetrieveInfo
{
string
backupAddress
=
1
;
string
backupAddress
=
1
;
string
defaultAddress
=
2
;
string
defaultAddress
=
2
;
}
}
message
RetrieveQuery
{
message
RetrieveQuery
{
string
backupAddress
=
1
;
string
backupAddress
=
1
;
string
defaultAddress
=
2
;
string
defaultAddress
=
2
;
int64
delayPeriod
=
3
;
int64
delayPeriod
=
3
;
int64
prepareTime
=
4
;
int64
prepareTime
=
4
;
int64
remainTime
=
5
;
int64
remainTime
=
5
;
int32
status
=
6
;
int32
status
=
6
;
}
}
// retrieve 对外提供服务的接口
// retrieve 对外提供服务的接口
service
retrieve
{
service
retrieve
{
rpc
Prepare
(
PrepareRetrieve
)
returns
(
UnsignTx
)
{}
rpc
Prepare
(
PrepareRetrieve
)
returns
(
UnsignTx
)
{}
rpc
Perform
(
PerformRetrieve
)
returns
(
UnsignTx
)
{}
rpc
Perform
(
PerformRetrieve
)
returns
(
UnsignTx
)
{}
rpc
Backup
(
BackupRetrieve
)
returns
(
UnsignTx
)
{}
rpc
Backup
(
BackupRetrieve
)
returns
(
UnsignTx
)
{}
rpc
Cancel
(
CancelRetrieve
)
returns
(
UnsignTx
)
{}
rpc
Cancel
(
CancelRetrieve
)
returns
(
UnsignTx
)
{}
}
}
//
message
for
retrieve
end
//
message
for
retrieve
end
\ No newline at end of file
plugin/dapp/ticket/proto/ticket.proto
View file @
820571b3
...
@@ -4,123 +4,131 @@ package types;
...
@@ -4,123 +4,131 @@ package types;
import
"common.proto"
;
import
"common.proto"
;
message
Ticket
{
message
Ticket
{
string
ticketId
=
1
;
string
ticketId
=
1
;
// 0 -> 未成熟 1 -> 可挖矿 2 -> 已挖成功 3-> 已关闭
// 0 -> 未成熟 1 -> 可挖矿 2 -> 已挖成功 3-> 已关闭
int32
status
=
2
;
int32
status
=
2
;
// genesis 创建的私钥比较特殊
// genesis 创建的私钥比较特殊
bool
isGenesis
=
3
;
bool
isGenesis
=
3
;
//创建时间
//创建时间
int64
createTime
=
4
;
int64
createTime
=
4
;
//挖矿时间
//挖矿时间
int64
minerTime
=
5
;
int64
minerTime
=
5
;
//挖到的币的数目
//挖到的币的数目
int64
minerValue
=
8
;
int64
minerValue
=
8
;
string
minerAddress
=
6
;
string
minerAddress
=
6
;
// return wallet
// return wallet
string
returnAddress
=
7
;
string
returnAddress
=
7
;
}
}
// message for execs.ticket
// message for execs.ticket
message
TicketAction
{
message
TicketAction
{
oneof
value
{
oneof
value
{
TicketBind
tbind
=
5
;
TicketBind
tbind
=
5
;
TicketOpen
topen
=
1
;
TicketOpen
topen
=
1
;
TicketGenesis
genesis
=
2
;
TicketGenesis
genesis
=
2
;
TicketClose
tclose
=
3
;
TicketClose
tclose
=
3
;
TicketMiner
miner
=
4
;
TicketMiner
miner
=
4
;
}
}
int32
ty
=
10
;
int32
ty
=
10
;
}
}
message
TicketMiner
{
message
TicketMiner
{
uint32
bits
=
1
;
uint32
bits
=
1
;
int64
reward
=
2
;
int64
reward
=
2
;
string
ticketId
=
3
;
string
ticketId
=
3
;
bytes
modify
=
4
;
bytes
modify
=
4
;
//挖到区块时公开
//挖到区块时公开
bytes
privHash
=
5
;
bytes
privHash
=
5
;
}
}
message
TicketMinerOld
{
message
TicketMinerOld
{
uint32
bits
=
1
;
uint32
bits
=
1
;
int64
reward
=
2
;
int64
reward
=
2
;
string
ticketId
=
3
;
string
ticketId
=
3
;
bytes
modify
=
4
;
bytes
modify
=
4
;
}
}
message
MinerFlag
{
message
MinerFlag
{
int32
flag
=
1
;
int32
flag
=
1
;
int64
reserve
=
2
;
int64
reserve
=
2
;
}
}
message
TicketBind
{
message
TicketBind
{
string
minerAddress
=
1
;
string
minerAddress
=
1
;
string
returnAddress
=
2
;
string
returnAddress
=
2
;
}
}
message
TicketOpen
{
message
TicketOpen
{
//用户挖矿的ticket 地址
//用户挖矿的ticket 地址
string
minerAddress
=
1
;
string
minerAddress
=
1
;
//购买ticket的数目
//购买ticket的数目
int32
count
=
2
;
int32
count
=
2
;
//币实际存储的地址
//币实际存储的地址
string
returnAddress
=
3
;
string
returnAddress
=
3
;
//随机种子
//随机种子
int64
randSeed
=
4
;
int64
randSeed
=
4
;
//购买ticket时公开
//购买ticket时公开
repeated
bytes
pubHashes
=
5
;
repeated
bytes
pubHashes
=
5
;
}
}
message
TicketGenesis
{
message
TicketGenesis
{
string
minerAddress
=
1
;
string
minerAddress
=
1
;
string
returnAddress
=
2
;
string
returnAddress
=
2
;
int32
count
=
3
;
int32
count
=
3
;
}
}
message
TicketClose
{
repeated
string
ticketId
=
1
;
}
message
TicketClose
{
repeated
string
ticketId
=
1
;
}
message
TicketList
{
message
TicketList
{
string
addr
=
1
;
string
addr
=
1
;
int32
status
=
3
;
int32
status
=
3
;
}
}
message
TicketInfos
{
repeated
string
ticketIds
=
1
;
}
message
TicketInfos
{
repeated
string
ticketIds
=
1
;
}
message
ReplyTicketList
{
repeated
Ticket
tickets
=
1
;
}
message
ReplyTicketList
{
repeated
Ticket
tickets
=
1
;
}
message
ReplyWalletTickets
{
message
ReplyWalletTickets
{
repeated
Ticket
tickets
=
1
;
repeated
Ticket
tickets
=
1
;
repeated
bytes
privkeys
=
2
;
repeated
bytes
privkeys
=
2
;
}
}
message
ReceiptTicket
{
message
ReceiptTicket
{
string
ticketId
=
1
;
string
ticketId
=
1
;
int32
status
=
2
;
int32
status
=
2
;
int32
prevStatus
=
3
;
int32
prevStatus
=
3
;
string
addr
=
4
;
string
addr
=
4
;
}
}
message
ReceiptTicketBind
{
message
ReceiptTicketBind
{
string
oldMinerAddress
=
1
;
string
oldMinerAddress
=
1
;
string
newMinerAddress
=
2
;
string
newMinerAddress
=
2
;
string
returnAddress
=
3
;
string
returnAddress
=
3
;
}
}
message
ReqBindMiner
{
message
ReqBindMiner
{
string
bindAddr
=
1
;
string
bindAddr
=
1
;
string
originAddr
=
2
;
string
originAddr
=
2
;
int64
amount
=
3
;
int64
amount
=
3
;
bool
checkBalance
=
4
;
bool
checkBalance
=
4
;
}
}
message
ReplyBindMiner
{
string
txHex
=
1
;
}
message
ReplyBindMiner
{
string
txHex
=
1
;
}
service
ticket
{
service
ticket
{
//创建绑定挖矿
//创建绑定挖矿
rpc
CreateBindMiner
(
ReqBindMiner
)
returns
(
ReplyBindMiner
)
{}
rpc
CreateBindMiner
(
ReqBindMiner
)
returns
(
ReplyBindMiner
)
{}
//查询钱包票数
//查询钱包票数
rpc
GetTicketCount
(
types.ReqNil
)
returns
(
Int64
)
{}
rpc
GetTicketCount
(
types.ReqNil
)
returns
(
Int64
)
{}
// Miner
// Miner
//设置自动挖矿
//设置自动挖矿
rpc
SetAutoMining
(
MinerFlag
)
returns
(
Reply
)
{}
rpc
SetAutoMining
(
MinerFlag
)
returns
(
Reply
)
{}
}
}
\ No newline at end of file
plugin/dapp/token/cmd/signatory-server/signatory/config.proto
View file @
820571b3
...
@@ -3,7 +3,7 @@ syntax = "proto3";
...
@@ -3,7 +3,7 @@ syntax = "proto3";
package
signatory
;
package
signatory
;
message
Config
{
message
Config
{
repeated
string
whitelist
=
1
;
repeated
string
whitelist
=
1
;
string
jrpcBindAddr
=
2
;
string
jrpcBindAddr
=
2
;
string
privkey
=
3
;
string
privkey
=
3
;
}
}
plugin/dapp/token/proto/token.proto
View file @
820571b3
...
@@ -7,134 +7,140 @@ package types;
...
@@ -7,134 +7,140 @@ package types;
// action
// action
message
TokenAction
{
message
TokenAction
{
oneof
value
{
oneof
value
{
TokenPreCreate
tokenPreCreate
=
1
;
TokenPreCreate
tokenPreCreate
=
1
;
TokenFinishCreate
tokenFinishCreate
=
2
;
TokenFinishCreate
tokenFinishCreate
=
2
;
TokenRevokeCreate
tokenRevokeCreate
=
3
;
TokenRevokeCreate
tokenRevokeCreate
=
3
;
AssetsTransfer
transfer
=
4
;
AssetsTransfer
transfer
=
4
;
AssetsWithdraw
withdraw
=
5
;
AssetsWithdraw
withdraw
=
5
;
AssetsGenesis
genesis
=
6
;
AssetsGenesis
genesis
=
6
;
AssetsTransferToExec
transferToExec
=
8
;
AssetsTransferToExec
transferToExec
=
8
;
}
}
int32
Ty
=
7
;
int32
Ty
=
7
;
}
}
//创建token,支持最大精确度是8位小数,即存入数据库的实际总额需要放大1e8倍
//创建token,支持最大精确度是8位小数,即存入数据库的实际总额需要放大1e8倍
message
TokenPreCreate
{
message
TokenPreCreate
{
string
name
=
1
;
string
name
=
1
;
string
symbol
=
2
;
string
symbol
=
2
;
string
introduction
=
3
;
string
introduction
=
3
;
int64
total
=
4
;
int64
total
=
4
;
int64
price
=
5
;
int64
price
=
5
;
string
owner
=
6
;
string
owner
=
6
;
}
}
message
TokenFinishCreate
{
message
TokenFinishCreate
{
string
symbol
=
1
;
string
symbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
}
}
message
TokenRevokeCreate
{
message
TokenRevokeCreate
{
string
symbol
=
1
;
string
symbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
}
}
// state db
// state db
message
Token
{
message
Token
{
string
name
=
1
;
string
name
=
1
;
string
symbol
=
2
;
string
symbol
=
2
;
string
introduction
=
3
;
string
introduction
=
3
;
int64
total
=
4
;
int64
total
=
4
;
int64
price
=
5
;
int64
price
=
5
;
string
owner
=
6
;
string
owner
=
6
;
string
creator
=
7
;
string
creator
=
7
;
int32
status
=
8
;
int32
status
=
8
;
}
}
// log
// log
message
ReceiptToken
{
message
ReceiptToken
{
string
symbol
=
1
;
string
symbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
int32
status
=
3
;
int32
status
=
3
;
}
}
// local
// local
message
LocalToken
{
message
LocalToken
{
string
name
=
1
;
string
name
=
1
;
string
symbol
=
2
;
string
symbol
=
2
;
string
introduction
=
3
;
string
introduction
=
3
;
int64
total
=
4
;
int64
total
=
4
;
int64
price
=
5
;
int64
price
=
5
;
string
owner
=
6
;
string
owner
=
6
;
string
creator
=
7
;
string
creator
=
7
;
int32
status
=
8
;
int32
status
=
8
;
int64
createdHeight
=
9
;
int64
createdHeight
=
9
;
int64
createdTime
=
10
;
int64
createdTime
=
10
;
int64
prepareCreateHeight
=
11
;
int64
prepareCreateHeight
=
11
;
int64
prepareCreateTime
=
12
;
int64
prepareCreateTime
=
12
;
int32
precision
=
13
;
int32
precision
=
13
;
// 如果需要这个项可以单独做一个域存储
// 如果需要这个项可以单独做一个域存储
int64
totalTransferTimes
=
14
;
int64
totalTransferTimes
=
14
;
int64
revokedHeight
=
15
;
int64
revokedHeight
=
15
;
int64
revokedTime
=
16
;
int64
revokedTime
=
16
;
}
}
// query
// query
message
ReqTokens
{
message
ReqTokens
{
bool
queryAll
=
1
;
bool
queryAll
=
1
;
int32
status
=
2
;
int32
status
=
2
;
repeated
string
tokens
=
3
;
repeated
string
tokens
=
3
;
bool
symbolOnly
=
4
;
bool
symbolOnly
=
4
;
}
}
message
ReplyTokens
{
repeated
LocalToken
tokens
=
1
;
}
message
ReplyTokens
{
repeated
LocalToken
tokens
=
1
;
}
message
TokenRecv
{
message
TokenRecv
{
string
token
=
1
;
string
token
=
1
;
int64
recv
=
2
;
int64
recv
=
2
;
}
message
ReplyAddrRecvForTokens
{
repeated
TokenRecv
tokenRecvs
=
1
;
}
}
message
ReplyAddrRecvForTokens
{
repeated
TokenRecv
tokenRecvs
=
1
;
}
message
ReqTokenBalance
{
message
ReqTokenBalance
{
repeated
string
addresses
=
1
;
repeated
string
addresses
=
1
;
string
tokenSymbol
=
2
;
string
tokenSymbol
=
2
;
string
execer
=
3
;
string
execer
=
3
;
}
}
message
ReqAccountTokenAssets
{
message
ReqAccountTokenAssets
{
string
address
=
1
;
string
address
=
1
;
string
execer
=
2
;
string
execer
=
2
;
}
}
message
TokenAsset
{
message
TokenAsset
{
string
symbol
=
1
;
string
symbol
=
1
;
Account
account
=
2
;
Account
account
=
2
;
}
}
message
ReplyAccountTokenAssets
{
repeated
TokenAsset
tokenAssets
=
1
;
}
message
ReplyAccountTokenAssets
{
repeated
TokenAsset
tokenAssets
=
1
;
}
message
ReqAddrTokens
{
message
ReqAddrTokens
{
string
addr
=
1
;
string
addr
=
1
;
int32
status
=
2
;
int32
status
=
2
;
repeated
string
token
=
3
;
repeated
string
token
=
3
;
int32
direction
=
4
;
int32
direction
=
4
;
int32
count
=
5
;
int32
count
=
5
;
string
fromKey
=
6
;
string
fromKey
=
6
;
}
}
message
ReqTokenTx
{
message
ReqTokenTx
{
string
symbol
=
1
;
string
symbol
=
1
;
//表示取所有/from/to/其他的hash列表
//表示取所有/from/to/其他的hash列表
int32
flag
=
2
;
int32
flag
=
2
;
int32
count
=
3
;
int32
count
=
3
;
int32
direction
=
4
;
int32
direction
=
4
;
int64
height
=
5
;
int64
height
=
5
;
int64
index
=
6
;
int64
index
=
6
;
string
addr
=
7
;
string
addr
=
7
;
}
}
service
token
{
service
token
{
// token 对外提供服务的接口
// token 对外提供服务的接口
//区块链接口
//区块链接口
rpc
GetTokenBalance
(
ReqTokenBalance
)
returns
(
Accounts
)
{}
rpc
GetTokenBalance
(
ReqTokenBalance
)
returns
(
Accounts
)
{}
}
}
\ No newline at end of file
plugin/dapp/trade/proto/trade.proto
View file @
820571b3
...
@@ -7,164 +7,180 @@ package types;
...
@@ -7,164 +7,180 @@ package types;
// trade 交易部分
// trade 交易部分
//
//
message
Trade
{
message
Trade
{
oneof
value
{
oneof
value
{
TradeForSell
sellLimit
=
1
;
TradeForSell
sellLimit
=
1
;
TradeForBuy
buyMarket
=
2
;
TradeForBuy
buyMarket
=
2
;
TradeForRevokeSell
revokeSell
=
3
;
TradeForRevokeSell
revokeSell
=
3
;
TradeForBuyLimit
buyLimit
=
5
;
TradeForBuyLimit
buyLimit
=
5
;
TradeForSellMarket
sellMarket
=
6
;
TradeForSellMarket
sellMarket
=
6
;
TradeForRevokeBuy
revokeBuy
=
7
;
TradeForRevokeBuy
revokeBuy
=
7
;
}
}
int32
ty
=
4
;
int32
ty
=
4
;
}
}
// 创建众筹交易,确定一手交易的token的数量,单价以及总共有多少手token可以进行众筹
// 创建众筹交易,确定一手交易的token的数量,单价以及总共有多少手token可以进行众筹
message
TradeForSell
{
message
TradeForSell
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
// 每一手出售的token的数量
// 每一手出售的token的数量
int64
amountPerBoardlot
=
2
;
int64
amountPerBoardlot
=
2
;
// 起卖手数,必须达到这个门槛才允许进行交易
// 起卖手数,必须达到这个门槛才允许进行交易
int64
minBoardlot
=
3
;
int64
minBoardlot
=
3
;
// 每一手token的价格
// 每一手token的价格
int64
pricePerBoardlot
=
4
;
int64
pricePerBoardlot
=
4
;
int64
totalBoardlot
=
5
;
int64
totalBoardlot
=
5
;
// 此次出售的起始时间,如果非众筹则可以忽略此时间
// 此次出售的起始时间,如果非众筹则可以忽略此时间
int64
starttime
=
6
;
int64
starttime
=
6
;
int64
stoptime
=
7
;
int64
stoptime
=
7
;
bool
crowdfund
=
8
;
bool
crowdfund
=
8
;
// 资产来源
// 资产来源
string
assetExec
=
9
;
string
assetExec
=
9
;
}
}
// 购买者发起交易用来购买token持有者之前挂单出售的token
// 购买者发起交易用来购买token持有者之前挂单出售的token
// 其中的hash为token出售者发起出售交易的hash
// 其中的hash为token出售者发起出售交易的hash
message
TradeForBuy
{
message
TradeForBuy
{
string
sellID
=
1
;
string
sellID
=
1
;
int64
boardlotCnt
=
2
;
int64
boardlotCnt
=
2
;
}
}
// 允许token的持有者撤销之前未成交出售token的挂单
// 允许token的持有者撤销之前未成交出售token的挂单
message
TradeForRevokeSell
{
string
sellID
=
1
;
}
message
TradeForRevokeSell
{
string
sellID
=
1
;
}
// 限价买单构造请求
// 限价买单构造请求
message
TradeForBuyLimit
{
message
TradeForBuyLimit
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
int64
amountPerBoardlot
=
2
;
int64
amountPerBoardlot
=
2
;
int64
minBoardlot
=
3
;
int64
minBoardlot
=
3
;
int64
pricePerBoardlot
=
4
;
int64
pricePerBoardlot
=
4
;
int64
totalBoardlot
=
5
;
int64
totalBoardlot
=
5
;
string
assetExec
=
6
;
string
assetExec
=
6
;
}
}
// 现价卖单
// 现价卖单
message
TradeForSellMarket
{
message
TradeForSellMarket
{
string
buyID
=
1
;
string
buyID
=
1
;
int64
boardlotCnt
=
2
;
int64
boardlotCnt
=
2
;
}
}
// 撤销买单
// 撤销买单
message
TradeForRevokeBuy
{
string
buyID
=
1
;
}
message
TradeForRevokeBuy
{
string
buyID
=
1
;
}
// 数据库部分
// 数据库部分
message
SellOrder
{
message
SellOrder
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
address
=
2
;
string
address
=
2
;
//每一手出售的token的数量
//每一手出售的token的数量
int64
amountPerBoardlot
=
3
;
int64
amountPerBoardlot
=
3
;
int64
minBoardlot
=
4
;
int64
minBoardlot
=
4
;
//每一手token的价格
//每一手token的价格
int64
pricePerBoardlot
=
5
;
int64
pricePerBoardlot
=
5
;
int64
totalBoardlot
=
6
;
int64
totalBoardlot
=
6
;
int64
soldBoardlot
=
7
;
int64
soldBoardlot
=
7
;
//此次出售的起始时间,如果非众筹则可以忽略此时间
//此次出售的起始时间,如果非众筹则可以忽略此时间
int64
starttime
=
8
;
int64
starttime
=
8
;
int64
stoptime
=
9
;
int64
stoptime
=
9
;
bool
crowdfund
=
10
;
bool
crowdfund
=
10
;
//此处使用tx的hash来指定
//此处使用tx的hash来指定
string
sellID
=
11
;
string
sellID
=
11
;
int32
status
=
12
;
int32
status
=
12
;
int64
height
=
13
;
int64
height
=
13
;
string
assetExec
=
14
;
string
assetExec
=
14
;
}
}
// 限价买单数据库记录
// 限价买单数据库记录
message
BuyLimitOrder
{
message
BuyLimitOrder
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
address
=
2
;
string
address
=
2
;
int64
amountPerBoardlot
=
3
;
int64
amountPerBoardlot
=
3
;
int64
minBoardlot
=
4
;
int64
minBoardlot
=
4
;
int64
pricePerBoardlot
=
5
;
int64
pricePerBoardlot
=
5
;
int64
totalBoardlot
=
6
;
int64
totalBoardlot
=
6
;
int64
boughtBoardlot
=
7
;
int64
boughtBoardlot
=
7
;
string
buyID
=
8
;
string
buyID
=
8
;
int32
status
=
9
;
int32
status
=
9
;
int64
height
=
10
;
int64
height
=
10
;
string
assetExec
=
11
;
string
assetExec
=
11
;
}
}
// 执行器日志部分
// 执行器日志部分
message
ReceiptBuyBase
{
message
ReceiptBuyBase
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
string
amountPerBoardlot
=
3
;
string
amountPerBoardlot
=
3
;
int64
minBoardlot
=
4
;
int64
minBoardlot
=
4
;
string
pricePerBoardlot
=
5
;
string
pricePerBoardlot
=
5
;
int64
totalBoardlot
=
6
;
int64
totalBoardlot
=
6
;
int64
boughtBoardlot
=
7
;
int64
boughtBoardlot
=
7
;
string
buyID
=
8
;
string
buyID
=
8
;
string
status
=
9
;
string
status
=
9
;
string
sellID
=
10
;
string
sellID
=
10
;
string
txHash
=
11
;
string
txHash
=
11
;
int64
height
=
12
;
int64
height
=
12
;
string
assetExec
=
13
;
string
assetExec
=
13
;
}
}
message
ReceiptSellBase
{
message
ReceiptSellBase
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
//每一手出售的token的数量
//每一手出售的token的数量
string
amountPerBoardlot
=
3
;
string
amountPerBoardlot
=
3
;
int64
minBoardlot
=
4
;
int64
minBoardlot
=
4
;
//每一手token的价格
//每一手token的价格
string
pricePerBoardlot
=
5
;
string
pricePerBoardlot
=
5
;
int64
totalBoardlot
=
6
;
int64
totalBoardlot
=
6
;
int64
soldBoardlot
=
7
;
int64
soldBoardlot
=
7
;
//此次出售的起始时间,如果非众筹则可以忽略此时间
//此次出售的起始时间,如果非众筹则可以忽略此时间
int64
starttime
=
8
;
int64
starttime
=
8
;
int64
stoptime
=
9
;
int64
stoptime
=
9
;
bool
crowdfund
=
10
;
bool
crowdfund
=
10
;
//此处使用tx的hash来指定
//此处使用tx的hash来指定
string
sellID
=
11
;
string
sellID
=
11
;
string
status
=
12
;
string
status
=
12
;
// buyid
// buyid
string
buyID
=
13
;
string
buyID
=
13
;
string
txHash
=
14
;
string
txHash
=
14
;
int64
height
=
15
;
int64
height
=
15
;
string
assetExec
=
16
;
string
assetExec
=
16
;
}
}
message
ReceiptTradeBuyMarket
{
ReceiptBuyBase
base
=
1
;
}
message
ReceiptTradeBuyMarket
{
ReceiptBuyBase
base
=
1
;
}
message
ReceiptTradeBuyLimit
{
ReceiptBuyBase
base
=
1
;
}
message
ReceiptTradeBuyLimit
{
ReceiptBuyBase
base
=
1
;
}
message
ReceiptTradeBuyRevoke
{
ReceiptBuyBase
base
=
1
;
}
message
ReceiptTradeBuyRevoke
{
ReceiptBuyBase
base
=
1
;
}
message
ReceiptTradeSellLimit
{
ReceiptSellBase
base
=
1
;
}
message
ReceiptTradeSellLimit
{
ReceiptSellBase
base
=
1
;
}
message
ReceiptSellMarket
{
ReceiptSellBase
base
=
1
;
}
message
ReceiptSellMarket
{
ReceiptSellBase
base
=
1
;
}
message
ReceiptTradeSellRevoke
{
ReceiptSellBase
base
=
1
;
}
message
ReceiptTradeSellRevoke
{
ReceiptSellBase
base
=
1
;
}
// 查询部分
// 查询部分
message
ReqAddrAssets
{
message
ReqAddrAssets
{
string
addr
=
1
;
string
addr
=
1
;
int32
status
=
2
;
int32
status
=
2
;
// ??
// ??
repeated
string
token
=
3
;
repeated
string
token
=
3
;
int32
direction
=
4
;
int32
direction
=
4
;
int32
count
=
5
;
int32
count
=
5
;
string
fromKey
=
6
;
string
fromKey
=
6
;
}
}
// 获取Token未完成卖单的交易列表
// 获取Token未完成卖单的交易列表
...
@@ -173,100 +189,106 @@ message ReqAddrAssets {
...
@@ -173,100 +189,106 @@ message ReqAddrAssets {
// :获取交易列表的个数。 direction :查找方式;0,上一页;1,下一页。
// :获取交易列表的个数。 direction :查找方式;0,上一页;1,下一页。
// 越靠后的也单价越贵
// 越靠后的也单价越贵
message
ReqTokenSellOrder
{
message
ReqTokenSellOrder
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
fromKey
=
2
;
string
fromKey
=
2
;
int32
count
=
3
;
int32
count
=
3
;
int32
direction
=
4
;
int32
direction
=
4
;
int32
status
=
5
;
int32
status
=
5
;
}
}
message
ReqTokenBuyOrder
{
message
ReqTokenBuyOrder
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
fromKey
=
2
;
string
fromKey
=
2
;
int32
count
=
3
;
int32
count
=
3
;
int32
direction
=
4
;
int32
direction
=
4
;
int32
status
=
5
;
int32
status
=
5
;
}
}
message
ReplyBuyOrder
{
message
ReplyBuyOrder
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
int64
amountPerBoardlot
=
3
;
int64
amountPerBoardlot
=
3
;
int64
minBoardlot
=
4
;
int64
minBoardlot
=
4
;
int64
pricePerBoardlot
=
5
;
int64
pricePerBoardlot
=
5
;
int64
totalBoardlot
=
6
;
int64
totalBoardlot
=
6
;
int64
boughtBoardlot
=
7
;
int64
boughtBoardlot
=
7
;
string
buyID
=
8
;
string
buyID
=
8
;
int32
status
=
9
;
int32
status
=
9
;
string
sellID
=
10
;
string
sellID
=
10
;
string
txHash
=
11
;
string
txHash
=
11
;
int64
height
=
12
;
int64
height
=
12
;
string
key
=
13
;
string
key
=
13
;
string
assetExec
=
14
;
string
assetExec
=
14
;
}
}
message
ReplySellOrder
{
message
ReplySellOrder
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
int64
amountPerBoardlot
=
3
;
int64
amountPerBoardlot
=
3
;
int64
minBoardlot
=
4
;
int64
minBoardlot
=
4
;
int64
pricePerBoardlot
=
5
;
int64
pricePerBoardlot
=
5
;
int64
totalBoardlot
=
6
;
int64
totalBoardlot
=
6
;
int64
soldBoardlot
=
7
;
int64
soldBoardlot
=
7
;
string
buyID
=
8
;
string
buyID
=
8
;
int32
status
=
9
;
int32
status
=
9
;
string
sellID
=
10
;
string
sellID
=
10
;
string
txHash
=
11
;
string
txHash
=
11
;
int64
height
=
12
;
int64
height
=
12
;
string
key
=
13
;
string
key
=
13
;
string
assetExec
=
14
;
string
assetExec
=
14
;
}
}
message
ReplySellOrders
{
repeated
ReplySellOrder
sellOrders
=
1
;
}
message
ReplySellOrders
{
repeated
ReplySellOrder
sellOrders
=
1
;
}
message
ReplyBuyOrders
{
repeated
ReplyBuyOrder
buyOrders
=
1
;
}
message
ReplyBuyOrders
{
repeated
ReplyBuyOrder
buyOrders
=
1
;
}
message
ReplyTradeOrder
{
message
ReplyTradeOrder
{
string
tokenSymbol
=
1
;
string
tokenSymbol
=
1
;
string
owner
=
2
;
string
owner
=
2
;
int64
amountPerBoardlot
=
3
;
int64
amountPerBoardlot
=
3
;
int64
minBoardlot
=
4
;
int64
minBoardlot
=
4
;
int64
pricePerBoardlot
=
5
;
int64
pricePerBoardlot
=
5
;
int64
totalBoardlot
=
6
;
int64
totalBoardlot
=
6
;
int64
tradedBoardlot
=
7
;
int64
tradedBoardlot
=
7
;
string
buyID
=
8
;
string
buyID
=
8
;
int32
status
=
9
;
int32
status
=
9
;
string
sellID
=
10
;
string
sellID
=
10
;
string
txHash
=
11
;
string
txHash
=
11
;
int64
height
=
12
;
int64
height
=
12
;
string
key
=
13
;
string
key
=
13
;
int64
blockTime
=
14
;
int64
blockTime
=
14
;
bool
isSellOrder
=
15
;
bool
isSellOrder
=
15
;
string
assetExec
=
16
;
string
assetExec
=
16
;
}
}
message
ReplyTradeOrders
{
repeated
ReplyTradeOrder
orders
=
1
;
}
message
ReplyTradeOrders
{
repeated
ReplyTradeOrder
orders
=
1
;
}
message
ReqSellToken
{
message
ReqSellToken
{
TradeForSell
sell
=
1
;
TradeForSell
sell
=
1
;
string
owner
=
2
;
string
owner
=
2
;
}
}
message
ReqRevokeSell
{
message
ReqRevokeSell
{
TradeForRevokeSell
revoke
=
1
;
TradeForRevokeSell
revoke
=
1
;
string
owner
=
2
;
string
owner
=
2
;
}
}
message
ReqBuyToken
{
message
ReqBuyToken
{
TradeForBuy
buy
=
1
;
TradeForBuy
buy
=
1
;
string
buyer
=
2
;
string
buyer
=
2
;
}
}
service
trade
{
service
trade
{
rpc
CreateRawTradeSellTx
(
TradeForSell
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeSellTx
(
TradeForSell
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeBuyTx
(
TradeForBuy
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeBuyTx
(
TradeForBuy
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeRevokeTx
(
TradeForRevokeSell
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeRevokeTx
(
TradeForRevokeSell
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeBuyLimitTx
(
TradeForBuyLimit
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeBuyLimitTx
(
TradeForBuyLimit
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeSellMarketTx
(
TradeForSellMarket
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeSellMarketTx
(
TradeForSellMarket
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeRevokeBuyTx
(
TradeForRevokeBuy
)
returns
(
UnsignTx
)
{}
rpc
CreateRawTradeRevokeBuyTx
(
TradeForRevokeBuy
)
returns
(
UnsignTx
)
{}
}
}
\ No newline at end of file
plugin/dapp/valnode/proto/tendermint.proto
View file @
820571b3
...
@@ -4,175 +4,185 @@ import "transaction.proto";
...
@@ -4,175 +4,185 @@ import "transaction.proto";
package
types
;
package
types
;
message
BlockID
{
bytes
Hash
=
1
;
}
message
BlockID
{
bytes
Hash
=
1
;
}
message
TendermintBitArray
{
message
TendermintBitArray
{
int32
Bits
=
1
;
int32
Bits
=
1
;
repeated
uint64
Elems
=
2
;
repeated
uint64
Elems
=
2
;
}
}
message
Vote
{
message
Vote
{
bytes
ValidatorAddress
=
1
;
bytes
ValidatorAddress
=
1
;
int32
ValidatorIndex
=
2
;
int32
ValidatorIndex
=
2
;
int64
Height
=
3
;
int64
Height
=
3
;
int32
Round
=
4
;
int32
Round
=
4
;
int64
Timestamp
=
5
;
int64
Timestamp
=
5
;
uint32
Type
=
6
;
uint32
Type
=
6
;
BlockID
BlockID
=
7
;
BlockID
BlockID
=
7
;
bytes
Signature
=
8
;
bytes
Signature
=
8
;
}
}
message
TendermintCommit
{
message
TendermintCommit
{
BlockID
BlockID
=
1
;
BlockID
BlockID
=
1
;
repeated
Vote
Precommits
=
2
;
repeated
Vote
Precommits
=
2
;
}
}
message
TendermintBlockInfo
{
message
TendermintBlockInfo
{
TendermintCommit
SeenCommit
=
1
;
TendermintCommit
SeenCommit
=
1
;
TendermintCommit
LastCommit
=
2
;
TendermintCommit
LastCommit
=
2
;
State
State
=
3
;
State
State
=
3
;
Proposal
Proposal
=
4
;
Proposal
Proposal
=
4
;
TendermintBlock
block
=
5
;
TendermintBlock
block
=
5
;
}
}
message
BlockSize
{
message
BlockSize
{
int32
MaxBytes
=
1
;
int32
MaxBytes
=
1
;
int32
MaxTxs
=
2
;
int32
MaxTxs
=
2
;
int64
MaxGas
=
3
;
int64
MaxGas
=
3
;
}
}
message
TxSize
{
message
TxSize
{
int32
MaxBytes
=
1
;
int32
MaxBytes
=
1
;
int64
MaxGas
=
2
;
int64
MaxGas
=
2
;
}
}
message
BlockGossip
{
int32
BlockPartSizeBytes
=
1
;
}
message
BlockGossip
{
int32
BlockPartSizeBytes
=
1
;
}
message
EvidenceParams
{
int64
MaxAge
=
1
;
}
message
EvidenceParams
{
int64
MaxAge
=
1
;
}
message
ConsensusParams
{
message
ConsensusParams
{
BlockSize
BlockSize
=
1
;
BlockSize
BlockSize
=
1
;
TxSize
TxSize
=
2
;
TxSize
TxSize
=
2
;
BlockGossip
BlockGossip
=
3
;
BlockGossip
BlockGossip
=
3
;
EvidenceParams
EvidenceParams
=
4
;
EvidenceParams
EvidenceParams
=
4
;
}
}
message
Validator
{
message
Validator
{
bytes
Address
=
1
;
bytes
Address
=
1
;
bytes
PubKey
=
2
;
bytes
PubKey
=
2
;
int64
VotingPower
=
3
;
int64
VotingPower
=
3
;
int64
Accum
=
4
;
int64
Accum
=
4
;
}
}
message
ValidatorSet
{
message
ValidatorSet
{
repeated
Validator
Validators
=
1
;
repeated
Validator
Validators
=
1
;
Validator
Proposer
=
2
;
Validator
Proposer
=
2
;
}
}
message
State
{
message
State
{
string
ChainID
=
1
;
string
ChainID
=
1
;
int64
LastBlockHeight
=
2
;
int64
LastBlockHeight
=
2
;
int64
LastBlockTotalTx
=
3
;
int64
LastBlockTotalTx
=
3
;
BlockID
LastBlockID
=
4
;
BlockID
LastBlockID
=
4
;
int64
LastBlockTime
=
5
;
int64
LastBlockTime
=
5
;
ValidatorSet
Validators
=
6
;
ValidatorSet
Validators
=
6
;
ValidatorSet
LastValidators
=
7
;
ValidatorSet
LastValidators
=
7
;
int64
LastHeightValidatorsChanged
=
8
;
int64
LastHeightValidatorsChanged
=
8
;
ConsensusParams
ConsensusParams
=
9
;
ConsensusParams
ConsensusParams
=
9
;
int64
LastHeightConsensusParamsChanged
=
10
;
int64
LastHeightConsensusParamsChanged
=
10
;
bytes
LastResultsHash
=
11
;
bytes
LastResultsHash
=
11
;
bytes
AppHash
=
12
;
bytes
AppHash
=
12
;
}
}
message
DuplicateVoteEvidence
{
message
DuplicateVoteEvidence
{
string
pubKey
=
1
;
string
pubKey
=
1
;
Vote
voteA
=
2
;
Vote
voteA
=
2
;
Vote
voteB
=
3
;
Vote
voteB
=
3
;
}
}
message
EvidenceEnvelope
{
message
EvidenceEnvelope
{
string
typeName
=
1
;
string
typeName
=
1
;
bytes
data
=
2
;
bytes
data
=
2
;
}
}
message
EvidenceData
{
repeated
EvidenceEnvelope
evidence
=
1
;
}
message
EvidenceData
{
repeated
EvidenceEnvelope
evidence
=
1
;
}
message
TendermintBlockHeader
{
message
TendermintBlockHeader
{
string
chainID
=
1
;
string
chainID
=
1
;
int64
height
=
2
;
int64
height
=
2
;
int64
round
=
3
;
int64
round
=
3
;
int64
time
=
4
;
int64
time
=
4
;
int64
numTxs
=
5
;
int64
numTxs
=
5
;
BlockID
lastBlockID
=
6
;
BlockID
lastBlockID
=
6
;
int64
totalTxs
=
7
;
int64
totalTxs
=
7
;
bytes
lastCommitHash
=
8
;
bytes
lastCommitHash
=
8
;
bytes
validatorsHash
=
9
;
bytes
validatorsHash
=
9
;
bytes
consensusHash
=
10
;
bytes
consensusHash
=
10
;
bytes
appHash
=
11
;
bytes
appHash
=
11
;
bytes
lastResultsHash
=
12
;
bytes
lastResultsHash
=
12
;
bytes
evidenceHash
=
13
;
bytes
evidenceHash
=
13
;
}
}
message
TendermintBlock
{
message
TendermintBlock
{
TendermintBlockHeader
header
=
1
;
TendermintBlockHeader
header
=
1
;
repeated
Transaction
txs
=
2
;
repeated
Transaction
txs
=
2
;
EvidenceData
evidence
=
3
;
EvidenceData
evidence
=
3
;
TendermintCommit
lastCommit
=
4
;
TendermintCommit
lastCommit
=
4
;
bytes
proposerAddr
=
5
;
bytes
proposerAddr
=
5
;
}
}
message
Proposal
{
message
Proposal
{
int64
height
=
1
;
int64
height
=
1
;
int32
round
=
2
;
int32
round
=
2
;
int64
timestamp
=
3
;
int64
timestamp
=
3
;
int32
POLRound
=
4
;
int32
POLRound
=
4
;
BlockID
POLBlockID
=
5
;
BlockID
POLBlockID
=
5
;
bytes
signature
=
6
;
bytes
signature
=
6
;
bytes
blockhash
=
7
;
bytes
blockhash
=
7
;
}
}
message
NewRoundStepMsg
{
message
NewRoundStepMsg
{
int64
height
=
1
;
int64
height
=
1
;
int32
round
=
2
;
int32
round
=
2
;
int32
step
=
3
;
int32
step
=
3
;
int32
secondsSinceStartTime
=
4
;
int32
secondsSinceStartTime
=
4
;
int32
lastCommitRound
=
5
;
int32
lastCommitRound
=
5
;
}
}
message
CommitStepMsg
{
int64
height
=
1
;
}
message
CommitStepMsg
{
int64
height
=
1
;
}
message
ProposalPOLMsg
{
message
ProposalPOLMsg
{
int64
height
=
1
;
int64
height
=
1
;
int32
proposalPOLRound
=
2
;
int32
proposalPOLRound
=
2
;
TendermintBitArray
proposalPOL
=
3
;
TendermintBitArray
proposalPOL
=
3
;
}
}
message
HasVoteMsg
{
message
HasVoteMsg
{
int64
height
=
1
;
int64
height
=
1
;
int32
round
=
2
;
int32
round
=
2
;
int32
type
=
3
;
int32
type
=
3
;
int32
index
=
4
;
int32
index
=
4
;
}
}
message
VoteSetMaj23Msg
{
message
VoteSetMaj23Msg
{
int64
height
=
1
;
int64
height
=
1
;
int32
round
=
2
;
int32
round
=
2
;
int32
type
=
3
;
int32
type
=
3
;
BlockID
blockID
=
4
;
BlockID
blockID
=
4
;
}
}
message
VoteSetBitsMsg
{
message
VoteSetBitsMsg
{
int64
height
=
1
;
int64
height
=
1
;
int32
round
=
2
;
int32
round
=
2
;
int32
type
=
3
;
int32
type
=
3
;
BlockID
blockID
=
4
;
BlockID
blockID
=
4
;
TendermintBitArray
votes
=
5
;
TendermintBitArray
votes
=
5
;
}
}
message
Heartbeat
{
message
Heartbeat
{
bytes
validatorAddress
=
1
;
bytes
validatorAddress
=
1
;
int32
validatorIndex
=
2
;
int32
validatorIndex
=
2
;
int64
height
=
3
;
int64
height
=
3
;
int32
round
=
4
;
int32
round
=
4
;
int32
sequence
=
5
;
int32
sequence
=
5
;
bytes
signature
=
6
;
bytes
signature
=
6
;
}
}
plugin/dapp/valnode/proto/valnode.proto
View file @
820571b3
...
@@ -4,20 +4,26 @@ package types;
...
@@ -4,20 +4,26 @@ package types;
import
"tendermint.proto"
;
import
"tendermint.proto"
;
message
ValNode
{
message
ValNode
{
bytes
pubKey
=
1
;
bytes
pubKey
=
1
;
int64
power
=
2
;
int64
power
=
2
;
}
}
message
ValNodes
{
repeated
ValNode
nodes
=
1
;
}
message
ValNodes
{
repeated
ValNode
nodes
=
1
;
}
message
ValNodeAction
{
message
ValNodeAction
{
oneof
value
{
oneof
value
{
ValNode
node
=
1
;
ValNode
node
=
1
;
TendermintBlockInfo
blockInfo
=
2
;
TendermintBlockInfo
blockInfo
=
2
;
}
}
int32
Ty
=
3
;
int32
Ty
=
3
;
}
}
message
ReqNodeInfo
{
int64
height
=
1
;
}
message
ReqNodeInfo
{
int64
height
=
1
;
}
message
ReqBlockInfo
{
int64
height
=
1
;
}
message
ReqBlockInfo
{
\ No newline at end of file
int64
height
=
1
;
}
\ No newline at end of file
plugin/store/mpt/db/node.proto
View file @
820571b3
...
@@ -3,23 +3,29 @@ syntax = "proto3";
...
@@ -3,23 +3,29 @@ syntax = "proto3";
package
mpt
;
package
mpt
;
message
Node
{
message
Node
{
oneof
value
{
oneof
value
{
FullNode
full
=
2
;
FullNode
full
=
2
;
ShortNode
short
=
3
;
ShortNode
short
=
3
;
HashNode
hash
=
4
;
HashNode
hash
=
4
;
ValueNode
val
=
5
;
ValueNode
val
=
5
;
}
}
int32
Ty
=
1
;
int32
Ty
=
1
;
int32
index
=
6
;
int32
index
=
6
;
}
}
message
FullNode
{
repeated
Node
nodes
=
1
;
}
message
FullNode
{
repeated
Node
nodes
=
1
;
}
message
ShortNode
{
message
ShortNode
{
bytes
key
=
1
;
bytes
key
=
1
;
Node
val
=
2
;
Node
val
=
2
;
}
}
message
HashNode
{
bytes
hash
=
1
;
}
message
HashNode
{
bytes
hash
=
1
;
}
message
ValueNode
{
bytes
value
=
1
;
}
message
ValueNode
{
bytes
value
=
1
;
}
plugin/store/mpt/mpt.go
View file @
820571b3
package
mpt
package
mpt
import
(
import
(
lru
"github.com/hashicorp/golang-lru"
"gitlab.33.cn/chain33/chain33/common"
"gitlab.33.cn/chain33/chain33/common"
clog
"gitlab.33.cn/chain33/chain33/common/log"
clog
"gitlab.33.cn/chain33/chain33/common/log"
log
"gitlab.33.cn/chain33/chain33/common/log/log15"
log
"gitlab.33.cn/chain33/chain33/common/log/log15"
...
...
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