Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
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
exchain
nebula
Commits
27019cdf
Commit
27019cdf
authored
Feb 07, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add benchmark
parent
cc00249b
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
942 additions
and
407 deletions
+942
-407
db.go
exchain/db.go
+0
-7
proto_test.go
exchain/proto_test.go
+226
-0
account.pb.go
exchain/protocol/gen/go/nebula/v1/account.pb.go
+106
-40
block.pb.go
exchain/protocol/gen/go/nebula/v1/block.pb.go
+31
-30
pair.pb.go
exchain/protocol/gen/go/nebula/v1/pair.pb.go
+173
-50
receipt.pb.go
exchain/protocol/gen/go/nebula/v1/receipt.pb.go
+71
-19
transaction.pb.go
exchain/protocol/gen/go/nebula/v1/transaction.pb.go
+276
-210
kline.pb.go
exchain/protocol/gen/go/node/v1/kline.pb.go
+40
-44
account.proto
exchain/protocol/proto/nebula/v1/account.proto
+5
-1
block.proto
exchain/protocol/proto/nebula/v1/block.proto
+2
-2
transaction.proto
exchain/protocol/proto/nebula/v1/transaction.proto
+8
-4
go.mod
go.mod
+1
-0
go.sum
go.sum
+3
-0
No files found.
exchain/db.go
View file @
27019cdf
...
...
@@ -19,10 +19,3 @@ type ChainDB interface {
AddPair
()
GetPair
()
}
// todo: tx press test.
// limit, market, cancel 100w, each block 10w.
// serialize and unserialize.
// todo: add new struct.
// define Coin, Pair struct to store at chaindb.
// todo: define detail tx struct.
exchain/proto_test.go
0 → 100644
View file @
27019cdf
package
exchain
import
(
nebulav1
"github.com/exchain/go-exchain/exchain/protocol/gen/go/nebula/v1"
"github.com/golang/protobuf/proto"
"github.com/google/uuid"
"github.com/holiman/uint256"
"github.com/oklog/ulid"
"math/rand"
"testing"
"time"
)
var
(
randReader
=
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()))
)
func
getHash
()
[]
byte
{
d
:=
make
([]
byte
,
32
)
for
i
:=
0
;
i
<
32
;
i
++
{
d
[
i
]
=
byte
(
rand
.
Intn
(
128
))
}
return
d
}
func
getAddr
()
[]
byte
{
d
:=
make
([]
byte
,
20
)
for
i
:=
0
;
i
<
20
;
i
++
{
d
[
i
]
=
byte
(
rand
.
Intn
(
128
))
}
return
d
}
func
makeBlock
(
txcount
int
)
*
nebulav1
.
Block
{
block
:=
new
(
nebulav1
.
Block
)
block
.
Header
=
new
(
nebulav1
.
BlockHeader
)
block
.
Header
.
Height
=
uint64
(
rand
.
Intn
(
1000000
))
block
.
Header
.
Hash
=
getHash
()
block
.
Header
.
ParentHash
=
getHash
()
block
.
Header
.
Proposer
=
getAddr
()
block
.
Header
.
Timestamp
=
uint64
(
time
.
Now
()
.
UnixNano
()
/
1000
/
1000
)
txs
:=
randomTxs
(
txcount
)
block
.
Transactions
=
&
txs
return
block
}
func
makeLimitTx
()
*
nebulav1
.
LimitOrderTransaction
{
price
:=
rand
.
Intn
(
1000
)
+
500
tx
:=
new
(
nebulav1
.
LimitOrderTransaction
)
tx
.
Pair
=
"eth_usdt"
tx
.
Side
=
nebulav1
.
OrderSide_BUY
tx
.
Price
=
uint256
.
NewInt
(
uint64
(
price
))
.
Bytes
()
tx
.
Quantity
=
uint256
.
NewInt
(
uint64
(
rand
.
Intn
(
1000
)
+
100
))
.
Bytes
()
return
tx
}
func
makeMarketTx
()
*
nebulav1
.
MarketOrderTransaction
{
tx
:=
new
(
nebulav1
.
MarketOrderTransaction
)
tx
.
Pair
=
"eth_usdt"
tx
.
Side
=
nebulav1
.
OrderSide_BUY
tx
.
Quantity
=
uint256
.
NewInt
(
uint64
(
rand
.
Intn
(
1000
)
+
100
))
.
Bytes
()
return
tx
}
func
makeCancelTx
()
*
nebulav1
.
CancelOrderTransaction
{
tx
:=
new
(
nebulav1
.
CancelOrderTransaction
)
tx
.
OrderId
=
uuid
.
NewString
()
return
tx
}
func
makeTx
(
tp
nebulav1
.
TxType
)
*
nebulav1
.
Transaction
{
tx
:=
new
(
nebulav1
.
Transaction
)
tx
.
Proxy
=
false
uld
,
err
:=
ulid
.
New
(
ulid
.
Timestamp
(
time
.
Now
()),
randReader
)
if
err
!=
nil
{
panic
(
err
)
}
tx
.
Nonce
=
uld
[
:
]
tx
.
Signature
=
&
nebulav1
.
Signature
{
// random 32 bytes
R
:
[]
byte
{
0x01
,
0x02
,
0x03
,
0x04
,
0x05
,
0x06
,
0x07
,
0x08
,
0x09
,
0x0a
,
0x0b
,
0x0c
,
0x0d
,
0x0e
,
0x0f
,
0x10
,
0x11
,
0x12
,
0x13
,
0x14
,
0x15
,
0x16
,
0x17
,
0x18
,
0x19
,
0x1a
,
0x1b
,
0x1c
,
0x1d
,
0x1e
,
0x1f
,
0x20
},
S
:
[]
byte
{
0x01
,
0x02
,
0x03
,
0x04
,
0x05
,
0x06
,
0x07
,
0x08
,
0x09
,
0x0a
,
0x0b
,
0x0c
,
0x0d
,
0x0e
,
0x0f
,
0x10
,
0x11
,
0x12
,
0x13
,
0x14
,
0x15
,
0x16
,
0x17
,
0x18
,
0x19
,
0x1a
,
0x1b
,
0x1c
,
0x1d
,
0x1e
,
0x1f
,
0x20
},
V
:
1
,
}
switch
tp
{
case
nebulav1
.
TxType_LimitTx
:
txdata
:=
makeLimitTx
()
tx
.
TxType
=
nebulav1
.
TxType_LimitTx
tx
.
Tx
=
&
nebulav1
.
Transaction_LimitTx
{
LimitTx
:
txdata
}
case
nebulav1
.
TxType_MarketTx
:
txdata
:=
makeMarketTx
()
tx
.
TxType
=
nebulav1
.
TxType_MarketTx
tx
.
Tx
=
&
nebulav1
.
Transaction_MarketTx
{
MarketTx
:
txdata
}
case
nebulav1
.
TxType_CancelTx
:
txdata
:=
makeCancelTx
()
tx
.
TxType
=
nebulav1
.
TxType_CancelTx
tx
.
Tx
=
&
nebulav1
.
Transaction_CancelTx
{
CancelTx
:
txdata
}
default
:
panic
(
"unknown tx type"
)
}
return
tx
}
func
makeTxs
(
tp
nebulav1
.
TxType
,
count
int
)
nebulav1
.
TransactionList
{
txlist
:=
nebulav1
.
TransactionList
{
Txs
:
make
([]
*
nebulav1
.
Transaction
,
0
,
count
),
}
for
i
:=
0
;
i
<
count
;
i
++
{
txlist
.
Txs
=
append
(
txlist
.
Txs
,
makeTx
(
tp
))
}
return
txlist
}
func
randomTxs
(
count
int
)
nebulav1
.
TransactionList
{
txlist
:=
nebulav1
.
TransactionList
{
Txs
:
make
([]
*
nebulav1
.
Transaction
,
0
,
count
),
}
for
i
:=
0
;
i
<
count
;
i
++
{
tp
:=
nebulav1
.
TxType_LimitTx
+
nebulav1
.
TxType
(
rand
.
Intn
(
3
))
txlist
.
Txs
=
append
(
txlist
.
Txs
,
makeTx
(
tp
))
}
return
txlist
}
// todo: tx press test.
// limit, market, cancel 100w, each block 10w.
// serialize and unserialize.
func
BenchmarkLimitTxSerialize
(
b
*
testing
.
B
)
{
b
.
StopTimer
()
count
:=
100000
txs
:=
makeTxs
(
nebulav1
.
TxType_LimitTx
,
count
)
b
.
StartTimer
()
// benchmark limit tx serialize and unserialize.
for
i
:=
0
;
i
<
b
.
N
;
i
++
{
tx
:=
txs
.
Txs
[
i
%
count
]
d
,
err
:=
proto
.
Marshal
(
tx
)
if
err
!=
nil
{
b
.
Fatal
(
err
)
}
ntx
:=
new
(
nebulav1
.
Transaction
)
err
=
proto
.
Unmarshal
(
d
,
ntx
)
if
ntx
.
TxType
!=
tx
.
TxType
{
b
.
Fatal
(
"unserialize tx type error"
)
}
}
}
func
BenchmarkMarketTxSerialize
(
b
*
testing
.
B
)
{
b
.
StopTimer
()
count
:=
100000
txs
:=
makeTxs
(
nebulav1
.
TxType_MarketTx
,
count
)
b
.
StartTimer
()
// benchmark market tx serialize and unserialize.
for
i
:=
0
;
i
<
b
.
N
;
i
++
{
tx
:=
txs
.
Txs
[
i
%
count
]
d
,
err
:=
proto
.
Marshal
(
tx
)
if
err
!=
nil
{
b
.
Fatal
(
err
)
}
ntx
:=
new
(
nebulav1
.
Transaction
)
err
=
proto
.
Unmarshal
(
d
,
ntx
)
if
ntx
.
TxType
!=
tx
.
TxType
{
b
.
Fatal
(
"unserialize tx type error"
)
}
}
}
func
BenchmarkCancelTxSerialize
(
b
*
testing
.
B
)
{
b
.
StopTimer
()
count
:=
100000
txs
:=
makeTxs
(
nebulav1
.
TxType_CancelTx
,
count
)
b
.
StartTimer
()
// benchmark cancel tx serialize and unserialize.
for
i
:=
0
;
i
<
b
.
N
;
i
++
{
tx
:=
txs
.
Txs
[
i
%
count
]
d
,
err
:=
proto
.
Marshal
(
tx
)
if
err
!=
nil
{
b
.
Fatal
(
err
)
}
ntx
:=
new
(
nebulav1
.
Transaction
)
err
=
proto
.
Unmarshal
(
d
,
ntx
)
if
ntx
.
TxType
!=
tx
.
TxType
{
b
.
Fatal
(
"unserialize tx type error"
)
}
}
}
func
BenchmarkTxlistSerialize
(
b
*
testing
.
B
)
{
b
.
StopTimer
()
count
:=
1000000
txs
:=
randomTxs
(
count
)
b
.
StartTimer
()
// benchmark tx list serialize and unserialize.
for
i
:=
0
;
i
<
b
.
N
;
i
++
{
d
,
err
:=
proto
.
Marshal
(
&
txs
)
if
err
!=
nil
{
b
.
Fatal
(
err
)
}
ntxs
:=
new
(
nebulav1
.
TransactionList
)
err
=
proto
.
Unmarshal
(
d
,
ntxs
)
if
len
(
ntxs
.
Txs
)
!=
len
(
txs
.
Txs
)
{
b
.
Fatal
(
"unserialize tx list error"
)
}
}
}
func
BenchmarkBlockSerialize
(
b
*
testing
.
B
)
{
// benchmark block serialize and unserialize.
for
i
:=
0
;
i
<
b
.
N
;
i
++
{
b
.
StopTimer
()
txcount
:=
100000
block
:=
makeBlock
(
txcount
)
b
.
StartTimer
()
d
,
err
:=
proto
.
Marshal
(
block
)
if
err
!=
nil
{
b
.
Fatal
(
err
)
}
nblock
:=
new
(
nebulav1
.
Block
)
err
=
proto
.
Unmarshal
(
d
,
nblock
)
if
len
(
nblock
.
Transactions
.
Txs
)
!=
len
(
block
.
Transactions
.
Txs
)
{
b
.
Fatal
(
"unserialize block error"
)
}
}
}
exchain/protocol/gen/go/nebula/v1/account.pb.go
View file @
27019cdf
This diff is collapsed.
Click to expand it.
exchain/protocol/gen/go/nebula/v1/block.pb.go
View file @
27019cdf
...
...
@@ -31,7 +31,7 @@ type BlockHeader struct {
Hash
[]
byte
`protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
ParentHash
[]
byte
`protobuf:"bytes,3,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
Timestamp
uint64
`protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Proposer
string
`protobuf:"bytes,5,opt,name=proposer,proto3" json:"proposer,omitempty"`
Proposer
[]
byte
`protobuf:"bytes,5,opt,name=proposer,proto3" json:"proposer,omitempty"`
}
func
(
x
*
BlockHeader
)
Reset
()
{
...
...
@@ -94,11 +94,11 @@ func (x *BlockHeader) GetTimestamp() uint64 {
return
0
}
func
(
x
*
BlockHeader
)
GetProposer
()
string
{
func
(
x
*
BlockHeader
)
GetProposer
()
[]
byte
{
if
x
!=
nil
{
return
x
.
Proposer
}
return
""
return
nil
}
type
Block
struct
{
...
...
@@ -107,7 +107,7 @@ type Block struct {
unknownFields
protoimpl
.
UnknownFields
Header
*
BlockHeader
`protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Transactions
[]
*
Transaction
`protobuf:"bytes,2,rep
,name=transactions,proto3" json:"transactions,omitempty"`
Transactions
*
TransactionList
`protobuf:"bytes,2,opt
,name=transactions,proto3" json:"transactions,omitempty"`
}
func
(
x
*
Block
)
Reset
()
{
...
...
@@ -149,7 +149,7 @@ func (x *Block) GetHeader() *BlockHeader {
return
nil
}
func
(
x
*
Block
)
GetTransactions
()
[]
*
Transaction
{
func
(
x
*
Block
)
GetTransactions
()
*
TransactionList
{
if
x
!=
nil
{
return
x
.
Transactions
}
...
...
@@ -175,30 +175,31 @@ var file_nebula_v1_block_proto_rawDesc = []byte{
0x20
,
0x01
,
0x28
,
0x0c
,
0x52
,
0x0a
,
0x70
,
0x61
,
0x72
,
0x65
,
0x6e
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x04
,
0x52
,
0x09
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x70
,
0x6f
,
0x73
,
0x65
,
0x72
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x0
9
,
0x52
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x70
,
0x6f
,
0x73
,
0x65
,
0x72
,
0x22
,
0x8
3
,
0x01
,
0x0a
,
0x05
,
0x42
,
0x0a
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x70
,
0x6f
,
0x73
,
0x65
,
0x72
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x0
c
,
0x52
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x70
,
0x6f
,
0x73
,
0x65
,
0x72
,
0x22
,
0x8
7
,
0x01
,
0x0a
,
0x05
,
0x42
,
0x6c
,
0x6f
,
0x63
,
0x6b
,
0x12
,
0x36
,
0x0a
,
0x06
,
0x68
,
0x65
,
0x61
,
0x64
,
0x65
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x1e
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x42
,
0x6c
,
0x6f
,
0x63
,
0x6b
,
0x48
,
0x65
,
0x61
,
0x64
,
0x65
,
0x72
,
0x52
,
0x06
,
0x68
,
0x65
,
0x61
,
0x64
,
0x65
,
0x72
,
0x12
,
0x4
2
,
0x0a
,
0x0c
,
0x74
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x73
,
0x18
,
0x02
,
0x20
,
0x0
3
,
0x28
,
0x0b
,
0x32
,
0x
1e
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x65
,
0x62
,
0x61
,
0x64
,
0x65
,
0x72
,
0x52
,
0x06
,
0x68
,
0x65
,
0x61
,
0x64
,
0x65
,
0x72
,
0x12
,
0x4
6
,
0x0a
,
0x0c
,
0x74
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x73
,
0x18
,
0x02
,
0x20
,
0x0
1
,
0x28
,
0x0b
,
0x32
,
0x
22
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x54
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x52
,
0x0c
,
0x74
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x73
,
0x42
,
0xd3
,
0x01
,
0x0a
,
0x15
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x0a
,
0x42
,
0x6c
,
0x6f
,
0x63
,
0x6b
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x48
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2d
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x63
,
0x6f
,
0x6c
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2f
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x45
,
0x4e
,
0x58
,
0xaa
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x1d
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x13
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x3a
,
0x3a
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x6f
,
0x6e
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x52
,
0x0c
,
0x74
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x73
,
0x42
,
0xd3
,
0x01
,
0x0a
,
0x15
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x0a
,
0x42
,
0x6c
,
0x6f
,
0x63
,
0x6b
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x48
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2d
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x63
,
0x6f
,
0x6c
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2f
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x45
,
0x4e
,
0x58
,
0xaa
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x1d
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x13
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x3a
,
0x3a
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
@@ -217,11 +218,11 @@ var file_nebula_v1_block_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var
file_nebula_v1_block_proto_goTypes
=
[]
interface
{}{
(
*
BlockHeader
)(
nil
),
// 0: exchain.nebula.v1.BlockHeader
(
*
Block
)(
nil
),
// 1: exchain.nebula.v1.Block
(
*
Transaction
)(
nil
),
// 2: exchain.nebula.v1.Transaction
(
*
Transaction
List
)(
nil
),
// 2: exchain.nebula.v1.TransactionList
}
var
file_nebula_v1_block_proto_depIdxs
=
[]
int32
{
0
,
// 0: exchain.nebula.v1.Block.header:type_name -> exchain.nebula.v1.BlockHeader
2
,
// 1: exchain.nebula.v1.Block.transactions:type_name -> exchain.nebula.v1.Transaction
2
,
// 1: exchain.nebula.v1.Block.transactions:type_name -> exchain.nebula.v1.Transaction
List
2
,
// [2:2] is the sub-list for method output_type
2
,
// [2:2] is the sub-list for method input_type
2
,
// [2:2] is the sub-list for extension type_name
...
...
exchain/protocol/gen/go/nebula/v1/pair.pb.go
View file @
27019cdf
This diff is collapsed.
Click to expand it.
exchain/protocol/gen/go/nebula/v1/receipt.pb.go
View file @
27019cdf
...
...
@@ -412,6 +412,9 @@ type LimitOrderReceipt struct {
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
DoneOrders
[]
string
`protobuf:"bytes,1,rep,name=done_orders,json=doneOrders,proto3" json:"done_orders,omitempty"`
NewOrder
string
`protobuf:"bytes,2,opt,name=new_order,json=newOrder,proto3" json:"new_order,omitempty"`
}
func
(
x
*
LimitOrderReceipt
)
Reset
()
{
...
...
@@ -446,10 +449,27 @@ func (*LimitOrderReceipt) Descriptor() ([]byte, []int) {
return
file_nebula_v1_receipt_proto_rawDescGZIP
(),
[]
int
{
6
}
}
func
(
x
*
LimitOrderReceipt
)
GetDoneOrders
()
[]
string
{
if
x
!=
nil
{
return
x
.
DoneOrders
}
return
nil
}
func
(
x
*
LimitOrderReceipt
)
GetNewOrder
()
string
{
if
x
!=
nil
{
return
x
.
NewOrder
}
return
""
}
type
MarketOrderReceipt
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
DoneOrders
[]
string
`protobuf:"bytes,1,rep,name=done_orders,json=doneOrders,proto3" json:"done_orders,omitempty"`
NewOrder
string
`protobuf:"bytes,2,opt,name=new_order,json=newOrder,proto3" json:"new_order,omitempty"`
}
func
(
x
*
MarketOrderReceipt
)
Reset
()
{
...
...
@@ -484,10 +504,26 @@ func (*MarketOrderReceipt) Descriptor() ([]byte, []int) {
return
file_nebula_v1_receipt_proto_rawDescGZIP
(),
[]
int
{
7
}
}
func
(
x
*
MarketOrderReceipt
)
GetDoneOrders
()
[]
string
{
if
x
!=
nil
{
return
x
.
DoneOrders
}
return
nil
}
func
(
x
*
MarketOrderReceipt
)
GetNewOrder
()
string
{
if
x
!=
nil
{
return
x
.
NewOrder
}
return
""
}
type
CancelOrderReceipt
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
OrderId
string
`protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
}
func
(
x
*
CancelOrderReceipt
)
Reset
()
{
...
...
@@ -522,6 +558,13 @@ func (*CancelOrderReceipt) Descriptor() ([]byte, []int) {
return
file_nebula_v1_receipt_proto_rawDescGZIP
(),
[]
int
{
8
}
}
func
(
x
*
CancelOrderReceipt
)
GetOrderId
()
string
{
if
x
!=
nil
{
return
x
.
OrderId
}
return
""
}
var
File_nebula_v1_receipt_proto
protoreflect
.
FileDescriptor
var
file_nebula_v1_receipt_proto_rawDesc
=
[]
byte
{
...
...
@@ -585,25 +628,34 @@ var file_nebula_v1_receipt_proto_rawDesc = []byte{
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x22
,
0x13
,
0x0a
,
0x11
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x50
,
0x61
,
0x69
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x22
,
0x14
,
0x0a
,
0x12
,
0x44
,
0x69
,
0x73
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x50
,
0x61
,
0x69
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x22
,
0x13
,
0x0a
,
0x11
,
0x4c
,
0x69
,
0x6d
,
0x69
,
0x74
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x22
,
0x14
,
0x0a
,
0x12
,
0x4d
,
0x61
,
0x72
,
0x6b
,
0x65
,
0x74
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x22
,
0x14
,
0x0a
,
0x12
,
0x43
,
0x61
,
0x6e
,
0x63
,
0x65
,
0x6c
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x42
,
0xd5
,
0x01
,
0x0a
,
0x15
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x0c
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x48
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2d
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x63
,
0x6f
,
0x6c
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2f
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x45
,
0x4e
,
0x58
,
0xaa
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x1d
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x13
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x3a
,
0x3a
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x22
,
0x51
,
0x0a
,
0x11
,
0x4c
,
0x69
,
0x6d
,
0x69
,
0x74
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x12
,
0x1f
,
0x0a
,
0x0b
,
0x64
,
0x6f
,
0x6e
,
0x65
,
0x5f
,
0x6f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x0a
,
0x64
,
0x6f
,
0x6e
,
0x65
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x73
,
0x12
,
0x1b
,
0x0a
,
0x09
,
0x6e
,
0x65
,
0x77
,
0x5f
,
0x6f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6e
,
0x65
,
0x77
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x22
,
0x52
,
0x0a
,
0x12
,
0x4d
,
0x61
,
0x72
,
0x6b
,
0x65
,
0x74
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x12
,
0x1f
,
0x0a
,
0x0b
,
0x64
,
0x6f
,
0x6e
,
0x65
,
0x5f
,
0x6f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x0a
,
0x64
,
0x6f
,
0x6e
,
0x65
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x73
,
0x12
,
0x1b
,
0x0a
,
0x09
,
0x6e
,
0x65
,
0x77
,
0x5f
,
0x6f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6e
,
0x65
,
0x77
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x22
,
0x2f
,
0x0a
,
0x12
,
0x43
,
0x61
,
0x6e
,
0x63
,
0x65
,
0x6c
,
0x4f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x12
,
0x19
,
0x0a
,
0x08
,
0x6f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x5f
,
0x69
,
0x64
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x6f
,
0x72
,
0x64
,
0x65
,
0x72
,
0x49
,
0x64
,
0x42
,
0xd5
,
0x01
,
0x0a
,
0x15
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x0c
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x48
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2d
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x63
,
0x6f
,
0x6c
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2f
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x45
,
0x4e
,
0x58
,
0xaa
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x1d
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x13
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x3a
,
0x3a
,
0x4e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
exchain/protocol/gen/go/nebula/v1/transaction.pb.go
View file @
27019cdf
This diff is collapsed.
Click to expand it.
exchain/protocol/gen/go/node/v1/kline.pb.go
View file @
27019cdf
...
...
@@ -13,7 +13,7 @@ import (
protoimpl
"google.golang.org/protobuf/runtime/protoimpl"
_
"google.golang.org/protobuf/types/descriptorpb"
_
"google.golang.org/protobuf/types/known/emptypb"
timestamppb
"google.golang.org/protobuf/types/known/timestamppb"
_
"google.golang.org/protobuf/types/known/timestamppb"
reflect
"reflect"
sync
"sync"
)
...
...
@@ -35,7 +35,7 @@ type KLine struct {
HighestPrice
string
`protobuf:"bytes,3,opt,name=highest_price,json=highestPrice,proto3" json:"highest_price,omitempty"`
LowestPrice
string
`protobuf:"bytes,4,opt,name=lowest_price,json=lowestPrice,proto3" json:"lowest_price,omitempty"`
ClosePrice
string
`protobuf:"bytes,5,opt,name=close_price,json=closePrice,proto3" json:"close_price,omitempty"`
Time
*
timestamppb
.
Timestamp
`protobuf:"bytes,6,opt,name=time,proto3" json:"time
,omitempty"`
Time
stamp
int64
`protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp
,omitempty"`
Count
int64
`protobuf:"varint,7,opt,name=count,proto3" json:"count,omitempty"`
Volume
string
`protobuf:"bytes,8,opt,name=volume,proto3" json:"volume,omitempty"`
Turnover
string
`protobuf:"bytes,9,opt,name=turnover,proto3" json:"turnover,omitempty"`
...
...
@@ -108,11 +108,11 @@ func (x *KLine) GetClosePrice() string {
return
""
}
func
(
x
*
KLine
)
GetTime
()
*
timestamppb
.
Timestamp
{
func
(
x
*
KLine
)
GetTime
stamp
()
int64
{
if
x
!=
nil
{
return
x
.
Time
return
x
.
Time
stamp
}
return
nil
return
0
}
func
(
x
*
KLine
)
GetCount
()
int64
{
...
...
@@ -150,7 +150,7 @@ var file_node_v1_kline_proto_rawDesc = []byte{
0x6f
,
0x74
,
0x6f
,
0x1a
,
0x1f
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x2f
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x1a
,
0x18
,
0x6e
,
0x65
,
0x62
,
0x75
,
0x6c
,
0x61
,
0x2f
,
0x65
,
0x78
,
0x74
,
0x2f
,
0x6f
,
0x70
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x73
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x22
,
0x
a1
,
0x2f
,
0x6f
,
0x70
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x73
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x22
,
0x
8f
,
0x02
,
0x0a
,
0x05
,
0x4b
,
0x4c
,
0x69
,
0x6e
,
0x65
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x70
,
0x65
,
0x72
,
0x69
,
0x6f
,
0x64
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x70
,
0x65
,
0x72
,
0x69
,
0x6f
,
0x64
,
0x12
,
0x1d
,
0x0a
,
0x0a
,
0x6f
,
0x70
,
0x65
,
0x6e
,
0x5f
,
0x70
,
0x72
,
0x69
,
0x63
,
0x65
,
0x18
,
0x02
,
...
...
@@ -161,28 +161,26 @@ var file_node_v1_kline_proto_rawDesc = []byte{
0x72
,
0x69
,
0x63
,
0x65
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x6c
,
0x6f
,
0x77
,
0x65
,
0x73
,
0x74
,
0x50
,
0x72
,
0x69
,
0x63
,
0x65
,
0x12
,
0x1f
,
0x0a
,
0x0b
,
0x63
,
0x6c
,
0x6f
,
0x73
,
0x65
,
0x5f
,
0x70
,
0x72
,
0x69
,
0x63
,
0x65
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0a
,
0x63
,
0x6c
,
0x6f
,
0x73
,
0x65
,
0x50
,
0x72
,
0x69
,
0x63
,
0x65
,
0x12
,
0x2e
,
0x0a
,
0x04
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x1a
,
0x2e
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x2e
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x52
,
0x04
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x07
,
0x20
,
0x01
,
0x28
,
0x03
,
0x52
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x76
,
0x6f
,
0x6c
,
0x75
,
0x6d
,
0x65
,
0x18
,
0x08
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x76
,
0x6f
,
0x6c
,
0x75
,
0x6d
,
0x65
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x6f
,
0x76
,
0x65
,
0x72
,
0x18
,
0x09
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x6f
,
0x76
,
0x65
,
0x72
,
0x42
,
0xc5
,
0x01
,
0x0a
,
0x13
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x6f
,
0x64
,
0x65
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x0a
,
0x4b
,
0x6c
,
0x69
,
0x6e
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x44
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2d
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x63
,
0x6f
,
0x6c
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2f
,
0x6e
,
0x6f
,
0x64
,
0x65
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x6e
,
0x6f
,
0x64
,
0x65
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x45
,
0x4e
,
0x58
,
0xaa
,
0x02
,
0x0f
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x0f
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x1b
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x3a
,
0x3a
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x6f
,
0x73
,
0x65
,
0x50
,
0x72
,
0x69
,
0x63
,
0x65
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x03
,
0x52
,
0x09
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x07
,
0x20
,
0x01
,
0x28
,
0x03
,
0x52
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x76
,
0x6f
,
0x6c
,
0x75
,
0x6d
,
0x65
,
0x18
,
0x08
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x76
,
0x6f
,
0x6c
,
0x75
,
0x6d
,
0x65
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x6f
,
0x76
,
0x65
,
0x72
,
0x18
,
0x09
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x6f
,
0x76
,
0x65
,
0x72
,
0x42
,
0xc5
,
0x01
,
0x0a
,
0x13
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x6e
,
0x6f
,
0x64
,
0x65
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x0a
,
0x4b
,
0x6c
,
0x69
,
0x6e
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x44
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2d
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x65
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x63
,
0x6f
,
0x6c
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x67
,
0x6f
,
0x2f
,
0x6e
,
0x6f
,
0x64
,
0x65
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x6e
,
0x6f
,
0x64
,
0x65
,
0x76
,
0x31
,
0xa2
,
0x02
,
0x03
,
0x45
,
0x4e
,
0x58
,
0xaa
,
0x02
,
0x0f
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x2e
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x2e
,
0x56
,
0x31
,
0xca
,
0x02
,
0x0f
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x5c
,
0x56
,
0x31
,
0xe2
,
0x02
,
0x1b
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x5c
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x5c
,
0x56
,
0x31
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x11
,
0x45
,
0x78
,
0x63
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x3a
,
0x3a
,
0x4e
,
0x6f
,
0x64
,
0x65
,
0x3a
,
0x3a
,
0x56
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
@@ -200,15 +198,13 @@ func file_node_v1_kline_proto_rawDescGZIP() []byte {
var
file_node_v1_kline_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
1
)
var
file_node_v1_kline_proto_goTypes
=
[]
interface
{}{
(
*
KLine
)(
nil
),
// 0: exchain.node.v1.KLine
(
*
timestamppb
.
Timestamp
)(
nil
),
// 1: google.protobuf.Timestamp
}
var
file_node_v1_kline_proto_depIdxs
=
[]
int32
{
1
,
// 0: exchain.node.v1.KLine.time:type_name -> google.protobuf.Timestamp
1
,
// [1:1] is the sub-list for method output_type
1
,
// [1:1] is the sub-list for method input_type
1
,
// [1:1] is the sub-list for extension type_name
1
,
// [1:1] is the sub-list for extension extendee
0
,
// [0:1] is the sub-list for field type_name
0
,
// [0:0] is the sub-list for method output_type
0
,
// [0:0] is the sub-list for method input_type
0
,
// [0:0] is the sub-list for extension type_name
0
,
// [0:0] is the sub-list for extension extendee
0
,
// [0:0] is the sub-list for field type_name
}
func
init
()
{
file_node_v1_kline_proto_init
()
}
...
...
exchain/protocol/proto/nebula/v1/account.proto
View file @
27019cdf
...
...
@@ -15,7 +15,11 @@ option php_namespace = "ExChain\\Nebula\\v1";
// define account message.
message
Account
{
bytes
signer_proxy
=
1
;
repeated
Wallet
wallets
=
2
;
WalletList
wallets
=
2
;
}
message
WalletList
{
repeated
Wallet
wallets
=
1
;
}
message
Wallet
{
...
...
exchain/protocol/proto/nebula/v1/block.proto
View file @
27019cdf
...
...
@@ -18,10 +18,10 @@ message BlockHeader {
bytes
hash
=
2
;
bytes
parent_hash
=
3
;
uint64
timestamp
=
4
;
string
proposer
=
5
;
bytes
proposer
=
5
;
}
message
Block
{
BlockHeader
header
=
1
;
repeated
Transaction
transactions
=
2
;
TransactionList
transactions
=
2
;
}
exchain/protocol/proto/nebula/v1/transaction.proto
View file @
27019cdf
...
...
@@ -29,13 +29,17 @@ enum TxType {
message
Signature
{
bytes
r
=
1
;
bytes
s
=
2
;
bytes
v
=
3
;
int32
v
=
3
;
}
message
TransactionList
{
repeated
Transaction
txs
=
1
;
}
message
Transaction
{
string
user
=
1
;
bytes
nonce
=
2
;
TxType
tx_typ
e
=
3
;
TxType
tx_type
=
1
;
string
user
=
2
;
bytes
nonc
e
=
3
;
bool
proxy
=
4
;
oneof
tx
{
SignProxyTransaction
sign_proxy_tx
=
5
;
...
...
go.mod
View file @
27019cdf
...
...
@@ -182,6 +182,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nwaples/rardecode v1.1.3 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/oklog/ulid/v2 v2.1.0 // indirect
github.com/onsi/ginkgo/v2 v2.20.0 // indirect
github.com/opencontainers/runtime-spec v1.2.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
...
...
go.sum
View file @
27019cdf
...
...
@@ -609,6 +609,8 @@ github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU=
github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
...
...
@@ -641,6 +643,7 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM=
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=
...
...
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