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
b4a6fb77
Commit
b4a6fb77
authored
Feb 23, 2021
by
madengji
Committed by
vipwzw
Sep 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support deposit multi target
parent
b775d350
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
737 additions
and
551 deletions
+737
-551
mix.go
plugin/dapp/mix/commands/mix.go
+41
-48
authorize.go
plugin/dapp/mix/executor/authorize.go
+2
-2
deposit.go
plugin/dapp/mix/executor/deposit.go
+15
-11
transfer.go
plugin/dapp/mix/executor/transfer.go
+12
-6
withdraw.go
plugin/dapp/mix/executor/withdraw.go
+1
-1
mix.proto
plugin/dapp/mix/proto/mix.proto
+24
-19
mix.pb.go
plugin/dapp/mix/types/mix.pb.go
+325
-299
type.go
plugin/dapp/mix/types/type.go
+12
-0
exec.go
plugin/dapp/mix/wallet/exec.go
+32
-2
mix.go
plugin/dapp/mix/wallet/mix.go
+20
-17
mixbizdb.go
plugin/dapp/mix/wallet/mixbizdb.go
+18
-13
mixbizdb_test.go
plugin/dapp/mix/wallet/mixbizdb_test.go
+4
-4
txauth.go
plugin/dapp/mix/wallet/txauth.go
+2
-2
txdeposit.go
plugin/dapp/mix/wallet/txdeposit.go
+66
-34
txtransfer.go
plugin/dapp/mix/wallet/txtransfer.go
+150
-64
txwithdraw.go
plugin/dapp/mix/wallet/txwithdraw.go
+3
-2
util_test.go
plugin/dapp/mix/wallet/util_test.go
+10
-27
No files found.
plugin/dapp/mix/commands/mix.go
View file @
b4a6fb77
...
...
@@ -416,8 +416,8 @@ func createConfigPubKey(cmd *cobra.Command, args []string) {
func
mixConfigPaymentPubKeyParaCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"
pay
"
,
Short
:
"
mix payment pub key config
cmd"
,
Use
:
"
register
"
,
Short
:
"
receiver key register
cmd"
,
Run
:
createConfigPayPubKey
,
}
addPayPubKeyConfigFlags
(
cmd
)
...
...
@@ -629,7 +629,7 @@ func showMixTxs(cmd *cobra.Command, args []string) {
func
ShowPaymentPubKeyCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"paykey"
,
Short
:
"show
addr's payment pub
key info"
,
Short
:
"show
peer addr payment
key info"
,
Run
:
showPayment
,
}
addShowPaymentflags
(
cmd
)
...
...
@@ -637,7 +637,7 @@ func ShowPaymentPubKeyCmd() *cobra.Command {
}
func
addShowPaymentflags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"addr"
,
"
s"
,
""
,
"mix tx hash
"
)
cmd
.
Flags
()
.
StringP
(
"addr"
,
"
a"
,
""
,
"account addr
"
)
cmd
.
MarkFlagRequired
(
"addr"
)
}
...
...
@@ -677,7 +677,7 @@ func WalletCmd() *cobra.Command {
func
ShowAccountPrivacyInfo
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"keys"
,
Short
:
"show account privacy keys"
,
Short
:
"show account
note
privacy keys"
,
Run
:
accountPrivacy
,
}
accountPrivacyCmdFlags
(
cmd
)
...
...
@@ -685,17 +685,27 @@ func ShowAccountPrivacyInfo() *cobra.Command {
}
func
accountPrivacyCmdFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"account"
,
"a"
,
""
,
"accounts"
)
cmd
.
MarkFlagRequired
(
"account"
)
cmd
.
Flags
()
.
StringP
(
"addr"
,
"a"
,
""
,
"user wallet addr"
)
cmd
.
Flags
()
.
StringP
(
"priv"
,
"p"
,
""
,
"user wallet privacy key,option"
)
cmd
.
Flags
()
.
Uint32P
(
"detail"
,
"d"
,
0
,
"if get payment priv keys,option"
)
}
func
accountPrivacy
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
account
,
_
:=
cmd
.
Flags
()
.
GetString
(
"account"
)
priv
,
_
:=
cmd
.
Flags
()
.
GetString
(
"priv"
)
addr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"addr"
)
detail
,
_
:=
cmd
.
Flags
()
.
GetUint32
(
"detail"
)
if
len
(
priv
)
==
0
&&
len
(
addr
)
==
0
{
fmt
.
Println
(
"err: one of addr or priv should be fill"
)
return
}
var
res
mixTy
.
WalletAddrPrivacy
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"mix.ShowAccountPrivacyInfo"
,
&
types
.
ReqString
{
Data
:
account
},
&
res
)
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"mix.ShowAccountPrivacyInfo"
,
&
mixTy
.
PaymentKeysReq
{
PrivKey
:
priv
,
Addr
:
addr
,
Detail
:
int32
(
detail
)
},
&
res
)
ctx
.
Run
()
}
...
...
@@ -1023,14 +1033,14 @@ func CreateDepositRawTxCmd() *cobra.Command {
}
func
depositSecretCmdFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"
receiver"
,
"t"
,
""
,
"receiver addr
"
)
cmd
.
MarkFlagRequired
(
"
receiver
"
)
cmd
.
Flags
()
.
StringP
(
"
targets"
,
"t"
,
""
,
"target addrs,seperated by ','
"
)
cmd
.
MarkFlagRequired
(
"
targets
"
)
cmd
.
Flags
()
.
StringP
(
"return"
,
"r"
,
""
,
"return addr,optional"
)
cmd
.
Flags
()
.
StringP
(
"authorize"
,
"a"
,
""
,
"authorize addr,optional"
)
cmd
.
Flags
()
.
Uint64P
(
"amount"
,
"m"
,
0
,
"amount
"
)
cmd
.
Flags
()
.
StringP
(
"amount"
,
"m"
,
""
,
"amounts,seperated by ','
"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
StringP
(
"token"
,
"s"
,
"BTY"
,
"asset token, default BTY"
)
...
...
@@ -1044,33 +1054,30 @@ func depositSecretCmdFlags(cmd *cobra.Command) {
func
depositSecret
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
paraName
,
_
:=
cmd
.
Flags
()
.
GetString
(
"paraName"
)
receiver
,
_
:=
cmd
.
Flags
()
.
GetString
(
"receiver
"
)
targets
,
_
:=
cmd
.
Flags
()
.
GetString
(
"targets
"
)
returnAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"return"
)
authorize
,
_
:=
cmd
.
Flags
()
.
GetString
(
"authorize"
)
amount
,
_
:=
cmd
.
Flags
()
.
Get
Uint64
(
"amount"
)
amount
,
_
:=
cmd
.
Flags
()
.
Get
String
(
"amount"
)
assetExec
,
_
:=
cmd
.
Flags
()
.
GetString
(
"exec"
)
token
,
_
:=
cmd
.
Flags
()
.
GetString
(
"token"
)
path
,
_
:=
cmd
.
Flags
()
.
GetString
(
"path"
)
deposit
:=
&
mixTy
.
DepositInfo
{
Addr
:
receiver
,
ReceiverAddrs
:
targets
,
ReturnAddr
:
returnAddr
,
AuthorizeAddr
:
authorize
,
Amount
:
amount
,
}
circuits
:=
&
mixTy
.
CircuitPathInfo
{
Path
:
path
,
Amounts
:
amount
,
}
tx
:=
&
mixTy
.
DepositTxReq
{
Deposit
:
deposit
,
ZkPath
:
circuits
,
ZkPath
:
path
,
}
params
:=
&
mixTy
.
CreateRawTxReq
{
ActionTy
:
mixTy
.
MixActionDeposit
,
Data
:
types
.
Encode
(
tx
),
//Value:&mixTy.CreateRawTxReq_Deposit{Deposit:tx},
ActionTy
:
mixTy
.
MixActionDeposit
,
Data
:
types
.
Encode
(
tx
),
AssetExec
:
assetExec
,
AssetToken
:
token
,
Title
:
paraName
,
...
...
@@ -1092,17 +1099,17 @@ func CreateTransferRawTxCmd() *cobra.Command {
}
func
transferSecretCmdFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"noteHash"
,
"n"
,
""
,
"note hash to spend"
)
cmd
.
Flags
()
.
StringP
(
"noteHash"
,
"n"
,
""
,
"note hash to spend
, seperate by ','
"
)
cmd
.
MarkFlagRequired
(
"noteHash"
)
cmd
.
Flags
()
.
StringP
(
"toAddr"
,
"t"
,
""
,
"transfer to addr"
)
cmd
.
Flags
()
.
StringP
(
"toAddr"
,
"t"
,
""
,
"transfer to addr
, only one addr
"
)
cmd
.
MarkFlagRequired
(
"toAddr"
)
cmd
.
Flags
()
.
StringP
(
"auth"
,
"a"
,
""
,
"transfer to auth addr,optional"
)
cmd
.
Flags
()
.
StringP
(
"returner"
,
"r"
,
""
,
"transfer to returner addr,optional"
)
cmd
.
Flags
()
.
Uint64P
(
"amount"
,
"m"
,
0
,
"transfer amount"
)
cmd
.
Flags
()
.
StringP
(
"amount"
,
"m"
,
""
,
"transfer amount"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
StringP
(
"token"
,
"s"
,
"BTY"
,
"asset token, default BTY"
)
...
...
@@ -1122,7 +1129,7 @@ func transferSecret(cmd *cobra.Command, args []string) {
toAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"toAddr"
)
auth
,
_
:=
cmd
.
Flags
()
.
GetString
(
"auth"
)
returner
,
_
:=
cmd
.
Flags
()
.
GetString
(
"returner"
)
amount
,
_
:=
cmd
.
Flags
()
.
Get
Uint64
(
"amount"
)
amount
,
_
:=
cmd
.
Flags
()
.
Get
String
(
"amount"
)
inpath
,
_
:=
cmd
.
Flags
()
.
GetString
(
"inpath"
)
outpath
,
_
:=
cmd
.
Flags
()
.
GetString
(
"outpath"
)
...
...
@@ -1130,27 +1137,21 @@ func transferSecret(cmd *cobra.Command, args []string) {
assetExec
,
_
:=
cmd
.
Flags
()
.
GetString
(
"exec"
)
token
,
_
:=
cmd
.
Flags
()
.
GetString
(
"token"
)
inCircuits
:=
&
mixTy
.
CircuitPathInfo
{
Path
:
inpath
,
}
input
:=
&
mixTy
.
TransferInputTxReq
{
NoteHash
:
noteHash
,
ZkPath
:
inCircuits
,
NoteHash
s
:
noteHash
,
ZkPath
:
inpath
,
}
deposit
:=
&
mixTy
.
DepositInfo
{
Addr
:
toAddr
,
ReceiverAddrs
:
toAddr
,
ReturnAddr
:
returner
,
AuthorizeAddr
:
auth
,
Amount
:
amount
,
}
outCircuits
:=
&
mixTy
.
CircuitPathInfo
{
Path
:
outpath
,
Amounts
:
amount
,
}
output
:=
&
mixTy
.
TransferOutputTxReq
{
Deposit
:
deposit
,
ZkPath
:
out
Circuits
,
ZkPath
:
out
path
,
}
req
:=
&
mixTy
.
TransferTxReq
{
...
...
@@ -1206,14 +1207,10 @@ func withdrawSecret(cmd *cobra.Command, args []string) {
path
,
_
:=
cmd
.
Flags
()
.
GetString
(
"path"
)
circuits
:=
&
mixTy
.
CircuitPathInfo
{
Path
:
path
,
}
req
:=
&
mixTy
.
WithdrawTxReq
{
TotalAmount
:
amount
,
NoteHashs
:
noteHashs
,
ZkPath
:
circuits
,
ZkPath
:
path
,
}
params
:=
&
mixTy
.
CreateRawTxReq
{
...
...
@@ -1265,14 +1262,10 @@ func authSecret(cmd *cobra.Command, args []string) {
path
,
_
:=
cmd
.
Flags
()
.
GetString
(
"path"
)
circuits
:=
&
mixTy
.
CircuitPathInfo
{
Path
:
path
,
}
req
:=
&
mixTy
.
AuthTxReq
{
AuthorizeToAddr
:
toKey
,
NoteHash
:
noteHash
,
ZkPath
:
circuits
,
ZkPath
:
path
,
}
params
:=
&
mixTy
.
CreateRawTxReq
{
...
...
plugin/dapp/mix/executor/authorize.go
View file @
b4a6fb77
...
...
@@ -95,9 +95,9 @@ func (a *action) Authorize(authorize *mixTy.MixAuthorizeAction) (*types.Receipt,
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
var
auths
,
authSpends
[]
string
for
_
,
in
:=
range
inputs
{
r
:=
makeReceipt
(
calcAuthorizeHashKey
(
in
.
AuthorizeHash
),
mixTy
.
TyLogAuthorizeSet
,
&
mixTy
.
ExistValue
{
Data
:
true
})
r
:=
makeReceipt
(
calcAuthorizeHashKey
(
in
.
AuthorizeHash
),
mixTy
.
TyLogAuthorizeSet
,
&
mixTy
.
ExistValue
{
Nullifier
:
in
.
AuthorizeHash
,
Exist
:
true
})
mergeReceipt
(
receipt
,
r
)
r
=
makeReceipt
(
calcAuthorizeSpendHashKey
(
in
.
AuthorizeSpendHash
),
mixTy
.
TyLogAuthorizeSpendSet
,
&
mixTy
.
ExistValue
{
Data
:
true
})
r
=
makeReceipt
(
calcAuthorizeSpendHashKey
(
in
.
AuthorizeSpendHash
),
mixTy
.
TyLogAuthorizeSpendSet
,
&
mixTy
.
ExistValue
{
Nullifier
:
in
.
AuthorizeSpendHash
,
Exist
:
true
})
mergeReceipt
(
receipt
,
r
)
auths
=
append
(
auths
,
in
.
AuthorizeHash
)
authSpends
=
append
(
authSpends
,
in
.
AuthorizeSpendHash
)
...
...
plugin/dapp/mix/executor/deposit.go
View file @
b4a6fb77
...
...
@@ -83,15 +83,17 @@ func (a *action) depositVerify(proof *mixTy.ZkProofInfo) (string, uint64, error)
4. add new commits to merkle tree
*/
func
(
a
*
action
)
Deposit
(
deposit
*
mixTy
.
MixDepositAction
)
(
*
types
.
Receipt
,
error
)
{
var
notes
[]
string
var
sum
uint64
//1. zk-proof校验
noteHash
,
amount
,
err
:=
a
.
depositVerify
(
deposit
.
Proof
)
if
err
!=
nil
{
return
nil
,
err
for
_
,
p
:=
range
deposit
.
Proofs
{
noteHash
,
amount
,
err
:=
a
.
depositVerify
(
p
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"verify fail for input=%s"
,
p
.
PublicInput
)
}
sum
+=
amount
notes
=
append
(
notes
,
noteHash
)
}
////校验存款额,目前只支持一次只存一张支票
//if val != deposit.Amount {
// return nil, errors.Wrapf(mixTy.ErrInputParaNotMatch, "deposit amount=%d not equal proof amount=%d", deposit.Amount, val)
//}
//存款
cfg
:=
a
.
api
.
GetConfig
()
...
...
@@ -101,16 +103,18 @@ func (a *action) Deposit(deposit *mixTy.MixDepositAction) (*types.Receipt, error
}
//主链上存入toAddr为mix 执行器地址,平行链上为user.p.{}.mix执行器地址,execAddr和toAddr一致
execAddr
:=
address
.
ExecAddress
(
string
(
a
.
tx
.
Execer
))
receipt
,
err
:=
accoutDb
.
ExecTransfer
(
a
.
fromaddr
,
execAddr
,
execAddr
,
int64
(
amount
))
receipt
,
err
:=
accoutDb
.
ExecTransfer
(
a
.
fromaddr
,
execAddr
,
execAddr
,
int64
(
sum
))
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"
ExecTransfer
"
)
return
nil
,
errors
.
Wrapf
(
err
,
"
account save to exec
"
)
}
//push new commit to merkle tree
var
leaves
[][]
byte
leaves
=
append
(
leaves
,
transferFr2Bytes
(
noteHash
))
for
_
,
n
:=
range
notes
{
leaves
=
append
(
leaves
,
transferFr2Bytes
(
n
))
}
rpt
,
err
:=
pushTree
(
a
.
db
,
leaves
)
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
ors
.
Wrap
(
err
,
"pushTree"
)
}
mergeReceipt
(
receipt
,
rpt
)
...
...
plugin/dapp/mix/executor/transfer.go
View file @
b4a6fb77
...
...
@@ -111,17 +111,23 @@ func MixTransferInfoVerify(db dbm.KV, transfer *mixTy.MixTransferAction) ([]*mix
var
inputs
[]
*
mixTy
.
TransferInputPublicInput
var
outputs
[]
*
mixTy
.
TransferOutputPublicInput
in
,
err
:=
transferInputVerify
(
db
,
transfer
.
Input
)
if
err
!=
nil
{
return
nil
,
nil
,
err
//inputs
for
_
,
i
:=
range
transfer
.
Inputs
{
in
,
err
:=
transferInputVerify
(
db
,
i
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
inputs
=
append
(
inputs
,
in
)
}
inputs
=
append
(
inputs
,
in
)
//output
out
,
err
:=
transferOutputVerify
(
db
,
transfer
.
Output
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
outputs
=
append
(
outputs
,
out
)
//change
change
,
err
:=
transferOutputVerify
(
db
,
transfer
.
Change
)
if
err
!=
nil
{
return
nil
,
nil
,
err
...
...
@@ -129,7 +135,7 @@ func MixTransferInfoVerify(db dbm.KV, transfer *mixTy.MixTransferAction) ([]*mix
outputs
=
append
(
outputs
,
change
)
if
!
VerifyCommitValues
(
inputs
,
outputs
)
{
return
nil
,
nil
,
errors
.
Wrap
(
mixTy
.
ErrSpendInOutValueNotMatch
,
"verifyValue"
)
return
nil
,
nil
,
errors
.
Wrap
(
mixTy
.
ErrSpendInOutValueNotMatch
,
"verify
shield
Value"
)
}
return
inputs
,
outputs
,
nil
...
...
@@ -148,7 +154,7 @@ func (a *action) Transfer(transfer *mixTy.MixTransferAction) (*types.Receipt, er
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
for
_
,
k
:=
range
inputs
{
r
:=
makeNullifierSetReceipt
(
k
.
NullifierHash
,
&
mixTy
.
ExistValue
{
Data
:
true
})
r
:=
makeNullifierSetReceipt
(
k
.
NullifierHash
,
&
mixTy
.
ExistValue
{
Nullifier
:
k
.
NullifierHash
,
Exist
:
true
})
mergeReceipt
(
receipt
,
r
)
}
...
...
plugin/dapp/mix/executor/withdraw.go
View file @
b4a6fb77
...
...
@@ -111,7 +111,7 @@ func (a *action) Withdraw(withdraw *mixTy.MixWithdrawAction) (*types.Receipt, er
//set nullifier
for
_
,
k
:=
range
nulliferSet
{
r
:=
makeNullifierSetReceipt
(
k
,
&
mixTy
.
ExistValue
{
Data
:
true
})
r
:=
makeNullifierSetReceipt
(
k
,
&
mixTy
.
ExistValue
{
Nullifier
:
k
,
Exist
:
true
})
mergeReceipt
(
receipt
,
r
)
}
return
receipt
,
nil
...
...
plugin/dapp/mix/proto/mix.proto
View file @
b4a6fb77
...
...
@@ -84,12 +84,12 @@ message ZkProofInfo {
}
message
MixDepositAction
{
ZkProofInfo
proof
=
1
;
repeated
ZkProofInfo
proofs
=
1
;
}
message
MixTransferAction
{
ZkProofInfo
input
=
1
;
repeated
ZkProofInfo
inputs
=
1
;
ZkProofInfo
output
=
2
;
ZkProofInfo
change
=
3
;
...
...
@@ -120,7 +120,6 @@ message MixAction {
}
message
DepositPublicInput
{
string
noteHash
=
1
;
string
amount
=
2
;
...
...
@@ -168,7 +167,8 @@ message VerifyProofInfo{
//nullifer 存在value
message
ExistValue
{
bool
data
=
1
;
string
nullifier
=
1
;
bool
exist
=
2
;
}
message
CommitTreeLeaves
{
...
...
@@ -248,22 +248,21 @@ message DecryptSecretData{
}
//path+filename, filename can take default
message
circuitPathInfo
{
string
path
=
1
;
}
//支持同时存入多个地址,多个地址具有相同的returnAddr和AuthorizeAddr,如果不同,则单个来存
message
DepositInfo
{
string
addr
=
1
;
string
receiverAddrs
=
1
;
string
returnAddr
=
2
;
string
authorizeAddr
=
3
;
uint64
amount
=
4
;
string
amounts
=
4
;
}
//钱包生成deposit tx
message
DepositTxReq
{
DepositInfo
deposit
=
1
;
circuitPathInfo
zkPath
=
2
;
string
zkPath
=
2
;
}
...
...
@@ -285,8 +284,8 @@ message TreePathProof{
//可withdraw 多个note
message
WithdrawTxReq
{
uint64
totalAmount
=
1
;
string
noteHashs
=
2
;
circuitPathInfo
zkPath
=
3
;
string
noteHashs
=
2
;
// seperate by ","
string
zkPath
=
3
;
}
...
...
@@ -306,7 +305,7 @@ message WithdrawProofRe{
message
AuthTxReq
{
string
noteHash
=
1
;
string
authorizeToAddr
=
3
;
circuitPathInfo
zkPath
=
4
;
string
zkPath
=
4
;
}
message
AuthProofRe
{
...
...
@@ -322,13 +321,13 @@ message AuthProofRe{
}
message
TransferInputTxReq
{
string
noteHash
=
1
;
circuitPathInfo
zkPath
=
2
;
string
noteHash
s
=
1
;
string
zkPath
=
2
;
}
message
TransferOutputTxReq
{
DepositInfo
deposit
=
1
;
circuitPathInfo
zkPath
=
2
;
string
zkPath
=
2
;
}
message
TransferTxReq
{
...
...
@@ -371,10 +370,10 @@ message TransferProofResp{
}
message
ShieldAmountRst
{
string
inputRandom
=
1
;
repeated
string
inputRandoms
=
1
;
string
outputRandom
=
2
;
string
changeRandom
=
3
;
ShieldAmount
input
=
4
;
repeated
ShieldAmount
inputs
=
4
;
ShieldAmount
output
=
5
;
ShieldAmount
change
=
6
;
...
...
@@ -390,6 +389,12 @@ message CreateRawTxReq{
}
message
PaymentKeysReq
{
string
privKey
=
1
;
//user wallet priv key
string
addr
=
2
;
//user addr
int32
detail
=
3
;
//获取私钥信息
}
enum
NoteStatus
{
UNDEF
=
0
;
VALID
=
1
;
//已授权可使用
...
...
plugin/dapp/mix/types/mix.pb.go
View file @
b4a6fb77
...
...
@@ -657,10 +657,10 @@ func (m *ZkProofInfo) GetSecrets() *DHSecretGroup {
}
type
MixDepositAction
struct
{
Proof
*
ZkProofInfo
`protobuf:"bytes,1,opt,name=proof,proto3" json:"proof
,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
Proof
s
[]
*
ZkProofInfo
`protobuf:"bytes,1,rep,name=proofs,proto3" json:"proofs
,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
MixDepositAction
)
Reset
()
{
*
m
=
MixDepositAction
{}
}
...
...
@@ -688,20 +688,20 @@ func (m *MixDepositAction) XXX_DiscardUnknown() {
var
xxx_messageInfo_MixDepositAction
proto
.
InternalMessageInfo
func
(
m
*
MixDepositAction
)
GetProof
()
*
ZkProofInfo
{
func
(
m
*
MixDepositAction
)
GetProof
s
()
[]
*
ZkProofInfo
{
if
m
!=
nil
{
return
m
.
Proof
return
m
.
Proof
s
}
return
nil
}
type
MixTransferAction
struct
{
Input
*
ZkProofInfo
`protobuf:"bytes,1,opt,name=input,proto3" json:"input
,omitempty"`
Output
*
ZkProofInfo
`protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
Change
*
ZkProofInfo
`protobuf:"bytes,3,opt,name=change,proto3" json:"change,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
Input
s
[]
*
ZkProofInfo
`protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs
,omitempty"`
Output
*
ZkProofInfo
`protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
Change
*
ZkProofInfo
`protobuf:"bytes,3,opt,name=change,proto3" json:"change,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
MixTransferAction
)
Reset
()
{
*
m
=
MixTransferAction
{}
}
...
...
@@ -729,9 +729,9 @@ func (m *MixTransferAction) XXX_DiscardUnknown() {
var
xxx_messageInfo_MixTransferAction
proto
.
InternalMessageInfo
func
(
m
*
MixTransferAction
)
GetInput
()
*
ZkProofInfo
{
func
(
m
*
MixTransferAction
)
GetInput
s
()
[]
*
ZkProofInfo
{
if
m
!=
nil
{
return
m
.
Input
return
m
.
Input
s
}
return
nil
}
...
...
@@ -1317,7 +1317,8 @@ func (m *VerifyProofInfo) GetProof() *ZkProofInfo {
//nullifer 存在value
type
ExistValue
struct
{
Data
bool
`protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"`
Nullifier
string
`protobuf:"bytes,1,opt,name=nullifier,proto3" json:"nullifier,omitempty"`
Exist
bool
`protobuf:"varint,2,opt,name=exist,proto3" json:"exist,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -1348,9 +1349,16 @@ func (m *ExistValue) XXX_DiscardUnknown() {
var
xxx_messageInfo_ExistValue
proto
.
InternalMessageInfo
func
(
m
*
ExistValue
)
Get
Data
()
bool
{
func
(
m
*
ExistValue
)
Get
Nullifier
()
string
{
if
m
!=
nil
{
return
m
.
Data
return
m
.
Nullifier
}
return
""
}
func
(
m
*
ExistValue
)
GetExist
()
bool
{
if
m
!=
nil
{
return
m
.
Exist
}
return
false
}
...
...
@@ -1958,51 +1966,12 @@ func (m *DecryptSecretData) GetPeerKey() string {
return
""
}
//path+filename, filename can take default
type
CircuitPathInfo
struct
{
Path
string
`protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
CircuitPathInfo
)
Reset
()
{
*
m
=
CircuitPathInfo
{}
}
func
(
m
*
CircuitPathInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CircuitPathInfo
)
ProtoMessage
()
{}
func
(
*
CircuitPathInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
32
}
}
func
(
m
*
CircuitPathInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_CircuitPathInfo
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
CircuitPathInfo
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_CircuitPathInfo
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
CircuitPathInfo
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_CircuitPathInfo
.
Merge
(
m
,
src
)
}
func
(
m
*
CircuitPathInfo
)
XXX_Size
()
int
{
return
xxx_messageInfo_CircuitPathInfo
.
Size
(
m
)
}
func
(
m
*
CircuitPathInfo
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_CircuitPathInfo
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_CircuitPathInfo
proto
.
InternalMessageInfo
func
(
m
*
CircuitPathInfo
)
GetPath
()
string
{
if
m
!=
nil
{
return
m
.
Path
}
return
""
}
//支持同时存入多个地址,多个地址具有相同的returnAddr和AuthorizeAddr,如果不同,则单个来存
type
DepositInfo
struct
{
Addr
string
`protobuf:"bytes,1,opt,name=addr,proto3" json:"addr
,omitempty"`
ReceiverAddrs
string
`protobuf:"bytes,1,opt,name=receiverAddrs,proto3" json:"receiverAddrs
,omitempty"`
ReturnAddr
string
`protobuf:"bytes,2,opt,name=returnAddr,proto3" json:"returnAddr,omitempty"`
AuthorizeAddr
string
`protobuf:"bytes,3,opt,name=authorizeAddr,proto3" json:"authorizeAddr,omitempty"`
Amount
uint64
`protobuf:"varint,4,opt,name=amount,proto3" json:"amount
,omitempty"`
Amount
s
string
`protobuf:"bytes,4,opt,name=amounts,proto3" json:"amounts
,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -2012,7 +1981,7 @@ func (m *DepositInfo) Reset() { *m = DepositInfo{} }
func
(
m
*
DepositInfo
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
DepositInfo
)
ProtoMessage
()
{}
func
(
*
DepositInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
3
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
2
}
}
func
(
m
*
DepositInfo
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2033,9 +2002,9 @@ func (m *DepositInfo) XXX_DiscardUnknown() {
var
xxx_messageInfo_DepositInfo
proto
.
InternalMessageInfo
func
(
m
*
DepositInfo
)
Get
Addr
()
string
{
func
(
m
*
DepositInfo
)
Get
ReceiverAddrs
()
string
{
if
m
!=
nil
{
return
m
.
Addr
return
m
.
ReceiverAddrs
}
return
""
}
...
...
@@ -2054,27 +2023,27 @@ func (m *DepositInfo) GetAuthorizeAddr() string {
return
""
}
func
(
m
*
DepositInfo
)
GetAmount
()
uint64
{
func
(
m
*
DepositInfo
)
GetAmount
s
()
string
{
if
m
!=
nil
{
return
m
.
Amount
return
m
.
Amount
s
}
return
0
return
""
}
//钱包生成deposit tx
type
DepositTxReq
struct
{
Deposit
*
DepositInfo
`protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
ZkPath
*
CircuitPathInfo
`protobuf:"bytes,2,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
Deposit
*
DepositInfo
`protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
ZkPath
string
`protobuf:"bytes,2,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
DepositTxReq
)
Reset
()
{
*
m
=
DepositTxReq
{}
}
func
(
m
*
DepositTxReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
DepositTxReq
)
ProtoMessage
()
{}
func
(
*
DepositTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
4
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
3
}
}
func
(
m
*
DepositTxReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2102,11 +2071,11 @@ func (m *DepositTxReq) GetDeposit() *DepositInfo {
return
nil
}
func
(
m
*
DepositTxReq
)
GetZkPath
()
*
CircuitPathInfo
{
func
(
m
*
DepositTxReq
)
GetZkPath
()
string
{
if
m
!=
nil
{
return
m
.
ZkPath
}
return
nil
return
""
}
type
DepositProofResp
struct
{
...
...
@@ -2122,7 +2091,7 @@ func (m *DepositProofResp) Reset() { *m = DepositProofResp{} }
func
(
m
*
DepositProofResp
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
DepositProofResp
)
ProtoMessage
()
{}
func
(
*
DepositProofResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
5
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
4
}
}
func
(
m
*
DepositProofResp
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2177,7 +2146,7 @@ func (m *TreePathProof) Reset() { *m = TreePathProof{} }
func
(
m
*
TreePathProof
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TreePathProof
)
ProtoMessage
()
{}
func
(
*
TreePathProof
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
6
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
5
}
}
func
(
m
*
TreePathProof
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2221,19 +2190,19 @@ func (m *TreePathProof) GetHelpers() []uint32 {
//可withdraw 多个note
type
WithdrawTxReq
struct
{
TotalAmount
uint64
`protobuf:"varint,1,opt,name=totalAmount,proto3" json:"totalAmount,omitempty"`
NoteHashs
string
`protobuf:"bytes,2,opt,name=noteHashs,proto3" json:"noteHashs,omitempty"`
ZkPath
*
CircuitPathInfo
`protobuf:"bytes,3,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
TotalAmount
uint64
`protobuf:"varint,1,opt,name=totalAmount,proto3" json:"totalAmount,omitempty"`
NoteHashs
string
`protobuf:"bytes,2,opt,name=noteHashs,proto3" json:"noteHashs,omitempty"`
ZkPath
string
`protobuf:"bytes,3,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
WithdrawTxReq
)
Reset
()
{
*
m
=
WithdrawTxReq
{}
}
func
(
m
*
WithdrawTxReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
WithdrawTxReq
)
ProtoMessage
()
{}
func
(
*
WithdrawTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
7
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
6
}
}
func
(
m
*
WithdrawTxReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2268,11 +2237,11 @@ func (m *WithdrawTxReq) GetNoteHashs() string {
return
""
}
func
(
m
*
WithdrawTxReq
)
GetZkPath
()
*
CircuitPathInfo
{
func
(
m
*
WithdrawTxReq
)
GetZkPath
()
string
{
if
m
!=
nil
{
return
m
.
ZkPath
}
return
nil
return
""
}
type
WithdrawProofRe
struct
{
...
...
@@ -2293,7 +2262,7 @@ func (m *WithdrawProofRe) Reset() { *m = WithdrawProofRe{} }
func
(
m
*
WithdrawProofRe
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
WithdrawProofRe
)
ProtoMessage
()
{}
func
(
*
WithdrawProofRe
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
8
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
7
}
}
func
(
m
*
WithdrawProofRe
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2372,19 +2341,19 @@ func (m *WithdrawProofRe) GetTreeProof() *TreePathProof {
//只授权一个note,超过一个,toAddr不好设置
type
AuthTxReq
struct
{
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
AuthorizeToAddr
string
`protobuf:"bytes,3,opt,name=authorizeToAddr,proto3" json:"authorizeToAddr,omitempty"`
ZkPath
*
CircuitPathInfo
`protobuf:"bytes,4,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
AuthorizeToAddr
string
`protobuf:"bytes,3,opt,name=authorizeToAddr,proto3" json:"authorizeToAddr,omitempty"`
ZkPath
string
`protobuf:"bytes,4,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
AuthTxReq
)
Reset
()
{
*
m
=
AuthTxReq
{}
}
func
(
m
*
AuthTxReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
AuthTxReq
)
ProtoMessage
()
{}
func
(
*
AuthTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
9
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
3
8
}
}
func
(
m
*
AuthTxReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2419,11 +2388,11 @@ func (m *AuthTxReq) GetAuthorizeToAddr() string {
return
""
}
func
(
m
*
AuthTxReq
)
GetZkPath
()
*
CircuitPathInfo
{
func
(
m
*
AuthTxReq
)
GetZkPath
()
string
{
if
m
!=
nil
{
return
m
.
ZkPath
}
return
nil
return
""
}
type
AuthProofRe
struct
{
...
...
@@ -2444,7 +2413,7 @@ func (m *AuthProofRe) Reset() { *m = AuthProofRe{} }
func
(
m
*
AuthProofRe
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
AuthProofRe
)
ProtoMessage
()
{}
func
(
*
AuthProofRe
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
40
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
39
}
}
func
(
m
*
AuthProofRe
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2522,18 +2491,18 @@ func (m *AuthProofRe) GetTreeProof() *TreePathProof {
}
type
TransferInputTxReq
struct
{
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash
,omitempty"`
ZkPath
*
CircuitPathInfo
`protobuf:"bytes,2,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
NoteHash
s
string
`protobuf:"bytes,1,opt,name=noteHashs,proto3" json:"noteHashs
,omitempty"`
ZkPath
string
`protobuf:"bytes,2,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TransferInputTxReq
)
Reset
()
{
*
m
=
TransferInputTxReq
{}
}
func
(
m
*
TransferInputTxReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransferInputTxReq
)
ProtoMessage
()
{}
func
(
*
TransferInputTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
1
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
0
}
}
func
(
m
*
TransferInputTxReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2554,33 +2523,33 @@ func (m *TransferInputTxReq) XXX_DiscardUnknown() {
var
xxx_messageInfo_TransferInputTxReq
proto
.
InternalMessageInfo
func
(
m
*
TransferInputTxReq
)
GetNoteHash
()
string
{
func
(
m
*
TransferInputTxReq
)
GetNoteHash
s
()
string
{
if
m
!=
nil
{
return
m
.
NoteHash
return
m
.
NoteHash
s
}
return
""
}
func
(
m
*
TransferInputTxReq
)
GetZkPath
()
*
CircuitPathInfo
{
func
(
m
*
TransferInputTxReq
)
GetZkPath
()
string
{
if
m
!=
nil
{
return
m
.
ZkPath
}
return
nil
return
""
}
type
TransferOutputTxReq
struct
{
Deposit
*
DepositInfo
`protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
ZkPath
*
CircuitPathInfo
`protobuf:"bytes,2,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
Deposit
*
DepositInfo
`protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
ZkPath
string
`protobuf:"bytes,2,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
TransferOutputTxReq
)
Reset
()
{
*
m
=
TransferOutputTxReq
{}
}
func
(
m
*
TransferOutputTxReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransferOutputTxReq
)
ProtoMessage
()
{}
func
(
*
TransferOutputTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
2
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
1
}
}
func
(
m
*
TransferOutputTxReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2608,11 +2577,11 @@ func (m *TransferOutputTxReq) GetDeposit() *DepositInfo {
return
nil
}
func
(
m
*
TransferOutputTxReq
)
GetZkPath
()
*
CircuitPathInfo
{
func
(
m
*
TransferOutputTxReq
)
GetZkPath
()
string
{
if
m
!=
nil
{
return
m
.
ZkPath
}
return
nil
return
""
}
type
TransferTxReq
struct
{
...
...
@@ -2627,7 +2596,7 @@ func (m *TransferTxReq) Reset() { *m = TransferTxReq{} }
func
(
m
*
TransferTxReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransferTxReq
)
ProtoMessage
()
{}
func
(
*
TransferTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
3
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
2
}
}
func
(
m
*
TransferTxReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2675,7 +2644,7 @@ func (m *ShieldAmount) Reset() { *m = ShieldAmount{} }
func
(
m
*
ShieldAmount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ShieldAmount
)
ProtoMessage
()
{}
func
(
*
ShieldAmount
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
4
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
3
}
}
func
(
m
*
ShieldAmount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2730,7 +2699,7 @@ func (m *TransferInputProof) Reset() { *m = TransferInputProof{} }
func
(
m
*
TransferInputProof
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransferInputProof
)
ProtoMessage
()
{}
func
(
*
TransferInputProof
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
5
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
4
}
}
func
(
m
*
TransferInputProof
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2836,7 +2805,7 @@ func (m *TransferOutputProof) Reset() { *m = TransferOutputProof{} }
func
(
m
*
TransferOutputProof
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransferOutputProof
)
ProtoMessage
()
{}
func
(
*
TransferOutputProof
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
6
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
5
}
}
func
(
m
*
TransferOutputProof
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2905,7 +2874,7 @@ func (m *TransferProofResp) Reset() { *m = TransferProofResp{} }
func
(
m
*
TransferProofResp
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TransferProofResp
)
ProtoMessage
()
{}
func
(
*
TransferProofResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
7
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
6
}
}
func
(
m
*
TransferProofResp
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2948,22 +2917,22 @@ func (m *TransferProofResp) GetChangeOutput() *TransferOutputProof {
}
type
ShieldAmountRst
struct
{
InputRandom
string
`protobuf:"bytes,1,opt,name=inputRandom,proto3" json:"inputRandom
,omitempty"`
OutputRandom
string
`protobuf:"bytes,2,opt,name=outputRandom,proto3" json:"outputRandom,omitempty"`
ChangeRandom
string
`protobuf:"bytes,3,opt,name=changeRandom,proto3" json:"changeRandom,omitempty"`
Input
*
ShieldAmount
`protobuf:"bytes,4,opt,name=input,proto3" json:"input
,omitempty"`
Output
*
ShieldAmount
`protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
Change
*
ShieldAmount
`protobuf:"bytes,6,opt,name=change,proto3" json:"change,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
InputRandom
s
[]
string
`protobuf:"bytes,1,rep,name=inputRandoms,proto3" json:"inputRandoms
,omitempty"`
OutputRandom
string
`protobuf:"bytes,2,opt,name=outputRandom,proto3" json:"outputRandom,omitempty"`
ChangeRandom
string
`protobuf:"bytes,3,opt,name=changeRandom,proto3" json:"changeRandom,omitempty"`
Input
s
[]
*
ShieldAmount
`protobuf:"bytes,4,rep,name=inputs,proto3" json:"inputs
,omitempty"`
Output
*
ShieldAmount
`protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
Change
*
ShieldAmount
`protobuf:"bytes,6,opt,name=change,proto3" json:"change,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ShieldAmountRst
)
Reset
()
{
*
m
=
ShieldAmountRst
{}
}
func
(
m
*
ShieldAmountRst
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ShieldAmountRst
)
ProtoMessage
()
{}
func
(
*
ShieldAmountRst
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
8
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
7
}
}
func
(
m
*
ShieldAmountRst
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -2984,11 +2953,11 @@ func (m *ShieldAmountRst) XXX_DiscardUnknown() {
var
xxx_messageInfo_ShieldAmountRst
proto
.
InternalMessageInfo
func
(
m
*
ShieldAmountRst
)
GetInputRandom
()
string
{
func
(
m
*
ShieldAmountRst
)
GetInputRandom
s
()
[]
string
{
if
m
!=
nil
{
return
m
.
InputRandom
return
m
.
InputRandom
s
}
return
""
return
nil
}
func
(
m
*
ShieldAmountRst
)
GetOutputRandom
()
string
{
...
...
@@ -3005,9 +2974,9 @@ func (m *ShieldAmountRst) GetChangeRandom() string {
return
""
}
func
(
m
*
ShieldAmountRst
)
GetInput
()
*
ShieldAmount
{
func
(
m
*
ShieldAmountRst
)
GetInput
s
()
[]
*
ShieldAmount
{
if
m
!=
nil
{
return
m
.
Input
return
m
.
Input
s
}
return
nil
}
...
...
@@ -3041,7 +3010,7 @@ func (m *CreateRawTxReq) Reset() { *m = CreateRawTxReq{} }
func
(
m
*
CreateRawTxReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CreateRawTxReq
)
ProtoMessage
()
{}
func
(
*
CreateRawTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
9
}
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
4
8
}
}
func
(
m
*
CreateRawTxReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
...
@@ -3097,6 +3066,61 @@ func (m *CreateRawTxReq) GetTitle() string {
return
""
}
type
PaymentKeysReq
struct
{
PrivKey
string
`protobuf:"bytes,1,opt,name=privKey,proto3" json:"privKey,omitempty"`
Addr
string
`protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Detail
int32
`protobuf:"varint,3,opt,name=detail,proto3" json:"detail,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
PaymentKeysReq
)
Reset
()
{
*
m
=
PaymentKeysReq
{}
}
func
(
m
*
PaymentKeysReq
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PaymentKeysReq
)
ProtoMessage
()
{}
func
(
*
PaymentKeysReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_5c21d519a9be369a
,
[]
int
{
49
}
}
func
(
m
*
PaymentKeysReq
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_PaymentKeysReq
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
PaymentKeysReq
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_PaymentKeysReq
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
PaymentKeysReq
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_PaymentKeysReq
.
Merge
(
m
,
src
)
}
func
(
m
*
PaymentKeysReq
)
XXX_Size
()
int
{
return
xxx_messageInfo_PaymentKeysReq
.
Size
(
m
)
}
func
(
m
*
PaymentKeysReq
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_PaymentKeysReq
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_PaymentKeysReq
proto
.
InternalMessageInfo
func
(
m
*
PaymentKeysReq
)
GetPrivKey
()
string
{
if
m
!=
nil
{
return
m
.
PrivKey
}
return
""
}
func
(
m
*
PaymentKeysReq
)
GetAddr
()
string
{
if
m
!=
nil
{
return
m
.
Addr
}
return
""
}
func
(
m
*
PaymentKeysReq
)
GetDetail
()
int32
{
if
m
!=
nil
{
return
m
.
Detail
}
return
0
}
type
WalletIndexInfo
struct
{
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
Nullifier
string
`protobuf:"bytes,2,opt,name=nullifier,proto3" json:"nullifier,omitempty"`
...
...
@@ -3796,7 +3820,6 @@ func init() {
proto
.
RegisterType
((
*
SecretData
)(
nil
),
"types.SecretData"
)
proto
.
RegisterType
((
*
EncryptSecretData
)(
nil
),
"types.EncryptSecretData"
)
proto
.
RegisterType
((
*
DecryptSecretData
)(
nil
),
"types.DecryptSecretData"
)
proto
.
RegisterType
((
*
CircuitPathInfo
)(
nil
),
"types.circuitPathInfo"
)
proto
.
RegisterType
((
*
DepositInfo
)(
nil
),
"types.DepositInfo"
)
proto
.
RegisterType
((
*
DepositTxReq
)(
nil
),
"types.DepositTxReq"
)
proto
.
RegisterType
((
*
DepositProofResp
)(
nil
),
"types.DepositProofResp"
)
...
...
@@ -3814,6 +3837,7 @@ func init() {
proto
.
RegisterType
((
*
TransferProofResp
)(
nil
),
"types.TransferProofResp"
)
proto
.
RegisterType
((
*
ShieldAmountRst
)(
nil
),
"types.ShieldAmountRst"
)
proto
.
RegisterType
((
*
CreateRawTxReq
)(
nil
),
"types.CreateRawTxReq"
)
proto
.
RegisterType
((
*
PaymentKeysReq
)(
nil
),
"types.PaymentKeysReq"
)
proto
.
RegisterType
((
*
WalletIndexInfo
)(
nil
),
"types.WalletIndexInfo"
)
proto
.
RegisterType
((
*
WalletDbMixInfo
)(
nil
),
"types.WalletDbMixInfo"
)
proto
.
RegisterType
((
*
WalletMixIndexReq
)(
nil
),
"types.WalletMixIndexReq"
)
...
...
@@ -3833,170 +3857,172 @@ func init() {
}
var
fileDescriptor_5c21d519a9be369a
=
[]
byte
{
// 2597 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xec
,
0x5a
,
0x4b
,
0x73
,
0x1b
,
0xc7
,
0xf1
,
0xe7
,
0xe2
,
0x8d
,
0x26
,
0x40
,
0x82
,
0x23
,
0x59
,
0x86
,
0x59
,
0xfe
,
0xfb
,
0xcf
,
0x8c
,
0x5f
,
0x34
,
0xed
,
0x62
,
0x1c
,
0xc8
,
0x71
,
0x92
,
0x2a
,
0xc7
,
0x2e
,
0x58
,
0x80
,
0x44
,
0x44
,
0x22
,
0xc8
,
0x1a
,
0x80
,
0xa2
,
0xa4
,
0x94
,
0x53
,
0x59
,
0x01
,
0x43
,
0x72
,
0x4b
,
0x20
,
0x16
,
0xda
,
0x1d
,
0x50
,
0xa0
,
0x2f
,
0x4e
,
0x2a
,
0x87
,
0x5c
,
0x72
,
0x4c
,
0xae
,
0xa9
,
0xca
,
0x29
,
0x3e
,
0xa7
,
0x52
,
0x39
,
0xe4
,
0x23
,
0xe4
,
0x9c
,
0x0f
,
0x90
,
0xaa
,
0x1c
,
0x72
,
0xcf
,
0x27
,
0x48
,
0xf5
,
0x3c
,
0x76
,
0x67
,
0x97
,
0xe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
,
0x03
,
0xc4
,
0x4e
,
0xb0
,
0x6a
,
0x66
,
0xeb
,
0x27
,
0xf0
,
0xda
,
0x8e
,
0x37
,
0xd5
,
0x45
,
0x1b
,
0xf6
,
0xdd
,
0x91
,
0xda
,
0x77
,
0x11
,
0x72
,
0xed
,
0xe6
,
0x83
,
0x96
,
0x54
,
0xd0
,
0xbd
,
0xd7
,
0xe8
,
0x74
,
0xda
,
0x9d
,
0x4f
,
0xab
,
0x0e
,
0x52
,
0xf7
,
0xdb
,
0x9d
,
0x76
,
0x77
,
0xbb
,
0xd5
,
0xac
,
0x66
,
0xea
,
0x7f
,
0x76
,
0x00
,
0x4e
,
0xbc
,
0xa9
,
0x7e
,
0x0b
,
0xfc
,
0x10
,
0x56
,
0x3e
,
0x4d
,
0xe9
,
0xa9
,
0xe8
,
0x53
,
0x81
,
0x3f
,
0xef
,
0x78
,
0xc3
,
0xf5
,
0x6a
,
0x42
,
0x76
,
0xa3
,
0xc0
,
0x1b
,
0x1d
,
0xd1
,
0x05
,
0xf2
,
0x01
,
0x2c
,
0xc9
,
0x25
,
0xe8
,
0xf6
,
0x95
,
0x56
,
0xdc
,
0x85
,
0x8a
,
0x95
,
0x22
,
0x64
,
0x25
,
0x11
,
0x12
,
0x7d
,
0x67
,
0x7d
,
0x3d
,
0x61
,
0xa4
,
0x93
,
0x89
,
0x2e
,
0x3c
,
0x2d
,
0x88
,
0x7f
,
0x67
,
0xb8
,
0xf3
,
0x9f
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0x73
,
0x91
,
0xca
,
0x02
,
0x03
,
0x21
,
0x00
,
0x00
,
}
// Reference imports to suppress errors if they are not otherwise used.
...
...
plugin/dapp/mix/types/type.go
View file @
b4a6fb77
...
...
@@ -74,6 +74,7 @@ func (p *MixType) GetLogMap() map[int64]*types.LogInfo {
TyLogCurrentCommitTreeLeaves
:
{
Ty
:
reflect
.
TypeOf
(
CommitTreeLeaves
{}),
Name
:
"LogCommitTreeLeaves"
},
TyLogCurrentCommitTreeRoots
:
{
Ty
:
reflect
.
TypeOf
(
CommitTreeRoots
{}),
Name
:
"LogCommitTreeRoots"
},
TyLogMixConfigPaymentKey
:
{
Ty
:
reflect
.
TypeOf
(
PaymentKey
{}),
Name
:
"LogConfigReceivingKey"
},
TyLogNulliferSet
:
{
Ty
:
reflect
.
TypeOf
(
ExistValue
{}),
Name
:
"LogNullifierSet"
},
}
}
...
...
@@ -157,6 +158,17 @@ func MulCurvePointH(val string) *twistededwards.Point {
return
&
pointV
}
func
GetCurveSum
(
points
...*
twistededwards
.
Point
)
*
twistededwards
.
Point
{
//Add之前需初始化pointSum,不能空值,不然会等于0
pointSum
:=
twistededwards
.
NewPoint
(
points
[
0
]
.
X
,
points
[
0
]
.
Y
)
for
_
,
a
:=
range
points
[
1
:
]
{
pointSum
.
Add
(
&
pointSum
,
a
)
}
return
&
pointSum
}
//A=B+C
func
CheckSumEqual
(
points
...*
twistededwards
.
Point
)
bool
{
if
len
(
points
)
<
2
{
...
...
plugin/dapp/mix/wallet/exec.go
View file @
b4a6fb77
...
...
@@ -5,12 +5,42 @@
package
wallet
import
(
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/types"
mixTy
"github.com/33cn/plugin/plugin/dapp/mix/types"
"github.com/pkg/errors"
)
func
(
policy
*
mixPolicy
)
On_ShowAccountPrivacyInfo
(
req
*
types
.
ReqString
)
(
types
.
Message
,
error
)
{
return
policy
.
getAccountPrivacyKey
(
req
.
Data
)
func
(
policy
*
mixPolicy
)
On_ShowAccountPrivacyInfo
(
req
*
mixTy
.
PaymentKeysReq
)
(
types
.
Message
,
error
)
{
if
len
(
req
.
Addr
)
==
0
&&
len
(
req
.
PrivKey
)
==
0
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"addr or privkey need be set"
)
}
//通过私钥获取
if
len
(
req
.
PrivKey
)
>
0
{
prikeybyte
,
err
:=
common
.
FromHex
(
req
.
PrivKey
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"privkey fromHex error,key=%s"
,
req
.
PrivKey
)
}
var
ret
mixTy
.
WalletAddrPrivacy
ret
.
Privacy
=
newPrivacyKey
(
prikeybyte
)
if
req
.
Detail
<=
0
{
ret
.
Privacy
.
EncryptKey
.
PrivKey
=
""
ret
.
Privacy
.
PaymentKey
.
SpendKey
=
""
}
return
&
ret
,
nil
}
//通过account 从钱包获取
keys
,
err
:=
policy
.
getAccountPrivacyKey
(
req
.
Addr
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"get account =%s privacy key"
,
req
.
Addr
)
}
if
req
.
Detail
<=
0
{
keys
.
Privacy
.
EncryptKey
.
PrivKey
=
""
keys
.
Privacy
.
PaymentKey
.
SpendKey
=
""
}
return
keys
,
nil
}
func
(
policy
*
mixPolicy
)
On_ShowAccountNoteInfo
(
req
*
types
.
ReqAddrs
)
(
types
.
Message
,
error
)
{
...
...
plugin/dapp/mix/wallet/mix.go
View file @
b4a6fb77
...
...
@@ -22,21 +22,27 @@ import (
const
CECBLOCKSIZE
=
32
// newPrivacyWithPrivKey create privacy from private key
//payment, payPrivKey=hash(privkey), payPubkey=hash(payPrivKey)
//DH crypt key, prikey=payPrikey, pubKey=payPrikey*G
func
newPrivacyKey
(
privKey
[]
byte
)
(
*
mixTy
.
AccountPrivacyKey
,
error
)
{
payPrivacyKey
:=
mimcHashByte
([][]
byte
{
privKey
})
/*
从secp256k1根私钥创建支票需要的私钥和公钥
payPrivKey = rootPrivKey *G_X25519 这样很难泄露rootPrivKey
支票收款key: ReceiveKey= hash(payPrivKey) --或者*G的X坐标值, 看哪个电路少?
DH加解密key: encryptPubKey= payPrivKey *G_X25519, 也是很安全的,只是电路里面目前不支持x25519
*/
func
newPrivacyKey
(
rootPrivKey
[]
byte
)
*
mixTy
.
AccountPrivacyKey
{
ecdh
:=
X25519
()
key
:=
ecdh
.
PublicKey
(
rootPrivKey
)
payPrivKey
:=
key
.
([
32
]
byte
)
//payPrivKey := mimcHashByte([][]byte{rootPrivKey})
paymentKey
:=
&
mixTy
.
PaymentKeyPair
{}
paymentKey
.
SpendKey
=
mixTy
.
Byte2Str
(
payPriv
acyKey
)
paymentKey
.
ReceiveKey
=
mixTy
.
Byte2Str
(
mimcHashByte
([][]
byte
{
payPriv
acyKey
}))
paymentKey
.
SpendKey
=
mixTy
.
Byte2Str
(
payPriv
Key
[
:
]
)
paymentKey
.
ReceiveKey
=
mixTy
.
Byte2Str
(
mimcHashByte
([][]
byte
{
payPriv
Key
[
:
]
}))
encryptKeyPair
:=
&
mixTy
.
EncryptKeyPair
{}
//ecdh := NewCurveBn256ECDH()
ecdh
:=
X25519
()
pubkey
:=
ecdh
.
PublicKey
(
payPrivacyKey
)
//需要Hex编码,而不腻使用fr.string, 模范围不同
encryptKeyPair
.
PrivKey
=
hex
.
EncodeToString
(
payPrivacyKey
)
pubkey
:=
ecdh
.
PublicKey
(
payPrivKey
)
//需要Hex编码,不要使用fr.string, 模范围不同
encryptKeyPair
.
PrivKey
=
hex
.
EncodeToString
(
payPrivKey
[
:
])
pubData
:=
pubkey
.
([
32
]
byte
)
encryptKeyPair
.
PubKey
=
hex
.
EncodeToString
(
pubData
[
:
])
...
...
@@ -44,7 +50,7 @@ func newPrivacyKey(privKey []byte) (*mixTy.AccountPrivacyKey, error) {
privacy
.
PaymentKey
=
paymentKey
privacy
.
EncryptKey
=
encryptKeyPair
return
privacy
,
nil
return
privacy
}
//CEC加密需要保证明文是秘钥的倍数,如果不是,则需要填充明文,在解密时候把填充物去掉
...
...
@@ -201,10 +207,7 @@ func (policy *mixPolicy) savePrivacyPair(addr string) (*mixTy.WalletAddrPrivacy,
}
bizlog
.
Info
(
"savePrivacyPair"
,
"pri"
,
common
.
ToHex
(
priv
.
Bytes
()),
"addr"
,
addr
)
newPrivacy
,
err
:=
newPrivacyKey
(
priv
.
Bytes
())
if
err
!=
nil
{
return
nil
,
err
}
newPrivacy
:=
newPrivacyKey
(
priv
.
Bytes
())
password
:=
[]
byte
(
policy
.
getWalletOperate
()
.
GetPassword
())
encryptered
:=
encryptDataWithPadding
(
password
,
types
.
Encode
(
newPrivacy
))
...
...
plugin/dapp/mix/wallet/mixbizdb.go
View file @
b4a6fb77
...
...
@@ -91,28 +91,33 @@ func (p *mixPolicy) processMixTx(tx *types.Transaction, height, index int64) (*t
}
func
(
p
*
mixPolicy
)
processDeposit
(
deposit
*
mixTy
.
MixDepositAction
,
heightIndex
string
,
table
*
table
.
Table
)
{
data
,
err
:=
mixTy
.
DecodePubInput
(
mixTy
.
VerifyType_DEPOSIT
,
deposit
.
Proof
.
PublicInput
)
if
err
!=
nil
{
bizlog
.
Error
(
"processDeposit decode"
,
"pubInput"
,
deposit
.
Proof
.
PublicInput
)
return
for
_
,
proof
:=
range
deposit
.
Proofs
{
data
,
err
:=
mixTy
.
DecodePubInput
(
mixTy
.
VerifyType_DEPOSIT
,
proof
.
PublicInput
)
if
err
!=
nil
{
bizlog
.
Error
(
"processDeposit decode"
,
"pubInput"
,
proof
.
PublicInput
)
return
}
input
:=
data
.
(
*
mixTy
.
DepositPublicInput
)
p
.
processSecretGroup
(
input
.
NoteHash
,
proof
.
Secrets
,
heightIndex
,
table
)
}
input
:=
data
.
(
*
mixTy
.
DepositPublicInput
)
p
.
processSecretGroup
(
input
.
NoteHash
,
deposit
.
Proof
.
Secrets
,
heightIndex
,
table
)
}
func
(
p
*
mixPolicy
)
processTransfer
(
transfer
*
mixTy
.
MixTransferAction
,
heightIndex
string
,
table
*
table
.
Table
)
{
var
nulls
[]
string
data
,
err
:=
mixTy
.
DecodePubInput
(
mixTy
.
VerifyType_TRANSFERINPUT
,
transfer
.
Input
.
PublicInput
)
if
err
!=
nil
{
bizlog
.
Error
(
"processTransfer.input decode"
,
"pubInput"
,
transfer
.
Input
.
PublicInput
)
return
for
_
,
in
:=
range
transfer
.
Inputs
{
data
,
err
:=
mixTy
.
DecodePubInput
(
mixTy
.
VerifyType_TRANSFERINPUT
,
in
.
PublicInput
)
if
err
!=
nil
{
bizlog
.
Error
(
"processTransfer.input decode"
,
"pubInput"
,
in
.
PublicInput
)
return
}
input
:=
data
.
(
*
mixTy
.
TransferInputPublicInput
)
nulls
=
append
(
nulls
,
input
.
NullifierHash
)
}
input
:=
data
.
(
*
mixTy
.
TransferInputPublicInput
)
nulls
=
append
(
nulls
,
input
.
NullifierHash
)
p
.
processNullifiers
(
nulls
,
table
)
//out
data
,
err
=
mixTy
.
DecodePubInput
(
mixTy
.
VerifyType_TRANSFEROUTPUT
,
transfer
.
Output
.
PublicInput
)
data
,
err
:
=
mixTy
.
DecodePubInput
(
mixTy
.
VerifyType_TRANSFEROUTPUT
,
transfer
.
Output
.
PublicInput
)
if
err
!=
nil
{
bizlog
.
Error
(
"processTransfer.output decode"
,
"pubInput"
,
transfer
.
Output
.
PublicInput
)
return
...
...
plugin/dapp/mix/wallet/mixbizdb_test.go
View file @
b4a6fb77
...
...
@@ -16,8 +16,8 @@ func TestNewPrivacyWithPrivKey(t *testing.T) {
keyByte
,
err
:=
hex
.
DecodeString
(
prikey
)
assert
.
Equal
(
t
,
nil
,
err
)
pairs
,
err
:=
newPrivacyKey
(
keyByte
)
assert
.
Equal
(
t
,
nil
,
err
)
pairs
:=
newPrivacyKey
(
keyByte
)
t
.
Log
(
"payPri"
,
pairs
.
PaymentKey
.
SpendKey
,
"payPub"
,
pairs
.
PaymentKey
.
ReceiveKey
)
t
.
Log
(
"crytoPub"
,
pairs
.
EncryptKey
.
PubKey
,
"crytoPri"
,
pairs
.
EncryptKey
.
PrivKey
)
...
...
@@ -87,8 +87,8 @@ func TestEncodeSecretData(t *testing.T) {
prikey
:=
"4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01"
keyByte
,
err
:=
hex
.
DecodeString
(
prikey
)
assert
.
Equal
(
t
,
nil
,
err
)
privacy
,
err
:=
newPrivacyKey
(
keyByte
)
assert
.
Equal
(
t
,
nil
,
err
)
privacy
:=
newPrivacyKey
(
keyByte
)
ret
:=
types
.
Encode
(
secret
)
hexRet
:=
hex
.
EncodeToString
(
ret
)
//assert.Nil(t,err)
...
...
plugin/dapp/mix/wallet/txauth.go
View file @
b4a6fb77
...
...
@@ -132,12 +132,12 @@ func (policy *mixPolicy) createAuthTx(req *mixTy.CreateRawTxReq) (*types.Transac
return
nil
,
err
}
proofInfo
,
err
:=
getZkProofKeys
(
auth
.
ZkPath
.
Path
+
mixTy
.
AuthCircuit
,
auth
.
ZkPath
.
Path
+
mixTy
.
AuthPk
,
*
input
)
proofInfo
,
err
:=
getZkProofKeys
(
auth
.
ZkPath
+
mixTy
.
AuthCircuit
,
auth
.
Zk
Path
+
mixTy
.
AuthPk
,
*
input
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"getZkProofKeys note=%s"
,
auth
.
NoteHash
)
}
//verify
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_AUTHORIZE
,
proofInfo
,
auth
.
ZkPath
.
Path
+
mixTy
.
AuthVk
);
err
!=
nil
{
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_AUTHORIZE
,
proofInfo
,
auth
.
ZkPath
+
mixTy
.
AuthVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"verifyProof fail for note=%s"
,
auth
.
NoteHash
)
}
...
...
plugin/dapp/mix/wallet/txdeposit.go
View file @
b4a6fb77
...
...
@@ -6,8 +6,8 @@ package wallet
import
(
"encoding/hex"
"fmt"
"strconv"
"strings"
"github.com/33cn/chain33/common/address"
...
...
@@ -32,38 +32,42 @@ type DepositInput struct {
NoteRandom
string
`tag:"secret"`
}
func
(
policy
*
mixPolicy
)
depositParams
(
re
q
*
mixTy
.
DepositInfo
)
(
*
mixTy
.
DepositProofResp
,
error
)
{
if
req
==
nil
||
len
(
req
.
Add
r
)
<=
0
{
return
nil
,
errors
.
Wrap
(
types
.
ErrInvalidParam
,
"
paymentAdd
r is nil"
)
func
(
policy
*
mixPolicy
)
depositParams
(
re
ceiver
,
returner
,
auth
,
amount
string
)
(
*
mixTy
.
DepositProofResp
,
error
)
{
if
len
(
receive
r
)
<=
0
{
return
nil
,
errors
.
Wrap
(
types
.
ErrInvalidParam
,
"
receive
r is nil"
)
}
if
req
.
Amount
<=
0
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"deposit amount=%d need big than 0"
,
req
.
Amount
)
_
,
e
:=
strconv
.
ParseUint
(
amount
,
0
,
0
)
if
e
!=
nil
{
return
nil
,
errors
.
Wrapf
(
e
,
"deposit amount=%s"
,
amount
)
}
var
secret
mixTy
.
SecretData
secret
.
Amount
=
strconv
.
FormatUint
(
req
.
Amount
,
10
)
secret
.
Amount
=
amount
//1. nullifier 获取随机值
var
fr
fr_bn256
.
Element
fr
.
SetRandom
()
secret
.
NoteRandom
=
fr
.
String
()
//TODO 线上检查是否随机值在nullifer里面
// 获取receiving addr对应的paymentKey
toKey
,
e
:=
policy
.
getPaymentKey
(
req
.
Add
r
)
payKeys
,
e
:=
policy
.
getPaymentKey
(
receive
r
)
if
e
!=
nil
{
return
nil
,
errors
.
Wrapf
(
e
,
"get payment key for addr = %s"
,
re
q
.
Add
r
)
return
nil
,
errors
.
Wrapf
(
e
,
"get payment key for addr = %s"
,
re
ceive
r
)
}
secret
.
ReceiverKey
=
toKey
.
ReceiverKey
secret
.
ReceiverKey
=
payKeys
.
ReceiverKey
//获取return addr对应的key
var
returnKey
*
mixTy
.
PaymentKey
var
err
error
//如果Input不填,缺省空为“0”字符串
secret
.
ReturnKey
=
"0"
if
len
(
re
q
.
ReturnAdd
r
)
>
0
{
returnKey
,
err
=
policy
.
getPaymentKey
(
re
q
.
ReturnAdd
r
)
if
len
(
re
turne
r
)
>
0
{
returnKey
,
err
=
policy
.
getPaymentKey
(
re
turne
r
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"get payment key for return addr = %s"
,
re
q
.
ReturnAdd
r
)
return
nil
,
errors
.
Wrapf
(
err
,
"get payment key for return addr = %s"
,
re
turne
r
)
}
secret
.
ReturnKey
=
returnKey
.
ReceiverKey
}
...
...
@@ -71,10 +75,10 @@ func (policy *mixPolicy) depositParams(req *mixTy.DepositInfo) (*mixTy.DepositPr
//获取auth addr对应的key
var
authKey
*
mixTy
.
PaymentKey
secret
.
AuthorizeKey
=
"0"
if
len
(
req
.
AuthorizeAddr
)
>
0
{
authKey
,
err
=
policy
.
getPaymentKey
(
req
.
AuthorizeAddr
)
if
len
(
auth
)
>
0
{
authKey
,
err
=
policy
.
getPaymentKey
(
auth
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"get payment key for authorize addr = %s"
,
req
.
AuthorizeAddr
)
return
nil
,
errors
.
Wrapf
(
err
,
"get payment key for authorize addr = %s"
,
auth
)
}
secret
.
AuthorizeKey
=
authKey
.
ReceiverKey
}
...
...
@@ -83,22 +87,22 @@ func (policy *mixPolicy) depositParams(req *mixTy.DepositInfo) (*mixTy.DepositPr
data
:=
types
.
Encode
(
&
secret
)
var
group
mixTy
.
DHSecretGroup
secretData
,
err
:=
encryptData
(
toKey
.
EncryptKey
,
data
)
secretData
,
err
:=
encryptData
(
payKeys
.
EncryptKey
,
data
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"encryptData to addr = %s"
,
re
q
.
Add
r
)
return
nil
,
errors
.
Wrapf
(
err
,
"encryptData to addr = %s"
,
re
ceive
r
)
}
group
.
Receiver
=
hex
.
EncodeToString
(
types
.
Encode
(
secretData
))
if
returnKey
!=
nil
{
secretData
,
err
=
encryptData
(
returnKey
.
EncryptKey
,
data
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"encryptData to addr = %s"
,
re
q
.
ReturnAdd
r
)
return
nil
,
errors
.
Wrapf
(
err
,
"encryptData to addr = %s"
,
re
turne
r
)
}
group
.
Returner
=
hex
.
EncodeToString
(
types
.
Encode
(
secretData
))
}
if
authKey
!=
nil
{
secretData
,
err
=
encryptData
(
authKey
.
EncryptKey
,
data
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"encryptData to addr = %s"
,
req
.
AuthorizeAddr
)
return
nil
,
errors
.
Wrapf
(
err
,
"encryptData to addr = %s"
,
auth
)
}
group
.
Authorize
=
hex
.
EncodeToString
(
types
.
Encode
(
secretData
))
}
...
...
@@ -119,14 +123,9 @@ func (policy *mixPolicy) depositParams(req *mixTy.DepositInfo) (*mixTy.DepositPr
}
func
(
policy
*
mixPolicy
)
createDepositTx
(
req
*
mixTy
.
CreateRawTxReq
)
(
*
types
.
Transaction
,
error
)
{
var
deposit
mixTy
.
DepositTxReq
err
:=
types
.
Decode
(
req
.
Data
,
&
deposit
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"decode req fail"
)
}
func
(
policy
*
mixPolicy
)
getDepositProof
(
receiver
,
returner
,
auth
,
amount
,
zkPath
string
)
(
*
mixTy
.
ZkProofInfo
,
error
)
{
resp
,
err
:=
policy
.
depositParams
(
deposit
.
Deposi
t
)
resp
,
err
:=
policy
.
depositParams
(
receiver
,
returner
,
auth
,
amoun
t
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -139,24 +138,57 @@ func (policy *mixPolicy) createDepositTx(req *mixTy.CreateRawTxReq) (*types.Tran
input
.
ReturnPubKey
=
resp
.
Proof
.
ReturnKey
input
.
NoteRandom
=
resp
.
Proof
.
NoteRandom
proofInfo
,
err
:=
getZkProofKeys
(
deposit
.
ZkPath
.
Path
+
mixTy
.
DepositCircuit
,
deposit
.
ZkPath
.
Path
+
mixTy
.
DepositPk
,
input
)
proofInfo
,
err
:=
getZkProofKeys
(
zkPath
+
mixTy
.
DepositCircuit
,
zk
Path
+
mixTy
.
DepositPk
,
input
)
if
err
!=
nil
{
return
nil
,
err
}
//线上验证proof,失败的原因有可能circuit,Pk和线上vk不匹配,或不是一起产生的版本
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_DEPOSIT
,
proofInfo
,
deposit
.
ZkPath
.
Path
+
mixTy
.
DepositVk
);
err
!=
nil
{
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_DEPOSIT
,
proofInfo
,
zk
Path
+
mixTy
.
DepositVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"verifyProof fail"
)
}
fmt
.
Println
(
"createDepositTx ok"
)
proofInfo
.
Secrets
=
resp
.
Secrets
return
policy
.
getDepositTx
(
strings
.
TrimSpace
(
req
.
Title
+
mixTy
.
MixX
),
proofInfo
)
return
proofInfo
,
nil
}
func
(
policy
*
mixPolicy
)
createDepositTx
(
req
*
mixTy
.
CreateRawTxReq
)
(
*
types
.
Transaction
,
error
)
{
var
deposit
mixTy
.
DepositTxReq
err
:=
types
.
Decode
(
req
.
Data
,
&
deposit
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"decode req fail"
)
}
if
deposit
.
Deposit
==
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"decode deposit fail"
)
}
if
len
(
deposit
.
ZkPath
)
==
0
{
deposit
.
ZkPath
=
"./"
}
//多个receiver
receivers
:=
strings
.
Split
(
deposit
.
Deposit
.
ReceiverAddrs
,
","
)
amounts
:=
strings
.
Split
(
deposit
.
Deposit
.
Amounts
,
","
)
if
len
(
receivers
)
!=
len
(
amounts
)
||
len
(
receivers
)
==
0
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"not match receivers=%s and amounts=%s"
,
deposit
.
Deposit
.
ReceiverAddrs
,
deposit
.
Deposit
.
Amounts
)
}
var
proofs
[]
*
mixTy
.
ZkProofInfo
for
i
,
rcv
:=
range
receivers
{
p
,
err
:=
policy
.
getDepositProof
(
rcv
,
deposit
.
Deposit
.
ReturnAddr
,
deposit
.
Deposit
.
AuthorizeAddr
,
amounts
[
i
],
deposit
.
ZkPath
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"get Deposit proof for=%s"
,
rcv
)
}
proofs
=
append
(
proofs
,
p
)
}
return
policy
.
getDepositTx
(
strings
.
TrimSpace
(
req
.
Title
+
mixTy
.
MixX
),
proofs
)
}
func
(
policy
*
mixPolicy
)
getDepositTx
(
execName
string
,
proof
*
mixTy
.
ZkProofInfo
)
(
*
types
.
Transaction
,
error
)
{
func
(
policy
*
mixPolicy
)
getDepositTx
(
execName
string
,
proof
s
[]
*
mixTy
.
ZkProofInfo
)
(
*
types
.
Transaction
,
error
)
{
payload
:=
&
mixTy
.
MixDepositAction
{}
payload
.
Proof
=
proof
payload
.
Proof
s
=
proofs
cfg
:=
policy
.
getWalletOperate
()
.
GetAPI
()
.
GetConfig
()
action
:=
&
mixTy
.
MixAction
{
...
...
@@ -170,6 +202,6 @@ func (policy *mixPolicy) getDepositTx(execName string, proof *mixTy.ZkProofInfo)
To
:
address
.
ExecAddress
(
execName
),
Expire
:
types
.
Now
()
.
Unix
()
+
int64
(
300
),
//5 min
}
fmt
.
Println
(
"createDepositTx tx"
)
return
types
.
FormatTx
(
cfg
,
execName
,
tx
)
}
plugin/dapp/mix/wallet/txtransfer.go
View file @
b4a6fb77
...
...
@@ -5,6 +5,7 @@
package
wallet
import
(
"fmt"
"strconv"
"strings"
...
...
@@ -17,6 +18,7 @@ import (
mixTy
"github.com/33cn/plugin/plugin/dapp/mix/types"
fr_bn256
"github.com/consensys/gurvy/bn256/fr"
"github.com/consensys/gurvy/bn256/twistededwards"
)
type
TransferInput
struct
{
...
...
@@ -142,9 +144,14 @@ func (policy *mixPolicy) getTransferInputPart(note *mixTy.WalletIndexInfo) (*Tra
}
func
(
policy
*
mixPolicy
)
getTransferOutput
(
req
*
mixTy
.
DepositInfo
)
(
*
TransferOutput
,
*
mixTy
.
DHSecretGroup
,
error
)
{
resp
,
err
:=
policy
.
depositParams
(
req
)
//目前只支持一个ReceiverAddr
if
strings
.
Contains
(
req
.
ReceiverAddrs
,
","
)
||
strings
.
Contains
(
req
.
Amounts
,
","
)
{
return
nil
,
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"only support one addr or amount,addrs=%s,amount=%s"
,
req
.
ReceiverAddrs
,
req
.
Amounts
)
}
resp
,
err
:=
policy
.
depositParams
(
req
.
ReceiverAddrs
,
req
.
ReturnAddr
,
req
.
AuthorizeAddr
,
req
.
Amounts
)
if
err
!=
nil
{
return
nil
,
nil
,
errors
.
Wrapf
(
err
,
"deposit toAddr
"
)
return
nil
,
nil
,
errors
.
Wrapf
(
err
,
"deposit toAddr
=%s"
,
req
.
ReceiverAddrs
)
}
var
input
TransferOutput
...
...
@@ -159,60 +166,106 @@ func (policy *mixPolicy) getTransferOutput(req *mixTy.DepositInfo) (*TransferOut
}
func
getShieldValue
(
noteAmount
,
transferAmount
,
minTxFee
uint64
)
(
*
mixTy
.
ShieldAmountRst
,
error
)
{
if
noteAmount
<
transferAmount
+
minTxFee
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"transfer amount=%d big than note=%d - fee=%d"
,
transferAmount
,
noteAmount
,
minTxFee
)
//input = output+找零+交易费
func
getShieldValue
(
inputAmounts
[]
uint64
,
outAmount
,
change
,
minTxFee
uint64
)
(
*
mixTy
.
ShieldAmountRst
,
error
)
{
var
sum
uint64
for
_
,
i
:=
range
inputAmounts
{
sum
+=
i
}
if
sum
!=
outAmount
+
change
+
minTxFee
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"getShieldValue.sum error,sum=%d,out=%d,change=%d,fee=%d"
,
sum
,
outAmount
,
change
,
minTxFee
)
}
change
:=
noteAmount
-
transferAmount
-
minTxFee
//get amount*G point
//note = transfer + change + minTxFee
noteAmountG
:=
mixTy
.
MulCurvePointG
(
noteAmount
)
transAmountG
:=
mixTy
.
MulCurvePointG
(
transferAmount
)
var
inputGPoints
[]
*
twistededwards
.
Point
for
_
,
i
:=
range
inputAmounts
{
inputGPoints
=
append
(
inputGPoints
,
mixTy
.
MulCurvePointG
(
i
))
}
//noteAmountG := mixTy.MulCurvePointG(inputAmount)
outAmountG
:=
mixTy
.
MulCurvePointG
(
outAmount
)
changeAmountG
:=
mixTy
.
MulCurvePointG
(
change
)
minTxFeeG
:=
mixTy
.
MulCurvePointG
(
minTxFee
)
if
!
mixTy
.
CheckSumEqual
(
noteAmountG
,
transAmountG
,
changeAmountG
,
minTxFeeG
)
{
sumPointG
:=
mixTy
.
GetCurveSum
(
inputGPoints
...
)
if
!
mixTy
.
CheckSumEqual
(
sumPointG
,
outAmountG
,
changeAmountG
,
minTxFeeG
)
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"amount sum fail for mul G point"
)
}
//三个混淆随机值可以随机获取,这里noteRandom和为了Nullifier计算的NoteRandom不同。
//获取随机值,截取一半给change和transfer,和值给Note,直接用完整的random值会溢出
var
rChange
,
r
Trans
,
v
fr_bn256
.
Element
var
rChange
,
r
Out
,
v
fr_bn256
.
Element
random
:=
v
.
SetRandom
()
.
String
()
rChange
.
SetString
(
random
[
0
:
len
(
random
)
/
2
])
rTrans
.
SetString
(
random
[
len
(
random
)
/
2
:
])
rOut
.
SetString
(
random
[
len
(
random
)
/
2
:
])
fmt
.
Println
(
"rOut"
,
rOut
.
String
())
fmt
.
Println
(
"rChange"
,
rChange
.
String
())
var
rSumIn
,
rSumOut
fr_bn256
.
Element
rSumIn
.
SetZero
()
rSumOut
.
Add
(
&
rChange
,
&
rOut
)
var
rInputs
[]
fr_bn256
.
Element
rInputs
=
append
(
rInputs
,
rSumOut
)
//len(inputAmounts)>1场景,每个input的随机值设为随机值的1/3长度,这样加起来不会超过rOut+rChange
for
i
:=
1
;
i
<
len
(
inputAmounts
);
i
++
{
var
a
,
v
fr_bn256
.
Element
rv
:=
v
.
SetRandom
()
.
String
()
a
.
SetString
(
rv
[
0
:
len
(
random
)
/
3
])
rInputs
=
append
(
rInputs
,
a
)
rSumIn
.
Add
(
&
rSumIn
,
&
a
)
}
//如果len(inputAmounts)>1,则把rInputs[0]替换为rrSumOut-rSumIn,rSumIn都是1/3的随机值长度,减法应该不会溢出
if
len
(
rInputs
)
>
1
{
var
sub
fr_bn256
.
Element
sub
.
Sub
(
&
rSumOut
,
&
rSumIn
)
rInputs
[
0
]
=
sub
}
rSumIn
.
Add
(
&
rSumIn
,
&
rInputs
[
0
])
if
!
rSumIn
.
Equal
(
&
rSumOut
)
{
var
rNote
fr_bn256
.
Element
rNote
.
Add
(
&
rChange
,
&
rTrans
)
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"random sumIn=%s not equal sumOut=%s"
,
rSumIn
.
String
(),
rSumOut
.
String
())
}
noteH
:=
mixTy
.
MulCurvePointH
(
rNote
.
String
())
transferH
:=
mixTy
.
MulCurvePointH
(
rTrans
.
String
())
var
inputHPoints
[]
*
twistededwards
.
Point
for
_
,
i
:=
range
rInputs
{
inputHPoints
=
append
(
inputHPoints
,
mixTy
.
MulCurvePointH
(
i
.
String
()))
}
//noteH := mixTy.MulCurvePointH(rNote.String())
outH
:=
mixTy
.
MulCurvePointH
(
rOut
.
String
())
changeH
:=
mixTy
.
MulCurvePointH
(
rChange
.
String
())
//fmt.Println("change",changeRandom.String())
//fmt.Println("transfer",transRandom.String())
//fmt.Println("note",noteRandom.String())
if
!
mixTy
.
CheckSumEqual
(
noteH
,
transfer
H
,
changeH
)
{
sumPointH
:=
mixTy
.
GetCurveSum
(
inputHPoints
...
)
if
!
mixTy
.
CheckSumEqual
(
sumPointH
,
out
H
,
changeH
)
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"random sum error"
)
}
noteAmountG
.
Add
(
noteAmountG
,
noteH
)
transAmountG
.
Add
(
transAmountG
,
transferH
)
for
i
,
p
:=
range
inputGPoints
{
p
.
Add
(
p
,
inputHPoints
[
i
])
}
outAmountG
.
Add
(
outAmountG
,
outH
)
changeAmountG
.
Add
(
changeAmountG
,
changeH
)
if
!
mixTy
.
CheckSumEqual
(
noteAmountG
,
trans
AmountG
,
changeAmountG
,
minTxFeeG
)
{
sumPointG
=
mixTy
.
GetCurveSum
(
inputGPoints
...
)
if
!
mixTy
.
CheckSumEqual
(
sumPointG
,
out
AmountG
,
changeAmountG
,
minTxFeeG
)
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"amount sum fail for G+H point"
)
}
rst
:=
&
mixTy
.
ShieldAmountRst
{
InputRandom
:
rNote
.
String
(),
OutputRandom
:
rTrans
.
String
(),
OutputRandom
:
rOut
.
String
(),
ChangeRandom
:
rChange
.
String
(),
Input
:
&
mixTy
.
ShieldAmount
{
X
:
noteAmountG
.
X
.
String
(),
Y
:
noteAmountG
.
Y
.
String
()},
Output
:
&
mixTy
.
ShieldAmount
{
X
:
transAmountG
.
X
.
String
(),
Y
:
transAmountG
.
Y
.
String
()},
Output
:
&
mixTy
.
ShieldAmount
{
X
:
outAmountG
.
X
.
String
(),
Y
:
outAmountG
.
Y
.
String
()},
Change
:
&
mixTy
.
ShieldAmount
{
X
:
changeAmountG
.
X
.
String
(),
Y
:
changeAmountG
.
Y
.
String
()},
}
for
_
,
r
:=
range
rInputs
{
rst
.
InputRandoms
=
append
(
rst
.
InputRandoms
,
r
.
String
())
fmt
.
Println
(
"inputRandom"
,
r
.
String
())
}
for
_
,
p
:=
range
inputGPoints
{
rst
.
Inputs
=
append
(
rst
.
Inputs
,
&
mixTy
.
ShieldAmount
{
X
:
p
.
X
.
String
(),
Y
:
p
.
Y
.
String
()})
}
return
rst
,
nil
}
...
...
@@ -222,54 +275,83 @@ func (policy *mixPolicy) createTransferTx(req *mixTy.CreateRawTxReq) (*types.Tra
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"decode req fail"
)
}
note
,
err
:=
policy
.
getNoteInfo
(
transfer
.
GetInput
()
.
NoteHash
,
mixTy
.
NoteStatus_VALID
)
if
err
!=
nil
{
return
nil
,
err
noteHashs
:=
strings
.
Split
(
transfer
.
GetInput
()
.
NoteHashs
,
","
)
var
notes
[]
*
mixTy
.
WalletIndexInfo
for
_
,
h
:=
range
noteHashs
{
note
,
err
:=
policy
.
getNoteInfo
(
h
,
mixTy
.
NoteStatus_VALID
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"get note info for=%s"
,
h
)
}
notes
=
append
(
notes
,
note
)
}
//1.获取Input
inputPart
,
err
:=
policy
.
getTransferInputPart
(
note
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"getTransferInputPart note=%s"
,
inputPart
.
NoteHash
)
var
inputParts
[]
*
TransferInput
for
_
,
n
:=
range
notes
{
input
,
err
:=
policy
.
getTransferInputPart
(
n
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"getTransferInputPart note=%s"
,
n
.
NoteHash
)
}
inputParts
=
append
(
inputParts
,
input
)
}
bizlog
.
Info
(
"transferProof get input succ"
,
"notehash"
,
inputPart
.
NoteHash
)
noteAmount
,
err
:=
strconv
.
ParseUint
(
inputPart
.
Amount
,
10
,
64
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"input part parseUint=%s"
,
inputPart
.
Amount
)
bizlog
.
Info
(
"transferProof get input succ"
,
"notehash"
,
transfer
.
GetInput
()
.
NoteHashs
)
var
inputAmounts
[]
uint64
var
sumInput
uint64
for
_
,
i
:=
range
inputParts
{
amount
,
err
:=
strconv
.
ParseUint
(
i
.
Amount
,
10
,
64
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"input part parseUint=%s"
,
i
.
Amount
)
}
inputAmounts
=
append
(
inputAmounts
,
amount
)
sumInput
+=
amount
}
//2. 获取output
outAmount
,
err
:=
strconv
.
ParseUint
(
transfer
.
Output
.
Deposit
.
Amounts
,
10
,
64
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"output part parseUint=%s"
,
transfer
.
Output
.
Deposit
.
Amounts
)
}
if
outAmount
==
0
{
return
nil
,
errors
.
Wrapf
(
err
,
"output part amount=0, parseUint=%s"
,
transfer
.
Output
.
Deposit
.
Amounts
)
}
if
sumInput
<
outAmount
+
uint64
(
mixTy
.
Privacy2PrivacyTxFee
)
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"out amount=%d big than input=%d - fee=%d"
,
outAmount
,
sumInput
,
uint64
(
mixTy
.
Privacy2PrivacyTxFee
))
}
outPart
,
outDHSecret
,
err
:=
policy
.
getTransferOutput
(
transfer
.
Output
.
Deposit
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
f
(
err
,
"getTransferOutput note=%s"
,
inputPart
.
NoteHash
)
return
nil
,
errors
.
Wrap
(
err
,
"getTransferOutput for deposit"
)
}
bizlog
.
Info
(
"transferProof deposit to receiver succ"
)
//3. 获取找零,并扣除手续费
//如果找零为0也需要设置,否则只有一个输入一个输出,H部分的随机数要相等,就能推测出转账值来
//在transfer output 部分特殊处理,如果amount是0的值则不加进tree
changeAmount
:=
sumInput
-
outAmount
-
uint64
(
mixTy
.
Privacy2PrivacyTxFee
)
change
:=
&
mixTy
.
DepositInfo
{
Addr
:
note
.
Account
,
Amount
:
noteAmount
-
transfer
.
Output
.
Deposit
.
Amount
-
uint64
(
mixTy
.
Privacy2PrivacyTxFee
),
ReceiverAddrs
:
notes
[
0
]
.
Account
,
Amount
s
:
strconv
.
FormatUint
(
changeAmount
,
10
),
}
changePart
,
changeDHSecret
,
err
:=
policy
.
getTransferOutput
(
change
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
f
(
err
,
"change part note=%s"
,
inputPart
.
NoteHash
)
return
nil
,
errors
.
Wrap
(
err
,
"getTransferOutput change part "
)
}
bizlog
.
Info
(
"transferProof deposit to change succ"
,
"notehash"
,
inputPart
.
NoteHash
)
bizlog
.
Info
(
"transferProof deposit to change succ"
)
//获取shieldValue 输入输出对amount隐藏
shieldValue
,
err
:=
getShieldValue
(
noteAmount
,
transfer
.
Output
.
Deposit
.
Amount
,
uint64
(
mixTy
.
Privacy2PrivacyTxFee
))
shieldValue
,
err
:=
getShieldValue
(
inputAmounts
,
outAmount
,
change
Amount
,
uint64
(
mixTy
.
Privacy2PrivacyTxFee
))
if
err
!=
nil
{
return
nil
,
err
}
bizlog
.
Info
(
"transferProof get
commit value succ"
,
"notehash"
,
inputPart
.
NoteHash
)
bizlog
.
Info
(
"transferProof get
shield value succ"
)
//noteCommitX, transferX, changeX
inputPart
.
ShieldAmountX
=
shieldValue
.
Input
.
X
inputPart
.
ShieldAmountY
=
shieldValue
.
Input
.
Y
inputPart
.
AmountRandom
=
shieldValue
.
InputRandom
for
i
,
input
:=
range
inputParts
{
input
.
ShieldAmountX
=
shieldValue
.
Inputs
[
i
]
.
X
input
.
ShieldAmountY
=
shieldValue
.
Inputs
[
i
]
.
Y
input
.
AmountRandom
=
shieldValue
.
InputRandoms
[
i
]
}
outPart
.
ShieldAmountX
=
shieldValue
.
Output
.
X
outPart
.
ShieldAmountY
=
shieldValue
.
Output
.
Y
...
...
@@ -280,40 +362,44 @@ func (policy *mixPolicy) createTransferTx(req *mixTy.CreateRawTxReq) (*types.Tra
changePart
.
AmountRandom
=
shieldValue
.
ChangeRandom
//verify input
inputProof
,
err
:=
getZkProofKeys
(
transfer
.
Input
.
ZkPath
.
Path
+
mixTy
.
TransInputCircuit
,
transfer
.
Input
.
ZkPath
.
Path
+
mixTy
.
TransInputPk
,
*
inputPart
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"input getZkProofKeys note=%s"
,
note
)
}
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_TRANSFERINPUT
,
inputProof
,
transfer
.
Input
.
ZkPath
.
Path
+
mixTy
.
TransInputVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"input verifyProof fail for note=%s"
,
note
)
var
inputProofs
[]
*
mixTy
.
ZkProofInfo
for
i
,
input
:=
range
inputParts
{
inputProof
,
err
:=
getZkProofKeys
(
transfer
.
Input
.
ZkPath
+
mixTy
.
TransInputCircuit
,
transfer
.
Input
.
ZkPath
+
mixTy
.
TransInputPk
,
*
input
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"verify.input getZkProofKeys,the i=%d"
,
i
)
}
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_TRANSFERINPUT
,
inputProof
,
transfer
.
Input
.
ZkPath
+
mixTy
.
TransInputVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"input verifyProof fail,the i=%d"
,
i
)
}
inputProofs
=
append
(
inputProofs
,
inputProof
)
}
//verify output
outputProof
,
err
:=
getZkProofKeys
(
transfer
.
Output
.
ZkPath
.
Path
+
mixTy
.
TransOutputCircuit
,
transfer
.
Output
.
ZkPath
.
Path
+
mixTy
.
TransOutputPk
,
*
outPart
)
outputProof
,
err
:=
getZkProofKeys
(
transfer
.
Output
.
ZkPath
+
mixTy
.
TransOutputCircuit
,
transfer
.
Output
.
Zk
Path
+
mixTy
.
TransOutputPk
,
*
outPart
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"output getZkProofKeys
note=%s"
,
note
)
return
nil
,
errors
.
Wrapf
(
err
,
"output getZkProofKeys
"
)
}
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_TRANSFEROUTPUT
,
outputProof
,
transfer
.
Output
.
ZkPath
.
Path
+
mixTy
.
TransOutputVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"output verifyProof fail
for note=%s"
,
note
)
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_TRANSFEROUTPUT
,
outputProof
,
transfer
.
Output
.
ZkPath
+
mixTy
.
TransOutputVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"output verifyProof fail
"
)
}
outputProof
.
Secrets
=
outDHSecret
//verify change
changeProof
,
err
:=
getZkProofKeys
(
transfer
.
Output
.
ZkPath
.
Path
+
mixTy
.
TransOutputCircuit
,
transfer
.
Output
.
ZkPath
.
Path
+
mixTy
.
TransOutputPk
,
*
changePart
)
changeProof
,
err
:=
getZkProofKeys
(
transfer
.
Output
.
ZkPath
+
mixTy
.
TransOutputCircuit
,
transfer
.
Output
.
Zk
Path
+
mixTy
.
TransOutputPk
,
*
changePart
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"change getZkProofKeys
note=%s"
,
note
)
return
nil
,
errors
.
Wrapf
(
err
,
"change getZkProofKeys
"
)
}
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_TRANSFEROUTPUT
,
changeProof
,
transfer
.
Output
.
ZkPath
.
Path
+
mixTy
.
TransOutputVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"change verifyProof fail
for note=%s"
,
note
)
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_TRANSFEROUTPUT
,
changeProof
,
transfer
.
Output
.
ZkPath
+
mixTy
.
TransOutputVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"change verifyProof fail
"
)
}
changeProof
.
Secrets
=
changeDHSecret
return
policy
.
getTransferTx
(
strings
.
TrimSpace
(
req
.
Title
+
mixTy
.
MixX
),
inputProof
,
outputProof
,
changeProof
)
return
policy
.
getTransferTx
(
strings
.
TrimSpace
(
req
.
Title
+
mixTy
.
MixX
),
inputProof
s
,
outputProof
,
changeProof
)
}
func
(
policy
*
mixPolicy
)
getTransferTx
(
execName
string
,
proofs
...*
mixTy
.
ZkProofInfo
)
(
*
types
.
Transaction
,
error
)
{
func
(
policy
*
mixPolicy
)
getTransferTx
(
execName
string
,
inputProofs
[]
*
mixTy
.
ZkProofInfo
,
proofs
...*
mixTy
.
ZkProofInfo
)
(
*
types
.
Transaction
,
error
)
{
payload
:=
&
mixTy
.
MixTransferAction
{}
payload
.
Input
=
proofs
[
0
]
payload
.
Input
s
=
inputProofs
payload
.
Output
=
proofs
[
1
]
payload
.
Change
=
proofs
[
2
]
...
...
plugin/dapp/mix/wallet/txwithdraw.go
View file @
b4a6fb77
...
...
@@ -136,12 +136,12 @@ func (policy *mixPolicy) createWithdrawTx(req *mixTy.CreateRawTxReq) (*types.Tra
return
nil
,
errors
.
Wrapf
(
err
,
"getWithdrawParams note=%s"
,
note
)
}
proofInfo
,
err
:=
getZkProofKeys
(
withdraw
.
ZkPath
.
Path
+
mixTy
.
WithdrawCircuit
,
withdraw
.
ZkPath
.
Path
+
mixTy
.
WithdrawPk
,
*
input
)
proofInfo
,
err
:=
getZkProofKeys
(
withdraw
.
ZkPath
+
mixTy
.
WithdrawCircuit
,
withdraw
.
Zk
Path
+
mixTy
.
WithdrawPk
,
*
input
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"getZkProofKeys note=%s"
,
note
)
}
//verify
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_WITHDRAW
,
proofInfo
,
withdraw
.
ZkPath
.
Path
+
mixTy
.
WithdrawVk
);
err
!=
nil
{
if
err
:=
policy
.
verifyProofOnChain
(
mixTy
.
VerifyType_WITHDRAW
,
proofInfo
,
withdraw
.
ZkPath
+
mixTy
.
WithdrawVk
);
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"verifyProof fail for note=%s"
,
note
)
}
...
...
@@ -153,6 +153,7 @@ func (policy *mixPolicy) createWithdrawTx(req *mixTy.CreateRawTxReq) (*types.Tra
proofs
=
append
(
proofs
,
proofInfo
)
}
//不设计找零操作,可以全部提取回来后再存入,提取的找零一定是本账户的,不利于隐私,而且提取操作功能不够单一
if
sum
!=
withdraw
.
TotalAmount
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"amount not match req=%d,note.sum=%d"
,
withdraw
.
TotalAmount
,
sum
)
}
...
...
plugin/dapp/mix/wallet/util_test.go
View file @
b4a6fb77
...
...
@@ -13,33 +13,16 @@ import (
)
func
TestGetCommitValue
(
t
*
testing
.
T
)
{
var
note
,
transfer
,
minFee
uint64
note
=
100
transfer
=
60
var
out
,
change
,
minFee
,
sum
uint64
var
inputs
[]
uint64
inputs
=
[]
uint64
{
100
,
80
}
out
=
60
minFee
=
1
_
,
err
:=
getShieldValue
(
note
,
transfer
,
minFee
)
assert
.
Nil
(
t
,
err
)
//transfer > note
note
=
100
transfer
=
100
minFee
=
1
_
,
err
=
getShieldValue
(
note
,
transfer
,
minFee
)
t
.
Log
(
err
)
assert
.
NotNil
(
t
,
err
)
note
=
100
transfer
=
101
minFee
=
0
_
,
err
=
getShieldValue
(
note
,
transfer
,
minFee
)
t
.
Log
(
err
)
assert
.
NotNil
(
t
,
err
)
//change=0
note
=
100
transfer
=
99
minFee
=
1
_
,
err
=
getShieldValue
(
note
,
transfer
,
minFee
)
for
_
,
i
:=
range
inputs
{
sum
+=
i
}
change
=
sum
-
out
-
minFee
_
,
err
:=
getShieldValue
(
inputs
,
out
,
change
,
minFee
)
assert
.
Nil
(
t
,
err
)
a
:=
"0a9c010a4d3136323433323838333039363632323833373538343930323239313730303834393836343035373630373234353332323934333436353837323033353436363930353333373131303333323139124b3238383637383239373931373237373235343930333236303134303538313534363138303135353433383231393339363836333632313634323236303434353739313434393237383237331a82033078656663333331616261616139653039353966636536356163343364626534306364646139356534356261636163613161326166626265366637323533633132326233346264323337353932343066306237623836653363343635666131343065666332636665623861653035366234323163303665353062396532646564636236383963336536656435363636373731343235663736313931653831356665666633646432393965633535386261323731343238333131623130353364376265633864646163313733393632326238666138326438373336666531623332633835376438343330643634646637336530643265326238373932396335633762366437336534383365363130303561313361376531643730636637653834656132613235343166373235363834656266613737653235313232326466313039336230313964646165623963376134393763316538653737386462313730323636323536666666363332643437363738626633366634383361373334346666326330"
...
...
@@ -50,7 +33,7 @@ func TestGetCommitValue(t *testing.T) {
err
=
types
.
Decode
(
da
,
&
data
)
assert
.
Nil
(
t
,
err
)
fmt
.
Println
(
"data"
,
data
)
//
fmt.Println("data", data)
var
deposit
mixTy
.
DepositProofResp
deposit
.
NoteHash
=
"notehashstr"
...
...
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