Commit 25cf36cb authored by madengji's avatar madengji Committed by vipwzw

add proof

parent 0ccc4d97
......@@ -29,6 +29,7 @@ private:
authorizePriKey
spendFlag
noteRandom
noteHash
path...
helper...
......@@ -69,6 +70,9 @@ func NewAuth() *frontend.R1CS {
//通过merkle tree保证noteHash存在,即便return,auth都是null也是存在的,则可以不经过授权即可消费
// specify note hash constraint
preImage := mimc.Hash(&circuit, spendPubKey, returnPubKey, authPubKey, spendAmount, noteRandom)
noteHash := circuit.SECRET_INPUT("noteHash")
circuit.MUSTBE_EQ(noteHash, preImage)
util.MerkelPathPart(&circuit, mimc, preImage)
r1cs := circuit.ToR1CS()
......
......@@ -47,8 +47,8 @@ func TestAuthorizeSpend(t *testing.T) {
good.Assign(backend.Secret, "authorizePriKey", "17822967620457187568904804290291537271142779717280482398091401115827760898835")
good.Assign(backend.Secret, "spendFlag", "1")
good.Assign(backend.Secret, "noteRandom", "2824204835")
good.Assign(backend.Secret, "noteHash", "16308793397024662832064523892418908145900866571524124093537199035808550255649")
//nodehash="16308793397024662832064523892418908145900866571524124093537199035808550255649"
good.Assign(backend.Secret, "path1", "19561523370160677851616596032513161448778901506614020103852017946679781620105")
good.Assign(backend.Secret, "path2", "13898857070666440684265042188056372750257678232709763835292910585848522658637")
good.Assign(backend.Secret, "path3", "15019169196974879571470243100379529757970866395477207575033769902587972032431")
......
......@@ -15,7 +15,7 @@ func main() {
//spend commit hash the circuit implementing
/*
public:
nodeHash
noteHash
amount
private:
......@@ -31,7 +31,7 @@ func NewDeposit() *frontend.R1CS {
circuit := frontend.New()
//公共输入以验证
spendValue := circuit.PUBLIC_INPUT("amount")
amount := circuit.PUBLIC_INPUT("amount")
//spend pubkey
spendPubkey := circuit.SECRET_INPUT("spendPubKey")
......@@ -48,7 +48,7 @@ func NewDeposit() *frontend.R1CS {
//preImage=hash(spendPubkey, returnPubkey,AuthPubkey,spendValue,noteRandom)
noteHash := circuit.PUBLIC_INPUT("noteHash")
// specify note hash constraint
preImage := mimc.Hash(&circuit, spendPubkey, returnPubkey, authPubkey, spendValue, noteRandom)
preImage := mimc.Hash(&circuit, spendPubkey, returnPubkey, authPubkey, amount, noteRandom)
circuit.MUSTBE_EQ(noteHash, preImage)
r1cs := circuit.ToR1CS()
......
......@@ -29,6 +29,7 @@ private:
spendFlag
authorizeFlag
noteRandom
noteHash
path...
helper...
......
......@@ -113,7 +113,7 @@ func createDeposit(cmd *cobra.Command, args []string) {
paySecret.Epk = &pubkey
var group mixTy.DHSecretGroup
group.Spender = &paySecret
group.Payment = &paySecret
payload := &mixTy.MixDepositAction{}
payload.Amount = amount
......@@ -272,13 +272,14 @@ func CreateConfigCmd() *cobra.Command {
}
cmd.AddCommand(mixConfigVerifyKeyParaCmd())
cmd.AddCommand(mixConfigAuthPubKeyParaCmd())
cmd.AddCommand(mixConfigPaymentPubKeyParaCmd())
return cmd
}
func mixConfigVerifyKeyParaCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "verify",
Use: "vk",
Short: "zk proof verify key config cmd",
Run: createConfigVerify,
}
......@@ -288,12 +289,7 @@ func mixConfigVerifyKeyParaCmd() *cobra.Command {
}
func addVkConfigFlags(cmd *cobra.Command) {
cmd.Flags().Uint32P("action", "a", 0, "0:add,1:delete")
cmd.Flags().Uint32P("curveid", "i", 3, "zk curve id,1:bls377,2:bls381,3:bn256")
cmd.MarkFlagRequired("curveid")
cmd.Flags().Uint32P("circuit", "c", 0, "mix circuit type,0:deposit,1:withdraw,2:spendinput,3:spendout,4:authorize")
cmd.Flags().Uint32P("circuit", "c", 0, "mix circuit type,0:deposit,1:withdraw,2:payinput,3:payoutput,4:authorize")
cmd.MarkFlagRequired("circuit")
cmd.Flags().StringP("zkey", "z", "", "zk proof verify key")
......@@ -303,19 +299,16 @@ func addVkConfigFlags(cmd *cobra.Command) {
func createConfigVerify(cmd *cobra.Command, args []string) {
paraName, _ := cmd.Flags().GetString("paraName")
action, _ := cmd.Flags().GetUint32("action")
curveid, _ := cmd.Flags().GetUint32("curveid")
circuit, _ := cmd.Flags().GetUint32("circuit")
key, _ := cmd.Flags().GetString("zkey")
var zkVk mixTy.ZkVerifyKey
zkVk.Value = key
zkVk.Type = mixTy.VerifyType(circuit)
zkVk.CurveId = mixTy.ZkCurveId(curveid)
payload := &mixTy.MixConfigAction{}
payload.Ty = mixTy.MixConfigType_VerifyKey
payload.Action = mixTy.MixConfigAct(action)
payload.Action = mixTy.MixConfigAct(0)
payload.Value = &mixTy.MixConfigAction_VerifyKey{VerifyKey: &zkVk}
params := &rpctypes.CreateTxIn{
......@@ -331,7 +324,7 @@ func createConfigVerify(cmd *cobra.Command, args []string) {
func mixConfigAuthPubKeyParaCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "pubkey",
Use: "auth",
Short: "mix authorize pub key config cmd",
Run: createConfigPubKey,
}
......@@ -372,6 +365,52 @@ func createConfigPubKey(cmd *cobra.Command, args []string) {
}
func mixConfigPaymentPubKeyParaCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "pay",
Short: "mix payment pub key config cmd",
Run: createConfigPayPubKey,
}
addPayPubKeyConfigFlags(cmd)
return cmd
}
func addPayPubKeyConfigFlags(cmd *cobra.Command) {
cmd.Flags().StringP("paying", "p", "", "paying key")
cmd.MarkFlagRequired("paying")
cmd.Flags().StringP("keyX", "x", "", "receiving pub key X")
cmd.MarkFlagRequired("keyX")
cmd.Flags().StringP("keyY", "y", "", "receiving pub key Y")
cmd.MarkFlagRequired("keyY")
}
func createConfigPayPubKey(cmd *cobra.Command, args []string) {
paraName, _ := cmd.Flags().GetString("paraName")
paying, _ := cmd.Flags().GetString("paying")
keyx, _ := cmd.Flags().GetString("keyX")
keyy, _ := cmd.Flags().GetString("keyY")
payload := &mixTy.MixConfigAction{}
payload.Ty = mixTy.MixConfigType_PaymentPubKey
receivingKey := &mixTy.PubKey{X: keyx, Y: keyy}
payload.Value = &mixTy.MixConfigAction_PaymentKey{PaymentKey: &mixTy.PaymentKey{PayingKey: paying, ReceivingKey: receivingKey}}
params := &rpctypes.CreateTxIn{
Execer: getRealExecName(paraName, mixTy.MixX),
ActionName: "Config",
Payload: types.MustPBToJSON(payload),
}
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.CreateTransaction", params, nil)
ctx.RunWithoutMarshal()
}
func QueryCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "query",
......@@ -381,7 +420,7 @@ func QueryCmd() *cobra.Command {
cmd.AddCommand(GetTreeLeavesCmd())
cmd.AddCommand(GetTreeRootsCmd())
cmd.AddCommand(ShowMixTxsCmd())
cmd.AddCommand(ShowPaymentPubKeyCmd())
return cmd
}
......@@ -542,6 +581,39 @@ func showMixTxs(cmd *cobra.Command, args []string) {
ctx.Run()
}
// ShowProposalBoardCmd 显示提案查询信息
func ShowPaymentPubKeyCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "paykey",
Short: "show addr's payment pub key info",
Run: showPayment,
}
addShowPaymentflags(cmd)
return cmd
}
func addShowPaymentflags(cmd *cobra.Command) {
cmd.Flags().StringP("addr", "s", "", "mix tx hash")
cmd.MarkFlagRequired("addr")
}
func showPayment(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
addr, _ := cmd.Flags().GetString("addr")
var params rpctypes.Query4Jrpc
params.Execer = mixTy.MixX
params.FuncName = "PaymentPubKey"
params.Payload = types.MustPBToJSON(&types.ReqString{Data: addr})
var resp mixTy.PaymentKey
ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &resp)
ctx.Run()
}
func WalletCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "wallet",
......@@ -552,9 +624,8 @@ func WalletCmd() *cobra.Command {
cmd.AddCommand(RescanCmd())
cmd.AddCommand(RescanStatusCmd())
cmd.AddCommand(EnableCmd())
cmd.AddCommand(EncodeSecretDataCmd())
cmd.AddCommand(EncryptSecretDataCmd())
cmd.AddCommand(DecryptSecretDataCmd())
cmd.AddCommand(SecretCmd())
cmd.AddCommand(ProofCmd())
return cmd
}
......@@ -710,11 +781,23 @@ func enablePrivacy(cmd *cobra.Command, args []string) {
ctx.Run()
}
// ShowAccountPrivacyInfo get para chain status by height
func SecretCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "secret",
Short: "note secret cmd",
}
cmd.AddCommand(EncodeSecretDataCmd())
cmd.AddCommand(EncryptSecretDataCmd())
cmd.AddCommand(DecryptSecretDataCmd())
return cmd
}
// EncodeSecretDataCmd get para chain status by height
func EncodeSecretDataCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "encode",
Short: "encode secret data",
Use: "raw",
Short: "raw secret data",
Run: encodeSecret,
}
encodeSecretCmdFlags(cmd)
......@@ -729,7 +812,7 @@ func encodeSecretCmdFlags(cmd *cobra.Command) {
cmd.Flags().StringP("authorize", "a", "", "authorize key")
cmd.Flags().StringP("amount", "m", "", "amount with 1e8")
cmd.Flags().StringP("amount", "m", "", "amount")
cmd.MarkFlagRequired("amount")
}
......@@ -840,3 +923,219 @@ func decryptSecret(cmd *cobra.Command, args []string) {
ctx := jsonclient.NewRPCCtx(rpcLaddr, "mix.DecryptSecretData", req, &res)
ctx.Run()
}
func ProofCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "proof",
Short: "circuit proof inputs",
}
cmd.AddCommand(DepositInputsCmd())
cmd.AddCommand(PayInInputsCmd())
cmd.AddCommand(PayOutInputsCmd())
cmd.AddCommand(WithdrawInputsCmd())
cmd.AddCommand(AuthInputsCmd())
return cmd
}
// DepositInputsCmd get para chain status by height
func DepositInputsCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "deposit",
Short: "one key get deposit input data",
Run: depositSecret,
}
depositSecretCmdFlags(cmd)
return cmd
}
func depositSecretCmdFlags(cmd *cobra.Command) {
cmd.Flags().StringP("payment", "p", "", "payment addr")
cmd.MarkFlagRequired("payment")
cmd.Flags().StringP("return", "r", "", "return addr")
cmd.Flags().StringP("authorize", "a", "", "authorize addr")
cmd.Flags().StringP("amount", "m", "", "amount")
cmd.MarkFlagRequired("amount")
}
func depositSecret(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
payment, _ := cmd.Flags().GetString("payment")
returnKey, _ := cmd.Flags().GetString("return")
authorize, _ := cmd.Flags().GetString("authorize")
amount, _ := cmd.Flags().GetString("amount")
req := &mixTy.DepositProofReq{
PaymentAddr: payment,
ReturnAddr: returnKey,
AuthorizeAddr: authorize,
Amount: amount,
}
var res mixTy.DepositProofResp
ctx := jsonclient.NewRPCCtx(rpcLaddr, "mix.DepositProof", req, &res)
ctx.Run()
}
// DepositInputsCmd get para chain status by height
func PayInInputsCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "payin",
Short: "one key get pay input data",
Run: payInSecret,
}
payInSecretCmdFlags(cmd)
return cmd
}
func payInSecretCmdFlags(cmd *cobra.Command) {
cmd.Flags().StringP("payment", "p", "", "payment addr")
cmd.MarkFlagRequired("payment")
cmd.Flags().StringP("return", "r", "", "return addr")
cmd.Flags().StringP("authorize", "a", "", "authorize addr")
cmd.Flags().StringP("amount", "m", "", "amount")
cmd.MarkFlagRequired("amount")
}
func payInSecret(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
payment, _ := cmd.Flags().GetString("payment")
returnKey, _ := cmd.Flags().GetString("return")
authorize, _ := cmd.Flags().GetString("authorize")
amount, _ := cmd.Flags().GetString("amount")
req := &mixTy.DepositProofReq{
PaymentAddr: payment,
ReturnAddr: returnKey,
AuthorizeAddr: authorize,
Amount: amount,
}
var res mixTy.DHSecretGroup
ctx := jsonclient.NewRPCCtx(rpcLaddr, "mix.PayInProof", req, &res)
ctx.Run()
}
// DepositInputsCmd get para chain status by height
func PayOutInputsCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "payout",
Short: "one key get payout input data",
Run: payOutSecret,
}
payOutSecretCmdFlags(cmd)
return cmd
}
func payOutSecretCmdFlags(cmd *cobra.Command) {
cmd.Flags().StringP("payment", "p", "", "payment addr")
cmd.MarkFlagRequired("payment")
cmd.Flags().StringP("return", "r", "", "return addr")
cmd.Flags().StringP("authorize", "a", "", "authorize addr")
cmd.Flags().StringP("amount", "m", "", "amount")
cmd.MarkFlagRequired("amount")
}
func payOutSecret(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
payment, _ := cmd.Flags().GetString("payment")
returnKey, _ := cmd.Flags().GetString("return")
authorize, _ := cmd.Flags().GetString("authorize")
amount, _ := cmd.Flags().GetString("amount")
req := &mixTy.DepositProofReq{
PaymentAddr: payment,
ReturnAddr: returnKey,
AuthorizeAddr: authorize,
Amount: amount,
}
var res mixTy.DepositProofResp
ctx := jsonclient.NewRPCCtx(rpcLaddr, "mix.PayOutProof", req, &res)
ctx.Run()
}
// DepositInputsCmd get para chain status by height
func WithdrawInputsCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "withdraw",
Short: "one key get withdraw proof input data",
Run: withdrawSecret,
}
withdrawSecretCmdFlags(cmd)
return cmd
}
func withdrawSecretCmdFlags(cmd *cobra.Command) {
cmd.Flags().StringP("noteHash", "n", "", "note hash to spend")
cmd.MarkFlagRequired("noteHash")
}
func withdrawSecret(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
noteHash, _ := cmd.Flags().GetString("noteHash")
req := &mixTy.WithdrawProofReq{
NoteHash: noteHash,
}
var res mixTy.WithdrawProofResp
ctx := jsonclient.NewRPCCtx(rpcLaddr, "mix.WithdrawProof", req, &res)
ctx.Run()
}
// DepositInputsCmd get para chain status by height
func AuthInputsCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "auth",
Short: "one key get authorize input data",
Run: authSecret,
}
authSecretCmdFlags(cmd)
return cmd
}
func authSecretCmdFlags(cmd *cobra.Command) {
cmd.Flags().StringP("payment", "p", "", "payment addr")
cmd.MarkFlagRequired("payment")
cmd.Flags().StringP("return", "r", "", "return addr")
cmd.Flags().StringP("authorize", "a", "", "authorize addr")
cmd.Flags().StringP("amount", "m", "", "amount")
cmd.MarkFlagRequired("amount")
}
func authSecret(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
payment, _ := cmd.Flags().GetString("payment")
returnKey, _ := cmd.Flags().GetString("return")
authorize, _ := cmd.Flags().GetString("authorize")
amount, _ := cmd.Flags().GetString("amount")
req := &mixTy.DepositProofReq{
PaymentAddr: payment,
ReturnAddr: returnKey,
AuthorizeAddr: authorize,
Amount: amount,
}
var res mixTy.DHSecretGroup
ctx := jsonclient.NewRPCCtx(rpcLaddr, "mix.AuthProof", req, &res)
ctx.Run()
}
......@@ -6,9 +6,6 @@ package executor
import (
"bytes"
"strconv"
"strings"
dbm "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/types"
"github.com/33cn/plugin/plugin/dapp/mix/executor/merkletree"
......@@ -235,11 +232,10 @@ func getProveData(targetLeaf []byte, leaves [][]byte) (*mixTy.CommitTreeProve, e
}
helpers := merkletree.GenerateProofHelper(proofSet, proofIndex, num)
var helpStr []string
for _, i := range helpers {
helpStr = append(helpStr, strconv.Itoa(i))
prove.Helpers = append(prove.Helpers, uint32(i))
}
prove.Helpers = strings.Join(helpStr, ",")
return &prove, nil
......
......@@ -31,24 +31,22 @@ func (a *action) Config(config *mixTy.MixConfigAction) (*types.Receipt, error) {
}
switch config.Ty {
case mixTy.MixConfigType_VerifyKey:
if config.Action == mixTy.MixConfigAct_Add {
return a.ConfigAddVerifyKey(config.GetVerifyKey())
} else {
return a.ConfigDeleteVerifyKey(config.GetVerifyKey())
}
case mixTy.MixConfigType_AuthPubKey:
if config.Action == mixTy.MixConfigAct_Add {
return a.ConfigAddAuthPubKey(config.GetAuthPk())
} else {
return a.ConfigDeleteAuthPubKey(config.GetAuthPk())
}
case mixTy.MixConfigType_PaymentPubKey:
return a.ConfigPaymentPubKey(config.GetPaymentKey())
}
return nil, types.ErrNotFound
return nil, errors.Wrapf(types.ErrNotFound, "ty=%d", config.Ty)
}
func makeConfigVerifyKeyReceipt(data *mixTy.ZkVerifyKeys) *types.Receipt {
key := getVerifyKeysKey()
func makeConfigVerifyKeyReceipt(data *mixTy.ZkVerifyKeys, ty int32) *types.Receipt {
key := getVerifyKeysKey(ty)
return &types.Receipt{
Ty: types.ExecOk,
KV: []*types.KeyValue{
......@@ -61,8 +59,8 @@ func makeConfigVerifyKeyReceipt(data *mixTy.ZkVerifyKeys) *types.Receipt {
}
func getVerifyKeys(db dbm.KV) (*mixTy.ZkVerifyKeys, error) {
key := getVerifyKeysKey()
func getVerifyKeys(db dbm.KV, ty int32) (*mixTy.ZkVerifyKeys, error) {
key := getVerifyKeysKey(ty)
v, err := db.Get(key)
if err != nil {
return nil, errors.Wrapf(err, "get db verify key")
......@@ -77,36 +75,19 @@ func getVerifyKeys(db dbm.KV) (*mixTy.ZkVerifyKeys, error) {
}
func (a *action) ConfigAddVerifyKey(newKey *mixTy.ZkVerifyKey) (*types.Receipt, error) {
keys, err := getVerifyKeys(a.db)
keys, err := getVerifyKeys(a.db, int32(newKey.Type))
if isNotFound(errors.Cause(err)) {
keys := &mixTy.ZkVerifyKeys{}
keys.Data = append(keys.Data, newKey)
return makeConfigVerifyKeyReceipt(keys), nil
}
if err != nil {
return nil, err
return makeConfigVerifyKeyReceipt(keys, int32(newKey.Type)), nil
}
keys.Data = append(keys.Data, newKey)
return makeConfigVerifyKeyReceipt(keys), nil
}
func (a *action) ConfigDeleteVerifyKey(config *mixTy.ZkVerifyKey) (*types.Receipt, error) {
keys, err := getVerifyKeys(a.db)
if err != nil {
return nil, err
return nil, errors.Wrapf(err, "AddVerifyKey,ty=%d", newKey.Type)
}
//逆序保存keys,保证新的key先遍历到
keys.Data = []*mixTy.ZkVerifyKey{newKey, keys.Data[0]}
return makeConfigVerifyKeyReceipt(keys, int32(newKey.Type)), nil
var newKeys mixTy.ZkVerifyKeys
for _, v := range keys.Data {
//不同类型的vk 肯定不同,
if v.CurveId == config.CurveId && v.Value == config.Value {
continue
}
newKeys.Data = append(newKeys.Data, v)
}
return makeConfigVerifyKeyReceipt(&newKeys), nil
}
func makeConfigAuthKeyReceipt(data *mixTy.AuthPubKeys) *types.Receipt {
......@@ -169,3 +150,44 @@ func (a *action) ConfigDeleteAuthPubKey(key string) (*types.Receipt, error) {
return makeConfigAuthKeyReceipt(&newKeys), nil
}
func makeConfigPaymentKeyReceipt(data *mixTy.PaymentKey) *types.Receipt {
key := getPaymentPubKey(data.Addr)
return &types.Receipt{
Ty: types.ExecOk,
KV: []*types.KeyValue{
{Key: key, Value: types.Encode(data)},
},
Logs: []*types.ReceiptLog{
{Ty: mixTy.TyLogMixConfigPaymentKey, Log: types.Encode(data)},
},
}
}
func GetPaymentPubKey(db dbm.KV, addr string) (*mixTy.PaymentKey, error) {
key := getPaymentPubKey(addr)
v, err := db.Get(key)
if err != nil {
return nil, errors.Wrapf(err, "get db")
}
var keys mixTy.PaymentKey
err = types.Decode(v, &keys)
if err != nil {
return nil, errors.Wrapf(err, "decode db key")
}
return &keys, nil
}
func (a *action) ConfigPaymentPubKey(paykey *mixTy.PaymentKey) (*types.Receipt, error) {
if paykey == nil || len(paykey.PayingKey) == 0 || len(paykey.ReceivingKey.X) == 0 || len(paykey.ReceivingKey.Y) == 0 {
return nil, errors.Wrapf(types.ErrInvalidParam, "pubkey=%v", paykey)
}
//直接覆盖
return makeConfigPaymentKeyReceipt(&mixTy.PaymentKey{
Addr: a.fromaddr,
PayingKey: paykey.PayingKey,
ReceivingKey: paykey.ReceivingKey}), nil
}
......@@ -24,15 +24,14 @@ func makeNullifierSetReceipt(hash string, data proto.Message) *types.Receipt {
}
func zkProofVerify(db dbm.KV, proof *mixTy.ZkProofInfo, verifyTy mixTy.VerifyType) error {
keys, err := getVerifyKeys(db)
func zkProofVerify(db dbm.KV, proof *mixTy.ZkProofInfo, ty mixTy.VerifyType) error {
keys, err := getVerifyKeys(db, int32(ty))
if err != nil {
return err
}
var pass bool
for _, verifyKey := range keys.Data {
if verifyKey.Type == verifyTy {
ok, err := zksnark.Verify(verifyKey.Value, proof.Proof, proof.PublicInput)
if err != nil {
return err
......@@ -43,7 +42,6 @@ func zkProofVerify(db dbm.KV, proof *mixTy.ZkProofInfo, verifyTy mixTy.VerifyTyp
pass = true
break
}
}
if !pass {
return errors.Wrap(mixTy.ErrZkVerifyFail, "verify")
}
......
......@@ -11,6 +11,7 @@ import (
var (
verifyKeys string
authPubKeys string
paymentPubKey string
commitTreeArchiveRoots string
commitTreeCurrentRoots string
commitTreeCurrentLeaves string
......@@ -23,6 +24,7 @@ var (
func setPrefix() {
verifyKeys = "mavl-mix-verify-keys-"
authPubKeys = "mavl-mix-auth-pubkeys-"
paymentPubKey = "mavl-mix-payment-pubkey-"
commitTreeArchiveRoots = "mavl-mix-commitTree-roots-archive-"
commitTreeCurrentRoots = "mavl-mix-commitTree-current-roots"
commitTreeCurrentLeaves = "mavl-mix-commitTree-current-leaves-"
......@@ -35,14 +37,18 @@ func setPrefix() {
}
//support multi version verify parameter setting
func getVerifyKeysKey() []byte {
return []byte(fmt.Sprintf(verifyKeys))
func getVerifyKeysKey(ty int32) []byte {
return []byte(fmt.Sprintf(verifyKeys+"%d", ty))
}
func getAuthPubKeysKey() []byte {
return []byte(fmt.Sprintf(authPubKeys))
}
func getPaymentPubKey(addr string) []byte {
return []byte(fmt.Sprintf(paymentPubKey+"%s", addr))
}
func calcCommitTreeArchiveRootsKey() []byte {
return []byte(fmt.Sprintf(commitTreeArchiveRoots))
}
......@@ -56,7 +62,7 @@ func calcCurrentCommitLeavesKey() []byte {
}
func calcCommitTreeRootLeaves(rootHash string) []byte {
return []byte(fmt.Sprintf(commitTreeRootLeaves+"s", rootHash))
return []byte(fmt.Sprintf(commitTreeRootLeaves+"%s", rootHash))
}
func calcAuthorizeHashKey(hash string) []byte {
......
......@@ -71,3 +71,24 @@ func (m *Mix) CheckTx(tx *types.Transaction, index int) error {
return nil
}
// CheckTx check transaction
func (m *Mix) CheckTx(tx *types.Transaction, index int) error {
action := new(mixTy.MixAction)
if err := types.Decode(tx.Payload, action); err != nil {
mlog.Error("CheckTx decode", "err", err)
return err
}
if action.Ty != mixTy.MixActionTransfer {
// mix隐私交易,只私对私需要特殊签名验证
return m.DriverBase.CheckTx(tx, index)
}
_, _, err := MixTransferInfoVerify(m.GetStateDB(), action.GetTransfer())
if err != nil {
mlog.Error("checkTx", "err", err)
return err
}
return nil
}
......@@ -10,7 +10,7 @@ import (
mixTy "github.com/33cn/plugin/plugin/dapp/mix/types"
)
// Query_GetTitle query paracross title
// Query_GetTreePath 根据leaf获取path 证明和roothash
func (m *Mix) Query_GetTreePath(in *mixTy.TreeInfoReq) (types.Message, error) {
if in == nil {
return nil, types.ErrInvalidParam
......@@ -60,3 +60,9 @@ func (m *Mix) Query_GetRootList(in *types.ReqNil) (types.Message, error) {
func (m *Mix) Query_ListMixTxs(in *mixTy.MixTxListReq) (types.Message, error) {
return m.listMixInfos(in)
}
// Query_PaymentPubKey 批量查询
func (m *Mix) Query_PaymentPubKey(addr *types.ReqString) (types.Message, error) {
return GetPaymentPubKey(m.GetStateDB(), addr.Data)
}
......@@ -15,18 +15,11 @@ enum VerifyType{
AUTHORIZE = 4;
}
//区分zk 所选取的曲线,需要和gnark保持一致
enum ZkCurveId{
UNKNOWN = 0;
BLS377 = 1;
BLS381 = 2;
BN256 = 3;
}
message ZkVerifyKey {
ZkCurveId curveId = 1;
VerifyType type = 2;
string value = 3;
VerifyType type = 1;
string value = 2;
}
message ZkVerifyKeys{
......@@ -37,11 +30,18 @@ message AuthPubKeys{
repeated string data = 1;
}
message PaymentKey{
string addr = 1;
string payingKey = 2;
PubKey receivingKey = 3;
}
enum MixConfigType{
VerifyKey = 0;
//register unify authorize pubkey
AuthPubKey = 1;
//for spender's pay pubkey register,DH secret
//spender注册自己的payment公钥, 用来生成DiffHellman秘钥
PaymentPubKey = 2;
}
......@@ -60,7 +60,7 @@ message MixConfigAction {
oneof value {
ZkVerifyKey verifyKey = 3;
string authPk = 4;
PubKey paymentPk = 5;
PaymentKey paymentKey = 5;
}
}
......@@ -72,7 +72,7 @@ message DHSecret{
//Diff-Helman 加密group, for spender, returner, authorizer to decrypt
message DHSecretGroup{
DHSecret spender = 1;
DHSecret payment = 1;
DHSecret returner = 2;
DHSecret authorize = 3;
}
......@@ -184,7 +184,7 @@ message CommitTreeProve {
repeated string proofSet = 2;
uint32 proofIndex = 3;
uint32 numLeaves = 4;
string helpers = 5;
repeated uint32 helpers = 5;
}
message TreeInfoReq{
......@@ -259,18 +259,76 @@ message DecryptSecretData{
}
//一键式获取加密数据
message DepositProofReq{
string paymentAddr = 1;
string returnAddr = 2;
string authorizeAddr = 3;
string amount = 4;
}
message DepositProofResp{
string noteHash = 1;
SecretData proof = 2;
DHSecretGroup secrets = 3;
}
message TreePathProof{
string treeRootHash = 1;
repeated string treePath = 2;
repeated uint32 helpers = 3;
repeated uint32 validPath = 4;
}
message WithdrawProofReq{
string noteHash = 1;
}
message WithdrawProofResp{
SecretData proof = 1;
string nullifierHash = 2;
string authSpendHash = 3;
string noteHash = 4;
string spendPrivKey = 5;
uint32 spendFlag = 6;
uint32 authFlag = 7;
TreePathProof treeProof = 8;
}
message AuthProofReq{
string noteHash = 1;
uint32 authReturn = 2;
}
message AuthProofResp{
SecretData proof = 1;
string authPubKey = 2;
string authPrivKey = 3;
string authHash = 4;
string authSpendHash = 5;
string noteHash = 6;
uint32 spendFlag = 7;
TreePathProof treeProof = 8;
}
enum NoteStatus{
UNDEF = 0;
FROZEN = 1; //未授权
OPEN = 2; //已授权可使用
CLOSE = 3; //已使用
VALID = 2; //已授权可使用
INVALID = 3; //已使用
}
message WalletIndexInfo {
string noteHash = 1;
string nullifier = 2;
string authSpendHash = 3;
string spender = 4;
bool isReturner = 4;
string account = 5; //账户地址
NoteStatus status = 6;
SecretData secret = 7;
......@@ -287,7 +345,6 @@ message WalletMixIndexReq {
string noteHash = 1;
string nullifier = 2;
string authSpendHash = 3;
string spender = 4;
string account = 5;
int32 status = 6;
int32 count = 7;
......
......@@ -132,3 +132,48 @@ func (c *Jrpc) DecryptSecretData(in *mixTy.DecryptSecretData, result *json.RawMe
*result, err = types.PBToJSON(reply)
return err
}
func (c *Jrpc) DepositProof(in *mixTy.DepositProofReq, result *json.RawMessage) error {
reply, err := c.cli.ExecWalletFunc(mixTy.MixX, "DepositProof", in)
if err != nil {
return err
}
*result, err = types.PBToJSON(reply)
return err
}
func (c *Jrpc) AuthProof(in *mixTy.DepositProofReq, result *json.RawMessage) error {
reply, err := c.cli.ExecWalletFunc(mixTy.MixX, "AuthProof", in)
if err != nil {
return err
}
*result, err = types.PBToJSON(reply)
return err
}
func (c *Jrpc) PayInProof(in *mixTy.DepositProofReq, result *json.RawMessage) error {
reply, err := c.cli.ExecWalletFunc(mixTy.MixX, "PayInProof", in)
if err != nil {
return err
}
*result, err = types.PBToJSON(reply)
return err
}
func (c *Jrpc) PayOutProof(in *mixTy.DepositProofReq, result *json.RawMessage) error {
reply, err := c.cli.ExecWalletFunc(mixTy.MixX, "PayOutProof", in)
if err != nil {
return err
}
*result, err = types.PBToJSON(reply)
return err
}
func (c *Jrpc) WithdrawProof(in *mixTy.WithdrawProofReq, result *json.RawMessage) error {
reply, err := c.cli.ExecWalletFunc(mixTy.MixX, "WithdrawProof", in)
if err != nil {
return err
}
*result, err = types.PBToJSON(reply)
return err
}
......@@ -28,6 +28,7 @@ const (
TyLogNulliferSet = 760
TyLogAuthorizeSet = 761
TyLogAuthorizeSpendSet = 762
TyLogMixConfigPaymentKey = 763
)
//action type
......
......@@ -6,13 +6,12 @@ package types
import (
context "context"
fmt "fmt"
math "math"
types "github.com/33cn/chain33/types"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
......@@ -61,38 +60,6 @@ func (VerifyType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{0}
}
//区分zk 所选取的曲线,需要和gnark保持一致
type ZkCurveId int32
const (
ZkCurveId_UNKNOWN ZkCurveId = 0
ZkCurveId_BLS377 ZkCurveId = 1
ZkCurveId_BLS381 ZkCurveId = 2
ZkCurveId_BN256 ZkCurveId = 3
)
var ZkCurveId_name = map[int32]string{
0: "UNKNOWN",
1: "BLS377",
2: "BLS381",
3: "BN256",
}
var ZkCurveId_value = map[string]int32{
"UNKNOWN": 0,
"BLS377": 1,
"BLS381": 2,
"BN256": 3,
}
func (x ZkCurveId) String() string {
return proto.EnumName(ZkCurveId_name, int32(x))
}
func (ZkCurveId) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{1}
}
type MixConfigType int32
const (
......@@ -100,6 +67,7 @@ const (
//register unify authorize pubkey
MixConfigType_AuthPubKey MixConfigType = 1
//for spender's pay pubkey register,DH secret
//spender注册自己的payment公钥, 用来生成DiffHellman秘钥
MixConfigType_PaymentPubKey MixConfigType = 2
)
......@@ -120,7 +88,7 @@ func (x MixConfigType) String() string {
}
func (MixConfigType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{2}
return fileDescriptor_5c21d519a9be369a, []int{1}
}
type MixConfigAct int32
......@@ -145,7 +113,7 @@ func (x MixConfigAct) String() string {
}
func (MixConfigAct) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{3}
return fileDescriptor_5c21d519a9be369a, []int{2}
}
type NoteStatus int32
......@@ -153,22 +121,22 @@ type NoteStatus int32
const (
NoteStatus_UNDEF NoteStatus = 0
NoteStatus_FROZEN NoteStatus = 1
NoteStatus_OPEN NoteStatus = 2
NoteStatus_CLOSE NoteStatus = 3
NoteStatus_VALID NoteStatus = 2
NoteStatus_INVALID NoteStatus = 3
)
var NoteStatus_name = map[int32]string{
0: "UNDEF",
1: "FROZEN",
2: "OPEN",
3: "CLOSE",
2: "VALID",
3: "INVALID",
}
var NoteStatus_value = map[string]int32{
"UNDEF": 0,
"FROZEN": 1,
"OPEN": 2,
"CLOSE": 3,
"VALID": 2,
"INVALID": 3,
}
func (x NoteStatus) String() string {
......@@ -176,7 +144,7 @@ func (x NoteStatus) String() string {
}
func (NoteStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{4}
return fileDescriptor_5c21d519a9be369a, []int{3}
}
type MixWalletRescanStatus int32
......@@ -204,13 +172,12 @@ func (x MixWalletRescanStatus) String() string {
}
func (MixWalletRescanStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{5}
return fileDescriptor_5c21d519a9be369a, []int{4}
}
type ZkVerifyKey struct {
CurveId ZkCurveId `protobuf:"varint,1,opt,name=curveId,proto3,enum=types.ZkCurveId" json:"curveId,omitempty"`
Type VerifyType `protobuf:"varint,2,opt,name=type,proto3,enum=types.VerifyType" json:"type,omitempty"`
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
Type VerifyType `protobuf:"varint,1,opt,name=type,proto3,enum=types.VerifyType" json:"type,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -241,13 +208,6 @@ func (m *ZkVerifyKey) XXX_DiscardUnknown() {
var xxx_messageInfo_ZkVerifyKey proto.InternalMessageInfo
func (m *ZkVerifyKey) GetCurveId() ZkCurveId {
if m != nil {
return m.CurveId
}
return ZkCurveId_UNKNOWN
}
func (m *ZkVerifyKey) GetType() VerifyType {
if m != nil {
return m.Type
......@@ -340,6 +300,61 @@ func (m *AuthPubKeys) GetData() []string {
return nil
}
type PaymentKey struct {
Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
PayingKey string `protobuf:"bytes,2,opt,name=payingKey,proto3" json:"payingKey,omitempty"`
ReceivingKey *PubKey `protobuf:"bytes,3,opt,name=receivingKey,proto3" json:"receivingKey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PaymentKey) Reset() { *m = PaymentKey{} }
func (m *PaymentKey) String() string { return proto.CompactTextString(m) }
func (*PaymentKey) ProtoMessage() {}
func (*PaymentKey) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{3}
}
func (m *PaymentKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PaymentKey.Unmarshal(m, b)
}
func (m *PaymentKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PaymentKey.Marshal(b, m, deterministic)
}
func (m *PaymentKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_PaymentKey.Merge(m, src)
}
func (m *PaymentKey) XXX_Size() int {
return xxx_messageInfo_PaymentKey.Size(m)
}
func (m *PaymentKey) XXX_DiscardUnknown() {
xxx_messageInfo_PaymentKey.DiscardUnknown(m)
}
var xxx_messageInfo_PaymentKey proto.InternalMessageInfo
func (m *PaymentKey) GetAddr() string {
if m != nil {
return m.Addr
}
return ""
}
func (m *PaymentKey) GetPayingKey() string {
if m != nil {
return m.PayingKey
}
return ""
}
func (m *PaymentKey) GetReceivingKey() *PubKey {
if m != nil {
return m.ReceivingKey
}
return nil
}
//config verify parameter for proof
//当前authPk=mimc_hash(prikey),没有X,Y值
type MixConfigAction struct {
......@@ -348,7 +363,7 @@ type MixConfigAction struct {
// Types that are valid to be assigned to Value:
// *MixConfigAction_VerifyKey
// *MixConfigAction_AuthPk
// *MixConfigAction_PaymentPk
// *MixConfigAction_PaymentKey
Value isMixConfigAction_Value `protobuf_oneof:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -359,7 +374,7 @@ func (m *MixConfigAction) Reset() { *m = MixConfigAction{} }
func (m *MixConfigAction) String() string { return proto.CompactTextString(m) }
func (*MixConfigAction) ProtoMessage() {}
func (*MixConfigAction) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{3}
return fileDescriptor_5c21d519a9be369a, []int{4}
}
func (m *MixConfigAction) XXX_Unmarshal(b []byte) error {
......@@ -406,15 +421,15 @@ type MixConfigAction_AuthPk struct {
AuthPk string `protobuf:"bytes,4,opt,name=authPk,proto3,oneof"`
}
type MixConfigAction_PaymentPk struct {
PaymentPk *PubKey `protobuf:"bytes,5,opt,name=paymentPk,proto3,oneof"`
type MixConfigAction_PaymentKey struct {
PaymentKey *PaymentKey `protobuf:"bytes,5,opt,name=paymentKey,proto3,oneof"`
}
func (*MixConfigAction_VerifyKey) isMixConfigAction_Value() {}
func (*MixConfigAction_AuthPk) isMixConfigAction_Value() {}
func (*MixConfigAction_PaymentPk) isMixConfigAction_Value() {}
func (*MixConfigAction_PaymentKey) isMixConfigAction_Value() {}
func (m *MixConfigAction) GetValue() isMixConfigAction_Value {
if m != nil {
......@@ -437,9 +452,9 @@ func (m *MixConfigAction) GetAuthPk() string {
return ""
}
func (m *MixConfigAction) GetPaymentPk() *PubKey {
if x, ok := m.GetValue().(*MixConfigAction_PaymentPk); ok {
return x.PaymentPk
func (m *MixConfigAction) GetPaymentKey() *PaymentKey {
if x, ok := m.GetValue().(*MixConfigAction_PaymentKey); ok {
return x.PaymentKey
}
return nil
}
......@@ -449,7 +464,7 @@ func (*MixConfigAction) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*MixConfigAction_VerifyKey)(nil),
(*MixConfigAction_AuthPk)(nil),
(*MixConfigAction_PaymentPk)(nil),
(*MixConfigAction_PaymentKey)(nil),
}
}
......@@ -466,7 +481,7 @@ func (m *DHSecret) Reset() { *m = DHSecret{} }
func (m *DHSecret) String() string { return proto.CompactTextString(m) }
func (*DHSecret) ProtoMessage() {}
func (*DHSecret) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{4}
return fileDescriptor_5c21d519a9be369a, []int{5}
}
func (m *DHSecret) XXX_Unmarshal(b []byte) error {
......@@ -503,7 +518,7 @@ func (m *DHSecret) GetSecret() string {
//Diff-Helman 加密group, for spender, returner, authorizer to decrypt
type DHSecretGroup struct {
Spender *DHSecret `protobuf:"bytes,1,opt,name=spender,proto3" json:"spender,omitempty"`
Payment *DHSecret `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
Returner *DHSecret `protobuf:"bytes,2,opt,name=returner,proto3" json:"returner,omitempty"`
Authorize *DHSecret `protobuf:"bytes,3,opt,name=authorize,proto3" json:"authorize,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -515,7 +530,7 @@ func (m *DHSecretGroup) Reset() { *m = DHSecretGroup{} }
func (m *DHSecretGroup) String() string { return proto.CompactTextString(m) }
func (*DHSecretGroup) ProtoMessage() {}
func (*DHSecretGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{5}
return fileDescriptor_5c21d519a9be369a, []int{6}
}
func (m *DHSecretGroup) XXX_Unmarshal(b []byte) error {
......@@ -536,9 +551,9 @@ func (m *DHSecretGroup) XXX_DiscardUnknown() {
var xxx_messageInfo_DHSecretGroup proto.InternalMessageInfo
func (m *DHSecretGroup) GetSpender() *DHSecret {
func (m *DHSecretGroup) GetPayment() *DHSecret {
if m != nil {
return m.Spender
return m.Payment
}
return nil
}
......@@ -570,7 +585,7 @@ func (m *ZkProofInfo) Reset() { *m = ZkProofInfo{} }
func (m *ZkProofInfo) String() string { return proto.CompactTextString(m) }
func (*ZkProofInfo) ProtoMessage() {}
func (*ZkProofInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{6}
return fileDescriptor_5c21d519a9be369a, []int{7}
}
func (m *ZkProofInfo) XXX_Unmarshal(b []byte) error {
......@@ -624,7 +639,7 @@ func (m *MixDepositAction) Reset() { *m = MixDepositAction{} }
func (m *MixDepositAction) String() string { return proto.CompactTextString(m) }
func (*MixDepositAction) ProtoMessage() {}
func (*MixDepositAction) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{7}
return fileDescriptor_5c21d519a9be369a, []int{8}
}
func (m *MixDepositAction) XXX_Unmarshal(b []byte) error {
......@@ -671,7 +686,7 @@ func (m *MixTransferAction) Reset() { *m = MixTransferAction{} }
func (m *MixTransferAction) String() string { return proto.CompactTextString(m) }
func (*MixTransferAction) ProtoMessage() {}
func (*MixTransferAction) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{8}
return fileDescriptor_5c21d519a9be369a, []int{9}
}
func (m *MixTransferAction) XXX_Unmarshal(b []byte) error {
......@@ -718,7 +733,7 @@ func (m *MixWithdrawAction) Reset() { *m = MixWithdrawAction{} }
func (m *MixWithdrawAction) String() string { return proto.CompactTextString(m) }
func (*MixWithdrawAction) ProtoMessage() {}
func (*MixWithdrawAction) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{9}
return fileDescriptor_5c21d519a9be369a, []int{10}
}
func (m *MixWithdrawAction) XXX_Unmarshal(b []byte) error {
......@@ -764,7 +779,7 @@ func (m *MixAuthorizeAction) Reset() { *m = MixAuthorizeAction{} }
func (m *MixAuthorizeAction) String() string { return proto.CompactTextString(m) }
func (*MixAuthorizeAction) ProtoMessage() {}
func (*MixAuthorizeAction) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{10}
return fileDescriptor_5c21d519a9be369a, []int{11}
}
func (m *MixAuthorizeAction) XXX_Unmarshal(b []byte) error {
......@@ -810,7 +825,7 @@ func (m *MixAction) Reset() { *m = MixAction{} }
func (m *MixAction) String() string { return proto.CompactTextString(m) }
func (*MixAction) ProtoMessage() {}
func (*MixAction) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{11}
return fileDescriptor_5c21d519a9be369a, []int{12}
}
func (m *MixAction) XXX_Unmarshal(b []byte) error {
......@@ -937,7 +952,7 @@ func (m *DepositPublicInput) Reset() { *m = DepositPublicInput{} }
func (m *DepositPublicInput) String() string { return proto.CompactTextString(m) }
func (*DepositPublicInput) ProtoMessage() {}
func (*DepositPublicInput) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{12}
return fileDescriptor_5c21d519a9be369a, []int{13}
}
func (m *DepositPublicInput) XXX_Unmarshal(b []byte) error {
......@@ -986,7 +1001,7 @@ func (m *WithdrawPublicInput) Reset() { *m = WithdrawPublicInput{} }
func (m *WithdrawPublicInput) String() string { return proto.CompactTextString(m) }
func (*WithdrawPublicInput) ProtoMessage() {}
func (*WithdrawPublicInput) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{13}
return fileDescriptor_5c21d519a9be369a, []int{14}
}
func (m *WithdrawPublicInput) XXX_Unmarshal(b []byte) error {
......@@ -1048,7 +1063,7 @@ func (m *CommitAmount) Reset() { *m = CommitAmount{} }
func (m *CommitAmount) String() string { return proto.CompactTextString(m) }
func (*CommitAmount) ProtoMessage() {}
func (*CommitAmount) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{14}
return fileDescriptor_5c21d519a9be369a, []int{15}
}
func (m *CommitAmount) XXX_Unmarshal(b []byte) error {
......@@ -1098,7 +1113,7 @@ func (m *TransferInputPublicInput) Reset() { *m = TransferInputPublicInp
func (m *TransferInputPublicInput) String() string { return proto.CompactTextString(m) }
func (*TransferInputPublicInput) ProtoMessage() {}
func (*TransferInputPublicInput) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{15}
return fileDescriptor_5c21d519a9be369a, []int{16}
}
func (m *TransferInputPublicInput) XXX_Unmarshal(b []byte) error {
......@@ -1168,7 +1183,7 @@ func (m *TransferOutputPublicInput) Reset() { *m = TransferOutputPublicI
func (m *TransferOutputPublicInput) String() string { return proto.CompactTextString(m) }
func (*TransferOutputPublicInput) ProtoMessage() {}
func (*TransferOutputPublicInput) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{16}
return fileDescriptor_5c21d519a9be369a, []int{17}
}
func (m *TransferOutputPublicInput) XXX_Unmarshal(b []byte) error {
......@@ -1231,7 +1246,7 @@ func (m *AuthorizePublicInput) Reset() { *m = AuthorizePublicInput{} }
func (m *AuthorizePublicInput) String() string { return proto.CompactTextString(m) }
func (*AuthorizePublicInput) ProtoMessage() {}
func (*AuthorizePublicInput) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{17}
return fileDescriptor_5c21d519a9be369a, []int{18}
}
func (m *AuthorizePublicInput) XXX_Unmarshal(b []byte) error {
......@@ -1292,7 +1307,7 @@ func (m *ExistValue) Reset() { *m = ExistValue{} }
func (m *ExistValue) String() string { return proto.CompactTextString(m) }
func (*ExistValue) ProtoMessage() {}
func (*ExistValue) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{18}
return fileDescriptor_5c21d519a9be369a, []int{19}
}
func (m *ExistValue) XXX_Unmarshal(b []byte) error {
......@@ -1331,7 +1346,7 @@ func (m *CommitTreeLeaves) Reset() { *m = CommitTreeLeaves{} }
func (m *CommitTreeLeaves) String() string { return proto.CompactTextString(m) }
func (*CommitTreeLeaves) ProtoMessage() {}
func (*CommitTreeLeaves) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{19}
return fileDescriptor_5c21d519a9be369a, []int{20}
}
func (m *CommitTreeLeaves) XXX_Unmarshal(b []byte) error {
......@@ -1370,7 +1385,7 @@ func (m *CommitTreeRoots) Reset() { *m = CommitTreeRoots{} }
func (m *CommitTreeRoots) String() string { return proto.CompactTextString(m) }
func (*CommitTreeRoots) ProtoMessage() {}
func (*CommitTreeRoots) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{20}
return fileDescriptor_5c21d519a9be369a, []int{21}
}
func (m *CommitTreeRoots) XXX_Unmarshal(b []byte) error {
......@@ -1403,7 +1418,7 @@ type CommitTreeProve struct {
ProofSet []string `protobuf:"bytes,2,rep,name=proofSet,proto3" json:"proofSet,omitempty"`
ProofIndex uint32 `protobuf:"varint,3,opt,name=proofIndex,proto3" json:"proofIndex,omitempty"`
NumLeaves uint32 `protobuf:"varint,4,opt,name=numLeaves,proto3" json:"numLeaves,omitempty"`
Helpers string `protobuf:"bytes,5,opt,name=helpers,proto3" json:"helpers,omitempty"`
Helpers []uint32 `protobuf:"varint,5,rep,packed,name=helpers,proto3" json:"helpers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -1413,7 +1428,7 @@ func (m *CommitTreeProve) Reset() { *m = CommitTreeProve{} }
func (m *CommitTreeProve) String() string { return proto.CompactTextString(m) }
func (*CommitTreeProve) ProtoMessage() {}
func (*CommitTreeProve) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{21}
return fileDescriptor_5c21d519a9be369a, []int{22}
}
func (m *CommitTreeProve) XXX_Unmarshal(b []byte) error {
......@@ -1462,11 +1477,11 @@ func (m *CommitTreeProve) GetNumLeaves() uint32 {
return 0
}
func (m *CommitTreeProve) GetHelpers() string {
func (m *CommitTreeProve) GetHelpers() []uint32 {
if m != nil {
return m.Helpers
}
return ""
return nil
}
type TreeInfoReq struct {
......@@ -1481,7 +1496,7 @@ func (m *TreeInfoReq) Reset() { *m = TreeInfoReq{} }
func (m *TreeInfoReq) String() string { return proto.CompactTextString(m) }
func (*TreeInfoReq) ProtoMessage() {}
func (*TreeInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{22}
return fileDescriptor_5c21d519a9be369a, []int{23}
}
func (m *TreeInfoReq) XXX_Unmarshal(b []byte) error {
......@@ -1527,7 +1542,7 @@ func (m *TreeListResp) Reset() { *m = TreeListResp{} }
func (m *TreeListResp) String() string { return proto.CompactTextString(m) }
func (*TreeListResp) ProtoMessage() {}
func (*TreeListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{23}
return fileDescriptor_5c21d519a9be369a, []int{24}
}
func (m *TreeListResp) XXX_Unmarshal(b []byte) error {
......@@ -1570,7 +1585,7 @@ func (m *PaymentKeyPair) Reset() { *m = PaymentKeyPair{} }
func (m *PaymentKeyPair) String() string { return proto.CompactTextString(m) }
func (*PaymentKeyPair) ProtoMessage() {}
func (*PaymentKeyPair) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{24}
return fileDescriptor_5c21d519a9be369a, []int{25}
}
func (m *PaymentKeyPair) XXX_Unmarshal(b []byte) error {
......@@ -1620,7 +1635,7 @@ func (m *PubKey) Reset() { *m = PubKey{} }
func (m *PubKey) String() string { return proto.CompactTextString(m) }
func (*PubKey) ProtoMessage() {}
func (*PubKey) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{25}
return fileDescriptor_5c21d519a9be369a, []int{26}
}
func (m *PubKey) XXX_Unmarshal(b []byte) error {
......@@ -1666,7 +1681,7 @@ func (m *PrivKey) Reset() { *m = PrivKey{} }
func (m *PrivKey) String() string { return proto.CompactTextString(m) }
func (*PrivKey) ProtoMessage() {}
func (*PrivKey) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{26}
return fileDescriptor_5c21d519a9be369a, []int{27}
}
func (m *PrivKey) XXX_Unmarshal(b []byte) error {
......@@ -1706,7 +1721,7 @@ func (m *ShareSecretKeyPair) Reset() { *m = ShareSecretKeyPair{} }
func (m *ShareSecretKeyPair) String() string { return proto.CompactTextString(m) }
func (*ShareSecretKeyPair) ProtoMessage() {}
func (*ShareSecretKeyPair) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{27}
return fileDescriptor_5c21d519a9be369a, []int{28}
}
func (m *ShareSecretKeyPair) XXX_Unmarshal(b []byte) error {
......@@ -1755,7 +1770,7 @@ func (m *AccountPrivacyKey) Reset() { *m = AccountPrivacyKey{} }
func (m *AccountPrivacyKey) String() string { return proto.CompactTextString(m) }
func (*AccountPrivacyKey) ProtoMessage() {}
func (*AccountPrivacyKey) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{28}
return fileDescriptor_5c21d519a9be369a, []int{29}
}
func (m *AccountPrivacyKey) XXX_Unmarshal(b []byte) error {
......@@ -1802,7 +1817,7 @@ func (m *WalletAddrPrivacy) Reset() { *m = WalletAddrPrivacy{} }
func (m *WalletAddrPrivacy) String() string { return proto.CompactTextString(m) }
func (*WalletAddrPrivacy) ProtoMessage() {}
func (*WalletAddrPrivacy) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{29}
return fileDescriptor_5c21d519a9be369a, []int{30}
}
func (m *WalletAddrPrivacy) XXX_Unmarshal(b []byte) error {
......@@ -1852,7 +1867,7 @@ func (m *SecretData) Reset() { *m = SecretData{} }
func (m *SecretData) String() string { return proto.CompactTextString(m) }
func (*SecretData) ProtoMessage() {}
func (*SecretData) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{30}
return fileDescriptor_5c21d519a9be369a, []int{31}
}
func (m *SecretData) XXX_Unmarshal(b []byte) error {
......@@ -1920,7 +1935,7 @@ func (m *EncodedSecretData) Reset() { *m = EncodedSecretData{} }
func (m *EncodedSecretData) String() string { return proto.CompactTextString(m) }
func (*EncodedSecretData) ProtoMessage() {}
func (*EncodedSecretData) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{31}
return fileDescriptor_5c21d519a9be369a, []int{32}
}
func (m *EncodedSecretData) XXX_Unmarshal(b []byte) error {
......@@ -1967,7 +1982,7 @@ func (m *EncryptSecretData) Reset() { *m = EncryptSecretData{} }
func (m *EncryptSecretData) String() string { return proto.CompactTextString(m) }
func (*EncryptSecretData) ProtoMessage() {}
func (*EncryptSecretData) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{32}
return fileDescriptor_5c21d519a9be369a, []int{33}
}
func (m *EncryptSecretData) XXX_Unmarshal(b []byte) error {
......@@ -2015,7 +2030,7 @@ func (m *DecryptSecretData) Reset() { *m = DecryptSecretData{} }
func (m *DecryptSecretData) String() string { return proto.CompactTextString(m) }
func (*DecryptSecretData) ProtoMessage() {}
func (*DecryptSecretData) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{33}
return fileDescriptor_5c21d519a9be369a, []int{34}
}
func (m *DecryptSecretData) XXX_Unmarshal(b []byte) error {
......@@ -2057,11 +2072,469 @@ func (m *DecryptSecretData) GetEpk() *PubKey {
return nil
}
//一键式获取加密数据
type DepositProofReq struct {
PaymentAddr string `protobuf:"bytes,1,opt,name=paymentAddr,proto3" json:"paymentAddr,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 string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DepositProofReq) Reset() { *m = DepositProofReq{} }
func (m *DepositProofReq) String() string { return proto.CompactTextString(m) }
func (*DepositProofReq) ProtoMessage() {}
func (*DepositProofReq) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{35}
}
func (m *DepositProofReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DepositProofReq.Unmarshal(m, b)
}
func (m *DepositProofReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DepositProofReq.Marshal(b, m, deterministic)
}
func (m *DepositProofReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_DepositProofReq.Merge(m, src)
}
func (m *DepositProofReq) XXX_Size() int {
return xxx_messageInfo_DepositProofReq.Size(m)
}
func (m *DepositProofReq) XXX_DiscardUnknown() {
xxx_messageInfo_DepositProofReq.DiscardUnknown(m)
}
var xxx_messageInfo_DepositProofReq proto.InternalMessageInfo
func (m *DepositProofReq) GetPaymentAddr() string {
if m != nil {
return m.PaymentAddr
}
return ""
}
func (m *DepositProofReq) GetReturnAddr() string {
if m != nil {
return m.ReturnAddr
}
return ""
}
func (m *DepositProofReq) GetAuthorizeAddr() string {
if m != nil {
return m.AuthorizeAddr
}
return ""
}
func (m *DepositProofReq) GetAmount() string {
if m != nil {
return m.Amount
}
return ""
}
type DepositProofResp struct {
NoteHash string `protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
Proof *SecretData `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
Secrets *DHSecretGroup `protobuf:"bytes,3,opt,name=secrets,proto3" json:"secrets,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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{36}
}
func (m *DepositProofResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DepositProofResp.Unmarshal(m, b)
}
func (m *DepositProofResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DepositProofResp.Marshal(b, m, deterministic)
}
func (m *DepositProofResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_DepositProofResp.Merge(m, src)
}
func (m *DepositProofResp) XXX_Size() int {
return xxx_messageInfo_DepositProofResp.Size(m)
}
func (m *DepositProofResp) XXX_DiscardUnknown() {
xxx_messageInfo_DepositProofResp.DiscardUnknown(m)
}
var xxx_messageInfo_DepositProofResp proto.InternalMessageInfo
func (m *DepositProofResp) GetNoteHash() string {
if m != nil {
return m.NoteHash
}
return ""
}
func (m *DepositProofResp) GetProof() *SecretData {
if m != nil {
return m.Proof
}
return nil
}
func (m *DepositProofResp) GetSecrets() *DHSecretGroup {
if m != nil {
return m.Secrets
}
return nil
}
type TreePathProof struct {
TreeRootHash string `protobuf:"bytes,1,opt,name=treeRootHash,proto3" json:"treeRootHash,omitempty"`
TreePath []string `protobuf:"bytes,2,rep,name=treePath,proto3" json:"treePath,omitempty"`
Helpers []uint32 `protobuf:"varint,3,rep,packed,name=helpers,proto3" json:"helpers,omitempty"`
ValidPath []uint32 `protobuf:"varint,4,rep,packed,name=validPath,proto3" json:"validPath,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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{37}
}
func (m *TreePathProof) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TreePathProof.Unmarshal(m, b)
}
func (m *TreePathProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TreePathProof.Marshal(b, m, deterministic)
}
func (m *TreePathProof) XXX_Merge(src proto.Message) {
xxx_messageInfo_TreePathProof.Merge(m, src)
}
func (m *TreePathProof) XXX_Size() int {
return xxx_messageInfo_TreePathProof.Size(m)
}
func (m *TreePathProof) XXX_DiscardUnknown() {
xxx_messageInfo_TreePathProof.DiscardUnknown(m)
}
var xxx_messageInfo_TreePathProof proto.InternalMessageInfo
func (m *TreePathProof) GetTreeRootHash() string {
if m != nil {
return m.TreeRootHash
}
return ""
}
func (m *TreePathProof) GetTreePath() []string {
if m != nil {
return m.TreePath
}
return nil
}
func (m *TreePathProof) GetHelpers() []uint32 {
if m != nil {
return m.Helpers
}
return nil
}
func (m *TreePathProof) GetValidPath() []uint32 {
if m != nil {
return m.ValidPath
}
return nil
}
type WithdrawProofReq struct {
NoteHash string `protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WithdrawProofReq) Reset() { *m = WithdrawProofReq{} }
func (m *WithdrawProofReq) String() string { return proto.CompactTextString(m) }
func (*WithdrawProofReq) ProtoMessage() {}
func (*WithdrawProofReq) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{38}
}
func (m *WithdrawProofReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WithdrawProofReq.Unmarshal(m, b)
}
func (m *WithdrawProofReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WithdrawProofReq.Marshal(b, m, deterministic)
}
func (m *WithdrawProofReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_WithdrawProofReq.Merge(m, src)
}
func (m *WithdrawProofReq) XXX_Size() int {
return xxx_messageInfo_WithdrawProofReq.Size(m)
}
func (m *WithdrawProofReq) XXX_DiscardUnknown() {
xxx_messageInfo_WithdrawProofReq.DiscardUnknown(m)
}
var xxx_messageInfo_WithdrawProofReq proto.InternalMessageInfo
func (m *WithdrawProofReq) GetNoteHash() string {
if m != nil {
return m.NoteHash
}
return ""
}
type WithdrawProofResp struct {
Proof *SecretData `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"`
NullifierHash string `protobuf:"bytes,2,opt,name=nullifierHash,proto3" json:"nullifierHash,omitempty"`
AuthSpendHash string `protobuf:"bytes,3,opt,name=authSpendHash,proto3" json:"authSpendHash,omitempty"`
NoteHash string `protobuf:"bytes,4,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
SpendPrivKey string `protobuf:"bytes,5,opt,name=spendPrivKey,proto3" json:"spendPrivKey,omitempty"`
SpendFlag uint32 `protobuf:"varint,6,opt,name=spendFlag,proto3" json:"spendFlag,omitempty"`
AuthFlag uint32 `protobuf:"varint,7,opt,name=authFlag,proto3" json:"authFlag,omitempty"`
TreeProof *TreePathProof `protobuf:"bytes,8,opt,name=treeProof,proto3" json:"treeProof,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WithdrawProofResp) Reset() { *m = WithdrawProofResp{} }
func (m *WithdrawProofResp) String() string { return proto.CompactTextString(m) }
func (*WithdrawProofResp) ProtoMessage() {}
func (*WithdrawProofResp) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{39}
}
func (m *WithdrawProofResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WithdrawProofResp.Unmarshal(m, b)
}
func (m *WithdrawProofResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WithdrawProofResp.Marshal(b, m, deterministic)
}
func (m *WithdrawProofResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_WithdrawProofResp.Merge(m, src)
}
func (m *WithdrawProofResp) XXX_Size() int {
return xxx_messageInfo_WithdrawProofResp.Size(m)
}
func (m *WithdrawProofResp) XXX_DiscardUnknown() {
xxx_messageInfo_WithdrawProofResp.DiscardUnknown(m)
}
var xxx_messageInfo_WithdrawProofResp proto.InternalMessageInfo
func (m *WithdrawProofResp) GetProof() *SecretData {
if m != nil {
return m.Proof
}
return nil
}
func (m *WithdrawProofResp) GetNullifierHash() string {
if m != nil {
return m.NullifierHash
}
return ""
}
func (m *WithdrawProofResp) GetAuthSpendHash() string {
if m != nil {
return m.AuthSpendHash
}
return ""
}
func (m *WithdrawProofResp) GetNoteHash() string {
if m != nil {
return m.NoteHash
}
return ""
}
func (m *WithdrawProofResp) GetSpendPrivKey() string {
if m != nil {
return m.SpendPrivKey
}
return ""
}
func (m *WithdrawProofResp) GetSpendFlag() uint32 {
if m != nil {
return m.SpendFlag
}
return 0
}
func (m *WithdrawProofResp) GetAuthFlag() uint32 {
if m != nil {
return m.AuthFlag
}
return 0
}
func (m *WithdrawProofResp) GetTreeProof() *TreePathProof {
if m != nil {
return m.TreeProof
}
return nil
}
type AuthProofReq struct {
NoteHash string `protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
AuthReturn uint32 `protobuf:"varint,2,opt,name=authReturn,proto3" json:"authReturn,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AuthProofReq) Reset() { *m = AuthProofReq{} }
func (m *AuthProofReq) String() string { return proto.CompactTextString(m) }
func (*AuthProofReq) ProtoMessage() {}
func (*AuthProofReq) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{40}
}
func (m *AuthProofReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AuthProofReq.Unmarshal(m, b)
}
func (m *AuthProofReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AuthProofReq.Marshal(b, m, deterministic)
}
func (m *AuthProofReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_AuthProofReq.Merge(m, src)
}
func (m *AuthProofReq) XXX_Size() int {
return xxx_messageInfo_AuthProofReq.Size(m)
}
func (m *AuthProofReq) XXX_DiscardUnknown() {
xxx_messageInfo_AuthProofReq.DiscardUnknown(m)
}
var xxx_messageInfo_AuthProofReq proto.InternalMessageInfo
func (m *AuthProofReq) GetNoteHash() string {
if m != nil {
return m.NoteHash
}
return ""
}
func (m *AuthProofReq) GetAuthReturn() uint32 {
if m != nil {
return m.AuthReturn
}
return 0
}
type AuthProofResp struct {
Proof *SecretData `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"`
AuthPubKey string `protobuf:"bytes,2,opt,name=authPubKey,proto3" json:"authPubKey,omitempty"`
AuthPrivKey string `protobuf:"bytes,3,opt,name=authPrivKey,proto3" json:"authPrivKey,omitempty"`
AuthHash string `protobuf:"bytes,4,opt,name=authHash,proto3" json:"authHash,omitempty"`
AuthSpendHash string `protobuf:"bytes,5,opt,name=authSpendHash,proto3" json:"authSpendHash,omitempty"`
NoteHash string `protobuf:"bytes,6,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
SpendFlag uint32 `protobuf:"varint,7,opt,name=spendFlag,proto3" json:"spendFlag,omitempty"`
TreeProof *TreePathProof `protobuf:"bytes,8,opt,name=treeProof,proto3" json:"treeProof,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AuthProofResp) Reset() { *m = AuthProofResp{} }
func (m *AuthProofResp) String() string { return proto.CompactTextString(m) }
func (*AuthProofResp) ProtoMessage() {}
func (*AuthProofResp) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{41}
}
func (m *AuthProofResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AuthProofResp.Unmarshal(m, b)
}
func (m *AuthProofResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AuthProofResp.Marshal(b, m, deterministic)
}
func (m *AuthProofResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_AuthProofResp.Merge(m, src)
}
func (m *AuthProofResp) XXX_Size() int {
return xxx_messageInfo_AuthProofResp.Size(m)
}
func (m *AuthProofResp) XXX_DiscardUnknown() {
xxx_messageInfo_AuthProofResp.DiscardUnknown(m)
}
var xxx_messageInfo_AuthProofResp proto.InternalMessageInfo
func (m *AuthProofResp) GetProof() *SecretData {
if m != nil {
return m.Proof
}
return nil
}
func (m *AuthProofResp) GetAuthPubKey() string {
if m != nil {
return m.AuthPubKey
}
return ""
}
func (m *AuthProofResp) GetAuthPrivKey() string {
if m != nil {
return m.AuthPrivKey
}
return ""
}
func (m *AuthProofResp) GetAuthHash() string {
if m != nil {
return m.AuthHash
}
return ""
}
func (m *AuthProofResp) GetAuthSpendHash() string {
if m != nil {
return m.AuthSpendHash
}
return ""
}
func (m *AuthProofResp) GetNoteHash() string {
if m != nil {
return m.NoteHash
}
return ""
}
func (m *AuthProofResp) GetSpendFlag() uint32 {
if m != nil {
return m.SpendFlag
}
return 0
}
func (m *AuthProofResp) GetTreeProof() *TreePathProof {
if m != nil {
return m.TreeProof
}
return nil
}
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"`
AuthSpendHash string `protobuf:"bytes,3,opt,name=authSpendHash,proto3" json:"authSpendHash,omitempty"`
Spender string `protobuf:"bytes,4,opt,name=spender,proto3" json:"spender,omitempty"`
IsReturner bool `protobuf:"varint,4,opt,name=isReturner,proto3" json:"isReturner,omitempty"`
Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
Status NoteStatus `protobuf:"varint,6,opt,name=status,proto3,enum=types.NoteStatus" json:"status,omitempty"`
Secret *SecretData `protobuf:"bytes,7,opt,name=secret,proto3" json:"secret,omitempty"`
......@@ -2074,7 +2547,7 @@ func (m *WalletIndexInfo) Reset() { *m = WalletIndexInfo{} }
func (m *WalletIndexInfo) String() string { return proto.CompactTextString(m) }
func (*WalletIndexInfo) ProtoMessage() {}
func (*WalletIndexInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{34}
return fileDescriptor_5c21d519a9be369a, []int{42}
}
func (m *WalletIndexInfo) XXX_Unmarshal(b []byte) error {
......@@ -2116,11 +2589,11 @@ func (m *WalletIndexInfo) GetAuthSpendHash() string {
return ""
}
func (m *WalletIndexInfo) GetSpender() string {
func (m *WalletIndexInfo) GetIsReturner() bool {
if m != nil {
return m.Spender
return m.IsReturner
}
return ""
return false
}
func (m *WalletIndexInfo) GetAccount() string {
......@@ -2156,7 +2629,7 @@ func (m *WalletDbMixInfo) Reset() { *m = WalletDbMixInfo{} }
func (m *WalletDbMixInfo) String() string { return proto.CompactTextString(m) }
func (*WalletDbMixInfo) ProtoMessage() {}
func (*WalletDbMixInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{35}
return fileDescriptor_5c21d519a9be369a, []int{43}
}
func (m *WalletDbMixInfo) XXX_Unmarshal(b []byte) error {
......@@ -2195,7 +2668,6 @@ type WalletMixIndexReq 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"`
AuthSpendHash string `protobuf:"bytes,3,opt,name=authSpendHash,proto3" json:"authSpendHash,omitempty"`
Spender string `protobuf:"bytes,4,opt,name=spender,proto3" json:"spender,omitempty"`
Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
Count int32 `protobuf:"varint,7,opt,name=count,proto3" json:"count,omitempty"`
......@@ -2209,7 +2681,7 @@ func (m *WalletMixIndexReq) Reset() { *m = WalletMixIndexReq{} }
func (m *WalletMixIndexReq) String() string { return proto.CompactTextString(m) }
func (*WalletMixIndexReq) ProtoMessage() {}
func (*WalletMixIndexReq) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{36}
return fileDescriptor_5c21d519a9be369a, []int{44}
}
func (m *WalletMixIndexReq) XXX_Unmarshal(b []byte) error {
......@@ -2251,13 +2723,6 @@ func (m *WalletMixIndexReq) GetAuthSpendHash() string {
return ""
}
func (m *WalletMixIndexReq) GetSpender() string {
if m != nil {
return m.Spender
}
return ""
}
func (m *WalletMixIndexReq) GetAccount() string {
if m != nil {
return m.Account
......@@ -2297,7 +2762,7 @@ func (m *WalletIndexResp) Reset() { *m = WalletIndexResp{} }
func (m *WalletIndexResp) String() string { return proto.CompactTextString(m) }
func (*WalletIndexResp) ProtoMessage() {}
func (*WalletIndexResp) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{37}
return fileDescriptor_5c21d519a9be369a, []int{45}
}
func (m *WalletIndexResp) XXX_Unmarshal(b []byte) error {
......@@ -2336,7 +2801,7 @@ func (m *WalletReqAddrs) Reset() { *m = WalletReqAddrs{} }
func (m *WalletReqAddrs) String() string { return proto.CompactTextString(m) }
func (*WalletReqAddrs) ProtoMessage() {}
func (*WalletReqAddrs) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{38}
return fileDescriptor_5c21d519a9be369a, []int{46}
}
func (m *WalletReqAddrs) XXX_Unmarshal(b []byte) error {
......@@ -2377,7 +2842,7 @@ func (m *WalletEnablePrivacyRst) Reset() { *m = WalletEnablePrivacyRst{}
func (m *WalletEnablePrivacyRst) String() string { return proto.CompactTextString(m) }
func (*WalletEnablePrivacyRst) ProtoMessage() {}
func (*WalletEnablePrivacyRst) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{39}
return fileDescriptor_5c21d519a9be369a, []int{47}
}
func (m *WalletEnablePrivacyRst) XXX_Unmarshal(b []byte) error {
......@@ -2430,7 +2895,7 @@ func (m *WalletEnablePrivacyResp) Reset() { *m = WalletEnablePrivacyResp
func (m *WalletEnablePrivacyResp) String() string { return proto.CompactTextString(m) }
func (*WalletEnablePrivacyResp) ProtoMessage() {}
func (*WalletEnablePrivacyResp) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{40}
return fileDescriptor_5c21d519a9be369a, []int{48}
}
func (m *WalletEnablePrivacyResp) XXX_Unmarshal(b []byte) error {
......@@ -2471,7 +2936,7 @@ func (m *LocalMixTx) Reset() { *m = LocalMixTx{} }
func (m *LocalMixTx) String() string { return proto.CompactTextString(m) }
func (*LocalMixTx) ProtoMessage() {}
func (*LocalMixTx) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{41}
return fileDescriptor_5c21d519a9be369a, []int{49}
}
func (m *LocalMixTx) XXX_Unmarshal(b []byte) error {
......@@ -2529,7 +2994,7 @@ func (m *MixTxListReq) Reset() { *m = MixTxListReq{} }
func (m *MixTxListReq) String() string { return proto.CompactTextString(m) }
func (*MixTxListReq) ProtoMessage() {}
func (*MixTxListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{42}
return fileDescriptor_5c21d519a9be369a, []int{50}
}
func (m *MixTxListReq) XXX_Unmarshal(b []byte) error {
......@@ -2603,7 +3068,7 @@ func (m *MixTxListResp) Reset() { *m = MixTxListResp{} }
func (m *MixTxListResp) String() string { return proto.CompactTextString(m) }
func (*MixTxListResp) ProtoMessage() {}
func (*MixTxListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{43}
return fileDescriptor_5c21d519a9be369a, []int{51}
}
func (m *MixTxListResp) XXX_Unmarshal(b []byte) error {
......@@ -2644,7 +3109,7 @@ func (m *PrivacyAddrResult) Reset() { *m = PrivacyAddrResult{} }
func (m *PrivacyAddrResult) String() string { return proto.CompactTextString(m) }
func (*PrivacyAddrResult) ProtoMessage() {}
func (*PrivacyAddrResult) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{44}
return fileDescriptor_5c21d519a9be369a, []int{52}
}
func (m *PrivacyAddrResult) XXX_Unmarshal(b []byte) error {
......@@ -2697,7 +3162,7 @@ func (m *ReqEnablePrivacyRst) Reset() { *m = ReqEnablePrivacyRst{} }
func (m *ReqEnablePrivacyRst) String() string { return proto.CompactTextString(m) }
func (*ReqEnablePrivacyRst) ProtoMessage() {}
func (*ReqEnablePrivacyRst) Descriptor() ([]byte, []int) {
return fileDescriptor_5c21d519a9be369a, []int{45}
return fileDescriptor_5c21d519a9be369a, []int{53}
}
func (m *ReqEnablePrivacyRst) XXX_Unmarshal(b []byte) error {
......@@ -2727,7 +3192,6 @@ func (m *ReqEnablePrivacyRst) GetResults() []*PrivacyAddrResult {
func init() {
proto.RegisterEnum("types.VerifyType", VerifyType_name, VerifyType_value)
proto.RegisterEnum("types.ZkCurveId", ZkCurveId_name, ZkCurveId_value)
proto.RegisterEnum("types.MixConfigType", MixConfigType_name, MixConfigType_value)
proto.RegisterEnum("types.MixConfigAct", MixConfigAct_name, MixConfigAct_value)
proto.RegisterEnum("types.NoteStatus", NoteStatus_name, NoteStatus_value)
......@@ -2735,6 +3199,7 @@ func init() {
proto.RegisterType((*ZkVerifyKey)(nil), "types.ZkVerifyKey")
proto.RegisterType((*ZkVerifyKeys)(nil), "types.ZkVerifyKeys")
proto.RegisterType((*AuthPubKeys)(nil), "types.AuthPubKeys")
proto.RegisterType((*PaymentKey)(nil), "types.PaymentKey")
proto.RegisterType((*MixConfigAction)(nil), "types.MixConfigAction")
proto.RegisterType((*DHSecret)(nil), "types.DHSecret")
proto.RegisterType((*DHSecretGroup)(nil), "types.DHSecretGroup")
......@@ -2766,6 +3231,13 @@ func init() {
proto.RegisterType((*EncodedSecretData)(nil), "types.EncodedSecretData")
proto.RegisterType((*EncryptSecretData)(nil), "types.EncryptSecretData")
proto.RegisterType((*DecryptSecretData)(nil), "types.DecryptSecretData")
proto.RegisterType((*DepositProofReq)(nil), "types.DepositProofReq")
proto.RegisterType((*DepositProofResp)(nil), "types.DepositProofResp")
proto.RegisterType((*TreePathProof)(nil), "types.TreePathProof")
proto.RegisterType((*WithdrawProofReq)(nil), "types.WithdrawProofReq")
proto.RegisterType((*WithdrawProofResp)(nil), "types.WithdrawProofResp")
proto.RegisterType((*AuthProofReq)(nil), "types.AuthProofReq")
proto.RegisterType((*AuthProofResp)(nil), "types.AuthProofResp")
proto.RegisterType((*WalletIndexInfo)(nil), "types.WalletIndexInfo")
proto.RegisterType((*WalletDbMixInfo)(nil), "types.WalletDbMixInfo")
proto.RegisterType((*WalletMixIndexReq)(nil), "types.WalletMixIndexReq")
......@@ -2785,133 +3257,149 @@ func init() {
}
var fileDescriptor_5c21d519a9be369a = []byte{
// 2014 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x5b,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0xf6, 0x04, 0x20, 0xea, 0xae, 0x4c, 0x81, 0xd3, 0x6e, 0xb3, 0xf5, 0x4c, 0x80,
0x9e, 0xe1, 0xde, 0x79, 0xab, 0xab, 0x6b, 0xa8, 0x00, 0x99, 0x5e, 0xbf, 0xd5, 0x15, 0x1a, 0x1e,
0x1d, 0xf7, 0x06, 0x2d, 0x3d, 0x5d, 0xfb, 0x29, 0x7c, 0xc0, 0x1e, 0xe9, 0xb2, 0x92, 0x83, 0x91,
0xe9, 0x48, 0x21, 0x05, 0xc8, 0x74, 0x9a, 0xc7, 0x2d, 0xe1, 0xc5, 0xc1, 0x51, 0xa3, 0xdb, 0xed,
0x74, 0x9f, 0xeb, 0x1a, 0xa3, 0x9e, 0x75, 0xba, 0x9d, 0x41, 0xbb, 0xd5, 0xd4, 0x53, 0xf5, 0xbf,
0x6a, 0x00, 0x53, 0x7b, 0xae, 0x06, 0x9d, 0x47, 0xb0, 0xfd, 0x7c, 0x49, 0x8e, 0xba, 0xc9, 0x30,
0xb9, 0xe9, 0xda, 0x93, 0x3d, 0x3d, 0x22, 0x07, 0xd4, 0xb7, 0x9d, 0x2b, 0x63, 0x03, 0x7d, 0x01,
0x25, 0xb1, 0x85, 0xd9, 0xf0, 0x4e, 0x3b, 0x7e, 0x06, 0xe5, 0x44, 0xee, 0xa0, 0xed, 0x08, 0xc4,
0x9b, 0xd1, 0xde, 0x5e, 0xc4, 0x58, 0xce, 0x32, 0x63, 0xe3, 0x22, 0xc7, 0x7f, 0xe5, 0x3e, 0xfc,
0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x7b, 0x68, 0x23, 0xff, 0x15, 0x00, 0x00,
// 2266 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x4b, 0x93, 0x1b, 0x49,
0xf1, 0x57, 0xeb, 0xad, 0x94, 0x34, 0x23, 0x95, 0xbd, 0x5e, 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xcc, 0xd4, 0x71, 0x9e, 0xff, 0xa7, 0x74, 0xff, 0x3f, 0x01, 0x00, 0x00,
0xff, 0xff, 0xb2, 0x56, 0xda, 0xeb, 0x88, 0x1a, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
......
......@@ -46,3 +46,11 @@ func (policy *mixPolicy) On_EncryptSecretData(req *mixTy.EncryptSecretData) (typ
func (policy *mixPolicy) On_DecryptSecretData(req *mixTy.DecryptSecretData) (types.Message, error) {
return decryptSecretData(req)
}
func (policy *mixPolicy) On_DepositProof(req *mixTy.DepositProofReq) (types.Message, error) {
return policy.depositProof(req)
}
func (policy *mixPolicy) On_WithdrawProof(req *mixTy.WithdrawProofReq) (types.Message, error) {
return policy.withdrawProof(req)
}
......@@ -7,8 +7,6 @@ package wallet
import (
"bytes"
"fmt"
"math/big"
"github.com/33cn/chain33/system/dapp"
"github.com/pkg/errors"
......@@ -26,10 +24,10 @@ import (
//payment, payPrivKey=hash(privkey), payPubkey=hash(payPrivKey)
//DH crypt key, prikey=payPrikey, pubKey=payPrikey*G
func newPrivacyWithPrivKey(privKey []byte) (*mixTy.AccountPrivacyKey, error) {
payPrivacyKey := MimcHashByte([][]byte{privKey})
payPrivacyKey := mimcHashByte([][]byte{privKey})
paymentKey := &mixTy.PaymentKeyPair{}
paymentKey.SpendKey = getFrString(payPrivacyKey)
paymentKey.PayKey = getFrString(MimcHashByte([][]byte{payPrivacyKey}))
paymentKey.PayKey = getFrString(mimcHashByte([][]byte{payPrivacyKey}))
shareSecretKey := &mixTy.ShareSecretKeyPair{}
ecdh := NewCurveBn256ECDH()
......@@ -71,13 +69,14 @@ func encryptDataWithPadding(password, data []byte) []byte {
return wcom.CBCEncrypterPrivkey(password, paddingText)
}
func encryptData(receiverPubKey *mixTy.PubKey, data []byte) (*mixTy.PubKey, []byte, error) {
func encryptData(receiverPubKey *mixTy.PubKey, data []byte) *mixTy.DHSecret {
ecdh := NewCurveBn256ECDH()
//generate ephemeral priv/pub key
ephPriv, ephPub := ecdh.GenerateKey(nil)
password, _ := ecdh.GenerateSharedSecret(ephPriv, receiverPubKey)
encrypt := encryptDataWithPadding(password, data)
return ephPub, encryptDataWithPadding(password, data), nil
return &mixTy.DHSecret{Epk: ephPub, Secret: common.ToHex(encrypt)}
}
......@@ -104,25 +103,25 @@ func getFrString(v []byte) string {
return f.String()
}
func MimcHashString(params []string) []byte {
func mimcHashString(params []string) []byte {
var sum []byte
for _, k := range params {
fmt.Println("input:", k)
//fmt.Println("input:", k)
sum = append(sum, getByte(k)...)
}
hash := mimcHashCalc(sum)
fmt.Println("hash=", getFrString(hash))
//fmt.Println("hash=", getFrString(hash))
return hash
}
func MimcHashByte(params [][]byte) []byte {
func mimcHashByte(params [][]byte) []byte {
var sum []byte
for _, k := range params {
sum = append(sum, k...)
}
hash := mimcHashCalc(sum)
fmt.Println("hash=", getFrString(hash))
//fmt.Println("hash=", getFrString(hash))
return hash
}
......@@ -387,64 +386,3 @@ func (policy *mixPolicy) showAccountNoteInfo(addrs []string) (*mixTy.WalletIndex
}
return &resps, nil
}
//对secretData 编码为string,同时增加随机值
func encodeSecretData(secret *mixTy.SecretData) (*mixTy.EncodedSecretData, error) {
if secret == nil {
return nil, errors.Wrap(types.ErrInvalidParam, "para is nil")
}
if len(secret.PaymentPubKey) <= 0 {
return nil, errors.Wrap(types.ErrInvalidParam, "spendPubKey is nil")
}
var val big.Int
ret, succ := val.SetString(secret.Amount, 10)
if !succ {
return nil, errors.Wrapf(types.ErrInvalidParam, "wrong amount = %s", secret.Amount)
}
if ret.Sign() <= 0 {
return nil, errors.Wrapf(types.ErrInvalidParam, "amount = %s, need bigger than 0", secret.Amount)
}
//获取随机值
var fr fr_bn256.Element
fr.SetRandom()
secret.NoteRandom = fr.String()
code := types.Encode(secret)
var resp mixTy.EncodedSecretData
resp.Encoded = common.ToHex(code)
resp.RawData = secret
return &resp, nil
}
//产生随机秘钥和receivingPk对data DH加密,返回随机秘钥的公钥
func encryptSecretData(req *mixTy.EncryptSecretData) (*mixTy.DHSecret, error) {
secret, err := common.FromHex(req.Secret)
if err != nil {
return nil, errors.Wrap(err, "decode secret")
}
epk, crypt, err := encryptData(req.ReceivingPk, secret)
if err != nil {
return nil, errors.Wrap(err, "encrypt")
}
return &mixTy.DHSecret{Epk: epk, Secret: common.ToHex(crypt)}, nil
}
func decryptSecretData(req *mixTy.DecryptSecretData) (*mixTy.SecretData, error) {
secret, err := common.FromHex(req.Secret)
if err != nil {
return nil, errors.Wrap(err, "decode req.secret")
}
decrypt, err := decryptData(req.ReceivingPriKey, req.Epk, secret)
if err != nil {
return nil, errors.Wrap(err, "decrypt secret")
}
var raw mixTy.SecretData
err = types.Decode(decrypt, &raw)
if err != nil {
return nil, errors.Wrap(mixTy.ErrDecryptDataFail, "decode decrypt.secret")
}
return &raw, nil
}
......@@ -158,7 +158,7 @@ func updateNullifier(ldb *table.Table, nullifier string) error {
return nil
}
u.Info.Status = mixTy.NoteStatus_CLOSE
u.Info.Status = mixTy.NoteStatus_INVALID
return ldb.Update([]byte(u.TxIndex), u)
}
......@@ -174,7 +174,7 @@ func updateAuthSpend(ldb *table.Table, authSpend string) error {
return nil
}
u.Info.Status = mixTy.NoteStatus_OPEN
u.Info.Status = mixTy.NoteStatus_VALID
return ldb.Update([]byte(u.TxIndex), u)
}
......@@ -193,8 +193,6 @@ func (e *mixPolicy) listMixInfos(req *mixTy.WalletMixIndexReq) (types.Message, e
indexName = "nullifier"
} else if len(req.AuthSpendHash) > 0 {
indexName = "authSpendHash"
} else if len(req.Spender) > 0 {
indexName = "spender"
} else if len(req.Account) > 0 {
indexName = "account"
} else if req.Status > 0 {
......@@ -206,7 +204,6 @@ func (e *mixPolicy) listMixInfos(req *mixTy.WalletMixIndexReq) (types.Message, e
NoteHash: req.NoteHash,
Nullifier: req.Nullifier,
AuthSpendHash: req.AuthSpendHash,
Spender: req.Spender,
Account: req.Account,
Status: mixTy.NoteStatus(req.Status),
}},
......@@ -271,7 +268,7 @@ func (p *mixPolicy) processSecretGroup(noteHash string, secretGroup *mixTy.DHSec
}
//可能自己账户里面既有spender,也有returner 或authorize,都要解一遍
info, err := p.decodeSecret(noteHash, secretGroup.Spender, privacyKeys)
info, err := p.decodeSecret(noteHash, secretGroup.Payment, privacyKeys)
if err != nil {
bizlog.Error("processSecretGroup.spender", "err", err)
}
......@@ -324,18 +321,17 @@ func (p *mixPolicy) decodeSecret(noteHash string, dhSecret *mixTy.DHSecret, priv
//decrypted, save database
var info mixTy.WalletIndexInfo
info.NoteHash = noteHash
info.Nullifier = getFrString(MimcHashString([]string{rawData.NoteRandom}))
info.Nullifier = getFrString(mimcHashString([]string{rawData.NoteRandom}))
//如果自己是spender,则记录有关spenderAuthHash,如果是returner,则记录returnerAuthHash
//如果授权为spenderAuthHash,则spender更新本地为OPEN,returner侧仍为FROZEN,花费后,两端都变为USED
//如果授权为returnerAuthHash,则returner更新本地为OPEN,spender侧仍为FROZEN,
if rawData.PaymentPubKey == key.Privacy.PaymentKey.PayKey {
info.Spender = rawData.PaymentPubKey
info.AuthSpendHash = getFrString(MimcHashString([]string{rawData.PaymentPubKey, rawData.Amount, rawData.NoteRandom}))
info.AuthSpendHash = getFrString(mimcHashString([]string{rawData.PaymentPubKey, rawData.Amount, rawData.NoteRandom}))
} else if rawData.ReturnPubKey == key.Privacy.PaymentKey.PayKey {
info.Spender = rawData.ReturnPubKey
info.AuthSpendHash = getFrString(MimcHashString([]string{rawData.ReturnPubKey, rawData.Amount, rawData.NoteRandom}))
info.IsReturner = true
info.AuthSpendHash = getFrString(mimcHashString([]string{rawData.ReturnPubKey, rawData.Amount, rawData.NoteRandom}))
}
info.Status = mixTy.NoteStatus_OPEN
info.Status = mixTy.NoteStatus_VALID
if len(rawData.AuthorizePubKey) > 0 {
info.Status = mixTy.NoteStatus_FROZEN
}
......
......@@ -23,7 +23,6 @@ var boardOpt = &table.Option{
"noteHash",
"nullifier",
"authSpendHash",
"spender",
"account",
"status"},
}
......@@ -73,8 +72,6 @@ func (r *MixRow) Get(key string) ([]byte, error) {
return []byte(r.Info.Nullifier), nil
case "authSpendHash":
return []byte(r.Info.AuthSpendHash), nil
case "spender":
return []byte(r.Info.Spender), nil
case "account":
return []byte(r.Info.Account), nil
case "status":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment